refactor overview statuses to be more DRY (#912)

* refactor overview statuses to be more DRY

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2020-09-29 11:25:29 -04:00
1 parent 459742556b
commit c542ad0348
13 files changed
+377 -304

No files matched your search

@@ -10,11 +10,9 @@ export class StatefulSetStore extends KubeObjectStore<StatefulSet> {
api = statefulSetApi
@observable metrics: IPodMetrics = null;
loadMetrics(statefulSet: StatefulSet) {
async loadMetrics(statefulSet: StatefulSet) {
const pods = this.getChildPods(statefulSet);
return podsApi.getMetrics(pods, statefulSet.getNs(), "").then(metrics =>
this.metrics = metrics
);
this.metrics = await podsApi.getMetrics(pods, statefulSet.getNs(), "");
}
getChildPods(statefulSet: StatefulSet) {