diff --git a/core/checker.go b/core/checker.go
index fd27554c..604be8b7 100644
--- a/core/checker.go
+++ b/core/checker.go
@@ -280,7 +280,6 @@ func recordFailure(s *Service, issue string) {
s.CreateFailure(fail)
s.Online = false
s.SuccessNotified = false
- s.UpdateNotify = CoreApp.UpdateNotify.Bool
s.DownText = s.DowntimeText()
notifier.OnFailure(s.Service, fail)
}
diff --git a/core/notifier/events.go b/core/notifier/events.go
index 445ccbb2..4e70c573 100644
--- a/core/notifier/events.go
+++ b/core/notifier/events.go
@@ -40,7 +40,7 @@ func OnFailure(s *types.Service, f *types.Failure) {
}
// check if User wants to receive every Status Change
- if s.UpdateNotify {
+ if s.UpdateNotify.Bool {
// send only if User hasn't been already notified about the Downtime
if !s.UserNotified {
s.UserNotified = true
@@ -69,7 +69,7 @@ func OnSuccess(s *types.Service) {
}
// check if User wants to receive every Status Change
- if s.UpdateNotify && s.UserNotified {
+ if s.UpdateNotify.Bool && s.UserNotified {
s.UserNotified = false
}
diff --git a/frontend/config/webpack.config.dev.js b/frontend/config/webpack.config.dev.js
index 27277e6d..532cbf45 100644
--- a/frontend/config/webpack.config.dev.js
+++ b/frontend/config/webpack.config.dev.js
@@ -10,12 +10,14 @@ const environment = require('./dev.env');
const webpackConfig = merge(commonConfig, {
mode: 'development',
- devtool: 'cheap-module-eval-source-map',
+ devtool: 'inline-cheap-module-source-map',
output: {
path: helpers.root('dist'),
publicPath: '/',
filename: 'js/[name].bundle.js',
- chunkFilename: 'js/[name].chunk.js'
+ chunkFilename: 'js/[name].chunk.js',
+ devtoolModuleFilenameTemplate: '[absolute-resource-path]',
+ devtoolFallbackModuleFilenameTemplate: '[absolute-resource-path]?[hash]'
},
optimization: {
runtimeChunk: 'single',
diff --git a/frontend/package.json b/frontend/package.json
index b144ddc7..be8e7af4 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -6,7 +6,8 @@
"serve": "vue-cli-service serve",
"build": "rm -rf dist && cross-env NODE_ENV=production webpack --mode production",
"dev": "cross-env NODE_ENV=development webpack-dev-server --host 0.0.0.0 --port 8888 --progress",
- "lint": "vue-cli-service lint"
+ "lint": "vue-cli-service lint",
+ "test": "cross-env NODE_ENV=development mochapack --webpack-config webpack.config.js --require test/setup.js test/**/*.spec.js"
},
"dependencies": {
"@fortawesome/fontawesome-free-solid": "^5.1.0-3",
@@ -18,7 +19,7 @@
"axios": "^0.19.1",
"codemirror-colorpicker": "^1.9.66",
"core-js": "^3.4.4",
- "moment": "^2.24.0",
+ "date-fns": "^2.9.0",
"querystring": "^0.2.0",
"vue": "^2.6.10",
"vue-apexcharts": "^1.5.2",
@@ -40,6 +41,7 @@
"@babel/preset-env": "~7.8.3",
"@vue/babel-preset-app": "^4.1.2",
"@vue/cli-plugin-babel": "^4.1.0",
+ "@vue/test-utils": "^1.0.0-beta.31",
"babel-eslint": "~10.0",
"babel-loader": "~8.0",
"compression-webpack-plugin": "~2.0",
@@ -55,10 +57,15 @@
"eslint-plugin-promise": "~3.5",
"eslint-plugin-standard": "~3.0",
"eslint-plugin-vue": "~5.1",
+ "expect": "^25.1.0",
"file-loader": "^5.0.2",
"friendly-errors-webpack-plugin": "~1.7",
"html-webpack-plugin": "^4.0.0-beta.11",
+ "jsdom": "^16.2.0",
+ "jsdom-global": "^3.0.2",
"mini-css-extract-plugin": "~0.5",
+ "mocha": "^7.0.1",
+ "mochapack": "^1.1.13",
"node-sass": "^4.13.1",
"optimize-css-assets-webpack-plugin": "~5.0",
"sass-loader": "^8.0.2",
diff --git a/frontend/public/base.gohtml b/frontend/public/base.gohtml
index 27d408ca..b3bd1848 100644
--- a/frontend/public/base.gohtml
+++ b/frontend/public/base.gohtml
@@ -10,11 +10,20 @@