diff --git a/src/modules/app.service.ts b/src/modules/app.service.ts index a9df67a..d30a881 100644 --- a/src/modules/app.service.ts +++ b/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 : ''; +} diff --git a/src/modules/pages/connection/list/list_item/list_item.ts b/src/modules/pages/connection/list/list_item/list_item.ts index ce32b2e..cd1faa3 100644 --- a/src/modules/pages/connection/list/list_item/list_item.ts +++ b/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,