Add notification to user to add accessible namespaces (#2173)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-03-23 13:21:47 -04:00
1 parent 0b99377feb
commit ee4d434d35
9 files changed
+85 -18

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
/**
* This channel is broadcast on whenever the cluster fails to list namespaces
* during a refresh and no `accessibleNamespaces` have been set.
*/
export const ClusterListNamespaceForbiddenChannel = "cluster:list-namespace-forbidden";
export type ListNamespaceForbiddenArgs = [clusterId: string];
export function isListNamespaceForbiddenArgs(args: unknown[]): args is ListNamespaceForbiddenArgs {
return args.length === 1 && typeof args[0] === "string";
}
+2 -1
View File
@@ -1,4 +1,5 @@
export * from "./ipc";
export * from "./invalid-kubeconfig";
export * from "./update-available";
export * from "./update-available.ipc";
export * from "./cluster.ipc";
export * from "./type-enforced-ipc";
@@ -3,10 +3,7 @@ import { UpdateInfo } from "electron-updater";
export const UpdateAvailableChannel = "update-available";
export const AutoUpdateLogPrefix = "[UPDATE-CHECKER]";
/**
* [<back-channel>, <update-info>]
*/
export type UpdateAvailableFromMain = [string, UpdateInfo];
export type UpdateAvailableFromMain = [backChannel: string, updateInfo: UpdateInfo];
export function areArgsUpdateAvailableFromMain(args: unknown[]): args is UpdateAvailableFromMain {
if (args.length !== 2) {
@@ -32,7 +29,7 @@ export type BackchannelArg = {
now: boolean;
};
export type UpdateAvailableToBackchannel = [BackchannelArg];
export type UpdateAvailableToBackchannel = [updateDecision: BackchannelArg];
export function areArgsUpdateAvailableToBackchannel(args: unknown[]): args is UpdateAvailableToBackchannel {
if (args.length !== 1) {