Browse Source

Merge pull request #72 in DEC/decision-webui-dcm from ~ALAN/decision-webui-dcm:feature/10.0 to feature/10.0

* commit '3ad2bc2f8e285368ccd8a6d388b111719197c9aa':
  fix: DEC-10046 改为显示数据连接的名称
qufenxi
alan 5 years ago
parent
commit
06df837136
  1. 6
      src/modules/app.service.ts
  2. 4
      src/modules/pages/connection/list/list_item/list_item.ts

6
src/modules/app.service.ts

@ -97,3 +97,9 @@ export function connectionCanEdit(connection: Connection) {
return true;
}
export function getTextByDatabaseType(databaseType: string) {
const database = DATA_BASE_TYPES.find(item => item.databaseType === databaseType);
return database ? database.text : '';
}

4
src/modules/pages/connection/list/list_item/list_item.ts

@ -7,7 +7,7 @@ import { TestStatusXtype, TestStatus, EVENT_CLOSE, EVENT_RELOAD } from 'src/modu
import { hasRegistered } from '../list.service';
import { connectionType } from '@constants/env';
import { ConnectionJDBC } from 'src/modules/crud/crud.typings';
import { connectionCanEdit } from '../../../../app.service';
import { connectionCanEdit, getTextByDatabaseType } from '../../../../app.service';
export const ListItemXtype = 'dec.dcm.connection.list_item';
@shortcut(ListItemXtype)
@ -126,7 +126,7 @@ export class ListItem extends BI.BasicButton {
const isRegistered = hasRegistered(databaseType);
const otherIcons = [
{
text: BI.i18nText('Dec-Dcm_Type', databaseType),
text: BI.i18nText('Dec-Dcm_Type', getTextByDatabaseType(databaseType)),
disabled: true,
cls: 'dcm-info-font',
value: 12,

Loading…
Cancel
Save