未验证 提交 7d7c1b34 编写于 作者: H Harkishen Singh 提交者: GitHub

Adds support for showing warning icon in StatefulSet (#5055)

* Adds suport for showing warning icon when pods down than desired
Signed-off-by: NHarkishen Singh <harkishensingh@hotmail.com>

* updated stateful set logic
Signed-off-by: NHarkishen Singh <harkishensingh@hotmail.com>

* removed false constructor and status column in statefulsets
Signed-off-by: NHarkishen Singh <harkishensingh@hotmail.com>

* linted
Signed-off-by: NHarkishen Singh <harkishensingh@hotmail.com>
上级 6ab57edc
......@@ -20,7 +20,7 @@ import {
ComponentFactoryResolver,
Input,
} from '@angular/core';
import {Event, Metric, StatefulSet, StatefulSetList} from '@api/backendapi';
import {Event, Metric, StatefulSet, StatefulSetList, PodInfo} from '@api/backendapi';
import {Observable} from 'rxjs/Observable';
import {ResourceListWithStatuses} from '../../../resources/list';
import {NotificationsService} from '../../../services/global/notifications';
......@@ -78,11 +78,18 @@ export class StatefulSetListComponent extends ResourceListWithStatuses<
}
isInPendingState(resource: StatefulSet): boolean {
return resource.podInfo.warnings.length === 0 && resource.podInfo.pending > 0;
return (
resource.podInfo.warnings.length === 0 &&
(resource.podInfo.pending > 0 || resource.podInfo.running !== resource.podInfo.desired)
);
}
isInSuccessState(resource: StatefulSet): boolean {
return resource.podInfo.warnings.length === 0 && resource.podInfo.pending === 0;
return (
resource.podInfo.warnings.length === 0 &&
resource.podInfo.pending === 0 &&
resource.podInfo.running === resource.podInfo.desired
);
}
getDisplayColumns(): string[] {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册