diff --git a/core/checker.go b/core/checker.go index 6324056d..574051aa 100644 --- a/core/checker.go +++ b/core/checker.go @@ -44,11 +44,11 @@ func checkServices() { func (s *Service) Check(record bool) { switch s.Type { case "http": - s.checkHttp(record) + s.CheckHttp(record) case "tcp", "udp": - s.checkTcp(record) + s.CheckTcp(record) case "icmp": - s.checkIcmp(record) + s.CheckIcmp(record) } } @@ -122,7 +122,7 @@ func isIPv6(address string) bool { } // checkIcmp will send a ICMP ping packet to the service -func (s *Service) checkIcmp(record bool) *Service { +func (s *Service) CheckIcmp(record bool) *Service { p := fastping.NewPinger() resolveIP := "ip4:icmp" if isIPv6(s.Domain) { @@ -148,7 +148,7 @@ func (s *Service) checkIcmp(record bool) *Service { } // checkTcp will check a TCP service -func (s *Service) checkTcp(record bool) *Service { +func (s *Service) CheckTcp(record bool) *Service { dnsLookup, err := s.dnsCheck() if err != nil { if record { @@ -188,7 +188,7 @@ func (s *Service) checkTcp(record bool) *Service { } // checkHttp will check a HTTP service -func (s *Service) checkHttp(record bool) *Service { +func (s *Service) CheckHttp(record bool) *Service { dnsLookup, err := s.dnsCheck() if err != nil { if record { diff --git a/frontend/package.json b/frontend/package.json index aec50be9..2d35cefc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -5,7 +5,7 @@ "scripts": { "serve": "vue-cli-service serve", "build": "rm -rf dist && cross-env NODE_ENV=production webpack", - "dev": "cross-env NODE_ENV=development webpack-dev-server --progress", + "dev": "cross-env NODE_ENV=development webpack-dev-server --host 0.0.0.0 --port 8888 --progress", "lint": "vue-cli-service lint" }, "dependencies": { @@ -22,6 +22,7 @@ "querystring": "^0.2.0", "vue": "^2.6.10", "vue-apexcharts": "^1.5.2", + "vue-flatpickr-component": "^8.1.5", "vue-moment": "^4.1.0", "vue-router": "~3.0", "vuedraggable": "^2.23.2", diff --git a/frontend/src/components/API.js b/frontend/src/components/API.js index 1a5e9a55..3e3f13c6 100644 --- a/frontend/src/components/API.js +++ b/frontend/src/components/API.js @@ -64,6 +64,10 @@ class Api { return axios.post('/api/groups', data).then(response => (response.data)) } + async group_update (data) { + return axios.post('/api/groups/'+data.id, data).then(response => (response.data)) + } + async users () { return axios.get('/api/users').then(response => (response.data)) } @@ -72,6 +76,10 @@ class Api { return axios.post('/api/users', data).then(response => (response.data)) } + async user_update (data) { + return axios.post('/api/users/'+data.id, data).then(response => (response.data)) + } + async user_delete (id) { return axios.delete('/api/users/'+id).then(response => (response.data)) } @@ -80,6 +88,14 @@ class Api { return axios.get('/api/messages').then(response => (response.data)) } + async message_create (data) { + return axios.post('/api/messages', data).then(response => (response.data)) + } + + async message_update (data) { + return axios.post('/api/messages/'+data.id, data).then(response => (response.data)) + } + async message_delete (id) { return axios.delete('/api/messages/'+id).then(response => (response.data)) } diff --git a/frontend/src/components/Dashboard/DashboardMessages.vue b/frontend/src/components/Dashboard/DashboardMessages.vue index 8a5d0363..999597a7 100644 --- a/frontend/src/components/Dashboard/DashboardMessages.vue +++ b/frontend/src/components/Dashboard/DashboardMessages.vue @@ -16,13 +16,13 @@
@@ -40,7 +41,7 @@
|
@@ -85,13 +86,7 @@ |