-
+
@@ -323,7 +323,7 @@
-
+
@@ -354,9 +354,9 @@
-
+
-
+
@@ -442,7 +442,7 @@
-
+
@@ -453,7 +453,7 @@
-
+
Line Developers Console - Basic Settings
@@ -516,11 +516,13 @@ import { ucfirst } from "../util.ts"
import axios from "axios";
import { useToast } from "vue-toastification"
import Confirm from "./Confirm.vue";
+import HiddenInput from "./HiddenInput.vue";
const toast = useToast()
export default {
components: {
Confirm,
+ HiddenInput,
},
props: {},
data() {
diff --git a/src/icon.js b/src/icon.js
index 960fa8c18..58583f0f8 100644
--- a/src/icon.js
+++ b/src/icon.js
@@ -1,10 +1,10 @@
import { library } from "@fortawesome/fontawesome-svg-core"
-import { faCog, faEdit, faPlus, faPause, faPlay, faTachometerAlt, faTrash, faList, faArrowAltCircleUp } from "@fortawesome/free-solid-svg-icons"
+import { faCog, faEdit, faPlus, faPause, faPlay, faTachometerAlt, faTrash, faList, faArrowAltCircleUp, faEye, faEyeSlash } from "@fortawesome/free-solid-svg-icons"
//import { fa } from '@fortawesome/free-regular-svg-icons'
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"
// Add Free Font Awesome Icons here
// https://fontawesome.com/v5.15/icons?d=gallery&p=2&s=solid&m=free
-library.add(faCog, faEdit, faPlus, faPause, faPlay, faTachometerAlt, faTrash, faList, faArrowAltCircleUp);
+library.add(faCog, faEdit, faPlus, faPause, faPlay, faTachometerAlt, faTrash, faList, faArrowAltCircleUp, faEye, faEyeSlash);
export { FontAwesomeIcon }
diff --git a/src/languages/da-DK.js b/src/languages/da-DK.js
index 050f31e40..7e2e8a9f1 100644
--- a/src/languages/da-DK.js
+++ b/src/languages/da-DK.js
@@ -109,5 +109,11 @@ export default {
"Resource Record Type": "Resource Record Type",
respTime: "Resp. Time (ms)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js
index 990eb2f1d..e085d71fd 100644
--- a/src/languages/de-DE.js
+++ b/src/languages/de-DE.js
@@ -104,6 +104,12 @@ export default {
rrtypeDescription: "Wähle den RR-Typ aus, welchen du überwachen möchtest.",
"Last Result": "Letztes Ergebnis",
pauseMonitorMsg: "Bist du sicher das du den Monitor pausieren möchtest?",
+ clearEventsMsg: "Bist du sicher das du alle Ereignisse für diesen Monitor löschen möchtest?",
+ clearHeartbeatsMsg: "Bist du sicher das du alle Statistiken für diesen Monitor löschen möchtest?",
+ "Clear Data": "Lösche Daten",
+ Events: "Ereignisse",
+ Heartbeats: "Statistiken",
+ confirmClearStatisticsMsg: "Bist du sicher das du ALLE Statistiken löschen möchtest?",
"Create your admin account": "Erstelle dein Admin Konto",
"Repeat Password": "Wiederhole das Passwort",
"Resource Record Type": "Resource Record Type",
diff --git a/src/languages/en.js b/src/languages/en.js
index 8f4f73d08..f52ad0572 100644
--- a/src/languages/en.js
+++ b/src/languages/en.js
@@ -17,6 +17,9 @@ export default {
rrtypeDescription: "Select the RR-Type you want to monitor",
pauseMonitorMsg: "Are you sure want to pause?",
enableDefaultNotificationDescription: "For every new monitor this notification will be enabled by default. You can still disable the notification separately for each monitor.",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
Settings: "Settings",
Dashboard: "Dashboard",
"New Update": "New Update",
@@ -113,4 +116,7 @@ export default {
"Default enabled": "Default enabled",
"Also apply to existing monitors": "Also apply to existing monitors",
Create: "Create",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/es-ES.js b/src/languages/es-ES.js
index 4079991ee..fadd3fccc 100644
--- a/src/languages/es-ES.js
+++ b/src/languages/es-ES.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "Repetir contraseña",
respTime: "Tiempo de resp. (ms)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/fr.js b/src/languages/fr-FR.js
similarity index 92%
rename from src/languages/fr.js
rename to src/languages/fr-FR.js
index 4019b74d3..f11781966 100644
--- a/src/languages/fr.js
+++ b/src/languages/fr-FR.js
@@ -66,7 +66,7 @@ export default {
"Theme - Heartbeat Bar": "Voir les services surveillés",
Normal: "Général",
Bottom: "En dessous",
- None: "Non",
+ None: "Rien",
Timezone: "Fuseau Horaire",
"Search Engine Visibility": "Visibilité par les moteurs de recherche",
"Allow indexing": "Autoriser l'indexation par des moteurs de recherche",
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "Répéter le mot de passe",
respTime: "Temps de réponse (ms)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Créer",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/ja.js b/src/languages/ja.js
index 51181cdf4..f7fb55eee 100644
--- a/src/languages/ja.js
+++ b/src/languages/ja.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "Repeat Password",
respTime: "Resp. Time (ms)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/ko-KR.js b/src/languages/ko-KR.js
index 49a510f69..8956de072 100644
--- a/src/languages/ko-KR.js
+++ b/src/languages/ko-KR.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "비밀번호 재입력",
respTime: "응답 시간 (ms)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/nl-NL.js b/src/languages/nl-NL.js
index 0ab73bb9f..647d136b2 100644
--- a/src/languages/nl-NL.js
+++ b/src/languages/nl-NL.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "Herhaal wachtwoord",
respTime: "resp. tijd (ms)",
notAvailableShort: "N.v.t.",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/pl.js b/src/languages/pl.js
index 25f76430d..cc625d6de 100644
--- a/src/languages/pl.js
+++ b/src/languages/pl.js
@@ -1,20 +1,20 @@
export default {
languageName: "Polski",
- checkEverySecond: "sprawdzaj co {0} sekund.",
- "Avg.": "Średnia. ",
- retriesDescription: "Maksymalna liczba ponownych prób, zanim usługa zostanie oznaczona jako offline i zostanie wysłane powiadomienie.",
- ignoreTLSError: "Ignoruj błąd TLS/SSL dla stron HTTPS.",
- upsideDownModeDescription: "Odwróć status do góry nogami. Jeśli usługa jest osiągalna, to jest niedostępna.",
- maxRedirectDescription: "Maksymalna liczba przekierowań do naśladowania. Ustaw na 0, aby wyłączyć przekierowania.",
+ checkEverySecond: "Sprawdzaj co {0} sekund.",
+ "Avg.": "Średnia ",
+ retriesDescription: "Maksymalna liczba powtórzeń, zanim usługa zostanie oznaczona jako wyłączona i zostanie wysłane powiadomienie",
+ ignoreTLSError: "Ignoruj błąd TLS/SSL dla stron HTTPS",
+ upsideDownModeDescription: "Odwróć status do góry nogami. Jeśli usługa jest osiągalna, to jest oznaczona jako niedostępna.",
+ maxRedirectDescription: "Maksymalna liczba przekierowań do wykonania. Ustaw na 0, aby wyłączyć przekierowania.",
acceptedStatusCodesDescription: "Wybierz kody stanu, które są uważane za udaną odpowiedź.",
- passwordNotMatchMsg: "Powtórzone hasło nie jest takie samo.",
- notificationDescription: "Dodaj powiadomienie do monitorów, aby one działały.",
- keywordDescription: "Wyszukaj słowo kluczowe w html lub JSON i wielkość liter ma znaczenie.",
- pauseDashboardHome: "pauza",
+ passwordNotMatchMsg: "Powtórzone hasło nie pasuje.",
+ notificationDescription: "Proszę przypisać powiadomienie do monitora(ów), aby zadziałało.",
+ keywordDescription: "Wyszukiwanie słów kluczowych w zwykłym html lub odpowiedzi JSON. Wielkość liter ma znaczenie.",
+ pauseDashboardHome: "Pauza",
deleteMonitorMsg: "Czy na pewno chcesz usunąć ten monitor?",
- deleteNotificationMsg: "Czy na pewno chcesz usunąć to powiadomienie ze wszystkich monitorów?",
- resoverserverDescription: "Cloudflare jest domyślnym serwerem, możesz zmienić serwer resolver w dowolnym momencie.",
- rrtypeDescription: "Wybierz typ RR-Type który chcesz monitorować.",
+ deleteNotificationMsg: "Czy na pewno chcesz usunąć to powiadomienie dla wszystkich monitorów?",
+ resoverserverDescription: "Cloudflare jest domyślnym serwerem, możesz zmienić serwer resolver w każdej chwili.",
+ rrtypeDescription: "Wybierz RR-Type który chcesz monitorować",
pauseMonitorMsg: "Czy na pewno chcesz wstrzymać?",
Settings: "Ustawienia",
Dashboard: "Panel",
@@ -23,11 +23,11 @@ export default {
Appearance: "Wygląd",
Theme: "Motyw",
General: "Ogólne",
- Version: "Versja",
+ Version: "Wersja",
"Check Update On GitHub": "Sprawdź aktualizację na GitHub.",
List: "Lista",
Add: "Dodaj",
- "Add New Monitor": "Dodaj Nowy Monitor",
+ "Add New Monitor": "Dodaj nowy monitor",
"Quick Stats": "Szybkie statystyki",
Up: "Online",
Down: "Offline",
@@ -38,46 +38,46 @@ export default {
Status: "Status",
DateTime: "Data i godzina",
Message: "Wiadomość",
- "No important events": "Brak ważnych wydarzeń.",
+ "No important events": "Brak ważnych wydarzeń",
Resume: "Wznów",
Edit: "Edytuj",
Delete: "Usuń",
Current: "aktualny",
- Uptime: "czas pracy",
- "Cert Exp.": "Wygaśnięcie certyfikatu.",
+ Uptime: "Czas pracy",
+ "Cert Exp.": "Wygaśnięcie certyfikatu",
days: "dni",
day: "dzień",
- "-day": "-dzień",
+ "-day": " dni",
hour: "godzina",
- "-hour": "-godzina",
- Response: "odpowiedź",
+ "-hour": " godziny",
+ Response: "Odpowiedź",
Ping: "Ping",
"Monitor Type": "Typ monitora",
- Keyword: "słowo kluczowe",
- "Friendly Name": "Przyjazne imię",
+ Keyword: "Słowo kluczowe",
+ "Friendly Name": "Przyjazna nazwa",
URL: "URL",
- Hostname: "Hostname",
+ Hostname: "Nazwa hosta",
Port: "Port",
"Heartbeat Interval": "Interwał bicia serca",
Retries: "Prób",
Advanced: "Zaawansowane",
"Upside Down Mode": "Tryb do góry nogami",
- "Max. Redirects": "Maks. Przekierowania",
+ "Max. Redirects": "Maks. przekierowania",
"Accepted Status Codes": "Akceptowane kody statusu",
Save: "Zapisz",
Notifications: "Powiadomienia",
"Not available, please setup.": "Niedostępne, proszę skonfigurować.",
- "Setup Notification": "Powiadomienie konfiguracji",
+ "Setup Notification": "Konfiguracja powiadomień",
Light: "Jasny",
Dark: "Ciemny",
Auto: "Automatyczny",
"Theme - Heartbeat Bar": "Motyw - pasek bicia serca",
Normal: "Normalne",
Bottom: "Na dole",
- None: "Nic",
+ None: "Brak",
Timezone: "Strefa czasowa",
"Search Engine Visibility": "Widoczność w wyszukiwarce",
- "Allow indexing": "Zezwól na indeksowanie",
+ "Allow indexing": "Pozwól na indeksowanie",
"Discourage search engines from indexing site": "Zniechęcaj wyszukiwarki do indeksowania strony",
"Change Password": "Zmień hasło",
"Current Password": "Aktualne hasło",
@@ -87,7 +87,7 @@ export default {
"Disable Auth": "Wyłącz autoryzację",
"Enable Auth": "Włącz autoryzację ",
Logout: "Wyloguj się",
- Leave: "Opuść",
+ Leave: "Zostaw",
"I understand, please disable": "Rozumiem, proszę wyłączyć",
Confirm: "Potwierdź",
Yes: "Tak",
@@ -95,8 +95,8 @@ export default {
Username: "Nazwa użytkownika",
Password: "Hasło",
"Remember me": "Zapamiętaj mnie",
- Login: "Zaloguj sie",
- "No Monitors, please": "Proszę bez monitorów",
+ Login: "Zaloguj się",
+ "No Monitors, please": "Brak monitorów, proszę",
"add one": "dodaj jeden",
"Notification Type": "Typ powiadomienia",
Email: "Email",
@@ -104,10 +104,10 @@ export default {
"Certificate Info": "Informacje o certyfikacie",
"Resolver Server": "Server resolver",
"Resource Record Type": "Typ rekordu zasobów",
- "Last Result": "Ostatni rekord",
+ "Last Result": "Ostatni wynik",
"Create your admin account": "Utwórz swoje konto administratora",
"Repeat Password": "Powtórz hasło",
- respTime: "Odp. Czas (ms)",
+ respTime: "Czas odp. (ms)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Stwórz"
}
diff --git a/src/languages/ru-RU.js b/src/languages/ru-RU.js
index 96f6efab8..e3835816b 100644
--- a/src/languages/ru-RU.js
+++ b/src/languages/ru-RU.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "Повторите пароль",
respTime: "Resp. Time (ms)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/sr-latn.js b/src/languages/sr-latn.js
index defc78211..98453decd 100644
--- a/src/languages/sr-latn.js
+++ b/src/languages/sr-latn.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "Ponovite lozinku",
respTime: "Vreme odg. (ms)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/sr.js b/src/languages/sr.js
index d333210f9..779754b96 100644
--- a/src/languages/sr.js
+++ b/src/languages/sr.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "Поновите лозинку",
respTime: "Време одг. (мс)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/sv-SE.js b/src/languages/sv-SE.js
index d0015432d..c830e8907 100644
--- a/src/languages/sv-SE.js
+++ b/src/languages/sv-SE.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "Upprepa Lösenord",
respTime: "Svarstid (ms)",
notAvailableShort: "Ej Tillg.",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/zh-CN.js b/src/languages/zh-CN.js
index e47bd70a7..5491ab5be 100644
--- a/src/languages/zh-CN.js
+++ b/src/languages/zh-CN.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "重复密码",
respTime: "Resp. Time (ms)",
notAvailableShort: "N/A",
- Create: "Create"
+ Create: "Create",
+ clearEventsMsg: "Are you sure want to delete all events for this monitor?",
+ clearHeartbeatsMsg: "Are you sure want to delete all heartbeats for this monitor?",
+ confirmClearStatisticsMsg: "Are you sure want to delete ALL statistics?",
+ "Clear Data": "Clear Data",
+ Events: "Events",
+ Heartbeats: "Heartbeats"
}
diff --git a/src/languages/zh-HK.js b/src/languages/zh-HK.js
index 6dfc726ea..b76bdfc85 100644
--- a/src/languages/zh-HK.js
+++ b/src/languages/zh-HK.js
@@ -109,5 +109,11 @@ export default {
"Repeat Password": "重複密碼",
respTime: "反應時間 (ms)",
notAvailableShort: "N/A",
- Create: "建立"
+ Create: "建立",
+ clearEventsMsg: "是否確定刪除這個監測器的所有事件?",
+ clearHeartbeatsMsg: "是否確定刪除這個監測器的所有脈搏資料?",
+ confirmClearStatisticsMsg: "是否確定刪除所有監測器的脈搏資料?(您的監測器會繼續正常運作)",
+ "Clear Data": "清除資料",
+ Events: "事件",
+ Heartbeats: "脈搏"
}
diff --git a/src/main.js b/src/main.js
index 7ad9db089..f34e9c43d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -28,7 +28,7 @@ import zhHK from "./languages/zh-HK";
import deDE from "./languages/de-DE";
import nlNL from "./languages/nl-NL";
import esEs from "./languages/es-ES";
-import fr from "./languages/fr";
+import frFR from "./languages/fr-FR";
import ja from "./languages/ja";
import daDK from "./languages/da-DK";
import sr from "./languages/sr";
@@ -106,7 +106,7 @@ const languageList = {
"de-DE": deDE,
"nl-NL": nlNL,
"es-ES": esEs,
- "fr": fr,
+ "fr-FR": frFR,
"ja": ja,
"da-DK": daDK,
"sr": sr,
diff --git a/src/mixins/socket.js b/src/mixins/socket.js
index 454422e94..672027fa1 100644
--- a/src/mixins/socket.js
+++ b/src/mixins/socket.js
@@ -107,8 +107,8 @@ export default {
}
});
- socket.on("heartbeatList", (monitorID, data) => {
- if (! (monitorID in this.heartbeatList)) {
+ socket.on("heartbeatList", (monitorID, data, overwrite = false) => {
+ if (! (monitorID in this.heartbeatList) || overwrite) {
this.heartbeatList[monitorID] = data;
} else {
this.heartbeatList[monitorID] = data.concat(this.heartbeatList[monitorID])
@@ -127,8 +127,8 @@ export default {
this.certInfoList[monitorID] = JSON.parse(data)
});
- socket.on("importantHeartbeatList", (monitorID, data) => {
- if (! (monitorID in this.importantHeartbeatList)) {
+ socket.on("importantHeartbeatList", (monitorID, data, overwrite) => {
+ if (! (monitorID in this.importantHeartbeatList) || overwrite) {
this.importantHeartbeatList[monitorID] = data;
} else {
this.importantHeartbeatList[monitorID] = data.concat(this.importantHeartbeatList[monitorID])
@@ -254,6 +254,17 @@ export default {
this.importantHeartbeatList = {}
},
+ clearEvents(monitorID, callback) {
+ socket.emit("clearEvents", monitorID, callback)
+ },
+
+ clearHeartbeats(monitorID, callback) {
+ socket.emit("clearHeartbeats", monitorID, callback)
+ },
+
+ clearStatistics(callback) {
+ socket.emit("clearStatistics", callback)
+ },
},
computed: {
diff --git a/src/pages/Details.vue b/src/pages/Details.vue
index badcc687e..776f1c1dd 100644
--- a/src/pages/Details.vue
+++ b/src/pages/Details.vue
@@ -133,6 +133,23 @@
+
+
+
+
@@ -172,6 +189,14 @@
{{ $t("deleteMonitorMsg") }}
+
+
+ {{ $t("clearEventsMsg") }}
+
+
+
+ {{ $t("clearHeartbeatsMsg") }}
+
@@ -251,6 +276,7 @@ export default {
importantHeartBeatList() {
if (this.$root.importantHeartbeatList[this.monitor.id]) {
+ // eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.heartBeatList = this.$root.importantHeartbeatList[this.monitor.id];
return this.$root.importantHeartbeatList[this.monitor.id]
}
@@ -313,6 +339,14 @@ export default {
this.$refs.confirmDelete.show();
},
+ clearEventsDialog() {
+ this.$refs.confirmClearEvents.show();
+ },
+
+ clearHeartbeatsDialog() {
+ this.$refs.confirmClearHeartbeats.show();
+ },
+
deleteMonitor() {
this.$root.deleteMonitor(this.monitor.id, (res) => {
if (res.ok) {
@@ -324,6 +358,21 @@ export default {
})
},
+ clearEvents() {
+ this.$root.clearEvents(this.monitor.id, (res) => {
+ if (! res.ok) {
+ toast.error(res.msg);
+ }
+ })
+ },
+
+ clearHeartbeats() {
+ this.$root.clearHeartbeats(this.monitor.id, (res) => {
+ if (! res.ok) {
+ toast.error(res.msg);
+ }
+ })
+ },
},
}
@@ -340,16 +389,20 @@ export default {
@media (max-width: 550px) {
.functions {
text-align: center;
- }
- button, a {
- margin-left: 10px !important;
- margin-right: 10px !important;
+ button, a {
+ margin-left: 10px !important;
+ margin-right: 10px !important;
+ }
}
.ping-chart-wrapper {
padding: 10px !important;
}
+
+ .dropdown-clear-data {
+ margin-bottom: 10px;
+ }
}
@media (max-width: 400px) {
@@ -364,6 +417,13 @@ export default {
padding-left: 25px;
padding-right: 25px;
}
+
+ .dropdown-clear-data {
+ button {
+ display: block;
+ padding-top: 4px;
+ }
+ }
}
.url {
@@ -417,10 +477,30 @@ table {
color: black;
}
+.dropdown-clear-data {
+ float: right;
+}
+
.dark {
.keyword {
color: $dark-font-color;
}
+
+ .dropdown-clear-data {
+ ul {
+ background-color: $dark-bg;
+ border-color: $dark-bg2;
+ border-width: 2px;
+
+ li button {
+ color: $dark-font-color;
+ }
+
+ li button:hover {
+ background-color: $dark-bg2;
+ }
+ }
+ }
}
diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue
index 83384ca80..151df2c4d 100644
--- a/src/pages/Settings.vue
+++ b/src/pages/Settings.vue
@@ -126,6 +126,7 @@
+
@@ -219,6 +220,10 @@
Proszę używać ostrożnie.
+
+
+ {{ $t("confirmClearStatisticsMsg") }}
+
@@ -317,6 +322,10 @@ export default {
this.$refs.confirmDisableAuth.show();
},
+ confirmClearStatistics() {
+ this.$refs.confirmClearStatistics.show();
+ },
+
disableAuth() {
this.settings.disableAuth = true;
this.saveSettings();
@@ -328,6 +337,15 @@ export default {
this.$root.storage().removeItem("token");
},
+ clearStatistics() {
+ this.$root.clearStatistics((res) => {
+ if (res.ok) {
+ this.$router.go();
+ } else {
+ toast.error(res.msg);
+ }
+ })
+ },
},
}