mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
clean up
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
386aebf98a
commit
5ef42f603e
@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user