mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
386aebf98a
commit
5ef42f603e
1 file changed
+2
-4
@@ -69,14 +69,12 @@ export class KubeWatchApi {
|
|||||||
|
|
||||||
@computed get apis(): string[] {
|
@computed get apis(): string[] {
|
||||||
return Array.from(this.subscribers.keys()).map(api => {
|
return Array.from(this.subscribers.keys()).map(api => {
|
||||||
const { cluster, namespaces, isReady } = this;
|
if (!this.isReady || !this.isAllowedApi(api)) {
|
||||||
|
|
||||||
if (!isReady || !cluster?.isAllowedResource(api.kind)) {
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (api.isNamespaced) {
|
if (api.isNamespaced) {
|
||||||
return namespaces.map(namespace => api.getWatchUrl(namespace));
|
return this.namespaces.map(namespace => api.getWatchUrl(namespace));
|
||||||
} else {
|
} else {
|
||||||
return api.getWatchUrl();
|
return api.getWatchUrl();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user