mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Refactor ipc module (#1225)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
c4b98534dc
commit
5aaacb21f9
20 files changed
+224
-242
No files matched your search
@@ -12,8 +12,9 @@ import { Cluster } from "../../../main/cluster";
|
||||
import { ClusterIcon } from "../cluster-icon";
|
||||
import { IClusterSettingsRouteParams } from "./cluster-settings.route";
|
||||
import { clusterStore } from "../../../common/cluster-store";
|
||||
import { clusterIpc } from "../../../common/cluster-ipc";
|
||||
import { PageLayout } from "../layout/page-layout";
|
||||
import { requestMain } from "../../../common/ipc";
|
||||
import { clusterActivateHandler, clusterRefreshHandler } from "../../../common/cluster-ipc"
|
||||
|
||||
interface Props extends RouteComponentProps<IClusterSettingsRouteParams> {
|
||||
}
|
||||
@@ -41,8 +42,8 @@ export class ClusterSettings extends React.Component<Props> {
|
||||
|
||||
refreshCluster = async () => {
|
||||
if (this.cluster) {
|
||||
await clusterIpc.activate.invokeFromRenderer(this.cluster.id);
|
||||
await clusterIpc.refresh.invokeFromRenderer(this.cluster.id);
|
||||
await requestMain(clusterActivateHandler, this.cluster.id)
|
||||
await requestMain(clusterRefreshHandler, this.cluster.id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React from "react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { observer } from "mobx-react";
|
||||
import { clusterIpc } from "../../../../common/cluster-ipc";
|
||||
import { clusterStore } from "../../../../common/cluster-store";
|
||||
import { Cluster } from "../../../../main/cluster";
|
||||
import { autobind } from "../../../utils";
|
||||
|
||||
Reference in new issue
Block a user