mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
Some minor changes for 2.0.0 (#4621)
This commit is contained in:
parent
45690a25a0
commit
e927327bad
4 changed files with 1808 additions and 1595 deletions
3393
package-lock.json
generated
3393
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -93,7 +93,7 @@
|
||||||
"croner": "~6.0.5",
|
"croner": "~6.0.5",
|
||||||
"dayjs": "~1.11.5",
|
"dayjs": "~1.11.5",
|
||||||
"dotenv": "~16.0.3",
|
"dotenv": "~16.0.3",
|
||||||
"express": "~4.17.3",
|
"express": "~4.19.2",
|
||||||
"express-basic-auth": "~1.2.1",
|
"express-basic-auth": "~1.2.1",
|
||||||
"express-static-gzip": "~2.1.7",
|
"express-static-gzip": "~2.1.7",
|
||||||
"form-data": "~4.0.0",
|
"form-data": "~4.0.0",
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
"nanoid": "~3.3.4",
|
"nanoid": "~3.3.4",
|
||||||
"node-cloudflared-tunnel": "~1.0.9",
|
"node-cloudflared-tunnel": "~1.0.9",
|
||||||
"node-radius-client": "~1.0.0",
|
"node-radius-client": "~1.0.0",
|
||||||
"nodemailer": "~6.6.5",
|
"nodemailer": "~6.9.13",
|
||||||
"nostr-tools": "^1.13.1",
|
"nostr-tools": "^1.13.1",
|
||||||
"notp": "~2.0.3",
|
"notp": "~2.0.3",
|
||||||
"openid-client": "^5.4.2",
|
"openid-client": "^5.4.2",
|
||||||
|
|
|
@ -8,6 +8,7 @@ const server = UptimeKumaServer.getInstance();
|
||||||
const io = server.io;
|
const io = server.io;
|
||||||
const { setting } = require("./util-server");
|
const { setting } = require("./util-server");
|
||||||
const checkVersion = require("./check-version");
|
const checkVersion = require("./check-version");
|
||||||
|
const Database = require("./database");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send list of notification providers to client
|
* Send list of notification providers to client
|
||||||
|
@ -144,17 +145,20 @@ async function sendInfo(socket, hideVersion = false) {
|
||||||
let version;
|
let version;
|
||||||
let latestVersion;
|
let latestVersion;
|
||||||
let isContainer;
|
let isContainer;
|
||||||
|
let dbType;
|
||||||
|
|
||||||
if (!hideVersion) {
|
if (!hideVersion) {
|
||||||
version = checkVersion.version;
|
version = checkVersion.version;
|
||||||
latestVersion = checkVersion.latestVersion;
|
latestVersion = checkVersion.latestVersion;
|
||||||
isContainer = (process.env.UPTIME_KUMA_IS_CONTAINER === "1");
|
isContainer = (process.env.UPTIME_KUMA_IS_CONTAINER === "1");
|
||||||
|
dbType = Database.dbConfig.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
socket.emit("info", {
|
socket.emit("info", {
|
||||||
version,
|
version,
|
||||||
latestVersion,
|
latestVersion,
|
||||||
isContainer,
|
isContainer,
|
||||||
|
dbType,
|
||||||
primaryBaseURL: await setting("primaryBaseURL"),
|
primaryBaseURL: await setting("primaryBaseURL"),
|
||||||
serverTimezone: await server.getTimezone(),
|
serverTimezone: await server.getTimezone(),
|
||||||
serverTimezoneOffset: server.getTimezoneOffset(),
|
serverTimezoneOffset: server.getTimezoneOffset(),
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-4">
|
<div class="my-4">
|
||||||
<div class="my-3">
|
<div v-if="$root.info.dbType === 'sqlite'" class="my-3">
|
||||||
<button class="btn btn-outline-info me-2" @click="shrinkDatabase">
|
<button class="btn btn-outline-info me-2" @click="shrinkDatabase">
|
||||||
{{ $t("Shrink Database") }} ({{ databaseSizeDisplay }})
|
{{ $t("Shrink Database") }} ({{ databaseSizeDisplay }})
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in a new issue