|
|
|
@ -2,7 +2,6 @@ import { shortcut, store } from '@core/core';
|
|
|
|
|
import { CenterAdapt, Label, Layout, Vtape, Loader } from 'ui'; |
|
|
|
|
import { ListItemXtype } from './list_item/list_item'; |
|
|
|
|
import { ConnectionListModel, ConnectionListModelXtype } from './list.model'; |
|
|
|
|
import { Connection } from '../../../crud/crud.typings'; |
|
|
|
|
import { getCreator, getDatabaseType } from './list.service'; |
|
|
|
|
export const ConnectionListXtype = 'dec.dcm.connection.list'; |
|
|
|
|
@shortcut(ConnectionListXtype) |
|
|
|
@ -68,13 +67,14 @@ export class ConnectionList extends BI.LoadingPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private renderList(start = 0, end = 0) { |
|
|
|
|
return this.model.connections.slice(start, end).map((item: Connection) => { |
|
|
|
|
return this.model.connections.slice(start, end).map((item, index) => { |
|
|
|
|
return { |
|
|
|
|
type: ListItemXtype, |
|
|
|
|
name: item.connectionName, |
|
|
|
|
value: item.connectionName, |
|
|
|
|
creator: getCreator(item), |
|
|
|
|
databaseType: getDatabaseType(item), |
|
|
|
|
selected: this.model.connectionSelected ? this.model.connectionSelected === item.connectionName : index === 0, |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|