Commit Graph

32 Commits

Author SHA1 Message Date
mcarbonne 6362512406 Update go to 1.25 (#875)
Closes #872

* update go to 1.25

* update deprecated gomock

* remove deprecated ioutil

* update (and fix) ci

* add golang lint (as warning)

* enable formatters + freeze golang version
2026-02-08 20:46:36 -08:00
mcarbonne bdbe13e320 Add option to discard SCT Data Table Temperature History (#557)
Fixes #494
2026-02-05 20:59:24 -08:00
Sam 600cd153e0 491 [FEAT] Allow disks to be hidden/archived
- Add archived to device type & db
- Add archive/unarchive handlers to webapp backend
- Add archive toggle & styling to webapp frontend
2025-02-21 09:25:27 +01:00
Brice Bauer 142fe06df1 Move powered_on_hours_unit to a new migration id 2024-07-22 08:37:35 -04:00
Brice Bauer a18e2842ac Update db migration description to match setting possible values 2024-05-08 08:43:25 -04:00
Brice Bauer 8fa32c6dd7 Add DB Migration and config/settings 2024-05-07 16:45:09 -04:00
Aram Akhavan 6417d71311 Add a setting for repeating notifications or not 2024-02-04 11:38:50 -08:00
Jason Kulatunga de21e611a3 fixing migration for line_stroke setting. 2023-04-05 21:06:09 -07:00
adripo 536b590080 feat: dynamic line stroke settings 2022-11-11 00:19:51 +01:00
Jason Kulatunga a1b0108503 Added PRAGMA settings support when connecting to SQLITE db.
When a transaction cannot lock the database, because it is already locked by another one,
SQLite by default throws an error: database is locked. This behavior is usually not appropriate when
concurrent access is needed, typically when multiple processes write to the same database.
PRAGMA busy_timeout lets you set a timeout or a handler for these events. When setting a timeout,
SQLite will try the transaction multiple times within this timeout.
https://rsqlite.r-dbi.org/reference/sqlitesetbusyhandler

retrying for 30000 milliseconds, 30seconds - this would be unreasonable for a distributed multi-tenant application,
but should be fine for local usage.

added mechanism for global settings (PRAGMA and DB level instructions).

fixes #341
2022-08-02 22:14:23 -07:00
Jason Kulatunga 3f272b36d4 adding setting to allow users to customize between binary vs SI/Metric units in UI.
fixes #330
2022-07-30 08:50:23 -07:00
Jason Kulatunga 7e672e8b8e adding tests for config.MergeConfigMap functionality. (Set vs SetDefault).
Converted all settings keys to snakecase.
2022-07-23 10:19:15 -07:00
Jason Kulatunga 54e2cacb00 move frontend settings into the DB (for consistent settings handling).
Flattened settings object.
2022-07-23 09:32:56 -07:00
Jason Kulatunga 29bc79996b working settings update.
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.
2022-07-19 23:12:23 -07:00
Jason Kulatunga 99af2b8b16 WIP settings system.
- 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.
2022-07-17 10:32:28 -07:00
Jason Kulatunga dd0c3e6fba rename the migration model package name. 2022-07-16 22:07:50 -07:00
Jason Kulatunga 5b2746f389 initial settings table. 2022-07-16 21:50:48 -07:00
Jason Kulatunga 5ea149d878 upgrading to go 1.18 for generics (and lodash-like library).
devices with an empty wwn should be filtered out (not uploaded during device registration, skipped when attempting to upload metrics).
added a migration to delete existing device entries with an empty `wwn`

fixes #314
2022-07-09 18:28:49 -07:00
Jason Kulatunga 4419f7f429 remove zig. remove cgo dependency for sqlite (using pkg.go.dev/modernc.org/sqlite) 2022-07-06 21:39:28 -07:00
Jason Kulatunga 3a970e7a27 Merge pull request #262 from AnalogJ/beta
pre-v0.4.7 release
2022-05-25 07:50:21 -07:00
Jason Kulatunga 307c2bcdef fix error message.
Simpler GormMigrateOptions.
2022-05-25 07:39:56 -07:00
Jason Kulatunga d08a1e3ef6 ignore retention policy errors during migration.
- fixes #256
2022-05-24 14:26:40 -07:00
Jason Kulatunga 2292041f9f never drop tables. 2022-05-24 10:00:41 -07:00
Jason Kulatunga 75e4bf1d6e added a helpful comment that the database migration might take a looong time. 2022-05-24 09:47:09 -07:00
Jason Kulatunga 97add04276 make sure the migration step runs with transactions, so that we can debug easier.
- related #256
2022-05-24 09:07:38 -07:00
Jason Kulatunga 999c12748c added a way to retrieve raw udev data. Can be used to retrieve disk label, UUID and "disk/by-id/*" device info.
Storing it in the database during device registration.
2022-05-20 20:59:29 -07:00
Jason Kulatunga 145996055a use locked versions of database models when doing migrations. 2022-05-09 17:06:02 -07:00
Jason Kulatunga 5f12fbb510 enable final migration cleanup. 2022-05-04 20:50:17 -07:00
Jason Kulatunga fc5a9ba15e fixed device processing in details page. Summary query is still broken. 2022-05-04 20:13:11 -07:00
Jason Kulatunga 8fe0dbed6b partially working. Some datapoints are failing with panic and are silently ignored.
TODO must fix.
2022-05-03 22:40:31 -07:00
Jason Kulatunga 7d963c96a6 writing pseudocode algorithm for data migration. 2022-05-03 12:03:08 -07:00
Jason Kulatunga 9d85920f49 started working on migration code. 2022-05-03 11:50:22 -07:00