From 7f1536d9cff20b73b8b42a703886f170a50fda5f Mon Sep 17 00:00:00 2001 From: Cody Jackson Date: Tue, 13 Aug 2024 14:32:30 -0700 Subject: [PATCH 001/148] Refactoring the plain element data bindings Performing this change so the vue3 migration script can modify all @input, @v-model of components without changing plain elements. This will reduce the number of vue3 compiler errors. --- .../Form/LabeledInput/LabeledInput.vue | 2 +- shell/components/SortableTable/index.vue | 6 ++++-- shell/components/auth/RoleDetailEdit.vue | 4 ++-- shell/components/form/ColorInput.vue | 2 +- shell/components/form/KeyValue.vue | 6 +++--- shell/components/form/MatchExpressions.vue | 6 +++--- shell/components/form/Ports.vue | 8 ++++---- shell/components/form/ServicePorts.vue | 16 ++++++++-------- shell/components/nav/Jump.vue | 2 +- shell/components/nav/TopLevelMenu.vue | 3 ++- .../nav/WindowManager/ContainerLogs.vue | 3 ++- shell/dialog/ForceMachineRemoveDialog.vue | 3 ++- .../edit/networking.k8s.io.ingress/RulePath.vue | 4 ++-- shell/edit/token.vue | 3 ++- shell/pages/c/_cluster/apps/charts/index.vue | 3 ++- 15 files changed, 39 insertions(+), 32 deletions(-) diff --git a/pkg/rancher-components/src/components/Form/LabeledInput/LabeledInput.vue b/pkg/rancher-components/src/components/Form/LabeledInput/LabeledInput.vue index 935f8b9e34e..95d8e94262a 100644 --- a/pkg/rancher-components/src/components/Form/LabeledInput/LabeledInput.vue +++ b/pkg/rancher-components/src/components/Form/LabeledInput/LabeledInput.vue @@ -336,7 +336,7 @@ export default defineComponent({ autocomplete="off" autocapitalize="off" :data-lpignore="ignorePasswordManagers" - @input="onInput" + @input="($plainInputEvent) => onInput($plainInputEvent)" @focus="onFocus" @blur="onBlur" @change="onChange" diff --git a/shell/components/SortableTable/index.vue b/shell/components/SortableTable/index.vue index ce2bc64dad4..b84c372fcf6 100644 --- a/shell/components/SortableTable/index.vue +++ b/shell/components/SortableTable/index.vue @@ -1136,10 +1136,11 @@ export default { >
{{ t('sortableTable.in') }} @@ -1177,10 +1178,11 @@ export default {
diff --git a/shell/components/auth/RoleDetailEdit.vue b/shell/components/auth/RoleDetailEdit.vue index ad14f2eb639..d18574d93c4 100644 --- a/shell/components/auth/RoleDetailEdit.vue +++ b/shell/components/auth/RoleDetailEdit.vue @@ -730,7 +730,7 @@ export default { :disabled="isBuiltin" :mode="mode" :data-testid="`grant-resources-api-groups${props.i}`" - @input="setRule('apiGroups', props.row.value, $event.target.value)" + @input="($plainInputEvent) => setRule('apiGroups', props.row.value, $plainInputEvent.target.value)" >
diff --git a/shell/components/form/ColorInput.vue b/shell/components/form/ColorInput.vue index 31656f5224f..6f4d8518f59 100644 --- a/shell/components/form/ColorInput.vue +++ b/shell/components/form/ColorInput.vue @@ -89,7 +89,7 @@ export default { type="color" :disabled="mode !== editMode" :value="inputValue" - @input="$emit('input', $event.target.value)" + @input="($plainInputEvent) => $emit('input', $plainInputEvent.target.value)" > {{ inputValue }} diff --git a/shell/components/form/KeyValue.vue b/shell/components/form/KeyValue.vue index 291052ee0cc..c342c9d3347 100644 --- a/shell/components/form/KeyValue.vue +++ b/shell/components/form/KeyValue.vue @@ -673,7 +673,7 @@ export default { :disabled="isView || disabled || !keyEditable || isProtected(row.key)" :placeholder="_keyPlaceholder" :data-testid="`input-kv-item-key-${i}`" - @input="queueUpdate" + @input="($plainInputEvent) => queueUpdate($plainInputEvent)" @paste="onPaste(i, $event)" > @@ -729,7 +729,7 @@ export default { />
@@ -195,12 +195,12 @@ export default { {{ row.targetPort }} diff --git a/shell/components/form/ServicePorts.vue b/shell/components/form/ServicePorts.vue index 9914ff896e6..f812af30e24 100644 --- a/shell/components/form/ServicePorts.vue +++ b/shell/components/form/ServicePorts.vue @@ -183,10 +183,10 @@ export default {
@@ -194,12 +194,12 @@ export default {
{{ row.targetPort }}
{{ row.nodePort }}
diff --git a/shell/dialog/ForceMachineRemoveDialog.vue b/shell/dialog/ForceMachineRemoveDialog.vue index 4baad6af3ff..6e1bf2671f5 100644 --- a/shell/dialog/ForceMachineRemoveDialog.vue +++ b/shell/dialog/ForceMachineRemoveDialog.vue @@ -93,8 +93,9 @@ export default {
{{ protip }} diff --git a/shell/edit/networking.k8s.io.ingress/RulePath.vue b/shell/edit/networking.k8s.io.ingress/RulePath.vue index 12c6dfc4cc4..ccb0531d9c9 100644 --- a/shell/edit/networking.k8s.io.ingress/RulePath.vue +++ b/shell/edit/networking.k8s.io.ingress/RulePath.vue @@ -129,9 +129,9 @@ export default { >