You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
856 B
32 lines
856 B
6 years ago
|
import {WidgetType, Vertical} from '@ui';
|
||
|
import Model from './left.model';
|
||
|
import {LinkType} from '@ui/type';
|
||
|
import {getLinks} from './left.service';
|
||
|
const className = 'fr.component.linkStatus.left';
|
||
|
let leftContent: any = null;
|
||
|
const Widget: WidgetType = {
|
||
|
_store() {
|
||
|
return BI.Models.getModel(Model);
|
||
|
},
|
||
6 years ago
|
watch: {
|
||
6 years ago
|
linkList(linkList: LinkType[]) {
|
||
|
const title = linkList.length > 0 ? linkList[0].connectionName : '';
|
||
|
this.store.setStatusSelected(title);
|
||
|
},
|
||
|
statusSelected(title: string) {
|
||
|
const linkList = this.model.linkList;
|
||
|
leftContent.populate(BI.createItems(getLinks(linkList, title)));
|
||
|
},
|
||
|
},
|
||
|
render() {
|
||
|
return {
|
||
|
type: Vertical,
|
||
|
ref(_ref: any) {
|
||
|
leftContent = _ref;
|
||
|
},
|
||
|
};
|
||
|
},
|
||
|
};
|
||
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget));
|
||
|
export default className;
|