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

initial settings table. #338

Merged
merged 10 commits into from
Jul 23, 2022
Merged

initial settings table. #338

merged 10 commits into from
Jul 23, 2022

Conversation

AnalogJ
Copy link
Owner

@AnalogJ AnalogJ commented Jul 21, 2022

  • updated dbdiagrams schema
  • [BREAKING] force failure if notify.filter_attributes or notify.level is set
  • added Settings table (and default values during migration)
  • Added Save Settings and Get Settings functions.
  • Added web API endpoints for getting and saving settings.
  • Deprecated old Notify* constants. Created new MetricsStatus* and MetricsNotifyLevel constants.

AnalogJ added 4 commits July 16, 2022 21:50
- updated dbdiagrams schema
- [BREAKING] force failure if `notify.filter_attributes` or `notify.level` is set
- added Settings table (and default values during migration)
- Added Save Settings and Get Settings functions.
- Added web API endpoints for getting and saving settings.
- Deprecated old Notify* constants. Created new MetricsStatus* and MetricsNotifyLevel constants.
Settings are loaded from the DB and added to the AppConfig during startup.
When updating settings, they are stored in AppConfig, and written do  the database.
@AnalogJ AnalogJ force-pushed the app_db_settings branch 3 times, most recently from 84df481 to 3b6b525 Compare July 21, 2022 05:29
@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2022

Codecov Report

Merging #338 (e41ee47) into beta (9e0ba4d) will decrease coverage by 25.27%.
The diff coverage is 32.18%.

@@             Coverage Diff             @@
##             beta     #338       +/-   ##
===========================================
- Coverage   55.65%   30.38%   -25.28%     
===========================================
  Files          18       53       +35     
  Lines         963     2965     +2002     
  Branches        0       62       +62     
===========================================
+ Hits          536      901      +365     
- Misses        406     2033     +1627     
- Partials       21       31       +10     
Flag Coverage Δ
unittests 30.38% <32.18%> (-25.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
collector/pkg/collector/metrics.go 0.00% <0.00%> (ø)
webapp/backend/pkg/config/config.go 0.00% <0.00%> (ø)
webapp/backend/pkg/database/scrutiny_repository.go 13.52% <0.00%> (ø)
...ase/scrutiny_repository_device_smart_attributes.go 0.00% <0.00%> (ø)
...end/pkg/database/scrutiny_repository_migrations.go 0.00% <0.00%> (ø)
...ckend/pkg/database/scrutiny_repository_settings.go 0.00% <0.00%> (ø)
...p/frontend/src/app/data/mock/device/details/sda.ts 100.00% <ø> (ø)
webapp/frontend/src/app/data/mock/summary/data.ts 100.00% <ø> (ø)
...dialog/dashboard-device-delete-dialog.component.ts 100.00% <ø> (ø)
webapp/frontend/src/app/shared/device-sort.pipe.ts 3.12% <0.00%> (ø)
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9c1de9...e41ee47. Read the comment docs.

…ult).

Converted all settings keys to snakecase.
update the frontend to persist settings to the database.
Using ScrutinyConfigService instead of TreoConfigService.
Using snake case settings in frontend.
Make sure we're using AppConfig type where possible.
@AnalogJ AnalogJ merged commit e8755ff into beta Jul 23, 2022
@AnalogJ AnalogJ deleted the app_db_settings branch July 23, 2022 23:37
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.

2 participants