Skip to content

Commit

Permalink
Merge pull request #547 from kaysond/master
Browse files Browse the repository at this point in the history
Add support for disabling repeat notifications if the values haven't changed
  • Loading branch information
AnalogJ committed Feb 24, 2024
2 parents 44275c6 + 09f4b34 commit 3ea223f
Show file tree
Hide file tree
Showing 21 changed files with 576 additions and 151 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@ scrutiny_test.db
scrutiny.yaml
coverage.txt
/config
/influxdb
/influxdb
.angular
web.log
12 changes: 0 additions & 12 deletions webapp/backend/pkg/database/helpers.go

This file was deleted.

30 changes: 0 additions & 30 deletions webapp/backend/pkg/database/helpers_test.go

This file was deleted.

5 changes: 4 additions & 1 deletion webapp/backend/pkg/database/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ package database

import (
"context"

"github.com/analogj/scrutiny/webapp/backend/pkg"
"github.com/analogj/scrutiny/webapp/backend/pkg/models"
"github.com/analogj/scrutiny/webapp/backend/pkg/models/collector"
"github.com/analogj/scrutiny/webapp/backend/pkg/models/measurements"
)

// Create mock using:
// mockgen -source=webapp/backend/pkg/database/interface.go -destination=webapp/backend/pkg/database/mock/mock_database.go
type DeviceRepo interface {
Close() error
HealthCheck(ctx context.Context) error
Expand All @@ -20,7 +23,7 @@ type DeviceRepo interface {
DeleteDevice(ctx context.Context, wwn string) error

SaveSmartAttributes(ctx context.Context, wwn string, collectorSmartData collector.SmartInfo) (measurements.Smart, error)
GetSmartAttributeHistory(ctx context.Context, wwn string, durationKey string, attributes []string) ([]measurements.Smart, error)
GetSmartAttributeHistory(ctx context.Context, wwn string, durationKey string, selectEntries int, selectEntriesOffset int, attributes []string) ([]measurements.Smart, error)

SaveSmartTemperature(ctx context.Context, wwn string, deviceProtocol string, collectorSmartData collector.SmartInfo) error

Expand Down
258 changes: 258 additions & 0 deletions webapp/backend/pkg/database/mock/mock_database.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3ea223f

Please sign in to comment.