This is an automated email from the ASF dual-hosted git repository.
zhaoqingran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new ba735545f [improve] tips need update initial default password (#2030)
ba735545f is described below
commit ba735545fb8755a51bf0f8091dfb9eb0281a01d0
Author: tomsun28 <[email protected]>
AuthorDate: Sat May 25 00:22:00 2024 +0800
[improve] tips need update initial default password (#2030)
Signed-off-by: tomsun28 <[email protected]>
---
manager/src/main/resources/sureness.yml | 6 +++---
.../hertzbeat-mysql-iotdb/conf/sureness.yml | 6 +++---
.../hertzbeat-mysql-tdengine/conf/sureness.yml | 6 +++---
.../conf/sureness.yml | 6 +++---
.../hertzbeat-postgresql-iotdb/conf/sureness.yml | 6 +++---
.../helm/hertzbeat/templates/manager/configmap.yaml | 6 +++---
script/sureness.yml | 6 +++---
web-app/src/app/core/startup/startup.service.ts | 2 +-
.../app/routes/passport/login/login.component.html | 20 ++++++++++++++++++++
.../src/app/routes/passport/login/login.component.ts | 5 +++++
web-app/src/assets/i18n/en-US.json | 1 +
web-app/src/assets/i18n/zh-CN.json | 1 +
web-app/src/assets/i18n/zh-TW.json | 1 +
13 files changed, 50 insertions(+), 22 deletions(-)
diff --git a/manager/src/main/resources/sureness.yml
b/manager/src/main/resources/sureness.yml
index 0cea278a3..c7253ff88 100644
--- a/manager/src/main/resources/sureness.yml
+++ b/manager/src/main/resources/sureness.yml
@@ -113,8 +113,8 @@ account:
role: [guest]
- appId: lili
# credential = MD5(password + salt)
- # plain password: lili
+ # plain password: hertzbeat
# attention: digest authentication does not support salted encrypted
password accounts
- credential: 1A676730B0C7F54654B0E09184448289
+ credential: 94C6B34E7A199A9F9D4E1F208093B489
salt: 123
- role: [guest]
+ role: [user]
diff --git a/script/docker-compose/hertzbeat-mysql-iotdb/conf/sureness.yml
b/script/docker-compose/hertzbeat-mysql-iotdb/conf/sureness.yml
index 0cea278a3..c7253ff88 100644
--- a/script/docker-compose/hertzbeat-mysql-iotdb/conf/sureness.yml
+++ b/script/docker-compose/hertzbeat-mysql-iotdb/conf/sureness.yml
@@ -113,8 +113,8 @@ account:
role: [guest]
- appId: lili
# credential = MD5(password + salt)
- # plain password: lili
+ # plain password: hertzbeat
# attention: digest authentication does not support salted encrypted
password accounts
- credential: 1A676730B0C7F54654B0E09184448289
+ credential: 94C6B34E7A199A9F9D4E1F208093B489
salt: 123
- role: [guest]
+ role: [user]
diff --git a/script/docker-compose/hertzbeat-mysql-tdengine/conf/sureness.yml
b/script/docker-compose/hertzbeat-mysql-tdengine/conf/sureness.yml
index 0cea278a3..c7253ff88 100644
--- a/script/docker-compose/hertzbeat-mysql-tdengine/conf/sureness.yml
+++ b/script/docker-compose/hertzbeat-mysql-tdengine/conf/sureness.yml
@@ -113,8 +113,8 @@ account:
role: [guest]
- appId: lili
# credential = MD5(password + salt)
- # plain password: lili
+ # plain password: hertzbeat
# attention: digest authentication does not support salted encrypted
password accounts
- credential: 1A676730B0C7F54654B0E09184448289
+ credential: 94C6B34E7A199A9F9D4E1F208093B489
salt: 123
- role: [guest]
+ role: [user]
diff --git
a/script/docker-compose/hertzbeat-mysql-victoria-metrics/conf/sureness.yml
b/script/docker-compose/hertzbeat-mysql-victoria-metrics/conf/sureness.yml
index 0cea278a3..c7253ff88 100644
--- a/script/docker-compose/hertzbeat-mysql-victoria-metrics/conf/sureness.yml
+++ b/script/docker-compose/hertzbeat-mysql-victoria-metrics/conf/sureness.yml
@@ -113,8 +113,8 @@ account:
role: [guest]
- appId: lili
# credential = MD5(password + salt)
- # plain password: lili
+ # plain password: hertzbeat
# attention: digest authentication does not support salted encrypted
password accounts
- credential: 1A676730B0C7F54654B0E09184448289
+ credential: 94C6B34E7A199A9F9D4E1F208093B489
salt: 123
- role: [guest]
+ role: [user]
diff --git a/script/docker-compose/hertzbeat-postgresql-iotdb/conf/sureness.yml
b/script/docker-compose/hertzbeat-postgresql-iotdb/conf/sureness.yml
index 0cea278a3..c7253ff88 100644
--- a/script/docker-compose/hertzbeat-postgresql-iotdb/conf/sureness.yml
+++ b/script/docker-compose/hertzbeat-postgresql-iotdb/conf/sureness.yml
@@ -113,8 +113,8 @@ account:
role: [guest]
- appId: lili
# credential = MD5(password + salt)
- # plain password: lili
+ # plain password: hertzbeat
# attention: digest authentication does not support salted encrypted
password accounts
- credential: 1A676730B0C7F54654B0E09184448289
+ credential: 94C6B34E7A199A9F9D4E1F208093B489
salt: 123
- role: [guest]
+ role: [user]
diff --git a/script/helm/hertzbeat/templates/manager/configmap.yaml
b/script/helm/hertzbeat/templates/manager/configmap.yaml
index 0442bb3a5..3efb85f67 100644
--- a/script/helm/hertzbeat/templates/manager/configmap.yaml
+++ b/script/helm/hertzbeat/templates/manager/configmap.yaml
@@ -262,8 +262,8 @@ data:
role: [guest]
- appId: lili
# credential = MD5(password + salt)
- # plain password: lili
+ # plain password: hertzbeat
# attention: digest authentication does not support salted encrypted
password accounts
- credential: 1A676730B0C7F54654B0E09184448289
+ credential: 94C6B34E7A199A9F9D4E1F208093B489
salt: 123
- role: [guest]
+ role: [user]
diff --git a/script/sureness.yml b/script/sureness.yml
index 0cea278a3..c7253ff88 100644
--- a/script/sureness.yml
+++ b/script/sureness.yml
@@ -113,8 +113,8 @@ account:
role: [guest]
- appId: lili
# credential = MD5(password + salt)
- # plain password: lili
+ # plain password: hertzbeat
# attention: digest authentication does not support salted encrypted
password accounts
- credential: 1A676730B0C7F54654B0E09184448289
+ credential: 94C6B34E7A199A9F9D4E1F208093B489
salt: 123
- role: [guest]
+ role: [user]
diff --git a/web-app/src/app/core/startup/startup.service.ts
b/web-app/src/app/core/startup/startup.service.ts
index ef5b03972..1dabb86aa 100644
--- a/web-app/src/app/core/startup/startup.service.ts
+++ b/web-app/src/app/core/startup/startup.service.ts
@@ -39,7 +39,7 @@ export class StartupService {
return zip(
this.i18n.loadLangData(defaultLang),
this.httpClient.get('./assets/app-data.json', { headers: headers }),
- this.httpClient.get('/apps/hierarchy')
+ this.httpClient.get(`/apps/hierarchy?lang=${defaultLang}`)
).pipe(
catchError((res: NzSafeAny) => {
console.warn(`StartupService.load: Network request failed`, res);
diff --git a/web-app/src/app/routes/passport/login/login.component.html
b/web-app/src/app/routes/passport/login/login.component.html
index caf0fa8c0..f5809bc6d 100644
--- a/web-app/src/app/routes/passport/login/login.component.html
+++ b/web-app/src/app/routes/passport/login/login.component.html
@@ -36,6 +36,26 @@
</nz-input-group>
</nz-form-control>
</nz-form-item>
+ <nz-alert
+ *ngIf="needUpdatePassword"
+ [nzType]="'warning'"
+ [nzMessage]="showPasswdChange"
+ [nzShowIcon]="true"
+ class="mb-lg"
+ ></nz-alert>
+ <ng-template #showPasswdChange>
+ <a href="https://hertzbeat.apache.org/docs/start/account-modify"
target="_blank">
+ <span>
+ {{ 'app.login.need-change-password' | i18n }}
+ <svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0
24 24" style="margin-left: 4px">
+ <path
+ fill="currentColor"
+ d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035
4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"
+ ></path>
+ </svg>
+ </span>
+ </a>
+ </ng-template>
<nz-form-item>
<nz-col [nzSpan]="12">
<label nz-checkbox formControlName="remember">{{
'app.login.remember-me' | i18n }}</label>
diff --git a/web-app/src/app/routes/passport/login/login.component.ts
b/web-app/src/app/routes/passport/login/login.component.ts
index 99f349a63..df9d47aed 100644
--- a/web-app/src/app/routes/passport/login/login.component.ts
+++ b/web-app/src/app/routes/passport/login/login.component.ts
@@ -80,6 +80,7 @@ export class UserLoginComponent implements OnDestroy {
error = '';
type = 0;
loading = false;
+ needUpdatePassword = false;
// #region get captcha
@@ -104,6 +105,10 @@ export class UserLoginComponent implements OnDestroy {
if (this.userName.invalid || this.password.invalid) {
return;
}
+ if (!this.needUpdatePassword && this.password.value === 'hertzbeat') {
+ this.needUpdatePassword = true;
+ return;
+ }
} else {
this.mobile.markAsDirty();
this.mobile.updateValueAndValidity();
diff --git a/web-app/src/assets/i18n/en-US.json
b/web-app/src/assets/i18n/en-US.json
index a7e96341b..3de3ee76f 100644
--- a/web-app/src/assets/i18n/en-US.json
+++ b/web-app/src/assets/i18n/en-US.json
@@ -496,6 +496,7 @@
"app.passport.intro-2": "Real-Time Monitoring",
"app.login.message-need-identifier": "Please enter your username",
"app.login.message-need-credential": "Please enter password",
"app.login.message-invalid-credentials": "Invalid username or password",
+ "app.login.need-change-password": "Please update the initial default
password in time!",
"app.login.tab-login-credentials": "Sign In HertzBeat",
"app.login.remember-me": "Remember me",
"app.login.login": "Login",
diff --git a/web-app/src/assets/i18n/zh-CN.json
b/web-app/src/assets/i18n/zh-CN.json
index 3497d5d28..92326cf3c 100644
--- a/web-app/src/assets/i18n/zh-CN.json
+++ b/web-app/src/assets/i18n/zh-CN.json
@@ -495,6 +495,7 @@
"app.login.message-need-identifier": "请输入用户名",
"app.login.message-need-credential": "请输入密码",
"app.login.message-invalid-credentials": "账户或密码错误",
+ "app.login.need-change-password": "请及时更新初始默认密码!",
"app.login.tab-login-credentials": "登入 HertzBeat",
"app.login.remember-me": "自动登录",
"app.login.login": "登录",
diff --git a/web-app/src/assets/i18n/zh-TW.json
b/web-app/src/assets/i18n/zh-TW.json
index a0acbfec8..07df1657a 100644
--- a/web-app/src/assets/i18n/zh-TW.json
+++ b/web-app/src/assets/i18n/zh-TW.json
@@ -494,6 +494,7 @@
"app.login.message-need-identifier": "請輸入用戶名",
"app.login.message-need-credential": "請輸入密碼",
"app.login.message-invalid-credentials": "賬戶或密碼錯誤",
+ "app.login.need-change-password": "請及時更新初始默認密碼!",
"app.login.tab-login-credentials": "登錄 HertzBeat",
"app.login.remember-me": "自動登錄",
"app.login.login": "登錄",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]