migration additions -- part 3 (adding makeObservable to constructor)

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2021-04-20 13:45:35 +03:00
1 parent 95794af5b2
commit 08787dce1f
139 files changed
+732 -147

No files matched your search

@@ -2,7 +2,7 @@ import "./cluster-issues.scss";
import React from "react";
import { observer } from "mobx-react";
import { computed } from "mobx";
import { computed, makeObservable } from "mobx";
import { Icon } from "../icon";
import { SubHeader } from "../layout/sub-header";
import { Table, TableCell, TableHead, TableRow } from "../table";
@@ -40,6 +40,11 @@ export class ClusterIssues extends React.Component<Props> {
[sortBy.age]: (warning: IWarning) => warning.age || "",
};
constructor(props: Props) {
super(props);
makeObservable(this);
}
@computed get warnings() {
const warnings: IWarning[] = [];
@@ -1,4 +1,4 @@
import { action, observable, reaction, when } from "mobx";
import { action, observable, reaction, when, makeObservable } from "mobx";
import { KubeObjectStore } from "../../kube-object.store";
import { Cluster, clusterApi, IClusterMetrics } from "../../api/endpoints";
import { autobind, createStorage } from "../../utils";
@@ -51,6 +51,7 @@ export class ClusterOverviewStore extends KubeObjectStore<Cluster> implements Cl
constructor() {
super();
makeObservable(this);
this.init();
}