Liu Song’s Projects


~/Projects/uptime

git clone https://code.lsong.org/uptime

Commit

Commit
fe4724fc538dcc6c2aa0743744d8269317f5367a
Author
Louis Lam <[email protected]>
Date
2021-10-26 12:25:07 +0800 +0800
Diffstat
 .github/PULL_REQUEST_TEMPLATE.md | 23 +++++++
 .github/workflows/auto-test.yml | 2 
  | 0 
 CONTRIBUTING.md | 27 ++++++++
 extra/download-dist.js | 10 +-
 src/languages/de-DE.js | 108 ++++++++++++++++++++++++++++++++++
 src/languages/pl.js | 4 

Merge branch 'master' into feat/chart-period


diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000000000000000000000000000000000000..be2caa0913fb1ae1eecea76199faaa86eaf00a5d
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,23 @@
+# Description
+
+Fixes #(issue)
+
+## Type of change
+
+- [ ] Bug fix (non-breaking change which fixes an issue)
+- [ ] User Interface
+- [ ] New feature (non-breaking change which adds functionality)
+- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
+- [ ] Translation update
+- [ ] This change requires a documentation update
+
+## Checklist
+
+- [ ] My code follows the style guidelines of this project
+- [ ] I ran ESLint and other linters for modified files
+- [ ] I have performed a self-review of my own code and test it
+- [ ] I have commented my code, particularly in hard-to-understand areas
+- [ ] My changes generate no new warnings
+- [ ] My code needed automated testing. I have added them
+
+## Screenshots (if any)




diff --git a/.github/workflows/auto-test.yml b/.github/workflows/auto-test.yml
index c59a61b91cdd13269f5940be135ec534baa30696..e01c02cee98ad7dfc0b82be349a593efef007534 100644
--- a/.github/workflows/auto-test.yml
+++ b/.github/workflows/auto-test.yml
@@ -16,7 +16,7 @@
     strategy:
       matrix:
         os: [macos-latest, ubuntu-latest, windows-latest]
-        node-version: [14.x, 16.x]
+        node-version: [14.x, 16.x, 17.x]
         # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
 
     steps:




diff --git a/.github/workflows/stale-bot b/.github/workflows/stale-bot
deleted file mode 100644
index 5dc501369a242400d9bce41ae37d9e39cadd195e..0000000000000000000000000000000000000000
--- a/.github/workflows/stale-bot
+++ /dev/null
@@ -1,22 +0,0 @@
-name: 'Automatically close stale issues and PRs'
-on:
-  schedule:
-    - cron: '0 0 * * *'
-#Run once a day at midnight 
-
-jobs:
-  stale:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/stale@v4
-        with:
-          stale-issue-message: 'We are clearing up our old issues and your ticket has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 7 days.'
-          stale-pr-message: 'We are clearing up our old Pull Requests and yours has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 7 days.'
-          close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
-          close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
-          days-before-stale: 180
-          days-before-close: 7
-          exempt-issue-labels: 'News,Medium,High,discussion,bug,doc,'
-          exempt-pr-labels: 'awaiting-approval,work-in-progress,enhancement,'
-          exempt-issue-assignees: 'louislam'
-          exempt-pr-assignees: 'louislam'




diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml
new file mode 100644
index 0000000000000000000000000000000000000000..5dc501369a242400d9bce41ae37d9e39cadd195e
--- /dev/null
+++ b/.github/workflows/stale-bot.yml
@@ -0,0 +1,22 @@
+name: 'Automatically close stale issues and PRs'
+on:
+  schedule:
+    - cron: '0 0 * * *'
+#Run once a day at midnight 
+
+jobs:
+  stale:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/stale@v4
+        with:
+          stale-issue-message: 'We are clearing up our old issues and your ticket has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 7 days.'
+          stale-pr-message: 'We are clearing up our old Pull Requests and yours has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 7 days.'
+          close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
+          close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
+          days-before-stale: 180
+          days-before-close: 7
+          exempt-issue-labels: 'News,Medium,High,discussion,bug,doc,'
+          exempt-pr-labels: 'awaiting-approval,work-in-progress,enhancement,'
+          exempt-issue-assignees: 'louislam'
+          exempt-pr-assignees: 'louislam'




diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1d9b37a3cc4024a67abd1a21e7251d9b055f7dba..e521b6c19e0e9fa89d933291da65da01bcbf0faf 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,17 +29,36 @@ ## Can I create a pull request for Uptime Kuma?
 
 Generally, if the pull request is working fine and it do not affect any existing logic, workflow and perfomance, I will merge into the master branch once it is tested.
 
+# Project Info
 
