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 { getGlobalBannerFontSizes } from '@shell/utils/banners';
|
||||||
import { TopLevelMenuHelperPagination, TopLevelMenuHelperLegacy } from 'components/nav/TopLevelMenu.helper';
|
import { TopLevelMenuHelperPagination, TopLevelMenuHelperLegacy } from 'components/nav/TopLevelMenu.helper';
|
||||||
import { debounce } from 'lodash';
|
import { debounce } from 'lodash';
|
||||||
|
import { sameContents } from '@shell/utils/array';
|
||||||
|
|
||||||
// TODO: RC (home page/side bar) test search properly
|
// TODO: RC (home page/side bar) test search properly
|
||||||
|
|
||||||
|
|
@ -265,8 +266,12 @@ export default {
|
||||||
|
|
||||||
pinnedIds: {
|
pinnedIds: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(ids) {
|
handler(neu, old) {
|
||||||
this.updateClusters(ids);
|
if (sameContents(neu, old)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.updateClusters(neu);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
namespaceFilterChanged(neu) {
|
namespaceFilterChanged(neu) {
|
||||||
if (!this.canPaginate || !this.schema?.attributes?.namespaced || !this.namespaced) {
|
if (!this.canPaginate || !this.isNamespaced) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -176,7 +176,7 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.resource) { // TODO: RC merge issue?
|
if (!this.resource) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -217,6 +217,15 @@ export default {
|
||||||
showDynamicRancherNamespaces() {
|
showDynamicRancherNamespaces() {
|
||||||
return this.$store.getters['prefs/get'](ALL_NAMESPACES);
|
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: {
|
watch: {
|
||||||
|
|
@ -240,7 +249,7 @@ export default {
|
||||||
namespaceFilters: {
|
namespaceFilters: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
async handler(neu, old) {
|
async handler(neu, old) {
|
||||||
if (!this.canPaginate || !this.schema?.attributes?.namespaced) {
|
if (!this.canPaginate || !this.isNamespaced) {
|
||||||
return;
|
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
|
// 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
|
// So set up both here
|
||||||
const params = { ...this.$route.params };
|
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);
|
const inStore = this.$store.getters['currentStore'](resource);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue