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
Upgrade component API versions to Amber
[portal/ric-dashboard.git]
/
webapp-frontend
/
src
/
app
/
caas-ingress
/
caas-ingress.datasource.ts
diff --git
a/webapp-frontend/src/app/caas-ingress/caas-ingress.datasource.ts
b/webapp-frontend/src/app/caas-ingress/caas-ingress.datasource.ts
index
d823c0d
..
637de03
100644
(file)
--- a/
webapp-frontend/src/app/caas-ingress/caas-ingress.datasource.ts
+++ b/
webapp-frontend/src/app/caas-ingress/caas-ingress.datasource.ts
@@
-46,9
+46,9
@@
export class CaasIngressDataSource extends DataSource<V1Pod> {
super();
}
super();
}
- loadTable(cluster: string, namespace: string) {
+ loadTable(
instanceKey: string,
cluster: string, namespace: string) {
this.loadingSubject.next(true);
this.loadingSubject.next(true);
- this.caasIngressService.getPodList(cluster, namespace)
+ this.caasIngressService.getPodList(
instanceKey,
cluster, namespace)
.pipe(
catchError((her: HttpErrorResponse) => {
console.log('CaasIngressDataSource failed: ' + her.message);
.pipe(
catchError((her: HttpErrorResponse) => {
console.log('CaasIngressDataSource failed: ' + her.message);
@@
-59,10
+59,14
@@
export class CaasIngressDataSource extends DataSource<V1Pod> {
)
.subscribe((pl: V1PodList) => {
this.rowCount = pl.items.length;
)
.subscribe((pl: V1PodList) => {
this.rowCount = pl.items.length;
- // precompute
the restart count
to keep HTML simple
+ // precompute
container ready, restart counts
to keep HTML simple
for (const v1pod of pl.items) {
for (const v1pod of pl.items) {
+ v1pod['readyCount'] = 0;
v1pod['restartCount'] = 0;
for (const cs of v1pod.status.containerStatuses) {
v1pod['restartCount'] = 0;
for (const cs of v1pod.status.containerStatuses) {
+ if (cs.ready) {
+ v1pod['readyCount'] = v1pod['readyCount'] + 1;
+ }
v1pod['restartCount'] = v1pod['restartCount'] + cs.restartCount;
}
}
v1pod['restartCount'] = v1pod['restartCount'] + cs.restartCount;
}
}