Code Review
/
portal
/
ric-dashboard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fetch/display xApp instance
[portal/ric-dashboard.git]
/
webapp-frontend
/
src
/
app
/
control
/
control.component.ts
diff --git
a/webapp-frontend/src/app/control/control.component.ts
b/webapp-frontend/src/app/control/control.component.ts
index
1520862
..
b493587
100644
(file)
--- a/
webapp-frontend/src/app/control/control.component.ts
+++ b/
webapp-frontend/src/app/control/control.component.ts
@@
-1,6
+1,6
@@
/*-
* ========================LICENSE_START=================================
/*-
* ========================LICENSE_START=================================
- * O
RAN-O
SC
+ * O
-RAN-
SC
* %%
* Copyright (C) 2019 AT&T Intellectual Property and Nokia
* %%
* %%
* 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';
import { ControlService } from '../services/control/control.service';
import { Router } from '@angular/router';
+
@Component({
selector: 'app-control',
templateUrl: './control.component.html',
@Component({
selector: 'app-control',
templateUrl: './control.component.html',
@@
-43,50
+44,46
@@
export class ControlComponent {
},
columns: {
},
columns: {
- id: {
- title: 'ID',
- type: 'number',
- },
- xAppName: {
- title: 'xApp Name',
+ xapp: {
+ title:'xApp Name',
type: 'string',
},
type: 'string',
},
-
xAppTyp
e: {
- title:
'xApp Typ
e',
+
nam
e: {
+ title:
'Instance Nam
e',
type: 'string',
},
type: 'string',
},
- podId: {
- title: 'Pod ID',
- type: 'number',
- },
- k8Status: {
- title: 'k8 Status',
+ status: {
+ title: 'Status',
type: 'string',
},
type: 'string',
},
-
age
: {
- title: '
Age
',
+
ip
: {
+ title: '
IP
',
type: 'string',
},
type: 'string',
},
+ port: {
+ title: 'Port',
+ type: 'integer',
+ },
+ txMessages: {
+ title: 'txMessages',
+ type: 'array',
+ },
+ rxMessages: {
+ title: 'rxMessages',
+ type: 'array',
+ },
},
};
source: LocalDataSource = new LocalDataSource();
},
};
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';
}
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]);
}
}