Skip to content

Commit e915dfe

Browse files
committed
Bug Fix: Alert search and view pages were not automatically updating when alerts changed state.
1 parent 98ff7ee commit e915dfe

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

htdocs/js/pages/Alerts.class.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,18 @@ Page.Alerts = class Alerts extends Page.PageUtils {
10881088
}
10891089
}
10901090

1091+
onDataUpdate(key, data) {
1092+
// refresh things as needed
1093+
if (key == 'activeAlerts') {
1094+
if ((this.args.sub == 'list') && !this.args.offset) {
1095+
this.doSearch();
1096+
}
1097+
else if (this.args.sub == 'view') {
1098+
app.api.get( 'app/search_alerts', { query: '#id:' + this.args.id }, this.receive_alert.bind(this) );
1099+
}
1100+
}
1101+
}
1102+
10911103
onDeactivate() {
10921104
// called when page is deactivated
10931105
this.div.html( '' );

0 commit comments

Comments
 (0)