@rancher/shell 3.0.5-rc.3 → 3.0.5-rc.5
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/icons/document.svg +3 -0
- package/assets/images/vendor/cognito.svg +1 -0
- package/assets/styles/app.scss +1 -0
- package/assets/styles/base/_basic.scss +10 -0
- package/assets/styles/base/_spacing.scss +29 -0
- package/assets/styles/global/_layout.scss +1 -1
- package/assets/styles/themes/_dark.scss +25 -0
- package/assets/styles/themes/_light.scss +65 -0
- package/assets/translations/en-us.yaml +322 -24
- package/assets/translations/zh-hans.yaml +8 -5
- package/components/Certificates.vue +5 -0
- package/components/FilterPanel.vue +156 -0
- package/components/{fleet/ForceDirectedTreeChart/index.vue → ForceDirectedTreeChart.vue} +47 -41
- package/components/IconOrSvg.vue +14 -35
- package/components/PromptRemove.vue +5 -1
- package/components/Resource/Detail/Card/PodsCard/Bubble.vue +13 -0
- package/components/Resource/Detail/Card/PodsCard/composable.ts +30 -0
- package/components/Resource/Detail/Card/PodsCard/index.vue +118 -0
- package/components/Resource/Detail/Card/ResourceUsageCard/composable.ts +51 -0
- package/components/Resource/Detail/Card/ResourceUsageCard/index.vue +79 -0
- package/components/Resource/Detail/Card/Scaler.vue +89 -0
- package/components/Resource/Detail/Card/StateCard/composables.ts +112 -0
- package/components/Resource/Detail/Card/StateCard/index.vue +39 -0
- package/components/Resource/Detail/Card/VerticalGap.vue +11 -0
- package/components/Resource/Detail/Card/__tests__/Card.test.ts +36 -0
- package/components/Resource/Detail/Card/__tests__/PodsCard.test.ts +84 -0
- package/components/Resource/Detail/Card/__tests__/ResourceUsageCard.test.ts +72 -0
- package/components/Resource/Detail/Card/__tests__/Scaler.test.ts +87 -0
- package/components/Resource/Detail/Card/__tests__/StateCard.test.ts +53 -0
- package/components/Resource/Detail/Card/__tests__/VerticalGap.test.ts +14 -0
- package/components/Resource/Detail/Card/__tests__/index.test.ts +36 -0
- package/components/Resource/Detail/Card/index.vue +56 -0
- package/components/Resource/Detail/Metadata/Annotations/__tests__/index.test.ts +19 -0
- package/components/Resource/Detail/Metadata/Annotations/composable.ts +12 -0
- package/components/Resource/Detail/Metadata/Annotations/index.vue +26 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/index.test.ts +103 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/composable.ts +281 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +111 -0
- package/components/Resource/Detail/Metadata/KeyValue.vue +130 -0
- package/components/Resource/Detail/Metadata/Labels/__tests__/index.test.ts +18 -0
- package/components/Resource/Detail/Metadata/Labels/composable.ts +12 -0
- package/components/Resource/Detail/Metadata/Labels/index.vue +27 -0
- package/components/Resource/Detail/Metadata/Rectangle.vue +32 -0
- package/components/Resource/Detail/Metadata/__tests__/KeyValue.test.ts +107 -0
- package/components/Resource/Detail/Metadata/__tests__/Rectangle.test.ts +24 -0
- package/components/Resource/Detail/Metadata/__tests__/index.test.ts +91 -0
- package/components/Resource/Detail/Metadata/composables.ts +29 -0
- package/components/Resource/Detail/Metadata/index.vue +66 -0
- package/components/Resource/Detail/Page.vue +22 -0
- package/components/Resource/Detail/PercentageBar.vue +40 -0
- package/components/Resource/Detail/ResourceRow.vue +119 -0
- package/components/Resource/Detail/SpacedRow.vue +14 -0
- package/components/Resource/Detail/StatusBar.vue +59 -0
- package/components/Resource/Detail/StatusRow.vue +61 -0
- package/components/Resource/Detail/TitleBar/Title.vue +13 -0
- package/components/Resource/Detail/TitleBar/Top.vue +14 -0
- package/components/Resource/Detail/TitleBar/__tests__/Title.test.ts +17 -0
- package/components/Resource/Detail/TitleBar/__tests__/Top.test.ts +17 -0
- package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +142 -0
- package/components/Resource/Detail/TitleBar/composable.ts +31 -0
- package/components/Resource/Detail/TitleBar/index.vue +124 -0
- package/components/Resource/Detail/Top/index.vue +34 -0
- package/components/Resource/Detail/__tests__/Page.test.ts +32 -0
- package/components/ResourceDetail/__tests__/index.test.ts +114 -0
- package/components/ResourceDetail/index.vue +64 -562
- package/components/ResourceDetail/legacy.vue +545 -0
- package/components/ResourceTable.vue +41 -7
- package/components/SlideInPanelManager.vue +76 -8
- package/components/SortableTable/index.vue +13 -2
- package/components/SortableTable/selection.js +21 -8
- package/components/StatusBadge.vue +6 -4
- package/components/SubtleLink.vue +25 -0
- package/components/Wizard.vue +12 -1
- package/components/YamlEditor.vue +1 -1
- package/components/__tests__/FilterPanel.test.ts +81 -0
- package/components/auth/AuthBanner.vue +2 -3
- package/components/auth/RoleDetailEdit.vue +45 -3
- package/components/auth/login/oidc.vue +6 -1
- package/components/fleet/FleetApplications.vue +181 -0
- package/components/fleet/FleetHelmOps.vue +115 -0
- package/components/fleet/FleetIntro.vue +58 -28
- package/components/fleet/FleetNoWorkspaces.vue +5 -1
- package/components/fleet/FleetOCIStorageSecret.vue +171 -0
- package/components/fleet/FleetRepos.vue +38 -76
- package/components/fleet/FleetResources.vue +50 -22
- package/components/fleet/FleetSummary.vue +26 -51
- package/components/fleet/__tests__/FleetOCIStorageSecret.test.ts +213 -0
- package/components/fleet/__tests__/FleetSummary.test.ts +39 -39
- package/components/fleet/dashboard/Empty.vue +73 -0
- package/components/fleet/dashboard/ResourceCard.vue +183 -0
- package/components/fleet/dashboard/ResourceCardSummary.vue +199 -0
- package/components/fleet/dashboard/ResourceDetails.vue +196 -0
- package/components/fleet/dashboard/ResourcePanel.vue +376 -0
- package/components/form/ArrayList.vue +6 -0
- package/components/form/SimpleSecretSelector.vue +8 -2
- package/components/form/ValueFromResource.vue +31 -19
- package/components/formatter/FleetApplicationClustersReady.vue +77 -0
- package/components/formatter/FleetApplicationSource.vue +71 -0
- package/components/formatter/FleetSummaryGraph.vue +7 -0
- package/components/nav/Header.vue +8 -7
- package/components/nav/TopLevelMenu.helper.ts +55 -34
- package/components/nav/TopLevelMenu.vue +11 -0
- package/components/nav/Type.vue +4 -1
- package/composables/useI18n.ts +12 -11
- package/config/labels-annotations.js +14 -11
- package/config/product/auth.js +1 -0
- package/config/product/fleet.js +70 -17
- package/config/query-params.js +3 -1
- package/config/roles.ts +1 -0
- package/config/router/routes.js +20 -2
- package/config/secret.ts +15 -0
- package/config/settings.ts +3 -2
- package/config/table-headers.js +52 -22
- package/config/types.js +2 -0
- package/core/plugin-helpers.ts +3 -2
- package/detail/fleet.cattle.io.cluster.vue +28 -15
- package/detail/fleet.cattle.io.gitrepo.vue +10 -1
- package/detail/fleet.cattle.io.helmop.vue +157 -0
- package/dialog/HelmOpForceUpdateDialog.vue +132 -0
- package/dialog/RedeployWorkloadDialog.vue +164 -0
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +56 -67
- package/edit/auth/oidc.vue +159 -93
- package/edit/fleet.cattle.io.gitrepo.vue +26 -33
- package/edit/fleet.cattle.io.helmop.vue +997 -0
- package/edit/management.cattle.io.fleetworkspace.vue +43 -10
- package/list/fleet.cattle.io.gitrepo.vue +1 -1
- package/list/fleet.cattle.io.helmop.vue +108 -0
- package/list/namespace.vue +5 -2
- package/mixins/auth-config.js +8 -1
- package/mixins/preset.js +100 -0
- package/mixins/resource-fetch-api-pagination.js +2 -0
- package/mixins/resource-fetch.js +1 -1
- package/mixins/resource-table-watch.js +45 -0
- package/models/__tests__/chart.test.ts +273 -0
- package/models/__tests__/fleet.cattle.io.gitrepo.test.ts +1 -1
- package/models/chart.js +144 -2
- package/models/fleet-application.js +385 -0
- package/models/fleet.cattle.io.bundle.js +9 -8
- package/models/fleet.cattle.io.gitrepo.js +41 -365
- package/models/fleet.cattle.io.helmop.js +228 -0
- package/models/management.cattle.io.authconfig.js +1 -0
- package/models/management.cattle.io.fleetworkspace.js +12 -0
- package/models/workload.js +14 -18
- package/package.json +2 -1
- package/pages/auth/verify.vue +13 -1
- package/pages/c/_cluster/apps/charts/AddRepoLink.vue +37 -0
- package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +80 -0
- package/pages/c/_cluster/apps/charts/AppChartCardSubHeader.vue +54 -0
- package/pages/c/_cluster/apps/charts/StatusLabel.vue +33 -0
- package/pages/c/_cluster/apps/charts/index.vue +302 -484
- package/pages/c/_cluster/explorer/EventsTable.vue +1 -1
- package/pages/c/_cluster/fleet/__tests__/index.test.ts +426 -0
- package/pages/c/_cluster/fleet/application/_resource/_id.vue +14 -0
- package/pages/c/_cluster/fleet/application/_resource/create.vue +14 -0
- package/pages/c/_cluster/fleet/application/create.vue +340 -0
- package/pages/c/_cluster/fleet/application/index.vue +139 -0
- package/pages/c/_cluster/fleet/graph/config.js +277 -0
- package/pages/c/_cluster/fleet/index.vue +772 -330
- package/pages/explorer/resource/detail/configmap.vue +19 -0
- package/plugins/dashboard-store/actions.js +31 -9
- package/plugins/dashboard-store/getters.js +34 -21
- package/plugins/dashboard-store/mutations.js +51 -7
- package/plugins/dashboard-store/resource-class.js +14 -2
- package/plugins/steve/__tests__/subscribe.spec.ts +66 -1
- package/plugins/steve/actions.js +3 -0
- package/plugins/steve/steve-pagination-utils.ts +14 -13
- package/plugins/steve/subscribe.js +229 -42
- package/rancher-components/BadgeState/BadgeState.vue +3 -1
- package/rancher-components/Form/Checkbox/Checkbox.vue +2 -2
- package/rancher-components/RcItemCard/RcItemCard.test.ts +189 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +425 -0
- package/rancher-components/RcItemCard/RcItemCardAction.vue +24 -0
- package/rancher-components/RcItemCard/index.ts +2 -0
- package/store/auth.js +1 -0
- package/store/catalog.js +62 -24
- package/store/index.js +33 -14
- package/store/slideInPanel.ts +6 -0
- package/store/type-map.js +1 -0
- package/types/fleet.d.ts +35 -0
- package/types/resources/settings.d.ts +19 -1
- package/types/shell/index.d.ts +339 -272
- package/types/store/dashboard-store.types.ts +17 -3
- package/types/store/pagination.types.ts +6 -1
- package/types/store/subscribe.types.ts +50 -0
- package/utils/auth.js +32 -3
- package/utils/fleet-types.ts +0 -0
- package/utils/fleet.ts +200 -1
- package/utils/pagination-utils.ts +26 -1
- package/utils/pagination-wrapper.ts +132 -50
- package/utils/settings.ts +4 -1
- package/utils/style.ts +39 -0
- package/utils/validators/formRules/__tests__/index.test.ts +36 -3
- package/utils/validators/formRules/index.ts +10 -3
- package/utils/window.js +11 -7
- package/components/__tests__/ApplicationCard.test.ts +0 -27
- package/components/cards/ApplicationCard.vue +0 -145
- package/components/fleet/ForceDirectedTreeChart/chartIcons.js +0 -17
- package/config/secret.js +0 -14
- package/pages/c/_cluster/fleet/GitRepoGraphConfig.js +0 -249
- /package/{components/form/SSHKnownHosts → dialog}/__tests__/KnownHostsEditDialog.test.ts +0 -0
package/edit/auth/oidc.vue
CHANGED
|
@@ -5,6 +5,7 @@ import AuthConfig from '@shell/mixins/auth-config';
|
|
|
5
5
|
import CruResource from '@shell/components/CruResource';
|
|
6
6
|
import AllowedPrincipals from '@shell/components/auth/AllowedPrincipals';
|
|
7
7
|
import FileSelector from '@shell/components/form/FileSelector';
|
|
8
|
+
import { Banner } from '@components/Banner';
|
|
8
9
|
import AuthBanner from '@shell/components/auth/AuthBanner';
|
|
9
10
|
import AuthProviderWarningBanners from '@shell/edit/auth/AuthProviderWarningBanners';
|
|
10
11
|
import AdvancedSection from '@shell/components/AdvancedSection.vue';
|
|
@@ -13,9 +14,11 @@ import { LabeledInput } from '@components/Form/LabeledInput';
|
|
|
13
14
|
import { RadioGroup } from '@components/Form/Radio';
|
|
14
15
|
import { Checkbox } from '@components/Form/Checkbox';
|
|
15
16
|
import { BASE_SCOPES } from '@shell/store/auth';
|
|
17
|
+
import CopyToClipboardText from '@shell/components/CopyToClipboardText.vue';
|
|
16
18
|
|
|
17
19
|
export default {
|
|
18
20
|
components: {
|
|
21
|
+
Banner,
|
|
19
22
|
Loading,
|
|
20
23
|
CruResource,
|
|
21
24
|
AllowedPrincipals,
|
|
@@ -27,6 +30,7 @@ export default {
|
|
|
27
30
|
LabeledInput,
|
|
28
31
|
RadioGroup,
|
|
29
32
|
Checkbox,
|
|
33
|
+
CopyToClipboardText,
|
|
30
34
|
},
|
|
31
35
|
|
|
32
36
|
mixins: [CreateEditView, AuthConfig],
|
|
@@ -85,7 +89,11 @@ export default {
|
|
|
85
89
|
return false;
|
|
86
90
|
}
|
|
87
91
|
|
|
88
|
-
if (
|
|
92
|
+
if (this.isAmazonCognito) {
|
|
93
|
+
const { issuer } = this.model;
|
|
94
|
+
|
|
95
|
+
return !!(clientId && clientSecret && issuer);
|
|
96
|
+
} else if ( !this.customEndpoint.value ) {
|
|
89
97
|
const { url, realm } = this.oidcUrls;
|
|
90
98
|
|
|
91
99
|
return !!(clientId && clientSecret && url && realm);
|
|
@@ -107,6 +115,20 @@ export default {
|
|
|
107
115
|
*/
|
|
108
116
|
requiredScopes() {
|
|
109
117
|
return this.model.id ? (BASE_SCOPES[this.model.id] || []) ? (BASE_SCOPES[this.model.id] || [])[0].split(' ') : [] : [];
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
requiresCert() {
|
|
121
|
+
// We assume all do, apart from the ones here, which do not
|
|
122
|
+
return !(['cognito'].includes(this.model.id));
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
supportsGroupSearch() {
|
|
126
|
+
// We assume all do, apart from the ones here, which do not
|
|
127
|
+
return !(['cognito'].includes(this.model.id));
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
isAmazonCognito() {
|
|
131
|
+
return this.model?.id === 'cognito';
|
|
110
132
|
}
|
|
111
133
|
},
|
|
112
134
|
|
|
@@ -205,7 +227,9 @@ export default {
|
|
|
205
227
|
<tr><td>{{ t(`authConfig.oidc.rancherUrl`) }}: </td><td>{{ model.rancherUrl }}</td></tr>
|
|
206
228
|
<tr><td>{{ t(`authConfig.oidc.clientId`) }}: </td><td>{{ model.clientId }}</td></tr>
|
|
207
229
|
<tr><td>{{ t(`authConfig.oidc.issuer`) }}: </td><td>{{ model.issuer }}</td></tr>
|
|
208
|
-
<tr
|
|
230
|
+
<tr v-if="model.authEndpoint">
|
|
231
|
+
<td>{{ t(`authConfig.oidc.authEndpoint`) }}: </td><td>{{ model.authEndpoint }}</td>
|
|
232
|
+
</tr>
|
|
209
233
|
</template>
|
|
210
234
|
</AuthBanner>
|
|
211
235
|
|
|
@@ -226,6 +250,25 @@ export default {
|
|
|
226
250
|
|
|
227
251
|
<h3>{{ t(`authConfig.oidc.${NAME}`) }}</h3>
|
|
228
252
|
|
|
253
|
+
<Banner
|
|
254
|
+
v-if="!model.enabled && isAmazonCognito"
|
|
255
|
+
color="info"
|
|
256
|
+
class="mb-20 mt-0"
|
|
257
|
+
data-testid="oidc-cognito-banner"
|
|
258
|
+
>
|
|
259
|
+
<div>
|
|
260
|
+
<div
|
|
261
|
+
v-clean-html="t('authConfig.oidc.cognitoHelp', {}, true)"
|
|
262
|
+
/>
|
|
263
|
+
<div class="mt-10">
|
|
264
|
+
<CopyToClipboardText
|
|
265
|
+
:plain="true"
|
|
266
|
+
:text="model.rancherUrl"
|
|
267
|
+
/>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
</Banner>
|
|
271
|
+
|
|
229
272
|
<!-- Auth credentials -->
|
|
230
273
|
<div class="row mb-20">
|
|
231
274
|
<div class="col span-6">
|
|
@@ -249,7 +292,10 @@ export default {
|
|
|
249
292
|
</div>
|
|
250
293
|
|
|
251
294
|
<!-- Key/Certificate -->
|
|
252
|
-
<div
|
|
295
|
+
<div
|
|
296
|
+
v-if="requiresCert"
|
|
297
|
+
class="row mb-20"
|
|
298
|
+
>
|
|
253
299
|
<div class="col span-6">
|
|
254
300
|
<LabeledInput
|
|
255
301
|
v-model:value="model.privateKey"
|
|
@@ -283,7 +329,10 @@ export default {
|
|
|
283
329
|
</div>
|
|
284
330
|
|
|
285
331
|
<!-- Allow group search -->
|
|
286
|
-
<div
|
|
332
|
+
<div
|
|
333
|
+
v-if="supportsGroupSearch"
|
|
334
|
+
class="row mb-20"
|
|
335
|
+
>
|
|
287
336
|
<div class="col span-6">
|
|
288
337
|
<Checkbox
|
|
289
338
|
v-model:value="model.groupSearchEnabled"
|
|
@@ -309,102 +358,59 @@ export default {
|
|
|
309
358
|
</div>
|
|
310
359
|
</div>
|
|
311
360
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
<div class="
|
|
315
|
-
<
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
<
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
<!-- Generated endpoints -->
|
|
331
|
-
<div class="row mb-20">
|
|
332
|
-
<div class="col span-6">
|
|
333
|
-
<LabeledInput
|
|
334
|
-
v-model:value="oidcUrls.url"
|
|
335
|
-
:label="t(`authConfig.oidc.url`)"
|
|
336
|
-
:mode="mode"
|
|
337
|
-
:required="!customEndpoint.value"
|
|
338
|
-
:disabled="customEndpoint.value"
|
|
339
|
-
data-testid="oidc-url"
|
|
340
|
-
/>
|
|
341
|
-
</div>
|
|
342
|
-
<div class="col span-6">
|
|
343
|
-
<LabeledInput
|
|
344
|
-
v-model:value="oidcUrls.realm"
|
|
345
|
-
:label="t(`authConfig.oidc.realm`)"
|
|
346
|
-
:mode="mode"
|
|
347
|
-
:required="!customEndpoint.value"
|
|
348
|
-
:disabled="customEndpoint.value"
|
|
349
|
-
data-testid="oidc-realm"
|
|
350
|
-
/>
|
|
351
|
-
</div>
|
|
352
|
-
</div>
|
|
353
|
-
|
|
354
|
-
<!-- Specific Endpoints -->
|
|
355
|
-
<div class="row mb-20">
|
|
356
|
-
<div class="col span-6">
|
|
357
|
-
<LabeledInput
|
|
358
|
-
v-model:value="model.rancherUrl"
|
|
359
|
-
:label="t(`authConfig.oidc.rancherUrl`)"
|
|
360
|
-
:mode="mode"
|
|
361
|
-
required
|
|
362
|
-
:disabled="!customEndpoint.value"
|
|
363
|
-
data-testid="oidc-rancher-url"
|
|
364
|
-
/>
|
|
365
|
-
</div>
|
|
366
|
-
</div>
|
|
367
|
-
|
|
368
|
-
<div class="row mb-20">
|
|
369
|
-
<div class="col span-6">
|
|
370
|
-
<LabeledInput
|
|
371
|
-
v-model:value="model.issuer"
|
|
372
|
-
:label="t(`authConfig.oidc.issuer`)"
|
|
373
|
-
:mode="mode"
|
|
374
|
-
required
|
|
375
|
-
:disabled="!customEndpoint.value"
|
|
376
|
-
data-testid="oidc-issuer"
|
|
377
|
-
/>
|
|
378
|
-
</div>
|
|
379
|
-
<div class="col span-6">
|
|
380
|
-
<LabeledInput
|
|
381
|
-
v-model:value="model.authEndpoint"
|
|
382
|
-
:label="t(`authConfig.oidc.authEndpoint`)"
|
|
383
|
-
:mode="mode"
|
|
384
|
-
:disabled="!customEndpoint.value"
|
|
385
|
-
:required="requiresAuthEndpoint"
|
|
386
|
-
data-testid="oidc-auth-endpoint"
|
|
387
|
-
/>
|
|
361
|
+
<template v-if="!isAmazonCognito">
|
|
362
|
+
<!-- Generated vs Specific Endpoints -->
|
|
363
|
+
<div class="row mb-20">
|
|
364
|
+
<div class="col span-6">
|
|
365
|
+
<RadioGroup
|
|
366
|
+
v-model:value="customEndpoint.value"
|
|
367
|
+
name="customEndpoint"
|
|
368
|
+
label-key="authConfig.oidc.customEndpoint.label"
|
|
369
|
+
:labels="customEndpoint.labels"
|
|
370
|
+
:options="customEndpoint.options"
|
|
371
|
+
data-testid="oidc-custom-endpoint"
|
|
372
|
+
>
|
|
373
|
+
<template #label>
|
|
374
|
+
<h4>{{ t('authConfig.oidc.customEndpoint.label') }}</h4>
|
|
375
|
+
</template>
|
|
376
|
+
</RadioGroup>
|
|
377
|
+
</div>
|
|
388
378
|
</div>
|
|
389
|
-
</div>
|
|
390
379
|
|
|
391
|
-
|
|
392
|
-
<AdvancedSection :mode="mode">
|
|
380
|
+
<!-- Generated endpoints -->
|
|
393
381
|
<div class="row mb-20">
|
|
394
382
|
<div class="col span-6">
|
|
395
383
|
<LabeledInput
|
|
396
|
-
v-model:value="
|
|
397
|
-
:label="t(`authConfig.oidc.
|
|
384
|
+
v-model:value="oidcUrls.url"
|
|
385
|
+
:label="t(`authConfig.oidc.url`)"
|
|
398
386
|
:mode="mode"
|
|
399
|
-
:
|
|
387
|
+
:required="!customEndpoint.value"
|
|
388
|
+
:disabled="customEndpoint.value"
|
|
389
|
+
data-testid="oidc-url"
|
|
400
390
|
/>
|
|
401
391
|
</div>
|
|
402
392
|
<div class="col span-6">
|
|
403
393
|
<LabeledInput
|
|
404
|
-
v-model:value="
|
|
405
|
-
:label="t(`authConfig.oidc.
|
|
394
|
+
v-model:value="oidcUrls.realm"
|
|
395
|
+
:label="t(`authConfig.oidc.realm`)"
|
|
406
396
|
:mode="mode"
|
|
397
|
+
:required="!customEndpoint.value"
|
|
398
|
+
:disabled="customEndpoint.value"
|
|
399
|
+
data-testid="oidc-realm"
|
|
400
|
+
/>
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
|
|
404
|
+
<!-- Specific Endpoints -->
|
|
405
|
+
<div class="row mb-20">
|
|
406
|
+
<div class="col span-6">
|
|
407
|
+
<LabeledInput
|
|
408
|
+
v-model:value="model.rancherUrl"
|
|
409
|
+
:label="t(`authConfig.oidc.rancherUrl`)"
|
|
410
|
+
:mode="mode"
|
|
411
|
+
required
|
|
407
412
|
:disabled="!customEndpoint.value"
|
|
413
|
+
data-testid="oidc-rancher-url"
|
|
408
414
|
/>
|
|
409
415
|
</div>
|
|
410
416
|
</div>
|
|
@@ -412,22 +418,82 @@ export default {
|
|
|
412
418
|
<div class="row mb-20">
|
|
413
419
|
<div class="col span-6">
|
|
414
420
|
<LabeledInput
|
|
415
|
-
v-model:value="model.
|
|
416
|
-
:label="t(`authConfig.oidc.
|
|
421
|
+
v-model:value="model.issuer"
|
|
422
|
+
:label="t(`authConfig.oidc.issuer`)"
|
|
417
423
|
:mode="mode"
|
|
424
|
+
required
|
|
418
425
|
:disabled="!customEndpoint.value"
|
|
426
|
+
data-testid="oidc-issuer"
|
|
419
427
|
/>
|
|
420
428
|
</div>
|
|
421
429
|
<div class="col span-6">
|
|
422
430
|
<LabeledInput
|
|
423
|
-
v-model:value="model.
|
|
424
|
-
:label="t(`authConfig.oidc.
|
|
431
|
+
v-model:value="model.authEndpoint"
|
|
432
|
+
:label="t(`authConfig.oidc.authEndpoint`)"
|
|
425
433
|
:mode="mode"
|
|
426
434
|
:disabled="!customEndpoint.value"
|
|
435
|
+
:required="requiresAuthEndpoint"
|
|
436
|
+
data-testid="oidc-auth-endpoint"
|
|
437
|
+
/>
|
|
438
|
+
</div>
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
<!-- Advanced section -->
|
|
442
|
+
<AdvancedSection :mode="mode">
|
|
443
|
+
<div class="row mb-20">
|
|
444
|
+
<div class="col span-6">
|
|
445
|
+
<LabeledInput
|
|
446
|
+
v-model:value="model.jwksUrl"
|
|
447
|
+
:label="t(`authConfig.oidc.jwksUrl`)"
|
|
448
|
+
:mode="mode"
|
|
449
|
+
:disabled="!customEndpoint.value"
|
|
450
|
+
/>
|
|
451
|
+
</div>
|
|
452
|
+
<div class="col span-6">
|
|
453
|
+
<LabeledInput
|
|
454
|
+
v-model:value="model.tokenEndpoint"
|
|
455
|
+
:label="t(`authConfig.oidc.tokenEndpoint`)"
|
|
456
|
+
:mode="mode"
|
|
457
|
+
:disabled="!customEndpoint.value"
|
|
458
|
+
/>
|
|
459
|
+
</div>
|
|
460
|
+
</div>
|
|
461
|
+
|
|
462
|
+
<div class="row mb-20">
|
|
463
|
+
<div class="col span-6">
|
|
464
|
+
<LabeledInput
|
|
465
|
+
v-model:value="model.userInfoEndpoint"
|
|
466
|
+
:label="t(`authConfig.oidc.userInfoEndpoint`)"
|
|
467
|
+
:mode="mode"
|
|
468
|
+
:disabled="!customEndpoint.value"
|
|
469
|
+
/>
|
|
470
|
+
</div>
|
|
471
|
+
<div class="col span-6">
|
|
472
|
+
<LabeledInput
|
|
473
|
+
v-model:value="model.acrValue"
|
|
474
|
+
:label="t(`authConfig.oidc.acrValue`)"
|
|
475
|
+
:mode="mode"
|
|
476
|
+
:disabled="!customEndpoint.value"
|
|
477
|
+
/>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
</AdvancedSection>
|
|
481
|
+
</template>
|
|
482
|
+
|
|
483
|
+
<template v-if="isAmazonCognito">
|
|
484
|
+
<h3>{{ t(`authConfig.oidc.cognitoIssuer`) }}</h3>
|
|
485
|
+
<div class="row mb-20">
|
|
486
|
+
<div class="col span-6">
|
|
487
|
+
<LabeledInput
|
|
488
|
+
v-model:value="model.issuer"
|
|
489
|
+
:label="t(`authConfig.oidc.issuer`)"
|
|
490
|
+
:mode="mode"
|
|
491
|
+
required
|
|
492
|
+
data-testid="oidc-issuer"
|
|
427
493
|
/>
|
|
428
494
|
</div>
|
|
429
495
|
</div>
|
|
430
|
-
</
|
|
496
|
+
</template>
|
|
431
497
|
</template>
|
|
432
498
|
</CruResource>
|
|
433
499
|
</div>
|
|
@@ -28,9 +28,8 @@ import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
|
|
|
28
28
|
import FormValidation from '@shell/mixins/form-validation';
|
|
29
29
|
import UnitInput from '@shell/components/form/UnitInput';
|
|
30
30
|
import { toSeconds } from '@shell/utils/duration';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const DEFAULT_POLLING_INTERVAL = 60;
|
|
31
|
+
import FleetOCIStorageSecret from '@shell/components/fleet/FleetOCIStorageSecret.vue';
|
|
32
|
+
import { DEFAULT_POLLING_INTERVAL, MINIMUM_POLLING_INTERVAL } from '@shell/models/fleet-application';
|
|
34
33
|
|
|
35
34
|
const _VERIFY = 'verify';
|
|
36
35
|
const _SKIP = 'skip';
|
|
@@ -48,6 +47,7 @@ export default {
|
|
|
48
47
|
ArrayList,
|
|
49
48
|
Banner,
|
|
50
49
|
CruResource,
|
|
50
|
+
FleetOCIStorageSecret,
|
|
51
51
|
InputWithSelect,
|
|
52
52
|
Labels,
|
|
53
53
|
LabeledInput,
|
|
@@ -130,7 +130,6 @@ export default {
|
|
|
130
130
|
return {
|
|
131
131
|
allClusters: [],
|
|
132
132
|
allClusterGroups: [],
|
|
133
|
-
allWorkspaces: [],
|
|
134
133
|
tempCachedValues: {},
|
|
135
134
|
username: null,
|
|
136
135
|
password: null,
|
|
@@ -153,7 +152,7 @@ export default {
|
|
|
153
152
|
path: 'spec.repo',
|
|
154
153
|
rules: [
|
|
155
154
|
'required',
|
|
156
|
-
'
|
|
155
|
+
'urlRepository'
|
|
157
156
|
],
|
|
158
157
|
}]
|
|
159
158
|
};
|
|
@@ -215,14 +214,6 @@ export default {
|
|
|
215
214
|
return !(this.value?.spec?.repo || '').startsWith('http://');
|
|
216
215
|
},
|
|
217
216
|
|
|
218
|
-
isPollingEnabled() {
|
|
219
|
-
return !this.value.spec.disablePolling;
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
isWebhookConfigured() {
|
|
223
|
-
return !!this.value.status?.webhookCommit;
|
|
224
|
-
},
|
|
225
|
-
|
|
226
217
|
targetOptions() {
|
|
227
218
|
const out = [
|
|
228
219
|
{
|
|
@@ -279,22 +270,6 @@ export default {
|
|
|
279
270
|
return out;
|
|
280
271
|
},
|
|
281
272
|
|
|
282
|
-
clusterNames() {
|
|
283
|
-
const out = this.allClusters
|
|
284
|
-
.filter((x) => x.metadata.namespace === this.value.metadata.namespace)
|
|
285
|
-
.map((x) => x.metadata.name);
|
|
286
|
-
|
|
287
|
-
return out;
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
clusterGroupNames() {
|
|
291
|
-
const out = this.allClusterGroups
|
|
292
|
-
.filter((x) => x.metadata.namespace === this.value.metadata.namespace)
|
|
293
|
-
.map((x) => x.metadata.name);
|
|
294
|
-
|
|
295
|
-
return out;
|
|
296
|
-
},
|
|
297
|
-
|
|
298
273
|
tlsOptions() {
|
|
299
274
|
return [
|
|
300
275
|
{ label: this.t('fleet.gitRepo.tls.verify'), value: _VERIFY },
|
|
@@ -304,7 +279,7 @@ export default {
|
|
|
304
279
|
},
|
|
305
280
|
|
|
306
281
|
showPollingIntervalWarning() {
|
|
307
|
-
return !this.isView && this.isPollingEnabled && this.pollingInterval < MINIMUM_POLLING_INTERVAL;
|
|
282
|
+
return !this.isView && this.value.isPollingEnabled && this.pollingInterval < MINIMUM_POLLING_INTERVAL;
|
|
308
283
|
},
|
|
309
284
|
},
|
|
310
285
|
|
|
@@ -328,6 +303,10 @@ export default {
|
|
|
328
303
|
this.registerBeforeHook(this.cleanTLS, 'cleanTLS');
|
|
329
304
|
this.registerBeforeHook(this.doCreateSecrets, `registerAuthSecrets${ new Date().getTime() }`, 99);
|
|
330
305
|
this.registerBeforeHook(this.updateBeforeSave);
|
|
306
|
+
|
|
307
|
+
if (this.realMode === _EDIT && this.workspace !== this.value.namespace) {
|
|
308
|
+
this.$store.commit('updateWorkspace', { value: this.value.namespace, getters: this.$store.getters });
|
|
309
|
+
}
|
|
331
310
|
},
|
|
332
311
|
|
|
333
312
|
methods: {
|
|
@@ -750,6 +729,20 @@ export default {
|
|
|
750
729
|
</div>
|
|
751
730
|
</template>
|
|
752
731
|
<div class="spacer" />
|
|
732
|
+
|
|
733
|
+
<h2 v-t="'fleet.gitRepo.ociStorageSecret.title'" />
|
|
734
|
+
<div class="row mt-20">
|
|
735
|
+
<div class="col span-6">
|
|
736
|
+
<FleetOCIStorageSecret
|
|
737
|
+
:secret="value.spec.ociRegistrySecret"
|
|
738
|
+
:workspace="workspace"
|
|
739
|
+
:mode="mode"
|
|
740
|
+
@update:value="value.spec.ociRegistrySecret=$event"
|
|
741
|
+
/>
|
|
742
|
+
</div>
|
|
743
|
+
</div>
|
|
744
|
+
<div class="spacer" />
|
|
745
|
+
|
|
753
746
|
<h2 v-t="'fleet.gitRepo.resources.label'" />
|
|
754
747
|
<div class="resource-handling">
|
|
755
748
|
<Checkbox
|
|
@@ -777,7 +770,7 @@ export default {
|
|
|
777
770
|
<div class="row polling">
|
|
778
771
|
<div class="col span-6">
|
|
779
772
|
<Checkbox
|
|
780
|
-
|
|
773
|
+
:value="value.isPollingEnabled"
|
|
781
774
|
data-testid="gitRepo-enablePolling-checkbox"
|
|
782
775
|
class="check"
|
|
783
776
|
type="checkbox"
|
|
@@ -786,7 +779,7 @@ export default {
|
|
|
786
779
|
@update:value="enablePolling"
|
|
787
780
|
/>
|
|
788
781
|
</div>
|
|
789
|
-
<template v-if="isPollingEnabled">
|
|
782
|
+
<template v-if="value.isPollingEnabled">
|
|
790
783
|
<div class="col">
|
|
791
784
|
<Banner
|
|
792
785
|
v-if="showPollingIntervalWarning"
|
|
@@ -795,7 +788,7 @@ export default {
|
|
|
795
788
|
data-testid="gitRepo-pollingInterval-minimumValueWarning"
|
|
796
789
|
/>
|
|
797
790
|
<Banner
|
|
798
|
-
v-if="isWebhookConfigured"
|
|
791
|
+
v-if="value.isWebhookConfigured"
|
|
799
792
|
color="warning"
|
|
800
793
|
label-key="fleet.gitRepo.polling.pollingInterval.webhookWarning"
|
|
801
794
|
data-testid="gitRepo-pollingInterval-webhookWarning"
|