X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fcontrol%2Fcontrol.component.ts;h=b493587a17b47f6e4133bb15ed730779e06dad2c;hb=ca47b9c9b9a52aee1a23bf695e8dc9e76c132d74;hp=1520862014ac674268abd5aeb0459d3b6de6bc5e;hpb=e2cbc4d0304646febf7e2cbe0dccdf9840189222;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/control/control.component.ts b/webapp-frontend/src/app/control/control.component.ts index 15208620..b493587a 100644 --- a/webapp-frontend/src/app/control/control.component.ts +++ b/webapp-frontend/src/app/control/control.component.ts @@ -1,6 +1,6 @@ /*- * ========================LICENSE_START================================= - * ORAN-OSC + * O-RAN-SC * %% * Copyright (C) 2019 AT&T Intellectual Property and Nokia * %% @@ -22,6 +22,7 @@ import { LocalDataSource } from 'ng2-smart-table'; import { ControlService } from '../services/control/control.service'; import { Router } from '@angular/router'; + @Component({ selector: 'app-control', templateUrl: './control.component.html', @@ -43,50 +44,46 @@ export class ControlComponent { }, columns: { - id: { - title: 'ID', - type: 'number', - }, - xAppName: { - title: 'xApp Name', + xapp: { + title:'xApp Name', type: 'string', }, - xAppType: { - title: 'xApp Type', + name: { + title:'Instance Name', type: 'string', }, - podId: { - title: 'Pod ID', - type: 'number', - }, - k8Status: { - title: 'k8 Status', + status: { + title: 'Status', type: 'string', }, - age: { - title: 'Age', + ip: { + title: 'IP', type: 'string', }, + port: { + title: 'Port', + type: 'integer', + }, + txMessages: { + title: 'txMessages', + type: 'array', + }, + rxMessages: { + title: 'rxMessages', + type: 'array', + }, }, }; source: LocalDataSource = new LocalDataSource(); - constructor(private service: ControlService, private router: Router) { - const data = this.service.getData(); - this.source.load(data); + constructor(private service: ControlService, private router: Router) { + this.service.getxAppInstances((instances) => { this.source.load(instances); } ); } view(event): void { const url = '/xapp'; - this.router.navigate([url, event]).then( (e) => { - if (e) { - console.log(event.data); - console.log('Navigation is successful!'); - } else { - console.log('Navigation has failed!'); - } - }); + this.router.navigate([url, event]); }