mark uncreatable Cluster objects in cluster-store as dead

- Display a special error for each of the currently 2 error types from
  loading the kubeconfig

- Special handling of dead clusters in proxy handler so that there are
  no unhandled promise rejections

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2020-11-26 09:19:07 -05:00
1 parent 238756be72
commit b3a01fac2f
23 files changed
+424 -210

No files matched your search

+17 -19
View File
@@ -9,7 +9,7 @@ import { comparer } from "mobx";
export class Tracker extends Util.Singleton {
static readonly GA_ID = "UA-159377374-1";
static readonly SEGMENT_KEY = "YENwswyhlOgz8P7EFKUtIZ2MfON7Yxqb";
protected eventHandlers: Array<(ev: EventBus.AppEvent ) => void> = [];
protected eventHandlers: Array<(ev: EventBus.AppEvent) => void> = [];
protected started = false;
protected visitor: ua.Visitor;
protected analytics: Analytics;
@@ -124,30 +124,28 @@ export class Tracker extends Util.Singleton {
}
protected resolveOS() {
let os = "";
if (App.isMac) {
os = "MacOS";
} else if(App.isWindows) {
os = "Windows";
} else if (App.isLinux) {
os = "Linux";
if (App.isSnap) {
os += "; Snap";
} else {
os += "; AppImage";
}
} else {
os = "Unknown";
return "MacOS";
}
return os;
if (App.isWindows) {
return "Windows";
}
if (App.isLinux) {
return `Linux; ${App.isSnap ? "Snap" : "AppImage"}`;
}
return "Unknown";
}
protected async event(eventCategory: string, eventAction: string, otherParams = {}) {
const allowed = await this.isTelemetryAllowed();
if (!allowed) {
return;
}
try {
const allowed = await this.isTelemetryAllowed();
if (!allowed) {
return;
}
this.visitor.event({
ec: eventCategory,
ea: eventAction,