@rancher/shell 3.0.0-rc.3 → 3.0.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/base/_variables.scss +12 -4
- package/assets/styles/global/_layout.scss +1 -1
- package/assets/styles/global/_tooltip.scss +1 -1
- package/assets/translations/en-us.yaml +61 -26
- package/assets/translations/zh-hans.yaml +6 -5
- package/chart/istio.vue +2 -0
- package/chart/monitoring/ClusterSelector.vue +2 -0
- package/chart/monitoring/StorageClassSelector.vue +4 -1
- package/chart/monitoring/index.vue +2 -0
- package/chart/rancher-backup/S3.vue +2 -0
- package/chart/rancher-backup/index.vue +2 -0
- package/cloud-credential/aws.vue +2 -0
- package/cloud-credential/azure.vue +2 -0
- package/cloud-credential/digitalocean.vue +2 -0
- package/cloud-credential/gcp.vue +2 -0
- package/cloud-credential/generic.vue +2 -0
- package/cloud-credential/harvester.vue +2 -0
- package/cloud-credential/linode.vue +2 -0
- package/cloud-credential/pnap.vue +2 -0
- package/cloud-credential/s3.vue +2 -0
- package/cloud-credential/vmwarevsphere.vue +2 -0
- package/components/ActionMenu.vue +4 -1
- package/components/AppModal.vue +4 -1
- package/components/ButtonDropdown.vue +3 -0
- package/components/ButtonGroup.vue +2 -0
- package/components/ButtonMultiAction.vue +41 -0
- package/components/Carousel.vue +3 -0
- package/components/CodeMirror.vue +6 -4
- package/components/Collapse.vue +4 -1
- package/components/CollapsibleCard.vue +4 -1
- package/components/ContainerResourceLimit.vue +2 -0
- package/components/CopyCode.vue +8 -4
- package/components/CopyToClipboardText.vue +2 -0
- package/components/CruResource.vue +2 -0
- package/components/CruResourceFooter.vue +2 -0
- package/components/Dialog.vue +2 -0
- package/components/DisableAuthProviderModal.vue +4 -1
- package/components/EmberPage.vue +2 -0
- package/components/ExplorerProjectsNamespaces.vue +11 -8
- package/components/GlobalRoleBindings.vue +2 -0
- package/components/Import.vue +2 -0
- package/components/InputOrDisplay.vue +23 -18
- package/components/Loading.vue +4 -1
- package/components/Markdown.vue +2 -0
- package/components/ModalWithCard.vue +2 -0
- package/components/MoveModal.vue +2 -0
- package/components/PodSecurityAdmission.vue +2 -0
- package/components/Questions/Array.vue +2 -0
- package/components/Questions/Boolean.vue +2 -0
- package/components/Questions/CloudCredential.vue +2 -0
- package/components/Questions/Enum.vue +2 -0
- package/components/Questions/Float.vue +2 -0
- package/components/Questions/Int.vue +2 -0
- package/components/Questions/QuestionMap.vue +4 -1
- package/components/Questions/Radio.vue +2 -0
- package/components/Questions/Reference.vue +2 -0
- package/components/Questions/String.vue +2 -0
- package/components/Questions/Yaml.vue +2 -0
- package/components/Questions/index.vue +2 -0
- package/components/ResourceCancelModal.vue +2 -0
- package/components/ResourceDetail/Masthead.vue +4 -3
- package/components/ResourceDetail/index.vue +17 -15
- package/components/ResourceTable.vue +2 -0
- package/components/ResourceYaml.vue +2 -0
- package/components/SelectIconGrid.vue +2 -0
- package/components/SimpleBox.vue +2 -0
- package/components/SortableTable/THead.vue +2 -0
- package/components/SortableTable/index.vue +15 -19
- package/components/StatusTable.vue +2 -0
- package/components/Tabbed/Tab.vue +2 -0
- package/components/Tabbed/index.vue +2 -0
- package/components/Wizard.vue +2 -0
- package/components/YamlEditor.vue +2 -0
- package/components/__tests__/ButtonMultiAction.test.ts +31 -0
- package/components/auth/RoleDetailEdit.vue +2 -0
- package/components/auth/SelectPrincipal.vue +2 -0
- package/components/auth/login/ldap.vue +2 -0
- package/components/fleet/FleetStatus.vue +3 -2
- package/components/form/ArrayList.vue +16 -1
- package/components/form/ArrayListSelect.vue +2 -0
- package/components/form/ChangePassword.vue +2 -0
- package/components/form/ColorInput.vue +2 -0
- package/components/form/Command.vue +2 -0
- package/components/form/FileImageSelector.vue +2 -0
- package/components/form/FileSelector.vue +2 -0
- package/components/form/Footer.vue +2 -0
- package/components/form/GitPicker.vue +1 -0
- package/components/form/HealthCheck.vue +5 -3
- package/components/form/HookOption.vue +22 -18
- package/components/form/InputWithSelect.vue +3 -1
- package/components/form/KeyValue.vue +2 -0
- package/components/form/LabeledSelect.vue +13 -3
- package/components/form/LifecycleHooks.vue +2 -0
- package/components/form/MatchExpressions.vue +2 -0
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -0
- package/components/form/Members/MembershipEditor.vue +2 -0
- package/components/form/NameNsDescription.vue +4 -1
- package/components/form/Networking.vue +2 -0
- package/components/form/NodeAffinity.vue +4 -1
- package/components/form/Password.vue +2 -0
- package/components/form/PlusMinus.vue +2 -0
- package/components/form/PodAffinity.vue +4 -1
- package/components/form/Ports.vue +2 -0
- package/components/form/Probe.vue +8 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +2 -0
- package/components/form/ResourceQuota/Project.vue +2 -0
- package/components/form/ResourceQuota/ProjectRow.vue +2 -0
- package/components/form/RuleSelector.vue +2 -0
- package/components/form/SecretSelector.vue +1 -0
- package/components/form/Security.vue +5 -2
- package/components/form/Select.vue +2 -1
- package/components/form/SelectOrCreateAuthSecret.vue +2 -0
- package/components/form/ServiceNameSelect.vue +2 -0
- package/components/form/ServicePorts.vue +2 -0
- package/components/form/ShellInput.vue +2 -0
- package/components/form/SimpleSecretSelector.vue +2 -0
- package/components/form/Taints.vue +2 -0
- package/components/form/Tolerations.vue +2 -0
- package/components/form/ValueFromResource.vue +2 -0
- package/components/form/WorkloadPorts.vue +5 -3
- package/components/form/__tests__/HookOption.test.ts +28 -0
- package/components/form/__tests__/LabeledSelect.test.ts +42 -0
- package/components/form/__tests__/Probe.test.ts +12 -0
- package/components/nav/Header.vue +26 -128
- package/components/nav/HeaderPageActionMenu.vue +151 -0
- package/components/nav/Jump.vue +2 -0
- package/components/nav/NamespaceFilter.vue +5 -1
- package/components/nav/Type.vue +28 -2
- package/components/nav/WindowManager/ContainerShell.vue +6 -12
- package/components/nav/WindowManager/index.vue +2 -0
- package/components/nav/__tests__/Type.test.ts +68 -24
- package/composables/useClickOutside.ts +81 -0
- package/config/product/cis.js +4 -3
- package/config/product/manager.js +1 -0
- package/config/router/routes.js +1 -1
- package/config/table-headers.js +0 -10
- package/config/uiplugins.js +186 -143
- package/config/version.js +10 -0
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +2 -0
- package/detail/configmap.vue +2 -0
- package/detail/fleet.cattle.io.cluster.vue +2 -0
- package/detail/fleet.cattle.io.clustergroup.vue +2 -0
- package/detail/fleet.cattle.io.gitrepo.vue +2 -0
- package/detail/harvesterhci.io.management.cluster.vue +2 -0
- package/detail/management.cattle.io.roletemplate.vue +4 -4
- package/detail/management.cattle.io.user.vue +2 -0
- package/detail/namespace.vue +2 -0
- package/detail/networking.k8s.io.ingress.vue +1 -0
- package/detail/node.vue +2 -0
- package/detail/provisioning.cattle.io.cluster.vue +2 -0
- package/detail/secret.vue +2 -0
- package/detail/service.vue +2 -0
- package/detail/workload/index.vue +1 -1
- package/dialog/AddClusterMemberDialog.vue +2 -0
- package/dialog/AddCustomBadgeDialog.vue +3 -1
- package/dialog/AddProjectMemberDialog.vue +2 -0
- package/dialog/AddonConfigConfirmationDialog.vue +2 -0
- package/dialog/DeactivateDriverDialog.vue +2 -0
- package/dialog/DiagnosticTimingsDialog.vue +2 -0
- package/dialog/DrainNode.vue +2 -0
- package/dialog/ForceMachineRemoveDialog.vue +2 -0
- package/dialog/GenericPrompt.vue +2 -0
- package/dialog/RollbackWorkloadDialog.vue +2 -0
- package/dialog/RotateCertificatesDialog.vue +2 -0
- package/dialog/RotateEncryptionKeyDialog.vue +2 -0
- package/dialog/SaveAsRKETemplateDialog.vue +2 -0
- package/dialog/ScaleMachineDownDialog.vue +2 -0
- package/dialog/ScalePoolDownDialog.vue +2 -0
- package/dialog/SloDialog.vue +2 -0
- package/edit/auth/ldap/config.vue +2 -0
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -2
- package/edit/catalog.cattle.io.clusterrepo.vue +2 -0
- package/edit/cis.cattle.io.clusterscan.vue +38 -18
- package/edit/cloudcredential.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +2 -0
- package/edit/fleet.cattle.io.cluster.vue +2 -0
- package/edit/fleet.cattle.io.clustergroup.vue +4 -1
- package/edit/fleet.cattle.io.gitrepo.vue +2 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +2 -0
- package/edit/logging-flow/Match.vue +2 -0
- package/edit/logging-flow/index.vue +10 -8
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +3 -3
- package/edit/management.cattle.io.fleetworkspace.vue +4 -1
- package/edit/management.cattle.io.project.vue +2 -0
- package/edit/management.cattle.io.roletemplate.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +2 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -0
- package/edit/namespace.vue +1 -0
- package/edit/networking.k8s.io.ingress/Certificate.vue +2 -0
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -1
- package/edit/networking.k8s.io.ingress/Rule.vue +1 -0
- package/edit/networking.k8s.io.ingress/RulePath.vue +20 -23
- package/edit/networking.k8s.io.ingress/index.vue +1 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +1 -1
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -0
- package/edit/node.vue +2 -0
- package/edit/persistentvolumeclaim.vue +1 -0
- package/edit/policy.poddisruptionbudget.vue +3 -1
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/Labels.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +38 -13
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +49 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +32 -65
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +1 -0
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +2 -0
- package/edit/resources.cattle.io.backup.vue +2 -2
- package/edit/secret/index.vue +2 -0
- package/edit/service.vue +2 -1
- package/edit/ui.cattle.io.navlink.vue +1 -0
- package/edit/workload/Job.vue +3 -2
- package/edit/workload/Upgrading.vue +1 -0
- package/edit/workload/index.vue +18 -7
- package/edit/workload/storage/ContainerMountPaths.vue +37 -97
- package/edit/workload/storage/awsElasticBlockStore.vue +1 -1
- package/edit/workload/storage/azureDisk.vue +1 -1
- package/edit/workload/storage/csi/driver.longhorn.io.vue +2 -0
- package/edit/workload/storage/ephemeralVolume/index.vue +2 -0
- package/edit/workload/storage/gcePersistentDisk.vue +1 -1
- package/edit/workload/storage/index.vue +38 -22
- package/edit/workload/storage/persistentVolumeClaim/index.vue +2 -0
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +1 -0
- package/edit/workload/storage/vsphereVolume.vue +1 -1
- package/initialize/install-components.js +0 -12
- package/initialize/install-plugins.js +4 -5
- package/machine-config/azure.vue +2 -0
- package/machine-config/generic.vue +2 -0
- package/machine-config/vmwarevsphere.vue +2 -0
- package/mixins/resource-manager.js +1 -1
- package/models/cis.cattle.io.clusterscan.js +17 -16
- package/models/cis.cattle.io.clusterscanprofile.js +17 -0
- package/models/management.cattle.io.cluster.js +1 -1
- package/models/management.cattle.io.user.js +3 -3
- package/models/provisioning.cattle.io.cluster.js +2 -1
- package/models/steve-schema.ts +1 -1
- package/models/workload.js +2 -1
- package/package.json +5 -7
- package/pages/c/_cluster/apps/charts/chart.vue +3 -1
- package/pages/c/_cluster/apps/charts/install.vue +5 -56
- package/pages/c/_cluster/fleet/index.vue +0 -1
- package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +1 -0
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +2 -0
- package/pages/c/_cluster/settings/performance.vue +2 -2
- package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +11 -16
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +2 -0
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +6 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -17
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +3 -6
- package/pages/c/_cluster/uiplugins/index.vue +93 -92
- package/pkg/vue.config.js +2 -0
- package/plugins/plugin.js +27 -19
- package/plugins/version.js +3 -13
- package/promptRemove/pod.vue +2 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +14 -8
- package/rancher-components/Form/Radio/RadioButton.vue +0 -1
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +17 -9
- package/rancher-components/StringList/StringList.vue +6 -15
- package/scripts/extension/bundle +1 -1
- package/scripts/extension/publish +174 -99
- package/scripts/publish-shell.sh +3 -4
- package/scripts/typegen.sh +1 -1
- package/store/catalog.js +0 -26
- package/store/growl.js +8 -5
- package/types/shell/index.d.ts +22 -0
- package/utils/cluster.js +9 -0
- package/utils/versions.ts +39 -0
- package/vue.config.js +5 -0
- package/components/form/PodSecurity.vue +0 -168
- package/components/formatter/Weight.vue +0 -147
- package/components/nuxt/nuxt-build-indicator.vue +0 -170
- package/components/nuxt/nuxt-child.js +0 -52
- package/components/nuxt/nuxt-error.vue +0 -128
- package/components/nuxt/nuxt-link.client.js +0 -17
- package/components/nuxt/nuxt-loading.vue +0 -165
- package/shell/types/shell/index.d.ts +0 -2
|
@@ -16,6 +16,8 @@ const KINDS = [
|
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
|
+
emits: ['update:value'],
|
|
20
|
+
|
|
19
21
|
components: {
|
|
20
22
|
LabeledInput, LabeledSelect, UnitInput, ShellInput, KeyValue,
|
|
21
23
|
},
|
|
@@ -179,7 +181,7 @@ export default {
|
|
|
179
181
|
data-testid="input-probe-port"
|
|
180
182
|
>
|
|
181
183
|
<LabeledInput
|
|
182
|
-
v-model.number="httpGet.port"
|
|
184
|
+
v-model:value.number="httpGet.port"
|
|
183
185
|
type="number"
|
|
184
186
|
min="1"
|
|
185
187
|
max="65535"
|
|
@@ -208,7 +210,7 @@ export default {
|
|
|
208
210
|
data-testid="input-probe-socket"
|
|
209
211
|
>
|
|
210
212
|
<LabeledInput
|
|
211
|
-
v-model.number="tcpSocket.port"
|
|
213
|
+
v-model:value.number="tcpSocket.port"
|
|
212
214
|
type="number"
|
|
213
215
|
min="1"
|
|
214
216
|
max="65535"
|
|
@@ -303,7 +305,7 @@ export default {
|
|
|
303
305
|
class="col span-6"
|
|
304
306
|
>
|
|
305
307
|
<LabeledInput
|
|
306
|
-
v-model.number="probe.successThreshold"
|
|
308
|
+
v-model:value.number="probe.successThreshold"
|
|
307
309
|
type="number"
|
|
308
310
|
min="1"
|
|
309
311
|
:mode="mode"
|
|
@@ -317,7 +319,7 @@ export default {
|
|
|
317
319
|
class="col span-6"
|
|
318
320
|
>
|
|
319
321
|
<LabeledInput
|
|
320
|
-
v-model.number="probe.failureThreshold"
|
|
322
|
+
v-model:value.number="probe.failureThreshold"
|
|
321
323
|
type="number"
|
|
322
324
|
min="1"
|
|
323
325
|
:mode="mode"
|
|
@@ -335,6 +337,7 @@ export default {
|
|
|
335
337
|
<div class="col span-12">
|
|
336
338
|
<KeyValue
|
|
337
339
|
v-model:value="httpGet.httpHeaders"
|
|
340
|
+
data-testid="input-probe-http-headers"
|
|
338
341
|
key-name="name"
|
|
339
342
|
:mode="mode"
|
|
340
343
|
:as-map="false"
|
|
@@ -343,6 +346,7 @@ export default {
|
|
|
343
346
|
:key-label="t('generic.name')"
|
|
344
347
|
:value-label="t('generic.value')"
|
|
345
348
|
:add-label="t('generic.add')"
|
|
349
|
+
@update:value="update"
|
|
346
350
|
>
|
|
347
351
|
<template #title>
|
|
348
352
|
<h3>
|
|
@@ -6,6 +6,8 @@ import { mapGetters } from 'vuex';
|
|
|
6
6
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
+
emits: ['update:value'],
|
|
10
|
+
|
|
9
11
|
components: {
|
|
10
12
|
RadioGroup,
|
|
11
13
|
LabeledInput,
|
|
@@ -48,7 +50,8 @@ export default {
|
|
|
48
50
|
'SETGID',
|
|
49
51
|
'SETPCAP',
|
|
50
52
|
'SETUID',
|
|
51
|
-
'
|
|
53
|
+
'SYSLOG',
|
|
54
|
+
'SYS_ADMIN',
|
|
52
55
|
'SYS_BOOT',
|
|
53
56
|
'SYS_CHROOT',
|
|
54
57
|
'SYS_MODULE',
|
|
@@ -198,7 +201,7 @@ export default {
|
|
|
198
201
|
>
|
|
199
202
|
<div class="col span-6">
|
|
200
203
|
<LabeledInput
|
|
201
|
-
v-model.number="runAsUser"
|
|
204
|
+
v-model:value.number="runAsUser"
|
|
202
205
|
:label="t('workload.container.security.runAsUser')"
|
|
203
206
|
:mode="mode"
|
|
204
207
|
@update:value="update"
|
|
@@ -6,12 +6,13 @@ import { LabeledTooltip } from '@components/LabeledTooltip';
|
|
|
6
6
|
import { onClickOption, calculatePosition } from '@shell/utils/select';
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
+
emits: ['update:value', 'createdListItem'],
|
|
10
|
+
|
|
9
11
|
components: { LabeledTooltip },
|
|
10
12
|
mixins: [
|
|
11
13
|
LabeledFormElement,
|
|
12
14
|
VueSelectOverrides,
|
|
13
15
|
],
|
|
14
|
-
emits: ['createdListItem', 'on-focus', 'on-blur'],
|
|
15
16
|
props: {
|
|
16
17
|
appendToBody: {
|
|
17
18
|
default: true,
|
|
@@ -12,6 +12,8 @@ import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
|
|
|
12
12
|
import { CAPI, SERVICE } from '@shell/config/types';
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
|
+
emits: ['update:value'],
|
|
16
|
+
|
|
15
17
|
components: {
|
|
16
18
|
LabeledInput,
|
|
17
19
|
LabeledSelect,
|
|
@@ -302,7 +304,7 @@ export default {
|
|
|
302
304
|
|
|
303
305
|
<div class="port">
|
|
304
306
|
<LabeledInput
|
|
305
|
-
v-model.number="row.containerPort"
|
|
307
|
+
v-model:value.number="row.containerPort"
|
|
306
308
|
:mode="mode"
|
|
307
309
|
type="number"
|
|
308
310
|
min="1"
|
|
@@ -331,7 +333,7 @@ export default {
|
|
|
331
333
|
>
|
|
332
334
|
<LabeledInput
|
|
333
335
|
ref="port"
|
|
334
|
-
v-model.number="row.hostPort"
|
|
336
|
+
v-model:value.number="row.hostPort"
|
|
335
337
|
:mode="mode"
|
|
336
338
|
type="number"
|
|
337
339
|
min="1"
|
|
@@ -373,7 +375,7 @@ export default {
|
|
|
373
375
|
<div v-if="row._serviceType === 'LoadBalancer' || row._serviceType === 'NodePort'">
|
|
374
376
|
<LabeledInput
|
|
375
377
|
ref="port"
|
|
376
|
-
v-model.number="row._listeningPort"
|
|
378
|
+
v-model:value.number="row._listeningPort"
|
|
377
379
|
type="number"
|
|
378
380
|
:mode="mode"
|
|
379
381
|
:label="t('workload.container.ports.listeningPort')"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import HookOption from '@shell/components/form/HookOption.vue';
|
|
2
|
+
import { _EDIT } from '@shell/config/query-params';
|
|
3
|
+
import { shallowMount } from '@vue/test-utils';
|
|
4
|
+
import { nextTick } from 'vue';
|
|
5
|
+
|
|
6
|
+
describe('component: HookOption', () => {
|
|
7
|
+
it('should render a row of inputs per http header', async() => {
|
|
8
|
+
const wrapper = shallowMount(HookOption, { props: { value: { httpGet: {} }, mode: _EDIT } });
|
|
9
|
+
|
|
10
|
+
const addButton = wrapper.get('[data-testid="hookoption-add-header-button"]');
|
|
11
|
+
|
|
12
|
+
addButton.trigger('click');
|
|
13
|
+
|
|
14
|
+
await nextTick();
|
|
15
|
+
|
|
16
|
+
let headerRows = wrapper.findAll('[data-testid="hookoption-header-row"]');
|
|
17
|
+
|
|
18
|
+
expect(headerRows).toHaveLength(1);
|
|
19
|
+
|
|
20
|
+
addButton.trigger('click');
|
|
21
|
+
|
|
22
|
+
await nextTick();
|
|
23
|
+
|
|
24
|
+
headerRows = wrapper.findAll('[data-testid="hookoption-header-row"]');
|
|
25
|
+
|
|
26
|
+
expect(headerRows).toHaveLength(2);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils';
|
|
2
2
|
import LabeledSelect from '@shell/components/form/LabeledSelect.vue';
|
|
3
|
+
import { defineComponent } from 'vue';
|
|
3
4
|
|
|
4
5
|
describe('component: LabeledSelect', () => {
|
|
5
6
|
describe('should display correct label', () => {
|
|
@@ -135,4 +136,45 @@ describe('component: LabeledSelect', () => {
|
|
|
135
136
|
});
|
|
136
137
|
});
|
|
137
138
|
});
|
|
139
|
+
|
|
140
|
+
describe('given attributes from parent element', () => {
|
|
141
|
+
it('should not pass classes to the select element', () => {
|
|
142
|
+
const customClass = 'bananas';
|
|
143
|
+
const ParentComponent = defineComponent({
|
|
144
|
+
components: { LabeledSelect },
|
|
145
|
+
template: `<LabeledSelect class="${ customClass }" />`,
|
|
146
|
+
});
|
|
147
|
+
const wrapper = mount(ParentComponent);
|
|
148
|
+
const input = wrapper.find('.v-select');
|
|
149
|
+
|
|
150
|
+
expect(input.classes).not.toContain(customClass);
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it.each([
|
|
154
|
+
[true, ['bananas']],
|
|
155
|
+
[false, 'bananas'],
|
|
156
|
+
])('given multiple as %p, should emit %p', async(multiple, expectation) => {
|
|
157
|
+
const ParentComponent = defineComponent({
|
|
158
|
+
components: { LabeledSelect },
|
|
159
|
+
template: `
|
|
160
|
+
<LabeledSelect
|
|
161
|
+
v-model:value="myValue"
|
|
162
|
+
:multiple="${ multiple }"
|
|
163
|
+
:options="options"
|
|
164
|
+
:appendToBody="false"
|
|
165
|
+
/>`,
|
|
166
|
+
data: () => ({
|
|
167
|
+
myValue: [],
|
|
168
|
+
options: ['bananas']
|
|
169
|
+
})
|
|
170
|
+
});
|
|
171
|
+
const wrapper = mount(ParentComponent);
|
|
172
|
+
|
|
173
|
+
// https://test-utils.vuejs.org/guide/essentials/event-handling#Asserting-the-arguments-of-the-event
|
|
174
|
+
await wrapper.find('input').trigger('focus');
|
|
175
|
+
await wrapper.find('.vs__dropdown-option').trigger('click');
|
|
176
|
+
|
|
177
|
+
expect(wrapper.vm.$data.myValue).toStrictEqual(expectation);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
138
180
|
});
|
|
@@ -59,4 +59,16 @@ describe('component: Probe', () => {
|
|
|
59
59
|
|
|
60
60
|
expect(wrapper.emitted('update:value')).toHaveLength(2);
|
|
61
61
|
});
|
|
62
|
+
|
|
63
|
+
it('should emit an update when http headers are modified', () => {
|
|
64
|
+
const wrapper = mount(Probe as unknown as ExtendedVue<Vue, {}, {}, {}, DefaultProps>, { props: { mode: _EDIT, value: { httpGet: { scheme: 'https' } } } });
|
|
65
|
+
|
|
66
|
+
const httpHeaders = wrapper.getComponent('[data-testid="input-probe-http-headers"]');
|
|
67
|
+
|
|
68
|
+
httpHeaders.vm.$emit('update:value', [{ name: 'abc', value: 'def' }]);
|
|
69
|
+
|
|
70
|
+
expect(wrapper.emitted()?.['update:value']?.[0]?.[0]).toStrictEqual({
|
|
71
|
+
exec: null, httpGet: { httpHeaders: [{ name: 'abc', value: 'def' }], scheme: 'HTTPS' }, tcpSocket: null
|
|
72
|
+
});
|
|
73
|
+
});
|
|
62
74
|
});
|
|
@@ -21,6 +21,7 @@ import { getApplicableExtensionEnhancements } from '@shell/core/plugin-helpers';
|
|
|
21
21
|
import IconOrSvg from '@shell/components/IconOrSvg';
|
|
22
22
|
import { wait } from '@shell/utils/async';
|
|
23
23
|
import { authProvidersInfo, parseAuthProvidersInfo } from '@shell/utils/auth';
|
|
24
|
+
import HeaderPageActionMenu from './HeaderPageActionMenu.vue';
|
|
24
25
|
|
|
25
26
|
export default {
|
|
26
27
|
|
|
@@ -35,6 +36,7 @@ export default {
|
|
|
35
36
|
ClusterProviderIcon,
|
|
36
37
|
IconOrSvg,
|
|
37
38
|
AppModal,
|
|
39
|
+
HeaderPageActionMenu,
|
|
38
40
|
},
|
|
39
41
|
|
|
40
42
|
props: {
|
|
@@ -72,8 +74,20 @@ export default {
|
|
|
72
74
|
},
|
|
73
75
|
|
|
74
76
|
computed: {
|
|
75
|
-
...mapGetters([
|
|
76
|
-
'
|
|
77
|
+
...mapGetters([
|
|
78
|
+
'clusterReady',
|
|
79
|
+
'isExplorer',
|
|
80
|
+
'isRancher',
|
|
81
|
+
'currentCluster',
|
|
82
|
+
'currentProduct',
|
|
83
|
+
'rootProduct',
|
|
84
|
+
'backToRancherLink',
|
|
85
|
+
'backToRancherGlobalLink',
|
|
86
|
+
'pageActions',
|
|
87
|
+
'isSingleProduct',
|
|
88
|
+
'isRancherInHarvester',
|
|
89
|
+
'showTopLevelMenu'
|
|
90
|
+
]),
|
|
77
91
|
|
|
78
92
|
authProviderEnabled() {
|
|
79
93
|
const authProviders = this.$store.getters['management/all'](MANAGEMENT.AUTH_CONFIG);
|
|
@@ -294,14 +308,6 @@ export default {
|
|
|
294
308
|
this.showSearchModal = false;
|
|
295
309
|
},
|
|
296
310
|
|
|
297
|
-
showPageActionsMenu(show) {
|
|
298
|
-
this.isPageActionMenuOpen = show;
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
pageAction(action) {
|
|
302
|
-
this.$store.dispatch('handlePageAction', action);
|
|
303
|
-
},
|
|
304
|
-
|
|
305
311
|
checkClusterName() {
|
|
306
312
|
this.$nextTick(() => {
|
|
307
313
|
const el = this.$refs.clusterName;
|
|
@@ -610,57 +616,7 @@ export default {
|
|
|
610
616
|
</button>
|
|
611
617
|
</div>
|
|
612
618
|
|
|
613
|
-
<
|
|
614
|
-
v-if="showPageActions"
|
|
615
|
-
id="page-actions"
|
|
616
|
-
class="actions"
|
|
617
|
-
>
|
|
618
|
-
<i
|
|
619
|
-
data-testid="page-actions-menu"
|
|
620
|
-
class="icon icon-actions"
|
|
621
|
-
tabindex="0"
|
|
622
|
-
@blur="showPageActionsMenu(false)"
|
|
623
|
-
@click="showPageActionsMenu(true)"
|
|
624
|
-
@focus.capture="showPageActionsMenu(true)"
|
|
625
|
-
/>
|
|
626
|
-
<v-dropdown
|
|
627
|
-
:triggers="[]"
|
|
628
|
-
:shown="isPageActionMenuOpen"
|
|
629
|
-
:autoHide="false"
|
|
630
|
-
:flip="false"
|
|
631
|
-
:content="false"
|
|
632
|
-
:placement="'bottom-end'"
|
|
633
|
-
:distance="14"
|
|
634
|
-
:container="'#page-actions'"
|
|
635
|
-
>
|
|
636
|
-
<template #popper>
|
|
637
|
-
<div class="user-menu">
|
|
638
|
-
<ul
|
|
639
|
-
data-testid="page-actions-dropdown"
|
|
640
|
-
class="list-unstyled dropdown"
|
|
641
|
-
@click.stop="showPageActionsMenu(false)"
|
|
642
|
-
>
|
|
643
|
-
<li
|
|
644
|
-
v-for="(a, i) in pageActions"
|
|
645
|
-
:key="i"
|
|
646
|
-
class="user-menu-item"
|
|
647
|
-
>
|
|
648
|
-
<a
|
|
649
|
-
v-if="!a.separator"
|
|
650
|
-
@click="pageAction(a)"
|
|
651
|
-
>{{ a.labelKey ? t(a.labelKey) : a.label }}</a>
|
|
652
|
-
<div
|
|
653
|
-
v-else
|
|
654
|
-
class="menu-separator"
|
|
655
|
-
>
|
|
656
|
-
<div class="menu-separator-line" />
|
|
657
|
-
</div>
|
|
658
|
-
</li>
|
|
659
|
-
</ul>
|
|
660
|
-
</div>
|
|
661
|
-
</template>
|
|
662
|
-
</v-dropdown>
|
|
663
|
-
</div>
|
|
619
|
+
<header-page-action-menu v-if="showPageActions" />
|
|
664
620
|
|
|
665
621
|
<div class="header-spacer" />
|
|
666
622
|
<div
|
|
@@ -1002,7 +958,7 @@ export default {
|
|
|
1002
958
|
}
|
|
1003
959
|
}
|
|
1004
960
|
|
|
1005
|
-
.actions {
|
|
961
|
+
:deep(.actions) {
|
|
1006
962
|
align-items: center;
|
|
1007
963
|
cursor: pointer;
|
|
1008
964
|
display: flex;
|
|
@@ -1014,6 +970,14 @@ export default {
|
|
|
1014
970
|
color: var(--link);
|
|
1015
971
|
}
|
|
1016
972
|
}
|
|
973
|
+
|
|
974
|
+
:deep(.v-popper:focus) {
|
|
975
|
+
outline: 0;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.dropdown {
|
|
979
|
+
margin: 0 -10px;
|
|
980
|
+
}
|
|
1017
981
|
}
|
|
1018
982
|
|
|
1019
983
|
.header-spacer {
|
|
@@ -1113,70 +1077,4 @@ export default {
|
|
|
1113
1077
|
color: var(--secondary);
|
|
1114
1078
|
}
|
|
1115
1079
|
|
|
1116
|
-
#page-actions {
|
|
1117
|
-
:deep() .v-popper__arrow-container {
|
|
1118
|
-
display: none;
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
.user-menu {
|
|
1123
|
-
:deep() .v-popper__arrow-container {
|
|
1124
|
-
display: none;
|
|
1125
|
-
}
|
|
1126
|
-
// Remove the default padding on the popup so that the hover on menu items goes full width of the menu
|
|
1127
|
-
:deep() .v-popper__inner {
|
|
1128
|
-
padding: 0 0 10px 0;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
:deep() .v-popper {
|
|
1132
|
-
display: flex;
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
.actions {
|
|
1137
|
-
:deep() .v-popper:focus {
|
|
1138
|
-
outline: 0;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
.dropdown {
|
|
1142
|
-
margin: 0 -10px;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
.user-menu-item {
|
|
1147
|
-
a, &.no-link > span {
|
|
1148
|
-
cursor: pointer;
|
|
1149
|
-
padding: 0px 10px;
|
|
1150
|
-
|
|
1151
|
-
&:hover {
|
|
1152
|
-
background-color: var(--dropdown-hover-bg);
|
|
1153
|
-
color: var(--dropdown-hover-text);
|
|
1154
|
-
text-decoration: none;
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
// When the menu item is focused, pop the margin and compensate the padding, so that
|
|
1158
|
-
// the focus border appears within the menu
|
|
1159
|
-
&:focus {
|
|
1160
|
-
margin: 0 2px;
|
|
1161
|
-
padding: 10px 8px;
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
&.no-link > span {
|
|
1166
|
-
display: flex;
|
|
1167
|
-
justify-content: space-between;
|
|
1168
|
-
padding: 10px;
|
|
1169
|
-
color: var(--link);
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
div.menu-separator {
|
|
1173
|
-
cursor: default;
|
|
1174
|
-
padding: 4px 0;
|
|
1175
|
-
|
|
1176
|
-
.menu-separator-line {
|
|
1177
|
-
background-color: var(--border);
|
|
1178
|
-
height: 1px;
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
1080
|
</style>
|