@rancher/shell 3.0.9-rc.5 → 3.0.9-rc.6
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/images/providers/oci-open-containers.svg +22 -0
- package/assets/images/providers/traefik.png +0 -0
- package/assets/styles/themes/_dark.scss +2 -0
- package/assets/styles/themes/_light.scss +2 -0
- package/assets/styles/themes/_modern.scss +6 -0
- package/assets/translations/en-us.yaml +129 -25
- package/components/CruResource.vue +3 -1
- package/components/ExplorerProjectsNamespaces.vue +12 -12
- package/components/Resource/Detail/Card/StatusCard/__tests__/StatusCard.test.ts +109 -0
- package/components/Resource/Detail/Card/StatusCard/index.vue +21 -4
- package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +19 -2
- package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +19 -11
- package/components/Resource/Detail/ResourcePopover/__tests__/index.test.ts +12 -0
- package/components/Resource/Detail/ResourcePopover/index.vue +2 -0
- package/components/Resource/Detail/ResourceRow.vue +2 -2
- package/components/ResourceList/index.vue +7 -4
- package/components/Window/ContainerLogs.vue +48 -37
- package/components/fleet/FleetClusterTargets/TargetsList.vue +2 -2
- package/components/fleet/FleetClusterTargets/index.vue +6 -1
- package/components/fleet/GitRepoAdvancedTab.vue +333 -0
- package/components/fleet/GitRepoMetadataTab.vue +43 -0
- package/components/fleet/GitRepoRepositoryTab.vue +101 -0
- package/components/fleet/GitRepoTargetTab.vue +77 -0
- package/components/fleet/HelmOpAdvancedTab.vue +247 -0
- package/components/fleet/HelmOpChartTab.vue +158 -0
- package/components/fleet/HelmOpMetadataTab.vue +46 -0
- package/components/fleet/HelmOpTargetTab.vue +84 -0
- package/components/fleet/HelmOpValuesTab.vue +147 -0
- package/components/fleet/__tests__/FleetClusterTargets.test.ts +119 -70
- package/components/form/NodeScheduling.vue +81 -7
- package/components/form/PodAffinity.vue +1 -36
- package/components/form/ResourceLabeledSelect.vue +8 -4
- package/components/form/ResourceQuota/Namespace.vue +30 -9
- package/components/form/ResourceQuota/NamespaceRow.vue +25 -7
- package/components/form/ResourceQuota/Project.vue +140 -82
- package/components/form/ResourceQuota/ResourceQuotaEntry.vue +145 -0
- package/components/form/ResourceQuota/__tests__/Namespace.test.ts +307 -0
- package/components/form/ResourceQuota/__tests__/NamespaceRow.test.ts +281 -0
- package/components/form/ResourceQuota/__tests__/Project.test.ts +274 -27
- package/components/form/ResourceQuota/__tests__/ResourceQuotaEntry.test.ts +215 -0
- package/components/form/SchedulingCustomization.vue +14 -6
- package/components/form/SelectOrCreateAuthSecret.vue +107 -18
- package/components/form/__tests__/NodeScheduling.test.ts +12 -9
- package/components/form/__tests__/PodAffinity.test.ts +21 -2
- package/components/form/__tests__/SchedulingCustomization.test.ts +240 -0
- package/components/formatter/ClusterLink.vue +8 -0
- package/components/formatter/SecretOrigin.vue +79 -0
- package/config/labels-annotations.js +7 -6
- package/config/pagination-table-headers.js +6 -4
- package/config/product/explorer.js +1 -11
- package/config/query-params.js +3 -0
- package/config/settings.ts +15 -2
- package/config/table-headers.js +21 -17
- package/config/types.js +23 -8
- package/detail/workload/index.vue +11 -16
- package/dialog/DeactivateDriverDialog.vue +1 -1
- package/dialog/Ipv6NetworkingDialog.vue +156 -0
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +1 -1
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +1 -0
- package/edit/__tests__/management.cattle.io.project.test.js +56 -128
- package/edit/auth/oidc.vue +1 -1
- package/edit/catalog.cattle.io.clusterrepo.vue +155 -25
- package/edit/fleet.cattle.io.gitrepo.vue +153 -283
- package/edit/fleet.cattle.io.helmop.vue +190 -332
- package/edit/management.cattle.io.project.vue +5 -42
- package/edit/management.cattle.io.setting.vue +6 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +55 -24
- package/edit/provisioning.cattle.io.cluster/__tests__/Networking.test.ts +1 -103
- package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +13 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2-fleet-cluster-agent.test.ts +283 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +65 -49
- package/edit/provisioning.cattle.io.cluster/ingress/IngressCards.vue +112 -0
- package/edit/provisioning.cattle.io.cluster/ingress/IngressConfiguration.vue +158 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +171 -72
- package/edit/provisioning.cattle.io.cluster/shared.ts +36 -1
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -1
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +55 -7
- package/edit/provisioning.cattle.io.cluster/tabs/Ingress.vue +319 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -1
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/__tests__/S3Config.test.ts +13 -1
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +10 -44
- package/edit/secret/index.vue +1 -1
- package/edit/token.vue +68 -29
- package/edit/workload/__tests__/index.test.ts +2 -37
- package/edit/workload/index.vue +6 -2
- package/edit/workload/mixins/workload.js +0 -32
- package/list/__tests__/management.cattle.io.setting.test.ts +198 -0
- package/list/management.cattle.io.setting.vue +13 -0
- package/list/provisioning.cattle.io.cluster.vue +50 -1
- package/list/secret.vue +4 -9
- package/list/service.vue +6 -8
- package/machine-config/amazonec2.vue +11 -4
- package/machine-config/components/EC2Networking.vue +46 -30
- package/machine-config/components/__tests__/EC2Networking.test.ts +7 -7
- package/machine-config/components/__tests__/utils/vpcSubnetMockData.js +0 -9
- package/machine-config/digitalocean.vue +3 -3
- package/models/__tests__/namespace.test.ts +11 -0
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +96 -0
- package/models/__tests__/workload.test.ts +42 -1
- package/models/catalog.cattle.io.clusterrepo.js +30 -4
- package/models/ext.cattle.io.token.js +48 -0
- package/models/kontainerdriver.js +2 -2
- package/models/namespace.js +7 -1
- package/models/nodedriver.js +2 -2
- package/models/provisioning.cattle.io.cluster.js +28 -7
- package/models/secret.js +0 -17
- package/models/service.js +44 -1
- package/models/token.js +4 -0
- package/models/workload.js +12 -6
- package/package.json +1 -1
- package/pages/account/index.vue +96 -67
- package/pages/auth/setup.vue +5 -14
- package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +4 -1
- package/pages/c/_cluster/apps/charts/index.vue +93 -4
- package/pages/c/_cluster/apps/charts/install.vue +317 -42
- package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +5 -4
- package/pages/c/_cluster/settings/index.vue +3 -1
- package/plugins/dashboard-store/__tests__/getters.test.ts +108 -0
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +27 -0
- package/plugins/dashboard-store/actions.js +3 -8
- package/plugins/dashboard-store/getters.js +7 -5
- package/plugins/dashboard-store/mutations.js +4 -1
- package/plugins/dashboard-store/resource-class.js +3 -3
- package/plugins/steve/__tests__/steve-class.test.ts +102 -141
- package/plugins/steve/steve-class.js +12 -3
- package/plugins/steve/steve-pagination-utils.ts +6 -2
- package/rancher-components/RcIcon/types.ts +2 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +64 -19
- package/store/prefs.js +3 -0
- package/types/aws-sdk.d.ts +121 -0
- package/types/resources/node.ts +15 -0
- package/types/shell/index.d.ts +536 -506
- package/types/store/pagination.types.ts +5 -5
- package/utils/__tests__/array.test.ts +1 -29
- package/utils/__tests__/cluster-agent-configuration.test.ts +203 -0
- package/utils/array.ts +0 -11
- package/utils/aws.ts +21 -0
- package/utils/cluster.js +22 -2
- package/utils/selector-typed.ts +1 -1
- package/components/__tests__/ProjectRow.test.ts +0 -206
- package/components/form/ResourceQuota/ProjectRow.vue +0 -277
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import AsyncButton from '@shell/components/AsyncButton';
|
|
3
|
+
import { Card } from '@components/Card';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
emits: ['close'],
|
|
7
|
+
|
|
8
|
+
components: {
|
|
9
|
+
Card,
|
|
10
|
+
AsyncButton,
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
warnings: {
|
|
14
|
+
type: Array,
|
|
15
|
+
default: () => []
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
isK3s: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Callback to identify response of the prompt
|
|
25
|
+
*/
|
|
26
|
+
confirm: {
|
|
27
|
+
type: Function,
|
|
28
|
+
default: () => { }
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
methods: {
|
|
34
|
+
close() {
|
|
35
|
+
this.confirm(false);
|
|
36
|
+
this.$emit('close');
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
async apply(buttonDone) {
|
|
40
|
+
this.applyErrors = [];
|
|
41
|
+
try {
|
|
42
|
+
this.confirm(true);
|
|
43
|
+
this.$emit('close');
|
|
44
|
+
} catch (err) {
|
|
45
|
+
console.error(err); // eslint-disable-line
|
|
46
|
+
buttonDone(false);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<Card
|
|
55
|
+
class="prompt-restore"
|
|
56
|
+
:show-highlight-border="false"
|
|
57
|
+
data-testid="ipv6-dialog"
|
|
58
|
+
>
|
|
59
|
+
<template #title>
|
|
60
|
+
<h4
|
|
61
|
+
v-clean-html="t('cluster.rke2.modal.ipv6Warning.title')"
|
|
62
|
+
class="text-default-text"
|
|
63
|
+
/>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<template #body>
|
|
67
|
+
<div
|
|
68
|
+
class="pl-10 pr-10"
|
|
69
|
+
style="min-height: 50px;"
|
|
70
|
+
>
|
|
71
|
+
<t
|
|
72
|
+
k="cluster.rke2.modal.ipv6Warning.body"
|
|
73
|
+
raw
|
|
74
|
+
/>
|
|
75
|
+
<t
|
|
76
|
+
:k="isK3s ? 'cluster.rke2.modal.ipv6Warning.readMoreK3s' : 'cluster.rke2.modal.ipv6Warning.readMoreRke2'"
|
|
77
|
+
raw
|
|
78
|
+
/>
|
|
79
|
+
<div class="list-pretext">
|
|
80
|
+
<t
|
|
81
|
+
k="cluster.rke2.modal.ipv6Warning.verifySettings"
|
|
82
|
+
raw
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
<ul
|
|
86
|
+
data-testid="ipv6-dialog-reasons"
|
|
87
|
+
class="warning-list"
|
|
88
|
+
>
|
|
89
|
+
<li
|
|
90
|
+
v-for="warning in warnings"
|
|
91
|
+
:key="warning"
|
|
92
|
+
>
|
|
93
|
+
<t
|
|
94
|
+
:k="warning"
|
|
95
|
+
raw
|
|
96
|
+
/>
|
|
97
|
+
</li>
|
|
98
|
+
</ul>
|
|
99
|
+
</div>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<template #actions>
|
|
103
|
+
<div class="bottom">
|
|
104
|
+
<div
|
|
105
|
+
|
|
106
|
+
class="buttons"
|
|
107
|
+
>
|
|
108
|
+
<button
|
|
109
|
+
data-testid="ipv6-dialog-cancel"
|
|
110
|
+
class="btn role-secondary mr-10"
|
|
111
|
+
@click="close"
|
|
112
|
+
>
|
|
113
|
+
{{ t('generic.cancel') }}
|
|
114
|
+
</button>
|
|
115
|
+
|
|
116
|
+
<AsyncButton
|
|
117
|
+
data-testid="ipv6-dialog-continue"
|
|
118
|
+
mode="continue"
|
|
119
|
+
action-color="role-primary"
|
|
120
|
+
@click="apply"
|
|
121
|
+
/>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</template>
|
|
125
|
+
</Card>
|
|
126
|
+
</template>
|
|
127
|
+
<style lang='scss' scoped>
|
|
128
|
+
.prompt-restore {
|
|
129
|
+
margin: 0;
|
|
130
|
+
}
|
|
131
|
+
.bottom {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
flex: 1;
|
|
135
|
+
.banner {
|
|
136
|
+
margin-top: 0
|
|
137
|
+
}
|
|
138
|
+
.buttons {
|
|
139
|
+
display: flex;
|
|
140
|
+
justify-content: flex-end;
|
|
141
|
+
width: 100%;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.list-pretext {
|
|
146
|
+
margin-top: 16px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.warning-list {
|
|
150
|
+
padding-inline-start: 24px;
|
|
151
|
+
|
|
152
|
+
& li {
|
|
153
|
+
margin-bottom: 8px;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
</style>
|
|
@@ -26,7 +26,7 @@ export default {
|
|
|
26
26
|
};
|
|
27
27
|
},
|
|
28
28
|
computed: {
|
|
29
|
-
|
|
29
|
+
machineName() {
|
|
30
30
|
const name = this.resources.length > 0 ? this.resources[0]?.id?.split('/')[1] : '';
|
|
31
31
|
|
|
32
32
|
return name;
|
|
@@ -81,7 +81,7 @@ export default {
|
|
|
81
81
|
<template #body>
|
|
82
82
|
<div class="pl-10 pr-10">
|
|
83
83
|
<div>
|
|
84
|
-
{{ t('
|
|
84
|
+
{{ t('promptScaleMachineDown.attemptingToScaleDown', { type }) }} <b>{{ machineName }}</b>
|
|
85
85
|
</div>
|
|
86
86
|
<div>
|
|
87
87
|
<Checkbox
|
|
@@ -244,7 +244,7 @@ describe('view: fleet.cattle.io.gitrepo, GitHub password banner - should', () =>
|
|
|
244
244
|
const wrapper = mount(GitRepoComponent, initGitRepo({ mode: _CREATE }, { spec: { repo: 'https://github.com/rancher/fleet-examples' } }));
|
|
245
245
|
|
|
246
246
|
// Check computed properties
|
|
247
|
-
expect(wrapper.vm.
|
|
247
|
+
expect(wrapper.vm.isGithubDotComRepository).toBeTruthy();
|
|
248
248
|
|
|
249
249
|
// Set basic auth selection in tempCachedValues
|
|
250
250
|
await wrapper.setData({ tempCachedValues: { clientSecretName: { selected: AUTH_TYPE._BASIC } } });
|
|
@@ -27,119 +27,75 @@ const defaultMountOptions = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
describe('component: ManagementCattleIoProject', () => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
metadata: { namespace: 'test-ns', annotations: {} },
|
|
37
|
-
save: jest.fn(),
|
|
38
|
-
listLocation: { name: 'list' }
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const wrapper = shallowMount(
|
|
42
|
-
ManagementCattleIoProject,
|
|
43
|
-
{
|
|
44
|
-
...defaultMountOptions,
|
|
45
|
-
props: {
|
|
46
|
-
...defaultMountOptions.props,
|
|
47
|
-
value,
|
|
30
|
+
describe('onQuotasInput', () => {
|
|
31
|
+
it('should update resourceQuota limit while preserving other resourceQuota fields', () => {
|
|
32
|
+
const value = {
|
|
33
|
+
spec: {
|
|
34
|
+
resourceQuota: { limit: { limitsCpu: '100m' }, usedLimit: { limitsCpu: '50m' } },
|
|
35
|
+
namespaceDefaultResourceQuota: { limit: { limitsCpu: '50m' } }
|
|
48
36
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
metadata: { namespace: 'test-ns', annotations: {} },
|
|
38
|
+
save: jest.fn(),
|
|
39
|
+
listLocation: { name: 'list' }
|
|
40
|
+
};
|
|
53
41
|
|
|
54
|
-
|
|
55
|
-
expect(wrapper.vm.value.spec.namespaceDefaultResourceQuota.limit.limitsCpu).toBeUndefined();
|
|
56
|
-
expect(wrapper.vm.value.spec.resourceQuota.limit.limitsMemory).toBe('1Gi'); // Ensure other quotas are not affected
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it('should remove a custom resource quota with single period in name correctly', async() => {
|
|
60
|
-
const value = {
|
|
61
|
-
spec: {
|
|
62
|
-
resourceQuota: { limit: { extended: { test2: '1' } } },
|
|
63
|
-
namespaceDefaultResourceQuota: { limit: { extended: { test2: '2' } } }
|
|
64
|
-
},
|
|
65
|
-
metadata: { namespace: 'test-ns', annotations: {} },
|
|
66
|
-
save: jest.fn(),
|
|
67
|
-
listLocation: { name: 'list' }
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const wrapper = shallowMount(
|
|
71
|
-
ManagementCattleIoProject,
|
|
72
|
-
{
|
|
42
|
+
const wrapper = shallowMount(ManagementCattleIoProject, {
|
|
73
43
|
...defaultMountOptions,
|
|
74
|
-
props: {
|
|
75
|
-
|
|
76
|
-
value,
|
|
77
|
-
},
|
|
78
|
-
}
|
|
79
|
-
);
|
|
44
|
+
props: { ...defaultMountOptions.props, value },
|
|
45
|
+
});
|
|
80
46
|
|
|
81
|
-
|
|
47
|
+
wrapper.vm.onQuotasInput({ projectLimit: { limitsCpu: '200m' }, nsLimit: { limitsCpu: '100m' } });
|
|
82
48
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
49
|
+
expect(wrapper.vm.value.spec.resourceQuota.limit).toStrictEqual({ limitsCpu: '200m' });
|
|
50
|
+
expect(wrapper.vm.value.spec.resourceQuota.usedLimit).toStrictEqual({ limitsCpu: '50m' });
|
|
51
|
+
});
|
|
86
52
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
metadata: { namespace: 'test-ns', annotations: {} },
|
|
94
|
-
save: jest.fn(),
|
|
95
|
-
listLocation: { name: 'list' }
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const wrapper = shallowMount(
|
|
99
|
-
ManagementCattleIoProject,
|
|
100
|
-
{
|
|
101
|
-
...defaultMountOptions,
|
|
102
|
-
props: {
|
|
103
|
-
...defaultMountOptions.props,
|
|
104
|
-
value,
|
|
53
|
+
it('should update namespaceDefaultResourceQuota limit while preserving other namespaceDefaultResourceQuota fields', () => {
|
|
54
|
+
const value = {
|
|
55
|
+
spec: {
|
|
56
|
+
resourceQuota: { limit: { limitsCpu: '100m' } },
|
|
57
|
+
namespaceDefaultResourceQuota: { limit: { limitsCpu: '50m' }, extraField: 'preserved' }
|
|
105
58
|
},
|
|
106
|
-
|
|
107
|
-
|
|
59
|
+
metadata: { namespace: 'test-ns', annotations: {} },
|
|
60
|
+
save: jest.fn(),
|
|
61
|
+
listLocation: { name: 'list' }
|
|
62
|
+
};
|
|
108
63
|
|
|
109
|
-
|
|
64
|
+
const wrapper = shallowMount(ManagementCattleIoProject, {
|
|
65
|
+
...defaultMountOptions,
|
|
66
|
+
props: { ...defaultMountOptions.props, value },
|
|
67
|
+
});
|
|
110
68
|
|
|
111
|
-
|
|
112
|
-
expect(wrapper.vm.value.spec.namespaceDefaultResourceQuota.limit.extended).toBeUndefined();
|
|
113
|
-
});
|
|
69
|
+
wrapper.vm.onQuotasInput({ projectLimit: { limitsCpu: '200m' }, nsLimit: { limitsCpu: '100m' } });
|
|
114
70
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const wrapper = shallowMount(
|
|
127
|
-
ManagementCattleIoProject,
|
|
128
|
-
{
|
|
129
|
-
...defaultMountOptions,
|
|
130
|
-
props: {
|
|
131
|
-
...defaultMountOptions.props,
|
|
132
|
-
value,
|
|
71
|
+
expect(wrapper.vm.value.spec.namespaceDefaultResourceQuota.limit).toStrictEqual({ limitsCpu: '100m' });
|
|
72
|
+
expect(wrapper.vm.value.spec.namespaceDefaultResourceQuota.extraField).toStrictEqual('preserved');
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('should set both resourceQuota and namespaceDefaultResourceQuota limits from input', () => {
|
|
76
|
+
const value = {
|
|
77
|
+
spec: {
|
|
78
|
+
resourceQuota: { limit: {} },
|
|
79
|
+
namespaceDefaultResourceQuota: { limit: {} }
|
|
133
80
|
},
|
|
134
|
-
|
|
135
|
-
|
|
81
|
+
metadata: { namespace: 'test-ns', annotations: {} },
|
|
82
|
+
save: jest.fn(),
|
|
83
|
+
listLocation: { name: 'list' }
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const wrapper = shallowMount(ManagementCattleIoProject, {
|
|
87
|
+
...defaultMountOptions,
|
|
88
|
+
props: { ...defaultMountOptions.props, value },
|
|
89
|
+
});
|
|
136
90
|
|
|
137
|
-
|
|
91
|
+
wrapper.vm.onQuotasInput({
|
|
92
|
+
projectLimit: { limitsCpu: '500m', limitsMemory: '2Gi' },
|
|
93
|
+
nsLimit: { limitsCpu: '250m', limitsMemory: '1Gi' },
|
|
94
|
+
});
|
|
138
95
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
expect(wrapper.vm.value.spec.namespaceDefaultResourceQuota.limit.extended.test2).toBe('4');
|
|
96
|
+
expect(wrapper.vm.value.spec.resourceQuota.limit).toStrictEqual({ limitsCpu: '500m', limitsMemory: '2Gi' });
|
|
97
|
+
expect(wrapper.vm.value.spec.namespaceDefaultResourceQuota.limit).toStrictEqual({ limitsCpu: '250m', limitsMemory: '1Gi' });
|
|
98
|
+
});
|
|
143
99
|
});
|
|
144
100
|
|
|
145
101
|
it('should update isQuotasValid when validateQuotas is called', () => {
|
|
@@ -161,32 +117,4 @@ describe('component: ManagementCattleIoProject', () => {
|
|
|
161
117
|
|
|
162
118
|
expect(cruResource.props('validationPassed')).toStrictEqual(false);
|
|
163
119
|
});
|
|
164
|
-
|
|
165
|
-
it('should remove an extended resource quota correctly with fixed startsWith', async() => {
|
|
166
|
-
const value = {
|
|
167
|
-
spec: {
|
|
168
|
-
resourceQuota: { limit: { extended: { test2: '1' } } },
|
|
169
|
-
namespaceDefaultResourceQuota: { limit: { extended: { test2: '2' } } }
|
|
170
|
-
},
|
|
171
|
-
metadata: { namespace: 'test-ns', annotations: {} },
|
|
172
|
-
save: jest.fn(),
|
|
173
|
-
listLocation: { name: 'list' }
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
const wrapper = shallowMount(
|
|
177
|
-
ManagementCattleIoProject,
|
|
178
|
-
{
|
|
179
|
-
...defaultMountOptions,
|
|
180
|
-
props: {
|
|
181
|
-
...defaultMountOptions.props,
|
|
182
|
-
value,
|
|
183
|
-
},
|
|
184
|
-
}
|
|
185
|
-
);
|
|
186
|
-
|
|
187
|
-
wrapper.vm.removeQuota('extended.test2');
|
|
188
|
-
|
|
189
|
-
expect(wrapper.vm.value.spec.resourceQuota.limit.extended).toBeUndefined();
|
|
190
|
-
expect(wrapper.vm.value.spec.namespaceDefaultResourceQuota.limit.extended).toBeUndefined();
|
|
191
|
-
});
|
|
192
120
|
});
|
package/edit/auth/oidc.vue
CHANGED
|
@@ -273,7 +273,7 @@ export default {
|
|
|
273
273
|
|
|
274
274
|
this.model.issuer = `${ url }/${ realmsPath }/${ this.oidcUrls.realm || '' }`;
|
|
275
275
|
|
|
276
|
-
if ( isKeycloak ) {
|
|
276
|
+
if ( isKeycloak || this.isGenericOidc ) {
|
|
277
277
|
this.model.authEndpoint = `${ this.model.issuer || '' }/protocol/openid-connect/auth`;
|
|
278
278
|
}
|
|
279
279
|
},
|