@rancher/shell 3.0.5-rc.6 → 3.0.5-rc.8
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/brand/classic/metadata.json +3 -0
- package/assets/styles/app.scss +1 -0
- package/assets/styles/base/_color.scss +16 -0
- package/assets/styles/base/_helpers.scss +10 -0
- package/assets/styles/base/_variables.scss +18 -12
- package/assets/styles/fonts/_icons.scss +1 -32
- package/assets/styles/global/_layout.scss +1 -1
- package/assets/styles/themes/_dark.scss +262 -258
- package/assets/styles/themes/_light.scss +538 -509
- package/assets/styles/themes/_modern.scss +914 -0
- package/assets/translations/en-us.yaml +110 -29
- package/chart/__tests__/S3.test.ts +2 -1
- package/cloud-credential/generic.vue +18 -10
- package/cloud-credential/harvester.vue +1 -9
- package/components/AdvancedSection.vue +8 -0
- package/components/ChartReadme.vue +17 -7
- package/components/CodeMirror.vue +1 -1
- package/components/Drawer/Chrome.vue +0 -1
- package/components/Drawer/ResourceDetailDrawer/__tests__/composables.test.ts +27 -28
- package/components/Drawer/ResourceDetailDrawer/composables.ts +4 -24
- package/components/Drawer/ResourceDetailDrawer/index.vue +18 -4
- package/components/InstallHelmCharts.vue +656 -0
- package/components/LazyImage.vue +60 -4
- package/components/Loading.vue +1 -1
- package/components/LocaleSelector.vue +7 -2
- package/components/Markdown.vue +4 -0
- package/components/PaginatedResourceTable.vue +46 -1
- package/components/PromptRestore.vue +22 -44
- package/components/Resource/Detail/Masthead/composable.ts +16 -0
- package/components/Resource/Detail/Masthead/index.vue +37 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/composable.ts +10 -2
- package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +26 -7
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +8 -1
- package/components/Resource/Detail/Metadata/KeyValue.vue +12 -10
- package/components/Resource/Detail/Metadata/Rectangle.vue +3 -1
- package/components/Resource/Detail/Metadata/__tests__/composables.test.ts +10 -17
- package/components/Resource/Detail/Metadata/composables.ts +9 -7
- package/components/Resource/Detail/Metadata/index.vue +17 -2
- package/components/Resource/Detail/Page.vue +35 -21
- package/components/Resource/Detail/SpacedRow.vue +1 -1
- package/components/Resource/Detail/TitleBar/__tests__/composables.test.ts +8 -9
- package/components/Resource/Detail/TitleBar/composables.ts +5 -5
- package/components/Resource/Detail/TitleBar/index.vue +12 -3
- package/components/ResourceDetail/Masthead/legacy.vue +1 -1
- package/components/ResourceDetail/index.vue +569 -72
- package/components/ResourceList/index.vue +1 -0
- package/components/ResourceTable.vue +6 -1
- package/components/ResourceYaml.vue +1 -1
- package/components/RichTranslation.vue +106 -0
- package/components/SlideInPanelManager.vue +13 -10
- package/components/SortableTable/index.vue +5 -5
- package/components/SortableTable/selection.js +0 -1
- package/components/Tabbed/index.vue +35 -4
- package/components/__tests__/LazyImage.spec.ts +121 -0
- package/components/__tests__/PromptRestore.test.ts +1 -65
- package/components/__tests__/RichTranslation.test.ts +115 -0
- package/components/fleet/FleetStatus.vue +4 -0
- package/components/fleet/dashboard/ResourcePanel.vue +2 -1
- package/components/form/ClusterAppearance.vue +5 -0
- package/components/form/FileImageSelector.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +1 -0
- package/components/form/Networking.vue +24 -19
- package/components/form/ProjectMemberEditor.vue +1 -1
- package/components/form/ResourceLabeledSelect.vue +22 -8
- package/components/form/ResourceTabs/index.vue +20 -0
- package/components/form/SecretSelector.vue +9 -0
- package/components/form/SelectOrCreateAuthSecret.vue +6 -3
- package/components/form/__tests__/Networking.test.ts +116 -0
- package/components/form/labeled-select-utils/labeled-select-pagination.ts +3 -38
- package/components/formatter/FleetApplicationSource.vue +25 -17
- package/components/formatter/PodImages.vue +1 -1
- package/components/formatter/__tests__/LiveDate.test.ts +10 -2
- package/components/google/AccountAccess.vue +44 -46
- package/components/nav/Favorite.vue +4 -0
- package/components/nav/Group.vue +4 -1
- package/components/nav/NotificationCenter/Notification.vue +1 -27
- package/components/nav/WindowManager/index.vue +3 -3
- package/composables/resources.ts +2 -2
- package/config/labels-annotations.js +3 -2
- package/config/pagination-table-headers.js +8 -1
- package/config/product/explorer.js +27 -2
- package/config/product/manager.js +0 -1
- package/config/query-params.js +10 -0
- package/config/router/routes.js +21 -1
- package/config/system-namespaces.js +1 -1
- package/config/table-headers.js +30 -1
- package/config/types.js +1 -1
- package/config/version.js +1 -1
- package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +11 -0
- package/detail/__tests__/workload.test.ts +164 -0
- package/detail/configmap.vue +33 -75
- package/detail/projectsecret.vue +11 -0
- package/detail/provisioning.cattle.io.cluster.vue +351 -369
- package/detail/secret.vue +49 -308
- package/detail/workload/index.vue +38 -21
- package/dialog/InstallExtensionDialog.vue +8 -5
- package/dialog/RotateEncryptionKeyDialog.vue +10 -30
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +224 -0
- package/edit/auth/ldap/__tests__/config.test.ts +14 -0
- package/edit/auth/ldap/config.vue +24 -0
- package/edit/compliance.cattle.io.clusterscan.vue +1 -1
- package/edit/configmap.vue +4 -1
- package/edit/fleet.cattle.io.gitrepo.vue +5 -6
- package/edit/fleet.cattle.io.helmop.vue +78 -56
- package/edit/logging.banzaicloud.io.output/index.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +5 -6
- package/edit/networking.k8s.io.ingress/Certificate.vue +20 -22
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +8 -3
- package/edit/networking.k8s.io.ingress/Rule.vue +2 -5
- package/edit/networking.k8s.io.ingress/RulePath.vue +17 -11
- package/edit/networking.k8s.io.ingress/__tests__/Certificate.test.ts +165 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +11 -10
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +1 -3
- package/edit/networking.k8s.io.networkpolicy/index.vue +17 -17
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +3 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +123 -61
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +9 -7
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +22 -13
- package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +10 -12
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +39 -38
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +41 -19
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +16 -3
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +32 -33
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryMirrors.vue +9 -10
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +1 -3
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +16 -9
- package/edit/secret/basic.vue +1 -0
- package/edit/secret/index.vue +126 -15
- package/edit/workload/index.vue +5 -14
- package/list/projectsecret.vue +345 -0
- package/list/provisioning.cattle.io.cluster.vue +1 -69
- package/list/secret.vue +109 -0
- package/machine-config/__tests__/vmwarevsphere.test.ts +5 -7
- package/machine-config/google.vue +9 -1
- package/machine-config/vmwarevsphere.vue +7 -17
- package/mixins/__tests__/brand.spec.ts +2 -2
- package/mixins/chart.js +0 -2
- package/mixins/create-edit-view/impl.js +10 -1
- package/mixins/resource-fetch-api-pagination.js +11 -12
- package/mixins/resource-fetch.js +3 -1
- package/models/__tests__/chart.test.ts +111 -80
- package/models/__tests__/fleet.cattle.io.helmop.test.ts +224 -0
- package/models/__tests__/node.test.ts +7 -63
- package/models/catalog.cattle.io.app.js +1 -1
- package/models/catalog.cattle.io.operation.js +1 -1
- package/models/chart.js +36 -20
- package/models/cloudcredential.js +2 -163
- package/models/cluster/node.js +7 -7
- package/models/cluster.x-k8s.io.machine.js +3 -3
- package/models/cluster.x-k8s.io.machinedeployment.js +11 -2
- package/models/compliance.cattle.io.clusterscan.js +2 -2
- package/models/configmap.js +4 -0
- package/models/constraints.gatekeeper.sh.constraint.js +1 -1
- package/models/fleet-application.js +0 -17
- package/models/fleet.cattle.io.cluster.js +2 -2
- package/models/fleet.cattle.io.gitrepo.js +15 -1
- package/models/fleet.cattle.io.helmop.js +26 -22
- package/models/management.cattle.io.setting.js +4 -0
- package/models/persistentvolumeclaim.js +1 -1
- package/models/pod.js +2 -2
- package/models/provisioning.cattle.io.cluster.js +39 -67
- package/models/rke.cattle.io.etcdsnapshot.js +1 -1
- package/models/secret.js +161 -2
- package/models/storage.k8s.io.storageclass.js +2 -2
- package/models/workload.js +3 -3
- package/package.json +11 -10
- package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +1 -0
- package/pages/c/_cluster/apps/charts/AppChartCardSubHeader.vue +4 -1
- package/pages/c/_cluster/apps/charts/__tests__/AppChartCardFooter.spec.js +41 -0
- package/pages/c/_cluster/apps/charts/chart.vue +422 -174
- package/pages/c/_cluster/apps/charts/index.vue +46 -35
- package/pages/c/_cluster/apps/charts/install.vue +1 -1
- package/pages/c/_cluster/explorer/projectsecret.vue +24 -0
- package/pages/c/_cluster/fleet/__tests__/index.test.ts +608 -314
- package/pages/c/_cluster/fleet/index.vue +103 -45
- package/pages/c/_cluster/manager/cloudCredential/index.vue +2 -59
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +10 -3
- package/pages/c/_cluster/uiplugins/index.vue +36 -25
- 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 +42 -22
- package/plugins/dashboard-store/normalize.js +29 -17
- package/plugins/dashboard-store/resource-class.js +83 -17
- package/plugins/steve/__tests__/getters.test.ts +1 -1
- package/plugins/steve/__tests__/subscribe.spec.ts +259 -1
- package/plugins/steve/getters.js +8 -2
- package/plugins/steve/resourceWatcher.js +10 -3
- package/plugins/steve/steve-pagination-utils.ts +14 -3
- package/plugins/steve/subscribe.js +192 -19
- package/plugins/steve/worker/web-worker.advanced.js +2 -0
- package/rancher-components/Card/Card.vue +0 -18
- package/rancher-components/Pill/RcStatusBadge/RcStatusBadge.test.ts +15 -0
- package/rancher-components/Pill/RcStatusBadge/RcStatusBadge.vue +65 -0
- package/rancher-components/Pill/RcStatusBadge/index.ts +2 -0
- package/rancher-components/Pill/RcStatusBadge/types.ts +5 -0
- package/rancher-components/Pill/RcStatusIndicator/RcStatusIndicator.test.ts +33 -0
- package/rancher-components/Pill/RcStatusIndicator/RcStatusIndicator.vue +75 -0
- package/rancher-components/Pill/RcStatusIndicator/index.ts +2 -0
- package/rancher-components/Pill/RcStatusIndicator/types.ts +7 -0
- package/rancher-components/Pill/types.ts +2 -0
- package/rancher-components/RcButton/RcButton.vue +1 -1
- package/rancher-components/RcDropdown/RcDropdown.test.ts +98 -0
- package/rancher-components/RcDropdown/RcDropdown.vue +5 -0
- package/rancher-components/RcDropdown/RcDropdownItem.vue +7 -1
- package/rancher-components/RcDropdown/RcDropdownItemCheckbox.vue +2 -1
- package/rancher-components/RcDropdown/RcDropdownItemSelect.vue +2 -1
- package/rancher-components/RcDropdown/useDropdownContext.ts +21 -0
- package/rancher-components/RcDropdown/useDropdownItem.ts +30 -1
- package/rancher-components/RcItemCard/RcItemCard.test.ts +20 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +40 -6
- package/store/__tests__/catalog.test.ts +93 -1
- package/store/aws.js +19 -8
- package/store/catalog.js +8 -3
- package/types/kube/kube-api.ts +12 -0
- package/types/resources/settings.d.ts +1 -1
- package/types/shell/index.d.ts +643 -585
- package/types/store/pagination.types.ts +16 -6
- package/types/uiplugins.ts +73 -0
- package/utils/__tests__/back-off.test.ts +354 -0
- package/utils/__tests__/create-yaml.test.ts +235 -0
- package/utils/__tests__/kontainer.test.ts +19 -0
- package/utils/__tests__/uiplugins.test.ts +84 -0
- package/utils/back-off.ts +176 -0
- package/utils/create-yaml.js +103 -9
- package/utils/dynamic-importer.js +8 -0
- package/utils/kontainer.ts +3 -5
- package/utils/pagination-utils.ts +18 -0
- package/utils/style.ts +3 -0
- package/utils/uiplugins.ts +29 -2
- package/utils/validators/__tests__/setting.test.js +92 -0
- package/utils/validators/formRules/__tests__/index.test.ts +88 -7
- package/utils/validators/formRules/index.ts +83 -8
- package/utils/validators/setting.js +17 -0
- package/cloud-credential/__tests__/harvester.test.ts +0 -18
- package/components/ResourceDetail/__tests__/index.test.ts +0 -135
- package/components/ResourceDetail/legacy.vue +0 -562
- package/components/formatter/CloudCredExpired.vue +0 -69
- package/models/etcdbackup.js +0 -45
- package/pages/explorer/resource/detail/configmap.vue +0 -42
- package/pages/explorer/resource/detail/secret.vue +0 -50
- package/utils/aws.js +0 -0
|
@@ -607,6 +607,9 @@ authConfig:
|
|
|
607
607
|
starttls:
|
|
608
608
|
label: Start TLS
|
|
609
609
|
tip: Upgrades non-encrypted connections by wrapping with TLS during the connection process. Can not be used in conjunction with TLS.
|
|
610
|
+
searchUsingServiceAccount:
|
|
611
|
+
label: Enable Service Account Search
|
|
612
|
+
tip: When enabled, Rancher will use the service account instead of the user account to search for users and groups.
|
|
610
613
|
tls: TLS
|
|
611
614
|
userEnabledAttribute: User Enabled Attribute
|
|
612
615
|
userMemberAttribute: User Member Attribute
|
|
@@ -1046,7 +1049,9 @@ catalog:
|
|
|
1046
1049
|
label: Chart Versions
|
|
1047
1050
|
showMore: Show More
|
|
1048
1051
|
showLess: Show Less
|
|
1049
|
-
|
|
1052
|
+
missingVersionDate: No date available for this chart version
|
|
1053
|
+
home: Homepage
|
|
1054
|
+
repository: Repository Page
|
|
1050
1055
|
maintainers: Maintainers
|
|
1051
1056
|
related: Related
|
|
1052
1057
|
chartUrls: Chart
|
|
@@ -1074,10 +1079,8 @@ catalog:
|
|
|
1074
1079
|
header: Charts
|
|
1075
1080
|
noCharts:
|
|
1076
1081
|
title: No charts to show
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
messagePart3: ', and ensure you have the right <a tabindex="0" href={repositoriesUrl} rel="noopener noreferrer nofollow">repositories</a> in place.'
|
|
1080
|
-
messagePart4: 'Want to learn more about Helm Charts and Apps? Read our <a tabindex="0" href="{docsBase}/how-to-guides/new-user-guides/helm-charts-in-rancher" target="_blank" class="secondary-text-link">documentation <i class="icon icon-external-link"></i></a>.'
|
|
1082
|
+
message: '<b>Tips:</b> undo the last filter you applied or <resetAllFilters>clear all filters</resetAllFilters>, and ensure you have the right <repositoriesUrl>repositories</repositoriesUrl> in place.'
|
|
1083
|
+
docsMessage: 'Want to learn more about Helm Charts and Apps? Read our <docsUrl>documentation</docsUrl>.'
|
|
1081
1084
|
noWindows: Your repos do not contain any charts capable of being deployed on a cluster with Windows nodes.
|
|
1082
1085
|
noWindowsAndLinux: Your repos do not contain any charts capable of being deployed on a cluster with both Windows and Linux worker nodes.
|
|
1083
1086
|
operatingSystems:
|
|
@@ -1091,6 +1094,8 @@ catalog:
|
|
|
1091
1094
|
label: Add new
|
|
1092
1095
|
ariaLabel: Add a new repository
|
|
1093
1096
|
appChartCard:
|
|
1097
|
+
subHeaderItem:
|
|
1098
|
+
missingVersionDate: Last updated date is not available for this chart
|
|
1094
1099
|
footerItem:
|
|
1095
1100
|
ariaLabel: Apply filter
|
|
1096
1101
|
statusFilterCautions:
|
|
@@ -1116,11 +1121,50 @@ catalog:
|
|
|
1116
1121
|
alphaDescending: Chart name, Z → A
|
|
1117
1122
|
refreshButton:
|
|
1118
1123
|
label: Refresh all repositories
|
|
1124
|
+
findSimilar:
|
|
1125
|
+
message: "Find similar charts based on this {type}"
|
|
1126
|
+
types:
|
|
1127
|
+
keyword: keyword
|
|
1128
|
+
repo: repository
|
|
1129
|
+
category: category
|
|
1130
|
+
tag: tag
|
|
1119
1131
|
install:
|
|
1120
1132
|
action:
|
|
1121
1133
|
goToUpgrade: Edit/Upgrade
|
|
1122
1134
|
appReadmeMissing: This chart doesn't have any additional chart information.
|
|
1123
1135
|
appReadmeTitle: Chart Information (Helm README)
|
|
1136
|
+
button:
|
|
1137
|
+
alreadyInstalled: '{chart} version {version} is already installed.'
|
|
1138
|
+
viewDetails: View chart details
|
|
1139
|
+
customizeInstall: Customize Install Options
|
|
1140
|
+
viewLogs: View Installation Logs
|
|
1141
|
+
waitForLogs: Installation initialized; waiting for logs...
|
|
1142
|
+
canNotCreateRepos: It looks like you don't have permission to add repositories and install helm charts.
|
|
1143
|
+
canNotInstallApps: The {repo} repository has been added, but you don't have permission to install charts from it.
|
|
1144
|
+
stages:
|
|
1145
|
+
addRepo:
|
|
1146
|
+
action: Add the {repo} repository
|
|
1147
|
+
waiting: Adding {repo} repository...
|
|
1148
|
+
success: Repository added
|
|
1149
|
+
error: Error adding {repo} repository
|
|
1150
|
+
loadCharts:
|
|
1151
|
+
action: Fetch {repo} repository chart(s)
|
|
1152
|
+
waiting: Fetching {repo} repository chart(s)...
|
|
1153
|
+
success: '{chart} found'
|
|
1154
|
+
error: '{chart} chart not found - Try again?'
|
|
1155
|
+
installChart:
|
|
1156
|
+
action: Install {chart}
|
|
1157
|
+
waiting: Installing {chart}...
|
|
1158
|
+
success: '{chart} installation started'
|
|
1159
|
+
error: Error installing {chart}
|
|
1160
|
+
waitForLogs:
|
|
1161
|
+
action: View installation logs
|
|
1162
|
+
waiting: Waiting for installation logs...
|
|
1163
|
+
error: Unable to load installation logs
|
|
1164
|
+
errors:
|
|
1165
|
+
fetchChart: Error retrieving chart from repository
|
|
1166
|
+
alreadyInstalled: Chart already installed
|
|
1167
|
+
timeoutWaiting: Timed out waiting for logs
|
|
1124
1168
|
chart: Chart
|
|
1125
1169
|
warning:
|
|
1126
1170
|
managed:
|
|
@@ -1615,6 +1659,12 @@ cluster:
|
|
|
1615
1659
|
label: KubeconfigContent
|
|
1616
1660
|
placeholder: 'Namespace/Name'
|
|
1617
1661
|
cluster: Imported Harvester Cluster
|
|
1662
|
+
enableTpm: Enable TPM
|
|
1663
|
+
enableCpuPinning: Enable CPU Pinning
|
|
1664
|
+
cpuPinningTooltip: Enable CPU Pinning brings better performance and reduce latency for the harvester virtual machine
|
|
1665
|
+
cpuManagerWarning: You must enable CPU Manager for at least one node in harvester host page to enable CPU Pinning for VM
|
|
1666
|
+
secureBoot: Secure Boot
|
|
1667
|
+
enableEfi: Booting in EFI mode
|
|
1618
1668
|
installGuestAgent: Install guest agent
|
|
1619
1669
|
tokenExpirationWarning: 'Warning: Harvester Cloud Credentials use an underlying authentication token that may have an expiry time - please see the following <a href="https://harvesterhci.io/kb/renew_harvester_cloud_credentials" target="_blank" rel="noopener nofollow">knowledge base article</a> for possible implications on management operations.'
|
|
1620
1670
|
description:
|
|
@@ -1654,6 +1704,9 @@ cluster:
|
|
|
1654
1704
|
sshUser:
|
|
1655
1705
|
placeholder: e.g. ubuntu
|
|
1656
1706
|
toolTip: SSH user to login with the selected OS image.
|
|
1707
|
+
kubeconfigSecret:
|
|
1708
|
+
nameRequired: Cluster name is required.
|
|
1709
|
+
error: 'Error generating Harvester kubeconfig secret: {err}'
|
|
1657
1710
|
haveOneOwner: There must be at least one member with the Owner role.
|
|
1658
1711
|
import:
|
|
1659
1712
|
warningBanner: 'You should not import a cluster which has already been connected to another instance of Rancher as it will lead to data corruption.'
|
|
@@ -1995,6 +2048,9 @@ cluster:
|
|
|
1995
2048
|
location:
|
|
1996
2049
|
zone:
|
|
1997
2050
|
label: Zone
|
|
2051
|
+
preemptible:
|
|
2052
|
+
label: Make VM instance preemptible
|
|
2053
|
+
tooltip: Preemptible machines offer significant cost savings, but may be abruptly stopped when Google Compute Engine needs to reclaim the compute resources for higher-priority VMs.
|
|
1998
2054
|
scopes:
|
|
1999
2055
|
add: Add scope
|
|
2000
2056
|
label: Scopes
|
|
@@ -2083,7 +2139,7 @@ cluster:
|
|
|
2083
2139
|
banner:
|
|
2084
2140
|
warning: 'This cluster contains a machineSelectorConfig, which this form does not fully support; use the YAML editor to manage the full configuration.'
|
|
2085
2141
|
os: 'You are attempting to add a {newOS} worker node to a cluster with one or more {existingOS} worker nodes: some installed apps may need to be upgraded or removed.'
|
|
2086
|
-
rke2-k3-reprovisioning: 'Making changes to cluster configuration may result in nodes reprovisioning. For more information see the <a href="{docsBase}/how-to-guides/new-user-guides/launch-kubernetes-with-rancher
|
|
2142
|
+
rke2-k3-reprovisioning: 'Making changes to cluster configuration may result in nodes reprovisioning. For more information see the <a href="{docsBase}/how-to-guides/new-user-guides/launch-kubernetes-with-rancher#launching-kubernetes-on-new-nodes-in-an-infrastructure-provider" target="_blank" rel="noopener nofollow">documentation</a>.'
|
|
2087
2143
|
desiredNodeGroupWarning: There are 0 nodes available to run the cluster agent. The cluster will not become active until at least one node is available.
|
|
2088
2144
|
haveArgInfo: Configuration information is not available for the selected Kubernetes version. The options available on this screen will be limited; you may want to use the YAML editor.
|
|
2089
2145
|
cloudProviderAddConfig: 'On Kubernetes 1.27 or greater, the <b>Amazon</b> Cloud Provider requires additional configuration. See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/amazon" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
|
|
@@ -2096,13 +2152,6 @@ cluster:
|
|
|
2096
2152
|
}
|
|
2097
2153
|
rke1DeprecationMessage: 'Rancher Kubernetes Engine (RKE / RKE1) has reached end of life and these clusters are no longer supported. We recommend replatforming RKE1 clusters to RKE2 to ensure continued support and security updates. Learn more about the transition <a href="https://www.suse.com/support/kb/doc/?id=000021518" target="_blank" rel="noopener noreferrer nofollow">here</a>.'
|
|
2098
2154
|
rke1Unsupported: RKE1 Clusters are no longer supported
|
|
2099
|
-
cloudCredentials:
|
|
2100
|
-
renew: Renew Cloud Credentials
|
|
2101
|
-
expired: Cloud Credential expired, please Renew Cloud Credentials
|
|
2102
|
-
expiring: Cloud Credential will expire on { expires }, please Renew Cloud Credentials
|
|
2103
|
-
banners:
|
|
2104
|
-
expiring: "{count} {count, plural, =1 { Cluster has a Cloud Credential that expires soon} other { Clusters have Cloud Credentials that expire soon}}, please Renew Cloud {count, plural, =1 { Credential} other { Credentials}}"
|
|
2105
|
-
expired: "{count} {count, plural, =1 { Cluster has a Cloud Credential that has expired} other { Clusters have Cloud Credentials that have expired}}, please Renew Cloud {count, plural, =1 { Credential} other { Credentials}}"
|
|
2106
2155
|
|
|
2107
2156
|
architecture:
|
|
2108
2157
|
label:
|
|
@@ -2302,6 +2351,7 @@ cluster:
|
|
|
2302
2351
|
server: Server compliance Profile
|
|
2303
2352
|
agent: Compliance Profile
|
|
2304
2353
|
override: Allow the default Pod Security Admission Configuration Template to be overridden when using a compliance profile
|
|
2354
|
+
warning: After saving changes, and if this cluster has already been provisioned, please restart the rke2-server service on all nodes to ensure etcd file permissions are correct
|
|
2305
2355
|
defaultPodSecurityPolicyTemplateName:
|
|
2306
2356
|
label: Default Pod Security Policy
|
|
2307
2357
|
option: Default - RKE2 Embedded
|
|
@@ -2382,6 +2432,19 @@ cluster:
|
|
|
2382
2432
|
true: Exposed to the public interface
|
|
2383
2433
|
s3backups:
|
|
2384
2434
|
label: Save Backups to S3
|
|
2435
|
+
s3config:
|
|
2436
|
+
bucket:
|
|
2437
|
+
label: Bucket
|
|
2438
|
+
folder:
|
|
2439
|
+
label: Folder
|
|
2440
|
+
region:
|
|
2441
|
+
label: Region
|
|
2442
|
+
endpoint:
|
|
2443
|
+
label: Endpoint
|
|
2444
|
+
skipSSLVerify:
|
|
2445
|
+
label: Accept any certificate (insecure)
|
|
2446
|
+
endpointCA:
|
|
2447
|
+
label: Endpoint CA Cert
|
|
2385
2448
|
k3s:
|
|
2386
2449
|
systemService:
|
|
2387
2450
|
coredns: 'CoreDNS'
|
|
@@ -2625,8 +2688,8 @@ etcdInfoBanner:
|
|
|
2625
2688
|
|
|
2626
2689
|
fleet:
|
|
2627
2690
|
settings:
|
|
2628
|
-
label:
|
|
2629
|
-
title:
|
|
2691
|
+
label: Continuous Delivery
|
|
2692
|
+
title: Continuous Delivery Settings
|
|
2630
2693
|
info: Rancher will reboot Fleet agent and controller on settings change.
|
|
2631
2694
|
apply: Apply changes
|
|
2632
2695
|
noPermissions: You have no permissions to modify Fleet Settings
|
|
@@ -2745,6 +2808,7 @@ fleet:
|
|
|
2745
2808
|
filters:
|
|
2746
2809
|
gitRepos: Show Git Repos
|
|
2747
2810
|
helmOps: Show Helm Ops
|
|
2811
|
+
search: Filter
|
|
2748
2812
|
resourceSummary:
|
|
2749
2813
|
part1: in
|
|
2750
2814
|
part2: |-
|
|
@@ -2904,7 +2968,7 @@ fleet:
|
|
|
2904
2968
|
label: Polling Interval
|
|
2905
2969
|
tooltip: Polling Interval is the time between a push to the Repository and Fleet's reaction to it.
|
|
2906
2970
|
webhookWarning: A webhook is configured in Rancher to reconcile Git updates and GitRepo resources. The Polling Interval will automatically be adjusted to 1 hour.
|
|
2907
|
-
|
|
2971
|
+
minimumValueWarning: The recommended minimum Polling Interval is 15 seconds. To avoid performance issues with GitRepos that contain a large amount of resources please consider increasing this value.
|
|
2908
2972
|
ociStorageSecret:
|
|
2909
2973
|
title: OCI Registry
|
|
2910
2974
|
label: OCI Storage Secret
|
|
@@ -3033,18 +3097,18 @@ fleet:
|
|
|
3033
3097
|
oci: OCI Registry
|
|
3034
3098
|
tarball:
|
|
3035
3099
|
label: Absolute URL
|
|
3036
|
-
placeholder: e.g. https://
|
|
3100
|
+
placeholder: e.g. https://example.com/charts/my-chart-1.2.3.tgz
|
|
3037
3101
|
repo:
|
|
3038
3102
|
repo:
|
|
3039
|
-
label: URL
|
|
3040
|
-
placeholder: e.g. https://
|
|
3103
|
+
label: Repository URL
|
|
3104
|
+
placeholder: e.g. https://foo.bar/baz
|
|
3041
3105
|
chart:
|
|
3042
3106
|
label: Chart
|
|
3043
3107
|
placeholder: The path to the chart name in the repository
|
|
3044
3108
|
oci:
|
|
3045
3109
|
chart:
|
|
3046
3110
|
label: OCI Registry URL
|
|
3047
|
-
placeholder: e.g. oci://
|
|
3111
|
+
placeholder: e.g. oci://foo.bar/baz
|
|
3048
3112
|
version:
|
|
3049
3113
|
label: Version
|
|
3050
3114
|
placeholder: The Chart version
|
|
@@ -3111,7 +3175,8 @@ fleet:
|
|
|
3111
3175
|
pollingInterval:
|
|
3112
3176
|
label: Polling Interval
|
|
3113
3177
|
tooltip: Polling Interval is the time between a push to the Repository and Fleet's reaction to it.
|
|
3114
|
-
|
|
3178
|
+
minimumValueWarning: The recommended minimum Polling Interval is 15 seconds. To avoid performance issues with HelmOps that contain a large amount of resources please consider increasing this value.
|
|
3179
|
+
versionTooltip: Polling can be enabled only if version is a valid semantic versioning constraint (e.g. 2.x.x, < 1.0).
|
|
3115
3180
|
tls:
|
|
3116
3181
|
insecure: Accept any certificate (insecure)
|
|
3117
3182
|
auth:
|
|
@@ -5868,6 +5933,13 @@ secret:
|
|
|
5868
5933
|
'kubernetes.io/tls':
|
|
5869
5934
|
description: Store a certificate and key for TLS
|
|
5870
5935
|
docLink: https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets
|
|
5936
|
+
tabs:
|
|
5937
|
+
namespaced:
|
|
5938
|
+
label: Namespaced
|
|
5939
|
+
create: Create Secret
|
|
5940
|
+
projectScoped:
|
|
5941
|
+
label: Project Scoped
|
|
5942
|
+
create: Create Project Secret
|
|
5871
5943
|
|
|
5872
5944
|
selectOrCreateAuthSecret:
|
|
5873
5945
|
label: Authentication
|
|
@@ -6570,6 +6642,11 @@ tableHeaders:
|
|
|
6570
6642
|
scope: Scope
|
|
6571
6643
|
selector: Selector
|
|
6572
6644
|
secrets: Secrets
|
|
6645
|
+
secret:
|
|
6646
|
+
project-clone: Created by Project Secret
|
|
6647
|
+
project-clone-tooltip: Has a Project Scoped Secret created this Secret in this Namespace
|
|
6648
|
+
project-scoped: Project Secret
|
|
6649
|
+
project-scoped-tooltip: This Project Scoped Secret will create matching Secrets in the Namespaces it contains
|
|
6573
6650
|
schedule: Schedule
|
|
6574
6651
|
service: Service
|
|
6575
6652
|
serviceAccounts: Service Accounts
|
|
@@ -6749,10 +6826,10 @@ validation:
|
|
|
6749
6826
|
flowOutput:
|
|
6750
6827
|
both: Requires "Output" or "Cluster Output" to be selected.
|
|
6751
6828
|
global: Requires "Cluster Output" to be selected.
|
|
6752
|
-
|
|
6753
|
-
url:
|
|
6829
|
+
repository:
|
|
6830
|
+
url: It must be a valid HTTP(s) or SSH URL with no trailing spaces
|
|
6754
6831
|
oci:
|
|
6755
|
-
url:
|
|
6832
|
+
url: It must be a valid OCI URL with no trailing spaces
|
|
6756
6833
|
output:
|
|
6757
6834
|
logdna:
|
|
6758
6835
|
apiKey: Required an "Api Key" to be set.
|
|
@@ -6819,6 +6896,7 @@ validation:
|
|
|
6819
6896
|
missingApiGroup: You must specify an API Group for each resource grant
|
|
6820
6897
|
missingOneResource: You must specify at least one Resource, Non-Resource URL or API Group for each resource grant
|
|
6821
6898
|
noResourceAndNonResource: Each rule may contain Resources or Non-Resource URLs but not both
|
|
6899
|
+
semanticVersion: Version must be a valid version number or a semantic versioning constraint (e.g. 2.x.x, < 1.0)
|
|
6822
6900
|
service:
|
|
6823
6901
|
externalName:
|
|
6824
6902
|
none: External Name is required on an ExternalName Service.
|
|
@@ -6843,6 +6921,7 @@ validation:
|
|
|
6843
6921
|
localhost: If the Server URL is internal to the Rancher server (e.g. localhost) the downstream clusters may not be able to communicate with Rancher.
|
|
6844
6922
|
trailingForwardSlash: Server URL should not have a trailing forward slash.
|
|
6845
6923
|
url: Server URL must be an URL.
|
|
6924
|
+
awsStyleEndpoint: Endpoint URL has to be a valid domain-based endpoint and cannot start with a protocol (e.g https:// or http://)
|
|
6846
6925
|
genericUrl: Field must be a valid URL
|
|
6847
6926
|
stringLength:
|
|
6848
6927
|
between: '"{key}" should be between {min} and {max} {max, plural, =1 {character} other {characters}}'
|
|
@@ -6856,6 +6935,7 @@ validation:
|
|
|
6856
6935
|
match: At least one Match or Match Regex must be selected
|
|
6857
6936
|
interval: '"{key}" must be of a format with digits followed by a unit i.e. 1h, 2m, 30s'
|
|
6858
6937
|
tab: "One or more fields in this tab contain a form validation error"
|
|
6938
|
+
version: Invalid Version number
|
|
6859
6939
|
|
|
6860
6940
|
carousel:
|
|
6861
6941
|
previous: Previous
|
|
@@ -7855,6 +7935,11 @@ typeLabel:
|
|
|
7855
7935
|
one { Secret }
|
|
7856
7936
|
other { Secrets }
|
|
7857
7937
|
}
|
|
7938
|
+
projectsecret: |-
|
|
7939
|
+
{count, plural,
|
|
7940
|
+
one { Project Secret }
|
|
7941
|
+
other { Project Secrets }
|
|
7942
|
+
}
|
|
7858
7943
|
apiregistration.k8s.io.apiservice: |-
|
|
7859
7944
|
{count, plural,
|
|
7860
7945
|
one { APIService }
|
|
@@ -8198,6 +8283,7 @@ action:
|
|
|
8198
8283
|
runNow: Run Now
|
|
8199
8284
|
suspend: Suspend
|
|
8200
8285
|
resume: Resume
|
|
8286
|
+
showConfiguration: Show Configuration
|
|
8201
8287
|
|
|
8202
8288
|
unit:
|
|
8203
8289
|
sec: secs
|
|
@@ -8638,11 +8724,6 @@ volumeClaimTemplate:
|
|
|
8638
8724
|
manager:
|
|
8639
8725
|
cloudCredentials:
|
|
8640
8726
|
label: Cloud Credentials
|
|
8641
|
-
renew: Renew
|
|
8642
|
-
expired: Expired
|
|
8643
|
-
banners:
|
|
8644
|
-
expiring: "{count} Cloud {count, plural, =1 { Credential expires soon} other { Credentials expire soon}}, please Renew"
|
|
8645
|
-
expired: "{count} Cloud {count, plural, =1 { Credential has expired} other { Credentials have expired}}, please Renew"
|
|
8646
8727
|
drivers:
|
|
8647
8728
|
label: Drivers
|
|
8648
8729
|
rkeTemplates:
|
|
@@ -11,7 +11,8 @@ describe('rancher-backup: S3', () => {
|
|
|
11
11
|
'i18n/t': (text: string) => text,
|
|
12
12
|
t: (text: string) => text,
|
|
13
13
|
'cluster/all': () => [],
|
|
14
|
-
'cluster/paginationEnabled': () => false
|
|
14
|
+
'cluster/paginationEnabled': () => false,
|
|
15
|
+
currentStore: () => 'cluster'
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
18
|
const wrapper = mount(S3, {
|
|
@@ -4,6 +4,7 @@ import KeyValue from '@shell/components/form/KeyValue';
|
|
|
4
4
|
import { Banner } from '@components/Banner';
|
|
5
5
|
import { simplify, iffyFields, likelyFields } from '@shell/store/plugins';
|
|
6
6
|
import Loading from '@shell/components/Loading';
|
|
7
|
+
import { SCHEMA } from '@shell/config/types';
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
10
|
emits: ['validationChanged'],
|
|
@@ -23,10 +24,15 @@ export default {
|
|
|
23
24
|
async fetch() {
|
|
24
25
|
let keyOptions = [];
|
|
25
26
|
|
|
26
|
-
const
|
|
27
|
+
const normanType = this.$store.getters['plugins/credentialFieldForDriver'](this.driverName);
|
|
28
|
+
const configId = `${ normanType }credentialconfig`;
|
|
29
|
+
|
|
30
|
+
this.normanSchema = await this.$store.dispatch('rancher/find', {
|
|
31
|
+
type: SCHEMA, id: configId, opt: { url: `/v3/schemas/${ configId }` }
|
|
32
|
+
});
|
|
27
33
|
|
|
28
|
-
if ( normanSchema?.resourceFields ) {
|
|
29
|
-
keyOptions = Object.keys(normanSchema.resourceFields);
|
|
34
|
+
if ( this.normanSchema?.resourceFields ) {
|
|
35
|
+
keyOptions = Object.keys(this.normanSchema.resourceFields);
|
|
30
36
|
} else {
|
|
31
37
|
keyOptions = await this.$store.getters['plugins/fieldNamesForDriver'](this.driverName);
|
|
32
38
|
}
|
|
@@ -38,7 +44,7 @@ export default {
|
|
|
38
44
|
for ( const k of keyOptions ) {
|
|
39
45
|
const sk = simplify(k);
|
|
40
46
|
|
|
41
|
-
if ( normanSchema?.resourceFields || likelyFields.includes(sk) || iffyFields.includes(sk) ) {
|
|
47
|
+
if ( this.normanSchema?.resourceFields || likelyFields.includes(sk) || iffyFields.includes(sk) ) {
|
|
42
48
|
keys.push(k);
|
|
43
49
|
}
|
|
44
50
|
}
|
|
@@ -51,13 +57,9 @@ export default {
|
|
|
51
57
|
},
|
|
52
58
|
|
|
53
59
|
data() {
|
|
54
|
-
const normanType = this.$store.getters['plugins/credentialFieldForDriver'](this.driverName);
|
|
55
|
-
const normanSchema = this.$store.getters['rancher/schemaFor'](`${ normanType }credentialconfig`);
|
|
56
|
-
|
|
57
60
|
return {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
normanSchema,
|
|
61
|
+
errors: null,
|
|
62
|
+
normanSchema: null,
|
|
61
63
|
};
|
|
62
64
|
},
|
|
63
65
|
|
|
@@ -73,6 +75,12 @@ export default {
|
|
|
73
75
|
}
|
|
74
76
|
},
|
|
75
77
|
|
|
78
|
+
computed: {
|
|
79
|
+
hasSupport() {
|
|
80
|
+
return !!this.normanSchema;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
};
|
|
77
85
|
</script>
|
|
78
86
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
3
3
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
4
|
-
import { Banner } from '@components/Banner';
|
|
5
4
|
|
|
6
5
|
import { get, set } from '@shell/utils/object';
|
|
7
6
|
import { MANAGEMENT, VIRTUAL_HARVESTER_PROVIDER } from '@shell/config/types';
|
|
@@ -9,7 +8,7 @@ import { MANAGEMENT, VIRTUAL_HARVESTER_PROVIDER } from '@shell/config/types';
|
|
|
9
8
|
export default {
|
|
10
9
|
emits: ['validationChanged'],
|
|
11
10
|
|
|
12
|
-
components: { LabeledSelect
|
|
11
|
+
components: { LabeledSelect },
|
|
13
12
|
mixins: [CreateEditView],
|
|
14
13
|
|
|
15
14
|
async fetch() {
|
|
@@ -100,13 +99,6 @@ export default {
|
|
|
100
99
|
|
|
101
100
|
<template>
|
|
102
101
|
<div>
|
|
103
|
-
<div class="row mb-10">
|
|
104
|
-
<Banner
|
|
105
|
-
color="warning"
|
|
106
|
-
label-key="cluster.credential.harvester.tokenExpirationWarning"
|
|
107
|
-
data-testid="harvester-token-expiration-warning-banner"
|
|
108
|
-
/>
|
|
109
|
-
</div>
|
|
110
102
|
<div class="row mb-10">
|
|
111
103
|
<div
|
|
112
104
|
class="col span-6"
|
|
@@ -32,9 +32,17 @@ export default {
|
|
|
32
32
|
v-t="show ? 'generic.hideAdvanced' : 'generic.showAdvanced'"
|
|
33
33
|
class="hand block"
|
|
34
34
|
:class="{'mb-10': show}"
|
|
35
|
+
tabindex="0"
|
|
36
|
+
@keydown.enter.space.prevent="toggle"
|
|
35
37
|
@click="toggle"
|
|
36
38
|
/>
|
|
37
39
|
|
|
38
40
|
<slot v-if="show" />
|
|
39
41
|
</div>
|
|
40
42
|
</template>
|
|
43
|
+
|
|
44
|
+
<style lang="scss" scoped>
|
|
45
|
+
.hand.block {
|
|
46
|
+
max-width: fit-content;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -8,6 +8,14 @@ export default {
|
|
|
8
8
|
type: Object,
|
|
9
9
|
required: true
|
|
10
10
|
},
|
|
11
|
+
showAppReadme: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: true
|
|
14
|
+
},
|
|
15
|
+
hideReadmeFirstTitle: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: true
|
|
18
|
+
}
|
|
11
19
|
},
|
|
12
20
|
data() {
|
|
13
21
|
return {
|
|
@@ -30,13 +38,13 @@ export default {
|
|
|
30
38
|
<div class="wrapper">
|
|
31
39
|
<div class="chart-readmes">
|
|
32
40
|
<Markdown
|
|
33
|
-
v-if="appReadme"
|
|
41
|
+
v-if="showAppReadme && appReadme"
|
|
34
42
|
v-model:value="appReadme"
|
|
35
|
-
class="md md-desc mb-20"
|
|
43
|
+
:class="[hideReadmeFirstTitle ? 'hidden-first-title' : '', 'md', 'md-desc', 'mb-20']"
|
|
36
44
|
@loaded="appReadmeLoaded = true"
|
|
37
45
|
/>
|
|
38
46
|
<h1
|
|
39
|
-
v-if="appReadme && readme && appReadmeLoaded && readmeLoaded"
|
|
47
|
+
v-if="showAppReadme && appReadme && readme && appReadmeLoaded && readmeLoaded"
|
|
40
48
|
class="pt-10"
|
|
41
49
|
>
|
|
42
50
|
{{ t('catalog.install.appReadmeTitle') }}
|
|
@@ -45,6 +53,7 @@ export default {
|
|
|
45
53
|
v-if="readme"
|
|
46
54
|
v-model:value="readme"
|
|
47
55
|
class="md md-desc"
|
|
56
|
+
:class="[hideReadmeFirstTitle ? 'hidden-first-title' : '', 'md', 'md-desc']"
|
|
48
57
|
@loaded="readmeLoaded = true"
|
|
49
58
|
/>
|
|
50
59
|
</div>
|
|
@@ -88,13 +97,14 @@ export default {
|
|
|
88
97
|
word-break: break-word;
|
|
89
98
|
}
|
|
90
99
|
|
|
91
|
-
:deep() > h1:first-of-type {
|
|
92
|
-
display: none;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
100
|
:deep() p {
|
|
96
101
|
margin-bottom: 0.5em;
|
|
97
102
|
}
|
|
98
103
|
}
|
|
104
|
+
.hidden-first-title {
|
|
105
|
+
:deep() > h1:first-of-type {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
99
109
|
|
|
100
110
|
</style>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { useDefaultConfigTabProps, useDefaultYamlTabProps
|
|
1
|
+
import { useDefaultConfigTabProps, useDefaultYamlTabProps } from '@shell/components/Drawer/ResourceDetailDrawer/composables';
|
|
2
2
|
import * as helpers from '@shell/components/Drawer/ResourceDetailDrawer/helpers';
|
|
3
3
|
import * as vuex from 'vuex';
|
|
4
|
-
import * as drawer from '@shell/composables/drawer';
|
|
5
4
|
|
|
6
5
|
jest.mock('@shell/components/Drawer/ResourceDetailDrawer/helpers');
|
|
7
6
|
jest.mock('vuex');
|
|
@@ -26,11 +25,13 @@ describe('composables: ResourceDetailDrawer', () => {
|
|
|
26
25
|
describe('useDefaultConfigTabProps', () => {
|
|
27
26
|
const hasCustomEdit = jest.fn();
|
|
28
27
|
const importEdit = jest.fn();
|
|
28
|
+
const hasCustomDetail = jest.fn();
|
|
29
29
|
const editComponent = { component: 'EDIT_COMPONENT' };
|
|
30
30
|
const store: any = {
|
|
31
31
|
getters: {
|
|
32
|
-
'type-map/hasCustomEdit':
|
|
33
|
-
'type-map/importEdit':
|
|
32
|
+
'type-map/hasCustomEdit': hasCustomEdit,
|
|
33
|
+
'type-map/importEdit': importEdit,
|
|
34
|
+
'type-map/hasCustomDetail': hasCustomDetail,
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
|
|
@@ -43,40 +44,38 @@ describe('composables: ResourceDetailDrawer', () => {
|
|
|
43
44
|
expect(props).toBeUndefined();
|
|
44
45
|
});
|
|
45
46
|
|
|
47
|
+
it('should return undefined if it does not have a customDetail', async() => {
|
|
48
|
+
jest.spyOn(vuex, 'useStore').mockImplementation(() => store);
|
|
49
|
+
const hasCustomEditSpy = hasCustomEdit.mockImplementation(() => true);
|
|
50
|
+
const hasCustomDetailSpy = hasCustomDetail.mockImplementation(() => false);
|
|
51
|
+
const props = useDefaultConfigTabProps(resource);
|
|
52
|
+
|
|
53
|
+
expect(hasCustomEditSpy).toHaveBeenCalledWith(resource.type);
|
|
54
|
+
expect(hasCustomDetailSpy).toHaveBeenCalledWith(resource.type);
|
|
55
|
+
expect(props).toBeUndefined();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('should return undefined if resource disableResourceDetailDrawerConfigTab is true', async() => {
|
|
59
|
+
jest.spyOn(vuex, 'useStore').mockImplementation(() => store);
|
|
60
|
+
const hasCustomDetailSpy = hasCustomDetail.mockImplementation(() => false);
|
|
61
|
+
const props = useDefaultConfigTabProps({ ...resource, disableResourceDetailDrawerConfigTab: true });
|
|
62
|
+
|
|
63
|
+
expect(hasCustomDetailSpy).toHaveBeenCalledWith(resource.type);
|
|
64
|
+
expect(props).toBeUndefined();
|
|
65
|
+
});
|
|
66
|
+
|
|
46
67
|
it('should return props if it has a customEdit', async() => {
|
|
47
68
|
jest.spyOn(vuex, 'useStore').mockImplementation(() => store);
|
|
48
69
|
const hasCustomEditSpy = hasCustomEdit.mockImplementation(() => true);
|
|
70
|
+
const hasCustomDetailSpy = hasCustomDetail.mockImplementation(() => true);
|
|
49
71
|
const importEditSpy = importEdit.mockImplementation(() => editComponent);
|
|
50
72
|
const props = useDefaultConfigTabProps(resource);
|
|
51
73
|
|
|
52
74
|
expect(hasCustomEditSpy).toHaveBeenCalledWith(resource.type);
|
|
75
|
+
expect(hasCustomDetailSpy).toHaveBeenCalledWith(resource.type);
|
|
53
76
|
expect(importEditSpy).toHaveBeenCalledWith(resource.type);
|
|
54
77
|
expect(props?.component).toStrictEqual(editComponent);
|
|
55
78
|
expect(props?.resource).toStrictEqual(resource);
|
|
56
79
|
});
|
|
57
80
|
});
|
|
58
|
-
|
|
59
|
-
describe('useResourceDetailDrawer', () => {
|
|
60
|
-
it('should create a wrapper that passes that appropriate properties to the drawer methods', () => {
|
|
61
|
-
const openSpy = jest.fn();
|
|
62
|
-
const closeSpy = jest.fn();
|
|
63
|
-
const selector = '.selector';
|
|
64
|
-
const useDrawerSpy = jest.spyOn(drawer, 'useDrawer').mockImplementation(() => ({ open: openSpy, close: closeSpy }));
|
|
65
|
-
const resourceDetailDrawer = useResourceDetailDrawer();
|
|
66
|
-
|
|
67
|
-
resourceDetailDrawer.openResourceDetailDrawer(resource, selector);
|
|
68
|
-
|
|
69
|
-
expect(useDrawerSpy).toHaveBeenCalledTimes(1);
|
|
70
|
-
expect(openSpy).toHaveBeenCalledWith({ name: 'ResourceDetailDrawer' }, selector, {
|
|
71
|
-
resource,
|
|
72
|
-
onClose: closeSpy,
|
|
73
|
-
width: '73%',
|
|
74
|
-
// We want this to be full viewport height top to bottom
|
|
75
|
-
height: '100vh',
|
|
76
|
-
top: '0',
|
|
77
|
-
'z-index': 101, // We want this to be above the main side menu
|
|
78
|
-
closeOnRouteChange: ['name', 'params', 'query']
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
81
|
});
|
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
import ResourceDetailDrawer from '@shell/components/Drawer/ResourceDetailDrawer/index.vue';
|
|
2
1
|
import { Props as YamlTabProps } from '@shell/components/Drawer/ResourceDetailDrawer/YamlTab.vue';
|
|
3
2
|
import { Props as ConfigTabProps } from '@shell/components/Drawer/ResourceDetailDrawer/ConfigTab.vue';
|
|
4
3
|
import { useStore } from 'vuex';
|
|
5
|
-
import { useDrawer } from '@shell/composables/drawer';
|
|
6
4
|
import { getYaml } from '@shell/components/Drawer/ResourceDetailDrawer/helpers';
|
|
7
5
|
|
|
8
|
-
export function useResourceDetailDrawer() {
|
|
9
|
-
const { open, close } = useDrawer();
|
|
10
|
-
|
|
11
|
-
const openResourceDetailDrawer = (resource: any, returnFocusSelector: string) => {
|
|
12
|
-
open(ResourceDetailDrawer,
|
|
13
|
-
returnFocusSelector,
|
|
14
|
-
{
|
|
15
|
-
resource,
|
|
16
|
-
onClose: close,
|
|
17
|
-
width: '73%',
|
|
18
|
-
// We want this to be full viewport height top to bottom
|
|
19
|
-
height: '100vh',
|
|
20
|
-
top: '0',
|
|
21
|
-
'z-index': 101, // We want this to be above the main side menu
|
|
22
|
-
closeOnRouteChange: ['name', 'params', 'query'] // We want to ignore hash changes, tables in extensions can trigger the drawer to close while opening
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
return { openResourceDetailDrawer };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
6
|
export async function useDefaultYamlTabProps(resource: any): Promise<YamlTabProps> {
|
|
30
7
|
const yaml = await getYaml(resource);
|
|
31
8
|
|
|
@@ -38,7 +15,10 @@ export async function useDefaultYamlTabProps(resource: any): Promise<YamlTabProp
|
|
|
38
15
|
export function useDefaultConfigTabProps(resource: any): ConfigTabProps | undefined {
|
|
39
16
|
const store = useStore();
|
|
40
17
|
|
|
41
|
-
if
|
|
18
|
+
// You don't want to show the Config tab if there isn't a an edit page to show and you don't want to show it if there isn't
|
|
19
|
+
// a detail page because we default to showing the existing edit page if the detail page doesn't exist. Showing them again
|
|
20
|
+
// wouldn't be worth while.
|
|
21
|
+
if (!store.getters['type-map/hasCustomEdit'](resource.type) || !store.getters['type-map/hasCustomDetail'](resource.type) || resource.disableResourceDetailDrawerConfigTab) {
|
|
42
22
|
return;
|
|
43
23
|
}
|
|
44
24
|
|