From dc805cff975d16145fb56c7783f1665c1f8c1d11 Mon Sep 17 00:00:00 2001 From: Phuong Nguyen Minh <73861816+mrphuongbn@users.noreply.github.com> Date: Wed, 13 Oct 2021 13:36:09 +0700 Subject: [PATCH 001/125] Add files via upload --- src/languages/vi.js | 285 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 src/languages/vi.js diff --git a/src/languages/vi.js b/src/languages/vi.js new file mode 100644 index 000000000..dab84c790 --- /dev/null +++ b/src/languages/vi.js @@ -0,0 +1,285 @@ +export default { + languageName: "Vietnamese", + checkEverySecond: "Kiểm tra mỗi {0} giây.", + retryCheckEverySecond: "Thử lại mỗi {0} giây.", + retriesDescription: "Số lần thử lại tối đa trước khi dịch vụ được đánh dấu là down và gửi thông báo.", + ignoreTLSError: "Bỏ qua lỗi TLS/SSL với các web HTTPS.", + upsideDownModeDescription: "Trạng thái đảo ngược, nếu dịch vụ có thể truy cập được nghĩa là DOWN.", + maxRedirectDescription: "Số lần chuyển hướng (redirect) tối đa. Đặt thành 0 để tắt chuyển hướng", + acceptedStatusCodesDescription: "Chọn mã code trạng thái được coi là phản hồi thành công.", + passwordNotMatchMsg: "Mật khẩu nhập lại không khớp.", + notificationDescription: "Vui lòng chỉ định một kênh thông báo.", + keywordDescription: "Từ khoá tìm kiếm phản hồi ở dạng html hoặc JSON, có phân biệt chữ HOA - thường", + pauseDashboardHome: "Tạm dừng", + deleteMonitorMsg: "Bạn chắc chắn muốn xóa monitor này chứ?", + deleteNotificationMsg: "Bạn có chắc chắn muốn xóa kênh thông báo này cho tất cả monitor?", + resoverserverDescription: "Cloudflare là máy chủ mặc định, bạn có thể thay đổi bất cứ lúc nào.", + rrtypeDescription: "Hãy chọn RR-Type mà bạn muốn giám sát", + pauseMonitorMsg: "Bạn chắc chắn muốn tạm dừng chứ?", + enableDefaultNotificationDescription: "Bật làm mặc định cho mọi monitor mới về sau. Bạn vẫn có thể tắt thông báo riêng cho từng monitor.", + clearEventsMsg: "Bạn chắc chắn muốn xoá TẤT CẢ sự kiện cho monitor này chứ?", + clearHeartbeatsMsg: "Bạn chắc chắn muốn xoá TẤT CẢ heartbeats cho monitor này chứ?", + confirmClearStatisticsMsg: "Bạn chắc chắn muốn xoá TẤT CẢ số liệu thống kê?", + importHandleDescription: "Chọn 'Skip existing' nếu bạn muốn bỏ qua mọi monitor và kênh thông báo trùng tên. 'Overwrite' sẽ ghi đè lên tất cả các monitor và kênh thông báo.", + confirmImportMsg: "Bạn có chắc chắn muốn khôi phục bản bản sao lưu này không?.", + twoFAVerifyLabel: "Vui lòng nhập mã token của bạn để xác minh rằng 2FA đang hoạt động", + tokenValidSettingsMsg: "Mã token hợp lệ! Bạn có thể lưu cài đặt 2FA bây giờ.", + confirmEnableTwoFAMsg: "Bạn chắc chắn muốn bật 2FA chứ?", + confirmDisableTwoFAMsg: "Bạn chắc chắn muốn tắt 2FA chứ?", + Settings: "Cài đặt", + Dashboard: "Dashboard", + "New Update": "Bản cập nhật mới", + Language: "Ngôn ngữ", + Appearance: "Giao diện", + Theme: "Theme", + General: "Chung", + Version: "Phiên bản", + "Check Update On GitHub": "Kiểm tra bản cập nhật mới trên GitHub", + List: "List", + Add: "Thêm", + "Add New Monitor": "Thêm mới Monitor", + "Quick Stats": "Thống kê nhanh", + Up: "Lên", + Down: "Xuống", + Pending: "Chờ xử lý", + Unknown: "Không xác định", + Pause: "Tạm dừng", + Name: "Tên", + Status: "Trạng thái", + DateTime: "Ngày tháng", + Message: "Tin nhắn", + "No important events": "Không có sự kiện quan trọng nào", + Resume: "Khôi phục", + Edit: "Sửa", + Delete: "Xoá", + Current: "Hiện tại", + Uptime: "Uptime", + "Cert Exp.": "Cert hết hạn", + days: "ngày", + day: "ngày", + "-day": "-ngày", + hour: "giờ", + "-hour": "-giờ", + Response: "Phản hồi", + Ping: "Ping", + "Monitor Type": "Kiểu monitor", + Keyword: "Từ khoá", + "Friendly Name": "Tên dễ hiểu", + URL: "URL", + Hostname: "Hostname", + Port: "Port", + "Heartbeat Interval": "Tần suất heartbeat", + Retries: "Thử lại", + "Heartbeat Retry Interval": "Tần suất thử lại của Heartbeat", + Advanced: "Nâng cao", + "Upside Down Mode": "Trạng thái đảo ngược", + "Max. Redirects": "Chuyển hướng tối đa", + "Accepted Status Codes": "Codes trạng thái chấp nhận", + Save: "Lưu", + Notifications: "Thông báo", + "Not available, please setup.": "Chưa sẵn sàng, hãy cài đặt.", + "Setup Notification": "Cài đặt thông báo", + Light: "Sáng", + Dark: "Tối", + Auto: "Tự động", + "Theme - Heartbeat Bar": "Theme - Heartbeat Bar", + Normal: "Bình thường", + Bottom: "Dưới", + None: "Không có", + Timezone: "Múi giờ", + "Search Engine Visibility": "Hiển thị với các công cụ tìm kiếm", + "Allow indexing": "Cho phép indexing", + "Discourage search engines from indexing site": "Ngăn chặn các công cụ tìm kiếm indexing trang", + "Change Password": "Thay đổi mật khẩu", + "Current Password": "Mật khẩu hiện tại", + "New Password": "Mật khẩu mới", + "Repeat New Password": "Lặp lại mật khẩu mới", + "Update Password": "Cập nhật mật khẩu", + "Disable Auth": "Tắt xác minh", + "Enable Auth": "Bật xác minh", + Logout: "Đăng xuất", + Leave: "Rời", + "I understand, please disable": "Tôi hiểu, làm ơn hãy tắt!", + Confirm: "Xác nhận", + Yes: "Có", + No: "Không", + Username: "Tài khoản", + Password: "Mật khẩu", + "Remember me": "Lưu phiên đăng nhập", + Login: "Đăng nhập", + "No Monitors, please": "Không có monitor nào", + "add one": "Thêm mới", + "Notification Type": "Kiểu thông báo", + Email: "Email", + Test: "Thử", + "Certificate Info": "Thông tin Certificate", + "Resolver Server": "Máy chủ Resolver", + "Resource Record Type": "Loại bản ghi", + "Last Result": "Kết quả cuối cùng", + "Create your admin account": "Tạo tài khoản quản trị", + "Repeat Password": "Lặp lại mật khẩu", + "Import Backup": "Khôi phục bản sao lưu", + "Export Backup": "Xuất bản sao lưu", + Export: "Xuất", + Import: "Khôi phục", + respTime: "Thời gian phản hồi (ms)", + notAvailableShort: "N/A", + "Default enabled": "Mặc định bật", + "Apply on all existing monitors": "Áp dụng cho tất cả monitor đang có", + Create: "Tạo", + "Clear Data": "Xoá dữ liệu", + Events: "Sự kiện", + Heartbeats: "Heartbeats", + "Auto Get": "Tự động lấy", + backupDescription: "Bạn có thể sao lưu tất cả các màn hình và tất cả các thông báo vào một file JSON.", + backupDescription2: "PS: Không bao gồm dữ liệu lịch sử các sự kiện.", + backupDescription3: "Hãy lưu giữ file này cẩn thận vì trong file đó chứa cả các mã token thông báo.", + alertNoFile: "Hãy chọn file để khôi phục.", + alertWrongFileType: "Hãy chọn file JSON.", + "Clear all statistics": "Xoá tất cả thống kê", + "Skip existing": "Skip existing", + Overwrite: "Ghi đè", + Options: "Tuỳ chọn", + "Keep both": "Giữ lại cả hai", + "Verify Token": "Xác minh Token", + "Setup 2FA": "Cài đặt 2FA", + "Enable 2FA": "Bật 2FA", + "Disable 2FA": "Tắt 2FA", + "2FA Settings": "Cài đặt 2FA", + "Two Factor Authentication": "Xác thực hai yếu tố", + Active: "Hoạt động", + Inactive: "Ngừng hoạt động", + Token: "Token", + "Show URI": "Hiển thị URI", + Tags: "Tags", + "Add New below or Select...": "Thêm mới ở dưới hoặc Chọn...", + "Tag with this name already exist.": "Tag với tên đã tồn tại.", + "Tag with this value already exist.": "Tag với value đã tồn tại.", + color: "Màu sắc", + "value (optional)": "Value (tuỳ chọn)", + Gray: "Xám", + Red: "Đỏ", + Orange: "Cam", + Green: "Xanh lá", + Blue: "Xanh da trời", + Indigo: "Chàm", + Purple: "Tím", + Pink: "Hồng", + "Search...": "Tìm kiếm...", + "Avg. Ping": "Ping Trung bình", + "Avg. Response": "Phản hồi trung bình", + "Entry Page": "Entry Page", + statusPageNothing: "Không có gì, hãy thêm nhóm monitor hoặc monitor.", + "No Services": "Không có dịch vụ", + "All Systems Operational": "Tất cả các hệ thống hoạt động", + "Partially Degraded Service": "Dịch vụ xuống cấp một phần", + "Degraded Service": "Degraded Service", + "Add Group": "Thêm nhóm", + "Add a monitor": "Thêm monitor", + "Edit Status Page": "Sửa trang trạng thái", + "Go to Dashboard": "Đi tới Dashboard", + "Status Page": "Trang trạng thái", + // Start notification form + defaultNotificationName: "My {notification} Alerts ({number})", + here: "tại đây", + "Required": "Bắt buộc", + "telegram": "Telegram", + "Bot Token": "Bot Token", + "You can get a token from": "Bạn có thể lấy mã token từ", + "Chat ID": "Chat ID", + supportTelegramChatID: "Hỗ trợ chat trực tiếp / Nhóm / Kênh Chat ID", + wayToGetTelegramChatID: "Bạn có thể lấy chat id của mình bằng cách gửi tin nhắn tới bot và truy cập url này để xem chat_id:", + "YOUR BOT TOKEN HERE": "MÃ BOT TOKEN CỦA BẠN", + chatIDNotFound: "Không tìm thấy Chat ID, vui lòng gửi tin nhắn cho bot này trước", + "webhook": "Webhook", + "Post URL": "URL đăng", + "Content Type": "Loại nội dung", + webhookJsonDesc: "{0} phù hợp với bất kỳ máy chủ http hiện đại nào như express.js", + webhookFormDataDesc: "{multipart} phù hợp với PHP, bạn chỉ cần phân tích cú pháp json bằng {decodeFunction}", + "smtp": "Email (SMTP)", + secureOptionNone: "None / STARTTLS (25, 587)", + secureOptionTLS: "TLS (465)", + "Ignore TLS Error": "Bỏ qua lỗi TLS", + "From Email": "Từ Email", + "To Email": "Tới Email", + smtpCC: "CC", + smtpBCC: "BCC", + "discord": "Discord", + "Discord Webhook URL": "Discord Webhook URL", + wayToGetDiscordURL: "Để lấy Discord, hãy vào: Server Settings -> Integrations -> Create Webhook", + "Bot Display Name": "Tên hiển thị của Bot", + "Prefix Custom Message": "Tiền tố tin nhắn tuỳ chọn", + "Hello @everyone is...": "Xin chào {'@'} mọi người đang...", + "teams": "Microsoft Teams", + "Webhook URL": "Webhook URL", + wayToGetTeamsURL: "Bạn có thể học cách tạo webhook url {0}.", + "signal": "Signal", + "Number": "Số", + "Recipients": "Người nhận", + needSignalAPI: "Bạn cần một tín hiệu client với REST API.", + wayToCheckSignalURL: "Bạn có thể kiểm tra url này để xem cách thiết lập:", + signalImportant: "QUAN TRỌNG: Bạn không thể kết hợp các nhóm và số trong người nhận!", + "gotify": "Gotify", + "Application Token": "Mã Token ứng dụng", + "Server URL": "URL máy chủ", + "Priority": "Mức ưu tiên", + "slack": "Slack", + "Icon Emoji": "Icon Emoji", + "Channel Name": "Tên Channel", + "Uptime Kuma URL": "Uptime Kuma URL", + aboutWebhooks: "Thông tin thêm về webhook trên: {0}", + aboutChannelName: "Nhập tên kênh trên {0} trường Channel Name nếu bạn muốn bỏ qua kênh webhook. vd: #other-channel", + aboutKumaURL: "Nếu bạn để trống trường Uptime Kuma URL, mặc định sẽ là trang Project Github.", + emojiCheatSheet: "Bảng tra cứu Emoji: {0}", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + promosms: "PromoSMS", + lunasea: "LunaSea", + apprise: "Thông báo (Hỗ trợ 50+ dịch vụ thông báo)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", + "User Key": "User Key", + "Device": "Thiết bị", + "Message Title": "Tiêu đề tin nhắn", + "Notification Sound": "Âm thanh thông báo", + "More info on:": "Thông tin chi tiết tại: {0}", + pushoverDesc1: "Mức ưu tiên khẩn cấp (2) có thời gian chờ mặc định là 30 giây giữa các lần thử lại và sẽ hết hạn sau 1 giờ.", + pushoverDesc2: "Nếu bạn muốn gửi thông báo đến các thiết bị khác nhau, hãy điền vào trường Thiết bị.", + "SMS Type": "SMS Type", + octopushTypePremium: "Premium (Nhanh - Khuyến nghị nên dùng cho cảnh báo)", + octopushTypeLowCost: "Giá rẻ (Chậm, thỉnh thoảng bị chặn)", + "Check octopush prices": "Kiểm tra giá octopush {0}.", + octopushPhoneNumber: "Số điện thoại (Định dạng intl, vd : +33612345678) ", + octopushSMSSender: "SMS người gửi : 3-11 ký tự chữ, số và dấu cách (a-zA-Z0-9)", + "LunaSea Device ID": "LunaSea ID thiết bị", + "Apprise URL": "URL thông báo", + "Example:": "Ví dụ: {0}", + "Read more:": "Đọc thêm: {0}", + "Status:": "Trạng thái: {0}", + "Read more": "Đọc thêm", + appriseInstalled: "Đã cài đặt Thông báo.", + appriseNotInstalled: "Chưa cài đặt Thông báo. {0}", + "Access Token": "Token truy cập", + "Channel access token": "Token kênh truy cập", + "Line Developers Console": "Line Developers Console", + lineDevConsoleTo: "Line Developers Console - {0}", + "Basic Settings": "Cài đặt cơ bản", + "User ID": "User ID", + "Messaging API": "Messaging API", + wayToGetLineChannelToken: "Trước tiên, hãy truy cập {0},tạo nhà cung cấp và kênh (Messaging API), sau đó bạn có thể nhận mã token truy cập kênh và id người dùng từ các mục menu được đề cập ở trên.", + "Icon URL": "Icon URL", + aboutIconURL: "Bạn có thể cung cấp liên kết đến ảnh trong \"Icon URL\" để ghi đè ảnh hồ sơ mặc định. Sẽ không được sử dụng nếu Biểu tượng cảm xúc được thiết lập.", + aboutMattermostChannelName: "Bạn có thể ghi đè kênh mặc định mà webhook đăng lên bằng cách nhập tên kênh vào trường \"Channel Name\". Điều này cần được bật trong cài đặt Mattermost webhook. Ví dụ: #other-channel", + "matrix": "Matrix", + promosmsTypeEco: "SMS ECO - rẻ nhưng chậm và thường xuyên quá tải. Chỉ dành cho người Ba Lan.", + promosmsTypeFlash: "SMS FLASH - Tin nhắn sẽ tự động hiển thị trên thiết bị của người nhận. Chỉ dành cho người Ba Lan.", + promosmsTypeFull: "SMS FULL - SMS cao cấp, Bạn có thể sử dụng Tên Người gửi (Bạn cần đăng ký tên trước). Đáng tin cậy cho các cảnh báo.", + promosmsTypeSpeed: "SMS SPEED - Ưu tiên cao nhất trong hệ thống. Rất nhanh chóng và đáng tin cậy nhưng tốn kém, (giá gấp đôi SMS FULL).", + promosmsPhoneNumber: "Số điện thoại (Bỏ qua mã vùng với người Ba Lan)", + promosmsSMSSender: "SMS Tên người gửi: Tên đã đăng ký trước hoặc tên mặc định: InfoSMS, SMS Info, MaxSMS, INFO, SMS", + "Feishu WebHookUrl": "Feishu WebHookUrl", + // End notification form +}; \ No newline at end of file From 89c0f8b7349d173ba262709ef8138cf3be057009 Mon Sep 17 00:00:00 2001 From: Phuong Nguyen Minh <73861816+mrphuongbn@users.noreply.github.com> Date: Wed, 13 Oct 2021 13:44:31 +0700 Subject: [PATCH 002/125] Update i18n.js --- src/i18n.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/i18n.js b/src/i18n.js index b95e32d00..7f55a0610 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -21,9 +21,11 @@ import sr from "./languages/sr"; import srLatn from "./languages/sr-latn"; import svSE from "./languages/sv-SE"; import trTR from "./languages/tr-TR"; +import vi from "./languages/vi"; import zhCN from "./languages/zh-CN"; import zhHK from "./languages/zh-HK"; + const languageList = { en, "zh-HK": zhHK, @@ -49,6 +51,7 @@ const languageList = { "zh-CN": zhCN, "pl": pl, "et-EE": etEE, + "vi": vi, }; const rtlLangs = ["fa"]; From bda481c61eb603a8a7fe5bfd980ea129804978a5 Mon Sep 17 00:00:00 2001 From: Phuong Nguyen Minh <73861816+mrphuongbn@users.noreply.github.com> Date: Fri, 15 Oct 2021 08:26:33 +0700 Subject: [PATCH 003/125] Update vi.js --- src/languages/vi.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/languages/vi.js b/src/languages/vi.js index dab84c790..c47ebe024 100644 --- a/src/languages/vi.js +++ b/src/languages/vi.js @@ -255,13 +255,13 @@ export default { octopushPhoneNumber: "Số điện thoại (Định dạng intl, vd : +33612345678) ", octopushSMSSender: "SMS người gửi : 3-11 ký tự chữ, số và dấu cách (a-zA-Z0-9)", "LunaSea Device ID": "LunaSea ID thiết bị", - "Apprise URL": "URL thông báo", + "Apprise URL": "Apprise URL", "Example:": "Ví dụ: {0}", "Read more:": "Đọc thêm: {0}", "Status:": "Trạng thái: {0}", "Read more": "Đọc thêm", - appriseInstalled: "Đã cài đặt Thông báo.", - appriseNotInstalled: "Chưa cài đặt Thông báo. {0}", + appriseInstalled: "Đã cài đặt Apprise.", + appriseNotInstalled: "Chưa cài đặt Apprise. {0}", "Access Token": "Token truy cập", "Channel access token": "Token kênh truy cập", "Line Developers Console": "Line Developers Console", @@ -282,4 +282,4 @@ export default { promosmsSMSSender: "SMS Tên người gửi: Tên đã đăng ký trước hoặc tên mặc định: InfoSMS, SMS Info, MaxSMS, INFO, SMS", "Feishu WebHookUrl": "Feishu WebHookUrl", // End notification form -}; \ No newline at end of file +}; From acc2995d8621579dcd096d6541386f67671de053 Mon Sep 17 00:00:00 2001 From: Andreas Brett Date: Tue, 19 Oct 2021 00:42:33 +0200 Subject: [PATCH 004/125] invalidate used token --- db/patch-2fa-invalidate-used-token.sql | 7 +++++++ server/database.js | 1 + server/server.js | 14 ++++++++++---- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 db/patch-2fa-invalidate-used-token.sql diff --git a/db/patch-2fa-invalidate-used-token.sql b/db/patch-2fa-invalidate-used-token.sql new file mode 100644 index 000000000..2f0b42ca8 --- /dev/null +++ b/db/patch-2fa-invalidate-used-token.sql @@ -0,0 +1,7 @@ +-- You should not modify if this have pushed to Github, unless it does serious wrong with the db. +BEGIN TRANSACTION; + +ALTER TABLE user + ADD twofa_last_token VARCHAR(6); + +COMMIT; diff --git a/server/database.js b/server/database.js index 1030ffdd9..e97dea996 100644 --- a/server/database.js +++ b/server/database.js @@ -50,6 +50,7 @@ class Database { "patch-group-table.sql": true, "patch-monitor-push_token.sql": true, "patch-http-monitor-method-body-and-headers.sql": true, + "patch-2fa-invalidate-used-token.sql": true, } /** diff --git a/server/server.js b/server/server.js index c4d18869e..a6e26aabd 100644 --- a/server/server.js +++ b/server/server.js @@ -265,7 +265,7 @@ exports.entryPage = "dashboard"; if (user) { afterLogin(socket, user); - if (user.twofaStatus == 0) { + if (user.twofa_status == 0) { callback({ ok: true, token: jwt.sign({ @@ -274,7 +274,7 @@ exports.entryPage = "dashboard"; }); } - if (user.twofaStatus == 1 && !data.token) { + if (user.twofa_status == 1 && !data.token) { callback({ tokenRequired: true, }); @@ -283,7 +283,13 @@ exports.entryPage = "dashboard"; if (data.token) { let verify = notp.totp.verify(data.token, user.twofa_secret, twofa_verification_opts); - if (verify && verify.delta == 0) { + if (user.twofa_last_token !== data.token && verify) { + + await R.exec("UPDATE `user` SET twofa_last_token = ? WHERE id = ? ", [ + data.token, + socket.userID, + ]); + callback({ ok: true, token: jwt.sign({ @@ -401,7 +407,7 @@ exports.entryPage = "dashboard"; let verify = notp.totp.verify(token, user.twofa_secret, twofa_verification_opts); - if (verify && verify.delta == 0) { + if (user.twofa_last_token !== token && verify) { callback({ ok: true, valid: true, From 9982887783ff82c7962f485ec080d98b5c932fcf Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 20 Oct 2021 18:08:52 +0800 Subject: [PATCH 005/125] Update feature_request.md --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 9141130ae..4794cc242 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -6,7 +6,7 @@ labels: enhancement assignees: '' --- -**Is it a duplicate question?** +**Is it a duplicated question?** Please search in Issues without filters: https://github.com/louislam/uptime-kuma/issues?q= **Is your feature request related to a problem? Please describe.** From 3fe0e9bf1ec82e782881178fde51e3b29b7680c5 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 20 Oct 2021 18:09:10 +0800 Subject: [PATCH 006/125] Update ask-for-help.md --- .github/ISSUE_TEMPLATE/ask-for-help.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/ask-for-help.md b/.github/ISSUE_TEMPLATE/ask-for-help.md index 79ec21c66..3031e077a 100644 --- a/.github/ISSUE_TEMPLATE/ask-for-help.md +++ b/.github/ISSUE_TEMPLATE/ask-for-help.md @@ -6,7 +6,7 @@ labels: help assignees: '' --- -**Is it a duplicate question?** +**Is it a duplicated question?** Please search in Issues without filters: https://github.com/louislam/uptime-kuma/issues?q= **Describe your problem** From 7a1bb964e99de19849f9b19778c644eba5fa9bc2 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 20 Oct 2021 18:09:23 +0800 Subject: [PATCH 007/125] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 370b88b8b..069ed6cc0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,7 +7,7 @@ assignees: '' --- -**Is it a duplicate question?** +**Is it a duplicated question?** Please search in Issues without filters: https://github.com/louislam/uptime-kuma/issues?q= **Describe the bug** From 29e4e412150e76f2e87f9f9aa82a158b55b67d77 Mon Sep 17 00:00:00 2001 From: DX37 Date: Wed, 20 Oct 2021 23:00:29 +0700 Subject: [PATCH 008/125] Update ru-RU.js --- src/languages/ru-RU.js | 117 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 112 insertions(+), 5 deletions(-) diff --git a/src/languages/ru-RU.js b/src/languages/ru-RU.js index 2dd3eafbb..951462399 100644 --- a/src/languages/ru-RU.js +++ b/src/languages/ru-RU.js @@ -1,6 +1,6 @@ export default { languageName: "Русский", - checkEverySecond: "проверять каждые {0} секунд", + checkEverySecond: "Проверка каждые {0} секунд", retriesDescription: "Максимальное количество попыток перед пометкой сервиса как недоступного и отправкой уведомления", ignoreTLSError: "Игнорировать ошибку TLS/SSL для HTTPS сайтов", upsideDownModeDescription: "Реверс статуса сервиса. Если сервис доступен, то он помечается как НЕДОСТУПНЫЙ.", @@ -29,7 +29,7 @@ export default { "Add New Monitor": "Новый монитор", "Quick Stats": "Статистика", Up: "Доступен", - Down: "Н/Д", + Down: "Недоступен", Pending: "Ожидание", Unknown: "Неизвестно", Pause: "Пауза", @@ -65,8 +65,8 @@ export default { "Accepted Status Codes": "Допустимые коды статуса", Save: "Сохранить", Notifications: "Уведомления", - "Not available, please setup.": "Доступных уведомлений нет, необходима настройка.", - "Setup Notification": "Настроить уведомления", + "Not available, please setup.": "Доступных уведомлений нет, необходимо создать.", + "Setup Notification": "Создать уведомление", Light: "Светлая", Dark: "Тёмная", Auto: "Авто", @@ -142,7 +142,7 @@ export default { Token: "Токен", "Show URI": "Показать URI", "Clear all statistics": "Удалить всю статистику", - retryCheckEverySecond: "повторять каждые {0} секунд", + retryCheckEverySecond: "Повтор каждые {0} секунд", importHandleDescription: "Выберите \"Пропустить существующие\", если вы хотите пропустить каждый монитор или уведомление с таким же именем. \"Перезаписать\" удалит каждый существующий монитор или уведомление и добавит заново. Вариант \"Не проверять\" принудительно восстанавливает все мониторы и уведомления, даже если они уже существуют.", confirmImportMsg: "Вы действительно хотите восстановить резервную копию? Убедитесь, что вы выбрали подходящий вариант импорта.", "Heartbeat Retry Interval": "Интервал повтора опроса", @@ -202,4 +202,111 @@ export default { pushbullet: "Pushbullet", line: "Line Messenger", mattermost: "Mattermost", + "Primary Base URL": "Primary Base URL", + "Push URL": "Push URL", + needPushEvery: "You should call this URL every {0} seconds.", + pushOptionalParams: "Optional parameters: {0}", + defaultNotificationName: "My {notification} Alert ({number})", + here: "here", + Required: "Required", + "Bot Token": "Bot Token", + wayToGetTelegramToken: "You can get a token from {0}.", + "Chat ID": "Chat ID", + supportTelegramChatID: "Support Direct Chat / Group / Channel's Chat ID", + wayToGetTelegramChatID: "You can get your chat ID by sending a message to the bot and going to this URL to view the chat_id:", + "YOUR BOT TOKEN HERE": "YOUR BOT TOKEN HERE", + chatIDNotFound: "Chat ID is not found; please send a message to this bot first", + "Post URL": "Post URL", + "Content Type": "Content Type", + webhookJsonDesc: "{0} is good for any modern HTTP servers such as Express.js", + webhookFormDataDesc: "{multipart} is good for PHP. The JSON will need to be parsed with {decodeFunction}", + secureOptionNone: "None / STARTTLS (25, 587)", + secureOptionTLS: "TLS (465)", + "Ignore TLS Error": "Ignore TLS Error", + "From Email": "From Email", + emailCustomSubject: "Custom Subject", + "To Email": "To Email", + smtpCC: "CC", + smtpBCC: "BCC", + "Discord Webhook URL": "Discord Webhook URL", + wayToGetDiscordURL: "You can get this by going to Server Settings -> Integrations -> Create Webhook", + "Bot Display Name": "Bot Display Name", + "Prefix Custom Message": "Prefix Custom Message", + "Hello @everyone is...": "Hello {'@'}everyone is...", + "Webhook URL": "Webhook URL", + wayToGetTeamsURL: "You can learn how to create a webhook URL {0}.", + Number: "Number", + Recipients: "Recipients", + needSignalAPI: "You need to have a signal client with REST API.", + wayToCheckSignalURL: "You can check this URL to view how to set one up:", + signalImportant: "IMPORTANT: You cannot mix groups and numbers in recipients!", + "Application Token": "Application Token", + "Server URL": "Server URL", + Priority: "Priority", + "Icon Emoji": "Icon Emoji", + "Channel Name": "Channel Name", + "Uptime Kuma URL": "Uptime Kuma URL", + aboutWebhooks: "More info about Webhooks on: {0}", + aboutChannelName: "Enter the channel name on {0} Channel Name field if you want to bypass the Webhook channel. Ex: #other-channel", + aboutKumaURL: "If you leave the Uptime Kuma URL field blank, it will default to the Project GitHub page.", + emojiCheatSheet: "Emoji cheat sheet: {0}", + "User Key": "User Key", + Device: "Device", + "Message Title": "Message Title", + "Notification Sound": "Notification Sound", + "More info on:": "More info on: {0}", + pushoverDesc1: "Emergency priority (2) has default 30 second timeout between retries and will expire after 1 hour.", + pushoverDesc2: "If you want to send notifications to different devices, fill out Device field.", + "SMS Type": "SMS Type", + octopushTypePremium: "Premium (Fast - recommended for alerting)", + octopushTypeLowCost: "Low Cost (Slow - sometimes blocked by operator)", + checkPrice: "Check {0} prices:", + octopushLegacyHint: "Do you use the legacy version of Octopush (2011-2020) or the new version?", + "Check octopush prices": "Check octopush prices {0}.", + octopushPhoneNumber: "Phone number (intl format, eg : +33612345678) ", + octopushSMSSender: "SMS Sender Name : 3-11 alphanumeric characters and space (a-zA-Z0-9)", + "LunaSea Device ID": "LunaSea Device ID", + "Apprise URL": "Apprise URL", + "Example:": "Example: {0}", + "Read more:": "Read more: {0}", + "Status:": "Status: {0}", + "Read more": "Read more", + appriseInstalled: "Apprise is installed.", + appriseNotInstalled: "Apprise is not installed. {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: "First access the {0}, create a provider and channel (Messaging API), then you can get the channel access token and user ID from the above mentioned menu items.", + "Icon URL": "Icon URL", + aboutIconURL: "You can provide a link to a picture in \"Icon URL\" to override the default profile picture. Will not be used if Icon Emoji is set.", + aboutMattermostChannelName: "You can override the default channel that the Webhook posts to by entering the channel name into \"Channel Name\" field. This needs to be enabled in the Mattermost Webhook settings. Ex: #other-channel", + matrix: "Matrix", + promosmsTypeEco: "SMS ECO - cheap but slow and often overloaded. Limited only to Polish recipients.", + promosmsTypeFlash: "SMS FLASH - Message will automatically show on recipient device. Limited only to Polish recipients.", + promosmsTypeFull: "SMS FULL - Premium tier of SMS, You can use your Sender Name (You need to register name first). Reliable for alerts.", + promosmsTypeSpeed: "SMS SPEED - Highest priority in system. Very quick and reliable but costly (about twice of SMS FULL price).", + promosmsPhoneNumber: "Phone number (for Polish recipient You can skip area codes)", + promosmsSMSSender: "SMS Sender Name : Pre-registred name or one of defaults: InfoSMS, SMS Info, MaxSMS, INFO, SMS", + "Feishu WebHookUrl": "Feishu WebHookURL", + matrixHomeserverURL: "Homeserver URL (with http(s):// and optionally port)", + "Internal Room Id": "Internal Room ID", + matrixDesc1: "You can find the internal room ID by looking in the advanced section of the room settings in your Matrix client. It should look like !QMdRCpUIfLwsfjxye6:home.server.", + matrixDesc2: "It is highly recommended you create a new user and do not use your own Matrix user's access token as it will allow full access to your account and all the rooms you joined. Instead, create a new user and only invite it to the room that you want to receive the notification in. You can get the access token by running {0}", + Method: "Метод", + Body: "Тело", + Headers: "Заголовки", + PushUrl: "URL пуша", + HeadersInvalidFormat: "Заголовки запроса некорректны JSON: ", + BodyInvalidFormat: "Тело запроса некорректно JSON: ", + "Monitor History": "История мониторов", + clearDataOlderThan: "Сохранять историю мониторов в течение {0} дней.", + PasswordsDoNotMatch: "Пароли не совпадают.", + records: "записей", + "One record": "Одна запись", + "Showing {from} to {to} of {count} records": "Показывается от {from} до {to} из {count} записей", + steamApiKeyDescription: "Для мониторинга игрового сервера Steam вам необходим Web-API ключ Steam. Зарегистрировать его можно здесь: ", }; From c0d6fe0d768cf1ddc52f11c1d95d77463685ae0e Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 21 Oct 2021 00:03:55 +0800 Subject: [PATCH 009/125] Update CONTRIBUTING.md --- CONTRIBUTING.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9c4d5dc4f..45996f4aa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -178,3 +178,21 @@ Patch release = the third digit ([Semantic Versioning](https://semver.org/)) ## Translations Please read: https://github.com/louislam/uptime-kuma/tree/master/src/languages + + +## Maintainer + +Check the latest issue and pull request: +https://github.com/louislam/uptime-kuma/issues?q=sort%3Aupdated-desc + +### Release Procedures +1. Draft a release note +1. Make sure the repo is cleared +1. `npm run update-version 1.X.X` +1. `npm run build-docker` +1. git push +1. Publish the release note as 1.X.X +1. npm run upload-artifacts +1. Try the Docker image with tag 1.X.X (Clean install / amd64 / arm64 / armv7) +1. Try clean install with Node.js +1. SSH to demo site server and update to 1.X.X From 8f1da6aa2285027f8d19c99abc2d8a47f75b0ac2 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 21 Oct 2021 00:08:46 +0800 Subject: [PATCH 010/125] Update CONTRIBUTING.md --- CONTRIBUTING.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 45996f4aa..1d9b37a3c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -182,7 +182,7 @@ Please read: https://github.com/louislam/uptime-kuma/tree/master/src/languages ## Maintainer -Check the latest issue and pull request: +Check the latest issues and pull requests: https://github.com/louislam/uptime-kuma/issues?q=sort%3Aupdated-desc ### Release Procedures @@ -193,6 +193,9 @@ https://github.com/louislam/uptime-kuma/issues?q=sort%3Aupdated-desc 1. git push 1. Publish the release note as 1.X.X 1. npm run upload-artifacts -1. Try the Docker image with tag 1.X.X (Clean install / amd64 / arm64 / armv7) -1. Try clean install with Node.js 1. SSH to demo site server and update to 1.X.X + +Checking: +- Check all tags is fine on https://hub.docker.com/r/louislam/uptime-kuma/tags +- Try the Docker image with tag 1.X.X (Clean install / amd64 / arm64 / armv7) +- Try clean install with Node.js From 56094a43d7a50b4c1b0900f566378cbc71cd147c Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 21 Oct 2021 22:54:04 +0800 Subject: [PATCH 011/125] add passwordStrength --- package-lock.json | 15 +++++++++++++-- package.json | 3 ++- server/server.js | 11 ++++++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 22b45db48..ea2458acf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "uptime-kuma", - "version": "1.8.0", + "version": "1.9.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "uptime-kuma", - "version": "1.8.0", + "version": "1.9.1", "license": "MIT", "dependencies": { "@fortawesome/fontawesome-svg-core": "~1.2.36", @@ -23,6 +23,7 @@ "chardet": "^1.3.0", "chart.js": "~3.5.1", "chartjs-adapter-dayjs": "~1.0.0", + "check-password-strength": "^2.0.3", "command-exists": "~1.2.9", "compare-versions": "~3.6.0", "dayjs": "~1.10.7", @@ -3905,6 +3906,11 @@ "dayjs": "^1.8.15" } }, + "node_modules/check-password-strength": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/check-password-strength/-/check-password-strength-2.0.3.tgz", + "integrity": "sha512-UW3YgMUne9QuejgnNWjWwYi4QhWArVj+1OXqDR1NkEQcmMKKO74O3P5ZvXr9JZNbTBfcwlK3yurYCMuJsck83A==" + }, "node_modules/chokidar": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", @@ -15474,6 +15480,11 @@ "integrity": "sha512-EnbVqTJGFKLpg1TROLdCEufrzbmIa2oeLGx8O2Wdjw2EoMudoOo9+YFu+6CM0Z0hQ/v3yq/e/Y6efQMu22n8Jg==", "requires": {} }, + "check-password-strength": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/check-password-strength/-/check-password-strength-2.0.3.tgz", + "integrity": "sha512-UW3YgMUne9QuejgnNWjWwYi4QhWArVj+1OXqDR1NkEQcmMKKO74O3P5ZvXr9JZNbTBfcwlK3yurYCMuJsck83A==" + }, "chokidar": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", diff --git a/package.json b/package.json index 174ab6aa6..6f4bef34f 100644 --- a/package.json +++ b/package.json @@ -62,10 +62,11 @@ "axios": "~0.21.4", "bcryptjs": "~2.4.3", "bootstrap": "~5.1.1", - "chardet": "^1.3.0", "bree": "~6.3.1", + "chardet": "^1.3.0", "chart.js": "~3.5.1", "chartjs-adapter-dayjs": "~1.0.0", + "check-password-strength": "^2.0.3", "command-exists": "~1.2.9", "compare-versions": "~3.6.0", "dayjs": "~1.10.7", diff --git a/server/server.js b/server/server.js index 1846fe6e9..11f03061a 100644 --- a/server/server.js +++ b/server/server.js @@ -31,6 +31,7 @@ debug("Importing prometheus-api-metrics"); const prometheusAPIMetrics = require("prometheus-api-metrics"); debug("Importing compare-versions"); const compareVersions = require("compare-versions"); +const { passwordStrength } = require("check-password-strength"); debug("Importing 2FA Modules"); const notp = require("notp"); @@ -468,6 +469,10 @@ exports.entryPage = "dashboard"; socket.on("setup", async (username, password, callback) => { try { + if (passwordStrength(password).value === "Too weak") { + throw new Error("Password is too weak. It should contain alphabetic and numeric characters. It must be at least 6 characters in length."); + } + if ((await R.count("user")) !== 0) { throw new Error("Uptime Kuma has been initialized. If you want to run setup again, please delete the database."); } @@ -857,10 +862,14 @@ exports.entryPage = "dashboard"; try { checkLogin(socket); - if (! password.currentPassword) { + if (! password.newPassword) { throw new Error("Invalid new password"); } + if (passwordStrength(password.newPassword).value === "Too weak") { + throw new Error("Password is too weak. It should contain alphabetic and numeric characters. It must be at least 6 characters in length."); + } + let user = await R.findOne("user", " id = ? AND active = 1 ", [ socket.userID, ]); From ff5f2e8dfb0822ba3642ed94ad8ff81da3256902 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 21 Oct 2021 23:03:40 +0800 Subject: [PATCH 012/125] add limiter --- package-lock.json | 27 +++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 28 insertions(+) diff --git a/package-lock.json b/package-lock.json index ea2458acf..551504d75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,7 @@ "http-graceful-shutdown": "~3.1.4", "iconv-lite": "^0.6.3", "jsonwebtoken": "~8.5.1", + "limiter": "^2.1.0", "nodemailer": "~6.6.5", "notp": "~2.0.3", "password-hash": "~1.2.2", @@ -7821,6 +7822,11 @@ "verror": "1.10.0" } }, + "node_modules/just-performance": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/just-performance/-/just-performance-4.3.0.tgz", + "integrity": "sha512-L7RjvtJsL0QO8xFs5wEoDDzzJwoiowRw6Rn/GnvldlchS2JQr9wFYPiwZcDfrbbujEKqKN0tvENdbjXdYhDp5Q==" + }, "node_modules/jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", @@ -7957,6 +7963,14 @@ "node": ">= 0.8.0" } }, + "node_modules/limiter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-2.1.0.tgz", + "integrity": "sha512-361TYz6iay6n+9KvUUImqdLuFigK+K79qrUtBsXhJTLdH4rIt/r1y8r1iozwh8KbZNpujbFTSh74mJ7bwbAMOw==", + "dependencies": { + "just-performance": "4.3.0" + } + }, "node_modules/lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", @@ -18457,6 +18471,11 @@ "verror": "1.10.0" } }, + "just-performance": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/just-performance/-/just-performance-4.3.0.tgz", + "integrity": "sha512-L7RjvtJsL0QO8xFs5wEoDDzzJwoiowRw6Rn/GnvldlchS2JQr9wFYPiwZcDfrbbujEKqKN0tvENdbjXdYhDp5Q==" + }, "jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", @@ -18551,6 +18570,14 @@ "type-check": "~0.4.0" } }, + "limiter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-2.1.0.tgz", + "integrity": "sha512-361TYz6iay6n+9KvUUImqdLuFigK+K79qrUtBsXhJTLdH4rIt/r1y8r1iozwh8KbZNpujbFTSh74mJ7bwbAMOw==", + "requires": { + "just-performance": "4.3.0" + } + }, "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", diff --git a/package.json b/package.json index 6f4bef34f..4f3d32ea7 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "http-graceful-shutdown": "~3.1.4", "iconv-lite": "^0.6.3", "jsonwebtoken": "~8.5.1", + "limiter": "^2.1.0", "nodemailer": "~6.6.5", "notp": "~2.0.3", "password-hash": "~1.2.2", From 1d1601cf24b4ee721b123ef594bd2571fa5b75aa Mon Sep 17 00:00:00 2001 From: DX37 Date: Thu, 21 Oct 2021 22:49:17 +0700 Subject: [PATCH 013/125] Update notifications area in ru-RU.js --- src/languages/ru-RU.js | 180 ++++++++++++++++++++--------------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/src/languages/ru-RU.js b/src/languages/ru-RU.js index 951462399..bf4d30860 100644 --- a/src/languages/ru-RU.js +++ b/src/languages/ru-RU.js @@ -185,7 +185,7 @@ export default { "Switch to Dark Theme": "Тёмная тема", "Switch to Light Theme": "Светлая тема", telegram: "Telegram", - webhook: "Webhook", + webhook: "Вебхук", smtp: "Email (SMTP)", discord: "Discord", teams: "Microsoft Teams", @@ -198,104 +198,104 @@ export default { octopush: "Octopush", promosms: "PromoSMS", lunasea: "LunaSea", - apprise: "Apprise (Support 50+ Notification services)", + apprise: "Apprise (Поддержка 50+ сервисов уведомлений)", pushbullet: "Pushbullet", line: "Line Messenger", mattermost: "Mattermost", - "Primary Base URL": "Primary Base URL", - "Push URL": "Push URL", - needPushEvery: "You should call this URL every {0} seconds.", - pushOptionalParams: "Optional parameters: {0}", - defaultNotificationName: "My {notification} Alert ({number})", - here: "here", - Required: "Required", - "Bot Token": "Bot Token", - wayToGetTelegramToken: "You can get a token from {0}.", - "Chat ID": "Chat ID", - supportTelegramChatID: "Support Direct Chat / Group / Channel's Chat ID", - wayToGetTelegramChatID: "You can get your chat ID by sending a message to the bot and going to this URL to view the chat_id:", - "YOUR BOT TOKEN HERE": "YOUR BOT TOKEN HERE", - chatIDNotFound: "Chat ID is not found; please send a message to this bot first", + "Primary Base URL": "Основной URL", + "Push URL": "URL пуша", + needPushEvery: "К этому URL необходимо обращаться каждые {0} секунд.", + pushOptionalParams: "Опциональные параметры: {0}", + defaultNotificationName: "Моё уведомление {notification} ({number})", + here: "здесь", + Required: "Требуется", + "Bot Token": "Токен бота", + wayToGetTelegramToken: "Вы можете взять токен здесь - {0}.", + "Chat ID": "ID чата", + supportTelegramChatID: "Поддерживаются ID чатов, групп и каналов", + wayToGetTelegramChatID: "Вы можете взять ID вашего чата, отправив сообщение боту и перейдя по этому URL для просмотра chat_id:", + "YOUR BOT TOKEN HERE": "ВАШ ТОКЕН БОТА ЗДЕСЬ", + chatIDNotFound: "ID чата не найден; пожалуйста отправьте сначала сообщение боту", "Post URL": "Post URL", - "Content Type": "Content Type", - webhookJsonDesc: "{0} is good for any modern HTTP servers such as Express.js", - webhookFormDataDesc: "{multipart} is good for PHP. The JSON will need to be parsed with {decodeFunction}", - secureOptionNone: "None / STARTTLS (25, 587)", + "Content Type": "Тип контента", + webhookJsonDesc: "{0} подходит для любых современных HTTP-серверов, например Express.js", + webhookFormDataDesc: "{multipart} подходит для PHP. JSON-вывод необходимо будет обработать с помощью {decodeFunction}", + secureOptionNone: "Нет / STARTTLS (25, 587)", secureOptionTLS: "TLS (465)", - "Ignore TLS Error": "Ignore TLS Error", - "From Email": "From Email", - emailCustomSubject: "Custom Subject", - "To Email": "To Email", - smtpCC: "CC", - smtpBCC: "BCC", - "Discord Webhook URL": "Discord Webhook URL", - wayToGetDiscordURL: "You can get this by going to Server Settings -> Integrations -> Create Webhook", - "Bot Display Name": "Bot Display Name", - "Prefix Custom Message": "Prefix Custom Message", - "Hello @everyone is...": "Hello {'@'}everyone is...", - "Webhook URL": "Webhook URL", - wayToGetTeamsURL: "You can learn how to create a webhook URL {0}.", - Number: "Number", - Recipients: "Recipients", - needSignalAPI: "You need to have a signal client with REST API.", - wayToCheckSignalURL: "You can check this URL to view how to set one up:", - signalImportant: "IMPORTANT: You cannot mix groups and numbers in recipients!", - "Application Token": "Application Token", - "Server URL": "Server URL", - Priority: "Priority", - "Icon Emoji": "Icon Emoji", - "Channel Name": "Channel Name", + "Ignore TLS Error": "Игнорировать ошибки TLS", + "From Email": "От кого", + emailCustomSubject: "Своя тема", + "To Email": "Кому", + smtpCC: "Копия", + smtpBCC: "Скрытая копия", + "Discord Webhook URL": "Discord вебхук URL", + wayToGetDiscordURL: "Вы можете создать его в Параметрах сервера -> Интеграции -> Создать вебхук", + "Bot Display Name": "Отображаемое имя бота", + "Prefix Custom Message": "Свой префикс сообщения", + "Hello @everyone is...": "Привет {'@'}everyone это...", + "Webhook URL": "URL вебхука", + wayToGetTeamsURL: "Как создать URL вебхука вы можете узнать здесь - {0}.", + Number: "Номер", + Recipients: "Получатели", + needSignalAPI: "Вам необходим клиент Signal с поддержкой REST API.", + wayToCheckSignalURL: "Пройдите по этому URL, чтобы узнать как настроить такой клиент:", + signalImportant: "ВАЖНО: Нельзя смешивать в Получателях группы и номера!", + "Application Token": "Токен приложения", + "Server URL": "URL сервера", + Priority: "Приоритет", + "Icon Emoji": "Иконка Emoji", + "Channel Name": "Имя канала", "Uptime Kuma URL": "Uptime Kuma URL", - aboutWebhooks: "More info about Webhooks on: {0}", - aboutChannelName: "Enter the channel name on {0} Channel Name field if you want to bypass the Webhook channel. Ex: #other-channel", - aboutKumaURL: "If you leave the Uptime Kuma URL field blank, it will default to the Project GitHub page.", - emojiCheatSheet: "Emoji cheat sheet: {0}", - "User Key": "User Key", - Device: "Device", - "Message Title": "Message Title", - "Notification Sound": "Notification Sound", - "More info on:": "More info on: {0}", - pushoverDesc1: "Emergency priority (2) has default 30 second timeout between retries and will expire after 1 hour.", - pushoverDesc2: "If you want to send notifications to different devices, fill out Device field.", - "SMS Type": "SMS Type", - octopushTypePremium: "Premium (Fast - recommended for alerting)", - octopushTypeLowCost: "Low Cost (Slow - sometimes blocked by operator)", - checkPrice: "Check {0} prices:", - octopushLegacyHint: "Do you use the legacy version of Octopush (2011-2020) or the new version?", - "Check octopush prices": "Check octopush prices {0}.", - octopushPhoneNumber: "Phone number (intl format, eg : +33612345678) ", - octopushSMSSender: "SMS Sender Name : 3-11 alphanumeric characters and space (a-zA-Z0-9)", - "LunaSea Device ID": "LunaSea Device ID", + aboutWebhooks: "Больше информации о вебхуках: {0}", + aboutChannelName: "Введите имя канала в поле {0} Имя канала, если вы хотите обойти канал вебхука. Например: #other-channel", + aboutKumaURL: "Если поле Uptime Kuma URL в настройках останется пустым, по умолчанию будет использоваться ссылка на проект на GitHub.", + emojiCheatSheet: "Шпаргалка по Emoji: {0}", + "User Key": "Ключ пользователя", + Device: "Устройство", + "Message Title": "Заголовок сообщения", + "Notification Sound": "Звук уведомления", + "More info on:": "Больше информации: {0}", + pushoverDesc1: "Экстренный приоритет (2) имеет таймаут повтора по умолчанию 30 секунд и истекает через 1 час.", + pushoverDesc2: "Если вы хотите отправлять уведомления различным устройствам, необходимо заполнить поле Устройство.", + "SMS Type": "Тип SMS", + octopushTypePremium: "Премиум (Быстрый - рекомендуется для алертов)", + octopushTypeLowCost: "Дешёвый (Медленный - иногда блокируется операторами)", + checkPrice: "Тарифы {0}:", + octopushLegacyHint: "Вы используете старую версию Octopush (2011-2020) или новую?", + "Check octopush prices": "Тарифы Octopush {0}.", + octopushPhoneNumber: "Номер телефона (межд. формат, например: +79831234567) ", + octopushSMSSender: "Имя отправителя SMS: 3-11 символов алвафита, цифр и пробелов (a-zA-Z0-9)", + "LunaSea Device ID": "ID устройства LunaSea", "Apprise URL": "Apprise URL", - "Example:": "Example: {0}", - "Read more:": "Read more: {0}", - "Status:": "Status: {0}", - "Read more": "Read more", - appriseInstalled: "Apprise is installed.", - appriseNotInstalled: "Apprise is not installed. {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: "First access the {0}, create a provider and channel (Messaging API), then you can get the channel access token and user ID from the above mentioned menu items.", - "Icon URL": "Icon URL", - aboutIconURL: "You can provide a link to a picture in \"Icon URL\" to override the default profile picture. Will not be used if Icon Emoji is set.", - aboutMattermostChannelName: "You can override the default channel that the Webhook posts to by entering the channel name into \"Channel Name\" field. This needs to be enabled in the Mattermost Webhook settings. Ex: #other-channel", + "Example:": "Пример: {0}", + "Read more:": "Подробнее: {0}", + "Status:": "Статус: {0}", + "Read more": "Подробнее", + appriseInstalled: "Apprise установлен.", + appriseNotInstalled: "Apprise не установлен. {0}", + "Access Token": "Токен доступа", + "Channel access token": "Токен доступа канала", + "Line Developers Console": "Консоль разработчиков Line", + lineDevConsoleTo: "Консоль разработчиков Line - {0}", + "Basic Settings": "Базовые настройки", + "User ID": "ID пользователя", + "Messaging API": "API сообщений", + wayToGetLineChannelToken: "Сначала зайдите в {0}, создайте провайдера и канал (API сообщений), затем вы сможете получить токен доступа канала и ID пользователя из вышеупомянутых пунктов меню.", + "Icon URL": "URL иконки", + aboutIconURL: "Вы можете предоставить ссылку на иконку в поле \"URL иконки\" чтобы переопределить картинку профиля по умолчанию. Не используется, если задана иконка Emoji.", + aboutMattermostChannelName: "Вы можете переопределить канал по умолчанию, в который вебхук пишет, введя имя канала в поле \"Имя канала\". Это необходимо включить в настройках вебхука Mattermost. Например: #other-channel", matrix: "Matrix", - promosmsTypeEco: "SMS ECO - cheap but slow and often overloaded. Limited only to Polish recipients.", - promosmsTypeFlash: "SMS FLASH - Message will automatically show on recipient device. Limited only to Polish recipients.", - promosmsTypeFull: "SMS FULL - Premium tier of SMS, You can use your Sender Name (You need to register name first). Reliable for alerts.", - promosmsTypeSpeed: "SMS SPEED - Highest priority in system. Very quick and reliable but costly (about twice of SMS FULL price).", - promosmsPhoneNumber: "Phone number (for Polish recipient You can skip area codes)", - promosmsSMSSender: "SMS Sender Name : Pre-registred name or one of defaults: InfoSMS, SMS Info, MaxSMS, INFO, SMS", + promosmsTypeEco: "SMS ECO - дёшево и медленно, часто перегружен. Только для получателей из Польши.", + promosmsTypeFlash: "SMS FLASH - сообщения автоматически появятся на устройстве получателя. Только для получателей из Польши.", + promosmsTypeFull: "SMS FULL - премиум-уровень SMS, можно использовать своё имя отправителя (предварительно зарегистрировав его). Надёжно для алертов.", + promosmsTypeSpeed: "SMS SPEED - наивысший приоритет в системе. Очень быстро и надёжно, но очень дорого (в два раза дороже, чем SMS FULL).", + promosmsPhoneNumber: "Номер телефона (для получателей из Польши можно пропустить код региона)", + promosmsSMSSender: "Имя отправителя SMS: Зарегистрированное или одно из имён по умолчанию: InfoSMS, SMS Info, MaxSMS, INFO, SMS", "Feishu WebHookUrl": "Feishu WebHookURL", - matrixHomeserverURL: "Homeserver URL (with http(s):// and optionally port)", - "Internal Room Id": "Internal Room ID", - matrixDesc1: "You can find the internal room ID by looking in the advanced section of the room settings in your Matrix client. It should look like !QMdRCpUIfLwsfjxye6:home.server.", - matrixDesc2: "It is highly recommended you create a new user and do not use your own Matrix user's access token as it will allow full access to your account and all the rooms you joined. Instead, create a new user and only invite it to the room that you want to receive the notification in. You can get the access token by running {0}", + matrixHomeserverURL: "URL сервера (вместе с http(s):// и опционально порт)", + "Internal Room Id": "Внутренний ID комнаты", + matrixDesc1: "Внутренний ID комнаты можно найти в Подробностях в параметрах канала вашего Matrix клиента. Он должен выглядеть примерно как !QMdRCpUIfLwsfjxye6:home.server.", + matrixDesc2: "Рекомендуется создать нового пользователя и не использовать токен доступа личного пользователя Matrix, т.к. это влечёт за собой полный доступ к аккаунту и к комнатам, в которых вы состоите. Вместо этого создайте нового пользователя и пригласите его только в ту комнату, в которой вы хотите получать уведомления. Токен доступа можно получить, выполнив команду {0}", Method: "Метод", Body: "Тело", Headers: "Заголовки", From 657987a0132ce7074de3034d2b12843eed2be545 Mon Sep 17 00:00:00 2001 From: Andreas Brett Date: Fri, 22 Oct 2021 11:59:53 +0200 Subject: [PATCH 014/125] fix: show beat.msg only if available --- src/components/HeartbeatBar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HeartbeatBar.vue b/src/components/HeartbeatBar.vue index e62b95dfb..be0b122ed 100644 --- a/src/components/HeartbeatBar.vue +++ b/src/components/HeartbeatBar.vue @@ -167,7 +167,7 @@ export default { }, getBeatTitle(beat) { - return `${this.$root.datetime(beat.time)} - ${beat.msg}`; + return `${this.$root.datetime(beat.time)}` + ((beat.msg) ? ` - ${beat.msg}` : ``); } }, } From 9ad8e5f56a6e544fca4c13086556ed7db73c3775 Mon Sep 17 00:00:00 2001 From: Andreas Brett Date: Fri, 22 Oct 2021 13:05:52 +0200 Subject: [PATCH 015/125] show logged in user --- server/server.js | 21 +++++++++++++++++++++ src/languages/de-DE.js | 1 + src/languages/en.js | 1 + src/pages/Settings.vue | 8 ++++++++ 4 files changed, 31 insertions(+) diff --git a/server/server.js b/server/server.js index c4d18869e..9b670b767 100644 --- a/server/server.js +++ b/server/server.js @@ -865,6 +865,27 @@ exports.entryPage = "dashboard"; } }); + socket.on("getUsername", async (callback) => { + try { + checkLogin(socket); + + let user = await R.findOne("user", " id = ? AND active = 1 ", [ + socket.userID, + ]); + + callback({ + ok: true, + data: user.username, + }); + + } catch (e) { + callback({ + ok: false, + msg: e.message, + }); + } + }); + socket.on("getSettings", async (callback) => { try { checkLogin(socket); diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js index 5e69899d8..0e47701e1 100644 --- a/src/languages/de-DE.js +++ b/src/languages/de-DE.js @@ -197,4 +197,5 @@ export default { pushbullet: "Pushbullet", line: "Line Messenger", mattermost: "Mattermost", + "Current User": "Aktueller Benutzer", }; diff --git a/src/languages/en.js b/src/languages/en.js index 4542d72b2..bb8d96357 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -305,4 +305,5 @@ export default { "One record": "One record", "Showing {from} to {to} of {count} records": "Showing {from} to {to} of {count} records", steamApiKeyDescription: "For monitoring a Steam Gameserver you need a steam Web-API key. You can register your api key here: ", + "Current User": "Current User", }; diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index dc0198531..292098107 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -149,6 +149,7 @@ - @@ -217,7 +237,7 @@ export default { } .period-options { - padding: 0.3em 1.5em; + padding: 0.3em 2.2em; margin-bottom: -1.5em; float: right; position: relative; From 445674aacb0c58ca5eb96dc2c7c033a4d70c8670 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Fri, 22 Oct 2021 18:44:11 +0800 Subject: [PATCH 027/125] Chore: Improve code formatting & comments --- src/components/PingChart.vue | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/components/PingChart.vue b/src/components/PingChart.vue index 0c76721cf..cd5e239c2 100644 --- a/src/components/PingChart.vue +++ b/src/components/PingChart.vue @@ -1,7 +1,12 @@