Compare commits

..

7 commits

Author SHA1 Message Date
Cyril59310
ff888cc80b Translated using Weblate (French)
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: Cyril59310 <archas.cyril@hotmail.fr>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/fr/
Translation: Uptime Kuma/Uptime Kuma
2024-10-26 14:13:00 +00:00
Ilkka Myller
a65816a908 Translated using Weblate (Finnish)
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: Ilkka Myller <ilkka.myller@nodefield.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/fi/
Translation: Uptime Kuma/Uptime Kuma
2024-10-26 14:13:00 +00:00
AnnAngela
2e7fa2c0b7 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: AnnAngela <naganjue@vip.qq.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/zh_Hans/
Translation: Uptime Kuma/Uptime Kuma
2024-10-26 14:13:00 +00:00
stanol
4acbb831b8 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: stanol <stanol777@gmail.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/uk/
Translation: Uptime Kuma/Uptime Kuma
2024-10-26 14:13:00 +00:00
Ivan Bratović
21d5449e2a Translated using Weblate (Croatian)
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: Ivan Bratović <ivanbratovic4@gmail.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/hr/
Translation: Uptime Kuma/Uptime Kuma
2024-10-26 14:13:00 +00:00
Marco
be3b3da81d Translated using Weblate (German)
Currently translated at 100.0% (1062 of 1062 strings)

Translated using Weblate (German (Switzerland))

Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: Marco <marco@nanoweb.ch>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/de/
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/de_CH/
Translation: Uptime Kuma/Uptime Kuma
2024-10-26 14:13:00 +00:00
MrEddX
0c162c92a8 Translated using Weblate (Bulgarian)
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: MrEddX <mreddx@chatrix.one>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/bg/
Translation: Uptime Kuma/Uptime Kuma
2024-10-26 14:13:00 +00:00
6 changed files with 9 additions and 130 deletions

View file

@ -27,6 +27,7 @@ RUN mkdir ./data
# ⭐ Main Image
############################################
FROM $BASE_IMAGE AS release
USER node
WORKDIR /app
LABEL org.opencontainers.image.source="https://github.com/louislam/uptime-kuma"
@ -45,7 +46,6 @@ CMD ["node", "server/server.js"]
# Rootless Image
############################################
FROM release AS rootless
USER node
############################################
# Mark as Nightly

View file

@ -9,7 +9,6 @@ const mysql = require("mysql2/promise");
const { Settings } = require("./settings");
const { UptimeCalculator } = require("./uptime-calculator");
const dayjs = require("dayjs");
const { SimpleMigrationServer } = require("./utils/simple-migration-server");
/**
* Database & App Data Folder
@ -383,11 +382,9 @@ class Database {
/**
* Patch the database
* @param {number} port Start the migration server for aggregate tables on this port if provided
* @param {string} hostname Start the migration server for aggregate tables on this hostname if provided
* @returns {Promise<void>}
*/
static async patch(port = undefined, hostname = undefined) {
static async patch() {
// Still need to keep this for old versions of Uptime Kuma
if (Database.dbConfig.type === "sqlite") {
await this.patchSqlite();
@ -412,7 +409,7 @@ class Database {
await R.exec("PRAGMA foreign_keys = ON");
}
await this.migrateAggregateTable(port, hostname);
await this.migrateAggregateTable();
} catch (e) {
// Allow missing patch files for downgrade or testing pr.
@ -738,11 +735,9 @@ class Database {
* Normally, it should be in transaction, but UptimeCalculator wasn't designed to be in transaction before that.
* I don't want to heavily modify the UptimeCalculator, so it is not in transaction.
* Run `npm run reset-migrate-aggregate-table-state` to reset, in case the migration is interrupted.
* @param {number} port Start the migration server on this port if provided
* @param {string} hostname Start the migration server on this hostname if provided
* @returns {Promise<void>}
*/
static async migrateAggregateTable(port, hostname = undefined) {
static async migrateAggregateTable() {
log.debug("db", "Enter Migrate Aggregate Table function");
// Add a setting for 2.0.0-dev users to skip this migration
@ -763,18 +758,6 @@ class Database {
throw new Error("Aggregate table migration is already in progress");
}
/**
* Start migration server for displaying the migration status
* @type {SimpleMigrationServer}
*/
let migrationServer;
let msg;
if (port) {
migrationServer = new SimpleMigrationServer();
await migrationServer.start(port, hostname);
}
await Settings.set("migrateAggregateTableState", "migrating");
log.info("db", "Migrating Aggregate Table");
@ -794,7 +777,6 @@ class Database {
let count = countResult.count;
if (count > 0) {
log.warn("db", `Aggregate table ${table} is not empty, migration will not be started (Maybe you were using 2.0.0-dev?)`);
await migrationServer?.stop();
return;
}
}
@ -829,9 +811,7 @@ class Database {
`, [ monitor.monitor_id, date.date ]);
if (heartbeats.length > 0) {
msg = `[DON'T STOP] Migrating monitor data ${monitor.monitor_id} - ${date.date} [${progressPercent.toFixed(2)}%][${i}/${monitors.length}]`;
log.info("db", msg);
migrationServer?.update(msg);
log.info("db", `[DON'T STOP] Migrating monitor data ${monitor.monitor_id} - ${date.date} [${progressPercent.toFixed(2)}%][${i}/${monitors.length}]`);
}
for (let heartbeat of heartbeats) {
@ -849,13 +829,9 @@ class Database {
i++;
}
msg = "Clearing non-important heartbeats";
log.info("db", msg);
migrationServer?.update(msg);
await Database.clearHeartbeatData(true);
await Settings.set("migrateAggregateTableState", "migrated");
await migrationServer?.stop();
if (monitors.length > 0) {
log.info("db", "Aggregate Table Migration Completed");

View file

@ -1716,7 +1716,7 @@ async function initDatabase(testMode = false) {
log.info("server", "Connected to the database");
// Patch the database
await Database.patch(port, hostname);
await Database.patch();
let jwtSecretBean = await R.findOne("setting", " `key` = ? ", [
"jwtSecret",

View file

@ -1,84 +0,0 @@
const express = require("express");
const http = require("node:http");
const { log } = require("../../src/util");
/**
* SimpleMigrationServer
* For displaying the migration status of the server
* Also, it is used to let Docker healthcheck know the status of the server, as the main server is not started yet, healthcheck will think the server is down incorrectly.
*/
class SimpleMigrationServer {
/**
* Express app instance
* @type {?Express}
*/
app;
/**
* Server instance
* @type {?Server}
*/
server;
/**
* Response object
* @type {?Response}
*/
response;
/**
* Start the server
* @param {number} port Port
* @param {string} hostname Hostname
* @returns {Promise<void>}
*/
start(port, hostname) {
this.app = express();
this.server = http.createServer(this.app);
this.app.get("/", (req, res) => {
res.set("Content-Type", "text/plain");
res.write("Migration is in progress, listening message...\n");
if (this.response) {
this.response.write("Disconnected\n");
this.response.end();
}
this.response = res;
// never ending response
});
return new Promise((resolve) => {
this.server.listen(port, hostname, () => {
if (hostname) {
log.info("migration", `Migration server is running on http://${hostname}:${port}`);
} else {
log.info("migration", `Migration server is running on http://localhost:${port}`);
}
resolve();
});
});
}
/**
* Update the message
* @param {string} msg Message to update
* @returns {void}
*/
update(msg) {
this.response?.write(msg + "\n");
}
/**
* Stop the server
* @returns {Promise<void>}
*/
async stop() {
this.response?.write("Finished, please refresh this page.\n");
this.response?.end();
await this.server?.close();
}
}
module.exports = {
SimpleMigrationServer,
};

View file

@ -1051,9 +1051,5 @@
"Client ID": "ID klienta",
"Client Secret": "Tajemství klienta",
"OAuth Scope": "OAuth rozsah",
"Optional: Space separated list of scopes": "Volitelné: seznam rozsahů oddělte mezerami",
"Debug": "Ladění",
"CopyToClipboardError": "Nelze zkopírovat do schránky: {error}",
"ignoredTLSError": "Chyby TLS/SSL byly ignorovány",
"Copy": "Kopírovat"
"Optional: Space separated list of scopes": "Volitelné: seznam rozsahů oddělte mezerami"
}

View file

@ -1088,14 +1088,5 @@
"ignoredTLSError": "TLS/SSL hataları göz ardı edildi",
"CurlDebugInfo": "Monitörü hata ayıklamak için, bunu kendi makinenizin terminaline veya uptime kuma'nın çalıştığı makinenin terminaline yapıştırabilir ve ne istediğinizi görebilirsiniz.{newiline}Lütfen {firewalls}, {dns_resolvers} veya {docker_networks} gibi ağ farklılıklarına dikkat edin.",
"Time sensitive notifications will be delivered immediately, even if the device is in do not disturb mode.": "Cihaz rahatsız etmeyin modunda olsa bile, zaman açısından hassas bildirimler anında iletilecek.",
"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Cevap alabilmek istiyorsanız E.164 formatında bir kısa mesaj gönderici kimliği veya bir telefon numarası.",
"rabbitmqNodesRequired": "Lütfen bu monitör için sunucuları ayarlayın.",
"rabbitmqNodesInvalid": "Lütfen RabbitMQ düğümleri için tam nitelikli ('http' ile başlayan) bir URL kullanın.",
"RabbitMQ Username": "RabbitMQ Kullanıcı Adı",
"RabbitMQ Password": "RabbitMQ Şifresi",
"SendGrid API Key": "SendGrid API Anahtarı",
"Separate multiple email addresses with commas": "Birden fazla e-posta adresini virgülle ayırın",
"RabbitMQ Nodes": "RabbitMQ Yönetim Sunucuları",
"rabbitmqNodesDescription": "Protokol ve port dahil olmak üzere RabbitMQ yönetim düğümleri için URL'yi girin. Örnek: {0}",
"rabbitmqHelpText": "Monitörü kullanmak için, RabbitMQ kurulumunuzda Yönetim Eklentisini etkinleştirmeniz gerekecektir. Daha fazla bilgi için lütfen {rabitmq_documentation}'a bakın."
"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Cevap alabilmek istiyorsanız E.164 formatında bir kısa mesaj gönderici kimliği veya bir telefon numarası."
}