@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
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useI18n } from '@shell/composables/useI18n';
|
|
3
|
+
import { useStore } from 'vuex';
|
|
4
|
+
import Banner from '@components/Banner/Banner.vue';
|
|
5
|
+
import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
|
|
6
|
+
import SelectOrCreateAuthSecret from '@shell/components/form/SelectOrCreateAuthSecret';
|
|
7
|
+
import UnitInput from '@shell/components/form/UnitInput';
|
|
8
|
+
import FleetSecretSelector from '@shell/components/fleet/FleetSecretSelector.vue';
|
|
9
|
+
import FleetConfigMapSelector from '@shell/components/fleet/FleetConfigMapSelector.vue';
|
|
10
|
+
import { SOURCE_TYPE } from '@shell/config/product/fleet';
|
|
11
|
+
|
|
12
|
+
defineProps({
|
|
13
|
+
value: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
mode: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
isView: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
sourceType: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
tempCachedValues: {
|
|
30
|
+
type: Object,
|
|
31
|
+
required: true
|
|
32
|
+
},
|
|
33
|
+
correctDriftEnabled: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
pollingInterval: {
|
|
38
|
+
type: Number,
|
|
39
|
+
required: false,
|
|
40
|
+
default: undefined
|
|
41
|
+
},
|
|
42
|
+
isPollingEnabled: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
required: true
|
|
45
|
+
},
|
|
46
|
+
showPollingIntervalMinValueWarning: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
required: true
|
|
49
|
+
},
|
|
50
|
+
enablePollingTooltip: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: null
|
|
53
|
+
},
|
|
54
|
+
isNullOrStaticVersion: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
required: true
|
|
57
|
+
},
|
|
58
|
+
downstreamSecretsList: {
|
|
59
|
+
type: Array,
|
|
60
|
+
required: true
|
|
61
|
+
},
|
|
62
|
+
downstreamConfigMapsList: {
|
|
63
|
+
type: Array,
|
|
64
|
+
required: true
|
|
65
|
+
},
|
|
66
|
+
registerBeforeHook: {
|
|
67
|
+
type: Function,
|
|
68
|
+
required: true
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const emit = defineEmits([
|
|
73
|
+
'update:auth',
|
|
74
|
+
'update:cached-auth',
|
|
75
|
+
'update:correct-drift',
|
|
76
|
+
'update:downstream-resources',
|
|
77
|
+
'toggle-polling',
|
|
78
|
+
'update:polling-interval',
|
|
79
|
+
'update:validate-polling-interval',
|
|
80
|
+
]);
|
|
81
|
+
|
|
82
|
+
const store = useStore();
|
|
83
|
+
const { t } = useI18n(store);
|
|
84
|
+
|
|
85
|
+
const updateAuth = (value, key) => {
|
|
86
|
+
emit('update:auth', { value, key });
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const updateCachedAuthVal = (value, key) => {
|
|
90
|
+
emit('update:cached-auth', { value, key });
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const updateCorrectDrift = (value) => {
|
|
94
|
+
emit('update:correct-drift', value);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const updateDownstreamResources = (kind, list) => {
|
|
98
|
+
emit('update:downstream-resources', { kind, list });
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const togglePolling = (value) => {
|
|
102
|
+
emit('toggle-polling', value);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const updatePollingInterval = (value) => {
|
|
106
|
+
emit('update:polling-interval', value);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const validatePollingInterval = () => {
|
|
110
|
+
emit('update:validate-polling-interval');
|
|
111
|
+
};
|
|
112
|
+
</script>
|
|
113
|
+
|
|
114
|
+
<template>
|
|
115
|
+
<div>
|
|
116
|
+
<Banner
|
|
117
|
+
v-if="!isView"
|
|
118
|
+
color="info"
|
|
119
|
+
label-key="fleet.helmOp.add.steps.advanced.info"
|
|
120
|
+
data-testid="helmOp-advanced-info"
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
<h2>{{ t('fleet.helmOp.auth.title') }}</h2>
|
|
124
|
+
|
|
125
|
+
<SelectOrCreateAuthSecret
|
|
126
|
+
:value="value.spec.helmSecretName"
|
|
127
|
+
:register-before-hook="registerBeforeHook"
|
|
128
|
+
:namespace="value.metadata.namespace"
|
|
129
|
+
:delegate-create-to-parent="true"
|
|
130
|
+
in-store="management"
|
|
131
|
+
:mode="mode"
|
|
132
|
+
generate-name="helmrepo-auth-"
|
|
133
|
+
label-key="fleet.helmOp.auth.helm"
|
|
134
|
+
:pre-select="tempCachedValues.helmSecretName"
|
|
135
|
+
:cache-secrets="true"
|
|
136
|
+
:show-ssh-known-hosts="true"
|
|
137
|
+
@update:value="updateAuth($event, 'helmSecretName')"
|
|
138
|
+
@inputauthval="updateCachedAuthVal($event, 'helmSecretName')"
|
|
139
|
+
/>
|
|
140
|
+
|
|
141
|
+
<div class="row mt-20 mb-20">
|
|
142
|
+
<div class="col span-6">
|
|
143
|
+
<Checkbox
|
|
144
|
+
v-model:value="value.spec.insecureSkipTLSVerify"
|
|
145
|
+
type="checkbox"
|
|
146
|
+
label-key="fleet.helmOp.tls.insecure"
|
|
147
|
+
:mode="mode"
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<h2>{{ t('fleet.helmOp.resources.label') }}</h2>
|
|
153
|
+
|
|
154
|
+
<div class="row mt-20 mb-20">
|
|
155
|
+
<div class="col span-6">
|
|
156
|
+
<FleetSecretSelector
|
|
157
|
+
:value="downstreamSecretsList"
|
|
158
|
+
:namespace="value.metadata.namespace"
|
|
159
|
+
:mode="mode"
|
|
160
|
+
@update:value="updateDownstreamResources('Secret', $event)"
|
|
161
|
+
/>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="row mt-20 mb-20">
|
|
165
|
+
<div class="col span-6">
|
|
166
|
+
<FleetConfigMapSelector
|
|
167
|
+
:value="downstreamConfigMapsList"
|
|
168
|
+
:namespace="value.metadata.namespace"
|
|
169
|
+
:mode="mode"
|
|
170
|
+
@update:value="updateDownstreamResources('ConfigMap', $event)"
|
|
171
|
+
/>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
<div class="resource-handling mb-30">
|
|
175
|
+
<Checkbox
|
|
176
|
+
:value="correctDriftEnabled"
|
|
177
|
+
:tooltip="t('fleet.helmOp.resources.correctDriftTooltip')"
|
|
178
|
+
type="checkbox"
|
|
179
|
+
label-key="fleet.helmOp.resources.correctDrift"
|
|
180
|
+
:mode="mode"
|
|
181
|
+
@update:value="updateCorrectDrift"
|
|
182
|
+
/>
|
|
183
|
+
<Checkbox
|
|
184
|
+
v-model:value="value.spec.keepResources"
|
|
185
|
+
:tooltip="t('fleet.helmOp.resources.keepResourcesTooltip')"
|
|
186
|
+
type="checkbox"
|
|
187
|
+
label-key="fleet.helmOp.resources.keepResources"
|
|
188
|
+
:mode="mode"
|
|
189
|
+
/>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<template v-if="sourceType === SOURCE_TYPE.REPO">
|
|
193
|
+
<h2>{{ t('fleet.helmOp.polling.label') }}</h2>
|
|
194
|
+
<div class="row polling">
|
|
195
|
+
<div class="col span-6">
|
|
196
|
+
<Checkbox
|
|
197
|
+
:value="isPollingEnabled"
|
|
198
|
+
type="checkbox"
|
|
199
|
+
label-key="fleet.helmOp.polling.enable"
|
|
200
|
+
data-testid="helmOp-enablePolling-checkbox"
|
|
201
|
+
:tooltip="enablePollingTooltip"
|
|
202
|
+
:mode="mode"
|
|
203
|
+
:disabled="isNullOrStaticVersion"
|
|
204
|
+
@update:value="togglePolling"
|
|
205
|
+
/>
|
|
206
|
+
</div>
|
|
207
|
+
<template v-if="isPollingEnabled">
|
|
208
|
+
<div class="col">
|
|
209
|
+
<Banner
|
|
210
|
+
v-if="showPollingIntervalMinValueWarning"
|
|
211
|
+
color="warning"
|
|
212
|
+
label-key="fleet.helmOp.polling.pollingInterval.minimumValueWarning"
|
|
213
|
+
data-testid="helmOp-pollingInterval-minimumValueWarning"
|
|
214
|
+
/>
|
|
215
|
+
</div>
|
|
216
|
+
<div class="col span-6">
|
|
217
|
+
<UnitInput
|
|
218
|
+
:value="pollingInterval"
|
|
219
|
+
min="1"
|
|
220
|
+
data-testid="helmOp-pollingInterval-input"
|
|
221
|
+
:suffix="t('suffix.seconds', { count: pollingInterval })"
|
|
222
|
+
:label="t('fleet.helmOp.polling.pollingInterval.label')"
|
|
223
|
+
:mode="mode"
|
|
224
|
+
tooltip-key="fleet.helmOp.polling.pollingInterval.tooltip"
|
|
225
|
+
@update:value="updatePollingInterval"
|
|
226
|
+
@blur.capture="validatePollingInterval"
|
|
227
|
+
/>
|
|
228
|
+
</div>
|
|
229
|
+
</template>
|
|
230
|
+
</div>
|
|
231
|
+
</template>
|
|
232
|
+
</div>
|
|
233
|
+
</template>
|
|
234
|
+
|
|
235
|
+
<style lang="scss" scoped>
|
|
236
|
+
.resource-handling {
|
|
237
|
+
display: flex;
|
|
238
|
+
flex-direction: column;
|
|
239
|
+
gap: 5px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.polling {
|
|
243
|
+
display: flex;
|
|
244
|
+
flex-direction: column;
|
|
245
|
+
gap: 5px;
|
|
246
|
+
}
|
|
247
|
+
</style>
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useI18n } from '@shell/composables/useI18n';
|
|
3
|
+
import { useStore } from 'vuex';
|
|
4
|
+
import LabeledInput from '@components/Form/LabeledInput/LabeledInput.vue';
|
|
5
|
+
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
6
|
+
import { SOURCE_TYPE } from '@shell/config/product/fleet';
|
|
7
|
+
|
|
8
|
+
defineProps({
|
|
9
|
+
value: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
mode: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
isView: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
sourceType: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
sourceTypeOptions: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
fvGetAndReportPathRules: {
|
|
30
|
+
type: Function,
|
|
31
|
+
required: true
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const emit = defineEmits(['update:source-type']);
|
|
36
|
+
|
|
37
|
+
const store = useStore();
|
|
38
|
+
const { t } = useI18n(store);
|
|
39
|
+
|
|
40
|
+
const onSourceTypeSelect = (type) => {
|
|
41
|
+
emit('update:source-type', type);
|
|
42
|
+
};
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<div>
|
|
47
|
+
<h2>{{ t('fleet.helmOp.source.release.title') }}</h2>
|
|
48
|
+
|
|
49
|
+
<div class="row mb-20">
|
|
50
|
+
<div class="col span-6">
|
|
51
|
+
<LabeledInput
|
|
52
|
+
v-model:value="value.spec.helm.releaseName"
|
|
53
|
+
:mode="mode"
|
|
54
|
+
:label-key="`fleet.helmOp.source.release.label`"
|
|
55
|
+
:placeholder="t(`fleet.helmOp.source.release.placeholder`, null, true)"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<h2>{{ t('fleet.helmOp.source.title') }}</h2>
|
|
61
|
+
|
|
62
|
+
<div
|
|
63
|
+
v-if="!isView"
|
|
64
|
+
class="row mb-20"
|
|
65
|
+
>
|
|
66
|
+
<div class="col span-6">
|
|
67
|
+
<LabeledSelect
|
|
68
|
+
:value="sourceType"
|
|
69
|
+
:options="sourceTypeOptions"
|
|
70
|
+
option-key="value"
|
|
71
|
+
:mode="mode"
|
|
72
|
+
:selectable="option => !option.disabled"
|
|
73
|
+
:label="t('fleet.helmOp.source.selectLabel')"
|
|
74
|
+
@update:value="onSourceTypeSelect"
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<template v-if="sourceType === SOURCE_TYPE.TARBALL">
|
|
80
|
+
<div class="row mb-20">
|
|
81
|
+
<div class="col span-6">
|
|
82
|
+
<LabeledInput
|
|
83
|
+
v-model:value="value.spec.helm.chart"
|
|
84
|
+
:mode="mode"
|
|
85
|
+
label-key="fleet.helmOp.source.tarball.label"
|
|
86
|
+
:placeholder="t('fleet.helmOp.source.tarball.placeholder', null, true)"
|
|
87
|
+
:rules="fvGetAndReportPathRules('spec.helm.chart')"
|
|
88
|
+
:required="true"
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
|
|
94
|
+
<template v-if="sourceType === SOURCE_TYPE.REPO">
|
|
95
|
+
<div class="row mb-20">
|
|
96
|
+
<div class="col span-6">
|
|
97
|
+
<LabeledInput
|
|
98
|
+
v-model:value="value.spec.helm.repo"
|
|
99
|
+
:mode="mode"
|
|
100
|
+
:label-key="`fleet.helmOp.source.${ sourceType }.repo.label`"
|
|
101
|
+
:placeholder="t(`fleet.helmOp.source.${ sourceType }.repo.placeholder`, null, true)"
|
|
102
|
+
:rules="fvGetAndReportPathRules('spec.helm.repo')"
|
|
103
|
+
:required="true"
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div class="row mb-20">
|
|
109
|
+
<div class="col span-6">
|
|
110
|
+
<LabeledInput
|
|
111
|
+
v-model:value="value.spec.helm.chart"
|
|
112
|
+
:mode="mode"
|
|
113
|
+
:label-key="`fleet.helmOp.source.${ sourceType }.chart.label`"
|
|
114
|
+
:placeholder="t(`fleet.helmOp.source.${ sourceType }.chart.placeholder`, null, true)"
|
|
115
|
+
:rules="fvGetAndReportPathRules('spec.helm.chart')"
|
|
116
|
+
:required="true"
|
|
117
|
+
/>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="col span-4">
|
|
120
|
+
<LabeledInput
|
|
121
|
+
v-model:value="value.spec.helm.version"
|
|
122
|
+
:mode="mode"
|
|
123
|
+
label-key="fleet.helmOp.source.version.label"
|
|
124
|
+
:placeholder="t('fleet.helmOp.source.version.placeholder', null, true)"
|
|
125
|
+
:rules="fvGetAndReportPathRules('spec.helm.version')"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</template>
|
|
130
|
+
|
|
131
|
+
<template v-if="sourceType === SOURCE_TYPE.OCI">
|
|
132
|
+
<div class="row mb-20">
|
|
133
|
+
<div class="col span-6">
|
|
134
|
+
<LabeledInput
|
|
135
|
+
v-model:value="value.spec.helm.repo"
|
|
136
|
+
:mode="mode"
|
|
137
|
+
:label-key="`fleet.helmOp.source.${ sourceType }.chart.label`"
|
|
138
|
+
:placeholder="t(`fleet.helmOp.source.${ sourceType }.chart.placeholder`, null, true)"
|
|
139
|
+
:rules="fvGetAndReportPathRules('spec.helm.repo')"
|
|
140
|
+
:required="true"
|
|
141
|
+
/>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="col span-4">
|
|
144
|
+
<LabeledInput
|
|
145
|
+
v-model:value="value.spec.helm.version"
|
|
146
|
+
:mode="mode"
|
|
147
|
+
label-key="fleet.helmOp.source.version.label"
|
|
148
|
+
:placeholder="t('fleet.helmOp.source.version.placeholder', null, true)"
|
|
149
|
+
:rules="fvGetAndReportPathRules('spec.helm.version')"
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</template>
|
|
154
|
+
</div>
|
|
155
|
+
</template>
|
|
156
|
+
|
|
157
|
+
<style lang="scss" scoped>
|
|
158
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import NameNsDescription from '@shell/components/form/NameNsDescription';
|
|
3
|
+
import Labels from '@shell/components/form/Labels';
|
|
4
|
+
|
|
5
|
+
defineProps({
|
|
6
|
+
value: {
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true
|
|
9
|
+
},
|
|
10
|
+
mode: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
isView: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const emit = defineEmits(['update:value']);
|
|
21
|
+
|
|
22
|
+
const updateValue = (value) => {
|
|
23
|
+
emit('update:value', value);
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div>
|
|
29
|
+
<NameNsDescription
|
|
30
|
+
v-if="!isView"
|
|
31
|
+
:value="value"
|
|
32
|
+
:namespaced="false"
|
|
33
|
+
:mode="mode"
|
|
34
|
+
@update:value="updateValue"
|
|
35
|
+
/>
|
|
36
|
+
<Labels
|
|
37
|
+
:value="value"
|
|
38
|
+
:mode="mode"
|
|
39
|
+
:display-side-by-side="false"
|
|
40
|
+
:add-icon="'icon-plus'"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<style lang="scss" scoped>
|
|
46
|
+
</style>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useI18n } from '@shell/composables/useI18n';
|
|
3
|
+
import { useStore } from 'vuex';
|
|
4
|
+
import LabeledInput from '@components/Form/LabeledInput/LabeledInput.vue';
|
|
5
|
+
import FleetClusterTargets from '@shell/components/fleet/FleetClusterTargets/index.vue';
|
|
6
|
+
|
|
7
|
+
defineProps({
|
|
8
|
+
value: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
mode: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
realMode: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
isView: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
targetsCreated: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ''
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const emit = defineEmits(['update:targets', 'targets-created']);
|
|
31
|
+
|
|
32
|
+
const store = useStore();
|
|
33
|
+
const { t } = useI18n(store);
|
|
34
|
+
|
|
35
|
+
const updateTargets = (value) => {
|
|
36
|
+
emit('update:targets', value);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const onTargetsCreated = (value) => {
|
|
40
|
+
emit('targets-created', value);
|
|
41
|
+
};
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<div>
|
|
46
|
+
<h2>{{ t('fleet.helmOp.target.label') }}</h2>
|
|
47
|
+
<FleetClusterTargets
|
|
48
|
+
:targets="value.spec.targets"
|
|
49
|
+
:matching="value.targetClusters"
|
|
50
|
+
:namespace="value.metadata.namespace"
|
|
51
|
+
:mode="realMode"
|
|
52
|
+
:created="targetsCreated"
|
|
53
|
+
@update:value="updateTargets"
|
|
54
|
+
@created="onTargetsCreated"
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<h3 class="mmt-16">
|
|
58
|
+
{{ t('fleet.helmOp.target.additionalOptions') }}
|
|
59
|
+
</h3>
|
|
60
|
+
<div class="row mt-20">
|
|
61
|
+
<div class="col span-6">
|
|
62
|
+
<LabeledInput
|
|
63
|
+
v-model:value="value.spec.serviceAccount"
|
|
64
|
+
:mode="mode"
|
|
65
|
+
label-key="fleet.helmOp.serviceAccount.label"
|
|
66
|
+
placeholder-key="fleet.helmOp.serviceAccount.placeholder"
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="col span-6">
|
|
70
|
+
<LabeledInput
|
|
71
|
+
v-model:value="value.spec.namespace"
|
|
72
|
+
:mode="mode"
|
|
73
|
+
label-key="fleet.helmOp.targetNamespace.label"
|
|
74
|
+
placeholder-key="fleet.helmOp.targetNamespace.placeholder"
|
|
75
|
+
label="Target Namespace"
|
|
76
|
+
placeholder="Optional: Require all resources to be in this namespace"
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
<style lang="scss" scoped>
|
|
84
|
+
</style>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useI18n } from '@shell/composables/useI18n';
|
|
3
|
+
import { useStore } from 'vuex';
|
|
4
|
+
import Banner from '@components/Banner/Banner.vue';
|
|
5
|
+
import ButtonGroup from '@shell/components/ButtonGroup';
|
|
6
|
+
import YamlEditor from '@shell/components/YamlEditor';
|
|
7
|
+
import FleetValuesFrom from '@shell/components/fleet/FleetValuesFrom.vue';
|
|
8
|
+
|
|
9
|
+
defineProps({
|
|
10
|
+
value: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
mode: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
realMode: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
isView: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
chartValues: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
chartValuesInit: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
yamlForm: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
yamlFormOptions: {
|
|
39
|
+
type: Array,
|
|
40
|
+
required: true
|
|
41
|
+
},
|
|
42
|
+
yamlDiffModeOptions: {
|
|
43
|
+
type: Array,
|
|
44
|
+
required: true
|
|
45
|
+
},
|
|
46
|
+
isYamlDiff: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
required: true
|
|
49
|
+
},
|
|
50
|
+
editorMode: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: true
|
|
53
|
+
},
|
|
54
|
+
diffMode: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: true
|
|
57
|
+
},
|
|
58
|
+
isRealModeEdit: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
required: true
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const emit = defineEmits(['update:yaml-form', 'update:chart-values', 'update:diff-mode']);
|
|
65
|
+
|
|
66
|
+
const store = useStore();
|
|
67
|
+
const { t } = useI18n(store);
|
|
68
|
+
|
|
69
|
+
const updateYamlForm = () => {
|
|
70
|
+
emit('update:yaml-form');
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const updateChartValues = (value) => {
|
|
74
|
+
emit('update:chart-values', value);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const updateDiffMode = (value) => {
|
|
78
|
+
emit('update:diff-mode', value);
|
|
79
|
+
};
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<template>
|
|
83
|
+
<div>
|
|
84
|
+
<Banner
|
|
85
|
+
color="info"
|
|
86
|
+
class="description"
|
|
87
|
+
label-key="fleet.helmOp.values.description"
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
<h2>{{ t('fleet.helmOp.values.title') }}</h2>
|
|
91
|
+
|
|
92
|
+
<div class="mb-15">
|
|
93
|
+
<div
|
|
94
|
+
v-if="isRealModeEdit"
|
|
95
|
+
class="yaml-form-controls"
|
|
96
|
+
>
|
|
97
|
+
<ButtonGroup
|
|
98
|
+
:value="yamlForm"
|
|
99
|
+
inactive-class="bg-disabled btn-sm"
|
|
100
|
+
active-class="bg-primary btn-sm"
|
|
101
|
+
:options="yamlFormOptions"
|
|
102
|
+
@update:value="updateYamlForm"
|
|
103
|
+
/>
|
|
104
|
+
<div
|
|
105
|
+
class="yaml-form-controls-spacer"
|
|
106
|
+
style="flex:1"
|
|
107
|
+
>
|
|
108
|
+
|
|
109
|
+
</div>
|
|
110
|
+
<ButtonGroup
|
|
111
|
+
v-if="isYamlDiff"
|
|
112
|
+
:value="diffMode"
|
|
113
|
+
:options="yamlDiffModeOptions"
|
|
114
|
+
inactive-class="bg-disabled btn-sm"
|
|
115
|
+
active-class="bg-primary btn-sm"
|
|
116
|
+
@update:value="updateDiffMode"
|
|
117
|
+
/>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<YamlEditor
|
|
121
|
+
ref="yaml"
|
|
122
|
+
:value="chartValues"
|
|
123
|
+
:mode="mode"
|
|
124
|
+
:initial-yaml-values="chartValuesInit"
|
|
125
|
+
:scrolling="true"
|
|
126
|
+
:editor-mode="editorMode"
|
|
127
|
+
:hide-preview-buttons="true"
|
|
128
|
+
@update:value="updateChartValues"
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<div class="mb-20">
|
|
133
|
+
<FleetValuesFrom
|
|
134
|
+
:value="value.spec.helm.valuesFrom"
|
|
135
|
+
:namespace="value.metadata.namespace"
|
|
136
|
+
:mode="realMode"
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<style lang="scss" scoped>
|
|
143
|
+
.yaml-form-controls {
|
|
144
|
+
display: flex;
|
|
145
|
+
margin-bottom: 15px;
|
|
146
|
+
}
|
|
147
|
+
</style>
|