Refactor ipc module (#1225)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-11-19 11:48:13 +02:00
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";