diff --git a/package.json b/package.json
index 3675db5..111779b 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,8 @@
"event-emitter": "^0.3.5",
"jquery": "^3.2.1",
"moment": "^2.22.0",
+ "moment-duration-format": "^2.2.2",
+ "noty": "^3.2.0-beta",
"tiny-emitter": "^2.0.2",
"util.inherits": "^1.0.3",
"vue": "^2.4.2",
diff --git a/src/App.vue b/src/App.vue
index 47571e4..8fcf376 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,10 +4,10 @@
-
-
Jobs
-
-
+
+
Jobs
+
+
@@ -19,6 +19,12 @@ import Vue from 'vue'
import job from './components/Job';
import navbar from './components/Nav';
import EventWebSocket from './websocket';
+import Noty from 'noty';
+
+Noty.overrideDefaults({
+ theme: 'bootstrap-v4',
+ timeout: 5000
+});
let d = {
jobs: {},
@@ -27,6 +33,14 @@ let d = {
let ws = new EventWebSocket(window.arm_config.url);
+ws.on('notification', function(data) {
+ console.log(data);
+ new Noty({
+ type: data.type || 'alert',
+ text: data.message
+ }).show();
+});
+
ws.on('jobs', function(data) {
// Create jobs components
d.jobs = data;
diff --git a/src/assets/scss/app.scss b/src/assets/scss/app.scss
index 32b9745..f3358e6 100644
--- a/src/assets/scss/app.scss
+++ b/src/assets/scss/app.scss
@@ -1,7 +1,9 @@
@import '_variables.scss';
@import '~bootstrap/scss/bootstrap';
@import '~bootstrap-vue/dist/bootstrap-vue.css';
-@import '_sidebar.scss';
+@import '~noty/src/noty';
+@import '~noty/src/themes/bootstrap-v4';
+@import '_sidebar';
.margin-top-10 {
margin-top: 10px;
diff --git a/src/components/Job.vue b/src/components/Job.vue
index 9b95ebf..ead3e40 100644
--- a/src/components/Job.vue
+++ b/src/components/Job.vue
@@ -29,6 +29,11 @@