bfg-common 1.5.264 → 1.5.265

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 (135) hide show
  1. package/CODE_STYLE.md +109 -109
  2. package/assets/localization/local_be.json +0 -26
  3. package/assets/localization/local_en.json +0 -26
  4. package/assets/localization/local_hy.json +0 -26
  5. package/assets/localization/local_kk.json +0 -26
  6. package/assets/localization/local_ru.json +0 -26
  7. package/assets/localization/local_zh.json +0 -26
  8. package/assets/scss/common/theme.scss +0 -24
  9. package/components/atoms/TheIcon3.vue +50 -50
  10. package/components/atoms/perPage/PerPage.vue +58 -58
  11. package/components/atoms/stack/StackBlock.vue +185 -185
  12. package/components/atoms/table/dataGrid/DataGrid.vue +1717 -1717
  13. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  14. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  15. package/components/atoms/table/info/lib/models/interfaces.ts +10 -10
  16. package/components/atoms/tabs/VerticalTabs.vue +105 -105
  17. package/components/common/backup/storage/actions/add/Add.vue +250 -250
  18. package/components/common/backup/storage/actions/add/Old.vue +116 -116
  19. package/components/common/backup/storage/actions/add/lib/config/steps.ts +168 -168
  20. package/components/common/backup/storage/actions/add/steps/hostAccessibility/HostAccessibility.vue +52 -52
  21. package/components/common/backup/storage/actions/add/steps/name/New.vue +102 -102
  22. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigure.vue +42 -42
  23. package/components/common/backup/storage/actions/add/steps/readyComplete/ReadyComplete.vue +45 -45
  24. package/components/common/backup/storage/actions/add/steps/readyComplete/ReadyCompleteNew.vue +160 -160
  25. package/components/common/backup/storage/actions/add/steps/readyComplete/lib/config/propertiesDetails.ts +243 -243
  26. package/components/common/backup/storage/actions/delete/Delete.vue +65 -65
  27. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  28. package/components/common/context/lib/models/interfaces.ts +31 -31
  29. package/components/common/diagramMain/DiagramMain.vue +897 -897
  30. package/components/common/diagramMain/Header.vue +214 -214
  31. package/components/common/layout/theHeader/helpMenu/About.vue +82 -82
  32. package/components/common/layout/theHeader/userMenu/modals/preferences/view/ViewOld.vue +112 -112
  33. package/components/common/monitor/overview/OverviewOld.vue +139 -139
  34. package/components/common/pages/home/headline/Headline.vue +45 -45
  35. package/components/common/pages/home/headline/HeadlineOld.vue +42 -42
  36. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  37. package/components/common/pages/home/widgets/Widgets.vue +49 -49
  38. package/components/common/pages/home/widgets/WidgetsNew.vue +86 -86
  39. package/components/common/pages/home/widgets/WidgetsOld.vue +34 -34
  40. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  41. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  42. package/components/common/pages/home/widgets/vms/Vms.vue +26 -26
  43. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  44. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  45. package/components/common/pages/packages/Packages.vue +208 -208
  46. package/components/common/pages/shortcuts/block/BlockOld.vue +68 -68
  47. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  48. package/components/common/recursionTree/RecursionTree.vue +223 -223
  49. package/components/common/select/button/ButtonDropdown.vue +108 -108
  50. package/components/common/spiceConsole/Drawer.vue +377 -377
  51. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  52. package/components/common/vm/actions/add/Add.vue +823 -823
  53. package/components/common/vm/actions/add/Old.vue +382 -382
  54. package/components/common/vm/actions/add/folderTreeView/FolderTreeView.vue +72 -72
  55. package/components/common/vm/actions/add/folderTreeView/New.vue +40 -40
  56. package/components/common/vm/actions/add/folderTreeView/Old.vue +50 -50
  57. package/components/common/vm/actions/clone/lib/config/steps.ts +291 -291
  58. package/components/common/vm/actions/clone/toTemplate/lib/config/steps.ts +116 -116
  59. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +321 -321
  60. package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +227 -227
  61. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +100 -100
  62. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +232 -232
  63. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveOld.vue +168 -168
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +25 -25
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +78 -78
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaOld.vue +50 -50
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/TooltipNew.vue +154 -154
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +220 -220
  71. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +307 -307
  72. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +385 -385
  73. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
  74. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/LocationNew.vue +75 -75
  75. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/LocationOld.vue +85 -85
  76. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +288 -288
  77. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +94 -94
  78. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  79. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +205 -205
  80. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +66 -66
  81. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoOld.vue +62 -62
  82. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
  83. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoOld.vue +76 -76
  84. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +15 -15
  85. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteNew.vue +42 -42
  86. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteOld.vue +30 -30
  87. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridOld.vue +84 -84
  88. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  89. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/inputDevices/InputDevicesNew.vue +40 -40
  90. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +154 -154
  91. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
  92. package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +145 -145
  93. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
  94. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
  95. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +174 -174
  96. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +31 -31
  97. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +31 -31
  98. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  99. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
  100. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +128 -128
  101. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
  102. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionNew.vue +39 -39
  103. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
  104. package/components/common/vm/actions/common/lib/utils/capabilities.ts +52 -52
  105. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  106. package/components/common/vm/actions/common/select/computeResource/treeView/New.vue +44 -44
  107. package/components/common/vm/actions/common/select/computeResource/treeView/TreeView.vue +118 -118
  108. package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
  109. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  110. package/components/common/vm/actions/common/select/name/Name.vue +174 -174
  111. package/components/common/vm/actions/common/select/os/Old.vue +152 -152
  112. package/components/common/vm/actions/common/select/os/Os.vue +139 -139
  113. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  114. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  115. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  116. package/components/common/vmt/actions/add/Add.vue +641 -641
  117. package/components/common/vmt/actions/add/lib/config/steps.ts +107 -107
  118. package/components/common/vmt/actions/add/lib/models/interfaces.ts +23 -23
  119. package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +220 -220
  120. package/components/common/wizards/vm/migrate/lib/config/steps.ts +157 -157
  121. package/components/common/wizards/vm/migrate/lib/validations.ts +68 -68
  122. package/components/common/wizards/vm/migrate/select/computeResource/tableView/TableView.vue +135 -135
  123. package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
  124. package/components/common/wizards/vm/migrate/select/network/table/network/lib/config/advancedTable.ts +91 -91
  125. package/composables/productNameLocal.ts +30 -30
  126. package/composables/useAppVersion.ts +21 -21
  127. package/package.json +2 -2
  128. package/plugins/date.ts +233 -233
  129. package/plugins/panelStates.ts +70 -70
  130. package/plugins/text.ts +59 -59
  131. package/public/spice-console/lib/images/bitmap.js +203 -203
  132. package/public/spice-console/network/spicechannel.js +387 -387
  133. package/store/main/mutations.ts +7 -7
  134. package/store/main/state.ts +7 -7
  135. 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,39 +1,39 @@
