1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Update debug log

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-11-29 12:51:56 -05:00
parent 3c1c635f60
commit 74f1008de0

View File

@ -147,11 +147,11 @@ export class KubeWatchApi {
? reaction(
// Note: must slice because reaction won't fire if it isn't there
() => [KubeWatchApi.context.contextNamespaces.slice(), KubeWatchApi.context.hasSelectedAll] as const,
([namespaces, curSelectedAll], [, prevSelectedAll]) => {
([namespaces, curSelectedAll], [prevNamespaces, prevSelectedAll]) => {
if (curSelectedAll && prevSelectedAll) {
console.log(`[KUBE-WATCH-API]: Not changing watch for ${store.api.apiBase} because a new namespace was created but all namespaces are selected`);
const action = namespaces.length > prevNamespaces.length ? "created" : "deleted";
return;
return console.debug(`[KUBE-WATCH-API]: Not changing watch for ${store.api.apiBase} because a new namespace was ${action} but all namespaces are selected`);
}
console.log(`[KUBE-WATCH-API]: changing watch ${store.api.apiBase}`, namespaces);