kubeconfig-manager.ts fixes / refactoring

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-12 12:49:11 +03:00
1 parent 40da87c0ef
commit e7fc6b4a35
7 files changed
+80 -76

No files matched your search

+1 -2
View File
@@ -5,8 +5,7 @@ export enum ClusterIpcMessage {
CLUSTER_STOP = "cluster-stop",
CLUSTER_REMOVE = "cluster-remove",
CLUSTER_REMOVE_WORKSPACE = "cluster-remove-all-from-workspace",
CLUSTER_EVENTS = "cluster-events-count",
CLUSTER_REFRESH = "cluster-refresh",
CLUSTER_REFRESH = "cluster-refresh", // todo: remove, possibly won't needed
FEATURE_INSTALL = "cluster-feature-install",
FEATURE_UPGRADE = "cluster-feature-upgrade",
FEATURE_REMOVE = "cluster-feature-remove",
+4 -3
View File
@@ -1,5 +1,6 @@
// Creates system valid random filename
// Create random filename
export function randomFileName(name: string) {
return `${Math.random().toString(36).substring(2, 15)}-${Math.random().toString(36).substring(2, 15)}-${name}`
export function randomFileName({ prefix = "", suffix = "", sep = "__" } = {}) {
const randId = () => Math.random().toString(16).substr(2);
return [prefix, randId(), suffix].filter(s => s).join(sep);
}