From 5ef42f603e6c1b8e94dd90908988458d86ee8c7a Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 28 Jan 2021 19:05:28 +0200 Subject: [PATCH] clean up Signed-off-by: Roman --- src/renderer/api/kube-watch-api.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/renderer/api/kube-watch-api.ts b/src/renderer/api/kube-watch-api.ts index 852859fe52..fb9dc11444 100644 --- a/src/renderer/api/kube-watch-api.ts +++ b/src/renderer/api/kube-watch-api.ts @@ -69,14 +69,12 @@ export class KubeWatchApi { @computed get apis(): string[] { return Array.from(this.subscribers.keys()).map(api => { - const { cluster, namespaces, isReady } = this; - - if (!isReady || !cluster?.isAllowedResource(api.kind)) { + if (!this.isReady || !this.isAllowedApi(api)) { return []; } if (api.isNamespaced) { - return namespaces.map(namespace => api.getWatchUrl(namespace)); + return this.namespaces.map(namespace => api.getWatchUrl(namespace)); } else { return api.getWatchUrl(); }