mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
1 parent
238756be72
commit
b3a01fac2f
23 files changed
+424
-210
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user