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

@@ -11,11 +11,9 @@ export class DaemonSetStore extends KubeObjectStore<DaemonSet> {
@observable metrics: IPodMetrics = null;
loadMetrics(daemonSet: DaemonSet) {
async loadMetrics(daemonSet: DaemonSet) {
const pods = this.getChildPods(daemonSet);
return podsApi.getMetrics(pods, daemonSet.getNs(), "").then(metrics =>
this.metrics = metrics
);
this.metrics = await podsApi.getMetrics(pods, daemonSet.getNs(), "");
}
getChildPods(daemonSet: DaemonSet): Pod[] {