bfg-common 1.5.292 → 1.5.293

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.
Files changed (120) hide show
  1. package/CODE_STYLE.md +109 -109
  2. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  3. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  4. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  5. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  6. package/components/atoms/TheIcon3.vue +50 -50
  7. package/components/atoms/perPage/PerPage.vue +58 -58
  8. package/components/atoms/table/dataGrid/DataGrid.vue +1717 -1717
  9. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  10. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  11. package/components/atoms/tabs/VerticalTabs.vue +105 -105
  12. package/components/common/backup/storage/actions/add/lib/config/steps.ts +168 -168
  13. package/components/common/backup/storage/actions/add/steps/hostAccessibility/HostAccessibility.vue +52 -52
  14. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigure.vue +42 -42
  15. package/components/common/backup/storage/actions/add/steps/readyComplete/ReadyComplete.vue +45 -45
  16. package/components/common/backup/storage/actions/add/steps/readyComplete/lib/config/propertiesDetails.ts +243 -243
  17. package/components/common/backup/storage/actions/delete/Delete.vue +65 -65
  18. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  19. package/components/common/context/lib/models/interfaces.ts +31 -31
  20. package/components/common/diagramMain/DiagramMain.vue +897 -897
  21. package/components/common/layout/theHeader/helpMenu/About.vue +82 -82
  22. package/components/common/layout/theHeader/userMenu/modals/preferences/view/ViewOld.vue +112 -112
  23. package/components/common/monitor/overview/OverviewOld.vue +139 -139
  24. package/components/common/pages/home/headline/Headline.vue +45 -45
  25. package/components/common/pages/home/headline/HeadlineOld.vue +42 -42
  26. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  27. package/components/common/pages/home/widgets/Widgets.vue +49 -49
  28. package/components/common/pages/home/widgets/WidgetsNew.vue +86 -86
  29. package/components/common/pages/home/widgets/WidgetsOld.vue +34 -34
  30. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  31. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  32. package/components/common/pages/home/widgets/vms/Vms.vue +26 -26
  33. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  34. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  35. package/components/common/pages/packages/Packages.vue +208 -208
  36. package/components/common/pages/shortcuts/block/BlockOld.vue +68 -68
  37. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  38. package/components/common/recursionTree/RecursionTree.vue +223 -223
  39. package/components/common/select/button/ButtonDropdown.vue +108 -108
  40. package/components/common/spiceConsole/Drawer.vue +377 -377
  41. package/components/common/spiceConsole/SpiceConsole.vue +127 -84
  42. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  43. package/components/common/vm/actions/add/folderTreeView/FolderTreeView.vue +72 -72
  44. package/components/common/vm/actions/add/folderTreeView/New.vue +40 -40
  45. package/components/common/vm/actions/add/folderTreeView/Old.vue +50 -50
  46. package/components/common/vm/actions/clone/Clone.vue +817 -817
  47. package/components/common/vm/actions/clone/lib/config/steps.ts +291 -291
  48. package/components/common/vm/actions/clone/toTemplate/lib/config/steps.ts +116 -116
  49. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +321 -321
  50. package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +227 -227
  51. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +100 -100
  52. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +232 -232
  53. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveOld.vue +168 -168
  54. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +25 -25
  55. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +78 -78
  56. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaOld.vue +50 -50
  57. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
  58. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  59. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/TooltipNew.vue +154 -154
  60. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +220 -220
  61. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +307 -307
  62. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +385 -385
  63. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/LocationOld.vue +85 -85
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +288 -288
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +94 -94
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +205 -205
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +66 -66
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoOld.vue +62 -62
  71. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
  72. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoOld.vue +76 -76
  73. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +15 -15
  74. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteNew.vue +42 -42
  75. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteOld.vue +30 -30
  76. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridOld.vue +84 -84
  77. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  78. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/inputDevices/InputDevicesNew.vue +40 -40
  79. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +154 -154
  80. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
  81. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
  82. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
  83. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +174 -174
  84. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +31 -31
  85. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +31 -31
  86. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  87. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
  88. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +128 -128
  89. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
  90. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
  91. package/components/common/vm/actions/common/lib/utils/capabilities.ts +52 -52
  92. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  93. package/components/common/vm/actions/common/select/computeResource/treeView/TreeView.vue +118 -118
  94. package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
  95. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  96. package/components/common/vm/actions/common/select/name/Name.vue +174 -174
  97. package/components/common/vm/actions/common/select/os/Old.vue +152 -152
  98. package/components/common/vm/actions/common/select/os/Os.vue +139 -139
  99. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  100. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  101. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  102. package/components/common/vmt/actions/add/Add.vue +641 -641
  103. package/components/common/vmt/actions/add/lib/config/steps.ts +107 -107
  104. package/components/common/vmt/actions/add/lib/models/interfaces.ts +23 -23
  105. package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +220 -220
  106. package/components/common/wizards/vm/migrate/lib/config/steps.ts +157 -157
  107. package/components/common/wizards/vm/migrate/lib/validations.ts +68 -68
  108. package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
  109. package/components/common/wizards/vm/migrate/select/network/table/network/lib/config/advancedTable.ts +91 -91
  110. package/composables/productNameLocal.ts +30 -30
  111. package/composables/useAppVersion.ts +21 -21
  112. package/package.json +1 -1
  113. package/plugins/date.ts +233 -233
  114. package/plugins/panelStates.ts +70 -70
  115. package/plugins/text.ts +59 -59
  116. package/public/spice-console/lib/images/bitmap.js +203 -203
  117. package/public/spice-console/network/spicechannel.js +387 -387
  118. package/store/main/mutations.ts +7 -7
  119. package/store/main/state.ts +7 -7
  120. package/store/tasks/mappers/recentTasks.ts +64 -64
