@rancher/shell 3.0.9-rc.5 → 3.0.9
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/IconOrSvg.vue +61 -42
- 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/SortableTable/index.vue +2 -2
- 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/BannerSettings.vue +2 -2
- package/components/form/NodeScheduling.vue +81 -7
- package/components/form/NotificationSettings.vue +2 -2
- 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/product/manager.js +0 -1
- 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/fleet.cattle.io.cluster.vue +1 -1
- package/detail/workload/index.vue +11 -16
- package/dialog/DeactivateDriverDialog.vue +1 -1
- package/dialog/FeatureFlagListDialog.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/monitoring.coreos.com.alertmanagerconfig/__tests__/auth.spec.ts +145 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/__tests__/index.test.ts +202 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/__tests__/tls.spec.ts +226 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +24 -21
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/__tests__/opsgenie.spec.ts +157 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/__tests__/pagerduty.spec.ts +132 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/__tests__/slack.spec.ts +108 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +2 -1
- package/edit/monitoring.coreos.com.receiver/__tests__/auth.spec.ts +165 -0
- package/edit/monitoring.coreos.com.receiver/__tests__/index.test.ts +153 -0
- package/edit/monitoring.coreos.com.receiver/__tests__/tls.spec.ts +115 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/email.spec.ts +86 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/opsgenie.spec.ts +209 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/pagerduty.spec.ts +105 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/slack.spec.ts +92 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/webhook.spec.ts +131 -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 +114 -0
- package/edit/provisioning.cattle.io.cluster/ingress/IngressConfiguration.vue +158 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +167 -69
- 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 +70 -7
- package/edit/provisioning.cattle.io.cluster/tabs/Ingress.vue +343 -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__/chart.test.ts +2 -2
- 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/chart.js +3 -3
- 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/AppChartCardFooter.vue +45 -18
- package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +4 -1
- package/pages/c/_cluster/apps/charts/index.vue +82 -3
- package/pages/c/_cluster/apps/charts/install.vue +317 -42
- package/pages/c/_cluster/explorer/tools/index.vue +1 -1
- package/pages/c/_cluster/manager/cloudCredential/index.vue +1 -1
- package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +5 -4
- package/pages/c/_cluster/settings/index.vue +3 -1
- package/pages/c/_cluster/uiplugins/index.vue +1 -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 +72 -20
- 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 +537 -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/utils/svg-filter.js +4 -3
- package/components/__tests__/ProjectRow.test.ts +0 -206
- package/components/form/ResourceQuota/ProjectRow.vue +0 -277
|
@@ -14,23 +14,19 @@ import CreateEditView from '@shell/mixins/create-edit-view';
|
|
|
14
14
|
import CruResource from '@shell/components/CruResource';
|
|
15
15
|
import Loading from '@shell/components/Loading';
|
|
16
16
|
import FormValidation from '@shell/mixins/form-validation';
|
|
17
|
-
import Labels from '@shell/components/form/Labels';
|
|
18
17
|
import NameNsDescription from '@shell/components/form/NameNsDescription';
|
|
19
|
-
|
|
20
|
-
import LabeledInput from '@components/Form/LabeledInput/LabeledInput.vue';
|
|
21
|
-
import Banner from '@components/Banner/Banner.vue';
|
|
22
|
-
import ButtonGroup from '@shell/components/ButtonGroup';
|
|
23
|
-
import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
|
|
24
|
-
import YamlEditor, { EDITOR_MODES } from '@shell/components/YamlEditor';
|
|
25
|
-
import SelectOrCreateAuthSecret from '@shell/components/form/SelectOrCreateAuthSecret';
|
|
18
|
+
|
|
26
19
|
import { mapPref, DIFF } from '@shell/store/prefs';
|
|
27
20
|
import { SECRET_TYPES } from '@shell/config/secret';
|
|
28
|
-
import UnitInput from '@shell/components/form/UnitInput';
|
|
29
|
-
import FleetClusterTargets from '@shell/components/fleet/FleetClusterTargets/index.vue';
|
|
30
21
|
import { toSeconds } from '@shell/utils/duration';
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
22
|
+
import { EDITOR_MODES } from '@shell/components/YamlEditor';
|
|
23
|
+
import Tab from '@shell/components/Tabbed/Tab.vue';
|
|
24
|
+
import Tabbed from '@shell/components/Tabbed/index.vue';
|
|
25
|
+
import HelmOpMetadataTab from '@shell/components/fleet/HelmOpMetadataTab.vue';
|
|
26
|
+
import HelmOpChartTab from '@shell/components/fleet/HelmOpChartTab.vue';
|
|
27
|
+
import HelmOpValuesTab from '@shell/components/fleet/HelmOpValuesTab.vue';
|
|
28
|
+
import HelmOpTargetTab from '@shell/components/fleet/HelmOpTargetTab.vue';
|
|
29
|
+
import HelmOpAdvancedTab from '@shell/components/fleet/HelmOpAdvancedTab.vue';
|
|
34
30
|
|
|
35
31
|
const MINIMUM_POLLING_INTERVAL = 15;
|
|
36
32
|
|
|
@@ -47,22 +43,16 @@ export default {
|
|
|
47
43
|
emits: ['input'],
|
|
48
44
|
|
|
49
45
|
components: {
|
|
50
|
-
Banner,
|
|
51
|
-
ButtonGroup,
|
|
52
|
-
Checkbox,
|
|
53
46
|
CruResource,
|
|
54
|
-
FleetClusterTargets,
|
|
55
|
-
FleetConfigMapSelector,
|
|
56
|
-
FleetSecretSelector,
|
|
57
|
-
FleetValuesFrom,
|
|
58
|
-
YamlEditor,
|
|
59
|
-
LabeledInput,
|
|
60
|
-
LabeledSelect,
|
|
61
|
-
Labels,
|
|
62
47
|
Loading,
|
|
63
48
|
NameNsDescription,
|
|
64
|
-
|
|
65
|
-
|
|
49
|
+
Tabbed,
|
|
50
|
+
Tab,
|
|
51
|
+
HelmOpMetadataTab,
|
|
52
|
+
HelmOpChartTab,
|
|
53
|
+
HelmOpValuesTab,
|
|
54
|
+
HelmOpTargetTab,
|
|
55
|
+
HelmOpAdvancedTab,
|
|
66
56
|
},
|
|
67
57
|
|
|
68
58
|
mixins: [CreateEditView, FormValidation],
|
|
@@ -256,6 +246,7 @@ export default {
|
|
|
256
246
|
|
|
257
247
|
methods: {
|
|
258
248
|
onSourceTypeSelect(type) {
|
|
249
|
+
this.sourceType = type;
|
|
259
250
|
delete this.value.spec.helm.repo;
|
|
260
251
|
delete this.value.spec.helm.chart;
|
|
261
252
|
delete this.value.spec.helm.version;
|
|
@@ -285,6 +276,12 @@ export default {
|
|
|
285
276
|
},
|
|
286
277
|
|
|
287
278
|
updatePollingInterval(value) {
|
|
279
|
+
this.pollingInterval = value;
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
validatePollingInterval() {
|
|
283
|
+
const value = this.pollingInterval;
|
|
284
|
+
|
|
288
285
|
if (value) {
|
|
289
286
|
this.value.spec.pollingInterval = this.durationSeconds(value);
|
|
290
287
|
} else {
|
|
@@ -479,7 +476,7 @@ export default {
|
|
|
479
476
|
:subtypes="[]"
|
|
480
477
|
:validation-passed="true"
|
|
481
478
|
:errors="errors"
|
|
482
|
-
:steps="steps"
|
|
479
|
+
:steps="!isView ? steps : undefined"
|
|
483
480
|
:finish-mode="'finish'"
|
|
484
481
|
class="wizard"
|
|
485
482
|
@cancel="done"
|
|
@@ -487,340 +484,201 @@ export default {
|
|
|
487
484
|
@finish="save"
|
|
488
485
|
>
|
|
489
486
|
<template #basics>
|
|
490
|
-
<
|
|
491
|
-
v-if="!isView"
|
|
487
|
+
<HelmOpMetadataTab
|
|
492
488
|
:value="value"
|
|
493
|
-
:namespaced="false"
|
|
494
489
|
:mode="mode"
|
|
490
|
+
:is-view="isView"
|
|
495
491
|
@update:value="$emit('input', $event)"
|
|
496
492
|
/>
|
|
497
|
-
<Labels
|
|
498
|
-
:value="value"
|
|
499
|
-
:mode="mode"
|
|
500
|
-
:display-side-by-side="false"
|
|
501
|
-
:add-icon="'icon-plus'"
|
|
502
|
-
/>
|
|
503
493
|
</template>
|
|
504
494
|
|
|
505
495
|
<template #chart>
|
|
506
|
-
<
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
/>
|
|
516
|
-
</div>
|
|
517
|
-
</div>
|
|
518
|
-
|
|
519
|
-
<h2 v-t="'fleet.helmOp.source.title'" />
|
|
520
|
-
|
|
521
|
-
<div
|
|
522
|
-
v-if="!isView"
|
|
523
|
-
class="row mb-20"
|
|
524
|
-
>
|
|
525
|
-
<div class="col span-6">
|
|
526
|
-
<LabeledSelect
|
|
527
|
-
v-model:value="sourceType"
|
|
528
|
-
:options="sourceTypeOptions"
|
|
529
|
-
option-key="value"
|
|
530
|
-
:mode="mode"
|
|
531
|
-
:selectable="option => !option.disabled"
|
|
532
|
-
:label="t('fleet.helmOp.source.selectLabel')"
|
|
533
|
-
@update:value="onSourceTypeSelect"
|
|
534
|
-
/>
|
|
535
|
-
</div>
|
|
536
|
-
</div>
|
|
537
|
-
|
|
538
|
-
<template v-if="sourceType === SOURCE_TYPE.TARBALL">
|
|
539
|
-
<div class="row mb-20">
|
|
540
|
-
<div class="col span-6">
|
|
541
|
-
<LabeledInput
|
|
542
|
-
v-model:value="value.spec.helm.chart"
|
|
543
|
-
:mode="mode"
|
|
544
|
-
label-key="fleet.helmOp.source.tarball.label"
|
|
545
|
-
:placeholder="t('fleet.helmOp.source.tarball.placeholder', null, true)"
|
|
546
|
-
:rules="fvGetAndReportPathRules('spec.helm.chart')"
|
|
547
|
-
:required="true"
|
|
548
|
-
/>
|
|
549
|
-
</div>
|
|
550
|
-
</div>
|
|
551
|
-
</template>
|
|
552
|
-
|
|
553
|
-
<template v-if="sourceType === SOURCE_TYPE.REPO">
|
|
554
|
-
<div class="row mb-20">
|
|
555
|
-
<div class="col span-6">
|
|
556
|
-
<LabeledInput
|
|
557
|
-
v-model:value="value.spec.helm.repo"
|
|
558
|
-
:mode="mode"
|
|
559
|
-
:label-key="`fleet.helmOp.source.${ sourceType }.repo.label`"
|
|
560
|
-
:placeholder="t(`fleet.helmOp.source.${ sourceType }.repo.placeholder`, null, true)"
|
|
561
|
-
:rules="fvGetAndReportPathRules('spec.helm.repo')"
|
|
562
|
-
:required="true"
|
|
563
|
-
/>
|
|
564
|
-
</div>
|
|
565
|
-
</div>
|
|
566
|
-
|
|
567
|
-
<div class="row mb-20">
|
|
568
|
-
<div class="col span-6">
|
|
569
|
-
<LabeledInput
|
|
570
|
-
v-model:value="value.spec.helm.chart"
|
|
571
|
-
:mode="mode"
|
|
572
|
-
:label-key="`fleet.helmOp.source.${ sourceType }.chart.label`"
|
|
573
|
-
:placeholder="t(`fleet.helmOp.source.${ sourceType }.chart.placeholder`, null, true)"
|
|
574
|
-
:rules="fvGetAndReportPathRules('spec.helm.chart')"
|
|
575
|
-
:required="true"
|
|
576
|
-
/>
|
|
577
|
-
</div>
|
|
578
|
-
<div class="col span-4">
|
|
579
|
-
<LabeledInput
|
|
580
|
-
v-model:value="value.spec.helm.version"
|
|
581
|
-
:mode="mode"
|
|
582
|
-
label-key="fleet.helmOp.source.version.label"
|
|
583
|
-
:placeholder="t('fleet.helmOp.source.version.placeholder', null, true)"
|
|
584
|
-
:rules="fvGetAndReportPathRules('spec.helm.version')"
|
|
585
|
-
/>
|
|
586
|
-
</div>
|
|
587
|
-
</div>
|
|
588
|
-
</template>
|
|
589
|
-
|
|
590
|
-
<template v-if="sourceType === SOURCE_TYPE.OCI">
|
|
591
|
-
<div class="row mb-20">
|
|
592
|
-
<div class="col span-6">
|
|
593
|
-
<LabeledInput
|
|
594
|
-
v-model:value="value.spec.helm.repo"
|
|
595
|
-
:mode="mode"
|
|
596
|
-
:label-key="`fleet.helmOp.source.${ sourceType }.chart.label`"
|
|
597
|
-
:placeholder="t(`fleet.helmOp.source.${ sourceType }.chart.placeholder`, null, true)"
|
|
598
|
-
:rules="fvGetAndReportPathRules('spec.helm.repo')"
|
|
599
|
-
:required="true"
|
|
600
|
-
/>
|
|
601
|
-
</div>
|
|
602
|
-
<div class="col span-4">
|
|
603
|
-
<LabeledInput
|
|
604
|
-
v-model:value="value.spec.helm.version"
|
|
605
|
-
:mode="mode"
|
|
606
|
-
label-key="fleet.helmOp.source.version.label"
|
|
607
|
-
:placeholder="t('fleet.helmOp.source.version.placeholder', null, true)"
|
|
608
|
-
:rules="fvGetAndReportPathRules('spec.helm.version')"
|
|
609
|
-
/>
|
|
610
|
-
</div>
|
|
611
|
-
</div>
|
|
612
|
-
</template>
|
|
496
|
+
<HelmOpChartTab
|
|
497
|
+
:value="value"
|
|
498
|
+
:mode="mode"
|
|
499
|
+
:is-view="isView"
|
|
500
|
+
:source-type="sourceType"
|
|
501
|
+
:source-type-options="sourceTypeOptions"
|
|
502
|
+
:fv-get-and-report-path-rules="fvGetAndReportPathRules"
|
|
503
|
+
@update:source-type="onSourceTypeSelect"
|
|
504
|
+
/>
|
|
613
505
|
</template>
|
|
614
506
|
|
|
615
507
|
<template #values>
|
|
616
|
-
<
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
508
|
+
<HelmOpValuesTab
|
|
509
|
+
:value="value"
|
|
510
|
+
:mode="mode"
|
|
511
|
+
:real-mode="realMode"
|
|
512
|
+
:is-view="isView"
|
|
513
|
+
:chart-values="chartValues"
|
|
514
|
+
:chart-values-init="chartValuesInit"
|
|
515
|
+
:yaml-form="yamlForm"
|
|
516
|
+
:yaml-form-options="yamlFormOptions"
|
|
517
|
+
:yaml-diff-mode-options="yamlDiffModeOptions"
|
|
518
|
+
:is-yaml-diff="isYamlDiff"
|
|
519
|
+
:editor-mode="editorMode"
|
|
520
|
+
:diff-mode="diffMode"
|
|
521
|
+
:is-real-mode-edit="isRealModeEdit"
|
|
522
|
+
@update:yaml-form="updateYamlForm"
|
|
523
|
+
@update:chart-values="updateChartValues"
|
|
524
|
+
@update:diff-mode="diffMode = $event"
|
|
620
525
|
/>
|
|
621
|
-
|
|
622
|
-
<h2 v-t="'fleet.helmOp.values.title'" />
|
|
623
|
-
|
|
624
|
-
<div class="mb-15">
|
|
625
|
-
<div
|
|
626
|
-
v-if="isRealModeEdit"
|
|
627
|
-
class="yaml-form-controls"
|
|
628
|
-
>
|
|
629
|
-
<ButtonGroup
|
|
630
|
-
v-model:value="yamlForm"
|
|
631
|
-
inactive-class="bg-disabled btn-sm"
|
|
632
|
-
active-class="bg-primary btn-sm"
|
|
633
|
-
:options="yamlFormOptions"
|
|
634
|
-
@update:value="updateYamlForm"
|
|
635
|
-
/>
|
|
636
|
-
<div
|
|
637
|
-
class="yaml-form-controls-spacer"
|
|
638
|
-
style="flex:1"
|
|
639
|
-
>
|
|
640
|
-
|
|
641
|
-
</div>
|
|
642
|
-
<ButtonGroup
|
|
643
|
-
v-if="isYamlDiff"
|
|
644
|
-
v-model:value="diffMode"
|
|
645
|
-
:options="yamlDiffModeOptions"
|
|
646
|
-
inactive-class="bg-disabled btn-sm"
|
|
647
|
-
active-class="bg-primary btn-sm"
|
|
648
|
-
/>
|
|
649
|
-
</div>
|
|
650
|
-
|
|
651
|
-
<YamlEditor
|
|
652
|
-
ref="yaml"
|
|
653
|
-
v-model:value="chartValues"
|
|
654
|
-
:mode="mode"
|
|
655
|
-
:initial-yaml-values="chartValuesInit"
|
|
656
|
-
:scrolling="true"
|
|
657
|
-
:editor-mode="editorMode"
|
|
658
|
-
:hide-preview-buttons="true"
|
|
659
|
-
@update:value="updateChartValues"
|
|
660
|
-
/>
|
|
661
|
-
</div>
|
|
662
|
-
|
|
663
|
-
<div class="mb-20">
|
|
664
|
-
<FleetValuesFrom
|
|
665
|
-
v-model:value="value.spec.helm.valuesFrom"
|
|
666
|
-
:namespace="value.metadata.namespace"
|
|
667
|
-
:mode="realMode"
|
|
668
|
-
/>
|
|
669
|
-
</div>
|
|
670
526
|
</template>
|
|
671
527
|
|
|
672
528
|
<template #target>
|
|
673
|
-
<
|
|
674
|
-
|
|
675
|
-
:
|
|
676
|
-
:
|
|
677
|
-
:
|
|
678
|
-
:
|
|
679
|
-
:
|
|
680
|
-
@
|
|
681
|
-
@created="targetsCreated=$event"
|
|
529
|
+
<HelmOpTargetTab
|
|
530
|
+
:value="value"
|
|
531
|
+
:mode="mode"
|
|
532
|
+
:real-mode="realMode"
|
|
533
|
+
:is-view="isView"
|
|
534
|
+
:targets-created="targetsCreated"
|
|
535
|
+
@update:targets="updateTargets"
|
|
536
|
+
@targets-created="targetsCreated=$event"
|
|
682
537
|
/>
|
|
683
|
-
|
|
684
|
-
<h3 class="mmt-16">
|
|
685
|
-
{{ t('fleet.helmOp.target.additionalOptions') }}
|
|
686
|
-
</h3>
|
|
687
|
-
<div class="row mt-20">
|
|
688
|
-
<div class="col span-6">
|
|
689
|
-
<LabeledInput
|
|
690
|
-
v-model:value="value.spec.serviceAccount"
|
|
691
|
-
:mode="mode"
|
|
692
|
-
label-key="fleet.helmOp.serviceAccount.label"
|
|
693
|
-
placeholder-key="fleet.helmOp.serviceAccount.placeholder"
|
|
694
|
-
/>
|
|
695
|
-
</div>
|
|
696
|
-
<div class="col span-6">
|
|
697
|
-
<LabeledInput
|
|
698
|
-
v-model:value="value.spec.namespace"
|
|
699
|
-
:mode="mode"
|
|
700
|
-
label-key="fleet.helmOp.targetNamespace.label"
|
|
701
|
-
placeholder-key="fleet.helmOp.targetNamespace.placeholder"
|
|
702
|
-
label="Target Namespace"
|
|
703
|
-
placeholder="Optional: Require all resources to be in this namespace"
|
|
704
|
-
/>
|
|
705
|
-
</div>
|
|
706
|
-
</div>
|
|
707
538
|
</template>
|
|
708
539
|
|
|
709
540
|
<template #advanced>
|
|
710
|
-
<
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
541
|
+
<HelmOpAdvancedTab
|
|
542
|
+
:value="value"
|
|
543
|
+
:mode="mode"
|
|
544
|
+
:is-view="isView"
|
|
545
|
+
:source-type="sourceType"
|
|
546
|
+
:temp-cached-values="tempCachedValues"
|
|
547
|
+
:correct-drift-enabled="correctDriftEnabled"
|
|
548
|
+
:polling-interval="pollingInterval"
|
|
549
|
+
:is-polling-enabled="isPollingEnabled"
|
|
550
|
+
:show-polling-interval-min-value-warning="showPollingIntervalMinValueWarning"
|
|
551
|
+
:enable-polling-tooltip="enablePollingTooltip"
|
|
552
|
+
:is-null-or-static-version="isNullOrStaticVersion"
|
|
553
|
+
:downstream-secrets-list="downstreamSecretsList"
|
|
554
|
+
:downstream-config-maps-list="downstreamConfigMapsList"
|
|
555
|
+
:register-before-hook="registerBeforeHook"
|
|
556
|
+
@update:auth="updateAuth($event.value, $event.key)"
|
|
557
|
+
@update:cached-auth="updateCachedAuthVal($event.value, $event.key)"
|
|
558
|
+
@update:correct-drift="correctDriftEnabled = $event"
|
|
559
|
+
@update:downstream-resources="updateDownstreamResources($event.kind, $event.list)"
|
|
560
|
+
@toggle-polling="togglePolling"
|
|
561
|
+
@update:polling-interval="updatePollingInterval"
|
|
562
|
+
@update:validate-polling-interval="validatePollingInterval"
|
|
715
563
|
/>
|
|
564
|
+
</template>
|
|
716
565
|
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
:
|
|
723
|
-
:
|
|
724
|
-
in-store="management"
|
|
566
|
+
<template
|
|
567
|
+
v-if="isView && steps.length === 5"
|
|
568
|
+
#single
|
|
569
|
+
>
|
|
570
|
+
<NameNsDescription
|
|
571
|
+
:value="value"
|
|
572
|
+
:namespaced="false"
|
|
725
573
|
:mode="mode"
|
|
726
|
-
|
|
727
|
-
label-key="fleet.helmOp.auth.helm"
|
|
728
|
-
:pre-select="tempCachedValues.helmSecretName"
|
|
729
|
-
:cache-secrets="true"
|
|
730
|
-
:show-ssh-known-hosts="true"
|
|
731
|
-
@update:value="updateAuth($event, 'helmSecretName')"
|
|
732
|
-
@inputauthval="updateCachedAuthVal($event, 'helmSecretName')"
|
|
574
|
+
@update:value="$emit('input', $event)"
|
|
733
575
|
/>
|
|
734
576
|
|
|
735
|
-
<
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
577
|
+
<Tabbed
|
|
578
|
+
v-if="isView"
|
|
579
|
+
:side-tabs="true"
|
|
580
|
+
:use-hash="true"
|
|
581
|
+
>
|
|
582
|
+
<Tab
|
|
583
|
+
v-if="steps[1]"
|
|
584
|
+
:name="steps[1].name"
|
|
585
|
+
:label="steps[1].label"
|
|
586
|
+
:weight="4"
|
|
587
|
+
>
|
|
588
|
+
<HelmOpChartTab
|
|
589
|
+
:value="value"
|
|
741
590
|
:mode="mode"
|
|
591
|
+
:is-view="isView"
|
|
592
|
+
:source-type="sourceType"
|
|
593
|
+
:source-type-options="sourceTypeOptions"
|
|
594
|
+
:fv-get-and-report-path-rules="fvGetAndReportPathRules"
|
|
595
|
+
@update:source-type="onSourceTypeSelect"
|
|
742
596
|
/>
|
|
743
|
-
</
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
<
|
|
751
|
-
:value="
|
|
752
|
-
:namespace="value.metadata.namespace"
|
|
597
|
+
</Tab>
|
|
598
|
+
<Tab
|
|
599
|
+
v-if="steps[2]"
|
|
600
|
+
:name="steps[2].name"
|
|
601
|
+
:label="steps[2].label"
|
|
602
|
+
:weight="3"
|
|
603
|
+
>
|
|
604
|
+
<HelmOpValuesTab
|
|
605
|
+
:value="value"
|
|
753
606
|
:mode="mode"
|
|
754
|
-
|
|
607
|
+
:real-mode="realMode"
|
|
608
|
+
:is-view="isView"
|
|
609
|
+
:chart-values="chartValues"
|
|
610
|
+
:chart-values-init="chartValuesInit"
|
|
611
|
+
:yaml-form="yamlForm"
|
|
612
|
+
:yaml-form-options="yamlFormOptions"
|
|
613
|
+
:yaml-diff-mode-options="yamlDiffModeOptions"
|
|
614
|
+
:is-yaml-diff="isYamlDiff"
|
|
615
|
+
:editor-mode="editorMode"
|
|
616
|
+
:diff-mode="diffMode"
|
|
617
|
+
:is-real-mode-edit="isRealModeEdit"
|
|
618
|
+
@update:yaml-form="updateYamlForm"
|
|
619
|
+
@update:chart-values="updateChartValues"
|
|
620
|
+
@update:diff-mode="diffMode = $event"
|
|
755
621
|
/>
|
|
756
|
-
</
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
622
|
+
</Tab>
|
|
623
|
+
<Tab
|
|
624
|
+
v-if="steps[3]"
|
|
625
|
+
:name="steps[3].name"
|
|
626
|
+
:label="steps[3].label"
|
|
627
|
+
:weight="2"
|
|
628
|
+
>
|
|
629
|
+
<HelmOpTargetTab
|
|
630
|
+
:value="value"
|
|
631
|
+
:mode="mode"
|
|
632
|
+
:real-mode="realMode"
|
|
633
|
+
:is-view="isView"
|
|
634
|
+
:targets-created="targetsCreated"
|
|
635
|
+
@update:targets="updateTargets"
|
|
636
|
+
@targets-created="targetsCreated=$event"
|
|
637
|
+
/>
|
|
638
|
+
</Tab>
|
|
639
|
+
<Tab
|
|
640
|
+
v-if="steps[4]"
|
|
641
|
+
:name="steps[4].name"
|
|
642
|
+
:label="steps[4].label"
|
|
643
|
+
:weight="1"
|
|
644
|
+
>
|
|
645
|
+
<HelmOpAdvancedTab
|
|
646
|
+
:value="value"
|
|
647
|
+
:mode="mode"
|
|
648
|
+
:is-view="isView"
|
|
649
|
+
:source-type="sourceType"
|
|
650
|
+
:temp-cached-values="tempCachedValues"
|
|
651
|
+
:correct-drift-enabled="correctDriftEnabled"
|
|
652
|
+
:polling-interval="pollingInterval"
|
|
653
|
+
:is-polling-enabled="isPollingEnabled"
|
|
654
|
+
:show-polling-interval-min-value-warning="showPollingIntervalMinValueWarning"
|
|
655
|
+
:enable-polling-tooltip="enablePollingTooltip"
|
|
656
|
+
:is-null-or-static-version="isNullOrStaticVersion"
|
|
657
|
+
:downstream-secrets-list="downstreamSecretsList"
|
|
658
|
+
:downstream-config-maps-list="downstreamConfigMapsList"
|
|
659
|
+
:register-before-hook="registerBeforeHook"
|
|
660
|
+
@update:auth="updateAuth($event.value, $event.key)"
|
|
661
|
+
@update:cached-auth="updateCachedAuthVal($event.value, $event.key)"
|
|
662
|
+
@update:correct-drift="correctDriftEnabled = $event"
|
|
663
|
+
@update:downstream-resources="updateDownstreamResources($event.kind, $event.list)"
|
|
664
|
+
@toggle-polling="togglePolling"
|
|
665
|
+
@update:polling-interval="updatePollingInterval"
|
|
666
|
+
@update:validate-polling-interval="validatePollingInterval"
|
|
667
|
+
/>
|
|
668
|
+
</Tab>
|
|
669
|
+
<Tab
|
|
670
|
+
name="labels"
|
|
671
|
+
label-key="generic.labelsAndAnnotations"
|
|
672
|
+
:weight="5"
|
|
673
|
+
>
|
|
674
|
+
<HelmOpMetadataTab
|
|
675
|
+
:value="value"
|
|
763
676
|
:mode="mode"
|
|
764
|
-
|
|
677
|
+
:is-view="isView"
|
|
678
|
+
@update:value="$emit('input', $event)"
|
|
765
679
|
/>
|
|
766
|
-
</
|
|
767
|
-
</
|
|
768
|
-
<div class="resource-handling mb-30">
|
|
769
|
-
<Checkbox
|
|
770
|
-
v-model:value="correctDriftEnabled"
|
|
771
|
-
:tooltip="t('fleet.helmOp.resources.correctDriftTooltip')"
|
|
772
|
-
type="checkbox"
|
|
773
|
-
label-key="fleet.helmOp.resources.correctDrift"
|
|
774
|
-
:mode="mode"
|
|
775
|
-
/>
|
|
776
|
-
<Checkbox
|
|
777
|
-
v-model:value="value.spec.keepResources"
|
|
778
|
-
:tooltip="t('fleet.helmOp.resources.keepResourcesTooltip')"
|
|
779
|
-
type="checkbox"
|
|
780
|
-
label-key="fleet.helmOp.resources.keepResources"
|
|
781
|
-
:mode="mode"
|
|
782
|
-
/>
|
|
783
|
-
</div>
|
|
784
|
-
|
|
785
|
-
<template v-if="sourceType === SOURCE_TYPE.REPO">
|
|
786
|
-
<h2 v-t="'fleet.helmOp.polling.label'" />
|
|
787
|
-
<div class="row polling">
|
|
788
|
-
<div class="col span-6">
|
|
789
|
-
<Checkbox
|
|
790
|
-
:value="isPollingEnabled"
|
|
791
|
-
type="checkbox"
|
|
792
|
-
label-key="fleet.helmOp.polling.enable"
|
|
793
|
-
data-testid="helmOp-enablePolling-checkbox"
|
|
794
|
-
:tooltip="enablePollingTooltip"
|
|
795
|
-
:mode="mode"
|
|
796
|
-
:disabled="isNullOrStaticVersion"
|
|
797
|
-
@update:value="togglePolling"
|
|
798
|
-
/>
|
|
799
|
-
</div>
|
|
800
|
-
<template v-if="isPollingEnabled">
|
|
801
|
-
<div class="col">
|
|
802
|
-
<Banner
|
|
803
|
-
v-if="showPollingIntervalMinValueWarning"
|
|
804
|
-
color="warning"
|
|
805
|
-
label-key="fleet.helmOp.polling.pollingInterval.minimumValueWarning"
|
|
806
|
-
data-testid="helmOp-pollingInterval-minimumValueWarning"
|
|
807
|
-
/>
|
|
808
|
-
</div>
|
|
809
|
-
<div class="col span-6">
|
|
810
|
-
<UnitInput
|
|
811
|
-
v-model:value="pollingInterval"
|
|
812
|
-
min="1"
|
|
813
|
-
data-testid="helmOp-pollingInterval-input"
|
|
814
|
-
:suffix="t('suffix.seconds', { count: pollingInterval })"
|
|
815
|
-
:label="t('fleet.helmOp.polling.pollingInterval.label')"
|
|
816
|
-
:mode="mode"
|
|
817
|
-
tooltip-key="fleet.helmOp.polling.pollingInterval.tooltip"
|
|
818
|
-
@blur.capture="updatePollingInterval(pollingInterval)"
|
|
819
|
-
/>
|
|
820
|
-
</div>
|
|
821
|
-
</template>
|
|
822
|
-
</div>
|
|
823
|
-
</template>
|
|
680
|
+
</Tab>
|
|
681
|
+
</Tabbed>
|
|
824
682
|
</template>
|
|
825
683
|
</CruResource>
|
|
826
684
|
</template>
|
|
@@ -6,7 +6,7 @@ import FormValidation from '@shell/mixins/form-validation';
|
|
|
6
6
|
import CruResource from '@shell/components/CruResource';
|
|
7
7
|
import Labels from '@shell/components/form/Labels';
|
|
8
8
|
import ResourceQuota from '@shell/components/form/ResourceQuota/Project';
|
|
9
|
-
import { HARVESTER_TYPES, RANCHER_TYPES
|
|
9
|
+
import { HARVESTER_TYPES, RANCHER_TYPES } from '@shell/components/form/ResourceQuota/shared';
|
|
10
10
|
import Tab from '@shell/components/Tabbed/Tab';
|
|
11
11
|
import Tabbed from '@shell/components/Tabbed';
|
|
12
12
|
import NameNsDescription from '@shell/components/form/NameNsDescription';
|
|
@@ -49,7 +49,6 @@ export default {
|
|
|
49
49
|
HARVESTER_TYPES,
|
|
50
50
|
RANCHER_TYPES,
|
|
51
51
|
fvFormRuleSets: [{ path: 'spec.displayName', rules: ['required'] }],
|
|
52
|
-
resourceQuotaKey: 0,
|
|
53
52
|
isQuotasValid: true,
|
|
54
53
|
};
|
|
55
54
|
},
|
|
@@ -161,44 +160,9 @@ export default {
|
|
|
161
160
|
this['membershipUpdate'] = update;
|
|
162
161
|
},
|
|
163
162
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
if (isExtended) {
|
|
169
|
-
resourceKey = key.substring(`${ TYPES.EXTENDED }.`.length);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
['resourceQuota', 'namespaceDefaultResourceQuota'].forEach((specProp) => {
|
|
173
|
-
const limit = this.value?.spec[specProp]?.limit;
|
|
174
|
-
const usedLimit = this.value?.spec[specProp]?.usedLimit;
|
|
175
|
-
|
|
176
|
-
if (isExtended) {
|
|
177
|
-
if (limit?.extended && typeof limit.extended[resourceKey] !== 'undefined') {
|
|
178
|
-
delete limit.extended[resourceKey];
|
|
179
|
-
if (Object.keys(limit.extended).length === 0) {
|
|
180
|
-
delete limit.extended;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
if (usedLimit?.extended && typeof usedLimit.extended[resourceKey] !== 'undefined') {
|
|
185
|
-
delete usedLimit.extended[resourceKey];
|
|
186
|
-
if (Object.keys(usedLimit.extended).length === 0) {
|
|
187
|
-
delete usedLimit.extended;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
} else {
|
|
191
|
-
if (limit && typeof limit[resourceKey] !== 'undefined') {
|
|
192
|
-
delete limit[resourceKey];
|
|
193
|
-
}
|
|
194
|
-
if (usedLimit && typeof usedLimit[resourceKey] !== 'undefined') {
|
|
195
|
-
delete usedLimit[resourceKey];
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
// Incrementing the key forces the ResourceQuota component to re-render
|
|
201
|
-
this.resourceQuotaKey++;
|
|
163
|
+
onQuotasInput({ projectLimit, nsLimit }) {
|
|
164
|
+
this.value.spec.resourceQuota = { ...this.value.spec.resourceQuota, limit: projectLimit };
|
|
165
|
+
this.value.spec.namespaceDefaultResourceQuota = { ...this.value.spec.namespaceDefaultResourceQuota, limit: nsLimit };
|
|
202
166
|
}
|
|
203
167
|
},
|
|
204
168
|
};
|
|
@@ -258,11 +222,10 @@ export default {
|
|
|
258
222
|
:weight="9"
|
|
259
223
|
>
|
|
260
224
|
<ResourceQuota
|
|
261
|
-
:key="resourceQuotaKey"
|
|
262
225
|
:value="value"
|
|
263
226
|
:mode="canEditTabElements"
|
|
264
227
|
:types="isStandaloneHarvester ? HARVESTER_TYPES : RANCHER_TYPES"
|
|
265
|
-
@
|
|
228
|
+
@input="onQuotasInput"
|
|
266
229
|
@validationChanged="validateQuotas"
|
|
267
230
|
/>
|
|
268
231
|
</Tab>
|