@rancher/shell 0.3.4 → 0.3.6
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/outscale.svg +19 -0
- package/assets/styles/app.scss +1 -1
- package/assets/styles/base/_basic.scss +18 -0
- package/assets/styles/base/_mixins.scss +0 -11
- package/assets/styles/base/_variables.scss +2 -4
- package/assets/styles/fonts/_fontstack.scss +11 -11
- package/assets/styles/global/_button.scss +12 -2
- package/assets/styles/vendor/vue-js-modal.scss +3 -3
- package/assets/translations/en-us.yaml +113 -22
- package/assets/translations/zh-hans.yaml +113 -24
- package/babel.config.js +13 -0
- package/chart/gatekeeper.vue +78 -0
- package/chart/istio.vue +135 -112
- 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/BrandImage.vue +1 -4
- package/components/ButtonDropdown.vue +2 -3
- package/components/Carousel.vue +85 -37
- 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 +12 -7
- package/components/ExplorerMembers.vue +101 -6
- package/components/ExplorerProjectsNamespaces.vue +46 -3
- package/components/FileDiff.vue +6 -7
- package/components/GrafanaDashboard.vue +27 -23
- 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 +28 -13
- package/components/SortableTable/selection.js +58 -50
- package/components/Wizard.vue +4 -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/auth/RoleDetailEdit.vue +2 -2
- 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/HookOption.vue +14 -10
- package/components/form/LabeledSelect.vue +14 -11
- package/components/form/Labels.vue +32 -27
- package/components/form/MatchExpressions.vue +19 -4
- package/components/form/Members/ClusterPermissionsEditor.vue +32 -7
- package/components/form/NameNsDescription.vue +32 -46
- package/components/form/ProjectMemberEditor.vue +46 -21
- 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/Tolerations.vue +4 -1
- package/components/form/ValueFromResource.vue +14 -9
- package/components/form/WorkloadPorts.vue +2 -2
- package/components/form/__tests__/LabeledSelect.test.ts +138 -0
- package/components/form/__tests__/NameNsDescription.ts +59 -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/formatter/WorkloadHealthScale.vue +8 -2
- package/components/nav/Group.vue +2 -2
- package/components/nav/NamespaceFilter.vue +23 -11
- package/components/nav/TopLevelMenu.vue +2 -4
- package/components/nav/Type.vue +1 -1
- package/components/nav/WorkspaceSwitcher.vue +46 -5
- package/components/nuxt/nuxt-build-indicator.vue +143 -0
- package/components/nuxt/nuxt-child.js +122 -0
- package/components/nuxt/nuxt-error.vue +98 -0
- package/components/nuxt/nuxt-link.client.js +98 -0
- package/components/nuxt/nuxt-link.server.js +16 -0
- package/components/nuxt/nuxt-loading.vue +154 -0
- package/components/nuxt/nuxt.js +101 -0
- package/config/labels-annotations.js +17 -0
- package/config/middleware.js +12 -0
- package/config/product/auth.js +3 -2
- package/config/product/explorer.js +34 -6
- package/config/product/fleet.js +2 -0
- package/config/query-params.js +1 -0
- package/config/router.js +414 -0
- package/config/store.js +181 -0
- package/config/table-headers.js +54 -12
- package/config/types.js +18 -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/core/plugin.ts +4 -2
- package/core/types.ts +258 -1
- 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/tsconfig.json +0 -1
- package/creators/app/files/vue.config.js +6 -0
- package/creators/app/init +5 -5
- package/creators/pkg/files/.github/workflows/build-extension.yml +110 -0
- package/creators/pkg/files/tsconfig.json +0 -1
- package/creators/pkg/init +35 -4
- package/creators/pkg/pkg.package.json +3 -3
- package/creators/update/init +1 -1
- package/detail/constraints.gatekeeper.sh.constraint.vue +34 -17
- package/detail/fleet.cattle.io.clustergroup.vue +7 -1
- 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 +32 -4
- package/edit/helm.cattle.io.projecthelmchart.vue +5 -1
- package/edit/logging.banzaicloud.io.output/index.vue +18 -5
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +1 -0
- 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 +14 -10
- 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 +21 -4
- 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/import.vue +23 -25
- package/edit/provisioning.cattle.io.cluster/rke2.vue +344 -102
- 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 +22 -7
- package/edit/workload/storage/Mount.vue +3 -3
- package/initialize/App.js +206 -0
- package/initialize/client.js +863 -0
- package/initialize/index.js +364 -0
- package/layouts/default.vue +7 -3
- package/layouts/standalone.vue +13 -0
- package/list/catalog.cattle.io.clusterrepo.vue +1 -0
- 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/list/rbac.authorization.k8s.io.clusterrolebinding.vue +48 -0
- package/list/workload.vue +6 -4
- package/machine-config/azure.vue +97 -38
- package/middleware/authenticated.js +34 -0
- package/mixins/chart.js +101 -2
- package/mixins/fetch.client.js +95 -0
- package/mixins/fetch.server.js +73 -0
- package/mixins/labeled-form-element.ts +2 -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 +46 -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/pod.js +4 -0
- package/models/provisioning.cattle.io.cluster.js +7 -5
- package/models/rbac.authorization.k8s.io.clusterrolebinding.js +16 -0
- package/models/rbac.authorization.k8s.io.rolebinding.js +16 -0
- package/package.json +13 -21
- 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 +98 -102
- 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/diagnostic.vue +32 -25
- package/pages/home.vue +9 -4
- package/pages/index.vue +10 -1
- package/pages/rio/mesh.vue +1 -2
- package/pkg/tsconfig.json +0 -1
- package/plugins/clean-html-directive.js +34 -0
- package/plugins/dashboard-store/actions.js +32 -9
- package/plugins/dashboard-store/index.js +1 -1
- package/plugins/dashboard-store/mutations.js +5 -2
- package/plugins/dashboard-store/resource-class.js +8 -1
- package/plugins/plugin.js +0 -14
- package/plugins/portal-vue.js +4 -0
- 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 +7 -1
- package/rancher-components/components/Banner/Banner.vue +2 -1
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +2 -0
- package/rancher-components/components/Form/Radio/RadioButton.test.ts +31 -0
- package/rancher-components/components/Form/Radio/RadioButton.vue +14 -3
- 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 +333 -0
- package/scripts/serve-pkgs +6 -2
- 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 +6 -2
- package/tsconfig.default.json +36 -0
- package/tsconfig.json +23 -0
- package/types/rancher/index.d.ts +2 -0
- package/types/shell/index.d.ts +466 -320
- package/utils/__tests__/grafana.test.ts +44 -0
- package/utils/__tests__/string.test.ts +12 -0
- package/utils/auth.js +65 -0
- package/utils/axios.js +190 -0
- package/utils/cookie-universal-nuxt.js +10 -0
- package/utils/dom.js +15 -0
- package/utils/grafana.js +35 -16
- package/utils/monitoring.js +2 -1
- package/utils/nuxt.js +659 -0
- 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 +690 -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/plugins/dashboard-store/extensions.js +0 -22
|
@@ -58,38 +58,43 @@ export default {
|
|
|
58
58
|
return `${ this.displaySideBySide ? 'col span-6' : 'row' } ${ this.defaultSectionClass }`.trim();
|
|
59
59
|
},
|
|
60
60
|
|
|
61
|
+
columnsClass() {
|
|
62
|
+
return `${ this.displaySideBySide ? 'col span-6' : 'row' }`.trim();
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
};
|
|
63
66
|
</script>
|
|
64
67
|
<template>
|
|
65
68
|
<div :class="containerClass">
|
|
66
|
-
<div class="
|
|
67
|
-
<div class="
|
|
68
|
-
<
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
69
|
+
<div :class="defaultSectionClass">
|
|
70
|
+
<div class="labels">
|
|
71
|
+
<div class="labels__header">
|
|
72
|
+
<h3>
|
|
73
|
+
<t k="labels.labels.title" />
|
|
74
|
+
</h3>
|
|
75
|
+
<ToggleSwitch
|
|
76
|
+
v-if="value.hasSystemLabels"
|
|
77
|
+
v-model="toggler"
|
|
78
|
+
name="label-system-toggle"
|
|
79
|
+
:on-label="t('labels.labels.show')"
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
<p class="mt-10 mb-10">
|
|
83
|
+
<t k="labels.labels.description" />
|
|
84
|
+
</p>
|
|
85
|
+
<div :class="columnsClass">
|
|
86
|
+
<KeyValue
|
|
87
|
+
key="labels"
|
|
88
|
+
:value="value.labels"
|
|
89
|
+
:protected-keys="value.systemLabels || []"
|
|
90
|
+
:toggle-filter="toggler"
|
|
91
|
+
:add-label="t('labels.addLabel')"
|
|
92
|
+
:mode="mode"
|
|
93
|
+
:read-allowed="false"
|
|
94
|
+
:value-can-be-empty="true"
|
|
95
|
+
@input="value.setLabels($event)"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
93
98
|
</div>
|
|
94
99
|
</div>
|
|
95
100
|
<div class="spacer" />
|
|
@@ -35,6 +35,18 @@ export default {
|
|
|
35
35
|
default: false,
|
|
36
36
|
},
|
|
37
37
|
|
|
38
|
+
// whether or not to show add rule button at bottom
|
|
39
|
+
showAddButton: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
// whether or not to show remove rule button right side of the rule
|
|
45
|
+
showRemoveButton: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true
|
|
48
|
+
},
|
|
49
|
+
|
|
38
50
|
// whether or not to show remove button in upper right
|
|
39
51
|
showRemove: {
|
|
40
52
|
type: Boolean,
|
|
@@ -257,7 +269,10 @@ export default {
|
|
|
257
269
|
@input="update"
|
|
258
270
|
>
|
|
259
271
|
</div>
|
|
260
|
-
<div
|
|
272
|
+
<div
|
|
273
|
+
v-if="showRemoveButton"
|
|
274
|
+
class="remove-container"
|
|
275
|
+
>
|
|
261
276
|
<button
|
|
262
277
|
v-if="!isView"
|
|
263
278
|
type="button"
|
|
@@ -272,7 +287,7 @@ export default {
|
|
|
272
287
|
</div>
|
|
273
288
|
</div>
|
|
274
289
|
<div
|
|
275
|
-
v-if="!isView"
|
|
290
|
+
v-if="!isView && showAddButton"
|
|
276
291
|
class="mt-20"
|
|
277
292
|
>
|
|
278
293
|
<button
|
|
@@ -319,14 +334,14 @@ export default {
|
|
|
319
334
|
display: grid;
|
|
320
335
|
grid-template-columns: 1fr 1fr 1fr;
|
|
321
336
|
margin: 5px 0;
|
|
322
|
-
grid-gap:
|
|
337
|
+
grid-gap: $column-gutter;
|
|
323
338
|
|
|
324
339
|
& > LABEL {
|
|
325
340
|
margin: 0;
|
|
326
341
|
}
|
|
327
342
|
|
|
328
343
|
&:not(.view){
|
|
329
|
-
grid-template-columns:
|
|
344
|
+
grid-template-columns: repeat(3, 1fr) 50px;
|
|
330
345
|
}
|
|
331
346
|
}
|
|
332
347
|
</style>
|
|
@@ -175,7 +175,20 @@ export default {
|
|
|
175
175
|
opt: { url: `/v3/principals/${ principalId }` }
|
|
176
176
|
}, { root: true });
|
|
177
177
|
},
|
|
178
|
+
customPermissionsUpdate() {
|
|
179
|
+
return this.customPermissions.reduce((acc, customPermissionsItem) => {
|
|
180
|
+
const lockedExist = this.roleTemplates.find(roleTemplateItem => roleTemplateItem.displayName === customPermissionsItem.label);
|
|
181
|
+
|
|
182
|
+
if (lockedExist.locked) {
|
|
183
|
+
customPermissionsItem['locked'] = true;
|
|
184
|
+
customPermissionsItem['tooltip'] = this.t('members.clusterPermissions.custom.lockedRole');
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return [...acc, customPermissionsItem];
|
|
188
|
+
}, []);
|
|
189
|
+
}
|
|
178
190
|
},
|
|
191
|
+
|
|
179
192
|
watch: {
|
|
180
193
|
roleTemplateIds() {
|
|
181
194
|
this.updateBindings();
|
|
@@ -208,7 +221,7 @@ export default {
|
|
|
208
221
|
this.$emit('input', bindings);
|
|
209
222
|
}
|
|
210
223
|
}
|
|
211
|
-
}
|
|
224
|
+
},
|
|
212
225
|
};
|
|
213
226
|
</script>
|
|
214
227
|
<template>
|
|
@@ -253,13 +266,22 @@ export default {
|
|
|
253
266
|
class="custom-permissions ml-20 mt-10"
|
|
254
267
|
:class="{'two-column': useTwoColumnsForCustom}"
|
|
255
268
|
>
|
|
256
|
-
<
|
|
257
|
-
v-for="permission in
|
|
269
|
+
<div
|
|
270
|
+
v-for="permission in customPermissionsUpdate"
|
|
258
271
|
:key="permission.key"
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
272
|
+
>
|
|
273
|
+
<Checkbox
|
|
274
|
+
v-model="permission.value"
|
|
275
|
+
:disabled="permission.locked"
|
|
276
|
+
class="mb-5"
|
|
277
|
+
:label="permission.label"
|
|
278
|
+
/>
|
|
279
|
+
<i
|
|
280
|
+
v-if="permission.locked"
|
|
281
|
+
v-tooltip="permission.tooltip"
|
|
282
|
+
class="icon icon-lock icon-fw"
|
|
283
|
+
/>
|
|
284
|
+
</div>
|
|
263
285
|
</div>
|
|
264
286
|
</template>
|
|
265
287
|
</Card>
|
|
@@ -282,5 +304,8 @@ label.radio {
|
|
|
282
304
|
&.two-column {
|
|
283
305
|
grid-template-columns: 1fr 1fr;
|
|
284
306
|
}
|
|
307
|
+
::v-deep .checkbox-label {
|
|
308
|
+
margin-right: 0;
|
|
309
|
+
}
|
|
285
310
|
}
|
|
286
311
|
</style>
|
|
@@ -20,7 +20,7 @@ export function normalizeName(str) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export default {
|
|
23
|
-
name: '
|
|
23
|
+
name: 'NameNsDescription',
|
|
24
24
|
components: {
|
|
25
25
|
LabeledInput,
|
|
26
26
|
LabeledSelect
|
|
@@ -169,7 +169,7 @@ export default {
|
|
|
169
169
|
if (this.nameKey) {
|
|
170
170
|
name = get(v, this.nameKey);
|
|
171
171
|
} else {
|
|
172
|
-
name = metadata
|
|
172
|
+
name = metadata?.name;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
if (this.namespaced) {
|
|
@@ -209,7 +209,7 @@ export default {
|
|
|
209
209
|
},
|
|
210
210
|
|
|
211
211
|
computed: {
|
|
212
|
-
...mapGetters(['currentProduct', 'currentCluster']),
|
|
212
|
+
...mapGetters(['currentProduct', 'currentCluster', 'namespaces', 'allowedNamespaces']),
|
|
213
213
|
namespaceReallyDisabled() {
|
|
214
214
|
return (
|
|
215
215
|
!!this.forceNamespace || this.namespaceDisabled || this.mode === _EDIT
|
|
@@ -220,36 +220,18 @@ export default {
|
|
|
220
220
|
return this.nameDisabled || (this.mode === _EDIT && !this.nameEditable);
|
|
221
221
|
},
|
|
222
222
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
if (this.currentProduct?.hideSystemResources) {
|
|
232
|
-
// Filter out the namespace
|
|
233
|
-
// if it is a system namespace or if it is managed by
|
|
234
|
-
// Fleet.
|
|
235
|
-
out = !namespace.isSystem && !namespace.isFleetManaged;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
if (this.mode === _CREATE) {
|
|
239
|
-
out = out && !!namespace.links.update;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
return out;
|
|
243
|
-
}));
|
|
244
|
-
|
|
245
|
-
const withLabels = filtered.map(this.namespaceMapper || ((obj) => {
|
|
246
|
-
return {
|
|
223
|
+
/**
|
|
224
|
+
* Map namespaces from the store to options, adding divider and create button
|
|
225
|
+
*/
|
|
226
|
+
options() {
|
|
227
|
+
const options = Object.keys(this.isCreate ? this.allowedNamespaces() : this.namespaces())
|
|
228
|
+
.map(namespace => ({ nameDisplay: namespace, id: namespace }))
|
|
229
|
+
.map(this.namespaceMapper || (obj => ({
|
|
247
230
|
label: obj.nameDisplay,
|
|
248
231
|
value: obj.id,
|
|
249
|
-
};
|
|
250
|
-
}));
|
|
232
|
+
})));
|
|
251
233
|
|
|
252
|
-
const sortedByLabel = sortBy(
|
|
234
|
+
const sortedByLabel = sortBy(options, 'label');
|
|
253
235
|
|
|
254
236
|
if (this.forceNamespace) {
|
|
255
237
|
sortedByLabel.unshift({
|
|
@@ -258,29 +240,33 @@ export default {
|
|
|
258
240
|
});
|
|
259
241
|
}
|
|
260
242
|
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
kind: 'highlighted'
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
out.push({
|
|
243
|
+
const createButton = {
|
|
244
|
+
label: this.t('namespace.createNamespace'),
|
|
245
|
+
value: '',
|
|
246
|
+
kind: 'highlighted'
|
|
247
|
+
};
|
|
248
|
+
const divider = {
|
|
271
249
|
label: 'divider',
|
|
272
250
|
disabled: true,
|
|
273
251
|
kind: 'divider'
|
|
274
|
-
}
|
|
275
|
-
...sortedByLabel);
|
|
252
|
+
};
|
|
276
253
|
|
|
277
|
-
|
|
254
|
+
const createOverhead = this.canCreateNamespace ? [createButton, divider] : [];
|
|
255
|
+
|
|
256
|
+
return [
|
|
257
|
+
...createOverhead,
|
|
258
|
+
...sortedByLabel
|
|
259
|
+
];
|
|
278
260
|
},
|
|
279
261
|
|
|
280
262
|
isView() {
|
|
281
263
|
return this.mode === _VIEW;
|
|
282
264
|
},
|
|
283
265
|
|
|
266
|
+
isCreate() {
|
|
267
|
+
return this.mode === _CREATE;
|
|
268
|
+
},
|
|
269
|
+
|
|
284
270
|
colSpan() {
|
|
285
271
|
if (!this.horizontal) {
|
|
286
272
|
return `span-8`;
|
|
@@ -296,7 +282,7 @@ export default {
|
|
|
296
282
|
|
|
297
283
|
canCreateNamespace() {
|
|
298
284
|
// Check if user can push to namespaces... and as the ns is outside of a project restrict to admins and cluster owners
|
|
299
|
-
return (this.nsSchema?.collectionMethods || []).includes('POST') && this.currentCluster
|
|
285
|
+
return (this.nsSchema?.collectionMethods || []).includes('POST') && this.currentCluster?.canUpdate;
|
|
300
286
|
}
|
|
301
287
|
},
|
|
302
288
|
|
|
@@ -344,7 +330,7 @@ export default {
|
|
|
344
330
|
}
|
|
345
331
|
|
|
346
332
|
if (this.namespaced) {
|
|
347
|
-
this.$emit('isNamespaceNew', !val || (this.
|
|
333
|
+
this.$emit('isNamespaceNew', !val || (this.options && !this.options.find(n => n.value === val)));
|
|
348
334
|
}
|
|
349
335
|
|
|
350
336
|
if (this.namespaceKey) {
|
|
@@ -418,7 +404,7 @@ export default {
|
|
|
418
404
|
v-show="!createNamespace"
|
|
419
405
|
v-model="namespace"
|
|
420
406
|
:clearable="true"
|
|
421
|
-
:options="
|
|
407
|
+
:options="options"
|
|
422
408
|
:disabled="namespaceReallyDisabled"
|
|
423
409
|
:searchable="true"
|
|
424
410
|
:mode="mode"
|
|
@@ -188,6 +188,18 @@ export default {
|
|
|
188
188
|
value: 'custom'
|
|
189
189
|
}
|
|
190
190
|
];
|
|
191
|
+
},
|
|
192
|
+
customPermissionsUpdate() {
|
|
193
|
+
return this.customPermissions.reduce((acc, customPermissionsItem) => {
|
|
194
|
+
const lockedExist = this.roleTemplates.find(roleTemplateItem => roleTemplateItem.displayName === customPermissionsItem.label);
|
|
195
|
+
|
|
196
|
+
if (lockedExist.locked) {
|
|
197
|
+
customPermissionsItem['locked'] = true;
|
|
198
|
+
customPermissionsItem['tooltip'] = this.t('members.clusterPermissions.custom.lockedRole');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return [...acc, customPermissionsItem];
|
|
202
|
+
}, []);
|
|
191
203
|
}
|
|
192
204
|
},
|
|
193
205
|
watch: {
|
|
@@ -244,19 +256,19 @@ export default {
|
|
|
244
256
|
<div v-else>
|
|
245
257
|
<div class="row mt-10">
|
|
246
258
|
<div class="col span-12">
|
|
247
|
-
<SelectPrincipal
|
|
248
|
-
project
|
|
249
|
-
class="mb-20"
|
|
250
|
-
:mode="mode"
|
|
251
|
-
:retain-selection="true"
|
|
252
|
-
@add="onAdd"
|
|
259
|
+
<SelectPrincipal
|
|
260
|
+
project
|
|
261
|
+
class="mb-20"
|
|
262
|
+
:mode="mode"
|
|
263
|
+
:retain-selection="true"
|
|
264
|
+
@add="onAdd"
|
|
253
265
|
/>
|
|
254
266
|
</div>
|
|
255
267
|
</div>
|
|
256
|
-
<Card
|
|
257
|
-
class="m-0"
|
|
258
|
-
:show-highlight-border="false"
|
|
259
|
-
:show-actions="false"
|
|
268
|
+
<Card
|
|
269
|
+
class="m-0"
|
|
270
|
+
:show-highlight-border="false"
|
|
271
|
+
:show-actions="false"
|
|
260
272
|
>
|
|
261
273
|
<template v-slot:title>
|
|
262
274
|
<div class="type-title">
|
|
@@ -272,18 +284,27 @@ export default {
|
|
|
272
284
|
:options="options"
|
|
273
285
|
name="permission-group"
|
|
274
286
|
/>
|
|
275
|
-
<div
|
|
276
|
-
v-if="value.permissionGroup === 'custom'"
|
|
277
|
-
class="custom-permissions ml-20 mt-10"
|
|
278
|
-
:class="{'two-column': useTwoColumnsForCustom}"
|
|
287
|
+
<div
|
|
288
|
+
v-if="value.permissionGroup === 'custom'"
|
|
289
|
+
class="custom-permissions ml-20 mt-10"
|
|
290
|
+
:class="{'two-column': useTwoColumnsForCustom}"
|
|
279
291
|
>
|
|
280
|
-
<
|
|
281
|
-
v-for="permission in
|
|
282
|
-
:key="permission.key"
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
292
|
+
<div
|
|
293
|
+
v-for="permission in customPermissionsUpdate"
|
|
294
|
+
:key="permission.key"
|
|
295
|
+
>
|
|
296
|
+
<Checkbox
|
|
297
|
+
v-model="permission.value"
|
|
298
|
+
:disabled="permission.locked"
|
|
299
|
+
class="mb-5"
|
|
300
|
+
:label="permission.label"
|
|
301
|
+
/>
|
|
302
|
+
<i
|
|
303
|
+
v-if="permission.locked"
|
|
304
|
+
v-tooltip="permission.tooltip"
|
|
305
|
+
class="icon icon-lock icon-fw"
|
|
306
|
+
/>
|
|
307
|
+
</div>
|
|
287
308
|
</div>
|
|
288
309
|
</template>
|
|
289
310
|
</Card>
|
|
@@ -306,5 +327,9 @@ label.radio {
|
|
|
306
327
|
&.two-column {
|
|
307
328
|
grid-template-columns: 1fr 1fr;
|
|
308
329
|
}
|
|
330
|
+
|
|
331
|
+
::v-deep .checkbox-label {
|
|
332
|
+
margin-right: 0;
|
|
333
|
+
}
|
|
309
334
|
}
|
|
310
335
|
</style>
|
|
@@ -124,7 +124,7 @@ export default {
|
|
|
124
124
|
<div class="row">
|
|
125
125
|
<div class="col span-12">
|
|
126
126
|
<Banner :color="(matchingResources.none ? 'warning' : 'success')">
|
|
127
|
-
<span v-html="t('generic.selectors.matchingResources.matchesSome', matchingResources)" />
|
|
127
|
+
<span v-clean-html="t('generic.selectors.matchingResources.matchesSome', matchingResources)" />
|
|
128
128
|
</Banner>
|
|
129
129
|
</div>
|
|
130
130
|
</div>
|
|
@@ -55,6 +55,10 @@ export default {
|
|
|
55
55
|
mode: {
|
|
56
56
|
type: String,
|
|
57
57
|
default: _EDIT
|
|
58
|
+
},
|
|
59
|
+
inStore: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'cluster',
|
|
58
62
|
}
|
|
59
63
|
},
|
|
60
64
|
|
|
@@ -86,7 +90,7 @@ export default {
|
|
|
86
90
|
}
|
|
87
91
|
},
|
|
88
92
|
secrets() {
|
|
89
|
-
const allSecrets = this.$store.getters[
|
|
93
|
+
const allSecrets = this.$store.getters[`${ this.inStore }/all`](SECRET);
|
|
90
94
|
|
|
91
95
|
return allSecrets
|
|
92
96
|
.filter(secret => this.types.includes(secret._type) && secret.namespace === this.namespace);
|
|
@@ -154,8 +154,8 @@ export default {
|
|
|
154
154
|
<template v-if="serviceNameNew">
|
|
155
155
|
<div class="row span-6">
|
|
156
156
|
<Banner
|
|
157
|
+
v-clean-html="t('workload.serviceAccountName.createMessage', { name: serviceName }) "
|
|
157
158
|
color="info"
|
|
158
|
-
v-html="t('workload.serviceAccountName.createMessage', { name: serviceName }) "
|
|
159
159
|
/>
|
|
160
160
|
</div>
|
|
161
161
|
</template>
|
|
@@ -107,18 +107,18 @@ export default {
|
|
|
107
107
|
},
|
|
108
108
|
|
|
109
109
|
methods: {
|
|
110
|
-
updateSecretName(
|
|
111
|
-
if (value === this.none) {
|
|
110
|
+
updateSecretName(e) {
|
|
111
|
+
if (e.value === this.none) {
|
|
112
112
|
// The key should appear blank if the secret name is cleared
|
|
113
113
|
this.key = '';
|
|
114
114
|
}
|
|
115
|
-
if (value) {
|
|
116
|
-
this.$emit('updateSecretName', value);
|
|
115
|
+
if (e.value) {
|
|
116
|
+
this.$emit('updateSecretName', e.value);
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
|
-
updateSecretKey(
|
|
120
|
-
if (value) {
|
|
121
|
-
this.$emit('updateSecretKey', value);
|
|
119
|
+
updateSecretKey(e) {
|
|
120
|
+
if (e.value) {
|
|
121
|
+
this.$emit('updateSecretKey', e.value);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -135,7 +135,7 @@ export default {
|
|
|
135
135
|
:options="secretNames"
|
|
136
136
|
:label="secretNameLabel"
|
|
137
137
|
:mode="mode"
|
|
138
|
-
@selecting="updateSecretName
|
|
138
|
+
@selecting="updateSecretName"
|
|
139
139
|
/>
|
|
140
140
|
<LabeledSelect
|
|
141
141
|
v-model="key"
|
|
@@ -144,7 +144,7 @@ export default {
|
|
|
144
144
|
:options="keys"
|
|
145
145
|
:label="keyNameLabel"
|
|
146
146
|
:mode="mode"
|
|
147
|
-
@selecting="updateSecretKey
|
|
147
|
+
@selecting="updateSecretKey"
|
|
148
148
|
/>
|
|
149
149
|
</div>
|
|
150
150
|
</div>
|
|
@@ -198,7 +198,7 @@ export default {
|
|
|
198
198
|
suffix="Seconds"
|
|
199
199
|
/>
|
|
200
200
|
</div>
|
|
201
|
-
<div class="col">
|
|
201
|
+
<div class="col remove">
|
|
202
202
|
<button
|
|
203
203
|
v-if="!isView"
|
|
204
204
|
type="button"
|
|
@@ -244,4 +244,7 @@ export default {
|
|
|
244
244
|
color: var(--input-label);
|
|
245
245
|
margin-bottom: 10px;
|
|
246
246
|
}
|
|
247
|
+
.remove BUTTON {
|
|
248
|
+
padding: 0px;
|
|
249
|
+
}
|
|
247
250
|
</style>
|
|
@@ -359,15 +359,16 @@ export default {
|
|
|
359
359
|
/>
|
|
360
360
|
</div>
|
|
361
361
|
</template>
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
362
|
+
<div class="remove">
|
|
363
|
+
<button
|
|
364
|
+
v-if="!isView"
|
|
365
|
+
type="button"
|
|
366
|
+
class="btn role-link"
|
|
367
|
+
@click.stop="$emit('remove')"
|
|
368
|
+
>
|
|
369
|
+
{{ t('generic.remove') }}
|
|
370
|
+
</button>
|
|
371
|
+
</div>
|
|
371
372
|
</div>
|
|
372
373
|
</template>
|
|
373
374
|
|
|
@@ -382,6 +383,10 @@ export default {
|
|
|
382
383
|
.single-value {
|
|
383
384
|
grid-column: span 2;
|
|
384
385
|
}
|
|
386
|
+
|
|
387
|
+
.remove BUTTON {
|
|
388
|
+
padding: 0px;
|
|
389
|
+
}
|
|
385
390
|
}
|
|
386
391
|
|
|
387
392
|
</style>
|
|
@@ -276,7 +276,7 @@ export default {
|
|
|
276
276
|
'show-ipam': showIpam,
|
|
277
277
|
}"
|
|
278
278
|
>
|
|
279
|
-
<div class="service-type
|
|
279
|
+
<div class="service-type">
|
|
280
280
|
<LabeledSelect
|
|
281
281
|
v-model="row._serviceType"
|
|
282
282
|
:mode="mode"
|
|
@@ -444,7 +444,7 @@ $checkbox: 75;
|
|
|
444
444
|
}
|
|
445
445
|
.ports-headers, .ports-row{
|
|
446
446
|
display: grid;
|
|
447
|
-
grid-template-columns:
|
|
447
|
+
grid-template-columns: 28% 28% 15% 10% 75px 0.5fr;
|
|
448
448
|
grid-column-gap: $column-gutter;
|
|
449
449
|
margin-bottom: 10px;
|
|
450
450
|
align-items: center;
|