From 4e94cb9aadb7637de51e60f7070741f793c87424 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Mon, 11 Oct 2021 00:51:18 +0800 Subject: [PATCH 01/13] fix upload dist path --- dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 38d585ca7..97655748e 100644 --- a/dockerfile +++ b/dockerfile @@ -47,5 +47,5 @@ RUN chmod +x /app/extra/upload-github-release-asset.sh # Dist only RUN cd /app && tar -zcvf $DIST dist -RUN /app/extra/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=louislam repo=uptime-kuma tag=$VERSION filename=$DIST +RUN /app/extra/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=louislam repo=uptime-kuma tag=$VERSION filename=/app/$DIST From 05b691d4c98d1ec5f0df128c0a2a3e7d19dfefe4 Mon Sep 17 00:00:00 2001 From: dhfhfk Date: Tue, 12 Oct 2021 20:39:15 +0900 Subject: [PATCH 02/13] Fix typo --- src/languages/ko-KR.js | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/languages/ko-KR.js b/src/languages/ko-KR.js index 4bb4c912e..aef3bf590 100644 --- a/src/languages/ko-KR.js +++ b/src/languages/ko-KR.js @@ -4,8 +4,8 @@ export default { retryCheckEverySecond: "{0}초마다 다시 확인해요.", retriesDescription: "서비스가 중단된 후 알림을 보내기 전 최대 재시도 횟수", ignoreTLSError: "HTTPS 웹사이트에서 TLS/SSL 에러 무시하기", - upsideDownModeDescription: "서버 상태를 반대로 표시해요. 서버가 작동하면 오프라인으로 표시할 거에요.", - maxRedirectDescription: "최대 리다이렉트 횟수에요. 0을 입력하면 리다이렉트를 꺼요.", + upsideDownModeDescription: "서버 상태를 반대로 표시해요. 서버가 작동하면 오프라인으로 표시할 거예요.", + maxRedirectDescription: "최대 리다이렉트 횟수예요. 0을 입력하면 리다이렉트를 꺼요.", acceptedStatusCodesDescription: "응답 성공으로 간주할 상태 코드를 정해요.", passwordNotMatchMsg: "비밀번호 재입력이 일치하지 않아요.", notificationDescription: "모니터링에 알림을 설정할 수 있어요.", @@ -13,9 +13,9 @@ export default { pauseDashboardHome: "일시 정지", deleteMonitorMsg: "정말 이 모니터링을 삭제할까요?", deleteNotificationMsg: "정말 이 알림을 모든 모니터링에서 삭제할까요?", - resoverserverDescription: "Cloudflare가 기본 서버에요, 원한다면 언제나 다른 Resolver 서버로 변경할 수 있어요.", + resoverserverDescription: "Cloudflare가 기본 서버예요, 원한다면 언제나 다른 Resolver 서버로 변경할 수 있어요.", rrtypeDescription: "모니터링할 RR-Type을 선택해요.", - pauseMonitorMsg: "정말 이 모니터링을 일시 정지 할까요?", + pauseMonitorMsg: "정말 이 모니터링을 일시 정지할까요?", enableDefaultNotificationDescription: "새로 추가하는 모든 모니터링에 이 알림을 기본적으로 활성화해요. 각 모니터에 대해 별도로 알림을 비활성화할 수 있어요.", clearEventsMsg: "정말 이 모니터링에 대한 모든 이벤트를 삭제할까요?", clearHeartbeatsMsg: "정말 이 모니터링에 대한 모든 하트비트를 삭제할까요?", @@ -24,8 +24,8 @@ export default { confirmImportMsg: "정말 백업을 가져올까요? 가져오기 옵션을 제대로 설정했는지 다시 확인해주세요.", twoFAVerifyLabel: "토큰을 입력해 2단계 인증이 작동하는지 확인해주세요.", tokenValidSettingsMsg: "토큰이 유효해요! 이제 2단계 인증 설정을 저장할 수 있어요.", - confirmEnableTwoFAMsg: "정말 2단계 인증을 활성화 할까요?", - confirmDisableTwoFAMsg: "정말 2단계 인증을 비활성화 할까요?", + confirmEnableTwoFAMsg: "정말 2단계 인증을 활성화할까요?", + confirmDisableTwoFAMsg: "정말 2단계 인증을 비활성화할까요?", Settings: "설정", Dashboard: "대시보드", "New Update": "새로운 업데이트", @@ -77,7 +77,7 @@ export default { "Accepted Status Codes": "응답 성공 상태 코드", Save: "저장", Notifications: "알림", - "Not available, please setup.": "존재하지 않아요, 새로운거 하나 만드는건 어때요?", + "Not available, please setup.": "존재하지 않아요, 새로운 거 하나 만드는 건 어때요?", "Setup Notification": "알림 설정", Light: "라이트", Dark: "다크", @@ -158,10 +158,10 @@ export default { color: "색상", "value (optional)": "값 (선택)", Gray: "회색", - Red: "빨강색", + Red: "빨간색", Orange: "주황색", Green: "초록색", - Blue: "파랑색", + Blue: "파란색", Indigo: "남색", Purple: "보라색", Pink: "핑크색", @@ -175,9 +175,9 @@ export default { "Partially Degraded Service": "일부 시스템 비정상", "Degraded Service": "모든 시스템 비정상", "Add Group": "그룹 추가", - "Add a monitor": "모니터링 추가r", + "Add a monitor": "모니터링 추가", "Edit Status Page": "상태 페이지 수정", - "Go to Dashboard": "대쉬보드로 가기", + "Go to Dashboard": "대시보드로 가기", "Status Page": "상태 페이지", defaultNotificationName: "내 {notification} 알림 ({number})", here: "여기", @@ -194,7 +194,7 @@ export default { "Post URL": "Post URL", "Content Type": "Content Type", webhookJsonDesc: "{0}은 express.js와 같은 최신 HTTP 서버에 적합해요.", - webhookFormDataDesc: "{multipart}은 PHP에 적합해요. {decodeFunction}를 기준으로 json을 디코딩하면 되어요.", + webhookFormDataDesc: "{multipart}은 PHP에 적합해요. {decodeFunction}를 기준으로 json을 디코딩하면 돼요.", smtp: "Email (SMTP)", secureOptionNone: "없음 / STARTTLS (25, 587)", secureOptionTLS: "TLS (465)", @@ -245,11 +245,11 @@ export default { "Message Title": "메시지 제목", "Notification Sound": "알림음", "More info on:": "자세한 정보: {0}", - pushoverDesc1: "긴급 우선 순위 (2)는 재시도 사이에 기본적으로 30초의 타임아웃이 있고, 1시간 후에 만료되어요.", + pushoverDesc1: "긴급 우선 순위 (2)는 재시도 사이에 기본적으로 30초의 타임아웃이 있고, 1시간 후에 만료돼요.", pushoverDesc2: "다른 장치에 알림을 보내려면 장치칸을 입력해주세요.", "SMS Type": "SMS 종류", octopushTypePremium: "프리미엄 (빠름) - 알림 기능에 적합해요)", - octopushTypeLowCost: "저렴한 요금 (느림, 가끔 차단될 수 있어요)", + octopushTypeLowCost: "저렴한 요금 (느림) - 가끔 차단될 수 있어요)", "Check octopush prices": "{0}에서 Octopush 가격을 확인할 수 있어요.", octopushPhoneNumber: "휴대전화 번호 (intl format, eg : +33612345678) ", octopushSMSSender: "보내는 사람 이름 : 3-11개의 영숫자 및 여백공간 (a-z, A-Z, 0-9)", @@ -259,24 +259,24 @@ export default { "Read more:": "더 보기: {0}", "Status:": "상태: {0}", "Read more": "더 보기", - appriseInstalled: "Apprise가 설치되어있어요..", - appriseNotInstalled: "Apprise 가 설치되어있지 않아요. {0}", + appriseInstalled: "Apprise가 설치되어있어요.", + appriseNotInstalled: "Apprise가 설치되어있지 않아요. {0}", "Access Token": "액세스 토큰", - "Channel access token": "채널 엑세스 토큰", + "Channel access token": "채널 액세스 토큰", "Line Developers Console": "Line 개발자 콘솔", lineDevConsoleTo: "Line 개발자 콘솔 - {0}", "Basic Settings": "기본 설정 메뉴", "User ID": "사용자 ID", "Messaging API": "Messaging API 메뉴", - wayToGetLineChannelToken: "먼저 {0}에 엑세스하고, 공급자 및 채널 (Messaging API)을 만든 다음, 각 메뉴 밑에 언급된 메뉴에서 채널 액세스 토큰과 사용자 ID를 얻을 수 있어요.", + wayToGetLineChannelToken: "먼저 {0}에 액세스하고, 공급자 및 채널 (Messaging API)을 만든 다음, 각 메뉴 밑에 언급된 메뉴에서 채널 액세스 토큰과 사용자 ID를 얻을 수 있어요.", "Icon URL": "아이콘 URL", - aboutIconURL: "\"Icon URL\"에 사진 링크를 입력해 프로필 사진을 설정할 수 있어요. 아이콘 이모지가 설정되어 있으면 적용되지 않을거에요.", + aboutIconURL: "\"Icon URL\"에 사진 링크를 입력해 프로필 사진을 설정할 수 있어요. 아이콘 이모지가 설정되어 있으면 적용되지 않을 거예요.", aboutMattermostChannelName: "채널 이름을 입력하면 Webhook이 게시할 기본 채널을 재설정할 수 있어요. 이 설정은 Mattermost 웹훅 설정에서 활성화해야 해요. 예: #기타-채널", matrix: "매트릭스", promosmsTypeEco: "SMS ECO - 저렴하지만 느리고 가끔 과부하에 걸려요. 폴란드 수신자만 사용할 수 있어요. ", - promosmsTypeFlash: "SMS FLASH - 메시지가 받는 사람 장치에 자동으로 표시되어요. 폴란드 수신자만 사용할 수 있어요.", + promosmsTypeFlash: "SMS FLASH - 메시지가 받는 사람 장치에 자동으로 표시돼요. 폴란드 수신자만 사용할 수 있어요.", promosmsTypeFull: "SMS FULL - SMS 프리미엄 티어, 보내는 사람 이름을 먼저 등록해야 해요. 알림 기능에 적합해요.", - promosmsTypeSpeed: "SMS SPEED - 시스템에서 가장 높은 우선순위에요. 매우 빠르고 신뢰할 수 있지만 비용이 많이 들어요 (SMS 전체 가격의 약 두 배).", + promosmsTypeSpeed: "SMS SPEED - 시스템에서 가장 높은 우선순위예요. 매우 빠르고 신뢰할 수 있지만 비용이 많이 들어요 (SMS 전체 가격의 약 두 배).", promosmsPhoneNumber: "전화 번호 (폴란드 수신자라면 지역번호를 적지 않아도 돼요.)", - promosmsSMSSender: "SMS 보내는 사람 이름 : 미리 등록된 이름 혹은 기본값 중 하나에요: InfoSMS, SMS Info, MaxSMS, INFO, SMS", + promosmsSMSSender: "SMS 보내는 사람 이름 : 미리 등록된 이름 혹은 기본값 중 하나예요: InfoSMS, SMS Info, MaxSMS, INFO, SMS", }; From 911d4ea37baa4c43a52f7eac1fa26abb8a7de85c Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 13 Oct 2021 02:27:25 +0800 Subject: [PATCH 03/13] move vite.config.js to config folder --- vite.config.js => config/vite.config.js | 14 +++++++------- package.json | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) rename vite.config.js => config/vite.config.js (62%) diff --git a/vite.config.js b/config/vite.config.js similarity index 62% rename from vite.config.js rename to config/vite.config.js index 6be31f5e8..a9701d426 100644 --- a/vite.config.js +++ b/config/vite.config.js @@ -1,9 +1,9 @@ -import legacy from "@vitejs/plugin-legacy" -import vue from "@vitejs/plugin-vue" -import { defineConfig } from "vite" +import legacy from "@vitejs/plugin-legacy"; +import vue from "@vitejs/plugin-vue"; +import { defineConfig } from "vite"; -const postCssScss = require("postcss-scss") -const postcssRTLCSS = require('postcss-rtlcss'); +const postCssScss = require("postcss-scss"); +const postcssRTLCSS = require("postcss-rtlcss"); // https://vitejs.dev/config/ export default defineConfig({ @@ -20,5 +20,5 @@ export default defineConfig({ "map": false, "plugins": [postcssRTLCSS] } - }, -}) + }, +}); diff --git a/package.json b/package.json index 6cb8d9dbb..03fdebbd4 100644 --- a/package.json +++ b/package.json @@ -15,17 +15,17 @@ "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .", "lint:style": "stylelint \"**/*.{vue,css,scss}\" --ignore-path .gitignore", "lint": "npm run lint:js && npm run lint:style", - "dev": "vite --host", + "dev": "vite --host --config ./config/vite.config.js", "start": "npm run start-server", "start-server": "node server/server.js", "start-server-dev": "cross-env NODE_ENV=development node server/server.js", - "build": "vite build", + "build": "vite build --config ./config/vite.config.js", "test": "node test/prepare-test-server.js && node server/server.js --port=3002 --data-dir=./data/test/ --test", "test-with-build": "npm run build && npm test", "jest": "node test/prepare-jest.js && npm run jest-frontend && jest ", "jest-frontend": "cross-env TEST_FRONTEND=1 jest --config=./jest-frontend.config.js", "tsc": "tsc", - "vite-preview-dist": "vite preview --host", + "vite-preview-dist": "vite preview --host --config ./config/vite.config.js", "build-docker": "npm run build-docker-debian && npm run build-docker-alpine", "build-docker-alpine-base": "docker buildx build -f docker/alpine-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-alpine . --push", "build-docker-debian-base": "docker buildx build -f docker/debian-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-debian . --push", From 11c3c636e0076d88de1118cbb3b74a592b7f5790 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 13 Oct 2021 02:32:02 +0800 Subject: [PATCH 04/13] move dockerfile, docker-compose.yml to docker folder --- docker-compose.yml => docker/docker-compose.yml | 0 dockerfile => docker/dockerfile | 0 dockerfile-alpine => docker/dockerfile-alpine | 0 package.json | 9 ++++----- 4 files changed, 4 insertions(+), 5 deletions(-) rename docker-compose.yml => docker/docker-compose.yml (100%) rename dockerfile => docker/dockerfile (100%) rename dockerfile-alpine => docker/dockerfile-alpine (100%) diff --git a/docker-compose.yml b/docker/docker-compose.yml similarity index 100% rename from docker-compose.yml rename to docker/docker-compose.yml diff --git a/dockerfile b/docker/dockerfile similarity index 100% rename from dockerfile rename to docker/dockerfile diff --git a/dockerfile-alpine b/docker/dockerfile-alpine similarity index 100% rename from dockerfile-alpine rename to docker/dockerfile-alpine diff --git a/package.json b/package.json index 03fdebbd4..b4454601e 100644 --- a/package.json +++ b/package.json @@ -29,11 +29,11 @@ "build-docker": "npm run build-docker-debian && npm run build-docker-alpine", "build-docker-alpine-base": "docker buildx build -f docker/alpine-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-alpine . --push", "build-docker-debian-base": "docker buildx build -f docker/debian-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-debian . --push", - "build-docker-alpine": "docker buildx build -f dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:alpine -t louislam/uptime-kuma:1-alpine -t louislam/uptime-kuma:1.8.0-alpine --target release . --push", - "build-docker-debian": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.8.0 -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:1.8.0-debian --target release . --push", - "build-docker-nightly": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push", + "build-docker-alpine": "docker buildx build -f docker/dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:alpine -t louislam/uptime-kuma:1-alpine -t louislam/uptime-kuma:1.8.0-alpine --target release . --push", + "build-docker-debian": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.8.0 -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:1.8.0-debian --target release . --push", + "build-docker-nightly": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push", "build-docker-nightly-alpine": "docker buildx build -f dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly-alpine --target nightly . --push", - "build-docker-nightly-amd64": "docker buildx build --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain", + "build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain", "upload-artifacts": "docker buildx build --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain", "setup": "git checkout 1.8.0 && npm ci --production && npm run download-dist", "download-dist": "node extra/download-dist.js", @@ -107,7 +107,6 @@ "@vitejs/plugin-vue": "~1.9.2", "@vue/compiler-sfc": "~3.2.19", "core-js": "~3.18.1", - "cross-env": "~7.0.3", "dns2": "~2.0.1", "eslint": "~7.32.0", "eslint-plugin-vue": "~7.18.0", From 407581ee07a38490a2ced7828a87b586cfbcc54e Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 13 Oct 2021 02:53:59 +0800 Subject: [PATCH 05/13] move jest config files to config dir --- babel.config.js | 4 ++++ config/jest-backend.config.js | 5 +++++ .../jest-frontend.config.js | 2 +- .../jest-puppeteer.config.js | 0 jest.config.js => config/jest.config.js | 2 +- package-lock.json | 17 +++++++++++++++-- package.json | 6 ++++-- test/backend.spec.js | 10 ++++++++++ 8 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 config/jest-backend.config.js rename jest-frontend.config.js => config/jest-frontend.config.js (76%) rename jest-puppeteer.config.js => config/jest-puppeteer.config.js (100%) rename jest.config.js => config/jest.config.js (90%) create mode 100644 test/backend.spec.js diff --git a/babel.config.js b/babel.config.js index 70266c1f7..d2ad8213a 100644 --- a/babel.config.js +++ b/babel.config.js @@ -4,4 +4,8 @@ if (process.env.TEST_FRONTEND) { config.presets = ["@babel/preset-env"]; } +if (process.env.TEST_BACKEND) { + config.plugins = ["babel-plugin-rewire"]; +} + module.exports = config; diff --git a/config/jest-backend.config.js b/config/jest-backend.config.js new file mode 100644 index 000000000..1a88d9a6b --- /dev/null +++ b/config/jest-backend.config.js @@ -0,0 +1,5 @@ +module.exports = { + "rootDir": "..", + "testRegex": "./test/backend.spec.js", +}; + diff --git a/jest-frontend.config.js b/config/jest-frontend.config.js similarity index 76% rename from jest-frontend.config.js rename to config/jest-frontend.config.js index ec4ab8d8e..ab6af7f1e 100644 --- a/jest-frontend.config.js +++ b/config/jest-frontend.config.js @@ -1,5 +1,5 @@ module.exports = { - "rootDir": ".", + "rootDir": "..", "testRegex": "./test/frontend.spec.js", }; diff --git a/jest-puppeteer.config.js b/config/jest-puppeteer.config.js similarity index 100% rename from jest-puppeteer.config.js rename to config/jest-puppeteer.config.js diff --git a/jest.config.js b/config/jest.config.js similarity index 90% rename from jest.config.js rename to config/jest.config.js index 6ce5b90a6..4baaa0fb6 100644 --- a/jest.config.js +++ b/config/jest.config.js @@ -5,7 +5,7 @@ module.exports = { "__DEV__": true }, "testRegex": "./test/e2e.spec.js", - "rootDir": ".", + "rootDir": "..", "testTimeout": 30000, }; diff --git a/package-lock.json b/package-lock.json index 104b38c10..296362633 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "uptime-kuma", - "version": "1.7.3", + "version": "1.8.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "uptime-kuma", - "version": "1.7.3", + "version": "1.8.0", "license": "MIT", "dependencies": { "@fortawesome/fontawesome-svg-core": "~1.2.36", @@ -64,6 +64,7 @@ "@vitejs/plugin-legacy": "~1.6.1", "@vitejs/plugin-vue": "~1.9.2", "@vue/compiler-sfc": "~3.2.19", + "babel-plugin-rewire": "^1.2.0", "core-js": "~3.18.1", "cross-env": "~7.0.3", "dns2": "~2.0.1", @@ -3331,6 +3332,12 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/babel-plugin-rewire": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-rewire/-/babel-plugin-rewire-1.2.0.tgz", + "integrity": "sha512-JBZxczHw3tScS+djy6JPLMjblchGhLI89ep15H3SyjujIzlxo5nr6Yjo7AXotdeVczeBmWs0tF8PgJWDdgzAkQ==", + "dev": true + }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", @@ -14722,6 +14729,12 @@ "@babel/helper-define-polyfill-provider": "^0.2.2" } }, + "babel-plugin-rewire": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-rewire/-/babel-plugin-rewire-1.2.0.tgz", + "integrity": "sha512-JBZxczHw3tScS+djy6JPLMjblchGhLI89ep15H3SyjujIzlxo5nr6Yjo7AXotdeVczeBmWs0tF8PgJWDdgzAkQ==", + "dev": true + }, "babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", diff --git a/package.json b/package.json index b4454601e..16f463c50 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,9 @@ "build": "vite build --config ./config/vite.config.js", "test": "node test/prepare-test-server.js && node server/server.js --port=3002 --data-dir=./data/test/ --test", "test-with-build": "npm run build && npm test", - "jest": "node test/prepare-jest.js && npm run jest-frontend && jest ", - "jest-frontend": "cross-env TEST_FRONTEND=1 jest --config=./jest-frontend.config.js", + "jest": "node test/prepare-jest.js && npm run jest-frontend && npm run jest-backend && jest --config=./config/jest.config.js", + "jest-frontend": "cross-env TEST_FRONTEND=1 jest --config=./config/jest-frontend.config.js", + "jest-backend": "cross-env TEST_BACKEND=1 jest --config=./config/jest-backend.config.js", "tsc": "tsc", "vite-preview-dist": "vite preview --host --config ./config/vite.config.js", "build-docker": "npm run build-docker-debian && npm run build-docker-alpine", @@ -59,6 +60,7 @@ "@popperjs/core": "~2.10.2", "args-parser": "~1.3.0", "axios": "~0.21.4", + "babel-plugin-rewire": "~1.2.0", "bcryptjs": "~2.4.3", "bootstrap": "~5.1.1", "chart.js": "~3.5.1", diff --git a/test/backend.spec.js b/test/backend.spec.js new file mode 100644 index 000000000..4f00c0b13 --- /dev/null +++ b/test/backend.spec.js @@ -0,0 +1,10 @@ +beforeAll(() => { + +}); + +describe("", () => { + + it("should ", () => { + + }); +}); From 5b67fec084f770c10f787db97c854d31dfec207c Mon Sep 17 00:00:00 2001 From: KangAlleW <76554157+KangAlleW@users.noreply.github.com> Date: Wed, 13 Oct 2021 02:46:11 +0700 Subject: [PATCH 06/13] add indonesian language --- src/languages/id.js | 285 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 src/languages/id.js diff --git a/src/languages/id.js b/src/languages/id.js new file mode 100644 index 000000000..30540db5a --- /dev/null +++ b/src/languages/id.js @@ -0,0 +1,285 @@ +export default { + languageName: "Indonesia", + checkEverySecond: "Cek Setiap {0} detik.", + retryCheckEverySecond: "Coba lagi setiap {0} detik.", + retriesDescription: "Percobaan ulang maksimum sebelum layanan dinyatakan tidak aktif dan notifikasi dikirim", + ignoreTLSError: "Abaikan kesalahan TLS/SSL untuk situs web HTTPS", + upsideDownModeDescription: "Balikkan statusnya. Jika layanan dapat dijangkau, TIDAK AKTIF.", + maxRedirectDescription: "Jumlah maksimum pengalihan untuk diikuti. Setel ke 0 untuk menonaktifkan pengalihan.", + acceptedStatusCodesDescription: "Pilih kode status yang dianggap sebagai respons yang berhasil.", + passwordNotMatchMsg: "Sandi kedua tidak cocok.", + notificationDescription: "Harap atur notifikasi ke monitor agar berfungsi.", + keywordDescription: "Cari kata kunci dalam code html atau JSON huruf besar-kecil berpengaruh", + pauseDashboardHome: "Jeda", + deleteMonitorMsg: "Apakah anda mau menghapus monitor ini?", + deleteNotificationMsg: "Apakah anda mau menghapus notifikasi ini untuk semua monitor?", + resoverserverDescription: "Cloudflare adalah server default, Anda dapat mengubah server resolver kapan saja.", + rrtypeDescription: "Pilih RR-Type yang mau anda monitor", + pauseMonitorMsg: "Apakah anda yakin mau menjeda?", + enableDefaultNotificationDescription: "Untuk setiap monitor baru, notifikasi ini akan diaktifkan secara default. Anda masih dapat menonaktifkan notifikasi secara terpisah untuk setiap monitor.", + clearEventsMsg: "Apakah anda yakin mau menghapus semua event di monitor ini?", + clearHeartbeatsMsg: "Apakah anda yakin mau menghapus semua heartbeats di monitor ini?", + confirmClearStatisticsMsg: "Apakah anda yakin mau menghapus semua statistik?", + importHandleDescription: "Pilih 'Lewati yang ada' jika Anda ingin melewati setiap monitor atau notifikasi dengan nama yang sama. 'Timpa' akan menghapus setiap monitor dan notifikasi yang ada.", + confirmImportMsg: "Apakah Anda yakin untuk mengimpor cadangan? Pastikan Anda telah memilih opsi impor yang tepat.", + twoFAVerifyLabel: "Silakan ketik token Anda untuk memverifikasi bahwa 2FA berfungsi", + tokenValidSettingsMsg: "Tokennya valid! Anda sekarang dapat menyimpan pengaturan 2FA.", + confirmEnableTwoFAMsg: "Apakah Anda yakin ingin mengaktifkan 2FA?", + confirmDisableTwoFAMsg: "Apakah Anda yakin ingin menonaktifkan 2FA?", + Settings: "Pengaturan", + Dashboard: "Dashboard", + "New Update": "Update Baru", + Language: "Bahasa", + Appearance: "Tampilan", + Theme: "Tema", + General: "General", + Version: "Versi", + "Check Update On GitHub": "Cek Update di GitHub", + List: "List", + Add: "Tambah", + "Add New Monitor": "Tambah Monitor Baru", + "Quick Stats": "Statistik Cepat", + Up: "Aktif", + Down: "Tidak Aktif", + Pending: "Tertunda", + Unknown: "Tidak diketahui", + Pause: "Jeda", + Name: "Nama", + Status: "Status", + DateTime: "Tanggal Waktu", + Message: "Pesan", + "No important events": "Tidak ada Event penting", + Resume: "Melanjutkan", + Edit: "Rubah", + Delete: "Hapus", + Current: "Saat ini", + Uptime: "Waktu aktif", + "Cert Exp.": "Cert Exp.", + days: "hari-hari", + day: "hari", + "-day": "-hari", + hour: "Jam", + "-hour": "-Jam", + Response: "Respon", + Ping: "Ping", + "Monitor Type": "Tipe Monitor", + Keyword: "Keyword", + "Friendly Name": "Friendly Name", + URL: "URL", + Hostname: "Hostname", + Port: "Port", + "Heartbeat Interval": "Interval Heartbeat ", + Retries: "Retries", + "Heartbeat Retry Interval": "Interval Heartbeat Mencoba kembali ", + Advanced: "Advanced", + "Upside Down Mode": "Mode Terbalik", + "Max. Redirects": "Maksimal Redirect/Pengalihan", + "Accepted Status Codes": "Kode Status yang Diterima", + Save: "Simpan", + Notifications: "Notifikasi", + "Not available, please setup.": "Tidak tersedia, silakan atur.", + "Setup Notification": "Setel Notifikasi", + Light: "Terang", + Dark: "Gelap", + Auto: "Automatis", + "Theme - Heartbeat Bar": "Theme - Heartbeat Bar", + Normal: "Normal", + Bottom: "Bawah", + None: "Tidak ada", + Timezone: "Zona Waktu", + "Search Engine Visibility": "Visibilitas Mesin Pencari", + "Allow indexing": "Mengizinkan untuk diindex", + "Discourage search engines from indexing site": "Mencegah mesin pencari untuk mengindex site", + "Change Password": "Ganti Sandi", + "Current Password": "Sandi Lama", + "New Password": "Sandi Baru", + "Repeat New Password": "Ulangi Sandi Baru", + "Update Password": "Perbarui Kata Sandi", + "Disable Auth": "Nonaktifkan auth", + "Enable Auth": "Aktifkan Auth", + Logout: "Keluar", + Leave: "Pergi", + "I understand, please disable": "Saya mengerti, silahkan dinonaktifkan", + Confirm: "Konfirmasi", + Yes: "Ya", + No: "Tidak", + Username: "Nama Pengguna", + Password: "Sandi", + "Remember me": "Ingat saya", + Login: "Masuk", + "No Monitors, please": "Tidak ada monitor, silahkan", + "add one": "tambah baru", + "Notification Type": "Tipe Notifikasi", + Email: "Email", + Test: "Test", + "Certificate Info": "Info Sertifikasi ", + "Resolver Server": "Resolver Server", + "Resource Record Type": "Resource Record Type", + "Last Result": "Hasil Terakhir", + "Create your admin account": "Buat admin akun anda", + "Repeat Password": "Ulangi Sandi", + "Import Backup": "Impor Backup", + "Export Backup": "Expor Backup", + Export: "Expor", + Import: "Impor", + respTime: "Tanggapan. Waktu (milidetik)", + notAvailableShort: "N/A", + "Default enabled": "Default diaktifkan", + "Apply on all existing monitors": "Terapkan pada semua monitor yang ada", + Create: "Buat", + "Clear Data": "Bersihkan Data", + Events: "Event", + Heartbeats: "Heartbeats", + "Auto Get": "Auto Get", + backupDescription: "Anda dapat mencadangkan semua monitor dan semua notifikasi ke dalam file JSON.", + backupDescription2: "Catatan: Data sejarah dan event tidak disertakan.", + backupDescription3: "Data sensitif seperti notifikasi token disertakan dalam file ekspor, harap simpan dengan hati-hati.", + alertNoFile: "Silakan pilih file untuk diimpor.", + alertWrongFileType: "Silakan pilih file JSON .", + "Clear all statistics": "Hapus semua statistik", + "Skip existing": "Lewati yang ada", + Overwrite: "Timpa", + Options: "Opsi", + "Keep both": "Simpan keduanya", + "Verify Token": "Verifikasi Token", + "Setup 2FA": "Pengaturan 2FA", + "Enable 2FA": "Aktifkan 2FA", + "Disable 2FA": "Nonaktifkan 2FA", + "2FA Settings": "Settings 2FA", + "Two Factor Authentication": "Otentikasi Dua Faktor", + Active: "Aktif", + Inactive: "Tidak Aktif", + Token: "Token", + "Show URI": "Lihat URI", + Tags: "Tag", + "Add New below or Select...": "Tambahkan Baru di bawah atau Pilih...", + "Tag with this name already exist.": "Tag dengan nama ini sudah ada.", + "Tag with this value already exist.": "Tag dengan nilai ini sudah ada.", + color: "warna", + "value (optional)": "nilai (harus diisi)", + Gray: "Abu Abu", + Red: "Merah", + Orange: "Oranye", + Green: "Hijau", + Blue: "Biru", + Indigo: "Indigo", + Purple: "Ungu", + Pink: "Merah Muda", + "Search...": "Cari...", + "Avg. Ping": "Rata-rata. Ping", + "Avg. Response": "Rata-rata. Respon", + "Entry Page": "Halaman Masuk", + statusPageNothing: "Tidak ada di sini, silakan tambahkan grup atau monitor.", + "No Services": "Tidak ada Layanan", + "All Systems Operational": "Semua Sistem Berfungsi", + "Partially Degraded Service": "Layanan Terdegradasi Sebagian", + "Degraded Service": "Layanan Terdegradasi", + "Add Group": "Tambah Grup", + "Add a monitor": "Tambah monitor", + "Edit Status Page": "Edit Halaman Status", + "Go to Dashboard": "Lihat Dashboard", + "Status Page": "Halaman Status", + // Start notification form + defaultNotificationName: "{notification} saya Peringatan ({number})", + here: "di sini", + "Required": "Dibutuhkan", + "telegram": "Telegram", + "Bot Token": "Bot Token", + "You can get a token from": "Anda bisa mendapatkan token dari", + "Chat ID": "Chat ID", + supportTelegramChatID: "Mendukung Obrolan Langsung / Grup / Channel Chat ID", + wayToGetTelegramChatID: "Anda bisa mendapatkan chat id Anda dengan mengirim pesan ke bot dan pergi ke url ini untuk melihat chat_id:", + "YOUR BOT TOKEN HERE": "BOT TOKEN ANDA DI SINI", + chatIDNotFound: "Chat ID tidak ditemukan, tolong kirim pesan ke bot ini dulu", + "webhook": "Webhook", + "Post URL": "Post URL", + "Content Type": "Tipe konten", + webhookJsonDesc: "{0} bagus untuk server http modern seperti express.js", + webhookFormDataDesc: "{multipart} bagus untuk PHP, Anda hanya perlu mengurai json dengan {decodeFunction}", + "smtp": "Email (SMTP)", + secureOptionNone: "None / STARTTLS (25, 587)", + secureOptionTLS: "TLS (465)", + "Ignore TLS Error": "Ignore TLS Error", + "From Email": "From Email", + "To Email": "To Email", + smtpCC: "CC", + smtpBCC: "BCC", + "discord": "Discord", + "Discord Webhook URL": "Discord Webhook URL", + wayToGetDiscordURL: "Anda bisa mendapatkan ini dengan pergi ke Server Settings -> Integrations -> Create Webhook", + "Bot Display Name": "Nama Bot", + "Prefix Custom Message": "Prefix Pesan", + "Hello @everyone is...": "Hallo {'@'}everyone is...", + "teams": "Microsoft Teams", + "Webhook URL": "Webhook URL", + wayToGetTeamsURL: "Anda dapat mempelajari cara membuat url webhook {0}.", + "signal": "Sinyal", + "Number": "Nomer", + "Recipients": "Penerima", + needSignalAPI: "Anda harus memiliki klien sinyal dengan REST API.", + wayToCheckSignalURL: "Anda dapat memeriksa url ini untuk melihat cara menyiapkannya:", + signalImportant: "PENTING: Anda tidak dapat mencampur grup dan nomor di penerima!", + "gotify": "Gotify", + "Application Token": "Token Aplikasi", + "Server URL": "Server URL", + "Priority": "Prioritas", + "slack": "Slack", + "Icon Emoji": "Icon Emoji", + "Channel Name": "Nama Channel", + "Uptime Kuma URL": "Uptime Kuma URL", + aboutWebhooks: "Info lain tentang webhook: {0}", + aboutChannelName: "Masukan nama channel di {0} Kolom Nama Channel jika Anda ingin melewati channel webhook. Contoh: #other-channel", + aboutKumaURL: "Jika Anda membiarkan bidang URL Uptime Kuma kosong, itu akan menjadi default ke halaman Project Github.", + emojiCheatSheet: "Emoji cheat sheet: {0}", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + promosms: "PromoSMS", + lunasea: "LunaSea", + apprise: "Apprise (Mendukung 50+ layanan notifikasi)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", + "User Key": "Kunci pengguna", + "Device": "Perangkat", + "Message Title": "Judul Pesan", + "Notification Sound": "Suara Nofifikasi", + "More info on:": "Info lebih lanjut tentang: {0}", + pushoverDesc1: "Prioritas darurat (2) memiliki batas waktu default 30 detik antara percobaan ulang dan akan kadaluwarsa setelah 1 jam.", + pushoverDesc2: "Jika Anda ingin mengirim pemberitahuan ke perangkat yang berbeda, isi kolom Perangkat.", + "SMS Type": "Tipe SMS", + octopushTypePremium: "Premium (Cepat - direkomendasikan untuk mengingatkan)", + octopushTypeLowCost: "Low Cost (Lambat, terkadang diblokir oleh operator)", + "Check octopush prices": "Cek harga octopush {0}.", + octopushPhoneNumber: "Nomer Telpon/HP (format internasional, contoh : +33612345678) ", + octopushSMSSender: "Nama Pengirim SMS : 3-11 karakter alfanumerik dan spasi (a-zA-Z0-9)", + "LunaSea Device ID": "LunaSea Device ID", + "Apprise URL": "Apprise URL", + "Example:": "Contoh: {0}", + "Read more:": "Baca lebih lajut: {0}", + "Status:": "Status: {0}", + "Read more": "Baca lebih lajut", + appriseInstalled: "Apprise diinstall.", + appriseNotInstalled: "Apprise tidak diinstall. {0}", + "Access Token": "Access Token", + "Channel access token": "Channel access token", + "Line Developers Console": "Line Developers Console", + lineDevConsoleTo: "Line Developers Console - {0}", + "Basic Settings": "Pengaturan dasar", + "User ID": "User ID", + "Messaging API": "Messaging API", + wayToGetLineChannelToken: "Pertama akses {0}, buat penyedia dan saluran (Messaging API), lalu Anda bisa mendapatkan token akses saluran dan id pengguna dari item menu yang disebutkan di atas.", + "Icon URL": "Icon URL", + aboutIconURL: "Anda dapat memberikan tautan ke gambar di \"Icon URL\" untuk mengganti gambar profil default. Tidak akan digunakan jika Ikon Emoji diset.", + aboutMattermostChannelName: "Anda dapat mengganti channel default tujuan posting webhook dengan memasukkan nama channel ke dalam Kolom \"Channel Name\". Ini perlu diaktifkan di pengaturan webhook Mattermost. contoh: #other-channel", + "matrix": "Matrix", + promosmsTypeEco: "SMS ECO - murah tapi lambat dan sering kelebihan beban. Terbatas hanya untuk penerima Polandia.", + promosmsTypeFlash: "SMS FLASH - Pesan akan otomatis muncul di perangkat penerima. Terbatas hanya untuk penerima Polandia.", + promosmsTypeFull: "SMS FULL - SMS tingkat premium, Anda dapat menggunakan Nama Pengirim Anda (Anda harus mendaftarkan nama terlebih dahulu). Dapat diandalkan untuk peringatan.", + promosmsTypeSpeed: "SMS SPEED - Prioritas tertinggi dalam sistem. Sangat cepat dan dapat diandalkan tetapi mahal (sekitar dua kali lipat dari harga SMS FULL).", + promosmsPhoneNumber: "Nomor telepon (untuk penerima Polandia Anda dapat melewati kode area)", + promosmsSMSSender: "Nama Pengirim SMS : Nama pra-registrasi atau salah satu default: InfoSMS, Info SMS, MaxSMS, INFO, SMS", + "Feishu WebHookUrl": "Feishu WebHookUrl", + // End notification form +}; From 4b9f0a3fe673381cd59b8cbe174f5b332bddc1c3 Mon Sep 17 00:00:00 2001 From: KangAlleW <76554157+KangAlleW@users.noreply.github.com> Date: Wed, 13 Oct 2021 02:53:46 +0700 Subject: [PATCH 07/13] add indonesian language and edit settings.vue --- src/pages/Settings.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 8fad9d143..979417774 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -333,6 +333,12 @@

Utilizzare con attenzione.

+ + -