diff --git a/src/components/AgentTable.vue b/src/components/AgentTable.vue index 1c900e8..2416e06 100644 --- a/src/components/AgentTable.vue +++ b/src/components/AgentTable.vue @@ -363,27 +363,13 @@ export default { }) .onOk(hostnameConfirm => { if (hostnameConfirm !== hostname) { - this.$q.notify({ - message: "ERROR: Please type the correct hostname", - color: "red" - }); + this.notifyError("ERROR: Please type the correct hostname"); } else { const data = { pk: pk }; axios .delete("/agents/uninstallagent/", { data: data }) - .then(r => { - this.$q.notify({ - message: `${hostname} will now be uninstalled!`, - color: "green" - }); - }) - .catch(e => { - this.$q.notify({ - message: e.response.data.error, - color: "info", - timeout: 4000 - }); - }); + .then(r => this.notifySuccess(`${hostname} will now be uninstalled!`)) + .catch(e => this.notifyInfo(e.response.data.error)); } }); }); @@ -438,11 +424,7 @@ export default { }) .catch(err => { this.loadingSendCMD = false; - this.$q.notify({ - color: "red", - icon: "fas fa-times-circle", - message: err.response.data - }); + this.notifyError(err.response.data); }); }, agentRowSelected(pk) { @@ -469,9 +451,7 @@ export default { message: `Overdue ${category} alerts ${action} on ${r.data}` }); }) - .catch(e => { - console.log(e.response.data.error); - }); + .catch(e => this.notifyError(e.response.data.error)); }, agentClass(status) { if (status === "offline") { diff --git a/src/components/Services.vue b/src/components/Services.vue index d9bd41e..7d7cb71 100644 --- a/src/components/Services.vue +++ b/src/components/Services.vue @@ -163,6 +163,7 @@