@rancher/shell 3.0.5-rc.5 → 3.0.5-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/data/aws-regions.json +1 -0
- package/assets/images/key.svg +17 -0
- package/assets/styles/base/_spacing.scss +2 -2
- package/assets/styles/base/_variables.scss +17 -11
- package/assets/styles/global/_form.scss +1 -1
- package/assets/styles/global/_labeled-input.scss +1 -1
- package/assets/styles/themes/_dark.scss +5 -0
- package/assets/styles/themes/_light.scss +11 -2
- package/assets/styles/vendor/vue-select.scss +1 -1
- package/assets/translations/en-us.yaml +426 -64
- package/assets/translations/zh-hans.yaml +3 -4
- package/cloud-credential/gcp.vue +9 -1
- package/components/AppModal.vue +2 -0
- package/components/CodeMirror.vue +2 -2
- package/components/ConfigMapSettings/Settings.vue +377 -0
- package/components/ConfigMapSettings/index.vue +354 -0
- package/components/CruResource.vue +1 -2
- package/components/DetailText.vue +61 -11
- package/components/Drawer/Chrome.vue +115 -0
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +61 -0
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +48 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/ConfigTab.test.ts +54 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/YamlTab.test.ts +80 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/composables.test.ts +106 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/helpers.test.ts +42 -0
- package/components/Drawer/ResourceDetailDrawer/composables.ts +53 -0
- package/components/Drawer/ResourceDetailDrawer/helpers.ts +10 -0
- package/components/Drawer/ResourceDetailDrawer/index.vue +111 -0
- package/components/GrowlManager.vue +16 -15
- package/components/IconOrSvg.vue +5 -0
- package/components/KeyValueView.vue +1 -1
- package/components/Loading.vue +1 -1
- package/components/LocaleSelector.vue +9 -1
- package/components/PaginatedResourceTable.vue +46 -1
- package/components/ProgressBarMulti.vue +1 -0
- package/components/PromptModal.vue +6 -1
- package/components/PromptRestore.vue +22 -44
- package/components/RelatedResources.vue +4 -12
- package/components/Resource/Detail/Additional.vue +46 -0
- package/components/Resource/Detail/Metadata/Annotations/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/Metadata/Annotations/index.vue +5 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +223 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/composable.ts +47 -256
- package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +317 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +34 -5
- package/components/Resource/Detail/Metadata/KeyValue.vue +32 -22
- package/components/Resource/Detail/Metadata/Labels/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/Metadata/Labels/index.vue +4 -0
- package/components/Resource/Detail/Metadata/Rectangle.vue +3 -1
- package/components/Resource/Detail/Metadata/__tests__/KeyValue.test.ts +1 -1
- package/components/Resource/Detail/Metadata/__tests__/Rectangle.test.ts +1 -1
- package/components/Resource/Detail/Metadata/__tests__/composables.test.ts +75 -0
- package/components/Resource/Detail/Metadata/composables.ts +60 -11
- package/components/Resource/Detail/Metadata/index.vue +12 -5
- package/components/Resource/Detail/Page.vue +15 -0
- package/components/Resource/Detail/ResourceRow.vue +37 -18
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/__tests__/composables.test.ts +29 -0
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/__tests__/index.test.ts +48 -0
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/composables.ts +31 -0
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/index.vue +50 -0
- package/components/Resource/Detail/ResourceTabs/KnownHostsTab/__tests__/composables.test.ts +66 -0
- package/components/Resource/Detail/ResourceTabs/KnownHostsTab/composables.ts +21 -0
- package/components/Resource/Detail/ResourceTabs/KnownHostsTab/index.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Basic.vue +45 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/BasicAuth.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Certificate.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Registry.vue +22 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/ServiceAccountToken.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Ssh.vue +32 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Basic.test.ts +40 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/BasicAuth.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Certificate.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Registry.test.ts +27 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/ServiceAccountToken.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Ssh.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/auth-types.test.ts +186 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/composables.test.ts +102 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/auth-types.ts +109 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/composeables.ts +52 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/index.vue +71 -0
- package/components/Resource/Detail/SpacedRow.vue +1 -1
- package/components/Resource/Detail/TitleBar/Title.vue +2 -1
- package/components/Resource/Detail/TitleBar/__tests__/Title.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/__tests__/Top.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/__tests__/composables.test.ts +63 -0
- package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/composables.ts +45 -0
- package/components/Resource/Detail/TitleBar/index.vue +85 -13
- package/components/Resource/Detail/composables.ts +45 -0
- package/components/ResourceDetail/Masthead/__tests__/index.test.ts +70 -0
- package/components/ResourceDetail/{__tests__/Masthead.test.ts → Masthead/__tests__/legacy.test.ts} +3 -3
- package/components/ResourceDetail/Masthead/index.vue +65 -0
- package/components/ResourceDetail/Masthead/latest.vue +44 -0
- package/components/ResourceDetail/{Masthead.vue → Masthead/legacy.vue} +1 -1
- package/components/ResourceDetail/__tests__/index.test.ts +26 -5
- package/components/ResourceDetail/index.vue +33 -17
- package/components/ResourceDetail/legacy.vue +18 -1
- package/components/ResourceList/Masthead.vue +6 -0
- package/components/ResourceList/index.vue +1 -0
- package/components/ResourceTable.vue +6 -1
- package/components/ResourceYaml.vue +15 -2
- package/components/RichTranslation.vue +106 -0
- package/components/SlideInPanelManager.vue +46 -11
- package/components/SortableTable/index.vue +1 -1
- package/components/SortableTable/selection.js +0 -1
- package/components/StateDot/index.vue +28 -0
- package/components/Tabbed/index.vue +17 -16
- package/components/Wizard.vue +4 -2
- package/components/__tests__/ConfigMapSettings.test.ts +376 -0
- package/components/__tests__/GrowlManager.test.ts +0 -25
- package/components/__tests__/PromptRestore.test.ts +1 -65
- package/components/__tests__/RichTranslation.test.ts +115 -0
- package/components/auth/login/ldap.vue +1 -1
- package/components/fleet/FleetApplications.vue +0 -7
- package/components/fleet/FleetClusterTargets/TargetsList.vue +66 -0
- package/components/fleet/FleetClusterTargets/index.vue +455 -0
- package/components/fleet/FleetClusters.vue +25 -6
- package/components/fleet/FleetGitRepoPaths.vue +476 -0
- package/components/fleet/FleetHelmOps.vue +8 -0
- package/components/fleet/FleetRepos.vue +1 -6
- package/components/fleet/FleetResources.vue +4 -5
- package/components/fleet/FleetValuesFrom.vue +295 -0
- package/components/fleet/__tests__/FleetClusterTargets.test.ts +1224 -0
- package/components/fleet/__tests__/FleetGitRepoPaths.test.ts +265 -0
- package/components/fleet/__tests__/FleetOCIStorageSecret.test.ts +13 -13
- package/components/fleet/__tests__/FleetValuesFrom.test.ts +300 -0
- package/components/fleet/dashboard/ResourceCard.vue +1 -0
- package/components/fleet/dashboard/ResourceCardSummary.vue +1 -5
- package/components/fleet/dashboard/ResourceDetails.vue +8 -10
- package/components/fleet/dashboard/ResourcePanel.vue +17 -9
- package/components/form/ArrayList.vue +13 -2
- package/components/form/ChangePassword.vue +3 -1
- package/components/form/FileImageSelector.vue +1 -1
- package/components/form/Footer.vue +10 -4
- package/components/form/KeyValue.vue +81 -43
- package/components/form/LabeledSelect.vue +56 -16
- package/components/form/Labels.vue +90 -17
- package/components/form/MatchExpressions.vue +46 -5
- package/components/form/NameNsDescription.vue +2 -1
- package/components/form/Networking.vue +24 -19
- package/components/form/ResourceLabeledSelect.vue +4 -3
- package/components/form/ResourceSelector.vue +1 -0
- package/components/form/ResourceTabs/index.vue +5 -0
- package/components/form/SecretSelector.vue +9 -2
- package/components/form/Select.vue +57 -19
- package/components/form/SelectOrCreateAuthSecret.vue +6 -3
- package/components/form/SimpleSecretSelector.vue +9 -2
- package/components/form/Taints.vue +21 -2
- package/components/form/UnitInput.vue +8 -0
- package/components/form/ValueFromResource.vue +1 -1
- package/components/form/__tests__/LabeledSelect.test.ts +8 -4
- package/components/form/__tests__/Labels.test.ts +360 -0
- package/components/form/__tests__/MatchExpressions.test.ts +16 -13
- package/components/form/__tests__/Networking.test.ts +116 -0
- package/components/form/__tests__/Select.test.ts +5 -2
- package/components/formatter/FleetApplicationSource.vue +1 -1
- package/components/formatter/PodImages.vue +1 -1
- package/components/formatter/WorkloadHealthScale.vue +1 -1
- package/components/formatter/__tests__/LiveDate.test.ts +10 -2
- package/components/google/AccountAccess.vue +209 -0
- package/components/google/types/gcp.d.ts +136 -0
- package/components/google/types/index.d.ts +101 -0
- package/components/google/util/__mocks__/gcp.ts +465 -0
- package/components/google/util/formatter.ts +82 -0
- package/components/google/util/gcp.ts +134 -0
- package/components/google/util/index.d.ts +11 -0
- package/components/nav/Favorite.vue +1 -1
- package/components/nav/Group.vue +71 -45
- package/components/nav/Header.vue +5 -1
- package/components/nav/NamespaceFilter.vue +13 -1
- package/components/nav/NotificationCenter/Notification.vue +510 -0
- package/components/nav/NotificationCenter/NotificationHeader.vue +112 -0
- package/components/nav/NotificationCenter/index.vue +148 -0
- package/composables/drawer.ts +26 -0
- package/composables/resources.test.ts +63 -0
- package/composables/resources.ts +38 -0
- package/composables/useIsNewDetailPageEnabled.ts +17 -0
- package/config/labels-annotations.js +8 -0
- package/config/pagination-table-headers.js +8 -1
- package/config/product/auth.js +16 -1
- package/config/product/{cis.js → compliance.js} +23 -26
- package/config/product/explorer.js +32 -3
- package/config/product/fleet.js +7 -0
- package/config/product/manager.js +0 -1
- package/config/product/settings.js +22 -11
- package/config/query-params.js +13 -0
- package/config/roles.ts +1 -1
- package/config/router/navigation-guards/authentication.js +51 -2
- package/config/router/routes.js +47 -31
- package/config/settings.ts +21 -3
- package/config/store.js +2 -0
- package/config/system-namespaces.js +1 -1
- package/config/table-headers.js +32 -3
- package/config/types.js +16 -7
- package/config/version.js +1 -1
- package/core/plugin.ts +32 -7
- package/core/types.ts +18 -1
- package/detail/{cis.cattle.io.clusterscan.vue → compliance.cattle.io.clusterscan.vue} +22 -18
- package/detail/management.cattle.io.fleetworkspace.vue +18 -27
- package/detail/management.cattle.io.oidcclient.vue +369 -0
- package/detail/node.vue +2 -2
- package/detail/pod.vue +2 -2
- package/detail/provisioning.cattle.io.cluster.vue +3 -47
- package/detail/service.vue +10 -1
- package/detail/workload/index.vue +8 -2
- package/dialog/ExtensionCatalogUninstallDialog.vue +7 -4
- package/dialog/GenericPrompt.vue +1 -1
- package/dialog/ImportDialog.vue +8 -8
- package/dialog/OidcClientSecretDialog.vue +117 -0
- package/dialog/RotateEncryptionKeyDialog.vue +10 -30
- package/edit/__tests__/cis.cattle.io.clusterscan.test.ts +3 -3
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +5 -2
- package/edit/auth/ldap/__tests__/config.test.ts +14 -0
- package/edit/auth/ldap/config.vue +24 -0
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -1
- package/edit/{cis.cattle.io.clusterscan.vue → compliance.cattle.io.clusterscan.vue} +30 -31
- package/edit/{cis.cattle.io.clusterscanbenchmark.vue → compliance.cattle.io.clusterscanbenchmark.vue} +4 -4
- package/edit/{cis.cattle.io.clusterscanprofile.vue → compliance.cattle.io.clusterscanprofile.vue} +5 -5
- package/edit/configmap.vue +8 -2
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +1 -0
- package/edit/fleet.cattle.io.gitrepo.vue +44 -222
- package/edit/fleet.cattle.io.helmop.vue +44 -269
- package/edit/helm.cattle.io.projecthelmchart.vue +1 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +1 -0
- package/edit/logging-flow/index.vue +1 -0
- package/edit/logging.banzaicloud.io.output/index.vue +1 -0
- package/edit/management.cattle.io.fleetworkspace.vue +1 -0
- package/edit/management.cattle.io.oidcclient.vue +162 -0
- package/edit/management.cattle.io.project.vue +4 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +5 -0
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +1 -0
- package/edit/monitoring.coreos.com.receiver/auth.vue +30 -30
- package/edit/monitoring.coreos.com.receiver/index.vue +1 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -1
- package/edit/monitoring.coreos.com.route.vue +1 -0
- package/edit/namespace.vue +1 -0
- package/edit/networking.istio.io.destinationrule/index.vue +4 -1
- package/edit/networking.k8s.io.ingress/Certificate.vue +12 -12
- package/edit/networking.k8s.io.ingress/__tests__/Certificate.test.ts +165 -0
- package/edit/networking.k8s.io.ingress/index.vue +4 -1
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +7 -2
- package/edit/networking.k8s.io.networkpolicy/index.vue +6 -2
- package/edit/node.vue +1 -0
- package/edit/persistentvolume/index.vue +4 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +3 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +516 -426
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +48 -39
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +5 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +2 -2
- package/edit/resources.cattle.io.restore.vue +1 -1
- package/edit/secret/basic.vue +1 -0
- package/edit/secret/index.vue +127 -15
- package/edit/service.vue +4 -1
- package/edit/serviceaccount.vue +4 -1
- package/edit/storage.k8s.io.storageclass/index.vue +4 -1
- package/edit/workload/index.vue +5 -0
- package/list/{cis.cattle.io.clusterscan.vue → compliance.cattle.io.clusterscan.vue} +2 -2
- package/list/management.cattle.io.oidcclient.vue +108 -0
- package/list/node.vue +2 -0
- package/list/projectsecret.vue +345 -0
- package/list/secret.vue +109 -0
- package/machine-config/amazonec2.vue +3 -24
- package/machine-config/components/GCEImage.vue +374 -0
- package/machine-config/google.vue +617 -0
- package/mixins/__tests__/brand.spec.ts +170 -0
- package/mixins/brand.js +16 -17
- package/mixins/create-edit-view/impl.js +10 -1
- package/mixins/create-edit-view/index.js +5 -0
- package/mixins/resource-fetch-api-pagination.js +24 -8
- package/mixins/resource-fetch.js +3 -1
- package/mixins/vue-select-overrides.js +1 -0
- package/models/cluster.x-k8s.io.machinedeployment.js +11 -2
- package/models/{cis.cattle.io.clusterscan.js → compliance.cattle.io.clusterscan.js} +8 -8
- package/models/{cis.cattle.io.clusterscanbenchmark.js → compliance.cattle.io.clusterscanbenchmark.js} +1 -1
- package/models/{cis.cattle.io.clusterscanprofile.js → compliance.cattle.io.clusterscanprofile.js} +5 -5
- package/models/{cis.cattle.io.clusterscanreport.js → compliance.cattle.io.clusterscanreport.js} +1 -1
- package/models/fleet-application.js +8 -79
- package/models/fleet.cattle.io.cluster.js +13 -2
- package/models/fleet.cattle.io.gitrepo.js +2 -2
- package/models/fleet.cattle.io.helmop.js +9 -39
- package/models/management.cattle.io.fleetworkspace.js +2 -1
- package/models/management.cattle.io.oidcclient.js +18 -0
- package/models/management.cattle.io.registration.js +3 -0
- package/models/provisioning.cattle.io.cluster.js +29 -33
- package/models/secret.js +157 -2
- package/models/service.js +4 -0
- package/models/workload.js +5 -0
- package/package.json +2 -2
- package/pages/about.vue +4 -58
- package/pages/auth/login.vue +1 -1
- package/pages/c/_cluster/apps/charts/AddRepoLink.vue +0 -1
- package/pages/c/_cluster/apps/charts/index.vue +296 -81
- package/pages/c/_cluster/auth/user.retention/index.vue +87 -78
- package/pages/c/_cluster/explorer/index.vue +3 -3
- package/pages/c/_cluster/explorer/projectsecret.vue +34 -0
- package/pages/c/_cluster/explorer/tools/pages/_page.vue +0 -1
- package/pages/c/_cluster/fleet/application/create.vue +3 -2
- package/pages/c/_cluster/fleet/index.vue +94 -57
- package/pages/c/_cluster/fleet/settings/index.vue +229 -0
- package/pages/c/_cluster/longhorn/index.vue +5 -2
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +16 -1
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +2 -2
- package/pages/explorer/resource/detail/configmap.vue +30 -7
- package/pages/explorer/resource/detail/projectsecret.vue +9 -0
- package/pages/explorer/resource/detail/secret.vue +63 -0
- package/pages/home.vue +9 -55
- package/pages/support/index.vue +4 -6
- package/plugins/dashboard-store/__tests__/normalize.test.ts +223 -0
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +191 -0
- package/plugins/dashboard-store/__tests__/utils/normalize-usecases.ts +1526 -0
- package/plugins/dashboard-store/actions.js +19 -5
- package/plugins/dashboard-store/getters.js +4 -0
- package/plugins/dashboard-store/normalize.js +29 -17
- package/plugins/dashboard-store/resource-class.js +68 -19
- package/plugins/steve/steve-pagination-utils.ts +38 -19
- package/plugins/steve/subscribe.js +6 -1
- package/rancher-components/Banner/Banner.vue +13 -0
- package/rancher-components/Form/Checkbox/Checkbox.vue +9 -4
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +1 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +1 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +8 -3
- package/store/auth.js +2 -0
- package/store/catalog.js +23 -1
- package/store/growl.js +97 -8
- package/store/index.js +6 -0
- package/store/notifications.ts +426 -0
- package/store/prefs.js +0 -1
- package/store/type-map.js +19 -16
- package/store/uiplugins.ts +15 -1
- package/types/fleet.d.ts +24 -0
- package/types/kube/kube-api.ts +12 -0
- package/types/notifications/index.ts +74 -0
- package/types/shell/index.d.ts +661 -589
- package/types/store/dashboard-store.types.ts +16 -0
- package/types/store/pagination.types.ts +16 -6
- package/utils/__tests__/create-yaml.test.ts +235 -0
- package/utils/__tests__/fleet.test.ts +148 -0
- package/utils/__tests__/object.test.ts +54 -1
- package/utils/__tests__/string.test.ts +273 -1
- package/utils/__tests__/time.test.ts +31 -0
- package/utils/auth.js +9 -2
- package/utils/create-yaml.js +103 -9
- package/utils/crypto/encryption.ts +103 -0
- package/utils/cspAdaptor.ts +51 -0
- package/utils/fleet.ts +54 -65
- package/utils/object.js +36 -0
- package/utils/pagination-utils.ts +19 -1
- package/utils/release-notes.ts +48 -0
- package/utils/selector-typed.ts +7 -2
- package/utils/string.js +24 -0
- package/utils/{time.js → time.ts} +25 -6
- package/utils/uiplugins.ts +22 -0
- package/utils/validators/formRules/index.ts +3 -0
- package/components/Resource/Detail/TitleBar/composable.ts +0 -31
- package/config/product/legacy.js +0 -62
- package/models/etcdbackup.js +0 -45
- package/pages/c/_cluster/legacy/pages/_page.vue +0 -29
- package/pages/c/_cluster/legacy/project/_page.vue +0 -57
- package/pages/c/_cluster/legacy/project/index.vue +0 -32
- package/pages/c/_cluster/legacy/project/pipelines.vue +0 -96
|
@@ -4,14 +4,10 @@ import jsyaml from 'js-yaml';
|
|
|
4
4
|
import { saferDump } from '@shell/utils/create-yaml';
|
|
5
5
|
import { mapGetters } from 'vuex';
|
|
6
6
|
import { base64Encode } from '@shell/utils/crypto';
|
|
7
|
-
import { exceptionToErrorsArray } from '@shell/utils/error';
|
|
8
7
|
import { _CREATE, _EDIT, _VIEW } from '@shell/config/query-params';
|
|
9
8
|
import { checkSchemasForFindAllHash } from '@shell/utils/auth';
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
AUTH_TYPE, CONFIG_MAP, FLEET, NORMAN, SECRET, VIRTUAL_HARVESTER_PROVIDER
|
|
13
|
-
} from '@shell/config/types';
|
|
14
|
-
import { CAPI, CATALOG, FLEET as FLEET_LABELS } from '@shell/config/labels-annotations';
|
|
9
|
+
import { AUTH_TYPE, CONFIG_MAP, NORMAN, SECRET } from '@shell/config/types';
|
|
10
|
+
import { CATALOG, FLEET as FLEET_LABELS } from '@shell/config/labels-annotations';
|
|
15
11
|
import { SOURCE_TYPE } from '@shell/config/product/fleet';
|
|
16
12
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
17
13
|
import CruResource from '@shell/components/CruResource';
|
|
@@ -26,13 +22,13 @@ import ButtonGroup from '@shell/components/ButtonGroup';
|
|
|
26
22
|
import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
|
|
27
23
|
import YamlEditor, { EDITOR_MODES } from '@shell/components/YamlEditor';
|
|
28
24
|
import SelectOrCreateAuthSecret from '@shell/components/form/SelectOrCreateAuthSecret';
|
|
29
|
-
import ValueFromResource from '@shell/components/form/ValueFromResource';
|
|
30
25
|
import { mapPref, DIFF } from '@shell/store/prefs';
|
|
31
|
-
import { isHarvesterCluster } from '@shell/utils/cluster';
|
|
32
26
|
import { SECRET_TYPES } from '@shell/config/secret';
|
|
33
27
|
import UnitInput from '@shell/components/form/UnitInput';
|
|
28
|
+
import FleetClusterTargets from '@shell/components/fleet/FleetClusterTargets/index.vue';
|
|
34
29
|
import { toSeconds } from '@shell/utils/duration';
|
|
35
30
|
import { DEFAULT_POLLING_INTERVAL, MINIMUM_POLLING_INTERVAL } from '@shell/models/fleet-application';
|
|
31
|
+
import FleetValuesFrom from '@shell/components/fleet/FleetValuesFrom.vue';
|
|
36
32
|
|
|
37
33
|
const VALUES_STATE = {
|
|
38
34
|
YAML: 'YAML',
|
|
@@ -51,6 +47,8 @@ export default {
|
|
|
51
47
|
ButtonGroup,
|
|
52
48
|
Checkbox,
|
|
53
49
|
CruResource,
|
|
50
|
+
FleetClusterTargets,
|
|
51
|
+
FleetValuesFrom,
|
|
54
52
|
YamlEditor,
|
|
55
53
|
LabeledInput,
|
|
56
54
|
LabeledSelect,
|
|
@@ -58,24 +56,14 @@ export default {
|
|
|
58
56
|
Loading,
|
|
59
57
|
NameNsDescription,
|
|
60
58
|
SelectOrCreateAuthSecret,
|
|
61
|
-
ValueFromResource,
|
|
62
59
|
UnitInput,
|
|
63
60
|
},
|
|
64
61
|
|
|
65
62
|
mixins: [CreateEditView, FormValidation],
|
|
66
63
|
|
|
67
64
|
async fetch() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
inStoreType: 'management',
|
|
71
|
-
type: FLEET.CLUSTER
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
allClusterGroups: {
|
|
75
|
-
inStoreType: 'management',
|
|
76
|
-
type: FLEET.CLUSTER_GROUP
|
|
77
|
-
},
|
|
78
|
-
|
|
65
|
+
// Fetch Secrets and ConfigMaps to mask the loading phase in FleetValuesFrom.vue
|
|
66
|
+
checkSchemasForFindAllHash({
|
|
79
67
|
allSecrets: {
|
|
80
68
|
inStoreType: 'management',
|
|
81
69
|
type: SECRET
|
|
@@ -86,13 +74,6 @@ export default {
|
|
|
86
74
|
type: CONFIG_MAP
|
|
87
75
|
}
|
|
88
76
|
}, this.$store);
|
|
89
|
-
|
|
90
|
-
this.allClusters = hash.allClusters || [];
|
|
91
|
-
this.allClusterGroups = hash.allClusterGroups || [];
|
|
92
|
-
this.allSecrets = hash.allSecrets || [];
|
|
93
|
-
this.allConfigMaps = hash.allConfigMaps || [];
|
|
94
|
-
|
|
95
|
-
this.updateTargets();
|
|
96
77
|
},
|
|
97
78
|
|
|
98
79
|
data() {
|
|
@@ -107,21 +88,6 @@ export default {
|
|
|
107
88
|
}
|
|
108
89
|
}
|
|
109
90
|
|
|
110
|
-
const targetInfo = this.value.targetInfo;
|
|
111
|
-
const targetCluster = targetInfo.cluster;
|
|
112
|
-
const targetClusterGroup = targetInfo.clusterGroup;
|
|
113
|
-
const targetAdvanced = targetInfo.advanced;
|
|
114
|
-
|
|
115
|
-
let targetMode = targetInfo.mode;
|
|
116
|
-
|
|
117
|
-
if ( this.realMode === _CREATE ) {
|
|
118
|
-
targetMode = 'all';
|
|
119
|
-
} else if ( targetMode === 'cluster' ) {
|
|
120
|
-
targetMode = `cluster://${ targetCluster }`;
|
|
121
|
-
} else if ( targetMode === 'clusterGroup' ) {
|
|
122
|
-
targetMode = `group://${ targetClusterGroup }`;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
91
|
const correctDriftEnabled = this.value.spec?.correctDrift?.enabled || false;
|
|
126
92
|
|
|
127
93
|
const chartValues = saferDump(clone(this.value.spec.helm.values));
|
|
@@ -129,27 +95,20 @@ export default {
|
|
|
129
95
|
return {
|
|
130
96
|
VALUES_STATE,
|
|
131
97
|
SOURCE_TYPE,
|
|
132
|
-
|
|
133
|
-
allClusterGroups: [],
|
|
134
|
-
allSecrets: [],
|
|
135
|
-
allConfigMaps: [],
|
|
136
|
-
allWorkspaces: [],
|
|
98
|
+
allWorkspaces: [],
|
|
137
99
|
pollingInterval,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
sourceType: this.value.sourceType || SOURCE_TYPE.REPO,
|
|
143
|
-
helmSpecInit: clone(this.value.spec.helm),
|
|
144
|
-
yamlForm: VALUES_STATE.YAML,
|
|
100
|
+
sourceTypeInit: this.value.sourceType,
|
|
101
|
+
sourceType: this.value.sourceType || SOURCE_TYPE.REPO,
|
|
102
|
+
helmSpecInit: clone(this.value.spec.helm),
|
|
103
|
+
yamlForm: VALUES_STATE.YAML,
|
|
145
104
|
chartValues,
|
|
146
|
-
chartValuesInit:
|
|
147
|
-
valuesFrom: FleetUtils.HelmOp.fromValuesFrom(this.value.spec.helm.valuesFrom),
|
|
105
|
+
chartValuesInit: chartValues,
|
|
148
106
|
correctDriftEnabled,
|
|
149
|
-
tempCachedValues:
|
|
150
|
-
doneRouteList:
|
|
151
|
-
isRealModeEdit:
|
|
152
|
-
|
|
107
|
+
tempCachedValues: {},
|
|
108
|
+
doneRouteList: 'c-cluster-fleet-application',
|
|
109
|
+
isRealModeEdit: this.realMode === _EDIT,
|
|
110
|
+
targetsCreated: '',
|
|
111
|
+
fvFormRuleSets: [],
|
|
153
112
|
};
|
|
154
113
|
},
|
|
155
114
|
|
|
@@ -220,10 +179,6 @@ export default {
|
|
|
220
179
|
];
|
|
221
180
|
},
|
|
222
181
|
|
|
223
|
-
isLocal() {
|
|
224
|
-
return this.value.metadata.namespace === 'fleet-local';
|
|
225
|
-
},
|
|
226
|
-
|
|
227
182
|
sourceTypeOptions() {
|
|
228
183
|
return Object.values(SOURCE_TYPE).map((value) => ({
|
|
229
184
|
value,
|
|
@@ -231,17 +186,6 @@ export default {
|
|
|
231
186
|
}));
|
|
232
187
|
},
|
|
233
188
|
|
|
234
|
-
valueFromOptions() {
|
|
235
|
-
return [
|
|
236
|
-
{
|
|
237
|
-
value: 'configMapKeyRef', label: 'ConfigMap Key', hideVariableName: true
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
value: 'secretKeyRef', label: 'Secret key', hideVariableName: true
|
|
241
|
-
},
|
|
242
|
-
];
|
|
243
|
-
},
|
|
244
|
-
|
|
245
189
|
yamlFormOptions() {
|
|
246
190
|
return [{
|
|
247
191
|
labelKey: 'fleet.helmOp.values.yaml.options.edit',
|
|
@@ -277,74 +221,12 @@ export default {
|
|
|
277
221
|
return EDITOR_MODES.EDIT_CODE;
|
|
278
222
|
},
|
|
279
223
|
|
|
280
|
-
targetOptions() {
|
|
281
|
-
const out = [
|
|
282
|
-
{
|
|
283
|
-
label: 'No Clusters',
|
|
284
|
-
value: 'none'
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
label: 'All Clusters in the Workspace',
|
|
288
|
-
value: 'all',
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
label: 'Advanced',
|
|
292
|
-
value: 'advanced'
|
|
293
|
-
},
|
|
294
|
-
];
|
|
295
|
-
|
|
296
|
-
const clusters = this.allClusters
|
|
297
|
-
.filter((x) => {
|
|
298
|
-
return x.metadata.namespace === this.value.metadata.namespace;
|
|
299
|
-
})
|
|
300
|
-
.filter((x) => !isHarvesterCluster(x))
|
|
301
|
-
.map((x) => {
|
|
302
|
-
return { label: x.nameDisplay, value: `cluster://${ x.metadata.name }` };
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
if ( clusters.length ) {
|
|
306
|
-
out.push({ kind: 'divider', disabled: true });
|
|
307
|
-
out.push({
|
|
308
|
-
kind: 'title',
|
|
309
|
-
label: 'Clusters',
|
|
310
|
-
disabled: true,
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
out.push(...clusters);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
const groups = this.allClusterGroups
|
|
317
|
-
.filter((x) => x.metadata.namespace === this.value.metadata.namespace)
|
|
318
|
-
.map((x) => {
|
|
319
|
-
return { label: x.nameDisplay, value: `group://${ x.metadata.name }` };
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
if ( groups.length ) {
|
|
323
|
-
out.push({ kind: 'divider', disabled: true });
|
|
324
|
-
out.push({
|
|
325
|
-
kind: 'title',
|
|
326
|
-
label: 'Cluster Groups',
|
|
327
|
-
disabled: true
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
out.push(...groups);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
return out;
|
|
334
|
-
},
|
|
335
|
-
|
|
336
224
|
showPollingIntervalWarning() {
|
|
337
225
|
return !this.isView && this.value.isPollingEnabled && this.pollingInterval < MINIMUM_POLLING_INTERVAL;
|
|
338
226
|
},
|
|
339
227
|
},
|
|
340
228
|
|
|
341
229
|
watch: {
|
|
342
|
-
'value.metadata.namespace': 'updateTargets',
|
|
343
|
-
targetMode: 'updateTargets',
|
|
344
|
-
targetCluster: 'updateTargets',
|
|
345
|
-
targetClusterGroup: 'updateTargets',
|
|
346
|
-
targetAdvanced: 'updateTargets',
|
|
347
|
-
|
|
348
230
|
workspace(neu) {
|
|
349
231
|
if (this.isCreate) {
|
|
350
232
|
set(this.value, 'metadata.namespace', neu);
|
|
@@ -369,52 +251,8 @@ export default {
|
|
|
369
251
|
this.updateValidationRules(type);
|
|
370
252
|
},
|
|
371
253
|
|
|
372
|
-
updateTargets() {
|
|
373
|
-
|
|
374
|
-
const mode = this.targetMode;
|
|
375
|
-
|
|
376
|
-
let kind, value;
|
|
377
|
-
const match = mode.match(/([^:]+)(:\/\/(.*))?$/);
|
|
378
|
-
|
|
379
|
-
if ( match ) {
|
|
380
|
-
kind = match[1];
|
|
381
|
-
value = match[3];
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
if ( kind === 'all' ) {
|
|
385
|
-
spec.targets = [{
|
|
386
|
-
clusterSelector: {
|
|
387
|
-
matchExpressions: [{
|
|
388
|
-
key: CAPI.PROVIDER,
|
|
389
|
-
operator: 'NotIn',
|
|
390
|
-
values: [
|
|
391
|
-
VIRTUAL_HARVESTER_PROVIDER
|
|
392
|
-
],
|
|
393
|
-
}],
|
|
394
|
-
},
|
|
395
|
-
}];
|
|
396
|
-
} else if ( kind === 'none' ) {
|
|
397
|
-
spec.targets = [];
|
|
398
|
-
} else if ( kind === 'cluster' ) {
|
|
399
|
-
spec.targets = [
|
|
400
|
-
{ clusterName: value },
|
|
401
|
-
];
|
|
402
|
-
} else if ( kind === 'group' ) {
|
|
403
|
-
spec.targets = [
|
|
404
|
-
{ clusterGroup: value }
|
|
405
|
-
];
|
|
406
|
-
} else if ( kind === 'advanced' ) {
|
|
407
|
-
try {
|
|
408
|
-
const parsed = jsyaml.load(this.targetAdvanced);
|
|
409
|
-
|
|
410
|
-
spec.targets = parsed;
|
|
411
|
-
this.targetAdvancedErrors = null;
|
|
412
|
-
} catch (e) {
|
|
413
|
-
this.targetAdvancedErrors = exceptionToErrorsArray(e);
|
|
414
|
-
}
|
|
415
|
-
} else {
|
|
416
|
-
spec.targets = [];
|
|
417
|
-
}
|
|
254
|
+
updateTargets(value) {
|
|
255
|
+
this.value.spec.targets = value;
|
|
418
256
|
},
|
|
419
257
|
|
|
420
258
|
enablePolling(value) {
|
|
@@ -547,20 +385,6 @@ export default {
|
|
|
547
385
|
}
|
|
548
386
|
},
|
|
549
387
|
|
|
550
|
-
addValueFrom() {
|
|
551
|
-
this.valuesFrom.push({ valueFrom: {} });
|
|
552
|
-
},
|
|
553
|
-
|
|
554
|
-
updateValueFrom(index, value) {
|
|
555
|
-
this.valuesFrom[index] = value;
|
|
556
|
-
|
|
557
|
-
this.value.spec.helm.valuesFrom = FleetUtils.HelmOp.toValuesFrom(this.valuesFrom, this.workspace);
|
|
558
|
-
},
|
|
559
|
-
|
|
560
|
-
removeValueFrom(index) {
|
|
561
|
-
this.valuesFrom.splice(index, 1);
|
|
562
|
-
},
|
|
563
|
-
|
|
564
388
|
updateBeforeSave() {
|
|
565
389
|
this.value.spec['correctDrift'] = { enabled: this.correctDriftEnabled };
|
|
566
390
|
},
|
|
@@ -577,12 +401,12 @@ export default {
|
|
|
577
401
|
rules: ['required', 'urlRepository'],
|
|
578
402
|
}, {
|
|
579
403
|
path: 'spec.helm.chart',
|
|
580
|
-
rules: ['required'
|
|
404
|
+
rules: ['required'],
|
|
581
405
|
}];
|
|
582
406
|
break;
|
|
583
407
|
case SOURCE_TYPE.OCI:
|
|
584
408
|
this.fvFormRuleSets = [{
|
|
585
|
-
path: 'spec.helm.
|
|
409
|
+
path: 'spec.helm.repo',
|
|
586
410
|
rules: ['required', 'ociRegistry'],
|
|
587
411
|
}];
|
|
588
412
|
break;
|
|
@@ -720,11 +544,11 @@ export default {
|
|
|
720
544
|
<div class="row mb-20">
|
|
721
545
|
<div class="col span-6">
|
|
722
546
|
<LabeledInput
|
|
723
|
-
v-model:value="value.spec.helm.
|
|
547
|
+
v-model:value="value.spec.helm.repo"
|
|
724
548
|
:mode="mode"
|
|
725
549
|
:label-key="`fleet.helmOp.source.${ sourceType }.chart.label`"
|
|
726
550
|
:placeholder="t(`fleet.helmOp.source.${ sourceType }.chart.placeholder`, null, true)"
|
|
727
|
-
:rules="fvGetAndReportPathRules('spec.helm.
|
|
551
|
+
:rules="fvGetAndReportPathRules('spec.helm.repo')"
|
|
728
552
|
:required="true"
|
|
729
553
|
/>
|
|
730
554
|
</div>
|
|
@@ -789,78 +613,29 @@ export default {
|
|
|
789
613
|
</div>
|
|
790
614
|
|
|
791
615
|
<div class="mb-20">
|
|
792
|
-
<
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
:
|
|
796
|
-
>
|
|
797
|
-
<ValueFromResource
|
|
798
|
-
:value="row"
|
|
799
|
-
:options="valueFromOptions"
|
|
800
|
-
:all-secrets="allSecrets"
|
|
801
|
-
:all-config-maps="allConfigMaps"
|
|
802
|
-
:namespaced="true"
|
|
803
|
-
:mode="mode"
|
|
804
|
-
:show-variable-name="true"
|
|
805
|
-
@remove="removeValueFrom(i)"
|
|
806
|
-
@update:value="updateValueFrom(i, $event)"
|
|
807
|
-
/>
|
|
808
|
-
</div>
|
|
809
|
-
<button
|
|
810
|
-
v-if="!isView"
|
|
811
|
-
v-t="'workload.container.command.addEnvVar'"
|
|
812
|
-
type="button"
|
|
813
|
-
class="btn role-tertiary add"
|
|
814
|
-
data-testid="add-env-var"
|
|
815
|
-
@click="addValueFrom"
|
|
616
|
+
<FleetValuesFrom
|
|
617
|
+
v-model:value="value.spec.helm.valuesFrom"
|
|
618
|
+
:namespace="value.metadata.namespace"
|
|
619
|
+
:mode="realMode"
|
|
816
620
|
/>
|
|
817
621
|
</div>
|
|
818
622
|
</template>
|
|
819
623
|
|
|
820
624
|
<template #target>
|
|
821
|
-
<h2 v-t="
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
:selectable="option => !option.disabled"
|
|
832
|
-
:label="t('fleet.helmOp.target.selectLabel')"
|
|
833
|
-
>
|
|
834
|
-
<template v-slot:option="opt">
|
|
835
|
-
<hr v-if="opt.kind === 'divider'">
|
|
836
|
-
<div v-else-if="opt.kind === 'title'">
|
|
837
|
-
{{ opt.label }}
|
|
838
|
-
</div>
|
|
839
|
-
<div v-else>
|
|
840
|
-
{{ opt.label }}
|
|
841
|
-
</div>
|
|
842
|
-
</template>
|
|
843
|
-
</LabeledSelect>
|
|
844
|
-
</div>
|
|
845
|
-
</div>
|
|
846
|
-
|
|
847
|
-
<div
|
|
848
|
-
v-if="targetMode === 'advanced'"
|
|
849
|
-
class="row mt-10"
|
|
850
|
-
>
|
|
851
|
-
<div class="col span-12">
|
|
852
|
-
<YamlEditor v-model:value="targetAdvanced" />
|
|
853
|
-
</div>
|
|
854
|
-
</div>
|
|
855
|
-
|
|
856
|
-
<Banner
|
|
857
|
-
v-for="(err, i) in targetAdvancedErrors"
|
|
858
|
-
:key="i"
|
|
859
|
-
color="error"
|
|
860
|
-
:label="err"
|
|
861
|
-
/>
|
|
862
|
-
</template>
|
|
625
|
+
<h2 v-t="'fleet.helmOp.target.label'" />
|
|
626
|
+
<FleetClusterTargets
|
|
627
|
+
:targets="value.spec.targets"
|
|
628
|
+
:matching="value.targetClusters"
|
|
629
|
+
:namespace="value.metadata.namespace"
|
|
630
|
+
:mode="realMode"
|
|
631
|
+
:created="targetsCreated"
|
|
632
|
+
@update:value="updateTargets"
|
|
633
|
+
@created="targetsCreated=$event"
|
|
634
|
+
/>
|
|
863
635
|
|
|
636
|
+
<h3 class="mmt-16">
|
|
637
|
+
{{ t('fleet.helmOp.target.additionalOptions') }}
|
|
638
|
+
</h3>
|
|
864
639
|
<div class="row mt-20">
|
|
865
640
|
<div class="col span-6">
|
|
866
641
|
<LabeledInput
|
|
@@ -872,7 +647,7 @@ export default {
|
|
|
872
647
|
</div>
|
|
873
648
|
<div class="col span-6">
|
|
874
649
|
<LabeledInput
|
|
875
|
-
v-model:value="value.spec.
|
|
650
|
+
v-model:value="value.spec.namespace"
|
|
876
651
|
:mode="mode"
|
|
877
652
|
label-key="fleet.helmOp.targetNamespace.label"
|
|
878
653
|
placeholder-key="fleet.helmOp.targetNamespace.placeholder"
|
|
@@ -965,7 +740,7 @@ export default {
|
|
|
965
740
|
:label="t('fleet.helmOp.polling.pollingInterval.label')"
|
|
966
741
|
:mode="mode"
|
|
967
742
|
tooltip-key="fleet.helmOp.polling.pollingInterval.tooltip"
|
|
968
|
-
@
|
|
743
|
+
@blur.capture="updatePollingInterval(pollingInterval)"
|
|
969
744
|
/>
|
|
970
745
|
</div>
|
|
971
746
|
</template>
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
import { defineComponent } from 'vue';
|
|
4
|
+
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
5
|
+
import ArrayList from '@shell/components/form/ArrayList.vue';
|
|
6
|
+
import UnitInput from '@shell/components/form/UnitInput.vue';
|
|
7
|
+
import CruResource from '@shell/components/CruResource.vue';
|
|
8
|
+
import FormValidation from '@shell/mixins/form-validation';
|
|
9
|
+
import NameNsDescription from '@shell/components/form/NameNsDescription.vue';
|
|
10
|
+
|
|
11
|
+
const DEFAULT_REF_TOKEN_EXP = 3600;
|
|
12
|
+
const DEFAULT_TOKEN_EXP = 600;
|
|
13
|
+
|
|
14
|
+
export default defineComponent({
|
|
15
|
+
name: 'EditOidcClient',
|
|
16
|
+
|
|
17
|
+
emits: ['input'],
|
|
18
|
+
|
|
19
|
+
inheritAttrs: false,
|
|
20
|
+
|
|
21
|
+
components: {
|
|
22
|
+
CruResource,
|
|
23
|
+
NameNsDescription,
|
|
24
|
+
ArrayList,
|
|
25
|
+
UnitInput,
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
mixins: [
|
|
29
|
+
CreateEditView,
|
|
30
|
+
FormValidation
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
created() {
|
|
34
|
+
// setup the data for creation scenario
|
|
35
|
+
if (this.isCreate) {
|
|
36
|
+
this.value.spec = {
|
|
37
|
+
refreshTokenExpirationSeconds: DEFAULT_REF_TOKEN_EXP,
|
|
38
|
+
tokenExpirationSeconds: DEFAULT_TOKEN_EXP
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
data() {
|
|
44
|
+
return {
|
|
45
|
+
fvFormRuleSets: [
|
|
46
|
+
{ path: 'metadata.name', rules: ['required'] },
|
|
47
|
+
{ path: 'spec.redirectURIs', rules: ['required', 'genericUrl'] },
|
|
48
|
+
{ path: 'spec.refreshTokenExpirationSeconds', rules: ['required'] },
|
|
49
|
+
{ path: 'spec.tokenExpirationSeconds', rules: ['required'] },
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
computed: {
|
|
55
|
+
finishButtonMode(): string {
|
|
56
|
+
return this.isCreate ? 'registerApplication' : 'saveApplication';
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
doneLocationOverride() {
|
|
60
|
+
if (this.isCreate) {
|
|
61
|
+
const afterCreateRoute = Object.assign({}, this.value.detailLocation);
|
|
62
|
+
|
|
63
|
+
afterCreateRoute.state = { displaySecret: 'true' };
|
|
64
|
+
|
|
65
|
+
return afterCreateRoute;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return undefined;
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<template>
|
|
75
|
+
<CruResource
|
|
76
|
+
:mode="mode"
|
|
77
|
+
:resource="value"
|
|
78
|
+
:doneLocationOverride="doneLocationOverride"
|
|
79
|
+
class="create-edit"
|
|
80
|
+
:finish-button-mode="finishButtonMode"
|
|
81
|
+
:errors="errors"
|
|
82
|
+
:validation-passed="fvFormIsValid"
|
|
83
|
+
@finish="save"
|
|
84
|
+
@error="e=>errors=e"
|
|
85
|
+
>
|
|
86
|
+
<div class="mb-10">
|
|
87
|
+
<!-- app name, app description -->
|
|
88
|
+
<div class="row mt-20">
|
|
89
|
+
<div class="col span-12">
|
|
90
|
+
<NameNsDescription
|
|
91
|
+
:value="value"
|
|
92
|
+
:mode="mode"
|
|
93
|
+
:namespaced="false"
|
|
94
|
+
:name-placeholder="'oidcclient.appName.placeholder'"
|
|
95
|
+
:description-key="'spec.description'"
|
|
96
|
+
:description-placeholder="'oidcclient.appDescription.placeholder'"
|
|
97
|
+
:rules="{ name: fvGetAndReportPathRules('metadata.name'), description: [] }"
|
|
98
|
+
@update:value="$emit('input', $event)"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<!-- cb urls, tokens -->
|
|
103
|
+
<div class="row ">
|
|
104
|
+
<div class="col span-6">
|
|
105
|
+
<ArrayList
|
|
106
|
+
v-model:value="value.spec.redirectURIs"
|
|
107
|
+
class="mt-20"
|
|
108
|
+
:mode="mode"
|
|
109
|
+
:title="t('oidcclient.redirectURIs.label')"
|
|
110
|
+
:a11y-label="t('oidcclient.redirectURIs.label')"
|
|
111
|
+
:add-label="t('oidcclient.redirectURIs.addLabel')"
|
|
112
|
+
:required="true"
|
|
113
|
+
:protip="false"
|
|
114
|
+
:showHeader="true"
|
|
115
|
+
:rules="fvGetAndReportPathRules('spec.redirectURIs')"
|
|
116
|
+
:value-label="''"
|
|
117
|
+
data-testid="oidc-client-cb-urls-list"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<h3 class="mt-40">
|
|
122
|
+
{{ t('oidcclient.tokenExpirationSeconds.label') }}
|
|
123
|
+
</h3>
|
|
124
|
+
<div class="row mt-20 mb-20">
|
|
125
|
+
<div
|
|
126
|
+
class="col span-3"
|
|
127
|
+
data-testid="oidc-client-token-exp-input"
|
|
128
|
+
>
|
|
129
|
+
<UnitInput
|
|
130
|
+
v-model:value="value.spec.tokenExpirationSeconds"
|
|
131
|
+
:mode="mode"
|
|
132
|
+
:increment="1"
|
|
133
|
+
:required="true"
|
|
134
|
+
base-unit="s"
|
|
135
|
+
:positive="true"
|
|
136
|
+
:rules="fvGetAndReportPathRules('spec.tokenExpirationSeconds')"
|
|
137
|
+
:label="t('oidcclient.tokenExpirationSeconds.label')"
|
|
138
|
+
:sub-label="t('oidcclient.tokenExpirationSeconds.placeholder')"
|
|
139
|
+
:aria-label="t('oidcclient.tokenExpirationSeconds.label')"
|
|
140
|
+
/>
|
|
141
|
+
</div>
|
|
142
|
+
<div
|
|
143
|
+
class="col span-3"
|
|
144
|
+
data-testid="oidc-client-ref-token-exp-input"
|
|
145
|
+
>
|
|
146
|
+
<UnitInput
|
|
147
|
+
v-model:value="value.spec.refreshTokenExpirationSeconds"
|
|
148
|
+
:mode="mode"
|
|
149
|
+
:increment="1"
|
|
150
|
+
:required="true"
|
|
151
|
+
base-unit="s"
|
|
152
|
+
:positive="true"
|
|
153
|
+
:rules="fvGetAndReportPathRules('spec.refreshTokenExpirationSeconds')"
|
|
154
|
+
:label="t('oidcclient.refreshTokenExpirationSeconds.label')"
|
|
155
|
+
:sub-label="t('oidcclient.refreshTokenExpirationSeconds.placeholder')"
|
|
156
|
+
:aria-label="t('oidcclient.refreshTokenExpirationSeconds.label')"
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</CruResource>
|
|
162
|
+
</template>
|
|
@@ -195,7 +195,10 @@ export default {
|
|
|
195
195
|
:rules="{ name: fvGetAndReportPathRules('spec.displayName'), namespace: [], description: [] }"
|
|
196
196
|
@update:value="$emit('input', $event)"
|
|
197
197
|
/>
|
|
198
|
-
<Tabbed
|
|
198
|
+
<Tabbed
|
|
199
|
+
:side-tabs="true"
|
|
200
|
+
:use-hash="useTabbedHash"
|
|
201
|
+
>
|
|
199
202
|
<Tab
|
|
200
203
|
v-if="canViewMembers"
|
|
201
204
|
name="members"
|