From 5e6d945095f0923c4fb748a8fbfe94312a7bc021 Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Wed, 27 Oct 2021 23:06:06 +1300 Subject: [PATCH 01/18] Most hacked in POC --- server/routers/api-router.js | 8 ++++++-- src/components/PublicGroupList.vue | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index fbe8136e5..be186ccca 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -141,9 +141,13 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, await checkPublished(); const publicGroupList = []; let list = await R.find("group", " public = 1 ORDER BY weight "); - for (let groupBean of list) { - publicGroupList.push(await groupBean.toPublicJSON()); + let monitor_info = await groupBean.toPublicJSON() + monitor_info.monitorList = await Promise.all(monitor_info.monitorList.map( async (monitor)=>{ + let tags = await R.getAll("SELECT mt.monitor_id,mt.value, tag.name, tag.color FROM monitor_tag mt JOIN tag ON mt.tag_id = tag.id WHERE mt.monitor_id = ?", [monitor.id]); + return {...monitor,tags: tags} + })) + publicGroupList.push(monitor_info); } response.json(publicGroupList); diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue index 23d19e6cd..39fb342e2 100644 --- a/src/components/PublicGroupList.vue +++ b/src/components/PublicGroupList.vue @@ -40,6 +40,7 @@ {{ monitor.element.name }} +
@@ -59,12 +60,14 @@ import Draggable from "vuedraggable"; import HeartbeatBar from "./HeartbeatBar.vue"; import Uptime from "./Uptime.vue"; +import Tag from "./Tag.vue"; export default { components: { Draggable, HeartbeatBar, Uptime, + Tag, }, props: { editMode: { From 9143b73f844ebd1214c2160a6e1319fa91191b6f Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Thu, 28 Oct 2021 14:53:27 +1300 Subject: [PATCH 02/18] Styling for tags --- src/assets/app.scss | 4 ++++ src/components/PublicGroupList.vue | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/assets/app.scss b/src/assets/app.scss index e1a5d052d..ae1ff687c 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -346,6 +346,10 @@ textarea.form-control { &.active { background-color: #cdf8f4; } + // Removes margin to line up tags list with uptime percentage + .tags, .tag-wrapper:first-child { + margin-left: 0 !important; + } } } diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue index 39fb342e2..97441d50e 100644 --- a/src/components/PublicGroupList.vue +++ b/src/components/PublicGroupList.vue @@ -40,6 +40,9 @@ {{ monitor.element.name }} + +
+
From 348c5ec995c34d7d17f1e44297e205f04858d787 Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Thu, 28 Oct 2021 15:07:19 +1300 Subject: [PATCH 03/18] Match lint settings --- server/routers/api-router.js | 7 ++++--- src/components/PublicGroupList.vue | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index be186ccca..bf0cc54c8 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -142,12 +142,13 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, const publicGroupList = []; let list = await R.find("group", " public = 1 ORDER BY weight "); for (let groupBean of list) { - let monitor_info = await groupBean.toPublicJSON() - monitor_info.monitorList = await Promise.all(monitor_info.monitorList.map( async (monitor)=>{ + let monitorGroup = await groupBean.toPublicJSON() + monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map( async (monitor)=>{ + // Includes tags as an array in response, allows for tags to be displayed on public status page let tags = await R.getAll("SELECT mt.monitor_id,mt.value, tag.name, tag.color FROM monitor_tag mt JOIN tag ON mt.tag_id = tag.id WHERE mt.monitor_id = ?", [monitor.id]); return {...monitor,tags: tags} })) - publicGroupList.push(monitor_info); + publicGroupList.push(monitorGroup); } response.json(publicGroupList); diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue index 97441d50e..f30edcef5 100644 --- a/src/components/PublicGroupList.vue +++ b/src/components/PublicGroupList.vue @@ -40,7 +40,6 @@ {{ monitor.element.name }} -
From 24664cde2c204f5809c193643837b097cdce81af Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Thu, 28 Oct 2021 15:22:35 +1300 Subject: [PATCH 04/18] Smarter CSS to fix Mobile alignment --- src/assets/app.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assets/app.scss b/src/assets/app.scss index ae1ff687c..db01e12d2 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -346,9 +346,9 @@ textarea.form-control { &.active { background-color: #cdf8f4; } - // Removes margin to line up tags list with uptime percentage - .tags, .tag-wrapper:first-child { - margin-left: 0 !important; + .tags { + // Removes margin to line up tags list with uptime percentage + margin-left: -0.25rem; } } } From b32bfb3ff1578483dd3b8f10e3a05aa83a1fc3cf Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Fri, 29 Oct 2021 18:19:24 +1300 Subject: [PATCH 05/18] Added toggle for tag visibility --- server/routers/api-router.js | 18 +++++++++++++----- src/pages/StatusPage.vue | 31 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index bf0cc54c8..b58c4a002 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -101,6 +101,10 @@ router.get("/api/status-page/config", async (_request, response) => { config.statusPagePublished = true; } + if (! config.statusPageTags) { + config.statusPageTags = "hidden"; + } + if (! config.title) { config.title = "Uptime Kuma"; } @@ -143,11 +147,15 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, let list = await R.find("group", " public = 1 ORDER BY weight "); for (let groupBean of list) { let monitorGroup = await groupBean.toPublicJSON() - monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map( async (monitor)=>{ - // Includes tags as an array in response, allows for tags to be displayed on public status page - let tags = await R.getAll("SELECT mt.monitor_id,mt.value, tag.name, tag.color FROM monitor_tag mt JOIN tag ON mt.tag_id = tag.id WHERE mt.monitor_id = ?", [monitor.id]); - return {...monitor,tags: tags} - })) + console.log("\n\nsettings", await getSettings("statusPage")) + if ((await getSettings("statusPage")).statusPageTags=="visible") { + monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map( async (monitor)=>{ + // Includes tags as an array in response, allows for tags to be displayed on public status page + let tags = await R.getAll("SELECT mt.monitor_id,mt.value, tag.name, tag.color FROM monitor_tag mt JOIN tag ON mt.tag_id = tag.id WHERE mt.monitor_id = ?", [monitor.id]); + return {...monitor,tags: tags} + })) + } + publicGroupList.push(monitorGroup); } diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 87634f35a..4ee810c7f 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -77,6 +77,16 @@ {{ $t("Switch to Dark Theme") }} + + + +
@@ -292,6 +302,10 @@ export default { return this.config.statusPageTheme; }, + tagsVisible() { + return this.config.statusPageTags + }, + logoClass() { if (this.editMode) { return { @@ -472,6 +486,23 @@ export default { changeTheme(name) { this.config.statusPageTheme = name; }, + changeTagsVisibilty(newState) { + this.config.statusPageTags = newState; + + // On load, if the status page will not include tags if it's not enabled for security reasons + // Which means if we enable tags, it won't show in the UI until saved + // So we have this to enhance UX and load in the tags from the authenticated source instantly + this.$root.publicGroupList = this.$root.publicGroupList.map((group)=>{ + return {...group, + monitorList: group.monitorList.map((monitor)=> { + // We only include the tags if visible so we can reuse the logic to hide the tags on disable + return {...monitor, + tags: newState==="visible" ? this.$root.monitorList[monitor.id].tags : [] + } + }) + } + }); + }, /** * Crop Success From 74688e69aa6313c14a87bab53a5712f900bd0b20 Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Sat, 30 Oct 2021 00:58:46 +1300 Subject: [PATCH 06/18] Remove debug statement in server/routers/api-router.js Co-authored-by: Adam Stachowicz --- server/routers/api-router.js | 1 - 1 file changed, 1 deletion(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index b58c4a002..a5d12450c 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -147,7 +147,6 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, let list = await R.find("group", " public = 1 ORDER BY weight "); for (let groupBean of list) { let monitorGroup = await groupBean.toPublicJSON() - console.log("\n\nsettings", await getSettings("statusPage")) if ((await getSettings("statusPage")).statusPageTags=="visible") { monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map( async (monitor)=>{ // Includes tags as an array in response, allows for tags to be displayed on public status page From 4004926e643e63a2a8d6915cef6af6992225aa9f Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Mon, 1 Nov 2021 12:52:21 +1300 Subject: [PATCH 07/18] Small formatting changes from code-review Co-authored-by: deef --- src/pages/StatusPage.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 4ee810c7f..06be16169 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -493,10 +493,12 @@ export default { // Which means if we enable tags, it won't show in the UI until saved // So we have this to enhance UX and load in the tags from the authenticated source instantly this.$root.publicGroupList = this.$root.publicGroupList.map((group)=>{ - return {...group, + return { + ...group, monitorList: group.monitorList.map((monitor)=> { // We only include the tags if visible so we can reuse the logic to hide the tags on disable - return {...monitor, + return { + ...monitor, tags: newState==="visible" ? this.$root.monitorList[monitor.id].tags : [] } }) From 12ef9f39c51fac03f5a18ba4182a9a81328c662f Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Mon, 1 Nov 2021 13:23:46 +1300 Subject: [PATCH 08/18] Merged buttons, cleaned up SS tag retrieval and made tagsVisible a bool. Also to note: due to the transition of tagsVisible this breaks compatibility with the previous commits, delete the tagsVisible setting in the database to fix. --- server/routers/api-router.js | 19 +++++++++++++------ src/pages/StatusPage.vue | 19 ++++++++++--------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index a5d12450c..30f6a828c 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -102,7 +102,7 @@ router.get("/api/status-page/config", async (_request, response) => { } if (! config.statusPageTags) { - config.statusPageTags = "hidden"; + config.statusPageTags = false; } if (! config.title) { @@ -144,15 +144,22 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, try { await checkPublished(); const publicGroupList = []; - let list = await R.find("group", " public = 1 ORDER BY weight "); + const tagsVisible = (await getSettings("statusPage")).statusPageTags; + const list = await R.find("group", " public = 1 ORDER BY weight "); for (let groupBean of list) { - let monitorGroup = await groupBean.toPublicJSON() - if ((await getSettings("statusPage")).statusPageTags=="visible") { + let monitorGroup = await groupBean.toPublicJSON(); + if (tagsVisible) { monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map( async (monitor)=>{ // Includes tags as an array in response, allows for tags to be displayed on public status page - let tags = await R.getAll("SELECT mt.monitor_id,mt.value, tag.name, tag.color FROM monitor_tag mt JOIN tag ON mt.tag_id = tag.id WHERE mt.monitor_id = ?", [monitor.id]); + const tags = await R.getAll( + `SELECT monitor_tag.monitor_id, monitor_tag.value, tag.name, tag.color + FROM monitor_tag + JOIN tag + ON monitor_tag.tag_id = tag.id + WHERE monitor_tag.monitor_id = ?`, [monitor.id] + ); return {...monitor,tags: tags} - })) + })); } publicGroupList.push(monitorGroup); diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 06be16169..1320f093b 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -78,14 +78,15 @@ {{ $t("Switch to Dark Theme") }} - - - @@ -499,7 +500,7 @@ export default { // We only include the tags if visible so we can reuse the logic to hide the tags on disable return { ...monitor, - tags: newState==="visible" ? this.$root.monitorList[monitor.id].tags : [] + tags: newState ? this.$root.monitorList[monitor.id].tags : [] } }) } From 191b81ee07ab919123427d6ef1998969350b5d8f Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Mon, 1 Nov 2021 22:14:41 +1300 Subject: [PATCH 09/18] Fix grammer in comment Co-authored-by: Nelson Chan --- src/pages/StatusPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 1320f093b..70367cc9f 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -490,7 +490,7 @@ export default { changeTagsVisibilty(newState) { this.config.statusPageTags = newState; - // On load, if the status page will not include tags if it's not enabled for security reasons + // On load, the status page will not include tags if it's not enabled for security reasons // Which means if we enable tags, it won't show in the UI until saved // So we have this to enhance UX and load in the tags from the authenticated source instantly this.$root.publicGroupList = this.$root.publicGroupList.map((group)=>{ From 8e6173c05ee11a26935bed6423064cc3d2f12fa7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Nov 2021 23:10:34 +0100 Subject: [PATCH 10/18] Fix and add new hr-HR translations --- src/languages/hr-HR.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/languages/hr-HR.js b/src/languages/hr-HR.js index 35383a0f3..2fb04bb33 100644 --- a/src/languages/hr-HR.js +++ b/src/languages/hr-HR.js @@ -10,7 +10,7 @@ export default { passwordNotMatchMsg: "Lozinke se ne poklapaju.", notificationDescription: "Obavijesti će funkcionirati samo ako su dodijeljene monitoru.", keywordDescription: "Ključna riječ za pretragu kao običan HTML ili u JSON formatu. Pretraga je case-sensitive.", - pauseDashboardHome: "Pauziraj", + pauseDashboardHome: "Pauzirano", deleteMonitorMsg: "Jeste li sigurni da želite izbrisati monitor?", deleteNotificationMsg: "Jeste li sigurni da želite izbrisati ovu obavijest za sve monitore?", resoverserverDescription: "Cloudflare je zadani DNS poslužitelj. Možete to promijeniti u bilo kojem trenutku.", @@ -25,7 +25,7 @@ export default { twoFAVerifyLabel: "Unesite svoj 2FA token:", tokenValidSettingsMsg: "Token je važeći! Sada možete spremiti postavke dvofaktorske autentikacije.", confirmEnableTwoFAMsg: "Želite li omogućiti dvofaktorsku autentikaciju?", - confirmDisableTwoFAMsg: "Are you sure you want to disable dvofaktorsku autentikaciju?", + confirmDisableTwoFAMsg: "Jeste li sigurni da želite onemogućiti dvofaktorsku autentikaciju?", Settings: "Postavke", Dashboard: "Kontrolna ploča", "New Update": "Novo ažuriranje", @@ -44,7 +44,7 @@ export default { Down: "Nedostupno", Pending: "U tijeku", Unknown: "Nepoznato", - Pause: "Pauzirano", + Pause: "Pauziraj", Name: "Naziv monitora", Status: "Status", DateTime: "Vremenska oznaka", @@ -307,4 +307,5 @@ export default { "Showing {from} to {to} of {count} records": "Prikaz zapisa {from}-{to} od sveukupno {count}", steamApiKeyDescription: "Za praćenje Steam poslužitelja za igru, potrebno je imati Steam Web-API ključ. Možete registrirati vlastiti ključ ovdje: ", "Current User": "Trenutni korisnik", + recent: "Nedavno", }; From 9a135deac2925fa0625ff100d17b44ab491dfab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Bratovi=C4=87?= Date: Tue, 2 Nov 2021 11:48:55 +0100 Subject: [PATCH 11/18] Add new translation for 'Uptime' --- src/languages/hr-HR.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/hr-HR.js b/src/languages/hr-HR.js index 2fb04bb33..29d1343d1 100644 --- a/src/languages/hr-HR.js +++ b/src/languages/hr-HR.js @@ -54,7 +54,7 @@ export default { Edit: "Uredi", Delete: "Obriši", Current: "Trenutno", - Uptime: "Uptime", + Uptime: "Dostupnost", "Cert Exp.": "Istek cert.", days: "dana", day: "dan", From 1fb9b25d1357383ed720860901c3df1606d7179d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Bratovi=C4=87?= Date: Tue, 2 Nov 2021 14:09:01 +0100 Subject: [PATCH 12/18] Improve hr-HR translations --- src/languages/hr-HR.js | 50 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/languages/hr-HR.js b/src/languages/hr-HR.js index 29d1343d1..01674dce8 100644 --- a/src/languages/hr-HR.js +++ b/src/languages/hr-HR.js @@ -2,15 +2,14 @@ export default { languageName: "Hrvatski", checkEverySecond: "Provjera svake {0} sekunde", retryCheckEverySecond: "Ponovni pokušaj svake {0} sekunde", - retriesDescription: "Broj ponovnih pokušaja prije nego će se servis označiti kao DOWN te poslati obavijest", + retriesDescription: "Broj ponovnih pokušaja prije nego će se servis označiti kao nedostupan te poslati obavijest", ignoreTLSError: "Ignoriraj TLS/SSL pogreške za HTTPS web stranice", - upsideDownModeDescription: "Preokreni logiku statusa. Ako je usluga dostupna, smatra se da je DOWN.", + upsideDownModeDescription: "Preokreni logiku statusa. Ako se primi pozitivan odgovor, smatra se da je usluga nedostupna.", maxRedirectDescription: "Maksimalan broj preusmjeravanja. Postaviti na 0 kako bi se preusmjeravanja onemogućila.", acceptedStatusCodesDescription: "Odaberite statusne kodove koji se smatraju uspješnim odgovorom.", passwordNotMatchMsg: "Lozinke se ne poklapaju.", notificationDescription: "Obavijesti će funkcionirati samo ako su dodijeljene monitoru.", - keywordDescription: "Ključna riječ za pretragu kao običan HTML ili u JSON formatu. Pretraga je case-sensitive.", - pauseDashboardHome: "Pauzirano", + keywordDescription: "Ključna riječ za pretragu, u obliku običnog HTML-a ili u JSON formatu. Pretraga je osjetljiva na velika i mala slova.", deleteMonitorMsg: "Jeste li sigurni da želite izbrisati monitor?", deleteNotificationMsg: "Jeste li sigurni da želite izbrisati ovu obavijest za sve monitore?", resoverserverDescription: "Cloudflare je zadani DNS poslužitelj. Možete to promijeniti u bilo kojem trenutku.", @@ -44,12 +43,13 @@ export default { Down: "Nedostupno", Pending: "U tijeku", Unknown: "Nepoznato", - Pause: "Pauziraj", - Name: "Naziv monitora", + pauseDashboardHome: "Pauzirano", + Name: "Naziv", Status: "Status", DateTime: "Vremenska oznaka", Message: "Izvještaj", "No important events": "Nema važnih događaja", + Pause: "Pauziraj", Resume: "Nastavi", Edit: "Uredi", Delete: "Obriši", @@ -65,12 +65,12 @@ export default { Ping: "Odziv", "Monitor Type": "Vrsta Monitora", Keyword: "Ključna riječ", - "Friendly Name": "Lijep naziv", + "Friendly Name": "Prilagođen naziv", URL: "URL", Hostname: "Domaćin", Port: "Port", "Heartbeat Interval": "Interval provjere", - Retries: "Ponovnih pokušaja", + Retries: "Broj ponovnih pokušaja", "Heartbeat Retry Interval": "Interval ponovnih pokušaja", Advanced: "Napredne postavke", "Upside Down Mode": "Obrnuti način", @@ -86,14 +86,14 @@ export default { Light: "Svijetli način", Dark: "Tamni način", Auto: "Automatski", - "Theme - Heartbeat Bar": "Tema - Statusna traka", + "Theme - Heartbeat Bar": "Tema za traku dostupnosti", Normal: "Normalno", Bottom: "Ispod", None: "Isključeno", Timezone: "Vremenska zona", - "Search Engine Visibility": "Vidljivost pretraživačima", + "Search Engine Visibility": "Vidljivost tražilicama", "Allow indexing": "Dopusti indeksiranje", - "Discourage search engines from indexing site": "Sprječavanje indeksiranja stranice", + "Discourage search engines from indexing site": "Sprječavanje indeksiranja", "Change Password": "Promjena lozinke", "Current Password": "Trenutna lozinka", "New Password": "Nova lozinka", @@ -103,7 +103,7 @@ export default { "Enable Auth": "Omogući autentikaciju", Logout: "Odjava", Leave: "Poništi", - "I understand, please disable": "Razumijem, onemogući", + "I understand, please disable": "Razumijem, svejedno onemogući", Confirm: "Potvrda", Yes: "Da", No: "Ne", @@ -112,10 +112,10 @@ export default { "Remember me": "Zapamti me", Login: "Prijava", "No Monitors, please": "Nema monitora, ", - "add one": "dodaj jednog", + "add one": "dodaj jedan", "Notification Type": "Tip obavijesti", Email: "E-pošta", - Test: "Test", + Test: "Testiraj", "Certificate Info": "Informacije o certifikatu", "Resolver Server": "DNS poslužitelj", "Resource Record Type": "Vrsta DNS zapisa", @@ -130,14 +130,14 @@ export default { notAvailableShort: "N/A", "Default enabled": "Omogući za nove monitore", "Apply on all existing monitors": "Primijeni na postojeće monitore", - Create: "Create", - "Clear Data": "Clear Data", - Events: "Events", + Create: "Kreiraj", + "Clear Data": "Obriši podatke", + Events: "Događaji", Heartbeats: "Provjere", "Auto Get": "Automatski dohvat", backupDescription: "Moguće je napraviti sigurnosnu kopiju svih monitora i obavijesti koja će biti spremljena kao JSON datoteka.", backupDescription2: "Napomena: povijest i podaci o događajima nisu uključeni u sigurnosnu kopiju.", - backupDescription3: "Osjetljivi podaci poput tokena za obavijesti jesu uključeni u sigurnosnu kopiju. Zato je potrebno čuvati izvoz na sigurnom mjestu.", + backupDescription3: "Osjetljivi podaci poput tokena za obavijesti uključeni su u sigurnosnu kopiju. Zato je potrebno čuvati izvoz na sigurnom mjestu.", alertNoFile: "Datoteka za uvoz nije odabrana.", alertWrongFileType: "Datoteka za uvoz nije u JSON formatu.", "Clear all statistics": "Obriši sve statistike", @@ -152,7 +152,7 @@ export default { "2FA Settings": "Postavke 2FA", "Two Factor Authentication": "Dvofaktorska autentikacija", Active: "Aktivna", - Inactive: "Neaktivna", + Inactive: "Neaktivno", Token: "Token", "Show URI": "Pokaži URI", Tags: "Oznake", @@ -172,7 +172,7 @@ export default { "Search...": "Pretraga...", "Avg. Ping": "Prosječni odziv", "Avg. Response": "Prosječni odgovor", - "Entry Page": "Entry Page", + "Entry Page": "Početna stranica", statusPageNothing: "Ovdje nema ničega, dodajte grupu ili monitor.", "No Services": "Nema usluga", "All Systems Operational": "Svi sustavi su operativni", @@ -183,7 +183,7 @@ export default { "Edit Status Page": "Uredi Statusnu stranicu", "Go to Dashboard": "Na Kontrolnu ploču", "Status Page": "Statusna stranica", - defaultNotificationName: "Moja {notification} obavijest ({number})", + defaultNotificationName: "Moja {number}. {notification} obavijest", here: "ovdje", Required: "Potrebno", telegram: "Telegram", @@ -195,11 +195,11 @@ export default { "YOUR BOT TOKEN HERE": "OVDJE IDE TOKEN BOTA", chatIDNotFound: "ID razgovora nije pronađen; prvo morate poslati poruku botu", webhook: "Webhook", - "Post URL": "Post URL", + "Post URL": "URL Post zahtjeva", "Content Type": "Tip sadržaja (Content Type)", webhookJsonDesc: "{0} je dobra opcija za moderne HTTP poslužitelje poput Express.js-a", webhookFormDataDesc: "{multipart} je moguća alternativa za PHP, samo je potrebno parsirati JSON koristeći {decodeFunction}", - smtp: "E-pošta (SMTP)", + smtp: "E-mail (SMTP)", secureOptionNone: "Bez sigurnosti / STARTTLS (25, 587)", secureOptionTLS: "TLS (465)", "Ignore TLS Error": "Ignoriraj greške TLS-a", @@ -215,7 +215,7 @@ export default { "Prefix Custom Message": "Prefiks prilagođene poruke", "Hello @everyone is...": "Pozdrav {'@'}everyone...", teams: "Microsoft Teams", - "Webhook URL": "URL Teams webhooka", + "Webhook URL": "URL webhooka", wayToGetTeamsURL: "Više informacija o Teams webhookovima možete pročitati {0}.", signal: "Signal", Number: "Broj", @@ -242,7 +242,7 @@ export default { promosms: "PromoSMS", clicksendsms: "ClickSend SMS", lunasea: "LunaSea", - apprise: "Apprise (Support 50+ Notification services)", + apprise: "Apprise (Podržava preko 50 usluga za obavijesti)", pushbullet: "Pushbullet", line: "LINE", mattermost: "Mattermost", From e5d6410cafc1afbff3991f37a1ffb69ad45f51f4 Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Wed, 3 Nov 2021 11:46:53 +1300 Subject: [PATCH 13/18] Apply formatting suggestions from code review Co-authored-by: Adam Stachowicz --- server/routers/api-router.js | 4 ++-- src/pages/StatusPage.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index 30f6a828c..79e828378 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -149,7 +149,7 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, for (let groupBean of list) { let monitorGroup = await groupBean.toPublicJSON(); if (tagsVisible) { - monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map( async (monitor)=>{ + monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map(async (monitor) => { // Includes tags as an array in response, allows for tags to be displayed on public status page const tags = await R.getAll( `SELECT monitor_tag.monitor_id, monitor_tag.value, tag.name, tag.color @@ -158,7 +158,7 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, ON monitor_tag.tag_id = tag.id WHERE monitor_tag.monitor_id = ?`, [monitor.id] ); - return {...monitor,tags: tags} + return {...monitor, tags: tags} })); } diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 70367cc9f..ce0f94b55 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -493,10 +493,10 @@ export default { // On load, the status page will not include tags if it's not enabled for security reasons // Which means if we enable tags, it won't show in the UI until saved // So we have this to enhance UX and load in the tags from the authenticated source instantly - this.$root.publicGroupList = this.$root.publicGroupList.map((group)=>{ + this.$root.publicGroupList = this.$root.publicGroupList.map((group) => { return { ...group, - monitorList: group.monitorList.map((monitor)=> { + monitorList: group.monitorList.map((monitor) => { // We only include the tags if visible so we can reuse the logic to hide the tags on disable return { ...monitor, From 8f44b9f6181dfd80015012cceff227fb1e521c18 Mon Sep 17 00:00:00 2001 From: Andreas Brett Date: Fri, 5 Nov 2021 09:54:10 +0100 Subject: [PATCH 14/18] 24h tooltip on status page --- src/components/Uptime.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Uptime.vue b/src/components/Uptime.vue index a4bf22f68..2717672c4 100644 --- a/src/components/Uptime.vue +++ b/src/components/Uptime.vue @@ -1,5 +1,5 @@