+The project was created with vite.js (vue3). Then I created a sub-directory called "server" for server part. Both frontend and backend share the same package.json.
+
+
+### Recommended Pull Request Guideline
+
+1. Fork the project
+1. Clone your fork repo to local
+1. Create a new branch
+1. Create an empty commit
+   `git commit -m "[empty commit] pull request for <YOUR TASK NAME>" --allow-empty`
+1. Push to your fork repo
+1. Create a pull request: https://github.com/louislam/uptime-kuma/compare   
+## Directories
 First of all, thank you everyone who made pull requests for Uptime Kuma, I never thought GitHub Community can be that nice! And also because of this, I also never thought other people actually read my code and edit my code. It is not structed and commented so well, lol. Sorry about that.
 
 ### Pull Request Examples
 
+Here are some example situations in the past.
+
 #### ✅ High - Medium Priority
 
+Easy to review, no breaking change and not touching the existing code
+
 - Add a new notification
 - Add a chart
 - Fix a bug
 - Translations
+- Add a independent new feature
 
 #### *️⃣ Requires one more reviewer
 
@@ -47,6 +66,13 @@ I do not have such knowledge to test it.
 
 - Add k8s supports
 
+#### ⚠ Low Priority - Harsh Mode
+
+Some pull requests are required to modifiy the core. To be honest, I do not want anyone to try to do that, because it would spend a lot of your time and my time. I will review your pull request harshly. Also you may need to write a lot of unit tests to ensure that there is no breaking change.
+
+- Touch large parts of code of any very important features of Uptime Kuma  
+- Drop a table or drop a column for any reason
+
 #### *️⃣ Low Priority
 
 It changed my current workflow and require further studies.
@@ -55,6 +81,7 @@ - Change my release approach
 
 #### ❌ Won't Merge
 
+- Any breaking changes
 - Duplicated pull request
 - Buggy
 - Existing logic is completely modified or deleted




diff --git a/extra/download-dist.js b/extra/download-dist.js
index 0a08b7f90088c83d54b3dc7adad4429970b02cd6..dc64166c4e173a7b724d588cb697234725b9d062 100644
--- a/extra/download-dist.js
+++ b/extra/download-dist.js
@@ -34,11 +34,13 @@                 cwd: "./",
             });
 
             tarStream.on("close", () => {
-const https = require("https");
+                if (fs.existsSync("./dist-backup")) {
+console.log("Downloading dist");
 const filename = "dist.tar.gz";
-const https = require("https");
+console.log("Downloading dist");
 const url = `https://github.com/louislam/uptime-kuma/releases/download/${version}/${filename}`;
-const tar = require("tar");
+const https = require("https");
+                }
                 console.log("Done");
             });
 
@@ -46,7 +48,7 @@             tarStream.on("error", () => {
                 if (fs.existsSync("./dist-backup")) {
                     fs.renameSync("./dist-backup", "./dist");
                 }
-                console.log("Done");
+                console.error("Error from tarStream");
             });
 
             response.pipe(tarStream);




diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js
index 5e69899d8f5914742db7b8232c65dc65e56d36c1..740c88523dee6325cbe41348ca70c67997539d30 100644
--- a/src/languages/de-DE.js
+++ b/src/languages/de-DE.js
@@ -198,3 +198,111 @@     pushbullet: "Pushbullet",
     line: "Line Messenger",
     mattermost: "Mattermost",
     Pause: "Pausieren",