@@ -1,103 +1,103 @@
1
- <template>
2
- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-password-new
3
- v-if="isNewView"
4
- v-model:is-enabled-password="isEnabledPassword"
5
- v-model:form="form"
6
- :disabled="props.disabled"
7
- :error-text="passwordErrorText"
8
- @set-password-disable="setPasswordDisable"
9
- @change-password="changePassword"
10
- @generate-password="onGeneratePassword"
11
- />
12
- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-password-old
13
- v-else
14
- v-model:is-enabled-password="isEnabledPassword"
15
- v-model:form="form"
16
- :disabled="props.disabled"
17
- :error-text="passwordErrorText"
18
- @set-password-disable="setPasswordDisable"
19
- @change-password="changePassword"
20
- @generate-password="onGeneratePassword"
21
- />
22
- </template>
23
-
24
- <script setup lang="ts">
25
- import type { UI_I_DefaultForm } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces'
26
- import type { UI_I_Localization } from '~/lib/models/interfaces'
27
- import { generatePassword } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/utils'
28
-
29
- const password = defineModel<string>('password', { required: true })
30
-
31
- const props = defineProps<{
32
- disabled: boolean
33
- }>()
34
- const emits = defineEmits<{
35
- (event: 'valid', value: boolean): void
36
- }>()
37
-
38
- const { $store, $validation }: any = useNuxtApp()
39
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
40
-
41
- const localization = computed<UI_I_Localization>(() => useLocal())
42
-
43
- const validation = $validation.call({})
44
- const defaultForm: UI_I_DefaultForm = {
45
- password: {
46
- value: password.value,
47
- validations: [
48
- {
49
- value: 'password',
50
- errorText: localization.value.common.passwordsMustLeast8CharactersLongContainUpperAndLowerCaseLetterNumberAndSpecialCharacter,
51
- },
52
- ],
53
- },
54
- }
55
- const form = ref<UI_I_DefaultForm>(useDeepCopy(defaultForm))
56
- const setForm = (): void => {
57
- form.value = useDeepCopy(defaultForm)
58
- validation.setForm(form)
59
- }
60
- setForm()
61
-
62
- const showValidationErrors = (): void => {
63
- const valid = validation.touch()
64
- console.log(valid, 111)
65
- passwordErrorText.value = !valid.isValid ? valid.errors.password[0] : ''
66
- emits('valid', valid.isValid)
67
- }
68
- const removeValidationErrors = (): void => {
69
- passwordErrorText.value = ''
70
- emits('valid', true)
71
- }
72
-
73
- const setPasswordDisable = (): void => {
74
- if (isEnabledPassword.value) {
75
- return
76
- }
77
-
78
- removeValidationErrors()
79
- setForm()
80
- password.value = ''
81
- }
82
-
83
- const passwordErrorText = ref<string>('')
84
-
85
- const changePassword = (value: string): void => {
86
- password.value = value
87
-
88
- showValidationErrors()
89
- }
90
-
91
- const isEnabledPassword = ref<boolean>(!!password.value)
92
-
93
- const onGeneratePassword = (): void => {
94
- const generatedPassword = generatePassword()
95
-
96
- form.value.password.value = generatedPassword
97
- password.value = generatedPassword
98
-
99
- showValidationErrors()
100
- }
101
- </script>
102
-
103
- <style scoped></style>
1
+ <template>
2
+ <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-password-new
3
+ v-if="isNewView"
4
+ v-model:is-enabled-password="isEnabledPassword"
5
+ v-model:form="form"
6
+ :disabled="props.disabled"
7
+ :error-text="passwordErrorText"
8
+ @set-password-disable="setPasswordDisable"
9
+ @change-password="changePassword"
10
+ @generate-password="onGeneratePassword"
11
+ />
12
+ <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-password-old
13
+ v-else
14
+ v-model:is-enabled-password="isEnabledPassword"
15
+ v-model:form="form"
16
+ :disabled="props.disabled"
17
+ :error-text="passwordErrorText"
18
+ @set-password-disable="setPasswordDisable"
19
+ @change-password="changePassword"
20
+ @generate-password="onGeneratePassword"
21
+ />
22
+ </template>
23
+
24
+ <script setup lang="ts">
25
+ import type { UI_I_DefaultForm } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces'
26
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
27
+ import { generatePassword } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/utils'
28
+
29
+ const password = defineModel<string>('password', { required: true })
30
+
31
+ const props = defineProps<{
32
+ disabled: boolean
33
+ }>()
34
+ const emits = defineEmits<{
35
+ (event: 'valid', value: boolean): void
36
+ }>()
37
+
38
+ const { $store, $validation }: any = useNuxtApp()
39
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
40
+
41
+ const localization = computed<UI_I_Localization>(() => useLocal())
42
+
43
+ const validation = $validation.call({})
44
+ const defaultForm: UI_I_DefaultForm = {
45
+ password: {
46
+ value: password.value,
47
+ validations: [
48
+ {
49
+ value: 'password',
50
+ errorText: localization.value.common.passwordsMustLeast8CharactersLongContainUpperAndLowerCaseLetterNumberAndSpecialCharacter,
51
+ },
52
+ ],
53
+ },
54
+ }
55
+ const form = ref<UI_I_DefaultForm>(useDeepCopy(defaultForm))
56
+ const setForm = (): void => {
57
+ form.value = useDeepCopy(defaultForm)
58
+ validation.setForm(form)
59
+ }
60
+ setForm()
61
+
62
+ const showValidationErrors = (): void => {
63
+ const valid = validation.touch()
64
+ console.log(valid, 111)
65
+ passwordErrorText.value = !valid.isValid ? valid.errors.password[0] : ''
66
+ emits('valid', valid.isValid)
67
+ }
68
+ const removeValidationErrors = (): void => {
69
+ passwordErrorText.value = ''
70
+ emits('valid', true)
71
+ }
72
+
73
+ const setPasswordDisable = (): void => {
74
+ if (isEnabledPassword.value) {
75
+ return
76
+ }
77
+
78
+ removeValidationErrors()
79
+ setForm()
80
+ password.value = ''
81
+ }
82
+
83
+ const passwordErrorText = ref<string>('')
84
+
85
+ const changePassword = (value: string): void => {
86
+ password.value = value
87
+
88
+ showValidationErrors()
89
+ }
90
+
91
+ const isEnabledPassword = ref<boolean>(!!password.value)
92
+
93
+ const onGeneratePassword = (): void => {
94
+ const generatedPassword = generatePassword()
95
+
96
+ form.value.password.value = generatedPassword
97
+ password.value = generatedPassword
98
+
99
+ showValidationErrors()
100
+ }
101
+ </script>
102
+
103
+ <style scoped></style>
@@ -1,128 +1,128 @@
1
- <template>
2
- <ui-stack-block :has-children="false">
3
- <template #stackBlockKey>
4
- {{ localization.auth.password }}
5
- </template>
6
- <template #stackBlockContent>
7
- <div class="password-content">
8
- <ui-checkbox
9
- id="enable-password"
10
- v-model="isEnabledPassword"
11
- :disabled="props.disabled"
12
- :label-text="localization.common.enable"
13
- test-id="enable-password-input"
14
- size="md"
15
- class="mr-2"
16
- @change="emits('set-password-disable')"
17
- />
18
-
19
- <ui-input-with-tooltip
20
- id="password-input"
21
- v-model="form.password.value"
22
- :class="[{ 'has-error': !!props.errorText }]"
23
- :disabled="!isEnabledPassword || props.disabled"
24
- :error-text="props.errorText"
25
- test-id="password-input"
26
- type="text"
27
- size="sm"
28
- @change="onChangePassword"
29
- >
30
- <template #icon>
31
- <div
32
- :class="[
33
- 'copy-icon pointer',
34
- { disabled: !isEnabledPassword || props.disabled },
35
- ]"
36
- @click="onCopyToClipboard"
37
- >
38
- <ui-icon
39
- name="copy-to-clipboard"
40
- type="input"
41
- width="16"
42
- height="16"
43
- />
44
- </div>
45
- </template>
46
- </ui-input-with-tooltip>
47
-
48
- <ui-button
49
- id="generate-password-button"
50
- :disabled="!isEnabledPassword || props.disabled"
51
- :title="localization.common.generatePassword"
52
- test-id="generate-password-button"
53
- class="generate-password-button"
54
- @click="emits('generate-password')"
55
- >
56
- <ui-icon
57
- name="key"
58
- width="16"
59
- height="16"
60
- class="generate-password-icon"
61
- />
62
- </ui-button>
63
- </div>
64
- </template>
65
- </ui-stack-block>
66
- </template>
67
-
68
- <script setup lang="ts">
69
- import type { UI_I_DefaultForm } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces'
70
- import type { UI_I_Localization } from '~/lib/models/interfaces'
71
-
72
- const isEnabledPassword = defineModel<boolean>('isEnabledPassword', {
73
- required: true,
74
- })
75
- const form = defineModel<UI_I_DefaultForm>('form', { required: true })
76
-
77
- const props = defineProps<{
78
- disabled: boolean
79
- errorText: string
80
- }>()
81
- const emits = defineEmits<{
82
- (event: 'set-password-disable'): void
83
- (event: 'change-password', value: string): void
84
- (event: 'generate-password'): void
85
- }>()
86
-
87
- const localization = computed<UI_I_Localization>(() => useLocal())
88
-
89
- const onChangePassword = (): void => {
90
- emits('change-password', form.value.password.value)
91
- }
92
-
93
- const onCopyToClipboard = (): void => {
94
- navigator.clipboard.writeText(form.value.password.value)
95
- }
96
- </script>
97
-
98
- <style scoped>
99
- .password-content {
100
- display: grid;
101
- grid-template-columns: max-content 144px max-content;
102
- grid-gap: 8px;
103
-
104
- .copy-icon {
105
- color: #9da6ad;
106
-
107
- &.disabled {
108
- color: #bdc3c770;
109
- }
110
- }
111
- .generate-password-button {
112
- padding: 8px;
113
-
114
- &:disabled {
115
- .generate-password-icon {
116
- color: #e9eaec;
117
- }
118
- }
119
- }
120
- }
121
-
122
- :deep(.ui-main.ui-main-sm .ui-main-input) {
123
- height: 32px;
124
- }
125
- :deep(.ui-main.ui-main-sm .ui-slot-icon-content) {
126
- pointer-events: unset;
127
- }
128
- </style>
1
+ <template>
2
+ <ui-stack-block :has-children="false">
3
+ <template #stackBlockKey>
4
+ {{ localization.auth.password }}
5
+ </template>
6
+ <template #stackBlockContent>
7
+ <div class="password-content">
8
+ <ui-checkbox
9
+ id="enable-password"
10
+ v-model="isEnabledPassword"
11
+ :disabled="props.disabled"
12
+ :label-text="localization.common.enable"
13
+ test-id="enable-password-input"
14
+ size="md"
15
+ class="mr-2"
16
+ @change="emits('set-password-disable')"
17
+ />
18
+
19
+ <ui-input-with-tooltip
20
+ id="password-input"
21
+ v-model="form.password.value"
22
+ :class="[{ 'has-error': !!props.errorText }]"
23
+ :disabled="!isEnabledPassword || props.disabled"
24
+ :error-text="props.errorText"
25
+ test-id="password-input"
26
+ type="text"
27
+ size="sm"
28
+ @change="onChangePassword"
29
+ >
30
+ <template #icon>
31
+ <div
32
+ :class="[
33
+ 'copy-icon pointer',
34
+ { disabled: !isEnabledPassword || props.disabled },
35
+ ]"
36
+ @click="onCopyToClipboard"
37
+ >
38
+ <ui-icon
39
+ name="copy-to-clipboard"
40
+ type="input"
41
+ width="16"
42
+ height="16"
43
+ />
44
+ </div>
45
+ </template>
46
+ </ui-input-with-tooltip>
47
+
48
+ <ui-button
49
+ id="generate-password-button"
50
+ :disabled="!isEnabledPassword || props.disabled"
51
+ :title="localization.common.generatePassword"
52
+ test-id="generate-password-button"
53
+ class="generate-password-button"
54
+ @click="emits('generate-password')"
55
+ >
56
+ <ui-icon
57
+ name="key"
58
+ width="16"
59
+ height="16"
60
+ class="generate-password-icon"
61
+ />
62
+ </ui-button>
63
+ </div>
64
+ </template>
65
+ </ui-stack-block>
66
+ </template>
67
+
68
+ <script setup lang="ts">
69
+ import type { UI_I_DefaultForm } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces'
70
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
71
+
72
+ const isEnabledPassword = defineModel<boolean>('isEnabledPassword', {
73
+ required: true,
74
+ })
75
+ const form = defineModel<UI_I_DefaultForm>('form', { required: true })
76
+
77
+ const props = defineProps<{
78
+ disabled: boolean
79
+ errorText: string
80
+ }>()
81
+ const emits = defineEmits<{
82
+ (event: 'set-password-disable'): void
83
+ (event: 'change-password', value: string): void
84
+ (event: 'generate-password'): void
85
+ }>()
86
+
87
+ const localization = computed<UI_I_Localization>(() => useLocal())
88
+
89
+ const onChangePassword = (): void => {
90
+ emits('change-password', form.value.password.value)
91
+ }
92
+
93
+ const onCopyToClipboard = (): void => {
94
+ navigator.clipboard.writeText(form.value.password.value)
95
+ }
96
+ </script>
97
+
98
+ <style scoped>
99
+ .password-content {
100
+ display: grid;
101
+ grid-template-columns: max-content 144px max-content;
102
+ grid-gap: 8px;
103
+
104
+ .copy-icon {
105
+ color: #9da6ad;
106
+
107
+ &.disabled {
108
+ color: #bdc3c770;
109
+ }
110
+ }
111
+ .generate-password-button {
112
+ padding: 8px;
113
+
114
+ &:disabled {
115
+ .generate-password-icon {
116
+ color: #e9eaec;
117
+ }
118
+ }
119
+ }
120
+ }
121
+
122
+ :deep(.ui-main.ui-main-sm .ui-main-input) {
123
+ height: 32px;
124
+ }
125
+ :deep(.ui-main.ui-main-sm .ui-slot-icon-content) {
126
+ pointer-events: unset;
127
+ }
128
+ </style>
@@ -1,28 +1,28 @@
1
- <template>
2
- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-usb-redirection-new
3
- v-if="isNewView"
4
- v-model:usb-redirection="usbRedirection"
5
- :usb-redirection-options="usbRedirectionOptions"
6
- />
7
- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-usb-redirection-old
8
- v-else
9
- v-model:usb-redirection="usbRedirection"
10
- :usb-redirection-options="usbRedirectionOptions"
11
- />
12
- </template>
13
-
14
- <script setup lang="ts">
15
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
16
- import { usbRedirectionOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/lib/config/config'
17
-
18
- const usbRedirection = defineModel<number>('usbRedirection', { required: true })
19
-
20
- const { $store }: any = useNuxtApp()
21
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
22
-
23
- const usbRedirectionOptions = ref<UI_I_OptionItem[]>(
24
- usbRedirectionOptionsConfig
25
- )
26
- </script>
27
-
28
- <style scoped></style>
1
+ <template>
2
+ <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-usb-redirection-new
3
+ v-if="isNewView"
4
+ v-model:usb-redirection="usbRedirection"
5
+ :usb-redirection-options="usbRedirectionOptions"
6
+ />
7
+ <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-usb-redirection-old
8
+ v-else
9
+ v-model:usb-redirection="usbRedirection"
10
+ :usb-redirection-options="usbRedirectionOptions"
11
+ />
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
16
+ import { usbRedirectionOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/lib/config/config'
17
+
18
+ const usbRedirection = defineModel<number>('usbRedirection', { required: true })
19
+
20
+ const { $store }: any = useNuxtApp()
21
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
22
+
23
+ const usbRedirectionOptions = ref<UI_I_OptionItem[]>(
24
+ usbRedirectionOptionsConfig
25
+ )
26
+ </script>
27
+
28
+ <style scoped></style>
@@ -1,44 +1,44 @@
1
- <template>
2
- <div class="">
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.common.usbRedirection }}
6
- </template>
7
- <template #stackBlockContent>
8
- <div class="select">
9
- <select
10
- id="usb-redirection-select"
11
- v-model="usbRedirection"
12
- data-id="usb-redirection-select"
13
- disabled
14
- >
15
- <option
16
- v-for="(item, key) in props.usbRedirectionOptions"
17
- :key="key"
18
- :value="item.value"
19
- >
20
- {{ item.text }}
21
- </option>
22
- </select>
23
- </div>
24
- </template>
25
- </atoms-stack-block>
26
- </div>
27
- </template>
28
-
29
- <script setup lang="ts">
30
- import type { UI_I_Localization } from '~/lib/models/interfaces'
31
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
32
-
33
- const usbRedirection = defineModel<number>('usbRedirection', {
34
- required: true,
35
- })
36
-
37
- const props = defineProps<{
38
- usbRedirectionOptions: UI_I_OptionItem[]
39
- }>()
40
-
41
- const localization = computed<UI_I_Localization>(() => useLocal())
42
- </script>
43
-
44
- <style scoped></style>
1
+ <template>
2
+ <div class="">
3
+ <atoms-stack-block :has-children="false">
4
+ <template #stackBlockKey>
5
+ {{ localization.common.usbRedirection }}
6
+ </template>
7
+ <template #stackBlockContent>
8
+ <div class="select">
9
+ <select
10
+ id="usb-redirection-select"
11
+ v-model="usbRedirection"
12
+ data-id="usb-redirection-select"
13
+ disabled
14
+ >
15
+ <option
16
+ v-for="(item, key) in props.usbRedirectionOptions"
17
+ :key="key"
18
+ :value="item.value"
19
+ >
20
+ {{ item.text }}
21
+ </option>
22
+ </select>
23
+ </div>
24
+ </template>
25
+ </atoms-stack-block>
26
+ </div>
27
+ </template>
28
+
29
+ <script setup lang="ts">
30
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
31
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
32
+
33
+ const usbRedirection = defineModel<number>('usbRedirection', {
34
+ required: true,
35
+ })
36
+
37
+ const props = defineProps<{
38
+ usbRedirectionOptions: UI_I_OptionItem[]
39
+ }>()
40
+
41
+ const localization = computed<UI_I_Localization>(() => useLocal())
42
+ </script>
43
+
44
+ <style scoped></style>