Skip to content

Commit

Permalink
Merge branch 'master' into feature/integrate_apache_arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsun28 authored Dec 24, 2024
2 parents e4dda4f + 6a64752 commit 2926573
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
* under the License.
*/

import { Component, EventEmitter, Input, Output, OnChanges, SimpleChanges } from '@angular/core';
import { Component, EventEmitter, Input, Output, OnChanges, SimpleChanges, Inject } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { I18NService } from '@core';
import { ALAIN_I18N_TOKEN } from '@delon/theme';
import { NzNotificationService } from 'ng-zorro-antd/notification';

import { Collector } from '../../../pojo/Collector';
import { Param } from '../../../pojo/Param';
Expand Down Expand Up @@ -51,7 +54,7 @@ export class MonitorFormComponent implements OnChanges {

hasAdvancedParams: boolean = false;

constructor() {}
constructor(private notifySvc: NzNotificationService, @Inject(ALAIN_I18N_TOKEN) private i18nSvc: I18NService) {}

ngOnChanges(changes: SimpleChanges) {
if (changes.advancedParams && changes.advancedParams.currentValue !== changes.advancedParams.previousValue) {
Expand Down Expand Up @@ -152,9 +155,11 @@ export class MonitorFormComponent implements OnChanges {
if (portParam) {
if (booleanValue && (portParam.paramValue == null || parseInt(portParam.paramValue) === 80)) {
portParam.paramValue = 443;
this.notifySvc.info(this.i18nSvc.fanyi('common.notice'), this.i18nSvc.fanyi('monitors.new.notify.change-to-https'));
}
if (!booleanValue && (portParam.paramValue == null || parseInt(portParam.paramValue) === 443)) {
portParam.paramValue = 80;
this.notifySvc.info(this.i18nSvc.fanyi('common.notice'), this.i18nSvc.fanyi('monitors.new.notify.change-to-http'));
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions web-app/src/assets/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@
"monitors.new-monitor": "New Monitor",
"monitors.new.success": "New Monitor Success",
"monitors.new.failed": "New Monitor Failed",
"monitors.new.notify.change-to-https": "HTTPS has been enabled, and the port number has been automatically changed to 443. Please take note.",
"monitors.new.notify.change-to-http": "HTTPS has been disabled, and the port number has been automatically changed to 80. Please take note.",
"monitors.edit": "Edit",
"monitors.edit.success": "Update Monitor Success",
"monitors.edit.failed": "Update Monitor Failed",
Expand Down
2 changes: 2 additions & 0 deletions web-app/src/assets/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@
"monitors.new-monitor": "新增监控",
"monitors.new.success": "新增监控成功",
"monitors.new.failed": "新增监控失败",
"monitors.new.notify.change-to-https": "已开启HTTPS,端口号自动更改为 443,请留意。",
"monitors.new.notify.change-to-http": "已关闭HTTPS,端口号自动更改为 80,请留意。",
"monitors.edit": "编辑",
"monitors.edit.success": "修改监控成功",
"monitors.edit.failed": "修改监控失败",
Expand Down
2 changes: 2 additions & 0 deletions web-app/src/assets/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@
"monitors.new-monitor": "新增監控",
"monitors.new.success": "新增監控成功",
"monitors.new.failed": "新增監控失敗",
"monitors.new.notify.change-to-https": "已啟用 HTTPS,連接埠號已自動更改為 443,請注意。",
"monitors.new.notify.change-to-http": "已停用 HTTPS,連接埠號已自動更改為 80,請注意。",
"monitors.edit": "編輯",
"monitors.edit.success": "修改監控成功",
"monitors.edit.failed": "修改監控失敗",
Expand Down

0 comments on commit 2926573

Please sign in to comment.