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[] {
|
||||
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();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user