+export default {
+    "Push URL": "Push URL",
+    needPushEvery: "Du solltest diese URL alle {0} Sekunden aufrufen.",
+    pushOptionalParams: "Optionale Parameter: {0}",
+    defaultNotificationName: "Meine {notification} Alarm ({number})",
+    here: "hier",
+    Required: "Erforderlich",
+    "Bot Token": "Bot Token",
+    wayToGetTelegramToken: "Hier kannst du einen Token erhalten {0}.",
+    "Chat ID": "Chat ID",
+    supportTelegramChatID: "Unterstützt Direkt Chat / Gruppe / Kanal Chat-ID's",
+    wayToGetTelegramChatID: "Du kannst die Chat-ID erhalten, indem du eine Nachricht an den Bot sendest und zu dieser URL gehst, um die chat_id: zu sehen.",
+    "YOUR BOT TOKEN HERE": "HIER DEIN BOT TOKEN",
+    chatIDNotFound: "Chat-ID wurde nicht gefunden: bitte sende zuerst eine Nachricht an diesen Bot",
+    "Post URL": "Post URL",
+    "Content Type": "Content Type",
+    webhookJsonDesc: "{0} ist gut für alle modernen HTTP-Server sowie Express.js",
+    webhookFormDataDesc: "{multipart} ist gut für PHP. Die JSON muss mit {decodeFunction} geparst werden",
+    secureOptionNone: "Keine / STARTTLS (25, 587)",
+    secureOptionTLS: "TLS (465)",
+    "Ignore TLS Error": "TLS-Fehler ignorieren",
+    "From Email": "Von Email",
+    emailCustomSubject: "Benutzerdefinierter Betreff",
+    "To Email": "Zu Email",
+    smtpCC: "CC",
+    smtpBCC: "BCC",
+    "Discord Webhook URL": "Discord Webhook URL",
+    wayToGetDiscordURL: "Du kannst diesen erhalten, indem du zu den Servereinstellungen gehst -> Integrationen -> Neuer Webhook",
+    "Bot Display Name": "Bot-Anzeigename",
+    "Prefix Custom Message": "Benutzerdefinierter Nachrichten Präfix",
+    "Hello @everyone is...": "Hallo {'@'}everyone ist...",
+    "Webhook URL": "Webhook URL",
+    wayToGetTeamsURL: "Hier erfährst du, wie eine Webhook-URL erstellt werden kann {0}.",
+    Number: "Nummer",
+    Recipients: "Empfänger",
+    needSignalAPI: "Es wird ein Signal Client mit REST-API benötigt.",
+    wayToCheckSignalURL: "Du kannst diese URL aufrufen, um zu sehen, wie du eine einrichtest:",
+    signalImportant: "WICHTIG: Gruppen und Nummern können in Empfängern nicht gemischt werden!",
+    "Application Token": "Anwendungs Token",
+    "Server URL": "Server URL",
+    Priority: "Priorität",
+    "Icon Emoji": "Icon Emoji",
+    "Channel Name": "Kanalname",
+    "Uptime Kuma URL": "Uptime Kuma URL",
+    aboutWebhooks: "Weitere Informationen zu Webhooks auf: {0}",
+    aboutChannelName: "Gebe den Kanalnamen ein auf {0} Feld Kanalname, wenn du den Webhook-Kanal umgehen möchtest. Ex: #other-channel",
+    aboutKumaURL: "Wenn das Feld für die Uptime Kuma URL leer gelassen wird, wird es standardmäßig die GitHub Projekt Seite verwenden.",
+    emojiCheatSheet: "Emoji Cheat Sheet: {0}",
+    "User Key": "Benutzerschlüssel",
+    Device: "Gerät",
+    "Message Title": "Nachrichtentitel",
+    "Notification Sound": "Benachrichtigungston",
+    "More info on:": "Mehr Infos auf: {0}",
+    pushoverDesc1: "Notfallpriorität (2) hat Standardmäßig 30 Sekunden Auszeit, zwischen den Versuchen und läuft nach 1 Stunde ab.",
+    pushoverDesc2: "Fülle das Geräte Feld aus, wenn du Benachrichtigungen an verschiedene Geräte senden möchtest.",
+    "SMS Type": "SMS Typ",
+    octopushTypePremium: "Premium (Schnell - zur Benachrichtigung empfohlen)",
+    octopushTypeLowCost: "Kostengünstig (Langsam - manchmal vom Betreiber gesperrt)",
+    checkPrice: "Prüfe {0} Preise:",
+    octopushLegacyHint: "Verwendest du die Legacy-Version von Octopush (2011-2020) oder die neue Version?",
+    "Check octopush prices": "Überprüfe die Oktopush Preise {0}.",
+    octopushPhoneNumber: "Telefonnummer (Internationales Format, z.B : +49612345678) ",
+    octopushSMSSender: "Name des SMS-Absenders : 3-11 alphanumerische Zeichen und Leerzeichen (a-zA-Z0-9)",
+    "LunaSea Device ID": "LunaSea Geräte ID",
+    "Apprise URL": "Apprise URL",
+    "Example:": "Beispiel: {0}",
+    "Read more:": "Weiterlesen: {0}",
+    "Status:": "Status: {0}",
+    "Read more": "Weiterlesen",
+    appriseInstalled: "Apprise ist installiert.",
+    appriseNotInstalled: "Apprise ist nicht installiert. {0}",
+    "Access Token": "Access Token",
+    "Channel access token": "Channel access token",
+    "Line Developers Console": "Line Developers Console",
+    lineDevConsoleTo: "Line Developers Console - {0}",
+    "Basic Settings": "Basic Settings",
+    "User ID": "User ID",
+    "Messaging API": "Messaging API",
+    wayToGetLineChannelToken: "Rufe zuerst {0} auf, erstelle dann einen Provider und Channel (Messaging API). Als nächstes kannst du den Channel access token und die User ID aus den oben genannten Menüpunkten abrufen.",
+    "Icon URL": "Icon URL",
+    aboutIconURL: "Du kannst einen Link zu einem Bild in 'Icon URL' übergeben um das Standardprofilbild zu überschreiben. Wird nicht verwendet, wenn ein Icon Emoji gesetzt ist.",
+    aboutMattermostChannelName: "Du kannst den Standardkanal, auf dem der Webhook postet überschreiben, indem der Kanalnamen in das Feld 'Channel Name' eingeben wird. Dies muss in den Mattermost Webhook-Einstellungen aktiviert werden. Ex: #other-channel",
+    matrix: "Matrix",
+    promosmsTypeEco: "SMS ECO - billig, aber langsam und oft überladen. Nur auf polnische Empfänger beschränkt.",
+    promosmsTypeFlash: "SMS FLASH - Die Nachricht wird automatisch auf dem Empfängergerät angezeigt. Nur auf polnische Empfänger beschränkt.",
+    promosmsTypeFull: "SMS FULL - Premium Stufe von SMS, es kann der Absendernamen verwendet werden (Der Name musst zuerst registriert werden). Zuverlässig für Warnungen.",
+    promosmsTypeSpeed: "SMS SPEED - Höchste Priorität im System. Sehr schnell und zuverlässig, aber teuer (Ungefähr das doppelte von SMS FULL).",
+    promosmsPhoneNumber: "Phone number (Für polnische Empfänger können die Vorwahlen übersprungen werden)",
+    promosmsSMSSender: "Name des SMS-Absenders : vorregistrierter Name oder einer der Standardwerte: InfoSMS, SMS Info, MaxSMS, INFO, SMS",
+    "Feishu WebHookUrl": "Feishu Webhook URL",
+    matrixHomeserverURL: "Heimserver URL (mit http(s):// und optionalen Ports)",
+    "Internal Room Id": "Interne Raum-ID",
+    matrixDesc1: "Die interne Raum-ID findest du im erweiterten Bereich der Raumeinstellungen im Matrix-Client. Es sollte es aussehen wie z.B. !QMdRCpUIfLwsfjxye6:home.server.",
+    matrixDesc2: "Es wird dringend empfohlen, dass ein neuen Benutzer erstellt wird und nicht den Zugriffstoken deines eigenen Matrix-Benutzers verwendest. Anderfalls ermöglicht es vollen Zugriff auf dein Konto und alle Räume, denen du beigetreten bist. Erstelle stattdessen einen neuen Benutzer und lade ihn nur in den Raum ein, in dem du die Benachrichtigung erhalten möchtest. Du kannst den Zugriffstoken erhalten, indem du folgendes ausführst {0}",
+    Method: "Method",
+    Body: "Body",
+    Headers: "Headers",
+    PushUrl: "Push URL",
+    HeadersInvalidFormat: "Die Header ist kein gültiges JSON: ",
+    BodyInvalidFormat: "Der Body ist kein gültiges JSON: ",
+    "Monitor History": "Monitor Verlauf:",
+    clearDataOlderThan: "Bewahre die Monitor-Verlaufsdaten für {0} Tage auf.",
+    PasswordsDoNotMatch: "Passwörter stimmen nicht überein.",
+    records: "Einträge",
+    "One record": "Ein Eintrag",
+    "Showing {from} to {to} of {count} records": "Zeige {from} zu {to} von {count} Einträge",
+    steamApiKeyDescription: "Um einen Steam Game Server zu überwachen, wird ein Steam Web-API-Schlüssel benötigt. Dieser kann hier registriert werden: ",
+    Pause: "Pausieren",




diff --git a/src/languages/pl.js b/src/languages/pl.js
index 2861ed0f89cb32e5f32f413d6b557ad3bbab06e0..d2dbc36e98092944abcf92bf6456a92c122e14a4 100644
--- a/src/languages/pl.js
+++ b/src/languages/pl.js
@@ -272,9 +272,9 @@     "Messaging API": "API Wiadomości",
     wayToGetLineChannelToken: "Najpierw uzyskaj dostęp do {0}, utwórz dostawcę i kanał (Messaging API), a następnie możesz uzyskać token dostępu do kanału i identyfikator użytkownika z wyżej wymienionych pozycji menu.",
     "Icon URL": "Adres Ikony",
     languageName: "Polski",
-    Advanced: "Zaawansowane",
+    "Theme - Heartbeat Bar": "Motyw - pasek bicia serca",
     languageName: "Polski",
-    "Upside Down Mode": "Tryb odwrócony",
+    Normal: "Domyślne",
     "matrix": "Matrix",
     promosmsTypeEco: "SMS ECO - Tanie, lecz wolne. Dostępne tylko w Polsce",
     promosmsTypeFlash: "SMS FLASH - Wiadomość automatycznie wyświetli się na urządzeniu. Dostępne tylko w Polsce.",