</div>
<div class="align-self-center p-1">
<label class="alert-msg">
- {{ this.message }}
+ {{ this.message | translate }}
</label>
</div>
</div>
<div class="toast {{cssClass(item) }}" aria-live="polite" style="display: block;">
<button type="button" class="toast-close-button" role="button" (click)="removeNotification(item)">×</button>
<div class="toast-message">
- {{item.message}}
+ {{item.message | translate}}
</div>
</div>
</div>
loading: Boolean = true;
tempDbDetail: Dashboard;
- selectedLangs = sessionStorage.getItem("selectedLang") || "en-us";
dashboardDeteleModelShow = true;
// nameArr = [];
openDashboardModal(thisIndex: number) {
var modalRef, index;
- this.selectedLangs = sessionStorage.getItem("selectedLang") || "en-us";
- let tips = "";
index = thisIndex;
console.log(index, "index,add or edit");
modalRef = this.modalService.open(CreateDashboardComponent, {
console.log(res);
if (res.statusCode == 200) {
this.initData();
- if (this.selectedLangs == "en-us") {
- tips = "Success updated."
- } else if (this.selectedLangs == "zh-hans") {
- tips = "更新成功。"
- } else if (this.selectedLangs == "zh-hant") {
- tips = "更新成功。"
- }
- this.notificationService.success('"' + host + '"' + tips);
+ this.notificationService.success("SUCCESSFULLY_UPDATED");
} else {
- if (this.selectedLangs == "en-us") {
- tips = "Fail updated."
- } else if (this.selectedLangs == "zh-hans") {
- tips = "更新失败。"
- } else if (this.selectedLangs == "zh-hant") {
- tips = "更新失敗。"
- }
- this.notificationService.error('"' + host + '"' + tips);
+ this.notificationService.error("FAILED_UPDATED");
}
modalRef.close();
},
console.log(res);
if (res.statusCode == 200) {
this.initData();
- if (this.selectedLangs == "en-us") {
- tips = "Success deleted."
- } else if (this.selectedLangs == "zh-hans") {
- tips = "删除成功。"
- } else if (this.selectedLangs == "zh-hant") {
- tips = "刪除成功。"
- }
- this.notificationService.success('"' + host + '"' + tips);
+ this.notificationService.success("SUCCESSFULLY_DELETED");
} else {
this.dbs[thisIndex].enabled = true;
- if (this.selectedLangs == "en-us") {
- tips = "Fail deleted."
- } else if (this.selectedLangs == "zh-hans") {
- tips = "删除失败。"
- } else if (this.selectedLangs == "zh-hant") {
- tips = "刪除失敗。"
- }
- this.notificationService.error('"' + host + '"' + tips);
+ this.notificationService.error("FAILED_DELETED");
}
modalRef.close();
},
private translateService: TranslateService
) {
this.translateService.setDefaultLang("en-us");
- sessionStorage.setItem("selectedLang","en-us");
}
ngOnInit() {
changeLanguage(lang: string) {
this.translateService.use(lang);
- sessionStorage.setItem("selectedLang",lang);
}
changeFeederStatus() {
"SINK": "Sink",
"AUTHENTICATION": "Authentication",
"DATA_FORMAT": "Data format",
- "TTL": "TTL",
+ "TTL": "TTL(days)",
"SAVE_RAW_DATA": "Save raw data",
"CORRELATE_CLEARED_MESSAGE": "Correlate cleared message",
"DEFAULT_CONFIGURATIONS": "Default configurations",
"BUCKET": "Bucket",
"HOST": "Host",
"PORT": "Port",
- "ENABLE_SSL": "Enable SSL",
+ "ENABLE_SSL": "Encrypt Communication",
"VERIFY": "Verify",
"SETTING": "Setting",
"DEPLOY_TO_DASHBOARD":"Deploy",
"DEPLOY":"Deploy",
"NEW_TEMPLATE":"New template",
- "TEMPLATE_BODY":"Template Body"
+ "TEMPLATE_BODY":"Body",
+
+ "SUCCESSFULLY_CREARED":"Successfully created.",
+ "FAILED_CREARED":"Failed updated.",
+ "SUCCESSFULLY_UPDATED":"Successfully updated.",
+ "FAILED_UPDATED":"Failed updated.",
+ "SUCCESSFULLY_DELETED":"Successfully deleted.",
+ "FAILED_DELETED":"Failed deleted.",
+ "Deploy_SUCCESSFULLY":"Deploy successfully.",
+ "Deploy_FAILED":"Deploy failed.",
+ "ARE_YOU_SURE_DELETE":"Are you sure you want to delete it?"
+
}
"SINK": "数据库",
"AUTHENTICATION": "身份验证",
"DATA_FORMAT": "数据格式",
- "TTL": "数据失效时间",
+ "TTL": "失效时间(天)",
"SAVE_RAW_DATA": "保存原始数据",
"CORRELATE_CLEARED_MESSAGE": "关联已清除的消息",
"DEFAULT_CONFIGURATIONS": "默认配置",
"BUCKET": "Bucket",
"HOST": "主机",
"PORT": "端口",
- "ENABLE_SSL": "使用SSL",
+ "ENABLE_SSL": "加密通信",
"VERIFY": "验证",
"SETTING": "设置",
"DEPLOY_TO_DASHBOARD":"部署",
"DEPLOY":"部署",
"NEW_TEMPLATE":"新建模板",
- "TEMPLATE_BODY":"模板体"
+ "TEMPLATE_BODY":"模板体",
+
+ "SUCCESSFULLY_CREARED":"创建成功",
+ "FAILED_CREARED":"创建失败",
+ "SUCCESSFULLY_UPDATED":"更新成功",
+ "FAILED_UPDATED":"更新失败",
+ "SUCCESSFULLY_DELETED":"删除成功",
+ "FAILED_DELETED":"删除失败",
+ "Deploy_SUCCESSFULLY":"部署成功",
+ "Deploy_FAILED":"部署失败",
+ "ARE_YOU_SURE_DELETE":"您确定您要删除吗?"
}
"SINK": "資料庫",
"AUTHENTICATION": "身份驗證",
"DATA_FORMAT": "檔案格式",
- "TTL": "存活時間",
+ "TTL": "存活時間(天)",
"SAVE_RAW_DATA": "保存原始資料",
"CORRELATE_CLEARED_MESSAGE": "關聯已清除的訊息",
"DEFAULT_CONFIGURATIONS": "預設配置",
"BUCKET": "Bucket",
"HOST": "主機",
"PORT": "埠",
- "ENABLE_SSL": "使用SSL",
+ "ENABLE_SSL": "加密通信",
"VERIFY": "驗證",
"SETTING": "設定",
"DEPLOY_TO_DASHBOARD":"部署",
"DEPLOY":"部署",
"NEW_TEMPLATE":"新建模板",
- "TEMPLATE_BODY":"模板體"
+ "TEMPLATE_BODY":"模板體",
+
+ "SUCCESSFULLY_CREARED":"創建成功",
+ "FAILED_CREARED":"創建失败",
+ "SUCCESSFULLY_UPDATED":"更新成功",
+ "FAILED_UPDATED":"更新失败",
+ "SUCCESSFULLY_DELETED":"刪除成功",
+ "FAILED_DELETED":"删除失败",
+ "Deploy_SUCCESSFULLY":"部署成功",
+ "Deploy_FAILED":"部署失败",
+ "ARE_YOU_SURE_DELETE":"您確定您要刪除嗎?"
}