Browse Source

refactor: 根据规范修改国际化的key

qufenxi
langwenda 6 years ago
parent
commit
4caf137149
  1. 2
      src/app/app.model.ts
  2. 2
      src/app/link_set/left/left.service.ts
  3. 10
      src/app/link_set/left/left_item/left.item.component.ts
  4. 6
      src/app/link_set/left/left_item/left.item.icon.component.ts
  5. 2
      src/app/link_set/link-set.component.ts
  6. 16
      src/app/link_set/link-set.model.ts
  7. 2
      src/app/link_set/more/more.link.component.ts
  8. 2
      src/app/link_set/more/more.link.service.ts
  9. 4
      src/app/link_set/right/nothing.component.ts
  10. 48
      src/app/link_set/right/right_edit/right.edit.component.ts
  11. 42
      src/app/link_set/right/right_edit/right.edit.mysql.component.ts
  12. 24
      src/app/link_set/right/right_show/right.show.component.ts
  13. 10
      src/app/link_set/right/right_title/right.title.component.ts
  14. 10
      src/app/link_set/select/select.component.ts
  15. 2
      src/app/link_set/select/select.service.ts
  16. 2
      src/app/link_status/left/left.service.ts
  17. 4
      src/app/link_status/link_status.component.ts
  18. 4
      src/app/link_status/right/right.card.component.ts
  19. 4
      src/app/link_status/right/right.component.ts
  20. 2
      src/app/title/title.component.ts
  21. 2
      src/app/title/title_item/title_item.component.ts
  22. 12
      src/demo/plugin.redis.edit.ts
  23. 6
      src/demo/plugin.redis.preview.ts
  24. 2
      src/demo/plugin.tedis.pool.ts
  25. 110
      src/lib/locale/i18n_zh_CN.js
  26. 12
      src/shared/service/dialog.service.ts

2
src/app/app.model.ts

@ -7,7 +7,7 @@ const Model: ModelType = {
childContext: ['tab', 'linkList', 'linkSelected', 'linkUpdate', 'moreLinkSelected', 'statusSelected', 'connectionNameErr'], childContext: ['tab', 'linkList', 'linkSelected', 'linkUpdate', 'moreLinkSelected', 'statusSelected', 'connectionNameErr'],
state () { state () {
return { return {
tab: BI.i18nText('BI-Data_Connection_Management'), tab: BI.i18nText('Dec-Dcm_Connection_Management'),
linkList, linkList,
linkSelected: {}, linkSelected: {},
linkUpdate: {}, linkUpdate: {},

2
src/app/link_set/left/left.service.ts

@ -10,7 +10,7 @@ export const getLinks = (linkList: LinkType[]): any => {
title: item.connectionName, title: item.connectionName,
id: item.connectionId, id: item.connectionId,
creator: item.creator, creator: item.creator,
text: item.text ? item.text : BI.i18nText('BI-Default'), text: item.text ? item.text : BI.i18nText('Dec-Dcm_Default'),
}); });
}); });

10
src/app/link_set/left/left_item/left.item.component.ts

