GUI2 added in details panel, updated docs
Change-Id: I49a874deeb4de1082f190ea5d0d985c986a978f8
diff --git a/web/gui2/src/main/webapp/app/view/topology/panel/instance/instance.component.ts b/web/gui2/src/main/webapp/app/view/topology/panel/instance/instance.component.ts
index 05e8768..b30c706 100644
--- a/web/gui2/src/main/webapp/app/view/topology/panel/instance/instance.component.ts
+++ b/web/gui2/src/main/webapp/app/view/topology/panel/instance/instance.component.ts
@@ -26,7 +26,7 @@
FnService,
PanelBaseImpl,
IconService,
- SvgUtilService
+ SvgUtilService, LionService
} from 'gui2-fw-lib';
/**
@@ -77,18 +77,26 @@
@Output() mastershipEvent = new EventEmitter<string>();
public onosInstances: Array<Instance>;
protected mastership: string;
+ lionFn; // Function
constructor(
protected fs: FnService,
protected log: LogService,
protected ls: LoadingService,
protected is: IconService,
- protected sus: SvgUtilService
+ protected sus: SvgUtilService,
+ private lion: LionService
) {
super(fs, ls, log);
this.onosInstances = <Array<Instance>>[];
- this.is.loadIconDef('active');
- this.is.loadIconDef('uiAttached');
+
+ if (this.lion.ubercache.length === 0) {
+ this.lionFn = this.dummyLion;
+ this.lion.loadCbs.set('topo-inst', () => this.doLion());
+ } else {
+ this.doLion();
+ }
+ this.on = true;
this.log.debug('InstanceComponent constructed');
}
@@ -114,4 +122,12 @@
this.mastershipEvent.emit(this.mastership);
this.log.debug('Instance', this.mastership, 'chosen on GUI');
}
+
+ /**
+ * Read the LION bundle for Details panel and set up the lionFn
+ */
+ doLion() {
+ this.lionFn = this.lion.bundle('core.view.Topo');
+
+ }
}