mirror of https://github.com/rancher/dashboard.git
Fixes following review
- Ensure that the correct threshold if fetched from config (was previously always enabled) - Don't pass additional `namespace` value to `loadDataPage`
This commit is contained in:
parent
75aa51fab9
commit
e448505b3c
|
|
@ -45,7 +45,7 @@ export default {
|
||||||
// force ns filtering
|
// force ns filtering
|
||||||
forceNsFilter: {
|
forceNsFilter: {
|
||||||
...perfConfig.forceNsFilter,
|
...perfConfig.forceNsFilter,
|
||||||
threshold: parseInt(this.perfConfig?.incrementalLoading?.threshold || '0', 10)
|
threshold: parseInt(perfConfig?.forceNsFilter?.threshold || '0', 10)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ export default {
|
||||||
|
|
||||||
// Load a page of data for a given type
|
// Load a page of data for a given type
|
||||||
// Used for incremental loading when enabled
|
// Used for incremental loading when enabled
|
||||||
async loadDataPage(ctx, { type, opt, namespace }) {
|
async loadDataPage(ctx, { type, opt }) {
|
||||||
const { getters, commit, dispatch } = ctx;
|
const { getters, commit, dispatch } = ctx;
|
||||||
|
|
||||||
type = getters.normalizeType(type);
|
type = getters.normalizeType(type);
|
||||||
|
|
@ -110,16 +110,15 @@ export default {
|
||||||
opt: {
|
opt: {
|
||||||
...opt,
|
...opt,
|
||||||
url: res.pagination?.next
|
url: res.pagination?.next
|
||||||
},
|
}
|
||||||
namespace
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// We have everything!
|
// We have everything!
|
||||||
if (opt.hasManualRefresh) {
|
if (opt.hasManualRefresh) {
|
||||||
dispatch('resource-fetch/updateManualRefreshIsLoading', false, { root: true });
|
dispatch('resource-fetch/updateManualRefreshIsLoading', false, { root: true });
|
||||||
}
|
}
|
||||||
if (namespace) {
|
if (opt.namespaced) {
|
||||||
commit('setHaveNamespace', { type, namespace });
|
commit('setHaveNamespace', { type, namespace: opt.namespaced });
|
||||||
} else {
|
} else {
|
||||||
commit('setHaveAll', { type });
|
commit('setHaveAll', { type });
|
||||||
}
|
}
|
||||||
|
|
@ -213,9 +212,7 @@ export default {
|
||||||
commit('forgetType', type);
|
commit('forgetType', type);
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch('loadDataPage', {
|
dispatch('loadDataPage', { type, opt: pageFetchOpts });
|
||||||
type, opt: pageFetchOpts, namespace: opt.namespaced
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let streamStarted = false;
|
let streamStarted = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue