@rancher/shell 3.0.10 → 3.0.12-rc.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/styles/base/_mixins.scss +31 -0
- package/assets/styles/base/_variables.scss +2 -0
- package/assets/styles/themes/_modern.scss +6 -5
- package/assets/translations/en-us.yaml +12 -9
- package/assets/translations/zh-hans.yaml +0 -3
- package/chart/__tests__/rancher-backup-index.test.ts +248 -0
- package/chart/rancher-backup/index.vue +41 -2
- package/components/BrandImage.vue +6 -5
- package/components/ConsumptionGauge.vue +12 -4
- package/components/DynamicContent/DynamicContentIcon.vue +3 -2
- package/components/EmptyProductPage.vue +76 -0
- package/components/ExplorerProjectsNamespaces.vue +1 -4
- package/components/LazyImage.vue +2 -1
- package/components/Resource/Detail/Card/Scaler.vue +4 -4
- package/components/Resource/Detail/CopyToClipboard.vue +1 -2
- package/components/Resource/Detail/Metadata/KeyValueRow.vue +9 -3
- package/components/Resource/Detail/TitleBar/__tests__/__snapshots__/index.test.ts.snap +31 -0
- package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +45 -1
- package/components/Resource/Detail/TitleBar/index.vue +1 -1
- package/components/Resource/Detail/ViewOptions/__tests__/__snapshots__/index.test.ts.snap +9 -0
- package/components/Resource/Detail/ViewOptions/__tests__/index.test.ts +62 -0
- package/components/Resource/Detail/ViewOptions/index.vue +2 -1
- package/components/ResourceList/Masthead.vue +25 -2
- package/components/SideNav.vue +13 -0
- package/components/Tabbed/index.vue +6 -0
- package/components/__tests__/ConsumptionGauge.test.ts +31 -0
- package/components/__tests__/PromptModal.test.ts +2 -0
- package/components/fleet/FleetClusters.vue +1 -0
- package/components/fleet/__tests__/FleetClusters.test.ts +71 -0
- package/components/form/NodeScheduling.vue +17 -3
- package/components/form/PrivateRegistry.vue +69 -0
- package/components/form/ProjectMemberEditor.vue +0 -10
- package/components/form/__tests__/PrivateRegistry.test.ts +133 -0
- package/components/formatter/WorkloadHealthScale.vue +3 -1
- package/components/nav/Group.vue +26 -3
- package/components/nav/Header.vue +32 -7
- package/components/nav/TopLevelMenu.helper.ts +7 -79
- package/components/nav/TopLevelMenu.vue +15 -1
- package/components/nav/__tests__/TopLevelMenu.helper.test.ts +2 -53
- package/config/pagination-table-headers.js +8 -1
- package/config/private-label.js +2 -1
- package/config/product/apps.js +3 -1
- package/config/product/auth.js +1 -0
- package/config/product/backup.js +1 -0
- package/config/product/compliance.js +1 -1
- package/config/product/explorer.js +25 -6
- package/config/product/fleet.js +1 -0
- package/config/product/gatekeeper.js +1 -0
- package/config/product/istio.js +1 -0
- package/config/product/logging.js +1 -0
- package/config/product/longhorn.js +2 -1
- package/config/product/manager.js +1 -0
- package/config/product/monitoring.js +1 -0
- package/config/product/navlinks.js +1 -0
- package/config/product/neuvector.js +2 -1
- package/config/product/settings.js +1 -0
- package/config/product/uiplugins.js +1 -0
- package/core/__tests__/extension-manager-impl.test.js +187 -2
- package/core/__tests__/plugin-products-helpers.test.ts +454 -0
- package/core/__tests__/plugin-products.test.ts +3219 -0
- package/core/extension-manager-impl.js +34 -3
- package/core/plugin-helpers.ts +31 -0
- package/core/plugin-products-base.ts +375 -0
- package/core/plugin-products-extending.ts +44 -0
- package/core/plugin-products-helpers.ts +262 -0
- package/core/plugin-products-top-level.ts +66 -0
- package/core/plugin-products-type-guards.ts +33 -0
- package/core/plugin-products.ts +50 -0
- package/core/plugin-types.ts +222 -0
- package/core/plugin.ts +45 -10
- package/core/productDebugger.js +48 -0
- package/core/types.ts +95 -11
- package/detail/__tests__/__snapshots__/fleet.cattle.io.bundle.test.ts.snap +52 -0
- package/detail/__tests__/fleet.cattle.io.bundle.test.ts +171 -0
- package/detail/__tests__/node.test.ts +83 -0
- package/detail/fleet.cattle.io.bundle.vue +21 -34
- package/detail/management.cattle.io.oidcclient.vue +2 -1
- package/detail/node.vue +1 -0
- package/dialog/ExtensionCatalogInstallDialog.vue +1 -1
- package/dialog/InstallExtensionDialog.vue +6 -27
- package/dialog/UninstallExistingExtensionDialog.vue +141 -0
- package/dialog/UninstallExtensionDialog.vue +4 -26
- package/dialog/__tests__/UninstallExistingExtensionDialog.test.ts +114 -0
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +1 -0
- package/edit/catalog.cattle.io.clusterrepo.vue +17 -3
- package/edit/cloudcredential.vue +2 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +11 -6
- package/edit/provisioning.cattle.io.cluster/__tests__/Ingress.test.ts +176 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +5 -4
- package/edit/provisioning.cattle.io.cluster/rke2.vue +4 -1
- package/edit/provisioning.cattle.io.cluster/shared.ts +4 -2
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +6 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Ingress.vue +7 -2
- package/edit/secret/generic.vue +1 -0
- package/edit/secret/index.vue +2 -1
- package/edit/service.vue +2 -14
- package/list/management.cattle.io.feature.vue +7 -1
- package/list/provisioning.cattle.io.cluster.vue +0 -50
- package/list/workload.vue +11 -4
- package/mixins/brand.js +2 -1
- package/mixins/resource-fetch.js +12 -3
- package/models/catalog.cattle.io.clusterrepo.js +9 -0
- package/models/cluster.x-k8s.io.machinedeployment.js +8 -3
- package/models/management.cattle.io.authconfig.js +2 -1
- package/models/management.cattle.io.cluster.js +4 -3
- package/models/monitoring.coreos.com.receiver.js +11 -6
- package/models/pod.js +18 -0
- package/models/provisioning.cattle.io.cluster.js +2 -2
- package/models/workload.js +20 -2
- package/package.json +5 -6
- package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +0 -1
- package/pages/c/_cluster/apps/charts/index.vue +3 -8
- package/pages/c/_cluster/apps/charts/install.vue +8 -9
- package/pages/c/_cluster/istio/index.vue +4 -2
- package/pages/c/_cluster/longhorn/index.vue +2 -1
- package/pages/c/_cluster/monitoring/index.vue +2 -2
- package/pages/c/_cluster/neuvector/index.vue +2 -1
- package/pages/c/_cluster/settings/brand.vue +4 -4
- package/pages/c/_cluster/settings/performance.vue +0 -5
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +2 -1
- package/pages/c/_cluster/uiplugins/__tests__/index.test.ts +231 -13
- package/pages/c/_cluster/uiplugins/index.vue +145 -38
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +1 -0
- package/plugins/dashboard-store/actions.js +3 -2
- package/plugins/dashboard-store/resource-class.js +62 -6
- package/plugins/plugin.js +16 -0
- package/plugins/steve/steve-pagination-utils.ts +8 -2
- package/plugins/steve/subscribe.js +29 -4
- package/rancher-components/RcButton/RcButton.vue +3 -3
- package/rancher-components/RcButtonSplit/RcButtonSplit.test.ts +253 -0
- package/rancher-components/RcButtonSplit/RcButtonSplit.vue +158 -0
- package/rancher-components/RcButtonSplit/index.ts +1 -0
- package/scripts/test-plugins-build.sh +4 -4
- package/scripts/typegen.sh +13 -1
- package/store/__tests__/type-map.test.ts +84 -24
- package/store/type-map.js +42 -3
- package/tsconfig.paths.json +1 -0
- package/types/resources/pod.ts +18 -0
- package/types/shell/index.d.ts +8506 -2908
- package/types/store/dashboard-store.types.ts +5 -0
- package/types/store/pagination.types.ts +6 -0
- package/utils/__tests__/require-asset.test.ts +98 -0
- package/utils/async.ts +1 -5
- package/utils/axios.js +1 -4
- package/utils/brand.ts +3 -1
- package/utils/dynamic-importer.js +3 -2
- package/utils/favicon.js +4 -3
- package/utils/pagination-utils.ts +1 -1
- package/utils/require-asset.ts +95 -0
- package/utils/uiplugins.ts +12 -16
- package/utils/validators/__tests__/private-registry.test.ts +76 -0
- package/utils/validators/private-registry.ts +28 -0
- package/vue.config.js +4 -3
- package/components/HarvesterServiceAddOnConfig.vue +0 -207
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { mapGetters } from 'vuex';
|
|
3
|
-
import semver from 'semver';
|
|
4
|
-
|
|
5
|
-
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
6
|
-
import { _CREATE } from '@shell/config/query-params';
|
|
7
|
-
import { get } from '@shell/utils/object';
|
|
8
|
-
import { HCI as HCI_LABELS_ANNOTATIONS } from '@shell/config/labels-annotations';
|
|
9
|
-
import { SERVICE } from '@shell/config/types';
|
|
10
|
-
import { allHash } from '@shell/utils/promise';
|
|
11
|
-
|
|
12
|
-
const HARVESTER_ADD_ON_CONFIG = [{
|
|
13
|
-
variableName: 'ipam',
|
|
14
|
-
key: HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_IPAM,
|
|
15
|
-
default: 'dhcp'
|
|
16
|
-
}, {
|
|
17
|
-
variableName: 'sharedService',
|
|
18
|
-
key: HCI_LABELS_ANNOTATIONS.PRIMARY_SERVICE,
|
|
19
|
-
default: ''
|
|
20
|
-
}];
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
components: { LabeledSelect },
|
|
24
|
-
|
|
25
|
-
props: {
|
|
26
|
-
mode: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: _CREATE,
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
value: {
|
|
32
|
-
type: Object,
|
|
33
|
-
default: () => {
|
|
34
|
-
return {};
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
registerBeforeHook: {
|
|
39
|
-
type: Function,
|
|
40
|
-
default: null
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
created() {
|
|
45
|
-
if (this.registerBeforeHook) {
|
|
46
|
-
this.registerBeforeHook(this.willSave, 'harvesterWillSave');
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
async fetch() {
|
|
51
|
-
const inStore = this.$store.getters['currentProduct'].inStore;
|
|
52
|
-
|
|
53
|
-
const hash = {
|
|
54
|
-
rke2Versions: this.$store.dispatch('management/request', { url: '/v1-rke2-release/releases' }),
|
|
55
|
-
services: this.$store.dispatch(`${ inStore }/findAll`, { type: SERVICE }),
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const res = await allHash(hash);
|
|
59
|
-
|
|
60
|
-
this.rke2Versions = res.rke2Versions;
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
data() {
|
|
64
|
-
const harvesterAddOnConfig = {};
|
|
65
|
-
|
|
66
|
-
HARVESTER_ADD_ON_CONFIG.forEach((c) => {
|
|
67
|
-
harvesterAddOnConfig[c.variableName] = this.value.metadata.annotations[c.key] || c.default;
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
let showShareIP;
|
|
71
|
-
|
|
72
|
-
if (this.value.metadata.annotations[HCI_LABELS_ANNOTATIONS.PRIMARY_SERVICE]) {
|
|
73
|
-
showShareIP = true;
|
|
74
|
-
} else {
|
|
75
|
-
showShareIP = false;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return {
|
|
79
|
-
...harvesterAddOnConfig,
|
|
80
|
-
showShareIP,
|
|
81
|
-
rke2Versions: {},
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
computed: {
|
|
86
|
-
...mapGetters(['allowedNamespaces', 'namespaces', 'currentCluster']),
|
|
87
|
-
|
|
88
|
-
ipamOptions() {
|
|
89
|
-
return [{
|
|
90
|
-
label: 'DHCP',
|
|
91
|
-
value: 'dhcp',
|
|
92
|
-
}, {
|
|
93
|
-
label: 'Pool',
|
|
94
|
-
value: 'pool',
|
|
95
|
-
}];
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
portOptions() {
|
|
99
|
-
const ports = this.value?.spec?.ports || [];
|
|
100
|
-
|
|
101
|
-
return ports.filter((p) => p.port && p.protocol === 'TCP').map((p) => p.port) || [];
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
serviceOptions() {
|
|
105
|
-
const inStore = this.$store.getters['currentProduct'].inStore;
|
|
106
|
-
const services = this.$store.getters[`${ inStore }/all`](SERVICE);
|
|
107
|
-
|
|
108
|
-
const namespaces = this.namespaces();
|
|
109
|
-
|
|
110
|
-
const out = services.filter((s) => {
|
|
111
|
-
const ingress = s?.status?.loadBalancer?.ingress || [];
|
|
112
|
-
|
|
113
|
-
return ingress.length > 0 &&
|
|
114
|
-
!s?.metadata?.annotations?.['cloudprovider.harvesterhci.io/primary-service'] &&
|
|
115
|
-
s.spec?.type === 'LoadBalancer' &&
|
|
116
|
-
namespaces[s.metadata.namespace];
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
return out.map((s) => s.id);
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
shareIPEnabled() {
|
|
123
|
-
const kubernetesVersion = this.currentCluster.kubernetesVersion || '';
|
|
124
|
-
const kubernetesVersionExtension = this.currentCluster.kubernetesVersionExtension;
|
|
125
|
-
|
|
126
|
-
if (kubernetesVersionExtension.startsWith('+rke2')) {
|
|
127
|
-
const charts = ((this.rke2Versions?.data || []).find((v) => v.id === kubernetesVersion) || {}).charts;
|
|
128
|
-
let ccmVersion = charts?.['harvester-cloud-provider']?.version || '';
|
|
129
|
-
|
|
130
|
-
if (ccmVersion.endsWith('00')) {
|
|
131
|
-
ccmVersion = ccmVersion.slice(0, -2);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return semver.satisfies(ccmVersion, '>=0.2.0');
|
|
135
|
-
} else {
|
|
136
|
-
return true;
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
methods: {
|
|
142
|
-
willSave() {
|
|
143
|
-
const errors = [];
|
|
144
|
-
|
|
145
|
-
if (this.showShareIP) {
|
|
146
|
-
if (!this.sharedService) {
|
|
147
|
-
errors.push(this.t('validation.required', { key: this.t('servicesPage.harvester.shareIP.label') }, true));
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if (errors.length > 0) {
|
|
152
|
-
return Promise.reject(errors);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
HARVESTER_ADD_ON_CONFIG.forEach((c) => {
|
|
156
|
-
this.value.metadata.annotations[c.key] = String(get(this, c.variableName));
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
if (this.showShareIP) {
|
|
160
|
-
delete this.value.metadata.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_IPAM];
|
|
161
|
-
} else {
|
|
162
|
-
delete this.value.metadata.annotations[HCI_LABELS_ANNOTATIONS.PRIMARY_SERVICE];
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
toggleShareIP() {
|
|
167
|
-
this.showShareIP = !this.showShareIP;
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
};
|
|
171
|
-
</script>
|
|
172
|
-
|
|
173
|
-
<template>
|
|
174
|
-
<div>
|
|
175
|
-
<div class="row mt-30">
|
|
176
|
-
<div class="col span-6">
|
|
177
|
-
<LabeledSelect
|
|
178
|
-
v-if="showShareIP"
|
|
179
|
-
v-model:value="sharedService"
|
|
180
|
-
:mode="mode"
|
|
181
|
-
:options="serviceOptions"
|
|
182
|
-
:label="t('servicesPage.harvester.shareIP.label')"
|
|
183
|
-
:disabled="mode === 'edit'"
|
|
184
|
-
/>
|
|
185
|
-
<LabeledSelect
|
|
186
|
-
v-else
|
|
187
|
-
v-model:value="ipam"
|
|
188
|
-
:mode="mode"
|
|
189
|
-
:options="ipamOptions"
|
|
190
|
-
:label="t('servicesPage.harvester.ipam.label')"
|
|
191
|
-
:disabled="mode === 'edit'"
|
|
192
|
-
/>
|
|
193
|
-
<div
|
|
194
|
-
v-if="mode === 'create'"
|
|
195
|
-
class="mt-10"
|
|
196
|
-
>
|
|
197
|
-
<a
|
|
198
|
-
role="button"
|
|
199
|
-
@click="toggleShareIP"
|
|
200
|
-
>
|
|
201
|
-
{{ showShareIP ? t('servicesPage.harvester.useIpam.label') : t('servicesPage.harvester.useShareIP.label') }}
|
|
202
|
-
</a>
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
205
|
-
</div>
|
|
206
|
-
</div>
|
|
207
|
-
</template>
|