Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Config Bug #381

Merged
merged 2 commits into from
Nov 16, 2023
Merged

Conversation

CannonLock
Copy link
Contributor

  • Add strong typing to avoid future bugs
  • Add null, string[] and int[] support

Fixes #380

- Add strong typing to avoid future bugs
- Add null, string[] and int[] support

Fixes PelicanPlatform#380
@CannonLock CannonLock requested a review from haoming29 November 15, 2023 21:58
- Increase the Config Type flexibility
- Allow infinitely nested configs

Fixes PelicanPlatform#380
Copy link
Contributor

@haoming29 haoming29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Manually added a new config locally and the /config page still works as expected. Thanks for making this so flexible!

}

function sortConfig (a: any, b: any) {
if(typeof a[1] == 'object' && typeof b[1] != 'object'){
type ConfigValue = Config | string | number | boolean | null | string[] | number[] | duration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this change! It will be greatly improve the robustness of the way we displaying config values

@haoming29 haoming29 merged commit df77641 into PelicanPlatform:main Nov 16, 2023
6 checks passed
@haoming29 haoming29 added this to the v7.3.0 milestone Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config page breaks on receiving a null value
2 participants