@rancher/shell 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/app.scss +1 -1
- package/assets/styles/fonts/_fontstack.scss +11 -11
- package/assets/styles/vendor/vue-js-modal.scss +3 -3
- package/assets/translations/en-us.yaml +92 -22
- package/assets/translations/zh-hans.yaml +84 -15
- package/babel.config.js +13 -0
- package/chart/gatekeeper.vue +77 -0
- package/chart/istio.vue +108 -111
- package/chart/logging/index.vue +13 -4
- package/chart/monitoring/index.vue +15 -5
- package/chart/monitoring/steps/uninstall-v1.vue +2 -2
- package/chart/rancher-backup/index.vue +10 -3
- package/cloud-credential/aws.vue +1 -1
- package/cloud-credential/digitalocean.vue +1 -1
- package/cloud-credential/gcp.vue +1 -1
- package/cloud-credential/generic.vue +2 -2
- package/cloud-credential/linode.vue +1 -1
- package/cloud-credential/pnap.vue +1 -1
- package/components/ActionMenu.vue +3 -4
- package/components/AssignTo.vue +1 -1
- package/components/AsyncButton.vue +1 -1
- package/components/BannerGraphic.vue +1 -1
- package/components/ButtonDropdown.vue +2 -3
- package/components/ChartPsp.vue +76 -0
- package/components/CruResource.vue +6 -2
- package/components/DashboardMetrics.vue +12 -10
- package/components/DetailText.vue +1 -1
- package/components/DisableAuthProviderModal.vue +1 -1
- package/components/EmberPage.vue +1 -1
- package/components/EtcdInfoBanner.vue +5 -4
- package/components/ExplorerMembers.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +14 -1
- package/components/FileDiff.vue +6 -7
- package/components/GrafanaDashboard.vue +18 -21
- package/components/LazyImage.vue +10 -12
- package/components/LogItem.vue +1 -1
- package/components/Markdown.vue +1 -1
- package/components/PromptRemove.vue +2 -2
- package/components/PromptRestore.vue +1 -1
- package/components/ResourceDetail/Masthead.vue +16 -0
- package/components/ResourceDetail/index.vue +21 -4
- package/components/ResourceList/index.vue +1 -1
- package/components/ResourceTable.vue +4 -1
- package/components/SingleClusterInfo.vue +2 -2
- package/components/SortableTable/THead.vue +1 -1
- package/components/SortableTable/index.vue +5 -2
- package/components/__tests__/AsyncButton.test.ts +3 -1
- package/components/__tests__/ChartPsp.test.ts +75 -0
- package/components/__tests__/CruResource.test.ts +3 -1
- package/components/auth/Principal.vue +1 -1
- package/components/fleet/FleetBundles.vue +3 -1
- package/components/fleet/FleetClusters.vue +1 -2
- package/components/fleet/FleetIntro.vue +9 -1
- package/components/fleet/FleetNoWorkspaces.vue +62 -0
- package/components/fleet/FleetSummary.vue +7 -1
- package/components/form/LabeledSelect.vue +14 -11
- package/components/form/MatchExpressions.vue +17 -2
- package/components/form/NameNsDescription.vue +31 -45
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/SecretSelector.vue +5 -1
- package/components/form/ServiceNameSelect.vue +1 -1
- package/components/form/SimpleSecretSelector.vue +9 -9
- package/components/form/__tests__/LabeledSelect.test.ts +138 -0
- package/components/form/__tests__/NameNsDescription.ts +32 -0
- package/components/formatter/InternalExternalIP.vue +6 -0
- package/components/formatter/InvolvedObjectLink.vue +54 -0
- package/components/formatter/Link.vue +20 -4
- package/components/formatter/LinkName.vue +6 -1
- package/components/formatter/ServiceTargets.vue +1 -1
- package/components/nav/Group.vue +2 -2
- package/components/nav/NamespaceFilter.vue +15 -11
- package/components/nav/TopLevelMenu.vue +2 -4
- package/components/nav/Type.vue +1 -1
- package/components/nav/WorkspaceSwitcher.vue +46 -5
- package/config/labels-annotations.js +17 -0
- package/config/product/auth.js +3 -2
- package/config/product/explorer.js +11 -4
- package/config/product/fleet.js +2 -0
- package/config/router.js +414 -0
- package/config/table-headers.js +10 -2
- package/config/types.js +11 -8
- package/config/uiplugins.js +30 -0
- package/content/docs/en-us/whats-new.md +10 -0
- package/content/docs/zh-hans/whats-new.md +11 -1
- package/core/plugin-routes.ts +23 -0
- package/creators/app/app.package.json +2 -1
- package/creators/app/files/.eslintrc.js +1 -1
- package/creators/app/files/babel.config.js +1 -18
- package/creators/app/files/vue.config.js +7 -0
- package/creators/app/init +5 -5
- package/creators/pkg/files/.github/workflows/build-extension.yml +111 -0
- package/creators/pkg/init +35 -4
- package/creators/update/init +1 -1
- package/detail/constraints.gatekeeper.sh.constraint.vue +20 -10
- package/detail/fleet.cattle.io.gitrepo.vue +19 -11
- package/detail/harvesterhci.io.management.cluster.vue +3 -3
- package/detail/provisioning.cattle.io.cluster.vue +54 -12
- package/detail/workload/index.vue +3 -3
- package/dialog/AddClusterMemberDialog.vue +1 -1
- package/dialog/AddProjectMemberDialog.vue +2 -2
- package/dialog/AddonConfigConfirmationDialog.vue +27 -15
- package/dialog/DiagnosticTimingsDialog.vue +1 -1
- package/dialog/ForceMachineRemoveDialog.vue +1 -1
- package/dialog/GenericPrompt.vue +18 -6
- package/dialog/RotateEncryptionKeyDialog.vue +1 -1
- package/dialog/SaveAsRKETemplateDialog.vue +1 -1
- package/dialog/ScaleMachineDownDialog.vue +1 -1
- package/edit/auth/github.vue +8 -8
- package/edit/auth/googleoauth.vue +5 -5
- package/edit/auth/ldap/index.vue +1 -1
- package/edit/auth/oidc.vue +1 -1
- package/edit/auth/saml.vue +1 -1
- package/edit/cis.cattle.io.clusterscan.vue +1 -1
- package/edit/fleet.cattle.io.clustergroup.vue +6 -4
- package/edit/fleet.cattle.io.gitrepo.vue +16 -3
- package/edit/helm.cattle.io.projecthelmchart.vue +5 -1
- package/edit/management.cattle.io.fleetworkspace.vue +141 -6
- package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +4 -1
- package/edit/management.cattle.io.setting.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +2 -2
- package/edit/monitoring.coreos.com.receiver/tls.vue +18 -18
- package/edit/monitoring.coreos.com.receiver/types/webhook.banner.vue +4 -4
- package/edit/monitoring.coreos.com.receiver/types/webhook.vue +1 -1
- package/edit/namespace.vue +2 -2
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +126 -45
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/MachinePool.vue +10 -0
- package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +1 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +202 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +248 -84
- package/edit/resources.cattle.io.backup.vue +1 -1
- package/edit/service.vue +1 -1
- package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +2 -2
- package/edit/workload/__tests__/Job.test.ts +3 -1
- package/edit/workload/index.vue +8 -3
- package/edit/workload/mixins/workload.js +16 -0
- package/layouts/default.vue +7 -3
- package/list/fleet.cattle.io.bundle.vue +6 -3
- package/list/fleet.cattle.io.clusterregistrationtoken.vue +3 -1
- package/list/fleet.cattle.io.gitrepo.vue +44 -5
- package/list/management.cattle.io.fleetworkspace.vue +45 -0
- package/list/node.vue +69 -16
- package/list/provisioning.cattle.io.cluster.vue +30 -1
- package/machine-config/azure.vue +97 -38
- package/middleware/authenticated.js +34 -0
- package/mixins/chart.js +73 -2
- package/mixins/resource-fetch.js +2 -2
- package/models/apps.statefulset.js +28 -0
- package/models/cluster/node.js +23 -2
- package/models/cluster.x-k8s.io.machine.js +4 -2
- package/models/clusterroletemplatebinding.js +7 -0
- package/models/constraints.gatekeeper.sh.constraint.js +9 -0
- package/models/fleet.cattle.io.cluster.js +19 -10
- package/models/fleet.cattle.io.gitrepo.js +7 -2
- package/models/management.cattle.io.cluster.js +1 -1
- package/models/management.cattle.io.fleetworkspace.js +12 -0
- package/models/management.cattle.io.gitreporestriction.js +5 -0
- package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.js +3 -0
- package/models/provisioning.cattle.io.cluster.js +7 -5
- package/nuxt/App.js +210 -0
- package/nuxt/axios.js +186 -0
- package/nuxt/client.js +817 -0
- package/nuxt/components/nuxt-build-indicator.vue +143 -0
- package/nuxt/components/nuxt-child.js +122 -0
- package/nuxt/components/nuxt-error.vue +98 -0
- package/nuxt/components/nuxt-link.client.js +98 -0
- package/nuxt/components/nuxt-link.server.js +16 -0
- package/nuxt/components/nuxt-loading.vue +154 -0
- package/nuxt/components/nuxt.js +101 -0
- package/nuxt/cookie-universal-nuxt.js +9 -0
- package/nuxt/empty.js +1 -0
- package/nuxt/index.js +365 -0
- package/nuxt/jsonp.js +82 -0
- package/nuxt/loading.html +39 -0
- package/nuxt/middleware.js +12 -0
- package/nuxt/mixins/fetch.client.js +90 -0
- package/nuxt/mixins/fetch.server.js +69 -0
- package/nuxt/portal-vue.js +4 -0
- package/nuxt/server.js +312 -0
- package/nuxt/store.js +178 -0
- package/nuxt/utils.js +630 -0
- package/nuxt/views/app.template.html +9 -0
- package/nuxt/views/error.html +23 -0
- package/package.json +5 -9
- package/pages/auth/setup.vue +2 -2
- package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +33 -0
- package/pages/c/_cluster/apps/charts/chart.vue +4 -4
- package/pages/c/_cluster/apps/charts/install.helpers.js +26 -0
- package/pages/c/_cluster/apps/charts/install.vue +40 -66
- package/pages/c/_cluster/explorer/EventsTable.vue +5 -19
- package/pages/c/_cluster/explorer/index.vue +29 -25
- package/pages/c/_cluster/explorer/tools/index.vue +8 -8
- package/pages/c/_cluster/fleet/index.vue +95 -34
- package/pages/c/_cluster/gatekeeper/index.vue +1 -1
- package/pages/c/_cluster/istio/index.vue +5 -5
- package/pages/c/_cluster/manager/cloudCredential/index.vue +1 -1
- package/pages/c/_cluster/monitoring/index.vue +7 -0
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +8 -8
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +20 -7
- package/pages/c/_cluster/uiplugins/index.vue +49 -17
- package/pages/home.vue +9 -4
- package/pages/index.vue +10 -1
- package/plugins/clean-html-directive.js +31 -0
- package/plugins/dashboard-store/actions.js +32 -9
- package/plugins/dashboard-store/mutations.js +5 -2
- package/plugins/dashboard-store/resource-class.js +8 -1
- package/plugins/steve/mutations.js +3 -2
- package/plugins/steve/steve-description-class.js +5 -1
- package/plugins/steve/subscribe.js +63 -54
- package/plugins/steve-create-worker.js +14 -0
- package/promptRemove/management.cattle.io.globalrole.vue +2 -2
- package/promptRemove/management.cattle.io.project.vue +2 -2
- package/promptRemove/management.cattle.io.roletemplate.vue +2 -2
- package/promptRemove/pod.vue +1 -1
- package/public/index.html +65 -0
- package/rancher-components/components/Banner/Banner.test.ts +9 -1
- package/rancher-components/components/Banner/Banner.vue +1 -1
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +2 -0
- package/rancher-components/components/Form/Radio/RadioButton.vue +1 -1
- package/scripts/build-pkg.sh +1 -0
- package/scripts/clean +6 -0
- package/scripts/extension/bundle +58 -0
- package/scripts/extension/helmpatch +89 -0
- package/scripts/extension/publish +314 -0
- package/scripts/test-plugins-build.sh +4 -0
- package/store/__tests__/index.test.ts +110 -0
- package/store/index.js +145 -58
- package/store/type-map.js +5 -1
- package/tsconfig.default.json +36 -0
- package/tsconfig.json +24 -0
- package/types/shell/index.d.ts +420 -343
- package/utils/__tests__/string.test.ts +12 -0
- package/utils/auth.js +65 -0
- package/utils/monitoring.js +2 -1
- package/utils/position.js +5 -8
- package/utils/router.scrollBehavior.js +80 -0
- package/utils/select.js +1 -3
- package/utils/socket.js +1 -0
- package/utils/string.js +13 -0
- package/utils/time.js +9 -0
- package/vue.config.js +679 -0
- package/chart/rancher-alerting-drivers.vue +0 -53
- package/chart/rancher-gatekeeper.vue +0 -37
- package/creators/app/files/nuxt.config.js +0 -6
- package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.ts +0 -4
- package/nuxt.config.js +0 -798
package/dialog/GenericPrompt.vue
CHANGED
|
@@ -3,6 +3,7 @@ import AsyncButton from '@shell/components/AsyncButton';
|
|
|
3
3
|
import { Card } from '@components/Card';
|
|
4
4
|
import { Banner } from '@components/Banner';
|
|
5
5
|
import { exceptionToErrorsArray } from '@shell/utils/error';
|
|
6
|
+
import { decodeHtml } from '@shell/utils/string';
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
components: {
|
|
@@ -26,28 +27,39 @@ export default {
|
|
|
26
27
|
body: {
|
|
27
28
|
type: String,
|
|
28
29
|
default: ''
|
|
29
|
-
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Callback to identify response of the prompt
|
|
34
|
+
*/
|
|
35
|
+
confirm: {
|
|
36
|
+
type: Function,
|
|
37
|
+
default: () => { }
|
|
38
|
+
},
|
|
30
39
|
},
|
|
31
40
|
data() {
|
|
32
41
|
return { errors: [] };
|
|
33
42
|
},
|
|
34
43
|
|
|
35
44
|
methods: {
|
|
45
|
+
decodeHtml,
|
|
36
46
|
close() {
|
|
37
|
-
this
|
|
47
|
+
this.confirm(false);
|
|
48
|
+
this.$emit('close', false);
|
|
38
49
|
},
|
|
39
50
|
|
|
40
51
|
async apply(buttonDone) {
|
|
41
52
|
try {
|
|
42
53
|
await this.applyAction(buttonDone);
|
|
43
|
-
this.
|
|
54
|
+
this.confirm(true);
|
|
55
|
+
this.$emit('close', true);
|
|
44
56
|
} catch (err) {
|
|
45
57
|
console.error(err); // eslint-disable-line
|
|
46
58
|
this.errors = exceptionToErrorsArray(err);
|
|
47
59
|
buttonDone(false);
|
|
48
60
|
}
|
|
49
61
|
}
|
|
50
|
-
}
|
|
62
|
+
},
|
|
51
63
|
};
|
|
52
64
|
</script>
|
|
53
65
|
|
|
@@ -58,16 +70,16 @@ export default {
|
|
|
58
70
|
>
|
|
59
71
|
<h4
|
|
60
72
|
slot="title"
|
|
73
|
+
v-clean-html="title"
|
|
61
74
|
class="text-default-text"
|
|
62
|
-
v-html="title"
|
|
63
75
|
/>
|
|
64
76
|
|
|
65
77
|
<template slot="body">
|
|
66
78
|
<slot name="body">
|
|
67
79
|
<div
|
|
80
|
+
v-clean-html="decodeHtml(body)"
|
|
68
81
|
class="pl-10 pr-10"
|
|
69
82
|
style="min-height: 50px; display: flex;"
|
|
70
|
-
v-html="body"
|
|
71
83
|
/>
|
|
72
84
|
</slot>
|
|
73
85
|
</template>
|
|
@@ -74,8 +74,8 @@ export default {
|
|
|
74
74
|
>
|
|
75
75
|
<h4
|
|
76
76
|
slot="title"
|
|
77
|
+
v-clean-html="t('promptSaveAsRKETemplate.title', { cluster: cluster.displayName }, true)"
|
|
77
78
|
class="text-default-text"
|
|
78
|
-
v-html="t('promptSaveAsRKETemplate.title', { cluster: cluster.displayName }, true)"
|
|
79
79
|
/>
|
|
80
80
|
|
|
81
81
|
<div
|
|
@@ -116,7 +116,7 @@ export default {
|
|
|
116
116
|
<span
|
|
117
117
|
v-for="i in ignored"
|
|
118
118
|
:key="i.name"
|
|
119
|
-
v-html="t('promptScaleMachineDown.retainedMachine2', { name: i.name }, true)"
|
|
119
|
+
v-clean-html="t('promptScaleMachineDown.retainedMachine2', { name: i.name }, true)"
|
|
120
120
|
/>
|
|
121
121
|
</div>
|
|
122
122
|
</div>
|
package/edit/auth/github.vue
CHANGED
|
@@ -187,9 +187,9 @@ export default {
|
|
|
187
187
|
class="step-box"
|
|
188
188
|
>
|
|
189
189
|
<ul class="step-list">
|
|
190
|
-
<li v-html="t(`authConfig.${NAME}.form.prefix.1`, tArgs, true)" />
|
|
191
|
-
<li v-html="t(`authConfig.${NAME}.form.prefix.2`, tArgs, true)" />
|
|
192
|
-
<li v-html="t(`authConfig.${NAME}.form.prefix.3`, tArgs, true)" />
|
|
190
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.prefix.1`, tArgs, true)" />
|
|
191
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.prefix.2`, tArgs, true)" />
|
|
192
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.prefix.3`, tArgs, true)" />
|
|
193
193
|
</ul>
|
|
194
194
|
</InfoBox>
|
|
195
195
|
<InfoBox
|
|
@@ -200,7 +200,7 @@ export default {
|
|
|
200
200
|
<li>
|
|
201
201
|
{{ t(`authConfig.${NAME}.form.instruction`, tArgs, true) }}
|
|
202
202
|
<ul class="mt-10">
|
|
203
|
-
<li><b>{{ t(`authConfig.${NAME}.form.app.label`) }}</b>: <span v-html="t(`authConfig.${NAME}.form.app.value`, tArgs, true)" /></li>
|
|
203
|
+
<li><b>{{ t(`authConfig.${NAME}.form.app.label`) }}</b>: <span v-clean-html="t(`authConfig.${NAME}.form.app.value`, tArgs, true)" /></li>
|
|
204
204
|
<li>
|
|
205
205
|
<b>{{ t(`authConfig.${NAME}.form.homepage.label`) }}</b>: {{ serverUrl }} <CopyToClipboard
|
|
206
206
|
label-as="tooltip"
|
|
@@ -209,7 +209,7 @@ export default {
|
|
|
209
209
|
action-color="bg-transparent"
|
|
210
210
|
/>
|
|
211
211
|
</li>
|
|
212
|
-
<li><b>{{ t(`authConfig.${NAME}.form.description.label`) }}</b>: <span v-html="t(`authConfig.${NAME}.form.description.value`, tArgs, true)" /></li>
|
|
212
|
+
<li><b>{{ t(`authConfig.${NAME}.form.description.label`) }}</b>: <span v-clean-html="t(`authConfig.${NAME}.form.description.value`, tArgs, true)" /></li>
|
|
213
213
|
<li>
|
|
214
214
|
<b>{{ t(`authConfig.${NAME}.form.callback.label`) }}</b>: {{ serverUrl }} <CopyToClipboard
|
|
215
215
|
:text="serverUrl"
|
|
@@ -227,8 +227,8 @@ export default {
|
|
|
227
227
|
class="mb-20"
|
|
228
228
|
>
|
|
229
229
|
<ul class="step-list">
|
|
230
|
-
<li v-html="t(`authConfig.${NAME}.form.suffix.1`, tArgs, true)" />
|
|
231
|
-
<li v-html="t(`authConfig.${NAME}.form.suffix.2`, tArgs, true)" />
|
|
230
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.suffix.1`, tArgs, true)" />
|
|
231
|
+
<li v-clean-html="t(`authConfig.${NAME}.form.suffix.2`, tArgs, true)" />
|
|
232
232
|
</ul>
|
|
233
233
|
</InfoBox>
|
|
234
234
|
|
|
@@ -255,8 +255,8 @@ export default {
|
|
|
255
255
|
>
|
|
256
256
|
<div class="col span-12">
|
|
257
257
|
<Banner
|
|
258
|
+
v-clean-html="t('authConfig.associatedWarning', tArgs, true)"
|
|
258
259
|
color="info"
|
|
259
|
-
v-html="t('authConfig.associatedWarning', tArgs, true)"
|
|
260
260
|
/>
|
|
261
261
|
</div>
|
|
262
262
|
</div>
|
|
@@ -141,7 +141,7 @@ export default {
|
|
|
141
141
|
:step="1"
|
|
142
142
|
class=" mt-20 mb-20"
|
|
143
143
|
>
|
|
144
|
-
<h3 v-html="t('authConfig.googleoauth.steps.1.title', tArgs, true)" />
|
|
144
|
+
<h3 v-clean-html="t('authConfig.googleoauth.steps.1.title', tArgs, true)" />
|
|
145
145
|
<ul class="mt-0 step-list">
|
|
146
146
|
<li>{{ t('authConfig.googleoauth.steps.1.body.1', {}, true) }} </li>
|
|
147
147
|
<li>
|
|
@@ -165,7 +165,7 @@ export default {
|
|
|
165
165
|
class="mb-20"
|
|
166
166
|
>
|
|
167
167
|
<div class="row">
|
|
168
|
-
<h3 v-html="t('authConfig.googleoauth.steps.2.title', tArgs, true)" />
|
|
168
|
+
<h3 v-clean-html="t('authConfig.googleoauth.steps.2.title', tArgs, true)" />
|
|
169
169
|
</div>
|
|
170
170
|
<div class="row">
|
|
171
171
|
<div class="col span-6">
|
|
@@ -211,11 +211,11 @@ export default {
|
|
|
211
211
|
class="mb-20"
|
|
212
212
|
>
|
|
213
213
|
<div class="row">
|
|
214
|
-
<h3 v-html="t('authConfig.googleoauth.steps.3.title', tArgs, true)" />
|
|
214
|
+
<h3 v-clean-html="t('authConfig.googleoauth.steps.3.title', tArgs, true)" />
|
|
215
215
|
</div>
|
|
216
216
|
<div class="row">
|
|
217
217
|
<div class="col span-6">
|
|
218
|
-
<div v-html="t('authConfig.googleoauth.steps.3.introduction', tArgs, true)" />
|
|
218
|
+
<div v-clean-html="t('authConfig.googleoauth.steps.3.introduction', tArgs, true)" />
|
|
219
219
|
<ul class="mt-10 step-list">
|
|
220
220
|
<li>{{ t('authConfig.googleoauth.steps.3.body.1', {}, true) }} </li>
|
|
221
221
|
<li>{{ t('authConfig.googleoauth.steps.3.body.2', {}, true) }} </li>
|
|
@@ -248,8 +248,8 @@ export default {
|
|
|
248
248
|
>
|
|
249
249
|
<div class="col span-12 google">
|
|
250
250
|
<Banner
|
|
251
|
+
v-clean-html="t('authConfig.associatedWarning', tArgs, true)"
|
|
251
252
|
color="info"
|
|
252
|
-
v-html="t('authConfig.associatedWarning', tArgs, true)"
|
|
253
253
|
/>
|
|
254
254
|
</div>
|
|
255
255
|
</div>
|
package/edit/auth/ldap/index.vue
CHANGED
package/edit/auth/oidc.vue
CHANGED
package/edit/auth/saml.vue
CHANGED
|
@@ -322,7 +322,7 @@ export default {
|
|
|
322
322
|
class="mt-0"
|
|
323
323
|
:color="hasAlertManager ? 'info' : 'warning'"
|
|
324
324
|
>
|
|
325
|
-
<span v-html="t('cis.alertNeeded', {link: monitoringUrl}, true)" />
|
|
325
|
+
<span v-clean-html="t('cis.alertNeeded', {link: monitoringUrl}, true)" />
|
|
326
326
|
</banner>
|
|
327
327
|
<Checkbox
|
|
328
328
|
v-model="scanAlertRule.alertOnComplete"
|
|
@@ -27,7 +27,9 @@ export default {
|
|
|
27
27
|
mixins: [CreateEditView],
|
|
28
28
|
|
|
29
29
|
async fetch() {
|
|
30
|
-
|
|
30
|
+
if (this.$store.getters['management/schemaFor']( FLEET.CLUSTER )) {
|
|
31
|
+
this.allClusters = await this.$store.getters['management/all'](FLEET.CLUSTER);
|
|
32
|
+
}
|
|
31
33
|
this.allWorkspaces = await this.$store.dispatch('management/findAll', { type: FLEET.WORKSPACE });
|
|
32
34
|
|
|
33
35
|
if ( !this.value.spec?.selector ) {
|
|
@@ -146,15 +148,15 @@ export default {
|
|
|
146
148
|
>
|
|
147
149
|
<span
|
|
148
150
|
v-if="matchingClusters.isAll"
|
|
149
|
-
v-html="t('fleet.clusterGroup.selector.matchesAll', matchingClusters)"
|
|
151
|
+
v-clean-html="t('fleet.clusterGroup.selector.matchesAll', matchingClusters)"
|
|
150
152
|
/>
|
|
151
153
|
<span
|
|
152
154
|
v-else-if="matchingClusters.isNone"
|
|
153
|
-
v-html="t('fleet.clusterGroup.selector.matchesNone', matchingClusters)"
|
|
155
|
+
v-clean-html="t('fleet.clusterGroup.selector.matchesNone', matchingClusters)"
|
|
154
156
|
/>
|
|
155
157
|
<span
|
|
156
158
|
v-else
|
|
157
|
-
v-html="t('fleet.clusterGroup.selector.matchesSome', matchingClusters)"
|
|
159
|
+
v-clean-html="t('fleet.clusterGroup.selector.matchesSome', matchingClusters)"
|
|
158
160
|
/>
|
|
159
161
|
</Banner>
|
|
160
162
|
|
|
@@ -23,6 +23,7 @@ import { _CREATE } from '@shell/config/query-params';
|
|
|
23
23
|
import { isHarvesterCluster } from '@shell/utils/cluster';
|
|
24
24
|
import { CAPI, CATALOG } from '@shell/config/labels-annotations';
|
|
25
25
|
import { SECRET_TYPES } from '@shell/config/secret';
|
|
26
|
+
import { checkSchemasForFindAllHash } from '@shell/utils/auth';
|
|
26
27
|
|
|
27
28
|
const _VERIFY = 'verify';
|
|
28
29
|
const _SKIP = 'skip';
|
|
@@ -48,8 +49,20 @@ export default {
|
|
|
48
49
|
mixins: [CreateEditView],
|
|
49
50
|
|
|
50
51
|
async fetch() {
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
const hash = await checkSchemasForFindAllHash({
|
|
53
|
+
allClusters: {
|
|
54
|
+
inStoreType: 'management',
|
|
55
|
+
type: FLEET.CLUSTER
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
allClusterGroups: {
|
|
59
|
+
inStoreType: 'management',
|
|
60
|
+
type: FLEET.CLUSTER_GROUP
|
|
61
|
+
}
|
|
62
|
+
}, this.$store);
|
|
63
|
+
|
|
64
|
+
this.allClusters = hash.allClusters || [];
|
|
65
|
+
this.allClusterGroups = hash.allClusterGroups || [];
|
|
53
66
|
|
|
54
67
|
let tls = _VERIFY;
|
|
55
68
|
|
|
@@ -412,7 +425,7 @@ export default {
|
|
|
412
425
|
await secret.save();
|
|
413
426
|
|
|
414
427
|
await this.$nextTick(() => {
|
|
415
|
-
this.updateAuth(secret.
|
|
428
|
+
this.updateAuth(secret.metadata.name, name);
|
|
416
429
|
});
|
|
417
430
|
|
|
418
431
|
return secret;
|
|
@@ -48,6 +48,10 @@ export default {
|
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
data() {
|
|
51
|
+
if (!this.value.spec.values) {
|
|
52
|
+
this.$set(this.value.spec, 'values', {});
|
|
53
|
+
}
|
|
54
|
+
|
|
51
55
|
return {
|
|
52
56
|
systemNamespaces: null,
|
|
53
57
|
namespaces: [],
|
|
@@ -128,7 +132,7 @@ export default {
|
|
|
128
132
|
:side-tabs="true"
|
|
129
133
|
>
|
|
130
134
|
<Questions
|
|
131
|
-
v-model="value"
|
|
135
|
+
v-model="value.spec.values"
|
|
132
136
|
tabbed="multiple"
|
|
133
137
|
:target-namespace="value.metadata.namespace"
|
|
134
138
|
:source="selectedNamespaceQuestions"
|
|
@@ -4,12 +4,18 @@ import CruResource from '@shell/components/CruResource';
|
|
|
4
4
|
import Labels from '@shell/components/form/Labels';
|
|
5
5
|
import Loading from '@shell/components/Loading';
|
|
6
6
|
import NameNsDescription from '@shell/components/form/NameNsDescription';
|
|
7
|
-
import { FLEET, MANAGEMENT } from '@shell/config/types';
|
|
7
|
+
import { FLEET, MANAGEMENT, SCHEMA } from '@shell/config/types';
|
|
8
8
|
// import RoleBindings from '@shell/components/RoleBindings';
|
|
9
9
|
import Tabbed from '@shell/components/Tabbed';
|
|
10
10
|
import Tab from '@shell/components/Tabbed/Tab';
|
|
11
11
|
import { SCOPE_NAMESPACE, SCOPE_CLUSTER } from '@shell/components/RoleBindings.vue';
|
|
12
12
|
import { NAME as FLEET_NAME } from '@shell/config/product/fleet';
|
|
13
|
+
// import KeyValue from '@shell/components/form/KeyValue.vue';
|
|
14
|
+
import { mapState } from 'vuex';
|
|
15
|
+
import { LAST_NAMESPACE, WORKSPACE } from '@shell/store/prefs';
|
|
16
|
+
import { exceptionToErrorsArray } from '@shell/utils/error';
|
|
17
|
+
import Banner from '@components/Banner/Banner.vue';
|
|
18
|
+
import ArrayList from '@shell/components/form/ArrayList.vue';
|
|
13
19
|
|
|
14
20
|
export default {
|
|
15
21
|
name: 'FleetCruWorkspace',
|
|
@@ -19,26 +25,123 @@ export default {
|
|
|
19
25
|
Labels,
|
|
20
26
|
Loading,
|
|
21
27
|
NameNsDescription,
|
|
22
|
-
// RoleBindings,
|
|
23
28
|
Tabbed,
|
|
24
29
|
Tab,
|
|
30
|
+
Banner,
|
|
31
|
+
ArrayList
|
|
25
32
|
},
|
|
26
33
|
|
|
27
34
|
mixins: [CreateEditView],
|
|
28
35
|
|
|
29
36
|
async fetch() {
|
|
30
37
|
this.rancherClusters = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.CLUSTER });
|
|
31
|
-
|
|
38
|
+
|
|
39
|
+
if (this.$store.getters['management/schemaFor']( FLEET.CLUSTER )) {
|
|
40
|
+
this.fleetClusters = await this.$store.dispatch('management/findAll', { type: FLEET.CLUSTER });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (this.hasRepoRestrictionSchema) {
|
|
44
|
+
const restrictions = await this.$store.dispatch('management/findAll', { type: FLEET.GIT_REPO_RESTRICTION });
|
|
45
|
+
|
|
46
|
+
const workSpaceRestriction = restrictions.find((item) => {
|
|
47
|
+
return item.metadata.namespace === this.value.metadata.name && item.metadata.name.startsWith(`restriction-${ this.value.metadata.name }`);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
if (workSpaceRestriction) {
|
|
51
|
+
this.workSpaceRestriction = workSpaceRestriction;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
this.restrictionsOptions = await this.$store.getters[`type-map/optionsFor`](FLEET.GIT_REPO_RESTRICTION);
|
|
56
|
+
this.restrictionsSchema = await this.$store.getters[`management/schemaFor`](FLEET.GIT_REPO_RESTRICTION);
|
|
32
57
|
},
|
|
33
58
|
|
|
34
59
|
data() {
|
|
60
|
+
this.$set(this.value, 'spec', this.value.spec || {});
|
|
61
|
+
|
|
35
62
|
return {
|
|
36
|
-
fleetClusters:
|
|
37
|
-
rancherClusters:
|
|
63
|
+
fleetClusters: null,
|
|
64
|
+
rancherClusters: null,
|
|
65
|
+
workSpaceRestriction: null,
|
|
66
|
+
restrictions: [],
|
|
67
|
+
targetNamespaces: [],
|
|
68
|
+
restrictionsSchema: { spec: {} },
|
|
69
|
+
namespace: this.$store.getters['prefs/get'](LAST_NAMESPACE),
|
|
70
|
+
hasRepoRestrictionSchema: !!this.$store.getters['management/schemaFor']( FLEET.GIT_REPO_RESTRICTION )
|
|
38
71
|
};
|
|
39
72
|
},
|
|
40
73
|
|
|
74
|
+
methods: {
|
|
75
|
+
async saveAll(buttonCb) {
|
|
76
|
+
// Anyone who can edit workspace
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
await this.value.save();
|
|
80
|
+
|
|
81
|
+
// IF there is a restriction update it
|
|
82
|
+
if (this.workSpaceRestriction) {
|
|
83
|
+
await this.workSpaceRestriction.save();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// If there is no restriction and targetnamespace is set then create it.
|
|
87
|
+
if (!this.workSpaceRestriction && this.targetNamespaces.length) {
|
|
88
|
+
// For users with more limited permissions the gitreporestriction schema may not be visible until they create a workspace
|
|
89
|
+
if (!this.hasRepoRestrictionSchema) {
|
|
90
|
+
await this.$store.dispatch('management/find', { type: SCHEMA, id: FLEET.GIT_REPO_RESTRICTION }, { force: true });
|
|
91
|
+
}
|
|
92
|
+
const model = await this.$store.dispatch(`management/create`, {
|
|
93
|
+
type: FLEET.GIT_REPO_RESTRICTION,
|
|
94
|
+
allowedTargetNamespaces: this.targetNamespaces,
|
|
95
|
+
metadata: {
|
|
96
|
+
// restriction- prefix is added to the workspace name
|
|
97
|
+
// to identify automatically created GitRepoRestrictions
|
|
98
|
+
// when adding targetNamespaces at the point of workspace creation
|
|
99
|
+
name: `restriction-${ this.value.metadata.name }-${ Date.now() }`,
|
|
100
|
+
namespace: this.value.metadata.name // what the user types
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
await model.save();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
await this.value.waitForWorkspaceSchema(20000, (schema) => {
|
|
108
|
+
// For standard user if there are no workspaces, user can't list workspaces
|
|
109
|
+
// Therefore wait for it.
|
|
110
|
+
return schema.collectionMethods?.includes('GET');
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
await this.$store.dispatch( 'management/findAll', { type: FLEET.WORKSPACE });
|
|
114
|
+
|
|
115
|
+
this.$store.commit('updateWorkspace', { value: this.value.metadata.name, getters: this.$store.getters } );
|
|
116
|
+
this.$store.dispatch('prefs/set', { key: WORKSPACE, value: this.value.metadata.name });
|
|
117
|
+
|
|
118
|
+
buttonCb(true);
|
|
119
|
+
this.done();
|
|
120
|
+
} catch (err) {
|
|
121
|
+
console.error(err) ; // eslint-disable-line no-console
|
|
122
|
+
buttonCb(false);
|
|
123
|
+
this.errors = exceptionToErrorsArray(err);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
|
|
41
128
|
computed: {
|
|
129
|
+
...mapState(['allWorkspaces', 'workspace']),
|
|
130
|
+
|
|
131
|
+
allowedTargetNamespaces: {
|
|
132
|
+
get() {
|
|
133
|
+
return this.workSpaceRestriction?.allowedTargetNamespaces || [];
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
set(value) {
|
|
137
|
+
if (this.workSpaceRestriction) {
|
|
138
|
+
this.workSpaceRestriction.allowedTargetNamespaces = value;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
this.targetNamespaces = value;
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
|
|
42
145
|
SCOPE_NAMESPACE() {
|
|
43
146
|
return SCOPE_NAMESPACE;
|
|
44
147
|
},
|
|
@@ -65,7 +168,7 @@ export default {
|
|
|
65
168
|
:validation-passed="true"
|
|
66
169
|
:errors="errors"
|
|
67
170
|
@error="e=>errors = e"
|
|
68
|
-
@finish="
|
|
171
|
+
@finish="saveAll"
|
|
69
172
|
@cancel="done"
|
|
70
173
|
>
|
|
71
174
|
<NameNsDescription
|
|
@@ -100,6 +203,38 @@ export default {
|
|
|
100
203
|
:mode="mode"
|
|
101
204
|
/>
|
|
102
205
|
</Tab>
|
|
206
|
+
<Tab
|
|
207
|
+
name="allowedtargetnamespaces"
|
|
208
|
+
label-key="fleet.workspaces.tabs.restrictions"
|
|
209
|
+
>
|
|
210
|
+
<Banner
|
|
211
|
+
color="info"
|
|
212
|
+
>
|
|
213
|
+
<div>
|
|
214
|
+
<t
|
|
215
|
+
k="fleet.restrictions.banner"
|
|
216
|
+
:count="allowedTargetNamespaces.length"
|
|
217
|
+
:raw="true"
|
|
218
|
+
/>
|
|
219
|
+
<a
|
|
220
|
+
v-if="!!allowedTargetNamespaces.length"
|
|
221
|
+
@click="workSpaceRestriction.goToDetail()"
|
|
222
|
+
>
|
|
223
|
+
{{ t('generic.here') }}
|
|
224
|
+
</a>
|
|
225
|
+
</div>
|
|
226
|
+
</Banner>
|
|
227
|
+
|
|
228
|
+
<ArrayList
|
|
229
|
+
key="labels"
|
|
230
|
+
v-model="allowedTargetNamespaces"
|
|
231
|
+
:add-label="t('fleet.restrictions.addLabel')"
|
|
232
|
+
:mode="mode"
|
|
233
|
+
:title="t('fleet.restrictions.addTitle')"
|
|
234
|
+
:read-allowed="false"
|
|
235
|
+
:value-can-be-empty="true"
|
|
236
|
+
/>
|
|
237
|
+
</Tab>
|
|
103
238
|
</Tabbed>
|
|
104
239
|
</CruResource>
|
|
105
240
|
</template>
|
|
@@ -86,15 +86,18 @@ export default (Vue as VueConstructor<Vue & InstanceType<typeof CreateEditView>>
|
|
|
86
86
|
:resource="value"
|
|
87
87
|
:errors="errors"
|
|
88
88
|
:cancel-event="true"
|
|
89
|
+
:done-route="doneRoute"
|
|
89
90
|
@error="setErrors"
|
|
90
91
|
@finish="save"
|
|
91
|
-
@cancel="done
|
|
92
|
+
@cancel="done"
|
|
92
93
|
>
|
|
93
94
|
<NameNsDescription
|
|
94
95
|
:value="value"
|
|
95
96
|
:namespaced="false"
|
|
96
97
|
:mode="mode"
|
|
98
|
+
description-key="description"
|
|
97
99
|
/>
|
|
100
|
+
|
|
98
101
|
<PodSecurityAdmission
|
|
99
102
|
:labels="defaults"
|
|
100
103
|
:labels-always-active="true"
|
|
@@ -143,8 +143,8 @@ export default {
|
|
|
143
143
|
<div>
|
|
144
144
|
<Banner
|
|
145
145
|
v-if="mode !== view"
|
|
146
|
+
v-clean-html="t('monitoringReceiver.webhook.banner', {}, raw=true)"
|
|
146
147
|
color="info"
|
|
147
|
-
v-html="t('monitoringReceiver.webhook.banner', {}, raw=true)"
|
|
148
148
|
/>
|
|
149
149
|
<div class="row mb-20">
|
|
150
150
|
<LabeledSelect
|
|
@@ -166,8 +166,8 @@ export default {
|
|
|
166
166
|
</div>
|
|
167
167
|
<Banner
|
|
168
168
|
v-if="showNamespaceBanner"
|
|
169
|
+
v-clean-html="t('monitoringReceiver.webhook.modifyNamespace', {}, raw=true)"
|
|
169
170
|
color="info"
|
|
170
|
-
v-html="t('monitoringReceiver.webhook.modifyNamespace', {}, raw=true)"
|
|
171
171
|
/>
|
|
172
172
|
<div class="row mb-20">
|
|
173
173
|
<div class="col span-12">
|
|
@@ -35,37 +35,37 @@ export default {
|
|
|
35
35
|
<div class="row">
|
|
36
36
|
<div class="col span-12">
|
|
37
37
|
<h3>{{ t('monitoring.receiver.tls.label') }}</h3>
|
|
38
|
-
<Banner
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
<Banner
|
|
39
|
+
v-clean-html="t('monitoring.receiver.tls.secretsBanner', {}, true)"
|
|
40
|
+
color="info"
|
|
41
41
|
/>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
44
|
<div class="row mb-20">
|
|
45
45
|
<div class="col span-6">
|
|
46
|
-
<LabeledInput
|
|
47
|
-
v-model="value.tls_config.ca_file"
|
|
48
|
-
:mode="mode"
|
|
49
|
-
:label="t('monitoring.receiver.tls.caFilePath.label')"
|
|
50
|
-
:placeholder="t('monitoring.receiver.tls.caFilePath.placeholder')"
|
|
46
|
+
<LabeledInput
|
|
47
|
+
v-model="value.tls_config.ca_file"
|
|
48
|
+
:mode="mode"
|
|
49
|
+
:label="t('monitoring.receiver.tls.caFilePath.label')"
|
|
50
|
+
:placeholder="t('monitoring.receiver.tls.caFilePath.placeholder')"
|
|
51
51
|
/>
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
54
|
<div class="row mb-20">
|
|
55
55
|
<div class="col span-6">
|
|
56
|
-
<LabeledInput
|
|
57
|
-
v-model="value.tls_config.cert_file"
|
|
58
|
-
:mode="mode"
|
|
59
|
-
:label="t('monitoring.receiver.tls.certFilePath.label')"
|
|
60
|
-
:placeholder="t('monitoring.receiver.tls.certFilePath.placeholder')"
|
|
56
|
+
<LabeledInput
|
|
57
|
+
v-model="value.tls_config.cert_file"
|
|
58
|
+
:mode="mode"
|
|
59
|
+
:label="t('monitoring.receiver.tls.certFilePath.label')"
|
|
60
|
+
:placeholder="t('monitoring.receiver.tls.certFilePath.placeholder')"
|
|
61
61
|
/>
|
|
62
62
|
</div>
|
|
63
63
|
<div class="col span-6">
|
|
64
|
-
<LabeledInput
|
|
65
|
-
v-model="value.tls_config.key_file"
|
|
66
|
-
:mode="mode"
|
|
67
|
-
:label="t('monitoring.receiver.tls.keyFilePath.label')"
|
|
68
|
-
:placeholder="t('monitoring.receiver.tls.keyFilePath.placeholder')"
|
|
64
|
+
<LabeledInput
|
|
65
|
+
v-model="value.tls_config.key_file"
|
|
66
|
+
:mode="mode"
|
|
67
|
+
:label="t('monitoring.receiver.tls.keyFilePath.label')"
|
|
68
|
+
:placeholder="t('monitoring.receiver.tls.keyFilePath.placeholder')"
|
|
69
69
|
/>
|
|
70
70
|
</div>
|
|
71
71
|
</div>
|
|
@@ -20,9 +20,9 @@ export default {
|
|
|
20
20
|
};
|
|
21
21
|
</script>
|
|
22
22
|
<template>
|
|
23
|
-
<Banner
|
|
24
|
-
v-if="model.length === 0 && !isView"
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
<Banner
|
|
24
|
+
v-if="model.length === 0 && !isView"
|
|
25
|
+
v-clean-html="t('monitoringReceiver.webhook.banner', {}, raw=true)"
|
|
26
|
+
color="info"
|
|
27
27
|
/>
|
|
28
28
|
</template>
|
|
@@ -50,8 +50,8 @@ export default {
|
|
|
50
50
|
</div>
|
|
51
51
|
<Banner
|
|
52
52
|
v-if="showNamespaceBanner"
|
|
53
|
+
v-clean-html="t('monitoringReceiver.webhook.modifyNamespace', {}, raw=true)"
|
|
53
54
|
color="info"
|
|
54
|
-
v-html="t('monitoringReceiver.webhook.modifyNamespace', {}, raw=true)"
|
|
55
55
|
/>
|
|
56
56
|
<div class="row mb-20">
|
|
57
57
|
<div class="col span-12">
|