Commit Graph

294 Commits

Author SHA1 Message Date
Aram Akhavan 550cd59093 Fix parsing of attribute 188 on seagate drives 2023-10-14 21:39:12 -07:00
Aram Akhavan 31c2daedf7 fix smart 188 thresholds 2023-09-03 10:37:43 -07:00
packagrio-bot ee893cc360 (v0.7.1) Automated packaging of release by Packagr 2023-04-08 23:01:22 +00:00
Jason Kulatunga d76cdca4a5 Merge pull request #472 from adamantike/misc/add-support-for-yml-config-files 2023-04-06 17:46:03 -07:00
Michael Manganiello 932e191510 Allow configuration files with yml extension
If a `collector.yml` or `scrutiny.yml` configuration file is present,
use it as long as a `.yaml` version is not available too.

Fixes #79
2023-04-06 20:55:22 -03:00
Michael Manganiello 3a6c407fe7 Add support for ntfy notifications
Updates [`shoutrrr`](containrrr.dev/shoutrrr/) to `v0.7.1` to enable
support for [ntfy](https://ntfy.sh/) notifications.

Fixes #433.
2023-04-06 17:04:48 -03:00
packagrio-bot 2e4ba44952 (v0.7.0) Automated packaging of release by Packagr 2023-04-06 05:22:42 +00:00
Jason Kulatunga de21e611a3 fixing migration for line_stroke setting. 2023-04-05 21:06:09 -07:00
Jason Kulatunga 7b77519f49 trying to fix tests. 2023-04-05 20:48:07 -07:00
Jason Kulatunga 94df7e1ec3 trying to fix tests. 2023-04-05 20:44:07 -07:00
Jason Kulatunga babd8d3089 trying to fix tests. 2023-04-05 20:35:18 -07:00
Jason Kulatunga 80d72f8a1b regenerate package-lock with angular 13-lts packages. 2023-04-05 20:10:53 -07:00
Jason Kulatunga f94e616d8d Merge branch 'master' into angular-refactoring 2023-04-04 21:38:57 -07:00
Saswat Padhi cb5226f6e4 Update backend tests failing on insecure_skip_verify 2023-02-07 08:24:39 +00: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
packagrio-bot 1c7f299b98 (v0.6.0) Automated packaging of release by Packagr 2023-01-12 00:42:30 +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
Jason Kulatunga fb760a9f6d make sure we print an error if the config file is invalid.
fixes #408
2022-11-29 22:06:42 -08:00
adripo e9cf8a9180 fix: igeneric types 2022-11-12 22:27:07 +01:00
adripo 64ad353628 fix: remove fullcalendar 2022-11-12 22:26:03 +01:00
adripo 5518865bc6 fix: remove outdated option 2022-11-12 22:24:38 +01:00
adripo 50321d897a fix: prod build command 2022-11-12 22:24:02 +01:00
adripo e18a7e9ce0 refactor: update dependencies version 2022-11-12 22:23:37 +01: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
packagrio-bot f1e5bd3ed4 (v0.5.0) Automated packaging of release by Packagr 2022-08-04 15:11:04 +00:00
Jason Kulatunga 26b221532e fix tests. 2022-08-04 07:56:43 -07:00
Jason Kulatunga 15d3206f6f remove settings dialog from Details page. 2022-08-04 07:30:14 -07:00
Jason Kulatunga f823127825 simplify logger creation (move logic into a function in main packages)
Ensure logger creation is consistent between Web and Collector
Create logger in main, pass down to downstream functions (like gin)
In debug mode, print a copy of AppConfig
Better debugging for logger.
2022-08-03 22:51:44 -07:00
Jason Kulatunga d41d535ab7 make sure that the device host id is provided in notifications (if available).
fixes #337
2022-08-03 20:55:34 -07:00
Jason Kulatunga 9a4a8de341 make sure the settings dialog width is 600px for readability. 2022-08-03 18:38:59 -07:00
Jason Kulatunga 2d6f60abaa attrHistory needs to be reversed, so the newest data is on the right
fixes #339
2022-08-03 18:23:58 -07: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 ce2f990eb1 consolidate device status to string logic in DeviceStatusPipe.
Ensure device status takes into account new settings.
2022-07-29 07:11:57 -07:00
Jason Kulatunga 2e768fb491 adding tests. Make sure that device status depends on the configured threshold. 2022-07-25 07:46:44 -07:00
Jason Kulatunga e41ee47371 filter attributes after notify 2022-07-23 16:21:53 -07:00
Jason Kulatunga 7a68a68e76 frontend, determine the device status by checking against the configured thresholds. 2022-07-23 16:11:49 -07:00
Jason Kulatunga 94594db20a on settings save, return the new settings.
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.
2022-07-23 14:36:32 -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
packagrio-bot c34ee85e48 (v0.4.16) Automated packaging of release by Packagr 2022-07-12 16:02:04 +00:00
Jason Kulatunga a01b8fe083 manually bump version. 2022-07-12 08:58:18 -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