@ -24,7 +24,7 @@ const Widget: WidgetType = {
cls: 'link-font', cls: 'link-font',
height: 24, height: 24,
width: 26, width: 26,
text: BI.i18nText('BI-Connections'), text: BI.i18nText('Dec-Dcm_Connections'),
title, title,
}, },
{ {
@ -41,25 +41,25 @@ const Widget: WidgetType = {
{ {
type: ItemIcon, type: ItemIcon,
cls: 'link-text-font', cls: 'link-text-font',
title: BI.i18nText('BI-Test-Connection'), title: BI.i18nText('Dec-Dcm_Test_Connection'),
id, id,
}, },
{ {
type: ItemIcon, type: ItemIcon,
cls: 'copy-font', cls: 'copy-font',
title: BI.i18nText('BI-Copy'), title: BI.i18nText('Dec-Dcm_Copy'),
id, id,
}, },
{ {
type: ItemIcon, type: ItemIcon,
cls: 'info-font', cls: 'info-font',
title: `${BI.i18nText('BI-Type')}${text === 'DESIGNER' ? BI.i18nText('BI-Other') : text} \r\n${BI.i18nText('BI-Creator')}${creator}`, title: `${BI.i18nText('Dec-Dcm_Type')}${text === 'DESIGNER' ? BI.i18nText('Dec-Dcm_Other') : text} \r\n${BI.i18nText('Dec-Dcm_Creator')}${creator}`,
id, id,
}, },
{ {
type: ItemIcon, type: ItemIcon,
cls: 'delete-font', cls: 'delete-font',
title: BI.i18nText('BI-Delete'), title: BI.i18nText('Dec-Dcm_Delete'),
id, id,
}, },
], ],

6
src/app/link_set/left/left_item/left.item.icon.component.ts

@ -10,7 +10,7 @@ const Widget: WidgetType = {
const that = this; const that = this;
let iconContent: any = null; let iconContent: any = null;
let combo: any = null; let combo: any = null;
if (title === BI.i18nText('BI-Delete')) { if (title === BI.i18nText('Dec-Dcm_Delete')) {
return { return {
type: BubbleCombo, type: BubbleCombo,
direction: 'bottom', direction: 'bottom',
@ -30,7 +30,7 @@ const Widget: WidgetType = {
}, },
popup: { popup: {
type: TextBubblePopupBarView, type: TextBubblePopupBarView,
text: BI.i18nText('BI-Connection-Make-Sure-Delete'), text: BI.i18nText('Dec-Dcm_Connection_Make_Sure_Delete'),
listeners: [{ listeners: [{
eventName: BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, eventName: BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,
action (type: boolean) { action (type: boolean) {
@ -70,7 +70,7 @@ const Widget: WidgetType = {
}, },
mounted() { mounted() {
const {title, id} = this.options; const {title, id} = this.options;
if (title !== BI.i18nText('BI-Delete')) { if (title !== BI.i18nText('Dec-Dcm_Delete')) {
this.element.on('click', (event: any) => { this.element.on('click', (event: any) => {
event.stopPropagation(); event.stopPropagation();
this.store.onIconClick(title, id); this.store.onIconClick(title, id);

2
src/app/link_set/link-set.component.ts

@ -10,7 +10,7 @@ const Widget: WidgetType = {
}, },
watch:{ watch:{
tab(tab: string) { tab(tab: string) {
this.setVisible(tab === BI.i18nText('BI-Data_Connection_Management')); this.setVisible(tab === BI.i18nText('Dec-Dcm_Connection_Management'));
}, },
}, },
render() { render() {

16
src/app/link_set/link-set.model.ts

@ -33,17 +33,17 @@ const Model: ModelType = {
}, },
onIconClick(title: string, id: string) { onIconClick(title: string, id: string) {
switch (title) { switch (title) {
case BI.i18nText('BI-Delete'): case BI.i18nText('Dec-Dcm_Delete'):
deleteConnection(id, () => { deleteConnection(id, () => {
this.model.linkList = [...this.model.linkList.filter((item: LinkType) => item.connectionId !== id)]; this.model.linkList = [...this.model.linkList.filter((item: LinkType) => item.connectionId !== id)];
this.model.linkSelected = {}; this.model.linkSelected = {};
this.model.linkUpdate = {}; this.model.linkUpdate = {};
}); });
break; break;
case BI.i18nText('BI-Test-Connection'): case BI.i18nText('Dec-Dcm_Test_Connection'):
this._textLink(id); this._textLink(id);
break; break;
case BI.i18nText('BI-Copy'): case BI.i18nText('Dec-Dcm_Copy'):
this.noSaveConfirm(() => { this.noSaveConfirm(() => {
this.copyLink(id); this.copyLink(id);
}); });
@ -53,16 +53,16 @@ const Model: ModelType = {
} }
}, },
_textLink(id: string) { _textLink(id: string) {
const loadingId = dialog.loading(BI.i18nText('BI-Connection-Testing')); const loadingId = dialog.loading(BI.i18nText('Dec-Dcm_Connection_Testing'));
const link = this.model.linkList.find((item: LinkType) => item.connectionId === id); const link = this.model.linkList.find((item: LinkType) => item.connectionId === id);
testConnection(link, (res: any) => { testConnection(link, (res: any) => {
dialog.close(loadingId); dialog.close(loadingId);
if (res && res.errorCode) { if (res && res.errorCode) {
dialog.linkFail(`${link.connectionName}${BI.i18nText('BI-Connection-Test-Fail')}`, res.errorMsg, () => { dialog.linkFail(`${link.connectionName}${BI.i18nText('Dec-Dcm_Connection_Test_Fail')}`, res.errorMsg, () => {
this._textLink(id); this._textLink(id);
}); });
} else { } else {
dialog.success(BI.i18nText('BI-Connection-Test-Success')); dialog.success(BI.i18nText('Dec-Dcm_Connection_Test_Success'));
} }
}); });
}, },
@ -125,7 +125,7 @@ const Model: ModelType = {
}, },
setNewLink(value: string) { setNewLink(value: string) {
if (!databaseTyle.some(item => item.text === value) && !BI.Constants.getConstant(`dec.constant.database.conf.connect.form.${value.toLowerCase()}.edit`)) { if (!databaseTyle.some(item => item.text === value) && !BI.Constants.getConstant(`dec.constant.database.conf.connect.form.${value.toLowerCase()}.edit`)) {
dialog.error(BI.i18nText('BI-Connection-Option-Cannot-Find')); dialog.error(BI.i18nText('Dec-Dcm_Connection_Option_Cannot_Find'));
return; return;
} }
@ -167,7 +167,7 @@ const Model: ModelType = {
}, },
noSaveConfirm(cb: Function) { noSaveConfirm(cb: Function) {
if (this.model.linkSelected && this.model.linkSelected.isSelected) { if (this.model.linkSelected && this.model.linkSelected.isSelected) {
dialog.confirm(BI.i18nText('BI-Connection-Config-No-Save'), (isConfirm: boolean) => { dialog.confirm(BI.i18nText('Dec-Dcm_Connection_Config_No_Save'), (isConfirm: boolean) => {
if (isConfirm) { if (isConfirm) {
this.saveLink(); this.saveLink();
} else { } else {

2
src/app/link_set/more/more.link.component.ts

@ -15,7 +15,7 @@ const Widget: WidgetType = {
items:[{ items:[{
type: SearchEditor, type: SearchEditor,
width: 300, width: 300,
watermark: BI.i18nText('BI-Search'), watermark: BI.i18nText('Dec-Dcm_Search'),
}], }],
}, },
height: 30, height: 30,

2
src/app/link_set/more/more.link.service.ts

@ -7,7 +7,7 @@ export const moreLink = (onConfirm?: Function): void => {
BI.Popovers.create(id, { BI.Popovers.create(id, {
type: 'bi.bar_popover', type: 'bi.bar_popover',
size: 'normal', size: 'normal',
header: BI.i18nText('BI-Connection-More-Title'), header: BI.i18nText('Dec-Dcm_Connection_More-Title'),
width: 550, width: 550,
height: 500, height: 500,
body: { body: {

4
src/app/link_set/right/nothing.component.ts

@ -17,9 +17,9 @@ const Widget: WidgetType = {
}, },
{ {
type:Label, type:Label,
cls: 'bi-tips', cls: 'Dec-Dcm_Tips',
height: 20, height: 20,
text: BI.i18nText('BI-Connection-Plase-Add-One'), text: BI.i18nText('Dec-Dcm_Connection_Plase_Add_One'),
}, },
], ],

48
src/app/link_set/right/right_edit/right.edit.component.ts

@ -32,8 +32,8 @@ const Widget: WidgetType = {
items: [ items: [
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-ConnectionName'), text: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName'),
hint: BI.i18nText('BI-Connection-Form-ConnectionName-Change-Confirm'), hint: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
@ -60,7 +60,7 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-First_Step'), text: BI.i18nText('Dec-Dcm_First_Step'),
height: 400, height: 400,
form:{ form:{
type: Vertical, type: Vertical,
@ -68,7 +68,7 @@ const Widget: WidgetType = {
items:[ items:[
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-Driver'), text: BI.i18nText('Dec-Dcm_Connection_Form_Driver'),
form:{ form:{
type: TextValueCombo, type: TextValueCombo,
cls: 'bi-border', cls: 'bi-border',
@ -88,11 +88,11 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-URL'), text: BI.i18nText('Dec-Dcm_Connection_Form_URL'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 300, width: 300,
value: linkSelected.url, value: linkSelected.url,
listeners: [{ listeners: [{
@ -108,12 +108,12 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-OriginalCharsetName'), text: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'),
form:{ form:{
type: TextValueCombo, type: TextValueCombo,
cls: 'bi-border', cls: 'bi-border',
width: 300, width: 300,
text: linkSelected.originalCharsetName === '' ? BI.i18nText('BI-Connection-Form-Auto') : linkSelected.originalCharsetName, text: linkSelected.originalCharsetName === '' ? BI.i18nText('Dec-Dcm_Connection_Form_Auto') : linkSelected.originalCharsetName,
items: BI.Constants.getConstant(charset), items: BI.Constants.getConstant(charset),
listeners: [{ listeners: [{
eventName: BI.TextValueCombo.EVENT_CHANGE, eventName: BI.TextValueCombo.EVENT_CHANGE,
@ -128,12 +128,12 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-UserName'), text: BI.i18nText('Dec-Dcm_Connection_Form_UserName'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
allowBlank:true, allowBlank:true,
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 300, width: 300,
value: linkSelected.user, value: linkSelected.user,
listeners: [{ listeners: [{
@ -149,13 +149,13 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-Password'), text: BI.i18nText('Dec-Dcm_Connection_Form_Password'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
inputType:'password', inputType:'password',
allowBlank:true, allowBlank:true,
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 300, width: 300,
value: linkSelected.password, value: linkSelected.password,
listeners: [{ listeners: [{
@ -171,17 +171,17 @@ const Widget: WidgetType = {
}, },
{ {
type: Title, type: Title,
text: BI.i18nText('BI-Connection-Form-Pool-Properties'), text: BI.i18nText('Dec-Dcm_Connection_Form_Pool_Properties'),
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-SQL-Validation-Query'), text: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'),
height: 100, height: 100,
form:{ form:{
type: TextAreaEditor, type: TextAreaEditor,
cls: 'bi-border', cls: 'bi-border',
allowBlank:true, allowBlank:true,
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 300, width: 300,
height:100, height:100,
value: linkSelected.validationQuery, value: linkSelected.validationQuery,
@ -198,10 +198,10 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-Connection-Check'), text: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'),
form:{ form:{
type: MultiSelectItem, type: MultiSelectItem,
text: BI.i18nText('BI-Yes'), text: BI.i18nText('Dec-Dcm_Yes'),
selected: linkSelected.testOnBorrow, selected: linkSelected.testOnBorrow,
width: 60, width: 60,
listeners: [{ listeners: [{
@ -217,15 +217,15 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-Connection-Max-Number'), text: BI.i18nText('Dec-Dcm_Connection_Form_Connection_Max_Number'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
allowBlank:true, allowBlank:true,
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 60, width: 60,
value: linkSelected.maxActive, value: linkSelected.maxActive,
errorText: BI.i18nText('BI-Connection-Form-Place-Input-Number'), errorText: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input-Number'),
validationChecker (v: string) { validationChecker (v: string) {
if (/^\+?[1-9][0-9]*$/.test(v)) { if (/^\+?[1-9][0-9]*$/.test(v)) {
return true; return true;
@ -249,19 +249,19 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Second_Step'), text: BI.i18nText('Dec-Dcm_Second_Step'),
form: { form: {
type: Button, type: Button,
text: BI.i18nText('BI-Test-Connection'), text: BI.i18nText('Dec-Dcm_Test_Connection'),
level: 'ignore', level: 'ignore',
}, },
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Third_Step'), text: BI.i18nText('Dec-Dcm_Third_Step'),
form: { form: {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-Pattern'), text: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'),
form: { form: {
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',

42
src/app/link_set/right/right_edit/right.edit.mysql.component.ts

@ -20,8 +20,8 @@ const Widget: WidgetType = {
items: [ items: [
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-ConnectionName'), text: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName'),
hint: BI.i18nText('BI-Connection-Form-ConnectionName-Change-Confirm'), hint: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
@ -40,7 +40,7 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-Driver'), text: BI.i18nText('Dec-Dcm_Connection_Form_Driver'),
form:{ form:{
type: TextValueCombo, type: TextValueCombo,
cls: 'bi-border', cls: 'bi-border',
@ -60,11 +60,11 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-URL'), text: BI.i18nText('Dec-Dcm_Connection_Form_URL'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 300, width: 300,
value: linkSelected.url, value: linkSelected.url,
listeners: [{ listeners: [{
@ -80,12 +80,12 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-OriginalCharsetName'), text: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'),
form:{ form:{
type: TextValueCombo, type: TextValueCombo,
cls: 'bi-border', cls: 'bi-border',
width: 300, width: 300,
text: linkSelected.originalCharsetName === '' ? BI.i18nText('BI-Connection-Form-Auto') : linkSelected.originalCharsetName, text: linkSelected.originalCharsetName === '' ? BI.i18nText('Dec-Dcm_Connection_Form_Auto') : linkSelected.originalCharsetName,
items: BI.Constants.getConstant(charset), items: BI.Constants.getConstant(charset),
listeners: [{ listeners: [{
eventName: BI.TextValueCombo.EVENT_CHANGE, eventName: BI.TextValueCombo.EVENT_CHANGE,
@ -100,12 +100,12 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-UserName'), text: BI.i18nText('Dec-Dcm_Connection_Form_UserName'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
allowBlank:true, allowBlank:true,
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 300, width: 300,
value: linkSelected.user, value: linkSelected.user,
listeners: [{ listeners: [{
@ -121,13 +121,13 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-Password'), text: BI.i18nText('Dec-Dcm_Connection_Form_Password'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
inputType:'password', inputType:'password',
allowBlank:true, allowBlank:true,
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 300, width: 300,
value: linkSelected.password, value: linkSelected.password,
listeners: [{ listeners: [{
@ -143,17 +143,17 @@ const Widget: WidgetType = {
}, },
{ {
type: Title, type: Title,
text: BI.i18nText('BI-Connection-Form-Pool-Properties'), text: BI.i18nText('Dec-Dcm_Connection_Form_Pool_Properties'),
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-SQL-Validation-Query'), text: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'),
height: 100, height: 100,
form:{ form:{
type: TextAreaEditor, type: TextAreaEditor,
cls: 'bi-border', cls: 'bi-border',
allowBlank:true, allowBlank:true,
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 300, width: 300,
height:100, height:100,
value: linkSelected.validationQuery, value: linkSelected.validationQuery,
@ -170,10 +170,10 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-Connection-Check'), text: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'),
form:{ form:{
type: MultiSelectItem, type: MultiSelectItem,
text: BI.i18nText('BI-Yes'), text: BI.i18nText('Dec-Dcm_Yes'),
selected: linkSelected.testOnBorrow, selected: linkSelected.testOnBorrow,
width: 60, width: 60,
listeners: [{ listeners: [{
@ -189,15 +189,15 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Connection-Form-Connection-Max-Number'), text: BI.i18nText('Dec-Dcm_Connection_Form_Connection_Max_Number'),
form:{ form:{
type: Editor, type: Editor,
cls: 'bi-border', cls: 'bi-border',
allowBlank:true, allowBlank:true,
watermark:BI.i18nText('BI-Connection-Form-Place-Input'), watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
width: 60, width: 60,
value: linkSelected.maxActive, value: linkSelected.maxActive,
errorText: BI.i18nText('BI-Connection-Form-Place-Input-Number'), errorText: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input-Number'),
validationChecker (v: string) { validationChecker (v: string) {
if (/^\+?[1-9][0-9]*$/.test(v)) { if (/^\+?[1-9][0-9]*$/.test(v)) {
return true; return true;
@ -218,10 +218,10 @@ const Widget: WidgetType = {
}, },
{ {
type: FormItem, type: FormItem,
text: BI.i18nText('BI-Test-Connection'), text: BI.i18nText('Dec-Dcm_Test_Connection'),
form: { form: {
type: Button, type: Button,
text: BI.i18nText('BI-Test-Connection'), text: BI.i18nText('Dec-Dcm_Test_Connection'),
level: 'ignore', level: 'ignore',
}, },
}, },

24
src/app/link_set/right/right_show/right.show.component.ts

@ -17,51 +17,51 @@ const Widget: WidgetType = {
items: [ items: [
{ {
type: BothSide, type: BothSide,
leftText: BI.i18nText('BI-Connection-Form-ConnectionName'), leftText: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName'),
rightText: linkSelected.connectionName, rightText: linkSelected.connectionName,
}, },
{ {
type: BothSide, type: BothSide,
leftText: BI.i18nText('BI-Connection-Form-Driver'), leftText: BI.i18nText('Dec-Dcm_Connection_Form_Driver'),
rightText: linkSelected.driver, rightText: linkSelected.driver,
}, },
{ {
type: BothSide, type: BothSide,
leftText: BI.i18nText('BI-Connection-Form-URL'), leftText: BI.i18nText('Dec-Dcm_Connection_Form_URL'),
rightText: linkSelected.url, rightText: linkSelected.url,
}, },
{ {
type: BothSide, type: BothSide,
leftText: BI.i18nText('BI-Connection-Form-OriginalCharsetName'), leftText: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'),
rightText: linkSelected.originalCharsetName === '' ? BI.i18nText('BI-Connection-Form-Auto') : linkSelected.originalCharsetName, rightText: linkSelected.originalCharsetName === '' ? BI.i18nText('Dec-Dcm_Connection_Form_Auto') : linkSelected.originalCharsetName,
}, },
{ {
type: BothSide, type: BothSide,
leftText: BI.i18nText('BI-Connection-Form-UserName'), leftText: BI.i18nText('Dec-Dcm_Connection_Form_UserName'),
rightText: linkSelected.user, rightText: linkSelected.user,
}, },
{ {
type: BothSide, type: BothSide,
leftText: BI.i18nText('BI-Connection-Form-Password'), leftText: BI.i18nText('Dec-Dcm_Connection_Form_Password'),
rightText: linkSelected.password, rightText: linkSelected.password,
}, },
{ {
type: Title, type: Title,
text: BI.i18nText('BI-Connection-Form-Pool-Properties'), text: BI.i18nText('Dec-Dcm_Connection_Form_Pool_Properties'),
}, },
{ {
type: BothSide, type: BothSide,
leftText: BI.i18nText('BI-Connection-Form-SQL-Validation-Query'), leftText: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'),
rightText: linkSelected.validationQuery, rightText: linkSelected.validationQuery,
}, },
{ {
type: BothSide, type: BothSide,
leftText: BI.i18nText('BI-Connection-Form-Connection-Check'), leftText: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'),
rightText: linkSelected.testOnBorrow ? BI.i18nText('BI-Yes') : BI.i18nText('BI-No'), rightText: linkSelected.testOnBorrow ? BI.i18nText('Dec-Dcm_Yes') : BI.i18nText('Dec-Dcm_No'),
}, },
{ {
type: BothSide, type: BothSide,
leftText: BI.i18nText('BI-Connection-Form-Connection-Max-Number'), leftText: BI.i18nText('Dec-Dcm_Connection_Form_Connection_Max_Number'),
rightText: linkSelected.maxActive, rightText: linkSelected.maxActive,
}, },
], ],

10
src/app/link_set/right/right_title/right.title.component.ts

@ -12,7 +12,7 @@ const Widget: WidgetType = {
const linkList: LinkType[] = this.model.linkList; const linkList: LinkType[] = this.model.linkList;
const that = this; const that = this;
const {isEdit} = this.options; const {isEdit} = this.options;
const title = linkSelected.text === 'other' ? BI.i18nText('BI-Connection-Other') : linkSelected.text; const title = linkSelected.text === 'other' ? BI.i18nText('Dec-Dcm_Connection_Other') : linkSelected.text;
return { return {
type: Left, type: Left,
@ -22,13 +22,13 @@ const Widget: WidgetType = {
{ {
type: Label, type: Label,
cls: 'right-title-text', cls: 'right-title-text',
text: `${BI.i18nText('BI-Data_Connections')}(${title ? title : BI.i18nText('BI-Default')})`, text: `${BI.i18nText('Dec-Dcm_Data_Connections')}(${title ? title : BI.i18nText('Dec-Dcm_Default')})`,
}, },
{ {
type: Button, type: Button,
cls:'right-title-button', cls:'right-title-button',
invisible: isEdit, invisible: isEdit,
text: BI.i18nText('BI-Edit'), text: BI.i18nText('Dec-Dcm_Edit'),
handler() { handler() {
that.store.setEdit(true); that.store.setEdit(true);
}, },
@ -37,11 +37,11 @@ const Widget: WidgetType = {
type: Button, type: Button,
cls:'right-title-button', cls:'right-title-button',
invisible: !isEdit, invisible: !isEdit,
text: BI.i18nText('BI-Save'), text: BI.i18nText('Dec-Dcm_Save'),
handler() { handler() {
const result = BI.find(linkList, (idx: number, value: LinkType) => that.model.linkUpdate.connectionName === value.connectionName && value.connectionId !== that.model.linkUpdate.connectionId); const result = BI.find(linkList, (idx: number, value: LinkType) => that.model.linkUpdate.connectionName === value.connectionName && value.connectionId !== that.model.linkUpdate.connectionId);
if (result) { if (result) {
that.store.setConnectionNameErr(BI.i18nText('BI-Connection-Is-Existence')); that.store.setConnectionNameErr(BI.i18nText('Dec-Dcm_Connection_Is_Existence'));
} else { } else {
that.store.saveLink(); that.store.saveLink();
} }

10
src/app/link_set/select/select.component.ts

@ -17,7 +17,7 @@ const Widget: WidgetType = {
adjustYOffset: 4, adjustYOffset: 4,
el: { el: {
type: 'bi.button', type: 'bi.button',
text: BI.i18nText('BI-Connection-New'), text: BI.i18nText('Dec-Dcm_Connection_New'),
height: 24, height: 24,
}, },
popup: { popup: {
@ -38,16 +38,16 @@ const Widget: WidgetType = {
cls: 'link-item', cls: 'link-item',
height: 24, height: 24,
width: 152, width: 152,
text: BI.i18nText('BI-Connection-More'), text: BI.i18nText('Dec-Dcm_Connection_More'),
title: BI.i18nText('BI-Connection-More'), title: BI.i18nText('Dec-Dcm_Connection_More'),
value: 'more', value: 'more',
}, { }, {
type: TextItem, type: TextItem,
cls: 'link-item', cls: 'link-item',
height: 24, height: 24,
width: 152, width: 152,
text: BI.i18nText('BI-Connection-Other'), text: BI.i18nText('Dec-Dcm_Connection_Other'),
title: BI.i18nText('BI-Connection-Other'), title: BI.i18nText('Dec-Dcm_Connection_Other'),
value: 'other', value: 'other',
}], }],
layouts: [{ layouts: [{

2
src/app/link_set/select/select.service.ts

@ -266,7 +266,7 @@ export const getCnnectionName = (links: LinkType[], name: string): string => {
let nameIndex = 0; let nameIndex = 0;
const title = name.replace(/[0-9]/g, ''); const title = name.replace(/[0-9]/g, '');
const isPlugin = BI.some(plugins, (index: number, item: string) => item === title); const isPlugin = BI.some(plugins, (index: number, item: string) => item === title);
const startWith = isPlugin ? title : BI.i18nText('BI-Data_Connections'); const startWith = isPlugin ? title : BI.i18nText('Dec-Dcm_Data_Connections');
links.forEach(link => { links.forEach(link => {
link.isSelected = false; link.isSelected = false;

2
src/app/link_status/left/left.service.ts

@ -10,7 +10,7 @@ export const getLinks = (linkList: LinkType[], selectTitle = ''): any => {
title: item.connectionName, title: item.connectionName,
id: item.connectionId, id: item.connectionId,
creator: item.creator, creator: item.creator,
text: item.text ? item.text : BI.i18nText('BI-Default'), text: item.text ? item.text : BI.i18nText('Dec-Dcm_Default'),
}); });
}); });

4
src/app/link_status/link_status.component.ts

@ -10,7 +10,7 @@ const Widget: WidgetType = {
}, },
watch:{ watch:{
tab(tab: string) { tab(tab: string) {
this.setVisible(tab === BI.i18nText('BI-Pool_Connection_Management')); this.setVisible(tab === BI.i18nText('Dec-Dcm_Pool_Connection_Management'));
}, },
}, },
render() { render() {
@ -30,7 +30,7 @@ const Widget: WidgetType = {
{ {
type: Label, type: Label,
cls:'status-title', cls:'status-title',
text: BI.i18nText('BI-Data_Connections'), text: BI.i18nText('Dec-Dcm_Data_Connections'),
}, },
], ],
}, },

4
src/app/link_status/right/right.card.component.ts

@ -40,7 +40,7 @@ const Widget: WidgetType = {
{ {
type: Label, type: Label,
height: 20, height: 20,
text: BI.i18nText('BI-Active_Connections_Number'), text: BI.i18nText('Dec-Dcm_Active_Connections_Number'),
}, },
], ],
}, },
@ -79,7 +79,7 @@ const Widget: WidgetType = {
{ {
type: Label, type: Label,
height: 20, height: 20,
text: BI.i18nText('BI-Leisure_Connections_Number'), text: BI.i18nText('Dec-Dcm_Leisure_Connections_Number'),
}, },
], ],
}, },

4
src/app/link_status/right/right.component.ts

@ -26,7 +26,7 @@ const Widget: WidgetType = {
...res, ...res,
}])); }]));
}); });
Title.setText(`${BI.i18nText('BI-Data_Connections')}(${title})`); Title.setText(`${BI.i18nText('Dec-Dcm_Data_Connections')}(${title})`);
}, },
}, },
render() { render() {
@ -41,7 +41,7 @@ const Widget: WidgetType = {
items:[ items:[
{ {
type: Label, type: Label,
text:BI.i18nText('BI-Data_Connections'), text:BI.i18nText('Dec-Dcm_Data_Connections'),
}, },
], ],
ref(ref: any) { ref(ref: any) {

2
src/app/title/title.component.ts

@ -1,7 +1,7 @@
import {Left, WidgetType, IconButton} from '@ui/index'; import {Left, WidgetType, IconButton} from '@ui/index';
import TitleItem from './title_item/title_item.component'; import TitleItem from './title_item/title_item.component';
import {isDesigner, closeWindow} from '@shared/crud/crud.request'; import {isDesigner, closeWindow} from '@shared/crud/crud.request';
const tabs = ['BI-Data_Connection_Management', 'BI-Pool_Connection_Management']; const tabs = ['Dec-Dcm_Connection_Management', 'Dec-Dcm_Pool_Connection_Management'];
const className = 'fr.title'; const className = 'fr.title';
const Widget: WidgetType = { const Widget: WidgetType = {
render() { render() {

2
src/app/title/title_item/title_item.component.ts

@ -26,7 +26,7 @@ const Widget = BI.inherit(BI.Widget, {
}, },
mounted() { mounted() {
const {text} = this.options; const {text} = this.options;
this.element.css(getSelectStyle(BI.i18nText('BI-Data_Connection_Management'), text)); this.element.css(getSelectStyle(BI.i18nText('Dec-Dcm_Connection_Management'), text));
this.element.on('click', () => { this.element.on('click', () => {
this.store.setTab(text); this.store.setTab(text);
}); });

12
src/demo/plugin.redis.edit.ts

@ -20,7 +20,7 @@ const Widget = BI.inherit(BI.Widget, {
items: [ items: [
{ {
type: 'bi.label', type: 'bi.label',
text: BI.i18nText('BI-Connection-Form-Database-Addr'), text: BI.i18nText('Dec-Dcm_Connection_Form_Database_Addr'),
height: 24, height: 24,
width: 115, width: 115,
textAlign: 'left', textAlign: 'left',
@ -28,7 +28,7 @@ const Widget = BI.inherit(BI.Widget, {
{ {
type: 'bi.editor', type: 'bi.editor',
cls: 'bi-border', cls: 'bi-border',
watermark: BI.i18nText('BI-Connection-Form-Database-Addr'), watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Addr'),
value:form.url, value:form.url,
allowBlank: true, allowBlank: true,
width: 300, width: 300,
@ -41,7 +41,7 @@ const Widget = BI.inherit(BI.Widget, {
items: [ items: [
{ {
type: 'bi.label', type: 'bi.label',
text: BI.i18nText('BI-Connection-Form-Database-Port'), text: BI.i18nText('Dec-Dcm_Connection_Form_Database_Port'),
height: 24, height: 24,
width: 115, width: 115,
textAlign: 'left', textAlign: 'left',
@ -49,12 +49,12 @@ const Widget = BI.inherit(BI.Widget, {
{ {
type: 'bi.editor', type: 'bi.editor',
cls: 'bi-border', cls: 'bi-border',
watermark: BI.i18nText('BI-Connection-Form-Database-Port'), watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Port'),
allowBlank: true, allowBlank: true,
width: 300, width: 300,
height: 24, height: 24,
value: form.port, value: form.port,
errorText: BI.i18nText('BI-Connection-Form-Place-Input-Number'), errorText: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input-Number'),
validationChecker (v: string) { validationChecker (v: string) {
if (/^\+?[1-9][0-9]*$/.test(v)) { if (/^\+?[1-9][0-9]*$/.test(v)) {
return true; return true;
@ -70,7 +70,7 @@ const Widget = BI.inherit(BI.Widget, {
items: [ items: [
{ {
type: 'bi.label', type: 'bi.label',
text: BI.i18nText('BI-Connection-Form-Password'), text: BI.i18nText('Dec-Dcm_Connection_Form_Password'),
height: 24, height: 24,
width: 115, width: 115,
textAlign: 'left', textAlign: 'left',

6
src/demo/plugin.redis.preview.ts

@ -15,7 +15,7 @@ const Widget = BI.inherit(BI.Widget, {
items: [ items: [
{ {
type: 'bi.label', type: 'bi.label',
text: BI.i18nText('BI-Connection-Form-Database-Addr'), text: BI.i18nText('Dec-Dcm_Connection_Form_Database_Addr'),
height: 24, height: 24,
width: 115, width: 115,
textAlign: 'left', textAlign: 'left',
@ -32,7 +32,7 @@ const Widget = BI.inherit(BI.Widget, {
items: [ items: [
{ {
type: 'bi.label', type: 'bi.label',
text: BI.i18nText('BI-Connection-Form-Database-Port'), text: BI.i18nText('Dec-Dcm_Connection_Form_Database_Port'),
height: 24, height: 24,
width: 115, width: 115,
textAlign: 'left', textAlign: 'left',
@ -49,7 +49,7 @@ const Widget = BI.inherit(BI.Widget, {
items: [ items: [
{ {
type: 'bi.label', type: 'bi.label',
text: BI.i18nText('BI-Connection-Form-Password'), text: BI.i18nText('Dec-Dcm_Connection_Form_Password'),
height: 24, height: 24,
width: 115, width: 115,
textAlign: 'left', textAlign: 'left',

2
src/demo/plugin.tedis.pool.ts

@ -40,7 +40,7 @@ const WidgetPool = BI.inherit(BI.Widget, {
{ {
type: 'bi.label', type: 'bi.label',
height: 20, height: 20,
text: BI.i18nText('BI-Active_Connections_Number'), text: BI.i18nText('Dec-Dcm_Active_Connections_Number'),
}, },
], ],
}, },

110
src/lib/locale/i18n_zh_CN.js

@ -2,60 +2,60 @@ var Store = {
i18n : { i18n : {
'BI-Basic_Cancel': '取消', 'BI-Basic_Cancel': '取消',
'BI-Basic_Sure': '确定', 'BI-Basic_Sure': '确定',
'BI-Data_Connection_Management': '数据连接管理', 'Dec-Dcm_Connection_Management': '数据连接管理',
'BI-Pool_Connection_Management': '连接池管理', 'Dec-Dcm_Pool_Connection_Management': '连接池管理',
'BI-Data_Connections': '数据连接', 'Dec-Dcm_Data_Connections': '数据连接',
'BI-Active_Connections_Number': '活动连接数', 'Dec-Dcm_Active_Connections_Number': '活动连接数',
'BI-Leisure_Connections_Number': '空闲连接数', 'Dec-Dcm_Leisure_Connections_Number': '空闲连接数',
'BI-Connections': '连接', 'Dec-Dcm_Connections': '连接',
'BI-Default': '默认', 'Dec-Dcm_Default': '默认',
'BI-Delete': '删除', 'Dec-Dcm_Delete': '删除',
'BI-Test-Connection': '测试连接', 'Dec-Dcm_Test_Connection': '测试连接',
'BI-Copy': '复制', 'Dec-Dcm_Copy': '复制',
'BI-Edit': '编辑', 'Dec-Dcm_Edit': '编辑',
'BI-Save': '保存', 'Dec-Dcm_Save': '保存',
'BI-Yes': '是', 'Dec-Dcm_Yes': '是',
'BI-No': '否', 'Dec-Dcm_No': '否',
'BI-Search': '搜索', 'Dec-Dcm_Search': '搜索',
'BI-Type': '类型', 'Dec-Dcm_Type': '类型',
'BI-Other': '其他', 'Dec-Dcm_Other': '其他',
'BI-Tips': '提示', 'Dec-Dcm_Tips': '提示',
'BI-Back': '返回', 'Dec-Dcm_Back': '返回',
'BI-Creator': '创建者', 'Dec-Dcm_Creator': '创建者',
'BI-First_Step': '第一步', 'Dec-Dcm_First_Step': '第一步',
'BI-Second_Step': '第一步', 'Dec-Dcm_Second_Step': '第二步',
'BI-Third_Step': '第一步', 'Dec-Dcm_Third_Step': '第三步',
'BI-Connection-Detailed-Information': '详细信息', 'Dec-Dcm_Connection_Detailed_Information': '详细信息',
'BI-Connection-Handup-Information': '收起信息', 'Dec-Dcm_Connection_Handup_Information': '收起信息',
'BI-Connection-Testing': '正在测试连接,请稍候...', 'Dec-Dcm_Connection_Testing': '正在测试连接,请稍候...',
'BI-Connection-Test-Fail': '测试连接失败', 'Dec-Dcm_Connection_Test_Fail': '测试连接失败',
'BI-Connection-Test-Success': '连接成功', 'Dec-Dcm_Connection_Test_Success': '连接成功',
'BI-Connection-Option-Cannot-Find': '找不到该连接的配置信息', 'Dec-Dcm_Connection_Option_Cannot_Find': '找不到该连接的配置信息',
'BI-Connection-Config-No-Save': '当前设置尚未保存,是否保存?', 'Dec-Dcm_Connection_Config_No_Save': '当前设置尚未保存,是否保存?',
'BI-Connection-New': '新建数据连接', 'Dec-Dcm_Connection_New': '新建数据连接',
'BI-Connection-More': '更多数据连接...', 'Dec-Dcm_Connection_More': '更多数据连接...',
'BI-Connection-More-Title': '更多数据连接', 'Dec-Dcm_Connection_More-Title': '更多数据连接',
'BI-Connection-Other': '其他', 'Dec-Dcm_Connection_Other': '其他',
'BI-Connection-Plase-Add-One': '请选择左侧数据连接或点击新建数据连接', 'Dec-Dcm_Connection_Plase_Add_One': '请选择左侧数据连接或点击新建数据连接',
'BI-Connection-Is-Existence': '数据连接名已存在', 'Dec-Dcm_Connection_Is_Existence': '数据连接名已存在',
'BI-Connection-Form-ConnectionName': '数据连接名', 'Dec-Dcm_Connection_Form_ConnectionName': '数据连接名',
'BI-Connection-Form-ConnectionName-Change-Confirm': '*修改数据连接名会影响相关数据表和仪表板', 'Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm': '*修改数据连接名会影响相关数据表和仪表板',
'BI-Connection-Form-Driver': '驱动器', 'Dec-Dcm_Connection_Form_Driver': '驱动器',
'BI-Connection-Form-URL': 'URL', 'Dec-Dcm_Connection_Form_URL': 'URL',
'BI-Connection-Form-Place-Input': '请输入', 'Dec-Dcm_Connection_Form_Place_Input': '请输入',
'BI-Connection-Form-OriginalCharsetName': '编码', 'Dec-Dcm_Connection_Form_OriginalCharsetName': '编码',
'BI-Connection-Form-Auto': '自动', 'Dec-Dcm_Connection_Form_Auto': '自动',
'BI-Connection-Form-UserName': '用户名', 'Dec-Dcm_Connection_Form_UserName': '用户名',
'BI-Connection-Form-Password': '密码', 'Dec-Dcm_Connection_Form_Password': '密码',
'BI-Connection-Form-Pool-Properties': '连接池属性', 'Dec-Dcm_Connection_Form_Pool_Properties': '连接池属性',
'BI-Connection-Form-SQL-Validation-Query': 'SQL验证查询', 'Dec-Dcm_Connection_Form_SQL_Validation_Query': 'SQL验证查询',
'BI-Connection-Form-Connection-Check': '获取连接前校验', 'Dec-Dcm_Connection_Form_Connection-Check': '获取连接前校验',
'BI-Connection-Form-Connection-Max-Number': '最大活动连接数', 'Dec-Dcm_Connection_Form_Connection_Max_Number': '最大活动连接数',
'BI-Connection-Form-Place-Input-Number': '请输入有效的正整数', 'Dec-Dcm_Connection_Form_Place_Input-Number': '请输入有效的正整数',
'BI-Connection-Form-Pattern': '模式', 'Dec-Dcm_Connection_Form_Pattern': '模式',
'BI-Connection-Form-Database-Addr': '数据库地址', 'Dec-Dcm_Connection_Form_Database_Addr': '数据库地址',
'BI-Connection-Form-Database-Port': '端口号', 'Dec-Dcm_Connection_Form_Database_Port': '端口号',
'BI-Connection-Make-Sure-Delete': '确定删除该数据连接?', 'Dec-Dcm_Connection_Make_Sure_Delete': '确定删除该数据连接?',
'BI-Connection-ReConnect': '重新连接', 'Dec-Dcm_Connection_ReConnect': '重新连接',
}} }}
window.Store = Store; window.Store = Store;

12
src/shared/service/dialog.service.ts

@ -10,7 +10,7 @@ class Dialog {
BI.Popovers.create(id, { BI.Popovers.create(id, {
type: 'bi.bar_popover', type: 'bi.bar_popover',
size: 'normal', size: 'normal',
header: BI.i18nText('BI-Tips'), header: BI.i18nText('Dec-Dcm_Tips'),
width: 450, width: 450,
height: 220, height: 220,
body: { body: {
@ -156,20 +156,20 @@ class Dialog {
items:[ items:[
{ {
type: Button, type: Button,
text: BI.i18nText('BI-Connection-Detailed-Information'), text: BI.i18nText('Dec-Dcm_Connection_Detailed_Information'),
level: 'ignore', level: 'ignore',
handler() { handler() {
const isHide = this.getText() === BI.i18nText('BI-Connection-Detailed-Information'); const isHide = this.getText() === BI.i18nText('Dec-Dcm_Connection_Detailed_Information');
Popover.element.css({ Popover.element.css({
height: isHide ? '290' : '220', height: isHide ? '290' : '220',
}); });
More.setVisible(isHide); More.setVisible(isHide);
this.setText(isHide ? BI.i18nText('BI-Connection-Handup-Information') : BI.i18nText('BI-Connection-Detailed-Information')); this.setText(isHide ? BI.i18nText('Dec-Dcm_Connection_Handup_Information') : BI.i18nText('Dec-Dcm_Connection_Detailed_Information'));
}, },
}, },
{ {
type: Button, type: Button,
text: BI.i18nText('BI-Back'), text: BI.i18nText('Dec-Dcm_Back'),
level: 'ignore', level: 'ignore',
handler() { handler() {
that.close(id); that.close(id);
@ -177,7 +177,7 @@ class Dialog {
}, },
{ {
type: Button, type: Button,
text: BI.i18nText('BI-Connection-ReConnect'), text: BI.i18nText('Dec-Dcm_Connection_ReConnect'),
handler() { handler() {
that.close(id); that.close(id);
cb ? cb() : null; cb ? cb() : null;

Loading…
Cancel
Save