@rancher/shell 0.1.21 → 0.2.2
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/global/_button.scss +1 -0
- package/assets/translations/en-us.yaml +56 -10
- package/assets/translations/zh-hans.yaml +346 -117
- package/components/Carousel.vue +25 -9
- package/components/HarvesterServiceAddOnConfig.vue +10 -10
- package/components/Import.vue +7 -1
- package/components/ResourceList/index.vue +34 -14
- 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 +480 -271
- package/components/form/MatchExpressions.vue +15 -3
- package/components/form/WorkloadPorts.vue +2 -2
- package/components/nav/Header.vue +14 -1
- package/config/product/settings.js +1 -0
- package/config/product/uiplugins.js +1 -0
- package/config/uiplugins.js +13 -0
- package/creators/app/init +2 -2
- package/creators/app/package.json +1 -1
- package/creators/pkg/package.json +1 -1
- package/detail/cis.cattle.io.clusterscan.vue +6 -2
- package/detail/provisioning.cattle.io.cluster.vue +3 -3
- package/edit/provisioning.cattle.io.cluster/DrainOptions.vue +0 -1
- package/edit/provisioning.cattle.io.cluster/MachinePool.vue +5 -3
- package/edit/provisioning.cattle.io.cluster/rke2.vue +25 -24
- package/edit/service.vue +1 -1
- package/list/node.vue +7 -2
- package/mixins/resource-manager.js +5 -0
- package/models/cluster.x-k8s.io.machinedeployment.js +8 -0
- package/models/management.cattle.io.cluster.js +14 -1
- package/nuxt.config.js +113 -108
- package/package.json +1 -1
- package/pages/c/_cluster/apps/charts/index.vue +1 -1
- package/pages/c/_cluster/apps/charts/install.vue +106 -32
- package/pages/c/_cluster/settings/performance.vue +11 -0
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +16 -2
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +5 -2
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +28 -6
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +1 -1
- package/pages/c/_cluster/uiplugins/index.vue +49 -12
- package/promptRemove/mixin/roleDeletionCheck.js +15 -1
- package/scripts/record-deps.js +3 -3
- package/scripts/test-plugins-build.sh +1 -0
- package/scripts/typegen.sh +2 -2
- package/store/type-map.js +13 -2
- package/types/vue-shim.d +20 -0
- package/utils/create-yaml.js +30 -6
- package/creators/update/yarn-error.log +0 -54
- package/rancher-components/BadgeState/BadgeState.spec.ts +0 -12
- package/rancher-components/BadgeState/BadgeState.vue +0 -107
- package/rancher-components/BadgeState/index.ts +0 -1
- package/rancher-components/Banner/Banner.test.ts +0 -13
- package/rancher-components/Banner/Banner.vue +0 -163
- package/rancher-components/Banner/index.ts +0 -1
- package/rancher-components/Card/Card.vue +0 -150
- package/rancher-components/Card/index.ts +0 -1
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +0 -77
- package/rancher-components/Form/Checkbox/Checkbox.vue +0 -395
- package/rancher-components/Form/Checkbox/index.ts +0 -1
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +0 -29
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +0 -343
- package/rancher-components/Form/LabeledInput/index.ts +0 -1
- package/rancher-components/Form/Radio/RadioButton.vue +0 -270
- package/rancher-components/Form/Radio/RadioGroup.vue +0 -235
- package/rancher-components/Form/Radio/index.ts +0 -2
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +0 -168
- package/rancher-components/Form/TextArea/index.ts +0 -1
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +0 -107
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +0 -137
- package/rancher-components/Form/ToggleSwitch/index.ts +0 -1
- package/rancher-components/Form/index.ts +0 -5
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +0 -137
- package/rancher-components/LabeledTooltip/index.ts +0 -1
- package/rancher-components/components/BadgeState/BadgeState.spec.ts +0 -12
- package/rancher-components/components/BadgeState/BadgeState.vue +0 -107
- package/rancher-components/components/BadgeState/index.ts +0 -1
- package/rancher-components/components/Banner/Banner.test.ts +0 -13
- package/rancher-components/components/Banner/Banner.vue +0 -163
- package/rancher-components/components/Banner/index.ts +0 -1
- package/rancher-components/components/Card/Card.vue +0 -150
- package/rancher-components/components/Card/index.ts +0 -1
- package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +0 -77
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +0 -395
- package/rancher-components/components/Form/Checkbox/index.ts +0 -1
- package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +0 -29
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +0 -343
- package/rancher-components/components/Form/LabeledInput/index.ts +0 -1
- package/rancher-components/components/Form/Radio/RadioButton.vue +0 -270
- package/rancher-components/components/Form/Radio/RadioGroup.vue +0 -235
- package/rancher-components/components/Form/Radio/index.ts +0 -2
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +0 -168
- package/rancher-components/components/Form/TextArea/index.ts +0 -1
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +0 -107
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +0 -137
- package/rancher-components/components/Form/ToggleSwitch/index.ts +0 -1
- package/rancher-components/components/Form/index.ts +0 -5
- package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +0 -137
- package/rancher-components/components/LabeledTooltip/index.ts +0 -1
package/components/Carousel.vue
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { get } from '@shell/utils/object';
|
|
3
3
|
import { BadgeState } from '@components/BadgeState';
|
|
4
|
+
import { mapGetters } from 'vuex';
|
|
5
|
+
|
|
6
|
+
const carouselSeenStorageKey = `carousel-seen`;
|
|
4
7
|
|
|
5
8
|
export default {
|
|
6
9
|
components: { BadgeState },
|
|
@@ -31,16 +34,18 @@ export default {
|
|
|
31
34
|
default: 'noopener noreferrer nofollow'
|
|
32
35
|
},
|
|
33
36
|
},
|
|
37
|
+
|
|
34
38
|
data() {
|
|
35
39
|
return {
|
|
36
|
-
slider:
|
|
37
|
-
activeItemId:
|
|
38
|
-
autoScroll:
|
|
40
|
+
slider: this.sliders,
|
|
41
|
+
activeItemId: 0,
|
|
42
|
+
autoScroll: true,
|
|
43
|
+
autoScrollSlideInterval: null,
|
|
39
44
|
};
|
|
40
45
|
},
|
|
41
46
|
|
|
42
47
|
computed: {
|
|
43
|
-
|
|
48
|
+
...mapGetters(['clusterId']),
|
|
44
49
|
trackStyle() {
|
|
45
50
|
const sliderItem = this.activeItemId * 100 / this.slider.length;
|
|
46
51
|
const width = 60 * this.slider.length;
|
|
@@ -77,9 +82,6 @@ export default {
|
|
|
77
82
|
this.slidePosition();
|
|
78
83
|
},
|
|
79
84
|
|
|
80
|
-
timer() {
|
|
81
|
-
setInterval(this.autoScrollSlide, 2000);
|
|
82
|
-
},
|
|
83
85
|
autoScrollSlide() {
|
|
84
86
|
if (this.activeItemId < this.slider.length && this.autoScroll ) {
|
|
85
87
|
this.activeItemId++;
|
|
@@ -103,9 +105,23 @@ export default {
|
|
|
103
105
|
}
|
|
104
106
|
},
|
|
105
107
|
|
|
108
|
+
beforeDestroy() {
|
|
109
|
+
if (this.autoScrollSlideInterval) {
|
|
110
|
+
clearInterval(this.autoScrollSlideInterval);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
|
|
106
114
|
mounted() {
|
|
107
|
-
|
|
108
|
-
|
|
115
|
+
const lastSeenCluster = sessionStorage.getItem(carouselSeenStorageKey);
|
|
116
|
+
|
|
117
|
+
if (lastSeenCluster !== this.clusterId) {
|
|
118
|
+
// Session storage lasts until tab/window closed (retained on refresh)
|
|
119
|
+
sessionStorage.setItem(carouselSeenStorageKey, this.clusterId);
|
|
120
|
+
|
|
121
|
+
this.autoScrollSlideInterval = setInterval(this.autoScrollSlide, 5000);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
|
|
109
125
|
};
|
|
110
126
|
|
|
111
127
|
</script>
|
|
@@ -100,7 +100,7 @@ export default {
|
|
|
100
100
|
const errors = [];
|
|
101
101
|
|
|
102
102
|
if (this.healthCheckEnabled && !this.healthcheckPort) {
|
|
103
|
-
errors.push(this.t('validation.required', { key: this.t('harvester.
|
|
103
|
+
errors.push(this.t('validation.required', { key: this.t('servicesPage.harvester.healthCheckPort.label') }, true));
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
if (errors.length > 0) {
|
|
@@ -131,7 +131,7 @@ export default {
|
|
|
131
131
|
v-model="ipam"
|
|
132
132
|
:mode="mode"
|
|
133
133
|
:options="ipamOptions"
|
|
134
|
-
:label="t('harvester.
|
|
134
|
+
:label="t('servicesPage.harvester.ipam.label')"
|
|
135
135
|
:disabled="mode === 'edit'"
|
|
136
136
|
/>
|
|
137
137
|
</div>
|
|
@@ -143,7 +143,7 @@ export default {
|
|
|
143
143
|
v-model="healthCheckEnabled"
|
|
144
144
|
:mode="mode"
|
|
145
145
|
name="healthCheckEnabled"
|
|
146
|
-
:label="t('harvester.
|
|
146
|
+
:label="t('servicesPage.harvester.healthCheckEnabled.label')"
|
|
147
147
|
:labels="[t('generic.disabled'),t('generic.enabled')]"
|
|
148
148
|
:options="[false, true]"
|
|
149
149
|
/>
|
|
@@ -157,7 +157,7 @@ export default {
|
|
|
157
157
|
:mode="mode"
|
|
158
158
|
:options="portOptions"
|
|
159
159
|
required
|
|
160
|
-
:label="t('harvester.
|
|
160
|
+
:label="t('servicesPage.harvester.healthCheckPort.label')"
|
|
161
161
|
/>
|
|
162
162
|
</div>
|
|
163
163
|
<div class="col span-6">
|
|
@@ -165,8 +165,8 @@ export default {
|
|
|
165
165
|
v-model="healthCheckSuccessThreshold"
|
|
166
166
|
:mode="mode"
|
|
167
167
|
type="number"
|
|
168
|
-
:label="t('harvester.
|
|
169
|
-
:tooltip="t('harvester.
|
|
168
|
+
:label="t('servicesPage.harvester.healthCheckSuccessThreshold.label')"
|
|
169
|
+
:tooltip="t('servicesPage.harvester.healthCheckSuccessThreshold.description')"
|
|
170
170
|
/>
|
|
171
171
|
</div>
|
|
172
172
|
</div>
|
|
@@ -176,8 +176,8 @@ export default {
|
|
|
176
176
|
v-model="healthCheckFailureThreshold"
|
|
177
177
|
:mode="mode"
|
|
178
178
|
type="number"
|
|
179
|
-
:label="t('harvester.
|
|
180
|
-
:tooltip="t('harvester.
|
|
179
|
+
:label="t('servicesPage.harvester.healthCheckFailureThreshold.label')"
|
|
180
|
+
:tooltip="t('servicesPage.harvester.healthCheckFailureThreshold.description')"
|
|
181
181
|
/>
|
|
182
182
|
</div>
|
|
183
183
|
<div class="col span-6">
|
|
@@ -185,7 +185,7 @@ export default {
|
|
|
185
185
|
v-model="healthCheckPeriod"
|
|
186
186
|
:mode="mode"
|
|
187
187
|
type="number"
|
|
188
|
-
:label="t('harvester.
|
|
188
|
+
:label="t('servicesPage.harvester.healthCheckPeriod.label')"
|
|
189
189
|
/>
|
|
190
190
|
</div>
|
|
191
191
|
</div>
|
|
@@ -195,7 +195,7 @@ export default {
|
|
|
195
195
|
v-model="healthCheckTimeout"
|
|
196
196
|
:mode="mode"
|
|
197
197
|
type="number"
|
|
198
|
-
:label="t('harvester.
|
|
198
|
+
:label="t('servicesPage.harvester.healthCheckTimeout.label')"
|
|
199
199
|
/>
|
|
200
200
|
</div>
|
|
201
201
|
</div>
|
package/components/Import.vue
CHANGED
|
@@ -27,6 +27,13 @@ export default {
|
|
|
27
27
|
SortableTable
|
|
28
28
|
},
|
|
29
29
|
|
|
30
|
+
props: {
|
|
31
|
+
defaultNamespace: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: 'default'
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
|
|
30
37
|
async fetch() {
|
|
31
38
|
this.allNamespaces = await this.$store.dispatch('cluster/findAll', { type: NAMESPACE, opt: { url: 'namespaces' } });
|
|
32
39
|
},
|
|
@@ -34,7 +41,6 @@ export default {
|
|
|
34
41
|
data() {
|
|
35
42
|
return {
|
|
36
43
|
currentYaml: '',
|
|
37
|
-
defaultNamespace: 'default',
|
|
38
44
|
allNamespaces: null,
|
|
39
45
|
errors: null,
|
|
40
46
|
rows: null,
|
|
@@ -14,6 +14,20 @@ export default {
|
|
|
14
14
|
},
|
|
15
15
|
mixins: [ResourceFetch],
|
|
16
16
|
|
|
17
|
+
props: {
|
|
18
|
+
hasAdvancedFiltering: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
advFilterHideLabelsAsCols: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
advFilterPreventFilteringLabels: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
},
|
|
17
31
|
async fetch() {
|
|
18
32
|
const store = this.$store;
|
|
19
33
|
const resource = this.resource;
|
|
@@ -134,6 +148,9 @@ export default {
|
|
|
134
148
|
:load-resources="loadResources"
|
|
135
149
|
:load-indeterminate="loadIndeterminate"
|
|
136
150
|
>
|
|
151
|
+
<template slot="extraActions">
|
|
152
|
+
<slot name="extraActions"></slot>
|
|
153
|
+
</template>
|
|
137
154
|
</Masthead>
|
|
138
155
|
<div v-if="hasListComponent">
|
|
139
156
|
<component
|
|
@@ -150,21 +167,24 @@ export default {
|
|
|
150
167
|
:loading="loading"
|
|
151
168
|
:headers="headers"
|
|
152
169
|
:group-by="groupBy"
|
|
170
|
+
:has-advanced-filtering="hasAdvancedFiltering"
|
|
171
|
+
:adv-filter-hide-labels-as-cols="advFilterHideLabelsAsCols"
|
|
172
|
+
:adv-filter-prevent-filtering-labels="advFilterPreventFilteringLabels"
|
|
153
173
|
/>
|
|
154
174
|
</div>
|
|
155
175
|
</template>
|
|
156
176
|
|
|
157
|
-
<style lang="scss" scoped>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
</style>
|
|
177
|
+
<style lang="scss" scoped>
|
|
178
|
+
.header {
|
|
179
|
+
position: relative;
|
|
180
|
+
}
|
|
181
|
+
H2 {
|
|
182
|
+
position: relative;
|
|
183
|
+
margin: 0 0 20px 0;
|
|
184
|
+
}
|
|
185
|
+
.right-action {
|
|
186
|
+
position: absolute;
|
|
187
|
+
top: 10px;
|
|
188
|
+
right: 10px;
|
|
189
|
+
}
|
|
190
|
+
</style>
|
|
@@ -122,6 +122,18 @@ export default {
|
|
|
122
122
|
type: Boolean,
|
|
123
123
|
default: false
|
|
124
124
|
},
|
|
125
|
+
hasAdvancedFiltering: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
default: false
|
|
128
|
+
},
|
|
129
|
+
advFilterHideLabelsAsCols: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: false
|
|
132
|
+
},
|
|
133
|
+
advFilterPreventFilteringLabels: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: false
|
|
136
|
+
},
|
|
125
137
|
},
|
|
126
138
|
|
|
127
139
|
data() {
|
|
@@ -357,6 +369,7 @@ export default {
|
|
|
357
369
|
handleActionButtonClick(event) {
|
|
358
370
|
this.$emit('clickedActionButton', event);
|
|
359
371
|
}
|
|
372
|
+
|
|
360
373
|
}
|
|
361
374
|
};
|
|
362
375
|
</script>
|
|
@@ -369,6 +382,8 @@ export default {
|
|
|
369
382
|
:rows="filteredRows"
|
|
370
383
|
:loading="loading"
|
|
371
384
|
:group-by="computedGroupBy"
|
|
385
|
+
:group="group"
|
|
386
|
+
:group-options="groupOptions"
|
|
372
387
|
:search="search"
|
|
373
388
|
:paging="true"
|
|
374
389
|
:paging-params="pagingParams"
|
|
@@ -378,9 +393,13 @@ export default {
|
|
|
378
393
|
:overflow-x="overflowX"
|
|
379
394
|
:overflow-y="overflowY"
|
|
380
395
|
:get-custom-detail-link="getCustomDetailLink"
|
|
396
|
+
:has-advanced-filtering="hasAdvancedFiltering"
|
|
397
|
+
:adv-filter-hide-labels-as-cols="advFilterHideLabelsAsCols"
|
|
398
|
+
:adv-filter-prevent-filtering-labels="advFilterPreventFilteringLabels"
|
|
381
399
|
key-field="_key"
|
|
382
400
|
:sort-generation-fn="safeSortGenerationFn"
|
|
383
401
|
@clickedActionButton="handleActionButtonClick"
|
|
402
|
+
@group-value-change="group = $event"
|
|
384
403
|
v-on="$listeners"
|
|
385
404
|
>
|
|
386
405
|
<template v-if="showGrouping" #header-middle>
|