ui: Can enable federation on alarms

This commit is contained in:
nemunaire 2024-07-25 19:03:21 +02:00
commit 435d1d8f98
5 changed files with 19 additions and 2 deletions

View file

@ -152,6 +152,7 @@ type AlarmRepeated struct {
Disabled bool `json:"disabled,omitempty"`
Excepts Exceptions `json:"excepts,omitempty"`
NextTime *time.Time `json:"next_time,omitempty"`
EnableFederation bool `json:"enable_federation,omitempty"`
}
func (a *AlarmRepeated) FillExcepts(cfg *config.Config, db *LevelDBStorage) error {
@ -273,6 +274,7 @@ type AlarmSingle struct {
Time time.Time `json:"time"`
FollowingRoutines []Identifier `json:"routines"`
Comment string `json:"comment,omitempty"`
EnableFederation bool `json:"enable_federation,omitempty"`
}
func GetAlarmSingle(db *LevelDBStorage, id Identifier) (alarm *AlarmSingle, err error) {