mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
migration additions -- part 5 (removing @autobind as class-decorator where mobx)
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
a7ebf7cb3c
commit
46c699b26f
50 files changed
+74
-195
No files matched your search
@@ -1,11 +1,9 @@
|
||||
import { observable, makeObservable } from "mobx";
|
||||
import { autobind } from "../../utils";
|
||||
import { makeObservable, observable } from "mobx";
|
||||
import { KubeObjectStore } from "../../kube-object.store";
|
||||
import { IPodMetrics, podsApi, PodStatus, StatefulSet, statefulSetApi } from "../../api/endpoints";
|
||||
import { podsStore } from "../+workloads-pods/pods.store";
|
||||
import { apiManager } from "../../api/api-manager";
|
||||
|
||||
@autobind()
|
||||
export class StatefulSetStore extends KubeObjectStore<StatefulSet> {
|
||||
api = statefulSetApi;
|
||||
@observable metrics: IPodMetrics = null;
|
||||
@@ -34,11 +32,9 @@ export class StatefulSetStore extends KubeObjectStore<StatefulSet> {
|
||||
|
||||
if (pods.some(pod => pod.getStatus() === PodStatus.FAILED)) {
|
||||
status.failed++;
|
||||
}
|
||||
else if (pods.some(pod => pod.getStatus() === PodStatus.PENDING)) {
|
||||
} else if (pods.some(pod => pod.getStatus() === PodStatus.PENDING)) {
|
||||
status.pending++;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
status.running++;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user