@rancher/shell 3.0.2-rc.6 → 3.0.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/_layout.scss +3 -1
- package/components/FixedBanner.vue +19 -12
- package/components/StatusBadge.vue +71 -0
- package/components/__tests__/FixedBanner.test.ts +3 -3
- package/components/form/UnitInput.vue +2 -2
- package/components/form/__tests__/UnitInput.test.ts +4 -5
- package/components/nav/TopLevelMenu.vue +1 -12
- package/components/nav/__tests__/TopLevelMenu.test.ts +0 -40
- package/edit/auth/__tests__/oidc.test.ts +34 -3
- package/edit/auth/oidc.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +0 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +1 -1
- package/edit/service.vue +0 -3
- package/edit/workload/Job.vue +6 -6
- package/edit/workload/__tests__/Job.test.ts +0 -1
- package/package.json +2 -2
- package/pages/auth/login.vue +1 -9
- package/scripts/extension/helm/charts/ui-plugin-server/templates/_helpers.tpl +2 -2
- package/store/aws.js +9 -2
- package/types/shell/index.d.ts +0 -10
- package/utils/banners.js +0 -45
- package/utils/object.js +0 -3
|
@@ -37,7 +37,7 @@ export default {
|
|
|
37
37
|
handleLineBreaksConsentText(banner) {
|
|
38
38
|
if (banner.text?.length) {
|
|
39
39
|
// split text by newline char
|
|
40
|
-
const textArray = banner.text.split(
|
|
40
|
+
const textArray = banner.text.split('\n').filter((element) => element);
|
|
41
41
|
|
|
42
42
|
if (textArray.length > 1) {
|
|
43
43
|
textArray.forEach((str, i) => {
|
|
@@ -130,11 +130,11 @@ export default {
|
|
|
130
130
|
|
|
131
131
|
if (isEmpty(banner)) {
|
|
132
132
|
if (showHeader && this.header) {
|
|
133
|
-
bannerContent = bannerHeader || {};
|
|
133
|
+
bannerContent = this.handleLineBreaksConsentText(bannerHeader) || {};
|
|
134
134
|
} else if (showConsent && this.consent) {
|
|
135
135
|
bannerContent = this.handleLineBreaksConsentText(bannerConsent) || {};
|
|
136
136
|
} else if (showFooter && this.footer) {
|
|
137
|
-
bannerContent = bannerFooter || {};
|
|
137
|
+
bannerContent = this.handleLineBreaksConsentText(bannerFooter) || {};
|
|
138
138
|
} else {
|
|
139
139
|
bannerContent = {};
|
|
140
140
|
}
|
|
@@ -168,16 +168,20 @@ export default {
|
|
|
168
168
|
>
|
|
169
169
|
<!-- text as array to support line breaks programmatically rather than just exposing HTML -->
|
|
170
170
|
<div v-if="isTextAnArray">
|
|
171
|
-
<
|
|
171
|
+
<div
|
|
172
172
|
v-for="(text, index) in banner.text"
|
|
173
173
|
:key="index"
|
|
174
|
+
class="array-row"
|
|
174
175
|
>
|
|
175
176
|
{{ text }}
|
|
176
|
-
</
|
|
177
|
+
</div>
|
|
177
178
|
</div>
|
|
178
|
-
<
|
|
179
|
+
<div
|
|
180
|
+
v-else
|
|
181
|
+
class="single-row"
|
|
182
|
+
>
|
|
179
183
|
{{ banner.text }}
|
|
180
|
-
</
|
|
184
|
+
</div>
|
|
181
185
|
</div>
|
|
182
186
|
<div v-else-if="showDialog">
|
|
183
187
|
<div class="banner-dialog-glass" />
|
|
@@ -192,16 +196,20 @@ export default {
|
|
|
192
196
|
>
|
|
193
197
|
<!-- text as array to support line breaks programmatically rather than just exposing HTML -->
|
|
194
198
|
<div v-if="isTextAnArray">
|
|
195
|
-
<
|
|
199
|
+
<div
|
|
196
200
|
v-for="(text, index) in banner.text"
|
|
197
201
|
:key="index"
|
|
202
|
+
class="array-row"
|
|
198
203
|
>
|
|
199
204
|
{{ text }}
|
|
200
|
-
</
|
|
205
|
+
</div>
|
|
201
206
|
</div>
|
|
202
|
-
<
|
|
207
|
+
<div
|
|
208
|
+
v-else
|
|
209
|
+
class="single-row"
|
|
210
|
+
>
|
|
203
211
|
{{ banner.text }}
|
|
204
|
-
</
|
|
212
|
+
</div>
|
|
205
213
|
</div>
|
|
206
214
|
<button
|
|
207
215
|
class="btn role-primary"
|
|
@@ -223,7 +231,6 @@ export default {
|
|
|
223
231
|
padding: 0 20px;
|
|
224
232
|
|
|
225
233
|
&.banner-consent {
|
|
226
|
-
position: absolute;
|
|
227
234
|
height: unset;
|
|
228
235
|
min-height: 2em;
|
|
229
236
|
overflow: hidden;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
const STATUS = {
|
|
4
|
+
success: {
|
|
5
|
+
color: 'text-success',
|
|
6
|
+
icon: 'icon-checkmark'
|
|
7
|
+
},
|
|
8
|
+
warning: {
|
|
9
|
+
color: 'text-warning',
|
|
10
|
+
icon: 'icon-warning'
|
|
11
|
+
},
|
|
12
|
+
info: {
|
|
13
|
+
color: 'text-info',
|
|
14
|
+
icon: 'icon-info'
|
|
15
|
+
},
|
|
16
|
+
error: {
|
|
17
|
+
color: 'text-error',
|
|
18
|
+
icon: 'icon-error'
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const { status = 'success', label } = defineProps<{
|
|
23
|
+
status?: 'success' | 'warning' | 'info' | 'error',
|
|
24
|
+
label?: string
|
|
25
|
+
}>();
|
|
26
|
+
|
|
27
|
+
</script>
|
|
28
|
+
<template>
|
|
29
|
+
<div
|
|
30
|
+
class="status-badge"
|
|
31
|
+
>
|
|
32
|
+
<i
|
|
33
|
+
class="status-badge__icon icon"
|
|
34
|
+
:class="{
|
|
35
|
+
[STATUS[status].icon]: true,
|
|
36
|
+
[STATUS[status].color]: true
|
|
37
|
+
}"
|
|
38
|
+
/>
|
|
39
|
+
<div
|
|
40
|
+
v-if="label"
|
|
41
|
+
class="status-badge__label"
|
|
42
|
+
>
|
|
43
|
+
{{ label }}
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<style lang="scss" scoped>
|
|
49
|
+
.status-badge {
|
|
50
|
+
align-items: center;
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
border: 1px solid;
|
|
53
|
+
border-color: var(--border);
|
|
54
|
+
margin-top: 20px;
|
|
55
|
+
|
|
56
|
+
& + & {
|
|
57
|
+
margin-left: 20px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__label {
|
|
61
|
+
border-left: 1px solid var(--border);
|
|
62
|
+
padding: 5px 20px;
|
|
63
|
+
color: var(--body-text);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__icon {
|
|
67
|
+
text-align: center;
|
|
68
|
+
padding: 5px 10px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -40,7 +40,7 @@ describe('component: FixedBanner', () => {
|
|
|
40
40
|
expect(wrapper.vm.showHeader).toStrictEqual(true);
|
|
41
41
|
|
|
42
42
|
const bannerElem = wrapper.find('.banner');
|
|
43
|
-
const noArrayTextElem = wrapper.find('.banner
|
|
43
|
+
const noArrayTextElem = wrapper.find('.banner .single-row');
|
|
44
44
|
|
|
45
45
|
expect(bannerElem.exists()).toBe(true);
|
|
46
46
|
expect(bannerElem.classes()).not.toContain('banner-consent');
|
|
@@ -60,7 +60,7 @@ describe('component: FixedBanner', () => {
|
|
|
60
60
|
expect(wrapper.vm.showFooter).toStrictEqual(true);
|
|
61
61
|
|
|
62
62
|
const bannerElem = wrapper.find('.banner');
|
|
63
|
-
const noArrayTextElem = wrapper.find('.banner
|
|
63
|
+
const noArrayTextElem = wrapper.find('.banner .single-row');
|
|
64
64
|
|
|
65
65
|
expect(bannerElem.exists()).toBe(true);
|
|
66
66
|
expect(bannerElem.classes()).not.toContain('banner-consent');
|
|
@@ -84,7 +84,7 @@ describe('component: FixedBanner', () => {
|
|
|
84
84
|
const bannerDialogElem = wrapper.find('.banner-dialog');
|
|
85
85
|
const bannerDialogFrameElem = wrapper.find('.banner-dialog-frame');
|
|
86
86
|
const buttonDialog = wrapper.find('.banner-dialog button');
|
|
87
|
-
const noArrayTextElem = wrapper.find('.banner
|
|
87
|
+
const noArrayTextElem = wrapper.find('.banner .single-row');
|
|
88
88
|
|
|
89
89
|
expect(bannerElem.exists()).toBe(true);
|
|
90
90
|
expect(bannerDialogGlassElem.exists()).toBe(true);
|
|
@@ -206,7 +206,7 @@ export default {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
if (this.outputModifier) {
|
|
209
|
-
out = out === null ? null : `${ inputValue }${ this.unit }`;
|
|
209
|
+
out = out === null ? null : `${ parseInt(inputValue) }${ this.unit }`;
|
|
210
210
|
} else if ( this.outputAs === 'string' ) {
|
|
211
211
|
out = out === null ? '' : `${ inputValue }`;
|
|
212
212
|
} else if (out) {
|
|
@@ -235,7 +235,7 @@ export default {
|
|
|
235
235
|
:required="required"
|
|
236
236
|
:placeholder="placeholder"
|
|
237
237
|
:hide-arrows="hideArrows"
|
|
238
|
-
@
|
|
238
|
+
@update:value="update"
|
|
239
239
|
@blur="update($event.target.value)"
|
|
240
240
|
>
|
|
241
241
|
<template #suffix>
|
|
@@ -11,7 +11,7 @@ describe('component: UnitInput', () => {
|
|
|
11
11
|
expect(wrapper.isVisible()).toBe(true);
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
it.each(['blur', '
|
|
14
|
+
it.each(['blur', 'update:value'])('should emit input event when "%p" is fired', async(event) => {
|
|
15
15
|
const wrapper = mount(UnitInput, { props: { value: 1, delay: 0 } });
|
|
16
16
|
const input = wrapper.find('input');
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ describe('component: UnitInput', () => {
|
|
|
20
20
|
input.trigger(event);
|
|
21
21
|
|
|
22
22
|
expect(wrapper.emitted('update:value')).toBeTruthy();
|
|
23
|
-
expect(wrapper.emitted('update:value')[
|
|
23
|
+
expect(wrapper.emitted('update:value')[1]).toStrictEqual([4]);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
it.each([
|
|
@@ -184,7 +184,7 @@ describe('component: UnitInput', () => {
|
|
|
184
184
|
input.trigger('blur');
|
|
185
185
|
|
|
186
186
|
expect(wrapper.emitted('update:value')).toBeTruthy();
|
|
187
|
-
expect(wrapper.emitted('update:value')[
|
|
187
|
+
expect(wrapper.emitted('update:value')[0][0]).toBe(value);
|
|
188
188
|
});
|
|
189
189
|
|
|
190
190
|
describe.each([
|
|
@@ -207,7 +207,7 @@ describe('component: UnitInput', () => {
|
|
|
207
207
|
expect(inputElement.value).toBe('123');
|
|
208
208
|
});
|
|
209
209
|
|
|
210
|
-
it.each(['
|
|
210
|
+
it.each(['update:value', 'blur'])('on %p 123 should display input value 123', async(trigger) => {
|
|
211
211
|
const wrapper = mount(UnitInput, {
|
|
212
212
|
props: {
|
|
213
213
|
value: '0',
|
|
@@ -248,7 +248,6 @@ describe('component: UnitInput', () => {
|
|
|
248
248
|
const input = wrapper.find('input');
|
|
249
249
|
|
|
250
250
|
await input.trigger('update:value');
|
|
251
|
-
await input.trigger('input');
|
|
252
251
|
|
|
253
252
|
expect(input.element.value).toBe('123');
|
|
254
253
|
});
|
|
@@ -14,7 +14,6 @@ import { SETTING } from '@shell/config/settings';
|
|
|
14
14
|
import { getProductFromRoute } from '@shell/utils/router';
|
|
15
15
|
import { isRancherPrime } from '@shell/config/version';
|
|
16
16
|
import Pinned from '@shell/components/nav/Pinned';
|
|
17
|
-
import { getGlobalBannerFontSizes } from '@shell/utils/banners';
|
|
18
17
|
import { TopLevelMenuHelperPagination, TopLevelMenuHelperLegacy } from '@shell/components/nav/TopLevelMenu.helper';
|
|
19
18
|
import { debounce } from 'lodash';
|
|
20
19
|
import { sameContents } from '@shell/utils/array';
|
|
@@ -82,15 +81,6 @@ export default {
|
|
|
82
81
|
return this.$store.getters['prefs/get'](PINNED_CLUSTERS);
|
|
83
82
|
},
|
|
84
83
|
|
|
85
|
-
sideMenuStyle() {
|
|
86
|
-
const globalBannerSettings = getGlobalBannerFontSizes(this.$store);
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
marginBottom: globalBannerSettings?.footerFont,
|
|
90
|
-
marginTop: globalBannerSettings?.headerFont
|
|
91
|
-
};
|
|
92
|
-
},
|
|
93
|
-
|
|
94
84
|
showClusterSearch() {
|
|
95
85
|
return this.allClustersCount > this.maxClustersToShow;
|
|
96
86
|
},
|
|
@@ -483,7 +473,6 @@ export default {
|
|
|
483
473
|
data-testid="side-menu"
|
|
484
474
|
class="side-menu"
|
|
485
475
|
:class="{'menu-open': shown, 'menu-close':!shown}"
|
|
486
|
-
:style="sideMenuStyle"
|
|
487
476
|
tabindex="-1"
|
|
488
477
|
role="navigation"
|
|
489
478
|
:aria-label="t('nav.ariaLabel.topLevelMenu')"
|
|
@@ -1002,7 +991,7 @@ export default {
|
|
|
1002
991
|
}
|
|
1003
992
|
}
|
|
1004
993
|
|
|
1005
|
-
position:
|
|
994
|
+
position: absolute;
|
|
1006
995
|
top: 0;
|
|
1007
996
|
left: 0px;
|
|
1008
997
|
bottom: 0;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import TopLevelMenu from '@shell/components/nav/TopLevelMenu.vue';
|
|
2
|
-
import { SETTING } from '@shell/config/settings';
|
|
3
2
|
import { mount, Wrapper } from '@vue/test-utils';
|
|
4
3
|
import { CAPI, COUNT, MANAGEMENT } from '@shell/config/types';
|
|
5
4
|
import { PINNED_CLUSTERS } from '@shell/store/prefs';
|
|
@@ -429,45 +428,6 @@ describe('topLevelMenu', () => {
|
|
|
429
428
|
expect(description4.text()).toStrictEqual('some-description4');
|
|
430
429
|
});
|
|
431
430
|
|
|
432
|
-
it('should not "crash" the component if the structure of banner settings is in an old format', async() => {
|
|
433
|
-
const wrapper: Wrapper<InstanceType<typeof TopLevelMenu>> = mount(TopLevelMenu, {
|
|
434
|
-
global: {
|
|
435
|
-
mocks: {
|
|
436
|
-
$route: {},
|
|
437
|
-
$store: {
|
|
438
|
-
...generateStore(
|
|
439
|
-
[{ name: 'whatever' }],
|
|
440
|
-
[
|
|
441
|
-
// object based on https://github.com/rancher/dashboard/issues/10140#issuecomment-1883252402
|
|
442
|
-
{
|
|
443
|
-
id: SETTING.BANNERS,
|
|
444
|
-
value: JSON.stringify({
|
|
445
|
-
banner: {
|
|
446
|
-
color: '#78c9cf',
|
|
447
|
-
background: '#27292e',
|
|
448
|
-
text: 'Hello World!'
|
|
449
|
-
},
|
|
450
|
-
showHeader: 'true',
|
|
451
|
-
showFooter: 'true'
|
|
452
|
-
})
|
|
453
|
-
}
|
|
454
|
-
]
|
|
455
|
-
),
|
|
456
|
-
}
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
stubs: ['BrandImage', 'router-link'],
|
|
460
|
-
},
|
|
461
|
-
});
|
|
462
|
-
|
|
463
|
-
await waitForIt();
|
|
464
|
-
|
|
465
|
-
expect(wrapper.vm.sideMenuStyle).toStrictEqual({
|
|
466
|
-
marginBottom: '2em',
|
|
467
|
-
marginTop: '2em'
|
|
468
|
-
});
|
|
469
|
-
});
|
|
470
|
-
|
|
471
431
|
describe('searching a term', () => {
|
|
472
432
|
describe('should displays a no results message if have clusters but', () => {
|
|
473
433
|
it('given no matching clusters', async() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nextTick } from 'vue';
|
|
2
2
|
/* eslint-disable jest/no-hooks */
|
|
3
|
-
import { mount } from '@vue/test-utils';
|
|
3
|
+
import { mount, type VueWrapper } from '@vue/test-utils';
|
|
4
4
|
import { _EDIT } from '@shell/config/query-params';
|
|
5
5
|
|
|
6
6
|
import oidc from '@shell/edit/auth/oidc.vue';
|
|
@@ -32,7 +32,7 @@ const mockModel = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
describe('oidc.vue', () => {
|
|
35
|
-
let wrapper: any
|
|
35
|
+
let wrapper: VueWrapper<any, any>;
|
|
36
36
|
const requiredSetup = () => ({
|
|
37
37
|
data() {
|
|
38
38
|
return {
|
|
@@ -44,7 +44,7 @@ describe('oidc.vue', () => {
|
|
|
44
44
|
originalModel: null,
|
|
45
45
|
principals: [],
|
|
46
46
|
authConfigName: 'oidc',
|
|
47
|
-
};
|
|
47
|
+
} as any; // any is necessary as in pre-existing tests we are including inherited mixins values
|
|
48
48
|
},
|
|
49
49
|
global: {
|
|
50
50
|
mocks: {
|
|
@@ -148,4 +148,35 @@ describe('oidc.vue', () => {
|
|
|
148
148
|
expect(groupSearchCheckbox.isVisible()).toBe(true);
|
|
149
149
|
expect(wrapper.vm.model.groupSearchEnabled).toBe(true);
|
|
150
150
|
});
|
|
151
|
+
|
|
152
|
+
it('changing URL should update issuer and auth-endpoint if Keycloak', async() => {
|
|
153
|
+
wrapper.vm.model.id = 'keycloakoidc';
|
|
154
|
+
const newUrl = 'whatever';
|
|
155
|
+
|
|
156
|
+
await wrapper.find(`[data-testid="oidc-url"]`).setValue(newUrl);
|
|
157
|
+
await wrapper.vm.$nextTick();
|
|
158
|
+
|
|
159
|
+
const issuer = (wrapper.find('[data-testid="oidc-issuer"]').element as HTMLInputElement).value;
|
|
160
|
+
const endpoint = (wrapper.find('[data-testid="oidc-auth-endpoint"]').element as HTMLInputElement).value;
|
|
161
|
+
|
|
162
|
+
expect(issuer).toBe(`${ newUrl }/realms/`);
|
|
163
|
+
expect(endpoint).toBe(`${ newUrl }/realms//protocol/openid-connect/auth`);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it('changing realm should update issuer and auth-endpoint if Keycloak', async() => {
|
|
167
|
+
const newRealm = 'newRealm';
|
|
168
|
+
const oldUrl = 'oldUrl';
|
|
169
|
+
|
|
170
|
+
wrapper.vm.model.id = 'keycloakoidc';
|
|
171
|
+
wrapper.vm.oidcUrls.url = oldUrl;
|
|
172
|
+
|
|
173
|
+
await wrapper.find(`[data-testid="oidc-realm"]`).setValue(newRealm);
|
|
174
|
+
await wrapper.vm.$nextTick();
|
|
175
|
+
|
|
176
|
+
const issuer = (wrapper.find('[data-testid="oidc-issuer"]').element as HTMLInputElement).value;
|
|
177
|
+
const endpoint = (wrapper.find('[data-testid="oidc-auth-endpoint"]').element as HTMLInputElement).value;
|
|
178
|
+
|
|
179
|
+
expect(issuer).toBe(`${ oldUrl }/realms/${ newRealm }`);
|
|
180
|
+
expect(endpoint).toBe(`${ oldUrl }/realms/${ newRealm }/protocol/openid-connect/auth`);
|
|
181
|
+
});
|
|
151
182
|
});
|
package/edit/auth/oidc.vue
CHANGED
|
@@ -136,7 +136,7 @@ export default {
|
|
|
136
136
|
const isKeycloak = this.model.id === 'keycloakoidc';
|
|
137
137
|
|
|
138
138
|
const url = this.oidcUrls.url.replaceAll(' ', '');
|
|
139
|
-
const realmsPath =
|
|
139
|
+
const realmsPath = 'realms';
|
|
140
140
|
|
|
141
141
|
this.model.issuer = `${ url }/${ realmsPath }/${ this.oidcUrls.realm || '' }`;
|
|
142
142
|
|
|
@@ -1701,7 +1701,7 @@ export default {
|
|
|
1701
1701
|
const defaultChartValue = this.versionInfo[name];
|
|
1702
1702
|
const key = this.chartVersionKey(name);
|
|
1703
1703
|
|
|
1704
|
-
return
|
|
1704
|
+
return merge({}, defaultChartValue?.values || {}, this.userChartValues[key] || {});
|
|
1705
1705
|
},
|
|
1706
1706
|
|
|
1707
1707
|
initServerAgentArgs() {
|
package/edit/service.vue
CHANGED
|
@@ -521,9 +521,6 @@ export default {
|
|
|
521
521
|
"
|
|
522
522
|
:label="t('servicesPage.affinity.timeout.label')"
|
|
523
523
|
:placeholder="t('servicesPage.affinity.timeout.placeholder')"
|
|
524
|
-
@input="
|
|
525
|
-
(e) => value.spec.sessionAffinityConfig.clientIP.timeoutSeconds = e
|
|
526
|
-
"
|
|
527
524
|
/>
|
|
528
525
|
</div>
|
|
529
526
|
</div>
|
package/edit/workload/Job.vue
CHANGED
|
@@ -161,7 +161,7 @@ export default {
|
|
|
161
161
|
:suffix="t('suffix.times', {count: completions})"
|
|
162
162
|
label-key="workload.job.completions.label"
|
|
163
163
|
tooltip-key="workload.job.completions.tip"
|
|
164
|
-
@
|
|
164
|
+
@update:value="update"
|
|
165
165
|
/>
|
|
166
166
|
</div>
|
|
167
167
|
<div
|
|
@@ -174,7 +174,7 @@ export default {
|
|
|
174
174
|
:suffix="t('suffix.times', {count: parallelism})"
|
|
175
175
|
label-key="workload.job.parallelism.label"
|
|
176
176
|
tooltip-key="workload.job.parallelism.tip"
|
|
177
|
-
@
|
|
177
|
+
@update:value="update"
|
|
178
178
|
/>
|
|
179
179
|
</div>
|
|
180
180
|
</div>
|
|
@@ -189,7 +189,7 @@ export default {
|
|
|
189
189
|
:suffix="t('suffix.times', {count: backoffLimit})"
|
|
190
190
|
label-key="workload.job.backoffLimit.label"
|
|
191
191
|
tooltip-key="workload.job.backoffLimit.tip"
|
|
192
|
-
@
|
|
192
|
+
@update:value="update"
|
|
193
193
|
/>
|
|
194
194
|
</div>
|
|
195
195
|
<div
|
|
@@ -202,7 +202,7 @@ export default {
|
|
|
202
202
|
:suffix="t('suffix.seconds', {count: activeDeadlineSeconds})"
|
|
203
203
|
label-key="workload.job.activeDeadlineSeconds.label"
|
|
204
204
|
tooltip-key="workload.job.activeDeadlineSeconds.tip"
|
|
205
|
-
@
|
|
205
|
+
@update:value="update"
|
|
206
206
|
/>
|
|
207
207
|
</div>
|
|
208
208
|
</div>
|
|
@@ -245,7 +245,7 @@ export default {
|
|
|
245
245
|
:suffix="t('suffix.seconds', {count: startingDeadlineSeconds})"
|
|
246
246
|
label-key="workload.job.startingDeadlineSeconds.label"
|
|
247
247
|
tooltip-key="workload.job.startingDeadlineSeconds.tip"
|
|
248
|
-
@
|
|
248
|
+
@update:value="update"
|
|
249
249
|
/>
|
|
250
250
|
</div>
|
|
251
251
|
<div
|
|
@@ -257,7 +257,7 @@ export default {
|
|
|
257
257
|
:suffix="t('suffix.seconds', { count: terminationGracePeriodSeconds })"
|
|
258
258
|
:label="t('workload.upgrading.activeDeadlineSeconds.label')"
|
|
259
259
|
:mode="mode"
|
|
260
|
-
@
|
|
260
|
+
@update:value="update"
|
|
261
261
|
>
|
|
262
262
|
<template #label>
|
|
263
263
|
<label
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rancher/shell",
|
|
3
|
-
"version": "3.0.2
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Rancher Dashboard Shell",
|
|
5
5
|
"repository": "https://github.com/rancherlabs/dashboard",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"eslint-plugin-import": "2.31.0",
|
|
86
86
|
"eslint-plugin-jest": "24.4.0",
|
|
87
87
|
"eslint-plugin-n": "15.2.0",
|
|
88
|
-
"eslint-plugin-vue": "9.
|
|
88
|
+
"eslint-plugin-vue": "9.32.0",
|
|
89
89
|
"eslint": "7.32.0",
|
|
90
90
|
"event-target-shim": "5.0.1",
|
|
91
91
|
"express": "4.17.1",
|
package/pages/auth/login.vue
CHANGED
|
@@ -30,7 +30,6 @@ import {
|
|
|
30
30
|
} from '@shell/config/private-label';
|
|
31
31
|
import loadPlugins from '@shell/plugins/plugin';
|
|
32
32
|
import Loading from '@shell/components/Loading';
|
|
33
|
-
import { getGlobalBannerFontSizes } from '@shell/utils/banners';
|
|
34
33
|
import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
|
|
35
34
|
|
|
36
35
|
export default {
|
|
@@ -133,13 +132,6 @@ export default {
|
|
|
133
132
|
hasLoginMessage() {
|
|
134
133
|
return this.errorToDisplay || this.loggedOut || this.timedOut;
|
|
135
134
|
},
|
|
136
|
-
|
|
137
|
-
// Apply bottom margin so that the locale secletor control lifts up to avoid the footer fixed banner, if it is shown
|
|
138
|
-
localeSelectorStyle() {
|
|
139
|
-
const globalBannerSettings = getGlobalBannerFontSizes(this.$store);
|
|
140
|
-
|
|
141
|
-
return { marginBottom: globalBannerSettings?.footerFont };
|
|
142
|
-
}
|
|
143
135
|
},
|
|
144
136
|
|
|
145
137
|
async fetch() {
|
|
@@ -509,7 +501,6 @@ export default {
|
|
|
509
501
|
class="locale-selector"
|
|
510
502
|
>
|
|
511
503
|
<LocaleSelector
|
|
512
|
-
:style="localeSelectorStyle"
|
|
513
504
|
mode="login"
|
|
514
505
|
/>
|
|
515
506
|
</div>
|
|
@@ -526,6 +517,7 @@ export default {
|
|
|
526
517
|
<style lang="scss" scoped>
|
|
527
518
|
.login {
|
|
528
519
|
overflow: hidden;
|
|
520
|
+
position: relative; // Used to keep the locale selector positioned correctly
|
|
529
521
|
|
|
530
522
|
.row {
|
|
531
523
|
align-items: center;
|
|
@@ -38,7 +38,7 @@ Common labels
|
|
|
38
38
|
helm.sh/chart: {{ include "extension-server.chart" . }}
|
|
39
39
|
{{ include "extension-server.selectorLabels" . }}
|
|
40
40
|
{{- if .Chart.AppVersion }}
|
|
41
|
-
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
41
|
+
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" | quote }}
|
|
42
42
|
{{- end }}
|
|
43
43
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
44
44
|
{{- end }}
|
|
@@ -60,4 +60,4 @@ Pkg annotations
|
|
|
60
60
|
{{ $key }}: {{ $value | quote }}
|
|
61
61
|
{{- end }}
|
|
62
62
|
{{- end }}
|
|
63
|
-
{{- end }}
|
|
63
|
+
{{- end }}
|
package/store/aws.js
CHANGED
|
@@ -241,8 +241,15 @@ export const actions = {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
addObjects(out, res[key]);
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
if (res.NextToken) {
|
|
245
|
+
opt.NextToken = res.NextToken;
|
|
246
|
+
hasNext = true;
|
|
247
|
+
} else if (res.Marker) {
|
|
248
|
+
opt.Marker = res.Marker;
|
|
249
|
+
hasNext = true;
|
|
250
|
+
} else {
|
|
251
|
+
hasNext = false;
|
|
252
|
+
}
|
|
246
253
|
}
|
|
247
254
|
|
|
248
255
|
return out;
|
package/types/shell/index.d.ts
CHANGED
|
@@ -3446,13 +3446,6 @@ export function getIndividualBanners(store: any): {};
|
|
|
3446
3446
|
* Overlay settings from the individual banner settings onto the single banner setting
|
|
3447
3447
|
*/
|
|
3448
3448
|
export function overlayIndividualBanners(parsedBanner: any, banners: any): void;
|
|
3449
|
-
/**
|
|
3450
|
-
* Get banner font sizes - used to add margins when header and footer banners are present
|
|
3451
|
-
**/
|
|
3452
|
-
export function getGlobalBannerFontSizes(store: any): {
|
|
3453
|
-
headerFont: string;
|
|
3454
|
-
footerFont: string;
|
|
3455
|
-
};
|
|
3456
3449
|
}
|
|
3457
3450
|
|
|
3458
3451
|
// @shell/utils/clipboard
|
|
@@ -4001,9 +3994,6 @@ export function deepToRaw(obj: any, cache?: any): any;
|
|
|
4001
3994
|
* More info: https://github.com/lodash/lodash/issues/1313
|
|
4002
3995
|
*
|
|
4003
3996
|
* This helper function addresses the issue by always replacing the old array with the new array during the merge process.
|
|
4004
|
-
*
|
|
4005
|
-
* This helper is used for another case in rke2.vue to handle merging addon chart default values with the user's current values.
|
|
4006
|
-
* It fixed https://github.com/rancher/dashboard/issues/12418
|
|
4007
3997
|
*/
|
|
4008
3998
|
export function mergeWithReplaceArrays(obj1?: {}, obj2?: {}): any;
|
|
4009
3999
|
export { isEqualBasic as isEqual };
|
package/utils/banners.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { MANAGEMENT } from '@shell/config/types';
|
|
8
|
-
import { SETTING } from '@shell/config/settings';
|
|
9
8
|
|
|
10
9
|
const BANNER_HEADER = 'bannerHeader';
|
|
11
10
|
const BANNER_FOOTER = 'bannerFooter';
|
|
@@ -57,47 +56,3 @@ export function overlayIndividualBanners(parsedBanner, banners) {
|
|
|
57
56
|
} catch {}
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Converts a pixel value to an em value based on the default font size.
|
|
63
|
-
* @param {number} elementFontSize - The font size of the element in pixels.
|
|
64
|
-
* @param {number} [defaultFontSize=14] - The default font size in pixels.
|
|
65
|
-
* @returns {string} The converted value in em units.
|
|
66
|
-
*/
|
|
67
|
-
function pxToEm(elementFontSize, defaultFontSize = 14) {
|
|
68
|
-
const lineHeightInPx = 2 * parseInt(elementFontSize);
|
|
69
|
-
const lineHeightInEm = lineHeightInPx / defaultFontSize;
|
|
70
|
-
|
|
71
|
-
return `${ lineHeightInEm }em`;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Get banner font sizes - used to add margins when header and footer banners are present
|
|
76
|
-
**/
|
|
77
|
-
export function getGlobalBannerFontSizes(store) {
|
|
78
|
-
const settings = store.getters['management/all'](MANAGEMENT.SETTING);
|
|
79
|
-
const bannerSettings = settings?.find((s) => s.id === SETTING.BANNERS);
|
|
80
|
-
const individualBannerSettings = getIndividualBanners(store);
|
|
81
|
-
|
|
82
|
-
if (bannerSettings) {
|
|
83
|
-
const parsed = JSON.parse(bannerSettings.value);
|
|
84
|
-
|
|
85
|
-
overlayIndividualBanners(parsed, individualBannerSettings);
|
|
86
|
-
|
|
87
|
-
const {
|
|
88
|
-
showFooter, showHeader, bannerFooter, bannerHeader, banner
|
|
89
|
-
} = parsed;
|
|
90
|
-
|
|
91
|
-
// add defaults to accommodate older JSON structures for banner definitions without breaking the UI
|
|
92
|
-
// https://github.com/rancher/dashboard/issues/10140
|
|
93
|
-
const bannerHeaderFontSize = bannerHeader?.fontSize || banner?.fontSize || '14px';
|
|
94
|
-
const bannerFooterFontSize = bannerFooter?.fontSize || banner?.fontSize || '14px';
|
|
95
|
-
|
|
96
|
-
return {
|
|
97
|
-
headerFont: showHeader === 'true' ? pxToEm(bannerHeaderFontSize) : '0px',
|
|
98
|
-
footerFont: showFooter === 'true' ? pxToEm(bannerFooterFontSize) : '0px'
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return undefined;
|
|
103
|
-
}
|
package/utils/object.js
CHANGED
|
@@ -488,9 +488,6 @@ export function deepToRaw(obj, cache = new WeakSet()) {
|
|
|
488
488
|
* More info: https://github.com/lodash/lodash/issues/1313
|
|
489
489
|
*
|
|
490
490
|
* This helper function addresses the issue by always replacing the old array with the new array during the merge process.
|
|
491
|
-
*
|
|
492
|
-
* This helper is used for another case in rke2.vue to handle merging addon chart default values with the user's current values.
|
|
493
|
-
* It fixed https://github.com/rancher/dashboard/issues/12418
|
|
494
491
|
*/
|
|
495
492
|
export function mergeWithReplaceArrays(obj1 = {}, obj2 = {}) {
|
|
496
493
|
return mergeWith(obj1, obj2, (obj1Value, obj2Value) => {
|