mirror of https://github.com/rancher/dashboard.git
Merge remote-tracking branch 'origin/pagination-home-page' into pagination-cluster-explorer
This commit is contained in:
commit
0054f40948
|
|
@ -17,6 +17,7 @@ import Pinned from '@shell/components/nav/Pinned';
|
|||
import { getGlobalBannerFontSizes } from '@shell/utils/banners';
|
||||
import { TopLevelMenuHelperPagination, TopLevelMenuHelperLegacy } from 'components/nav/TopLevelMenu.helper';
|
||||
import { debounce } from 'lodash';
|
||||
import { sameContents } from '@shell/utils/array';
|
||||
|
||||
// TODO: RC (home page/side bar) test search properly
|
||||
|
||||
|
|
@ -265,8 +266,12 @@ export default {
|
|||
|
||||
pinnedIds: {
|
||||
immediate: true,
|
||||
handler(ids) {
|
||||
this.updateClusters(ids);
|
||||
handler(neu, old) {
|
||||
if (sameContents(neu, old)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.updateClusters(neu);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ export default {
|
|||
},
|
||||
|
||||
namespaceFilterChanged(neu) {
|
||||
if (!this.canPaginate || !this.schema?.attributes?.namespaced || !this.namespaced) {
|
||||
if (!this.canPaginate || !this.isNamespaced) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!this.resource) { // TODO: RC merge issue?
|
||||
if (!this.resource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -217,6 +217,15 @@ export default {
|
|||
showDynamicRancherNamespaces() {
|
||||
return this.$store.getters['prefs/get'](ALL_NAMESPACES);
|
||||
},
|
||||
|
||||
isNamespaced() {
|
||||
if (typeof this.namespaced !== 'undefined') {
|
||||
// This is an override, but only if it's set
|
||||
return !!this.namespaced;
|
||||
}
|
||||
|
||||
return this.schema?.attributes?.namespaced;
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
@ -240,7 +249,7 @@ export default {
|
|||
namespaceFilters: {
|
||||
immediate: true,
|
||||
async handler(neu, old) {
|
||||
if (!this.canPaginate || !this.schema?.attributes?.namespaced) {
|
||||
if (!this.canPaginate || !this.isNamespaced) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default {
|
|||
// Normally owner components supply `resource` and `inStore` as part of their data, however these are needed here before parent data runs
|
||||
// So set up both here
|
||||
const params = { ...this.$route.params };
|
||||
const resource = params.resource || this.schema.id; // Resource can either be on a page showing single list, or a page of a resource showing a list of another resource
|
||||
const resource = params.resource || this.schema?.id; // Resource can either be on a page showing single list, or a page of a resource showing a list of another resource
|
||||
const inStore = this.$store.getters['currentStore'](resource);
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue