Skip to content

Commit

Permalink
chore: remove unused clusterRefreshHandler
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Hippler <[email protected]>
  • Loading branch information
ahippler committed Nov 18, 2022
1 parent f3fb8a6 commit 396abdb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
7 changes: 0 additions & 7 deletions src/common/cluster-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,6 @@ export enum ClusterMetricsResourceType {
*/
export const initialNodeShellImage = "docker.io/alpine:3.13";

/**
* The arguments for requesting to refresh a cluster's metadata
*/
export interface ClusterRefreshOptions {
refreshMetadata?: boolean;
}

/**
* The data representing a cluster's state, for passing between main and renderer
*/
Expand Down
1 change: 0 additions & 1 deletion src/common/ipc/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
export const clusterActivateHandler = "cluster:activate";
export const clusterSetFrameIdHandler = "cluster:set-frame-id";
export const clusterVisibilityHandler = "cluster:visibility";
export const clusterRefreshHandler = "cluster:refresh";
export const clusterDisconnectHandler = "cluster:disconnect";
export const clusterKubectlApplyAllHandler = "cluster:kubectl-apply-all";
export const clusterKubectlDeleteAllHandler = "cluster:kubectl-delete-all";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import type { IpcMainInvokeEvent } from "electron";
import { BrowserWindow, Menu } from "electron";
import { clusterFrameMap } from "../../../../common/cluster-frames";
import { clusterActivateHandler, clusterSetFrameIdHandler, clusterVisibilityHandler, clusterRefreshHandler, clusterDisconnectHandler, clusterKubectlApplyAllHandler, clusterKubectlDeleteAllHandler } from "../../../../common/ipc/cluster";
import { clusterActivateHandler, clusterSetFrameIdHandler, clusterVisibilityHandler, clusterDisconnectHandler, clusterKubectlApplyAllHandler, clusterKubectlDeleteAllHandler } from "../../../../common/ipc/cluster";
import type { ClusterId } from "../../../../common/cluster-types";
import { ClusterStore } from "../../../../common/cluster-store/cluster-store";
import { broadcastMainChannel, broadcastMessage, ipcMainHandle, ipcMainOn } from "../../../../common/ipc";
Expand Down Expand Up @@ -68,12 +68,6 @@ export const setupIpcMainHandlers = ({
clusterManager.visibleCluster = clusterId;
});

ipcMainHandle(clusterRefreshHandler, (event, clusterId: ClusterId) => {
return ClusterStore.getInstance()
.getById(clusterId)
?.refresh({ refreshMetadata: true });
});

ipcMainHandle(clusterDisconnectHandler, (event, clusterId: ClusterId) => {
emitAppEvent({ name: "cluster", action: "stop" });
const cluster = ClusterStore.getInstance().getById(clusterId);
Expand Down

0 comments on commit 396abdb

Please sign in to comment.