mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
ensure cluster view is active before sending a command
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
92e30ddaa2
commit
d5ba6dfe79
@ -8,6 +8,8 @@ import { clusterStore } from "../../../common/cluster-store";
|
|||||||
import { workspaceStore } from "../../../common/workspace-store";
|
import { workspaceStore } from "../../../common/workspace-store";
|
||||||
import { CommandOverlay } from "./command-container";
|
import { CommandOverlay } from "./command-container";
|
||||||
import { broadcastMessage } from "../../../common/ipc";
|
import { broadcastMessage } from "../../../common/ipc";
|
||||||
|
import { navigate } from "../../navigation";
|
||||||
|
import { clusterViewURL } from "../cluster-manager/cluster-view.route";
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class CommandDialog extends React.Component {
|
export class CommandDialog extends React.Component {
|
||||||
@ -58,6 +60,11 @@ export class CommandDialog extends React.Component {
|
|||||||
workspace: workspaceStore.currentWorkspace
|
workspace: workspaceStore.currentWorkspace
|
||||||
});
|
});
|
||||||
} else if(clusterStore.active) {
|
} else if(clusterStore.active) {
|
||||||
|
navigate(clusterViewURL({
|
||||||
|
params: {
|
||||||
|
clusterId: clusterStore.active.id
|
||||||
|
}
|
||||||
|
}));
|
||||||
broadcastMessage(`command-palette:run-action:${clusterStore.active.id}`, command.id);
|
broadcastMessage(`command-palette:run-action:${clusterStore.active.id}`, command.id);
|
||||||
}
|
}
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user