@rancher/shell 0.1.4 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/images/generic-plugin.svg +1 -7
- package/assets/styles/global/_button.scss +1 -0
- package/assets/translations/en-us.yaml +129 -53
- package/assets/translations/zh-hans.yaml +18 -0
- package/components/CommunityLinks.vue +40 -49
- package/components/ExplorerProjectsNamespaces.vue +20 -3
- package/components/HarvesterServiceAddOnConfig.vue +10 -10
- package/components/LazyImage.vue +21 -8
- package/components/PromptRemove.vue +2 -2
- package/components/ResourceList/Masthead.vue +21 -1
- package/components/ResourceList/ResourceLoadingIndicator.vue +0 -8
- package/components/ResourceList/index.vue +42 -36
- package/components/ResourceTable.vue +19 -0
- package/components/SortableTable/THead.vue +311 -70
- package/components/SortableTable/advanced-filtering.js +272 -0
- package/components/SortableTable/filtering.js +90 -29
- package/components/SortableTable/index.vue +486 -280
- package/components/Tabbed/index.vue +25 -7
- package/components/TypeDescription.vue +10 -1
- package/components/fleet/FleetClusters.vue +6 -0
- package/components/fleet/FleetRepos.vue +7 -1
- package/components/form/Command.vue +5 -0
- package/components/form/EnvVars.vue +5 -0
- package/components/form/NameNsDescription.vue +3 -1
- package/components/form/NodeScheduling.vue +6 -1
- package/components/form/PodAffinity.vue +5 -0
- package/components/form/ServiceNameSelect.vue +5 -0
- package/components/form/ValueFromResource.vue +7 -1
- package/components/form/WorkloadPorts.vue +2 -2
- package/components/nav/TopLevelMenu.vue +2 -1
- package/config/home-links.js +155 -0
- package/config/private-label.js +1 -1
- package/config/product/manager.js +0 -2
- package/config/product/settings.js +1 -0
- package/config/product/uiplugins.js +2 -1
- package/config/settings.js +3 -1
- package/config/uiplugins.js +76 -6
- package/config/version.js +17 -0
- package/core/plugin.ts +12 -0
- package/core/plugins.js +29 -5
- package/core/types.ts +6 -0
- package/creators/app/{.eslintignore → files/.eslintignore} +0 -0
- package/creators/app/{.eslintrc.js → files/.eslintrc.js} +0 -0
- package/creators/app/{.vscode → files/.vscode}/settings.json +0 -0
- package/creators/app/{babel.config.js → files/babel.config.js} +0 -0
- package/creators/app/{nuxt.config.js → files/nuxt.config.js} +0 -0
- package/creators/app/{tsconfig.json → files/tsconfig.json} +2 -1
- package/creators/app/init +16 -17
- package/creators/app/package.json +7 -1
- package/creators/pkg/{babel.config.js → files/babel.config.js} +0 -0
- package/creators/pkg/{index.ts → files/index.ts} +0 -0
- package/creators/pkg/{tsconfig.json → files/tsconfig.json} +13 -12
- package/creators/pkg/{vue.config.js → files/vue.config.js} +0 -0
- package/creators/pkg/init +1 -1
- package/creators/pkg/package.json +1 -1
- package/creators/update/init +54 -0
- package/creators/update/package.json +20 -0
- package/creators/update/upgrade +56 -0
- package/creators/update/yarn-error.log +54 -0
- package/detail/provisioning.cattle.io.cluster.vue +1 -1
- package/detail/workload/index.vue +1 -0
- package/edit/persistentvolume/index.vue +48 -13
- package/edit/persistentvolumeclaim.vue +31 -13
- package/edit/provisioning.cattle.io.cluster/ACE.vue +2 -1
- package/edit/provisioning.cattle.io.cluster/DrainOptions.vue +0 -1
- package/edit/provisioning.cattle.io.cluster/rke2.vue +52 -43
- package/edit/service.vue +1 -1
- package/edit/workload/index.vue +19 -9
- package/edit/workload/mixins/workload.js +109 -114
- package/edit/workload/storage/index.vue +11 -17
- package/edit/workload/storage/persistentVolumeClaim/index.vue +5 -0
- package/edit/workload/storage/secret.vue +6 -1
- package/list/catalog.cattle.io.app.vue +10 -9
- package/list/catalog.cattle.io.clusterrepo.vue +6 -61
- package/list/cis.cattle.io.clusterscan.vue +12 -12
- package/list/fleet.cattle.io.bundle.vue +33 -28
- package/list/fleet.cattle.io.cluster.vue +26 -22
- package/list/fleet.cattle.io.clustergroup.vue +6 -0
- package/list/fleet.cattle.io.clusterregistrationtoken.vue +28 -24
- package/list/fleet.cattle.io.gitrepo.vue +25 -14
- package/list/helm.cattle.io.projecthelmchart.vue +52 -33
- package/list/logging.banzaicloud.io.clusterflow.vue +7 -12
- package/list/logging.banzaicloud.io.flow.vue +7 -14
- package/list/management.cattle.io.cluster.vue +26 -15
- package/list/management.cattle.io.feature.vue +13 -8
- package/list/management.cattle.io.user.vue +38 -19
- package/list/monitoring.coreos.com.alertmanagerconfig.vue +8 -15
- package/list/namespace.vue +14 -1
- package/list/node.vue +13 -16
- package/list/persistentvolume.vue +16 -9
- package/list/persistentvolumeclaim.vue +5 -8
- package/list/provisioning.cattle.io.cluster.vue +34 -8
- package/list/service.vue +24 -12
- package/list/ui.cattle.io.navlink.vue +6 -0
- package/list/workload.vue +2 -2
- package/middleware/authenticated.js +6 -0
- package/mixins/resource-fetch.js +12 -18
- package/mixins/resource-manager.js +126 -0
- package/models/catalog.cattle.io.uiplugin.js +4 -0
- package/models/management.cattle.io.cluster.js +9 -1
- package/models/pod.js +15 -5
- package/models/provisioning.cattle.io.cluster.js +4 -0
- package/models/workload.service.js +10 -0
- package/nuxt.config.js +2 -1
- package/package.json +1 -1
- package/pages/auth/login.vue +10 -0
- package/pages/auth/verify.vue +9 -0
- package/pages/c/_cluster/apps/charts/install.vue +119 -31
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +108 -0
- package/pages/c/_cluster/settings/links.vue +53 -101
- package/pages/c/_cluster/settings/performance.vue +90 -7
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +3 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +72 -21
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +26 -7
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +2 -7
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +23 -15
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +12 -5
- package/pages/c/_cluster/uiplugins/index.vue +223 -72
- package/pages/support/index.vue +31 -142
- package/plugins/dashboard-store/actions.js +19 -0
- package/plugins/dashboard-store/getters.js +20 -3
- package/plugins/dashboard-store/mutations.js +13 -7
- package/plugins/plugin.js +18 -15
- package/plugins/steve/getters.js +12 -0
- package/plugins/version.js +21 -0
- package/promptRemove/mixin/roleDeletionCheck.js +15 -1
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +6 -7
- package/rancher-components/components/BadgeState/BadgeState.spec.ts +12 -0
- package/rancher-components/components/BadgeState/BadgeState.vue +107 -0
- package/rancher-components/components/BadgeState/index.ts +1 -0
- package/rancher-components/components/Banner/Banner.test.ts +13 -0
- package/rancher-components/components/Banner/Banner.vue +163 -0
- package/rancher-components/components/Banner/index.ts +1 -0
- package/rancher-components/components/Card/Card.vue +150 -0
- package/rancher-components/components/Card/index.ts +1 -0
- package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +77 -0
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +395 -0
- package/rancher-components/components/Form/Checkbox/index.ts +1 -0
- package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +29 -0
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +343 -0
- package/rancher-components/components/Form/LabeledInput/index.ts +1 -0
- package/rancher-components/components/Form/Radio/RadioButton.vue +270 -0
- package/rancher-components/components/Form/Radio/RadioGroup.vue +235 -0
- package/rancher-components/components/Form/Radio/index.ts +2 -0
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +168 -0
- package/rancher-components/components/Form/TextArea/index.ts +1 -0
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +107 -0
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +137 -0
- package/rancher-components/components/Form/ToggleSwitch/index.ts +1 -0
- package/rancher-components/components/Form/index.ts +5 -0
- package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +137 -0
- package/rancher-components/components/LabeledTooltip/index.ts +1 -0
- package/scripts/publish-shell.sh +39 -6
- package/scripts/record-deps.js +37 -0
- package/scripts/test-plugins-build.sh +8 -5
- package/scripts/typegen.sh +84 -0
- package/store/auth.js +3 -0
- package/store/index.js +12 -3
- package/store/type-map.js +2 -0
- package/types/shell/index.d.ts +3046 -0
- package/utils/favicon.js +8 -2
- package/utils/gc/gc-interval.ts +40 -0
- package/utils/gc/gc-root-store.js +76 -0
- package/utils/gc/gc-route-changed.ts +44 -0
- package/utils/gc/gc-types.ts +21 -0
- package/utils/gc/gc.ts +282 -0
- package/config/footer.js +0 -18
- package/creators/pkg/nuxt.config.js +0 -6
- package/yarn-error.log +0 -195
|
@@ -3,23 +3,22 @@ import { mapState, mapGetters } from 'vuex';
|
|
|
3
3
|
import AsyncButton from '@shell/components/AsyncButton';
|
|
4
4
|
import { Card } from '@components/Card';
|
|
5
5
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
6
|
-
import Loading from '@shell/components/Loading';
|
|
7
6
|
import { Banner } from '@components/Banner';
|
|
8
7
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
9
8
|
import { MANAGEMENT } from '@shell/config/types';
|
|
10
9
|
import { SETTING } from '@shell/config/settings';
|
|
10
|
+
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
13
|
components: {
|
|
14
14
|
AsyncButton,
|
|
15
15
|
Banner,
|
|
16
16
|
Card,
|
|
17
|
-
Loading,
|
|
18
17
|
ResourceTable,
|
|
19
18
|
LabeledInput
|
|
20
19
|
},
|
|
21
|
-
|
|
22
|
-
props:
|
|
20
|
+
mixins: [ResourceFetch],
|
|
21
|
+
props: {
|
|
23
22
|
resource: {
|
|
24
23
|
type: String,
|
|
25
24
|
required: true,
|
|
@@ -32,7 +31,7 @@ export default {
|
|
|
32
31
|
},
|
|
33
32
|
|
|
34
33
|
async fetch() {
|
|
35
|
-
|
|
34
|
+
await this.$fetchType(this.resource);
|
|
36
35
|
|
|
37
36
|
this.serverUrlSetting = this.$store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.SERVER_URL);
|
|
38
37
|
|
|
@@ -52,7 +51,6 @@ export default {
|
|
|
52
51
|
|
|
53
52
|
data() {
|
|
54
53
|
return {
|
|
55
|
-
rows: null,
|
|
56
54
|
update: [],
|
|
57
55
|
updateMode: 'activate',
|
|
58
56
|
error: null,
|
|
@@ -85,6 +83,13 @@ export default {
|
|
|
85
83
|
},
|
|
86
84
|
},
|
|
87
85
|
|
|
86
|
+
$loadingResources() {
|
|
87
|
+
return {
|
|
88
|
+
loadResources: [MANAGEMENT.FEATURE],
|
|
89
|
+
loadIndeterminate: true, // results are filtered so we wouldn't get the correct count on indicator...
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
|
|
88
93
|
watch: {
|
|
89
94
|
showPromptUpdate(show) {
|
|
90
95
|
if (show) {
|
|
@@ -184,12 +189,12 @@ export default {
|
|
|
184
189
|
</script>
|
|
185
190
|
|
|
186
191
|
<template>
|
|
187
|
-
<
|
|
188
|
-
<div v-else>
|
|
192
|
+
<div>
|
|
189
193
|
<ResourceTable
|
|
190
194
|
:schema="schema"
|
|
191
195
|
:rows="filteredRows"
|
|
192
196
|
:row-actions="enableRowActions"
|
|
197
|
+
:loading="loading"
|
|
193
198
|
>
|
|
194
199
|
<template slot="cell:name" slot-scope="scope">
|
|
195
200
|
<div class="feature-name">
|
|
@@ -1,26 +1,45 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import AsyncButton from '@shell/components/AsyncButton';
|
|
3
|
-
import { NORMAN } from '@shell/config/types';
|
|
3
|
+
import { MANAGEMENT, NORMAN } from '@shell/config/types';
|
|
4
4
|
import { NAME } from '@shell/config/product/auth';
|
|
5
5
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
6
|
-
import Loading from '@shell/components/Loading';
|
|
7
6
|
import Masthead from '@shell/components/ResourceList/Masthead';
|
|
7
|
+
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
10
|
components: {
|
|
11
11
|
AsyncButton,
|
|
12
|
-
Loading,
|
|
13
12
|
ResourceTable,
|
|
14
13
|
Masthead
|
|
15
14
|
},
|
|
15
|
+
mixins: [ResourceFetch],
|
|
16
|
+
props: {
|
|
17
|
+
resource: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
loadResources: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
16
26
|
|
|
27
|
+
loadIndeterminate: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
incrementalLoadingIndicator: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
},
|
|
17
37
|
async fetch() {
|
|
18
38
|
const store = this.$store;
|
|
19
|
-
const resource = this.resource;
|
|
20
39
|
|
|
21
40
|
await store.dispatch(`rancher/findAll`, { type: NORMAN.USER });
|
|
22
41
|
|
|
23
|
-
|
|
42
|
+
await this.$fetchType(this.resource);
|
|
24
43
|
|
|
25
44
|
this.canRefreshAccess = await this.$store.dispatch('rancher/request', { url: '/v3/users?limit=0' })
|
|
26
45
|
.then(res => !!res?.actions?.refreshauthprovideraccess);
|
|
@@ -28,21 +47,19 @@ export default {
|
|
|
28
47
|
|
|
29
48
|
data() {
|
|
30
49
|
const getters = this.$store.getters;
|
|
31
|
-
const params = { ...this.$route.params };
|
|
32
|
-
|
|
33
|
-
const resource = params.resource;
|
|
34
50
|
|
|
35
|
-
const schema = getters[`management/schemaFor`](resource);
|
|
51
|
+
const schema = getters[`management/schemaFor`](this.resource);
|
|
36
52
|
|
|
37
53
|
return {
|
|
38
54
|
schema,
|
|
39
|
-
resource,
|
|
40
|
-
|
|
41
|
-
// Provided by fetch later
|
|
42
|
-
rows: null,
|
|
43
55
|
canRefreshAccess: false,
|
|
56
|
+
};
|
|
57
|
+
},
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
$loadingResources() {
|
|
60
|
+
return {
|
|
61
|
+
loadResources: [MANAGEMENT.USER],
|
|
62
|
+
loadIndeterminate: true, // results are filtered so we wouldn't get the correct count on indicator...
|
|
46
63
|
};
|
|
47
64
|
},
|
|
48
65
|
|
|
@@ -56,7 +73,7 @@ export default {
|
|
|
56
73
|
},
|
|
57
74
|
|
|
58
75
|
users() {
|
|
59
|
-
if ( !this.
|
|
76
|
+
if ( !this.rows ) {
|
|
60
77
|
return [];
|
|
61
78
|
}
|
|
62
79
|
|
|
@@ -64,7 +81,7 @@ export default {
|
|
|
64
81
|
// 1) Only show system users in explorer/users and not in auth/users
|
|
65
82
|
// 2) Supplement user with info to enable/disable the refresh group membership action (this is not persisted on save)
|
|
66
83
|
const params = { ...this.$route.params };
|
|
67
|
-
const requiredUsers = params.product === NAME ? this.
|
|
84
|
+
const requiredUsers = params.product === NAME ? this.rows.filter(a => !a.isSystem) : this.rows;
|
|
68
85
|
|
|
69
86
|
requiredUsers.forEach((r) => {
|
|
70
87
|
r.canRefreshAccess = this.canRefreshAccess;
|
|
@@ -94,11 +111,13 @@ export default {
|
|
|
94
111
|
</script>
|
|
95
112
|
|
|
96
113
|
<template>
|
|
97
|
-
<
|
|
98
|
-
<div v-else>
|
|
114
|
+
<div>
|
|
99
115
|
<Masthead
|
|
100
116
|
:schema="schema"
|
|
101
117
|
:resource="resource"
|
|
118
|
+
:show-incremental-loading-indicator="incrementalLoadingIndicator"
|
|
119
|
+
:load-resources="loadResources"
|
|
120
|
+
:load-indeterminate="loadIndeterminate"
|
|
102
121
|
>
|
|
103
122
|
<template slot="extraActions">
|
|
104
123
|
<AsyncButton
|
|
@@ -113,7 +132,7 @@ export default {
|
|
|
113
132
|
</template>
|
|
114
133
|
</Masthead>
|
|
115
134
|
|
|
116
|
-
<ResourceTable :schema="schema" :rows="users" :group-by="groupBy" />
|
|
135
|
+
<ResourceTable :schema="schema" :rows="users" :group-by="groupBy" :loading="loading" />
|
|
117
136
|
</div>
|
|
118
137
|
</template>
|
|
119
138
|
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
3
|
-
import Loading from '@shell/components/Loading';
|
|
4
3
|
import { Banner } from '@components/Banner';
|
|
5
4
|
import { MONITORING } from '@shell/config/types';
|
|
6
|
-
|
|
5
|
+
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
7
6
|
export default {
|
|
8
7
|
name: 'ListApps',
|
|
9
|
-
components: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
props: {
|
|
8
|
+
components: { Banner, ResourceTable },
|
|
9
|
+
mixins: [ResourceFetch],
|
|
10
|
+
props: {
|
|
14
11
|
resource: {
|
|
15
12
|
type: String,
|
|
16
13
|
required: true,
|
|
@@ -25,27 +22,23 @@ export default {
|
|
|
25
22
|
async fetch() {
|
|
26
23
|
try {
|
|
27
24
|
await this.$store.dispatch('cluster/findAll', { type: MONITORING.ALERTMANAGERCONFIG });
|
|
28
|
-
|
|
25
|
+
await this.$fetchType(this.resource);
|
|
29
26
|
} catch (err) {
|
|
30
27
|
throw new Error(err);
|
|
31
28
|
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
data() {
|
|
35
|
-
return { rows: null };
|
|
36
|
-
},
|
|
29
|
+
}
|
|
37
30
|
};
|
|
38
31
|
</script>
|
|
39
32
|
|
|
40
33
|
<template>
|
|
41
|
-
<
|
|
42
|
-
<div v-else-if="rows.length > 0">
|
|
34
|
+
<div v-if="rows.length || loading">
|
|
43
35
|
<Banner color="info">
|
|
44
36
|
{{ t('monitoring.alertmanagerConfig.description') }}
|
|
45
37
|
</Banner>
|
|
46
38
|
<ResourceTable
|
|
47
39
|
:schema="schema"
|
|
48
40
|
:rows="rows"
|
|
41
|
+
:loading="loading"
|
|
49
42
|
/>
|
|
50
43
|
</div>
|
|
51
44
|
|
package/list/namespace.vue
CHANGED
|
@@ -6,6 +6,10 @@ export default {
|
|
|
6
6
|
name: 'ListNamespace',
|
|
7
7
|
components: { ResourceTable },
|
|
8
8
|
props: {
|
|
9
|
+
resource: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
9
13
|
schema: {
|
|
10
14
|
type: Object,
|
|
11
15
|
required: true,
|
|
@@ -14,6 +18,10 @@ export default {
|
|
|
14
18
|
type: Array,
|
|
15
19
|
required: true,
|
|
16
20
|
},
|
|
21
|
+
loading: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
required: false,
|
|
24
|
+
},
|
|
17
25
|
},
|
|
18
26
|
|
|
19
27
|
computed: {
|
|
@@ -28,7 +36,11 @@ export default {
|
|
|
28
36
|
return this.rows;
|
|
29
37
|
}
|
|
30
38
|
},
|
|
31
|
-
}
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
$loadingResources() {
|
|
42
|
+
return { loadIndeterminate: true };
|
|
43
|
+
},
|
|
32
44
|
};
|
|
33
45
|
</script>
|
|
34
46
|
|
|
@@ -39,6 +51,7 @@ export default {
|
|
|
39
51
|
:groupable="false"
|
|
40
52
|
:schema="schema"
|
|
41
53
|
key-field="_key"
|
|
54
|
+
:loading="loading"
|
|
42
55
|
v-on="$listeners"
|
|
43
56
|
/>
|
|
44
57
|
</template>
|
package/list/node.vue
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
3
|
-
import Loading from '@shell/components/Loading';
|
|
4
3
|
import Tag from '@shell/components/Tag';
|
|
5
4
|
import { Banner } from '@components/Banner';
|
|
6
5
|
import {
|
|
@@ -16,18 +15,21 @@ import { allHash } from '@shell/utils/promise';
|
|
|
16
15
|
import { get } from '@shell/utils/object';
|
|
17
16
|
import { GROUP_RESOURCES, mapPref } from '@shell/store/prefs';
|
|
18
17
|
import { COLUMN_BREAKPOINTS } from '@shell/components/SortableTable/index.vue';
|
|
19
|
-
|
|
18
|
+
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
20
19
|
export default {
|
|
21
20
|
name: 'ListNode',
|
|
22
21
|
components: {
|
|
23
|
-
Loading,
|
|
24
22
|
ResourceTable,
|
|
25
23
|
Tag,
|
|
26
24
|
Banner
|
|
27
25
|
},
|
|
28
|
-
mixins: [metricPoller],
|
|
26
|
+
mixins: [metricPoller, ResourceFetch],
|
|
29
27
|
|
|
30
28
|
props: {
|
|
29
|
+
resource: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
31
33
|
schema: {
|
|
32
34
|
type: Object,
|
|
33
35
|
required: true,
|
|
@@ -35,7 +37,7 @@ export default {
|
|
|
35
37
|
},
|
|
36
38
|
|
|
37
39
|
async fetch() {
|
|
38
|
-
const hash = { kubeNodes: this.$
|
|
40
|
+
const hash = { kubeNodes: this.$fetchType(NODE) };
|
|
39
41
|
|
|
40
42
|
this.canViewPods = this.$store.getters[`cluster/schemaFor`](POD);
|
|
41
43
|
|
|
@@ -58,16 +60,11 @@ export default {
|
|
|
58
60
|
this.$store.dispatch('cluster/findAll', { type: POD });
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this.kubeNodes = res.kubeNodes;
|
|
63
|
+
await allHash(hash);
|
|
64
64
|
},
|
|
65
65
|
|
|
66
66
|
data() {
|
|
67
|
-
return {
|
|
68
|
-
kubeNodes: null,
|
|
69
|
-
canViewPods: false,
|
|
70
|
-
};
|
|
67
|
+
return { canViewPods: false };
|
|
71
68
|
},
|
|
72
69
|
|
|
73
70
|
beforeDestroy() {
|
|
@@ -79,7 +76,7 @@ export default {
|
|
|
79
76
|
|
|
80
77
|
computed: {
|
|
81
78
|
hasWindowsNodes() {
|
|
82
|
-
return (this.
|
|
79
|
+
return (this.rows || []).some(node => node.status.nodeInfo.operatingSystem === 'windows');
|
|
83
80
|
},
|
|
84
81
|
tableGroup: mapPref(GROUP_RESOURCES),
|
|
85
82
|
|
|
@@ -141,8 +138,7 @@ export default {
|
|
|
141
138
|
</script>
|
|
142
139
|
|
|
143
140
|
<template>
|
|
144
|
-
<
|
|
145
|
-
<div v-else>
|
|
141
|
+
<div>
|
|
146
142
|
<Banner
|
|
147
143
|
v-if="hasWindowsNodes"
|
|
148
144
|
color="info"
|
|
@@ -152,8 +148,9 @@ export default {
|
|
|
152
148
|
v-bind="$attrs"
|
|
153
149
|
:schema="schema"
|
|
154
150
|
:headers="headers"
|
|
155
|
-
:rows="
|
|
151
|
+
:rows="rows"
|
|
156
152
|
:sub-rows="true"
|
|
153
|
+
:loading="loading"
|
|
157
154
|
v-on="$listeners"
|
|
158
155
|
>
|
|
159
156
|
<template #sub-row="{fullColspan, row}">
|
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
3
|
-
import Loading from '@shell/components/Loading';
|
|
4
3
|
import { PVC } from '@shell/config/types';
|
|
4
|
+
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
name: 'ListPersistentVolume',
|
|
8
|
-
components: {
|
|
8
|
+
components: { ResourceTable },
|
|
9
|
+
mixins: [ResourceFetch],
|
|
10
|
+
props: {
|
|
11
|
+
resource: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
schema: {
|
|
17
|
+
type: Object,
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
9
21
|
|
|
10
22
|
async fetch() {
|
|
11
23
|
const inStore = this.$store.getters['currentStore']();
|
|
12
24
|
const pvcPromise = this.$store.dispatch(`${ inStore }/findAll`, { type: PVC });
|
|
13
25
|
|
|
14
|
-
|
|
26
|
+
await this.$fetchType(this.resource);
|
|
15
27
|
await pvcPromise;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
data() {
|
|
19
|
-
return { rows: [] };
|
|
20
28
|
}
|
|
21
29
|
};
|
|
22
30
|
</script>
|
|
23
31
|
|
|
24
32
|
<template>
|
|
25
|
-
<
|
|
26
|
-
<ResourceTable v-else :schema="$attrs.schema" :rows="rows" :headers="$attrs.headers" :group-by="$attrs.groupBy" />
|
|
33
|
+
<ResourceTable :schema="schema" :rows="rows" :headers="$attrs.headers" :group-by="$attrs.groupBy" :loading="loading" />
|
|
27
34
|
</template>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
3
3
|
import { STORAGE_CLASS } from '@shell/config/types';
|
|
4
|
+
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
name: 'ListPersistentVolumeClaim',
|
|
7
8
|
components: { ResourceTable },
|
|
8
|
-
|
|
9
|
-
props:
|
|
9
|
+
mixins: [ResourceFetch],
|
|
10
|
+
props: {
|
|
10
11
|
resource: {
|
|
11
12
|
type: String,
|
|
12
13
|
required: true,
|
|
@@ -24,18 +25,14 @@ export default {
|
|
|
24
25
|
// Fetch storage classes so we can determine if a PVC can be expanded
|
|
25
26
|
this.$store.dispatch(`${ inStore }/findAll`, { type: STORAGE_CLASS });
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
data() {
|
|
31
|
-
return { rows: [] };
|
|
28
|
+
await this.$fetchType(this.resource);
|
|
32
29
|
}
|
|
33
30
|
};
|
|
34
31
|
</script>
|
|
35
32
|
|
|
36
33
|
<template>
|
|
37
34
|
<ResourceTable
|
|
38
|
-
:loading="
|
|
35
|
+
:loading="loading"
|
|
39
36
|
:schema="schema"
|
|
40
37
|
:rows="rows"
|
|
41
38
|
/>
|
|
@@ -8,17 +8,35 @@ import { MODE, _IMPORT } from '@shell/config/query-params';
|
|
|
8
8
|
import { filterOnlyKubernetesClusters, filterHiddenLocalCluster } from '@shell/utils/cluster';
|
|
9
9
|
import { mapFeature, HARVESTER as HARVESTER_FEATURE } from '@shell/store/features';
|
|
10
10
|
import { NAME as EXPLORER } from '@shell/config/product/explorer';
|
|
11
|
+
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
11
12
|
|
|
12
13
|
export default {
|
|
13
14
|
components: {
|
|
14
15
|
Banner, ResourceTable, Masthead
|
|
15
16
|
},
|
|
17
|
+
mixins: [ResourceFetch],
|
|
18
|
+
props: {
|
|
19
|
+
loadResources: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: () => []
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
loadIndeterminate: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
incrementalLoadingIndicator: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
},
|
|
16
34
|
|
|
17
35
|
async fetch() {
|
|
18
36
|
const hash = {
|
|
37
|
+
rancherClusters: this.$fetchType(CAPI.RANCHER_CLUSTER),
|
|
19
38
|
normanClusters: this.$store.dispatch('rancher/findAll', { type: NORMAN.CLUSTER }),
|
|
20
39
|
mgmtClusters: this.$store.dispatch('management/findAll', { type: MANAGEMENT.CLUSTER }),
|
|
21
|
-
rancherClusters: this.$store.dispatch('management/findAll', { type: CAPI.RANCHER_CLUSTER }),
|
|
22
40
|
};
|
|
23
41
|
|
|
24
42
|
if ( this.$store.getters['management/canList'](SNAPSHOT) ) {
|
|
@@ -50,7 +68,6 @@ export default {
|
|
|
50
68
|
const res = await allHash(hash);
|
|
51
69
|
|
|
52
70
|
this.mgmtClusters = res.mgmtClusters;
|
|
53
|
-
this.rancherClusters = res.rancherClusters;
|
|
54
71
|
},
|
|
55
72
|
|
|
56
73
|
data() {
|
|
@@ -58,19 +75,18 @@ export default {
|
|
|
58
75
|
resource: CAPI.RANCHER_CLUSTER,
|
|
59
76
|
schema: this.$store.getters['management/schemaFor'](CAPI.RANCHER_CLUSTER),
|
|
60
77
|
mgmtClusters: [],
|
|
61
|
-
rancherClusters: [],
|
|
62
78
|
};
|
|
63
79
|
},
|
|
64
80
|
|
|
65
81
|
computed: {
|
|
66
|
-
|
|
82
|
+
filteredRows() {
|
|
67
83
|
// If Harvester feature is enabled, hide Harvester Clusters
|
|
68
84
|
if (this.harvesterEnabled) {
|
|
69
|
-
return filterHiddenLocalCluster(filterOnlyKubernetesClusters(this.
|
|
85
|
+
return filterHiddenLocalCluster(filterOnlyKubernetesClusters(this.rows), this.$store);
|
|
70
86
|
}
|
|
71
87
|
|
|
72
88
|
// Otherwise, show Harvester clusters - these will be shown with a warning
|
|
73
|
-
return filterHiddenLocalCluster(this.
|
|
89
|
+
return filterHiddenLocalCluster(this.rows, this.$store);
|
|
74
90
|
},
|
|
75
91
|
|
|
76
92
|
hiddenHarvesterCount() {
|
|
@@ -82,7 +98,7 @@ export default {
|
|
|
82
98
|
return 0;
|
|
83
99
|
}
|
|
84
100
|
|
|
85
|
-
return this.
|
|
101
|
+
return this.rows.length - filterOnlyKubernetesClusters(this.rows).length;
|
|
86
102
|
},
|
|
87
103
|
|
|
88
104
|
createLocation() {
|
|
@@ -115,6 +131,13 @@ export default {
|
|
|
115
131
|
harvesterEnabled: mapFeature(HARVESTER_FEATURE),
|
|
116
132
|
},
|
|
117
133
|
|
|
134
|
+
$loadingResources() {
|
|
135
|
+
return {
|
|
136
|
+
loadResources: [CAPI.RANCHER_CLUSTER],
|
|
137
|
+
loadIndeterminate: true, // results are filtered so we wouldn't get the correct count on indicator...
|
|
138
|
+
};
|
|
139
|
+
},
|
|
140
|
+
|
|
118
141
|
mounted() {
|
|
119
142
|
window.c = this;
|
|
120
143
|
},
|
|
@@ -130,6 +153,9 @@ export default {
|
|
|
130
153
|
:resource="resource"
|
|
131
154
|
:create-location="createLocation"
|
|
132
155
|
component-testid="cluster-manager-list"
|
|
156
|
+
:show-incremental-loading-indicator="incrementalLoadingIndicator"
|
|
157
|
+
:load-resources="loadResources"
|
|
158
|
+
:load-indeterminate="loadIndeterminate"
|
|
133
159
|
>
|
|
134
160
|
<template v-if="canImport" slot="extraActions">
|
|
135
161
|
<n-link
|
|
@@ -142,7 +168,7 @@ export default {
|
|
|
142
168
|
</template>
|
|
143
169
|
</Masthead>
|
|
144
170
|
|
|
145
|
-
<ResourceTable :schema="schema" :rows="
|
|
171
|
+
<ResourceTable :schema="schema" :rows="filteredRows" :namespaced="false" :loading="loading">
|
|
146
172
|
<template #cell:summary="{row}">
|
|
147
173
|
<span v-if="!row.stateParts.length">{{ row.nodes.length }}</span>
|
|
148
174
|
</template>
|
package/list/service.vue
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
3
|
-
import Loading from '@shell/components/Loading';
|
|
4
3
|
import { NODE } from '@shell/config/types';
|
|
5
4
|
import { allHash } from '@shell/utils/promise';
|
|
5
|
+
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
name: 'ListService',
|
|
9
|
-
components: {
|
|
9
|
+
components: { ResourceTable },
|
|
10
|
+
mixins: [ResourceFetch],
|
|
11
|
+
props: {
|
|
12
|
+
resource: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
schema: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
|
|
10
23
|
// fetch nodes before loading this page, as they may be referenced in the Target table column
|
|
11
24
|
async fetch() {
|
|
12
25
|
const store = this.$store;
|
|
@@ -21,23 +34,22 @@ export default {
|
|
|
21
34
|
}
|
|
22
35
|
} catch {}
|
|
23
36
|
|
|
24
|
-
const hash = { rows:
|
|
37
|
+
const hash = { rows: this.$fetchType(this.resource) };
|
|
25
38
|
|
|
26
39
|
if (hasNodes) {
|
|
27
40
|
hash.nodes = store.dispatch(`${ inStore }/findAll`, { type: NODE });
|
|
28
41
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this.rows = res.rows;
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
data() {
|
|
35
|
-
return { rows: [] };
|
|
42
|
+
await allHash(hash);
|
|
36
43
|
}
|
|
37
44
|
};
|
|
38
45
|
</script>
|
|
39
46
|
|
|
40
47
|
<template>
|
|
41
|
-
<
|
|
42
|
-
|
|
48
|
+
<ResourceTable
|
|
49
|
+
:schema="schema"
|
|
50
|
+
:rows="rows"
|
|
51
|
+
:headers="$attrs.headers"
|
|
52
|
+
:group-by="$attrs.groupBy"
|
|
53
|
+
:loading="loading"
|
|
54
|
+
/>
|
|
43
55
|
</template>
|
|
@@ -16,6 +16,11 @@ export default {
|
|
|
16
16
|
type: Array,
|
|
17
17
|
required: true,
|
|
18
18
|
},
|
|
19
|
+
|
|
20
|
+
loading: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
required: false,
|
|
23
|
+
},
|
|
19
24
|
},
|
|
20
25
|
|
|
21
26
|
computed: { ...mapGetters(['clusterId']) }
|
|
@@ -26,6 +31,7 @@ export default {
|
|
|
26
31
|
<ResourceTable
|
|
27
32
|
:schema="schema"
|
|
28
33
|
:rows="rows"
|
|
34
|
+
:loading="loading"
|
|
29
35
|
>
|
|
30
36
|
<template #cell:to="{row}">
|
|
31
37
|
<template v-if="row.spec && row.spec.toService">
|
package/list/workload.vue
CHANGED
|
@@ -76,7 +76,7 @@ export default {
|
|
|
76
76
|
return schema;
|
|
77
77
|
},
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
filteredRows() {
|
|
80
80
|
const out = [];
|
|
81
81
|
|
|
82
82
|
for ( const typeRows of this.resources ) {
|
|
@@ -151,5 +151,5 @@ export default {
|
|
|
151
151
|
</script>
|
|
152
152
|
|
|
153
153
|
<template>
|
|
154
|
-
<ResourceTable :loading="$fetchState.pending" :schema="schema" :rows="
|
|
154
|
+
<ResourceTable :loading="$fetchState.pending" :schema="schema" :rows="filteredRows" :overflow-y="true" />
|
|
155
155
|
</template>
|
|
@@ -234,6 +234,8 @@ export default async function({
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
+
|
|
238
|
+
store.dispatch('gcStartIntervals');
|
|
237
239
|
}
|
|
238
240
|
|
|
239
241
|
if (!process.server) {
|
|
@@ -245,6 +247,10 @@ export default async function({
|
|
|
245
247
|
window.location.href = backTo;
|
|
246
248
|
}
|
|
247
249
|
}
|
|
250
|
+
|
|
251
|
+
// GC should be notified of route change before any find/get request is made that might be used for that page
|
|
252
|
+
store.dispatch('gcRouteChanged', route);
|
|
253
|
+
|
|
248
254
|
// Load stuff
|
|
249
255
|
await applyProducts(store, $plugin);
|
|
250
256
|
// Setup a beforeEach hook once to keep track of the current product
|