87 Commits

Author SHA1 Message Date
Dave Shoreman
df8dedb3c5 Fix fallback WWN in UUID migration to avoid ghost disks (#1002)
* Patch UUID migration to avoid more ghosts

Resolves an issue discussed in #994 where a change to fallback WWN at
the same time as migrating to UUIDs caused a mismatch for no-wwn disks.

* Add some extra debugging for UUID generation
2026-04-27 18:04:00 -07:00
Aram Akhavan
c3b2eb2b4f Identify drives by a Scrutiny UUID instead of wwn (#960)
* Generate a UUIDv5 from a random namespace  based on WWN, model name, and serial number
* Migrate sqlite and influxdb data accordingly
* Update frontend API routes and components
* Fixes #923
2026-03-25 20:16:17 -07:00
Alliot
fb5d4818b0 fix: page smart attribute queries with limit and sort (#869) 2026-02-21 21:04:33 -08:00
Liu Xiaoyi
67b7a08e4a feat: add "day" as resolution for temperature graph (#823) 2026-02-13 09:58:15 -08:00
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
Liu Xiaoyi
184bc4bec5 Improve temperature logging (#825)
* Always log current temperature
* Forcefully align each ata_sct_temperature_history data point to an integer multiple of the logging interval to prevent repeated data points

Fixes #824
2026-02-05 21:35:35 -08:00
mcarbonne
bdbe13e320 Add option to discard SCT Data Table Temperature History (#557)
Fixes #494
2026-02-05 20:59:24 -08:00
Peppercorn27
b71897fa5f fix web ui latency
fix web ui latency in situations where cron shedule has been reduced resulting in more data being present in influxDB than expected
2025-07-06 17:11:42 +01: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
Jason Kulatunga
2aa242e364 update mockgen instructions 2024-02-04 11:38:52 -08:00
Jason Kulatunga
1c193aa043 add database interface mock 2024-02-04 11:38:52 -08:00
Aram Akhavan
01c5a7fdfe Address review comments 2024-02-04 11:38:51 -08:00
Aram Akhavan
98d958888c refactor common code 2024-02-04 11:38:51 -08:00
Aram Akhavan
4e5c76b259 Add support for disabling repeat notifications
* Add a new database function for getting the tail

* Update ShouldNotify() to handle ignoring repeat notifications if set
2024-02-04 11:38:51 -08: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
Jason Kulatunga
f94e616d8d Merge branch 'master' into angular-refactoring 2023-04-04 21:38:57 -07:00
Saswat Padhi
e07a53046f [FEAT] Allow insecure certificates on InfluxDB
This change allows users to skip TLS certificate verification on their
InfluxDB server, if they wish to do so, for instance when using self-
signed certificates.
Without this change, scrutiny failed to start and paniced with a
`x509: certificate signed by unknown authority` error.
2023-02-06 22:26:40 +00:00
Jason Kulatunga
f2856e0f26 adding a healthcheck endpoint that confirms communication with influxdb and sqlite.
ref: #381
2022-11-30 08:25:27 -08:00
adripo
536b590080 feat: dynamic line stroke settings 2022-11-11 00:19:51 +01:00
Jason Kulatunga
2677796322 fixing bug. Null value for temperatures should be ignored. 2022-11-06 07:54:32 -08: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
c0f1dfdb0b fixing config mock. 2022-07-20 22:38:30 -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
c6579864b8 added instructions for how to create a Scope restricted InfluxDB API token for use with Scrutiny.
- fixes #249
2022-07-10 11:31:33 -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
0f0efac866 fix update, using raw flux script. 2022-07-09 10:42:30 -07:00
Jason Kulatunga
04563c0d0d ensure we have the ability to keep influxdb tasks up-to-date. 2022-07-09 10:05:48 -07:00
Jason Kulatunga
9316eccabe adding tests for tasks and aggregation queries (temp). 2022-07-09 08:48:36 -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
d3e7fc6067 make sure we dont create incorrect temp data. 2022-06-11 15:57:12 -07:00
Jason Kulatunga
75d5930835 correctly using the latest data for table. 2022-06-11 11:00:00 -07:00
Jason Kulatunga
488fcfc820 added AttributeStatus bit flag
ensure DeviceStatus is a valid bit flag.
[docs] added running tests section to contribution guide.
make sure UI correctly treats scrutiny failures as failed.
2022-05-31 13:31:34 -07:00
Jason Kulatunga
987632df39 working deletion code. 2022-05-25 19:02:30 -07:00
Jason Kulatunga
1bd86f5abd [WIP] Delete button for devices. 2022-05-25 14:59:55 -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