diff --git a/client/app/pages/alert/Alert.jsx b/client/app/pages/alert/Alert.jsx
index 82352fd4e6..8bcc4d19f1 100644
--- a/client/app/pages/alert/Alert.jsx
+++ b/client/app/pages/alert/Alert.jsx
@@ -55,6 +55,7 @@ class AlertPage extends React.Component {
options: {
op: '>',
value: 1,
+ muted: false,
},
}),
pendingRearm: 0,
@@ -159,6 +160,30 @@ class AlertPage extends React.Component {
});
};
+ mute = () => {
+ const { alert } = this.state;
+ return alert.$mute()
+ .then(() => {
+ this.setAlertOptions({ muted: true });
+ notification.warn('Notifications have been muted.');
+ })
+ .catch(() => {
+ notification.error('Failed muting notifications.');
+ });
+ }
+
+ unmute = () => {
+ const { alert } = this.state;
+ return alert.$unmute()
+ .then(() => {
+ this.setAlertOptions({ muted: false });
+ notification.success('Notifications have been restored.');
+ })
+ .catch(() => {
+ notification.error('Failed restoring notifications.');
+ });
+ }
+
edit = () => {
const { id } = this.state.alert;
navigateTo(`/alerts/${id}/edit`, true, false);
@@ -177,11 +202,15 @@ class AlertPage extends React.Component {
return