mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-02-25 21:15:55 +00:00
Compare commits
5 commits
00498c5881
...
921a8a6eb0
Author | SHA1 | Date | |
---|---|---|---|
|
921a8a6eb0 | ||
|
a8a8dcf134 | ||
|
0492276601 | ||
|
61629cd963 | ||
|
afd0ae6428 |
10 changed files with 68 additions and 9 deletions
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "uptime-kuma",
|
"name": "uptime-kuma",
|
||||||
"version": "2.0.0-beta.0",
|
"version": "2.0.0-beta.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "uptime-kuma",
|
"name": "uptime-kuma",
|
||||||
"version": "2.0.0-beta.0",
|
"version": "2.0.0-beta.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "~1.8.22",
|
"@grpc/grpc-js": "~1.8.22",
|
||||||
|
@ -8332,7 +8332,6 @@
|
||||||
"integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==",
|
"integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==",
|
||||||
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
|
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint/eslintrc": "^1.2.2",
|
"@eslint/eslintrc": "^1.2.2",
|
||||||
"@humanwhocodes/config-array": "^0.9.2",
|
"@humanwhocodes/config-array": "^0.9.2",
|
||||||
|
|
|
@ -160,6 +160,7 @@ async function sendInfo(socket, hideVersion = false) {
|
||||||
isContainer,
|
isContainer,
|
||||||
dbType,
|
dbType,
|
||||||
primaryBaseURL: await setting("primaryBaseURL"),
|
primaryBaseURL: await setting("primaryBaseURL"),
|
||||||
|
serverIdentifier: await setting("serverIdentifier"),
|
||||||
serverTimezone: await server.getTimezone(),
|
serverTimezone: await server.getTimezone(),
|
||||||
serverTimezoneOffset: server.getTimezoneOffset(),
|
serverTimezoneOffset: server.getTimezoneOffset(),
|
||||||
});
|
});
|
||||||
|
|
|
@ -142,8 +142,12 @@ class Slack extends NotificationProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseURL = await setting("primaryBaseURL");
|
const baseURL = await setting("primaryBaseURL");
|
||||||
|
const serverIdentifier = await setting("serverIdentifier");
|
||||||
|
|
||||||
const title = "Uptime Kuma Alert";
|
let title = "Uptime Kuma Alert";
|
||||||
|
if (serverIdentifier) {
|
||||||
|
title = title + " (" + serverIdentifier + ")";
|
||||||
|
}
|
||||||
let data = {
|
let data = {
|
||||||
"channel": notification.slackchannel,
|
"channel": notification.slackchannel,
|
||||||
"username": notification.slackusername,
|
"username": notification.slackusername,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const nodemailer = require("nodemailer");
|
const nodemailer = require("nodemailer");
|
||||||
const NotificationProvider = require("./notification-provider");
|
const NotificationProvider = require("./notification-provider");
|
||||||
|
const { setting } = require("../util-server");
|
||||||
const { DOWN } = require("../../src/util");
|
const { DOWN } = require("../../src/util");
|
||||||
const { Liquid } = require("liquidjs");
|
const { Liquid } = require("liquidjs");
|
||||||
|
|
||||||
|
@ -46,6 +47,11 @@ class SMTP extends NotificationProvider {
|
||||||
let body = msg;
|
let body = msg;
|
||||||
if (heartbeatJSON) {
|
if (heartbeatJSON) {
|
||||||
body = `${msg}\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`;
|
body = `${msg}\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`;
|
||||||
|
|
||||||
|
const serverIdentifier = await setting("serverIdentifier");
|
||||||
|
if (serverIdentifier) {
|
||||||
|
body = body + `\nServer Identifier: ${serverIdentifier}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// subject and body are templated
|
// subject and body are templated
|
||||||
if ((monitorJSON && heartbeatJSON) || msg.endsWith("Testing")) {
|
if ((monitorJSON && heartbeatJSON) || msg.endsWith("Testing")) {
|
||||||
|
|
|
@ -132,6 +132,29 @@
|
||||||
<div class="form-text"></div>
|
<div class="form-text"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Server Identifier -->
|
||||||
|
<div class="mb-4">
|
||||||
|
<label class="form-label" for="serverIdentifier">
|
||||||
|
{{ $t("Server Identifier") }}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
<input
|
||||||
|
id="serverIdentifier"
|
||||||
|
v-model="settings.serverIdentifier"
|
||||||
|
class="form-control"
|
||||||
|
name="serverIdentifier"
|
||||||
|
placeholder=""
|
||||||
|
pattern=".+"
|
||||||
|
autocomplete="new-password"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-text">
|
||||||
|
{{ $t("serverIdentifierDescription") }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Steam API Key -->
|
<!-- Steam API Key -->
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label class="form-label" for="steamAPIKey">
|
<label class="form-label" for="steamAPIKey">
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
"General": "General",
|
"General": "General",
|
||||||
"Game": "Game",
|
"Game": "Game",
|
||||||
"Primary Base URL": "Primary Base URL",
|
"Primary Base URL": "Primary Base URL",
|
||||||
|
"serverIdentifier": "Server Identifier",
|
||||||
|
"serverIdentifierDescription": "If provided, this will be appended in parentheses after Uptime Kuma in UI and notifications",
|
||||||
"Version": "Version",
|
"Version": "Version",
|
||||||
"Check Update On GitHub": "Check Update On GitHub",
|
"Check Update On GitHub": "Check Update On GitHub",
|
||||||
"List": "List",
|
"List": "List",
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<header v-if="! $root.isMobile" class="d-flex flex-wrap justify-content-center py-3 mb-3 border-bottom">
|
<header v-if="! $root.isMobile" class="d-flex flex-wrap justify-content-center py-3 mb-3 border-bottom">
|
||||||
<router-link to="/dashboard" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
|
<router-link to="/dashboard" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
|
||||||
<object class="bi me-2 ms-4" width="40" height="40" data="/icon.svg" />
|
<object class="bi me-2 ms-4" width="40" height="40" data="/icon.svg" />
|
||||||
<span class="fs-4 title">{{ $t("Uptime Kuma") }}</span>
|
<span class="fs-4 title">{{ $t("Uptime Kuma") }}{{ $root.serverIdentifierSuffix }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<a v-if="hasNewVersion" target="_blank" href="https://github.com/louislam/uptime-kuma/releases" class="btn btn-info me-3">
|
<a v-if="hasNewVersion" target="_blank" href="https://github.com/louislam/uptime-kuma/releases" class="btn btn-info me-3">
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
<header v-else class="d-flex flex-wrap justify-content-center pt-2 pb-2 mb-3">
|
<header v-else class="d-flex flex-wrap justify-content-center pt-2 pb-2 mb-3">
|
||||||
<router-link to="/dashboard" class="d-flex align-items-center text-dark text-decoration-none">
|
<router-link to="/dashboard" class="d-flex align-items-center text-dark text-decoration-none">
|
||||||
<object class="bi" width="40" height="40" data="/icon.svg" />
|
<object class="bi" width="40" height="40" data="/icon.svg" />
|
||||||
<span class="fs-4 title ms-2">Uptime Kuma</span>
|
<span class="fs-4 title ms-2">{{ $t("Uptime Kuma") }}{{ $root.serverIdentifierSuffix }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
@ -170,7 +170,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
$route(to) {
|
||||||
|
if (this.serverIdentifierSuffix) {
|
||||||
|
this.updateTitle("Uptime Kuma" + this.$root.serverIdentifierSuffix);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -188,6 +192,10 @@ export default {
|
||||||
if (this.toastContainer != null) {
|
if (this.toastContainer != null) {
|
||||||
this.toastContainerObserver.observe(this.toastContainer, { childList: true });
|
this.toastContainerObserver.observe(this.toastContainer, { childList: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.$root.serverIdentifierSuffix) {
|
||||||
|
this.updateTitle("Uptime Kuma" + this.$root.serverIdentifierSuffix);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
|
@ -201,6 +209,10 @@ export default {
|
||||||
*/
|
*/
|
||||||
clearToasts() {
|
clearToasts() {
|
||||||
toast.clear();
|
toast.clear();
|
||||||
|
},
|
||||||
|
|
||||||
|
updateTitle(title) {
|
||||||
|
document.title = title;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -51,5 +51,17 @@ export default {
|
||||||
return location.protocol + "//" + location.host;
|
return location.protocol + "//" + location.host;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
serverIdentifierSuffix() {
|
||||||
|
if (this.$root.info.serverIdentifier) {
|
||||||
|
return " (" + this.$root.info.serverIdentifier + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (env === "development" || localStorage.dev === "dev") {
|
||||||
|
return " (dev)";
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div>
|
<div>
|
||||||
<object width="64" height="64" data="/icon.svg" />
|
<object width="64" height="64" data="/icon.svg" />
|
||||||
<div style="font-size: 28px; font-weight: bold; margin-top: 5px;">
|
<div style="font-size: 28px; font-weight: bold; margin-top: 5px;">
|
||||||
Uptime Kuma
|
{{ $t("Uptime Kuma") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div>
|
<div>
|
||||||
<object width="64" height="64" data="/icon.svg" />
|
<object width="64" height="64" data="/icon.svg" />
|
||||||
<div style="font-size: 28px; font-weight: bold; margin-top: 5px;">
|
<div style="font-size: 28px; font-weight: bold; margin-top: 5px;">
|
||||||
Uptime Kuma
|
{{ $t("Uptime Kuma") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue