mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
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) {
|
||||
|
||||
Reference in new issue
Block a user