@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
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { addParams, QueryParams } from '@shell/utils/url';
|
|
2
|
+
import {
|
|
3
|
+
getGKEMachineTypesResponse,
|
|
4
|
+
getGKEClustersResponse,
|
|
5
|
+
getGKENetworksResponse,
|
|
6
|
+
getGKESharedSubnetworksResponse,
|
|
7
|
+
getGKESubnetworksResponse,
|
|
8
|
+
getGKEVersionsResponse,
|
|
9
|
+
GKEZone,
|
|
10
|
+
getGKEZonesResponse,
|
|
11
|
+
getGKEServiceAccountsResponse,
|
|
12
|
+
getGKEImageFamiliesResponse
|
|
13
|
+
} from 'types/gcp';
|
|
14
|
+
import { Store } from 'vuex';
|
|
15
|
+
|
|
16
|
+
// If any of these defaults are not available in the actual list from gcp, the ui will default to the first option in the (sorted) list
|
|
17
|
+
export const DEFAULT_GCP_ZONE = 'us-central1-c';
|
|
18
|
+
export const DEFAULT_GCP_REGION = 'us-central1';
|
|
19
|
+
|
|
20
|
+
export const DEFAULT_GCP_SERVICE_ACCOUNT = 'Compute Engine default service account';
|
|
21
|
+
/**
|
|
22
|
+
* @param resource gcp resource to fetch eg gkeZones
|
|
23
|
+
* @param store vuex store used to dispatch management/request
|
|
24
|
+
* @param cloudCredentialId gcp credential id - will be in the form cattle-global-data:<random string>
|
|
25
|
+
* @param projectId gcp project in which to make the request
|
|
26
|
+
* @param location object containing either gcp region or zone in which to make the request - defaults to DEFAULT_GCP_ZONE if both zone and region are undefined. region preempts zone
|
|
27
|
+
* @param extraParams any additional parameters required by requests
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
function getGKEOptions(resource: string, store: any, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}, clusterId?:string, extraParams?: object ) {
|
|
31
|
+
if (!cloudCredentialId || !projectId) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (!location.zone && !location.region) {
|
|
35
|
+
location.zone = DEFAULT_GCP_ZONE;
|
|
36
|
+
}
|
|
37
|
+
let params: QueryParams = {};
|
|
38
|
+
|
|
39
|
+
if (location.region) {
|
|
40
|
+
params = {
|
|
41
|
+
cloudCredentialId, projectId, region: location.region
|
|
42
|
+
};
|
|
43
|
+
} else if (location.zone) {
|
|
44
|
+
params = {
|
|
45
|
+
cloudCredentialId, projectId, zone: location.zone
|
|
46
|
+
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if (clusterId) {
|
|
50
|
+
params.clusterId = clusterId;
|
|
51
|
+
}
|
|
52
|
+
if (extraParams) {
|
|
53
|
+
params = { ...params, ...extraParams };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const url = addParams(`/meta/${ resource }`, params);
|
|
57
|
+
|
|
58
|
+
return store.dispatch('management/request', {
|
|
59
|
+
url,
|
|
60
|
+
method: 'POST',
|
|
61
|
+
redirectUnauthorized: false,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function getGKEZones(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}): Promise<getGKEZonesResponse> {
|
|
66
|
+
return getGKEOptions('gkeZones', store, cloudCredentialId, projectId, location);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export async function getGKEVersions(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}): Promise<getGKEVersionsResponse> {
|
|
70
|
+
return await getGKEOptions('gkeVersions', store, cloudCredentialId, projectId, location);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function getGKEMachineTypes(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}): Promise<getGKEMachineTypesResponse> {
|
|
74
|
+
return getGKEOptions('gkeMachineTypes', store, cloudCredentialId, projectId, { zone: location.zone });
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function getGKENetworks(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}): Promise<getGKENetworksResponse> {
|
|
78
|
+
return getGKEOptions('gkeNetworks', store, cloudCredentialId, projectId, location);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function getGKESubnetworks(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}): Promise<getGKESubnetworksResponse> {
|
|
82
|
+
return getGKEOptions('gkeSubnetworks', store, cloudCredentialId, projectId, location);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function getGKESharedSubnetworks(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}): Promise<getGKESharedSubnetworksResponse> {
|
|
86
|
+
return getGKEOptions('gkeSharedSubnets', store, cloudCredentialId, projectId, location);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function getGKEClusters(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}): Promise<getGKEClustersResponse> {
|
|
90
|
+
return getGKEOptions('gkeClusters', store, cloudCredentialId, projectId, location);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function getGKEServiceAccounts(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}): Promise<getGKEServiceAccountsResponse> {
|
|
94
|
+
return getGKEOptions('gkeServiceAccounts', store, cloudCredentialId, projectId, location);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* we fetch GKE zones and etrapolate available regions from that list. Zones include a url to the region they are in.
|
|
98
|
+
* @param zone
|
|
99
|
+
* @returns region the zone is contained in
|
|
100
|
+
*/
|
|
101
|
+
export function getGKERegionFromZone(zone: GKEZone): string|undefined {
|
|
102
|
+
const regionUrl = zone.region || '';
|
|
103
|
+
|
|
104
|
+
return regionUrl.split('/').pop();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function getGKEFamiliesFromProject(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}, imageProjects: string, showDeprecated = false): Promise<getGKEServiceAccountsResponse> {
|
|
108
|
+
const extraParams = { imageProjects, showDeprecated };
|
|
109
|
+
|
|
110
|
+
return getGKEOptions('gkeFamiliesFromProject', store, cloudCredentialId, projectId, location, '', extraParams);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function getGKEImageFamilies(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}, imageFamilies: string, imageProject: string, showDeprecated = false): Promise<getGKEImageFamiliesResponse> {
|
|
114
|
+
const extraParams = {
|
|
115
|
+
imageFamilies, imageProject, showDeprecated
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return getGKEOptions('gkeImageFamilies', store, cloudCredentialId, projectId, location, '', extraParams);
|
|
119
|
+
}
|
|
120
|
+
export function getGKEDiskTypes(store: Store<any>, cloudCredentialId: string, projectId: string, location: {zone?: string, region?: string}): Promise<getGKEServiceAccountsResponse> {
|
|
121
|
+
return getGKEOptions('gkeDiskTypes', store, cloudCredentialId, projectId, location);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** The Ember logic around image types is more complicated; it includes docker variants and windows SAC, with version-dependent availability
|
|
125
|
+
* the gke versions supporting those options are well outside the versions that will be supported in rancher 2.9
|
|
126
|
+
* No windows SAC since 2022 https://cloud.google.com/kubernetes-engine/docs/deprecations/windows-server-sac
|
|
127
|
+
* No more docker (non _containerd) since gke 1.24 https://cloud.google.com/kubernetes-engine/docs/concepts/node-images
|
|
128
|
+
* We will simply exclude those options from the UI and display a warning if the user is editing a cluster with one of them already configured
|
|
129
|
+
*/
|
|
130
|
+
export const GKEImageTypes = [
|
|
131
|
+
'COS_CONTAINERD',
|
|
132
|
+
'WINDOWS_LTSC_CONTAINERD',
|
|
133
|
+
'UBUNTU_CONTAINERD',
|
|
134
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GKENetwork, GKESubnetwork } from '@shell/components/google/types/gcp';
|
|
2
|
+
|
|
3
|
+
export interface GKENetworkOption extends Partial<GKENetwork>{
|
|
4
|
+
label: string,
|
|
5
|
+
kind?: string,
|
|
6
|
+
disabled?: boolean,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface GKESubnetworkOption extends Partial<GKESubnetwork>{
|
|
10
|
+
label: string,
|
|
11
|
+
}
|
|
@@ -34,7 +34,7 @@ export default {
|
|
|
34
34
|
:aria-pressed="!!isFavorite"
|
|
35
35
|
class="favorite icon"
|
|
36
36
|
:class="{'icon-star-open': !isFavorite, 'icon-star': isFavorite}"
|
|
37
|
-
|
|
37
|
+
role="button"
|
|
38
38
|
:aria-label="ariaLabel"
|
|
39
39
|
@click.stop.prevent="toggle"
|
|
40
40
|
@keydown.enter.prevent="toggle"
|
package/components/nav/Group.vue
CHANGED
|
@@ -227,33 +227,38 @@ export default {
|
|
|
227
227
|
:class="{[`depth-${depth}`]: true, 'expanded': isExpanded, 'has-children': hasChildren, 'group-highlight': isGroupActive }"
|
|
228
228
|
>
|
|
229
229
|
<div
|
|
230
|
-
v-if="showHeader"
|
|
231
|
-
class="
|
|
232
|
-
:class="{'active': isOverview, 'noHover': !canCollapse || fixedOpen}"
|
|
233
|
-
role="button"
|
|
234
|
-
:tabindex="fixedOpen ? -1 : 0"
|
|
235
|
-
:aria-label="group.labelDisplay || group.label || ''"
|
|
236
|
-
@click="groupSelected()"
|
|
237
|
-
@keyup.enter="groupSelected()"
|
|
238
|
-
@keyup.space="groupSelected()"
|
|
230
|
+
v-if="showHeader || (!onlyHasOverview && canCollapse)"
|
|
231
|
+
class="accordion-item"
|
|
239
232
|
>
|
|
240
|
-
<
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
233
|
+
<div
|
|
234
|
+
v-if="showHeader"
|
|
235
|
+
class="header"
|
|
236
|
+
:class="{'active': isOverview, 'noHover': !canCollapse || fixedOpen}"
|
|
237
|
+
role="button"
|
|
238
|
+
:tabindex="fixedOpen ? -1 : 0"
|
|
239
|
+
:aria-label="group.labelDisplay || group.label || ''"
|
|
240
|
+
@click="groupSelected()"
|
|
241
|
+
@keyup.enter="groupSelected()"
|
|
242
|
+
@keyup.space="groupSelected()"
|
|
243
|
+
>
|
|
244
|
+
<slot name="header">
|
|
245
|
+
<router-link
|
|
246
|
+
v-if="hasOverview"
|
|
247
|
+
:to="group.children[0].route"
|
|
248
|
+
:exact="group.children[0].exact"
|
|
249
|
+
:tabindex="-1"
|
|
250
|
+
>
|
|
251
|
+
<h6>
|
|
252
|
+
<span v-clean-html="group.labelDisplay || group.label" />
|
|
253
|
+
</h6>
|
|
254
|
+
</router-link>
|
|
255
|
+
<h6
|
|
256
|
+
v-else
|
|
257
|
+
>
|
|
248
258
|
<span v-clean-html="group.labelDisplay || group.label" />
|
|
249
259
|
</h6>
|
|
250
|
-
</
|
|
251
|
-
|
|
252
|
-
v-else
|
|
253
|
-
>
|
|
254
|
-
<span v-clean-html="group.labelDisplay || group.label" />
|
|
255
|
-
</h6>
|
|
256
|
-
</slot>
|
|
260
|
+
</slot>
|
|
261
|
+
</div>
|
|
257
262
|
<i
|
|
258
263
|
v-if="!onlyHasOverview && canCollapse"
|
|
259
264
|
class="icon toggle toggle-accordion"
|
|
@@ -330,6 +335,12 @@ export default {
|
|
|
330
335
|
font-size: 14px;
|
|
331
336
|
}
|
|
332
337
|
|
|
338
|
+
> H6 {
|
|
339
|
+
text-transform: none;
|
|
340
|
+
height: 100%;
|
|
341
|
+
padding: 8px 0 8px 16px;
|
|
342
|
+
}
|
|
343
|
+
|
|
333
344
|
> A {
|
|
334
345
|
display: block;
|
|
335
346
|
box-sizing:border-box;
|
|
@@ -348,6 +359,19 @@ export default {
|
|
|
348
359
|
}
|
|
349
360
|
|
|
350
361
|
.accordion {
|
|
362
|
+
.accordion-item {
|
|
363
|
+
position: relative;
|
|
364
|
+
cursor: pointer;
|
|
365
|
+
color: var(--body-text);
|
|
366
|
+
height: 33px;
|
|
367
|
+
outline: none;
|
|
368
|
+
|
|
369
|
+
.toggle-accordion:focus-visible {
|
|
370
|
+
@include focus-outline;
|
|
371
|
+
outline-offset: -6px;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
351
375
|
.header {
|
|
352
376
|
&:focus-visible {
|
|
353
377
|
h6 span {
|
|
@@ -355,10 +379,6 @@ export default {
|
|
|
355
379
|
outline-offset: 2px;
|
|
356
380
|
}
|
|
357
381
|
}
|
|
358
|
-
.toggle-accordion:focus-visible {
|
|
359
|
-
@include focus-outline;
|
|
360
|
-
outline-offset: -6px;
|
|
361
|
-
}
|
|
362
382
|
|
|
363
383
|
&.active {
|
|
364
384
|
color: var(--primary-hover-text);
|
|
@@ -373,6 +393,10 @@ export default {
|
|
|
373
393
|
&:hover {
|
|
374
394
|
background-color: var(--primary-hover-bg);
|
|
375
395
|
}
|
|
396
|
+
|
|
397
|
+
~ I {
|
|
398
|
+
color: var(--primary-hover-text);
|
|
399
|
+
}
|
|
376
400
|
}
|
|
377
401
|
&:hover:not(.active) {
|
|
378
402
|
background-color: var(--nav-hover);
|
|
@@ -395,14 +419,14 @@ export default {
|
|
|
395
419
|
text-transform: none;
|
|
396
420
|
padding: 8px 0 8px 16px;
|
|
397
421
|
}
|
|
422
|
+
}
|
|
398
423
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
424
|
+
.accordion-item > I {
|
|
425
|
+
position: absolute;
|
|
426
|
+
right: 0;
|
|
427
|
+
top: 0;
|
|
428
|
+
padding: 10px 10px 9px 7px;
|
|
429
|
+
user-select: none;
|
|
406
430
|
}
|
|
407
431
|
|
|
408
432
|
> .body {
|
|
@@ -421,9 +445,11 @@ export default {
|
|
|
421
445
|
line-height: 18px;
|
|
422
446
|
padding: 8px 0 7px 5px !important;
|
|
423
447
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
448
|
+
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.accordion-item > I {
|
|
452
|
+
padding: 10px 7px 9px 7px !important;
|
|
427
453
|
}
|
|
428
454
|
|
|
429
455
|
&:deep() .type-link > .label {
|
|
@@ -438,19 +464,19 @@ export default {
|
|
|
438
464
|
display: inline-block;
|
|
439
465
|
padding: 5px 0 5px 5px;
|
|
440
466
|
}
|
|
467
|
+
}
|
|
441
468
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
469
|
+
.accordion-item > I {
|
|
470
|
+
position: absolute;
|
|
471
|
+
right: 0;
|
|
472
|
+
top: 0;
|
|
473
|
+
padding: 6px 8px 6px 8px;
|
|
448
474
|
}
|
|
449
475
|
}
|
|
450
476
|
}
|
|
451
477
|
|
|
452
478
|
.body :deep() > .child.router-link-active,
|
|
453
|
-
.
|
|
479
|
+
.accordion-item :deep() > .child.router-link-exact-active {
|
|
454
480
|
padding: 0;
|
|
455
481
|
|
|
456
482
|
A, A I {
|
|
@@ -22,6 +22,7 @@ import IconOrSvg from '@shell/components/IconOrSvg';
|
|
|
22
22
|
import { wait } from '@shell/utils/async';
|
|
23
23
|
import { configType } from '@shell/models/management.cattle.io.authconfig';
|
|
24
24
|
import HeaderPageActionMenu from './HeaderPageActionMenu.vue';
|
|
25
|
+
import NotificationCenter from './NotificationCenter';
|
|
25
26
|
import {
|
|
26
27
|
RcDropdown,
|
|
27
28
|
RcDropdownItem,
|
|
@@ -40,6 +41,7 @@ export default {
|
|
|
40
41
|
ClusterProviderIcon,
|
|
41
42
|
IconOrSvg,
|
|
42
43
|
AppModal,
|
|
44
|
+
NotificationCenter,
|
|
43
45
|
HeaderPageActionMenu,
|
|
44
46
|
RcDropdown,
|
|
45
47
|
RcDropdownItem,
|
|
@@ -645,7 +647,7 @@ export default {
|
|
|
645
647
|
:data-testid="`extension-header-action-${ action.labelKey || action.label }`"
|
|
646
648
|
role="button"
|
|
647
649
|
tabindex="0"
|
|
648
|
-
:aria-label="action.label"
|
|
650
|
+
:aria-label="action.labelKey ? t(action.labelKey) : action.label"
|
|
649
651
|
@shortkey="handleExtensionAction(action, $event)"
|
|
650
652
|
@click="handleExtensionAction(action, $event)"
|
|
651
653
|
>
|
|
@@ -653,6 +655,7 @@ export default {
|
|
|
653
655
|
class="icon icon-lg"
|
|
654
656
|
:icon="action.icon"
|
|
655
657
|
:src="action.svg"
|
|
658
|
+
:img-alt="action.tooltipKey ? t(action.tooltipKey) : action.labelKey ? t(action.labelKey) : action.label ? action.label : t('generic.imageAlt')"
|
|
656
659
|
color="header"
|
|
657
660
|
/>
|
|
658
661
|
</button>
|
|
@@ -660,6 +663,7 @@ export default {
|
|
|
660
663
|
|
|
661
664
|
<div class="center-self">
|
|
662
665
|
<header-page-action-menu v-if="showPageActions" />
|
|
666
|
+
<NotificationCenter />
|
|
663
667
|
<rc-dropdown
|
|
664
668
|
v-if="showUserMenu"
|
|
665
669
|
:aria-label="t('nav.userMenu.label')"
|
|
@@ -63,6 +63,9 @@ export default {
|
|
|
63
63
|
return this.$store.getters[`${ this.currentProduct.inStore }/paginationEnabled`](this.$route.params?.resource) ? paginationUtils.validNsProjectFilters : null;
|
|
64
64
|
},
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Create visible options (filtered version of `options`)
|
|
68
|
+
*/
|
|
66
69
|
filtered() {
|
|
67
70
|
let out = this.options;
|
|
68
71
|
|
|
@@ -142,6 +145,9 @@ export default {
|
|
|
142
145
|
return createNamespaceFilterKey(this.$store.getters['clusterId'], this.currentProduct);
|
|
143
146
|
},
|
|
144
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Create options (see `filtered` for visible collection)
|
|
150
|
+
*/
|
|
145
151
|
options() {
|
|
146
152
|
const t = this.$store.getters['i18n/t'];
|
|
147
153
|
let out = [];
|
|
@@ -341,6 +347,11 @@ export default {
|
|
|
341
347
|
})
|
|
342
348
|
.filter((x) => !!x);
|
|
343
349
|
|
|
350
|
+
if (filters.length !== values.length) {
|
|
351
|
+
// filter has changed, ensure we persist these to store
|
|
352
|
+
this.value = filters;
|
|
353
|
+
}
|
|
354
|
+
|
|
344
355
|
return filters;
|
|
345
356
|
},
|
|
346
357
|
|
|
@@ -401,7 +412,7 @@ export default {
|
|
|
401
412
|
*
|
|
402
413
|
* This is caused by churn of the filtered and options computed properties causing multiple renders for each action.
|
|
403
414
|
*
|
|
404
|
-
* To break this multiple-render per cycle behaviour
|
|
415
|
+
* To break this multiple-render per cycle behaviour detach `filtered` from the value used in `v-for`.
|
|
405
416
|
*
|
|
406
417
|
*/
|
|
407
418
|
filtered(neu) {
|
|
@@ -700,6 +711,7 @@ export default {
|
|
|
700
711
|
:aria-activedescendant="containerId"
|
|
701
712
|
class="ns-filter"
|
|
702
713
|
data-testid="namespaces-filter"
|
|
714
|
+
:aria-label="t('generic.namespaceFilter')"
|
|
703
715
|
tabindex="0"
|
|
704
716
|
@mousedown.prevent
|
|
705
717
|
@keydown.self.down.enter.space.prevent="open"
|