1
- <template>
2
- <ui-stack-block :has-children="false">
3
- <template #stackBlockKey>
4
- {{ localization.common.usbRedirection }}
5
- </template>
6
- <template #stackBlockContent>
7
- <ui-select
8
- id="usb-redirection-select"
9
- v-model="usbRedirection"
10
- :items="props.usbRedirectionOptions"
11
- test-id="usb-redirection-select"
12
- class="usb-redirection-select"
13
- disabled
14
- size="sm"
15
- />
16
- </template>
17
- </ui-stack-block>
18
- </template>
19
-
20
- <script setup lang="ts">
21
- import type { UI_I_Localization } from '~/lib/models/interfaces'
22
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
23
-
24
- const usbRedirection = defineModel<number>('usbRedirection', {
25
- required: true,
26
- })
27
-
28
- const props = defineProps<{
29
- usbRedirectionOptions: UI_I_OptionItem[]
30
- }>()
31
-
32
- const localization = computed<UI_I_Localization>(() => useLocal())
33
- </script>
34
-
35
- <style scoped>
36
- :deep(.usb-redirection-select .ui-main-select-toggle) {
37
- width: 108px;
38
- }
39
- </style>
1
+ <template>
2
+ <ui-stack-block :has-children="false">
3
+ <template #stackBlockKey>
4
+ {{ localization.common.usbRedirection }}
5
+ </template>
6
+ <template #stackBlockContent>
7
+ <ui-select
8
+ id="usb-redirection-select"
9
+ v-model="usbRedirection"
10
+ :items="props.usbRedirectionOptions"
11
+ test-id="usb-redirection-select"
12
+ class="usb-redirection-select"
13
+ disabled
14
+ size="sm"
15
+ />
16
+ </template>
17
+ </ui-stack-block>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
22
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
23
+
24
+ const usbRedirection = defineModel<number>('usbRedirection', {
25
+ required: true,
26
+ })
27
+
28
+ const props = defineProps<{
29
+ usbRedirectionOptions: UI_I_OptionItem[]
30
+ }>()
31
+
32
+ const localization = computed<UI_I_Localization>(() => useLocal())
33
+ </script>
34
+
35
+ <style scoped>
36
+ :deep(.usb-redirection-select .ui-main-select-toggle) {
37
+ width: 108px;
38
+ }
39
+ </style>