@rancher/shell 3.0.0-rc.5 → 3.0.0-rc.7
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/translations/en-us.yaml +28 -28
- package/chart/monitoring/alerting/index.vue +4 -20
- package/chart/monitoring/grafana/index.vue +3 -3
- package/chart/monitoring/prometheus/index.vue +7 -14
- package/cloud-credential/aws.vue +20 -17
- package/cloud-credential/azure.vue +21 -20
- package/cloud-credential/digitalocean.vue +11 -5
- package/cloud-credential/gcp.vue +15 -6
- package/cloud-credential/linode.vue +14 -5
- package/cloud-credential/pnap.vue +19 -9
- package/cloud-credential/s3.vue +17 -31
- package/cloud-credential/vmwarevsphere.vue +23 -15
- package/components/ExplorerProjectsNamespaces.vue +4 -4
- package/components/ResourceDetail/index.vue +5 -1
- package/components/form/PodAffinity.vue +1 -1
- package/components/nav/Header.vue +59 -5
- package/components/nav/HeaderPageActionMenu.vue +5 -1
- package/core/types.ts +1 -1
- package/edit/auth/googleoauth.vue +2 -2
- package/edit/auth/ldap/config.vue +2 -2
- package/edit/auth/oidc.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +4 -5
- package/edit/catalog.cattle.io.clusterrepo.vue +1 -1
- package/edit/cloudcredential.vue +11 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +1 -5
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +1 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +1 -5
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +7 -5
- package/edit/provisioning.cattle.io.cluster/rke2.vue +11 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +1 -1
- package/edit/service.vue +6 -15
- package/mixins/create-edit-view/impl.js +2 -0
- package/mixins/labeled-form-element.ts +2 -0
- package/mixins/vue-select-overrides.js +1 -0
- package/package.json +1 -1
- package/plugins/global-formatters.js +1 -1
- package/scripts/typegen.sh +25 -22
- package/types/shell/index.d.ts +4553 -0
- package/utils/cluster.js +1 -1
- package/utils/v-sphere.ts +254 -0
- package/vue.config.js +2 -0
|
@@ -360,8 +360,8 @@ addClusterMemberDialog:
|
|
|
360
360
|
title: Add Cluster Member
|
|
361
361
|
|
|
362
362
|
addonConfigConfirmation:
|
|
363
|
-
title: Add-On
|
|
364
|
-
body: Changing the Kubernetes Version can reset
|
|
363
|
+
title: Add-On Reset
|
|
364
|
+
body: Changing the Kubernetes Version can reset Add-On values. You should check that the values are as expected before continuing.
|
|
365
365
|
|
|
366
366
|
addProjectMemberDialog:
|
|
367
367
|
title: Add Project Member
|
|
@@ -1071,8 +1071,8 @@ catalog:
|
|
|
1071
1071
|
placeholder: 'e.g. https://charts.rancher.io'
|
|
1072
1072
|
oci:
|
|
1073
1073
|
urlLabel: OCI Repository Host URL
|
|
1074
|
-
placeholder: 'e.g. oci
|
|
1075
|
-
info:
|
|
1074
|
+
placeholder: 'e.g. oci://<registry-host>/<namespace>/<chart-name>:<tag>'
|
|
1075
|
+
info: Add OCI URLs that contain ONLY helm charts. For large repositories containing many charts consider targeting a specific namespace or chart to improve performance, for example with oci://<registry-host>/<namespace> or oci://<registry-host>/<namespace>/<chart-name>. The list of charts available from the repository is updated every 6 hours.
|
|
1076
1076
|
skipTlsVerifications: Skip TLS Verifications
|
|
1077
1077
|
insecurePlainHttp: Insecure Plain Http
|
|
1078
1078
|
exponentialBackOff:
|
|
@@ -1194,38 +1194,38 @@ cluster:
|
|
|
1194
1194
|
<code>Cluster Management > Advanced > JWT Authentication</code>"
|
|
1195
1195
|
addonChart:
|
|
1196
1196
|
rancher-vsphere-cpi:
|
|
1197
|
-
label: vSphere CPI
|
|
1198
|
-
configuration: vSphere CPI
|
|
1197
|
+
label: "Add-on: vSphere CPI"
|
|
1198
|
+
configuration: vSphere CPI
|
|
1199
1199
|
rancher-vsphere-csi:
|
|
1200
|
-
label: vSphere CSI
|
|
1201
|
-
configuration: vSphere CSI
|
|
1200
|
+
label: "Add-on: vSphere CSI"
|
|
1201
|
+
configuration: vSphere CSI
|
|
1202
1202
|
rke2-calico:
|
|
1203
|
-
label: Calico
|
|
1204
|
-
configuration: Calico
|
|
1203
|
+
label: "Add-on: Calico"
|
|
1204
|
+
configuration: Calico
|
|
1205
1205
|
rke2-calico-crd:
|
|
1206
|
-
label: Calico
|
|
1207
|
-
configuration: Calico
|
|
1206
|
+
label: "Add-on: Calico"
|
|
1207
|
+
configuration: Calico
|
|
1208
1208
|
rke2-canal:
|
|
1209
|
-
label: Canal
|
|
1210
|
-
configuration: Canal
|
|
1209
|
+
label: "Add-on: Canal"
|
|
1210
|
+
configuration: Canal
|
|
1211
1211
|
rke2-cilium:
|
|
1212
|
-
label: Cilium
|
|
1213
|
-
configuration: Cilium
|
|
1212
|
+
label: "Add-on: Cilium"
|
|
1213
|
+
configuration: Cilium
|
|
1214
1214
|
rke2-coredns:
|
|
1215
|
-
label: CoreDNS
|
|
1216
|
-
configuration: CoreDNS
|
|
1215
|
+
label: "Add-on: CoreDNS"
|
|
1216
|
+
configuration: CoreDNS
|
|
1217
1217
|
rke2-ingress-nginx:
|
|
1218
|
-
label: NGINX
|
|
1219
|
-
configuration: NGINX Ingress
|
|
1218
|
+
label: "Add-on: NGINX"
|
|
1219
|
+
configuration: NGINX Ingress
|
|
1220
1220
|
rke2-kube-proxy:
|
|
1221
|
-
label: Kube Proxy
|
|
1222
|
-
configuration: Kube Proxy
|
|
1221
|
+
label: "Add-on: Kube Proxy"
|
|
1222
|
+
configuration: Kube Proxy
|
|
1223
1223
|
rke2-metrics-server:
|
|
1224
|
-
label: Metrics Server
|
|
1225
|
-
configuration: Metrics Server
|
|
1224
|
+
label: "Add-on: Metrics Server"
|
|
1225
|
+
configuration: Metrics Server
|
|
1226
1226
|
rke2-multus:
|
|
1227
|
-
label: Multus
|
|
1228
|
-
configuration: Multus
|
|
1227
|
+
label: "Add-on: Multus"
|
|
1228
|
+
configuration: Multus
|
|
1229
1229
|
agentEnvVars:
|
|
1230
1230
|
label: Agent Environment
|
|
1231
1231
|
detail: Add additional environment variables to the agent container. This is most commonly useful for configuring a HTTP proxy.
|
|
@@ -1241,7 +1241,7 @@ cluster:
|
|
|
1241
1241
|
label: Google
|
|
1242
1242
|
rancher-vsphere:
|
|
1243
1243
|
label: vSphere
|
|
1244
|
-
note: '<b>Important:</b> Configure the vSphere Cloud Provider and Storage Provider options in the
|
|
1244
|
+
note: '<b>Important:</b> Configure the vSphere Cloud Provider and Storage Provider options in the Add-on tabs.'
|
|
1245
1245
|
harvester:
|
|
1246
1246
|
label: Harvester
|
|
1247
1247
|
copyConfig: Copy KubeConfig to Clipboard
|
|
@@ -1758,7 +1758,7 @@ cluster:
|
|
|
1758
1758
|
serverOs:
|
|
1759
1759
|
label: OS
|
|
1760
1760
|
addOns:
|
|
1761
|
-
dependencyBanner: Add-On
|
|
1761
|
+
dependencyBanner: Add-On Configuration can vary between Kubernetes versions. Changing the Kubernetes version may reset the values below.
|
|
1762
1762
|
additionalManifest:
|
|
1763
1763
|
title: Additional Manifest
|
|
1764
1764
|
tooltip: 'Additional Kubernetes Manifest YAML to be applied to the cluster on startup.'
|
|
@@ -81,27 +81,15 @@ export default {
|
|
|
81
81
|
watch: {
|
|
82
82
|
filteredSecrets(newValue) {
|
|
83
83
|
if (isEmpty(newValue)) {
|
|
84
|
-
this
|
|
85
|
-
this.value.alertmanager.alertmanagerSpec,
|
|
86
|
-
'useExistingSecret',
|
|
87
|
-
false
|
|
88
|
-
);
|
|
84
|
+
this.value.alertmanager.alertmanagerSpec.useExistingSecret = false;
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
const { existingSecret } = this;
|
|
92
88
|
|
|
93
89
|
if (existingSecret) {
|
|
94
90
|
this.$nextTick(() => {
|
|
95
|
-
this
|
|
96
|
-
|
|
97
|
-
'useExistingSecret',
|
|
98
|
-
true
|
|
99
|
-
);
|
|
100
|
-
this.$set(
|
|
101
|
-
this.value.alertmanager.alertmanagerSpec,
|
|
102
|
-
'configSecret',
|
|
103
|
-
existingSecret.metadata.name
|
|
104
|
-
);
|
|
91
|
+
this.value.alertmanager.alertmanagerSpec.useExistingSecret = true;
|
|
92
|
+
this.value.alertmanager.alertmanagerSpec.configSecret = existingSecret.metadata.name;
|
|
105
93
|
});
|
|
106
94
|
}
|
|
107
95
|
},
|
|
@@ -110,11 +98,7 @@ export default {
|
|
|
110
98
|
|
|
111
99
|
if (useExistingSecret) {
|
|
112
100
|
if (existingSecret?.metadata?.name) {
|
|
113
|
-
this
|
|
114
|
-
this.value.alertmanager.alertmanagerSpec,
|
|
115
|
-
'configSecret',
|
|
116
|
-
existingSecret.metadata.name
|
|
117
|
-
);
|
|
101
|
+
this.value.alertmanager.alertmanagerSpec.configSecret = existingSecret.metadata.name;
|
|
118
102
|
}
|
|
119
103
|
} else {
|
|
120
104
|
this.value.alertmanager.alertmanagerSpec['configSecret'] = '';
|
|
@@ -249,7 +249,7 @@ export default {
|
|
|
249
249
|
:mode="mode"
|
|
250
250
|
:options="pvcs"
|
|
251
251
|
:label="t('monitoring.grafana.storage.existingClaim')"
|
|
252
|
-
@updateName="(name) =>
|
|
252
|
+
@updateName="(name) => value.grafana.persistence.existingClaim = name"
|
|
253
253
|
/>
|
|
254
254
|
</div>
|
|
255
255
|
</div>
|
|
@@ -271,7 +271,7 @@ export default {
|
|
|
271
271
|
:mode="mode"
|
|
272
272
|
:options="storageClasses"
|
|
273
273
|
:label="t('monitoring.prometheus.storage.className')"
|
|
274
|
-
@updateName="(name) =>
|
|
274
|
+
@updateName="(name) => value.grafana.persistence.storageClassName = name"
|
|
275
275
|
/>
|
|
276
276
|
</div>
|
|
277
277
|
</div>
|
|
@@ -338,7 +338,7 @@ export default {
|
|
|
338
338
|
:mode="mode"
|
|
339
339
|
:options="storageClasses"
|
|
340
340
|
:label="t('monitoring.prometheus.storage.className')"
|
|
341
|
-
@updateName="(name) =>
|
|
341
|
+
@updateName="(name) => value.grafana.persistence.storageClassName = name"
|
|
342
342
|
/>
|
|
343
343
|
</div>
|
|
344
344
|
</div>
|
|
@@ -123,21 +123,14 @@ export default {
|
|
|
123
123
|
watch: {
|
|
124
124
|
enablePersistentStorage(enabled) {
|
|
125
125
|
if (!!enabled) {
|
|
126
|
-
this
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
spec: {
|
|
131
|
-
accessModes: ['ReadWriteOnce'],
|
|
132
|
-
resources: { requests: { storage: '50Gi' } },
|
|
133
|
-
}
|
|
126
|
+
this.value.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate = {
|
|
127
|
+
spec: {
|
|
128
|
+
accessModes: ['ReadWriteOnce'],
|
|
129
|
+
resources: { requests: { storage: '50Gi' } },
|
|
134
130
|
}
|
|
135
|
-
|
|
131
|
+
};
|
|
136
132
|
} else {
|
|
137
|
-
this
|
|
138
|
-
this.value.prometheus.prometheusSpec.storageSpec,
|
|
139
|
-
'volumeClaimTemplate'
|
|
140
|
-
);
|
|
133
|
+
delete this.value.prometheus.prometheusSpec.storageSpec['volumeClaimTemplate'];
|
|
141
134
|
}
|
|
142
135
|
},
|
|
143
136
|
},
|
|
@@ -328,7 +321,7 @@ export default {
|
|
|
328
321
|
:options="storageClasses"
|
|
329
322
|
:value="value.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.storageClassName"
|
|
330
323
|
:label="t('monitoring.prometheus.storage.className')"
|
|
331
|
-
@updateName="(name) =>
|
|
324
|
+
@updateName="(name) => value.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.storageClassName = name"
|
|
332
325
|
/>
|
|
333
326
|
</div>
|
|
334
327
|
</div>
|
package/cloud-credential/aws.vue
CHANGED
|
@@ -3,14 +3,15 @@ import Loading from '@shell/components/Loading';
|
|
|
3
3
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
4
4
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
5
5
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
6
|
+
import FormValidation from '@shell/mixins/form-validation';
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
|
-
emits: ['validationChanged'],
|
|
9
|
+
emits: ['validationChanged', 'valueChanged'],
|
|
9
10
|
|
|
10
11
|
components: {
|
|
11
12
|
Loading, LabeledInput, LabeledSelect
|
|
12
13
|
},
|
|
13
|
-
mixins: [CreateEditView],
|
|
14
|
+
mixins: [CreateEditView, FormValidation],
|
|
14
15
|
|
|
15
16
|
async fetch() {
|
|
16
17
|
let cur = (this.value.decodedData.defaultRegion || '').toLowerCase();
|
|
@@ -28,21 +29,19 @@ export default {
|
|
|
28
29
|
},
|
|
29
30
|
|
|
30
31
|
data() {
|
|
31
|
-
return {
|
|
32
|
+
return {
|
|
33
|
+
knownRegions: null,
|
|
34
|
+
fvFormRuleSets: [
|
|
35
|
+
{ path: 'decodedData.accessKey', rules: ['required'] },
|
|
36
|
+
{ path: 'decodedData.secretKey', rules: ['required'] },
|
|
37
|
+
]
|
|
38
|
+
};
|
|
32
39
|
},
|
|
33
40
|
|
|
34
41
|
watch: {
|
|
35
|
-
|
|
36
|
-
this.$emit('validationChanged', !!
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
'value.decodedData.secretKey'(neu) {
|
|
40
|
-
this.$emit('validationChanged', !!neu);
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
'value.decodedData.defaultRegion'(neu) {
|
|
44
|
-
this.$emit('validationChanged', !!neu);
|
|
45
|
-
},
|
|
42
|
+
fvFormIsValid(newValue) {
|
|
43
|
+
this.$emit('validationChanged', !!newValue);
|
|
44
|
+
}
|
|
46
45
|
},
|
|
47
46
|
|
|
48
47
|
methods: {
|
|
@@ -76,8 +75,10 @@ export default {
|
|
|
76
75
|
label-key="cluster.credential.aws.accessKey.label"
|
|
77
76
|
placeholder-key="cluster.credential.aws.accessKey.placeholder"
|
|
78
77
|
type="text"
|
|
78
|
+
:rules="fvGetAndReportPathRules('decodedData.accessKey')"
|
|
79
79
|
:mode="mode"
|
|
80
|
-
|
|
80
|
+
:required="true"
|
|
81
|
+
@update:value="$emit('valueChanged', 'accessKey', $event)"
|
|
81
82
|
/>
|
|
82
83
|
<LabeledInput
|
|
83
84
|
:value="value.decodedData.secretKey"
|
|
@@ -85,8 +86,10 @@ export default {
|
|
|
85
86
|
label-key="cluster.credential.aws.secretKey.label"
|
|
86
87
|
placeholder-key="cluster.credential.aws.secretKey.placeholder"
|
|
87
88
|
type="password"
|
|
89
|
+
:rules="fvGetAndReportPathRules('decodedData.secretKey')"
|
|
88
90
|
:mode="mode"
|
|
89
|
-
|
|
91
|
+
:required="true"
|
|
92
|
+
@update:value="$emit('valueChanged', 'secretKey', $event)"
|
|
90
93
|
/>
|
|
91
94
|
<LabeledSelect
|
|
92
95
|
:value="value.decodedData.defaultRegion"
|
|
@@ -96,7 +99,7 @@ export default {
|
|
|
96
99
|
:mode="mode"
|
|
97
100
|
:taggable="true"
|
|
98
101
|
:options="knownRegions"
|
|
99
|
-
@update:value="
|
|
102
|
+
@update:value="$emit('valueChanged', 'defaultRegion', $event)"
|
|
100
103
|
/>
|
|
101
104
|
<p
|
|
102
105
|
v-clean-html="t('cluster.credential.aws.defaultRegion.help', {}, true)"
|
|
@@ -4,34 +4,33 @@ import { LabeledInput } from '@components/Form/LabeledInput';
|
|
|
4
4
|
import { azureEnvironments } from '@shell/machine-config/azure';
|
|
5
5
|
import { parseAzureError } from '@shell/utils/azure';
|
|
6
6
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
7
|
+
import FormValidation from '@shell/mixins/form-validation';
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
|
-
emits: ['validationChanged'],
|
|
10
|
+
emits: ['validationChanged', 'valueChanged'],
|
|
10
11
|
|
|
11
12
|
components: { LabeledInput, LabeledSelect },
|
|
12
|
-
mixins: [CreateEditView],
|
|
13
|
+
mixins: [CreateEditView, FormValidation],
|
|
13
14
|
|
|
14
15
|
data() {
|
|
15
16
|
if ( !this.value.decodedData.environment ) {
|
|
16
17
|
this.value.setData('environment', 'AzurePublicCloud');
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
return {
|
|
20
|
+
return {
|
|
21
|
+
azureEnvironments,
|
|
22
|
+
fvFormRuleSets: [
|
|
23
|
+
{ path: 'decodedData.clientId', rules: ['required'] },
|
|
24
|
+
{ path: 'decodedData.clientSecret', rules: ['required'] },
|
|
25
|
+
{ path: 'decodedData.subscriptionId', rules: ['required'] },
|
|
26
|
+
]
|
|
27
|
+
};
|
|
20
28
|
},
|
|
21
29
|
|
|
22
30
|
watch: {
|
|
23
|
-
|
|
24
|
-
this.$emit('validationChanged', !!
|
|
25
|
-
}
|
|
26
|
-
'value.decodedData.clientSecret'(neu) {
|
|
27
|
-
this.$emit('validationChanged', !!neu);
|
|
28
|
-
},
|
|
29
|
-
'value.decodedData.subscriptionId'(neu) {
|
|
30
|
-
this.$emit('validationChanged', !!neu);
|
|
31
|
-
},
|
|
32
|
-
'value.decodedData.environment'(neu) {
|
|
33
|
-
this.$emit('validationChanged', !!neu);
|
|
34
|
-
},
|
|
31
|
+
fvFormIsValid(newValue) {
|
|
32
|
+
this.$emit('validationChanged', !!newValue);
|
|
33
|
+
}
|
|
35
34
|
},
|
|
36
35
|
|
|
37
36
|
methods: {
|
|
@@ -85,10 +84,9 @@ export default {
|
|
|
85
84
|
option-key="value"
|
|
86
85
|
option-label="value"
|
|
87
86
|
:searchable="false"
|
|
88
|
-
:required="true"
|
|
89
87
|
:label="t('cluster.credential.azure.environment.label')"
|
|
90
88
|
data-testid="azure-cloud-credentials-environment"
|
|
91
|
-
@update:value="
|
|
89
|
+
@update:value="$emit('valueChanged', 'environment', $event)"
|
|
92
90
|
/>
|
|
93
91
|
</div>
|
|
94
92
|
<div class="col span-6">
|
|
@@ -98,8 +96,9 @@ export default {
|
|
|
98
96
|
type="text"
|
|
99
97
|
:mode="mode"
|
|
100
98
|
:required="true"
|
|
99
|
+
:rules="fvGetAndReportPathRules('decodedData.subscriptionId')"
|
|
101
100
|
data-testid="azure-cloud-credentials-subscription-id"
|
|
102
|
-
@update:value="
|
|
101
|
+
@update:value="$emit('valueChanged', 'subscriptionId', $event)"
|
|
103
102
|
/>
|
|
104
103
|
</div>
|
|
105
104
|
</div>
|
|
@@ -111,8 +110,9 @@ export default {
|
|
|
111
110
|
type="text"
|
|
112
111
|
:mode="mode"
|
|
113
112
|
:required="true"
|
|
113
|
+
:rules="fvGetAndReportPathRules('decodedData.clientId')"
|
|
114
114
|
data-testid="azure-cloud-credentials-client-id"
|
|
115
|
-
@update:value="
|
|
115
|
+
@update:value="$emit('valueChanged', 'clientId', $event)"
|
|
116
116
|
/>
|
|
117
117
|
</div>
|
|
118
118
|
<div class="col span-6">
|
|
@@ -122,8 +122,9 @@ export default {
|
|
|
122
122
|
type="password"
|
|
123
123
|
:mode="mode"
|
|
124
124
|
:required="true"
|
|
125
|
+
:rules="fvGetAndReportPathRules('decodedData.clientSecret')"
|
|
125
126
|
data-testid="azure-cloud-credentials-client-secret"
|
|
126
|
-
@update:value="
|
|
127
|
+
@update:value="$emit('valueChanged', 'clientSecret', $event)"
|
|
127
128
|
/>
|
|
128
129
|
</div>
|
|
129
130
|
</div>
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
3
3
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
4
|
+
import FormValidation from '@shell/mixins/form-validation';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
|
-
emits: ['validationChanged'],
|
|
7
|
+
emits: ['validationChanged', 'valueChanged'],
|
|
7
8
|
|
|
8
9
|
components: { LabeledInput },
|
|
9
|
-
mixins: [CreateEditView],
|
|
10
|
+
mixins: [CreateEditView, FormValidation],
|
|
10
11
|
|
|
12
|
+
data() {
|
|
13
|
+
return { fvFormRuleSets: [{ path: 'decodedData.accessToken', rules: ['required'] }] };
|
|
14
|
+
},
|
|
11
15
|
watch: {
|
|
12
|
-
|
|
13
|
-
this.$emit('validationChanged', !!
|
|
16
|
+
fvFormIsValid(newValue) {
|
|
17
|
+
this.$emit('validationChanged', !!newValue);
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
|
|
@@ -39,7 +43,9 @@ export default {
|
|
|
39
43
|
placeholder-key="cluster.credential.digitalocean.accessToken.placeholder"
|
|
40
44
|
type="password"
|
|
41
45
|
:mode="mode"
|
|
42
|
-
|
|
46
|
+
:required="true"
|
|
47
|
+
:rules="fvGetAndReportPathRules('decodedData.accessToken')"
|
|
48
|
+
@update:value="$emit('valueChanged', 'accessToken', $event)"
|
|
43
49
|
/>
|
|
44
50
|
<p
|
|
45
51
|
v-clean-html="t('cluster.credential.digitalocean.accessToken.help', {}, true)"
|
package/cloud-credential/gcp.vue
CHANGED
|
@@ -2,22 +2,29 @@
|
|
|
2
2
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
3
3
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
4
4
|
import FileSelector from '@shell/components/form/FileSelector';
|
|
5
|
+
import FormValidation from '@shell/mixins/form-validation';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
emits: ['validationChanged'],
|
|
8
|
+
emits: ['validationChanged', 'valueChanged'],
|
|
8
9
|
|
|
9
10
|
components: { LabeledInput, FileSelector },
|
|
10
|
-
mixins: [CreateEditView],
|
|
11
|
+
mixins: [CreateEditView, FormValidation],
|
|
11
12
|
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
fvFormRuleSets: [
|
|
16
|
+
{ path: 'decodedData.authEncodedJson', rules: ['required'] }]
|
|
17
|
+
};
|
|
18
|
+
},
|
|
12
19
|
watch: {
|
|
13
|
-
|
|
14
|
-
this.$emit('validationChanged', !!
|
|
20
|
+
fvFormIsValid(newValue) {
|
|
21
|
+
this.$emit('validationChanged', !!newValue);
|
|
15
22
|
}
|
|
16
23
|
},
|
|
17
24
|
|
|
18
25
|
methods: {
|
|
19
26
|
onFileSelected(data) {
|
|
20
|
-
this
|
|
27
|
+
this.$emit('valueChanged', 'authEncodedJson', data);
|
|
21
28
|
},
|
|
22
29
|
|
|
23
30
|
async test() {
|
|
@@ -58,7 +65,9 @@ export default {
|
|
|
58
65
|
placeholder-key="cluster.credential.gcp.authEncodedJson.placeholder"
|
|
59
66
|
type="multiline"
|
|
60
67
|
:mode="mode"
|
|
61
|
-
|
|
68
|
+
:required="true"
|
|
69
|
+
:rules="fvGetAndReportPathRules('decodedData.authEncodedJson')"
|
|
70
|
+
@update:value="$emit('valueChanged', 'authEncodedJson', $event)"
|
|
62
71
|
/>
|
|
63
72
|
<FileSelector
|
|
64
73
|
class="role-primary btn-sm mt-20 mb-20"
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
3
3
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
4
|
+
import FormValidation from '@shell/mixins/form-validation';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
|
-
emits: ['validationChanged'],
|
|
7
|
+
emits: ['validationChanged', 'valueChanged'],
|
|
7
8
|
|
|
8
9
|
components: { LabeledInput },
|
|
9
|
-
mixins: [CreateEditView],
|
|
10
|
+
mixins: [CreateEditView, FormValidation],
|
|
10
11
|
|
|
12
|
+
data() {
|
|
13
|
+
return {
|
|
14
|
+
fvFormRuleSets: [
|
|
15
|
+
{ path: 'decodedData.token', rules: ['required'] }]
|
|
16
|
+
};
|
|
17
|
+
},
|
|
11
18
|
watch: {
|
|
12
|
-
|
|
13
|
-
this.$emit('validationChanged', !!
|
|
19
|
+
fvFormIsValid(newValue) {
|
|
20
|
+
this.$emit('validationChanged', !!newValue);
|
|
14
21
|
}
|
|
15
22
|
},
|
|
16
23
|
|
|
@@ -39,7 +46,9 @@ export default {
|
|
|
39
46
|
placeholder-key="cluster.credential.linode.accessToken.placeholder"
|
|
40
47
|
type="password"
|
|
41
48
|
:mode="mode"
|
|
42
|
-
|
|
49
|
+
:required="true"
|
|
50
|
+
:rules="fvGetAndReportPathRules('decodedData.token')"
|
|
51
|
+
@update:value="$emit('valueChanged', 'token', $event)"
|
|
43
52
|
/>
|
|
44
53
|
<p
|
|
45
54
|
v-clean-html="t('cluster.credential.linode.accessToken.help', {}, true)"
|
|
@@ -2,19 +2,25 @@
|
|
|
2
2
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
3
3
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
4
4
|
import { base64Encode } from '@shell/utils/crypto';
|
|
5
|
+
import FormValidation from '@shell/mixins/form-validation';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
emits: ['validationChanged'],
|
|
8
|
+
emits: ['validationChanged', 'valueChanged'],
|
|
8
9
|
|
|
9
10
|
components: { LabeledInput },
|
|
10
|
-
mixins: [CreateEditView],
|
|
11
|
+
mixins: [CreateEditView, FormValidation],
|
|
11
12
|
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
fvFormRuleSets: [
|
|
16
|
+
{ path: 'decodedData.clientIdentifier', rules: ['required'] },
|
|
17
|
+
{ path: 'decodedData.clientSecret', rules: ['required'] }
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
},
|
|
12
21
|
watch: {
|
|
13
|
-
|
|
14
|
-
this.$emit('validationChanged', !!
|
|
15
|
-
},
|
|
16
|
-
'value.decodedData.clientSecret'(neu) {
|
|
17
|
-
this.$emit('validationChanged', !!neu);
|
|
22
|
+
fvFormIsValid(newValue) {
|
|
23
|
+
this.$emit('validationChanged', !!newValue);
|
|
18
24
|
}
|
|
19
25
|
},
|
|
20
26
|
|
|
@@ -58,7 +64,9 @@ export default {
|
|
|
58
64
|
placeholder-key="cluster.credential.pnap.clientIdentifier.placeholder"
|
|
59
65
|
type="text"
|
|
60
66
|
:mode="mode"
|
|
61
|
-
|
|
67
|
+
:required="true"
|
|
68
|
+
:rules="fvGetAndReportPathRules('decodedData.clientIdentifier')"
|
|
69
|
+
@update:value="$emit('valueChanged', 'clientIdentifier', $event)"
|
|
62
70
|
/>
|
|
63
71
|
</div>
|
|
64
72
|
<div class="col span-6">
|
|
@@ -68,7 +76,9 @@ export default {
|
|
|
68
76
|
placeholder-key="cluster.credential.pnap.clientSecret.placeholder"
|
|
69
77
|
type="text"
|
|
70
78
|
:mode="mode"
|
|
71
|
-
|
|
79
|
+
:required="true"
|
|
80
|
+
:rules="fvGetAndReportPathRules('decodedData.clientSecret')"
|
|
81
|
+
@update:value="$emit('valueChanged', 'clientSecret', $event)"
|
|
72
82
|
/>
|
|
73
83
|
</div>
|
|
74
84
|
</div>
|
package/cloud-credential/s3.vue
CHANGED
|
@@ -4,14 +4,15 @@ import CreateEditView from '@shell/mixins/create-edit-view';
|
|
|
4
4
|
import { Checkbox } from '@components/Form/Checkbox';
|
|
5
5
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
6
6
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
7
|
+
import FormValidation from '@shell/mixins/form-validation';
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
|
-
emits: ['validationChanged'],
|
|
10
|
+
emits: ['validationChanged', 'valueChanged'],
|
|
10
11
|
|
|
11
12
|
components: {
|
|
12
13
|
Loading, Checkbox, LabeledInput, LabeledSelect
|
|
13
14
|
},
|
|
14
|
-
mixins: [CreateEditView],
|
|
15
|
+
mixins: [CreateEditView, FormValidation],
|
|
15
16
|
|
|
16
17
|
async fetch() {
|
|
17
18
|
let cur = (this.value.decodedData.defaultRegion || '').toLowerCase();
|
|
@@ -29,35 +30,18 @@ export default {
|
|
|
29
30
|
},
|
|
30
31
|
|
|
31
32
|
data() {
|
|
32
|
-
return {
|
|
33
|
+
return {
|
|
34
|
+
knownRegions: null,
|
|
35
|
+
fvFormRuleSets: [
|
|
36
|
+
{ path: 'decodedData.accessKey', rules: ['required'] },
|
|
37
|
+
{ path: 'decodedData.secretKey', rules: ['required'] }]
|
|
38
|
+
};
|
|
33
39
|
},
|
|
34
|
-
|
|
35
40
|
watch: {
|
|
36
|
-
|
|
37
|
-
this.$emit('validationChanged', !!
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
this.$emit('validationChanged', !!neu);
|
|
41
|
-
},
|
|
42
|
-
'value.decodedData.defaultBucket'(neu) {
|
|
43
|
-
this.$emit('validationChanged', !!neu);
|
|
44
|
-
},
|
|
45
|
-
'value.decodedData.defaultFolder'(neu) {
|
|
46
|
-
this.$emit('validationChanged', !!neu);
|
|
47
|
-
},
|
|
48
|
-
'value.decodedData.defaultRegion'(neu) {
|
|
49
|
-
this.$emit('validationChanged', !!neu);
|
|
50
|
-
},
|
|
51
|
-
'value.decodedData.defaultEndpointCA'(neu) {
|
|
52
|
-
this.$emit('validationChanged', !!neu);
|
|
53
|
-
},
|
|
54
|
-
'value.decodedData.defaultEndpoint'(neu) {
|
|
55
|
-
this.$emit('validationChanged', !!neu);
|
|
56
|
-
},
|
|
57
|
-
'value.decodedData.defaulSkipSSLVerify'(neu) {
|
|
58
|
-
this.$emit('validationChanged', !!neu);
|
|
59
|
-
},
|
|
60
|
-
},
|
|
41
|
+
fvFormIsValid(newValue) {
|
|
42
|
+
this.$emit('validationChanged', !!newValue);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
61
45
|
};
|
|
62
46
|
</script>
|
|
63
47
|
|
|
@@ -76,7 +60,8 @@ export default {
|
|
|
76
60
|
placeholder-key="cluster.credential.s3.accessKey.placeholder"
|
|
77
61
|
type="text"
|
|
78
62
|
:mode="mode"
|
|
79
|
-
|
|
63
|
+
:rules="fvGetAndReportPathRules('decodedData.accessKey')"
|
|
64
|
+
@update:value="$emit('valueChanged', 'accessKey', $event)"
|
|
80
65
|
/>
|
|
81
66
|
</div>
|
|
82
67
|
<div class="col span-6">
|
|
@@ -87,7 +72,8 @@ export default {
|
|
|
87
72
|
placeholder-key="cluster.credential.s3.secretKey.placeholder"
|
|
88
73
|
type="password"
|
|
89
74
|
:mode="mode"
|
|
90
|
-
|
|
75
|
+
:rules="fvGetAndReportPathRules('decodedData.secretKey')"
|
|
76
|
+
@update:value="$emit('valueChanged', 'secretKey', $event)"
|
|
91
77
|
/>
|
|
92
78
|
</div>
|
|
93
79
|
</div>
|