bfg-common 1.5.534 → 1.5.535

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 (133) 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/assets/localization/local_ru.json +1 -1
  7. package/components/atoms/TheIcon3.vue +50 -50
  8. package/components/atoms/collapse/CollapseNav.vue +170 -170
  9. package/components/atoms/perPage/PerPage.vue +58 -58
  10. package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
  11. package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
  12. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  13. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  14. package/components/common/backup/storage/actions/add/Add.vue +251 -251
  15. package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
  16. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  17. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  18. package/components/common/browse/lib/models/interfaces.ts +5 -5
  19. package/components/common/diagramMain/network/Contents.vue +497 -497
  20. package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
  21. package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
  22. package/components/common/pages/backups/DetailView.vue +52 -52
  23. package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
  24. package/components/common/pages/backups/modals/Modals.vue +243 -243
  25. package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +195 -195
  26. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  27. package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
  28. package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
  29. package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
  30. package/components/common/pages/backups/modals/restore/disks/Disks.vue +27 -27
  31. package/components/common/pages/backups/modals/restore/disks/tableView/lib/config/table.ts +117 -117
  32. package/components/common/pages/backups/modals/restore/name/Name.vue +166 -166
  33. package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
  34. package/components/common/pages/backups/modals/restore/networks/Networks.vue +70 -67
  35. package/components/common/pages/backups/modals/restore/networks/table/Table.vue +214 -214
  36. package/components/common/pages/backups/modals/restore/types/lib/config/typeOptions.ts +25 -25
  37. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  38. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  39. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  40. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  41. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  42. package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
  43. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  44. package/components/common/select/radio/RadioGroup.vue +137 -137
  45. package/components/common/spiceConsole/Drawer.vue +420 -420
  46. package/components/common/spiceConsole/SpiceConsole.vue +184 -184
  47. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  48. package/components/common/tools/Actions.vue +207 -207
  49. package/components/common/treeView/TreeView.vue +52 -52
  50. package/components/common/vm/actions/add/Add.vue +945 -895
  51. package/components/common/vm/actions/add/New.vue +689 -695
  52. package/components/common/vm/actions/add/Old.vue +400 -414
  53. package/components/common/vm/actions/add/lib/config/steps.ts +347 -347
  54. package/components/common/vm/actions/clone/Clone.vue +806 -754
  55. package/components/common/vm/actions/clone/{cloneNew/CloneNew.vue → new/New.vue} +454 -434
  56. package/components/common/vm/actions/clone/{cloneOld/CloneOld.vue → old/Old.vue} +375 -382
  57. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +368 -368
  58. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
  59. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  60. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +427 -427
  61. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
  62. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/Table.vue +99 -93
  63. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
  67. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
  68. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
  69. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +174 -174
  70. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  71. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
  72. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
  73. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  74. package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
  75. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  76. package/components/common/vm/actions/common/select/os/Old.vue +152 -152
  77. package/components/common/vm/actions/common/select/os/Os.vue +139 -139
  78. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  79. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  80. package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
  81. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  82. package/components/common/vm/actions/register/Register.vue +352 -285
  83. package/components/common/vm/actions/register/lib/config/steps.ts +86 -86
  84. package/components/common/wizards/common/steps/computeResource/ComputeResource.vue +85 -95
  85. package/components/common/wizards/common/steps/computeResource/New.vue +92 -88
  86. package/components/common/wizards/common/steps/computeResource/Old.vue +102 -81
  87. package/components/common/wizards/common/steps/computeResource/compatibility/Compatibility.vue +31 -0
  88. package/components/common/wizards/common/steps/computeResource/compatibility/New.vue +98 -0
  89. package/components/common/wizards/{vm/common/validation/compatibility/Compatibility.vue → common/steps/computeResource/compatibility/Old.vue} +54 -62
  90. package/components/common/wizards/common/steps/computeResource/compatibility/lib/models/enums.ts +6 -0
  91. package/components/common/wizards/common/steps/name/Name.vue +178 -178
  92. package/components/common/wizards/common/steps/name/New.vue +221 -221
  93. package/components/common/wizards/common/steps/name/Old.vue +121 -121
  94. package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
  95. package/components/common/wizards/common/steps/name/location/Location.vue +85 -85
  96. package/components/common/wizards/common/steps/name/location/New.vue +40 -40
  97. package/components/common/wizards/datastore/add/Add.vue +228 -228
  98. package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
  99. package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
  100. package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +6 -6
  101. package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
  102. package/components/common/wizards/vm/migrate/select/storage/Storage.vue +3 -3
  103. package/composables/useAppVersion.ts +21 -21
  104. package/composables/useLocal.ts +6 -6
  105. package/composables/useLocalCommon.ts +39 -39
  106. package/package.json +2 -2
  107. package/plugins/console.ts +21 -21
  108. package/plugins/date.ts +233 -233
  109. package/plugins/mouse.ts +21 -21
  110. package/plugins/panelStates.ts +70 -70
  111. package/plugins/text.ts +59 -59
  112. package/public/spice-console/application/clientgui.js +854 -854
  113. package/public/spice-console/application/packetfactory.js +211 -211
  114. package/public/spice-console/application/virtualmouse.js +147 -147
  115. package/public/spice-console/lib/images/bitmap.js +203 -203
  116. package/public/spice-console/network/spicechannel.js +440 -440
  117. package/public/spice-console/process/cursorprocess.js +121 -121
  118. package/public/spice-console/process/inputprocess.js +227 -227
  119. package/public/spice-console/process/mainprocess.js +210 -210
  120. package/public/spice-console/run.js +210 -210
  121. package/store/main/mutations.ts +7 -7
  122. package/store/main/state.ts +7 -7
  123. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +0 -143
  124. package/components/common/vm/actions/common/select/computeResource/New.vue +0 -184
  125. package/components/common/vm/actions/common/select/computeResource/Old.vue +0 -99
  126. package/components/common/vm/actions/common/select/computeResource/lib/ComputeResource.spec.ts +0 -479
  127. package/components/common/vm/actions/common/select/computeResource/treeView/New.vue +0 -51
  128. package/components/common/vm/actions/common/select/computeResource/treeView/Old.vue +0 -51
  129. package/components/common/vm/actions/common/select/computeResource/treeView/TreeView.vue +0 -131
  130. package/components/common/wizards/common/compatibility/Compatibility.vue +0 -13
  131. package/components/common/wizards/common/compatibility/New.vue +0 -10
  132. package/components/common/wizards/common/compatibility/Old.vue +0 -10
  133. package/components/common/wizards/vm/common/validation/lib/models/enums.ts +0 -5
@@ -1,86 +1,86 @@
1
- import type { UI_I_WizardStep } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
2
- import { UI_E_WIZARD_STATUS } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/enums'
3
- import type { UI_I_Localization } from '~/lib/models/interfaces'
4
-
5
- export const dynamicSteps = {
6
- selectName: 0,
7
- selectNameFolder: 1,
8
- selectComputeResource: 2,
9
- readyComplete: 3,
10
- }
11
-
12
- export const stepsFunc = (
13
- localization: UI_I_Localization
14
- ): UI_I_WizardStep[] => {
15
- return [
16
- // Procurator
17
- {
18
- id: dynamicSteps.selectName,
19
- stepName: '',
20
- title: localization.common.selectName,
21
- subTitle: localization.common.specifyUniqueName,
22
- status: UI_E_WIZARD_STATUS.SELECTED,
23
- isValid: true,
24
- testId: 'vm-select-name',
25
- fields: {
26
- name: {
27
- field: '',
28
- alert: '',
29
- },
30
- },
31
- },
32
- // Sphere
33
- {
34
- id: dynamicSteps.selectNameFolder,
35
- stepName: '',
36
- title: localization.vmWizard.selectNameFolder,
37
- subTitle: localization.common.specifyUniqueNameTargetLocation,
38
- status: UI_E_WIZARD_STATUS.INACTIVE,
39
- isValid: true,
40
- testId: 'vm-select-name-folder',
41
- fields: {
42
- name: {
43
- field: '',
44
- alert: '',
45
- },
46
- },
47
- },
48
- // Sphere
49
- {
50
- id: dynamicSteps.selectComputeResource,
51
- stepName: '',
52
- title: localization.vmWizard.selectComputeResource,
53
- subTitle: localization.common.selectDestinationComputeResourceOperation,
54
- status: UI_E_WIZARD_STATUS.INACTIVE,
55
- isValid: true,
56
- testId: 'vm-select-compute-resource',
57
- fields: {
58
- computeResource: {
59
- field: '',
60
- alert: '',
61
- },
62
- },
63
- },
64
- {
65
- id: dynamicSteps.readyComplete,
66
- stepName: '',
67
- title: localization.vmWizard.readyComplete,
68
- subTitle: localization.vmWizard.lastCreateSubtitle,
69
- status: UI_E_WIZARD_STATUS.INACTIVE,
70
- isValid: true,
71
- testId: 'vm-ready-complete',
72
- fields: {},
73
- },
74
- ]
75
- }
76
-
77
- export const stepsSchemeInitial = [
78
- // 0 Procurator
79
- [dynamicSteps.selectName, dynamicSteps.readyComplete],
80
- // 1 Sphere
81
- [
82
- dynamicSteps.selectNameFolder,
83
- dynamicSteps.selectComputeResource,
84
- dynamicSteps.readyComplete,
85
- ],
86
- ]
1
+ import type { UI_I_WizardStep } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
2
+ import { UI_E_WIZARD_STATUS } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/enums'
3
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
4
+
5
+ export const dynamicSteps = {
6
+ selectName: 0,
7
+ selectNameFolder: 1,
8
+ selectComputeResource: 2,
9
+ readyComplete: 3,
10
+ }
11
+
12
+ export const stepsFunc = (
13
+ localization: UI_I_Localization
14
+ ): UI_I_WizardStep[] => {
15
+ return [
16
+ // Procurator
17
+ {
18
+ id: dynamicSteps.selectName,
19
+ stepName: '',
20
+ title: localization.common.selectName,
21
+ subTitle: localization.common.specifyUniqueName,
22
+ status: UI_E_WIZARD_STATUS.SELECTED,
23
+ isValid: true,
24
+ testId: 'vm-select-name',
25
+ fields: {
26
+ name: {
27
+ field: '',
28
+ alert: '',
29
+ },
30
+ },
31
+ },
32
+ // Sphere
33
+ {
34
+ id: dynamicSteps.selectNameFolder,
35
+ stepName: '',
36
+ title: localization.vmWizard.selectNameFolder,
37
+ subTitle: localization.common.specifyUniqueNameTargetLocation,
38
+ status: UI_E_WIZARD_STATUS.INACTIVE,
39
+ isValid: true,
40
+ testId: 'vm-select-name-folder',
41
+ fields: {
42
+ name: {
43
+ field: '',
44
+ alert: '',
45
+ },
46
+ },
47
+ },
48
+ // Sphere
49
+ {
50
+ id: dynamicSteps.selectComputeResource,
51
+ stepName: '',
52
+ title: localization.vmWizard.selectComputeResource,
53
+ subTitle: localization.common.selectDestinationComputeResourceOperation,
54
+ status: UI_E_WIZARD_STATUS.INACTIVE,
55
+ isValid: true,
56
+ testId: 'vm-select-compute-resource',
57
+ fields: {
58
+ computeResource: {
59
+ field: '',
60
+ alert: '',
61
+ },
62
+ },
63
+ },
64
+ {
65
+ id: dynamicSteps.readyComplete,
66
+ stepName: '',
67
+ title: localization.vmWizard.readyComplete,
68
+ subTitle: localization.vmWizard.lastCreateSubtitle,
69
+ status: UI_E_WIZARD_STATUS.INACTIVE,
70
+ isValid: true,
71
+ testId: 'vm-ready-complete',
72
+ fields: {},
73
+ },
74
+ ]
75
+ }
76
+
77
+ export const stepsSchemeInitial = [
78
+ // 0 Procurator
79
+ [dynamicSteps.selectName, dynamicSteps.readyComplete],
80
+ // 1 Sphere
81
+ [
82
+ dynamicSteps.selectNameFolder,
83
+ dynamicSteps.selectComputeResource,
84
+ dynamicSteps.readyComplete,
85
+ ],
86
+ ]
@@ -1,95 +1,85 @@
1
- <template>
2
- <common-wizards-common-steps-compute-resource-new
3
- v-if="isNewView"
4
- :nodes="nodesLocal"
5
- :compatibility="compatibilityText"
6
- @select-node="onSelectNode"
7
- @show-nodes="onShowNodes"
8
- />
9
-
10
- <common-wizards-common-steps-compute-resource-old
11
- v-else
12
- :nodes="nodesLocal"
13
- :alert-messages="props.alertMessages"
14
- :compatibility="compatibilityText"
15
- @select-node="onSelectNode"
16
- @show-nodes="onShowNodes"
17
- @hide-alert="emits('hide-alert')"
18
- />
19
- </template>
20
-
21
- <script lang="ts" setup>
22
- import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
23
-
24
- const { $store, $recursion }: any = useNuxtApp()
25
-
26
- const computeResourceLocal = defineModel<UI_I_TreeNode | null>({
27
- required: true,
28
- })
29
- const props = defineProps<{
30
- nodes: UI_I_TreeNode
31
- alertMessages: string[]
32
- }>()
33
- const emits = defineEmits<{
34
- (event: 'hide-alert'): void
35
- }>()
36
-
37
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
38
-
39
- const compatibilityText = computed<[string, string]>(() => {
40
- if (
41
- !computeResourceLocal.value ||
42
- computeResourceLocal.value.type !== 'host'
43
- ) {
44
- return ['Error', 'selectValidHostDestinationComputeResource']
45
- }
46
-
47
- return ['Success', 'compatibilityChecksSucceeded']
48
- })
49
-
50
- const nodesLocal = ref<UI_I_TreeNode[]>([])
51
-
52
- const onShowNodes = (node: UI_I_TreeNode): void => {
53
- $recursion.findAndShow(
54
- nodesLocal.value,
55
- [node.id, node.type],
56
- ['id', 'type'],
57
- 'nodes'
58
- )
59
- }
60
- const onSelectNode = (node: UI_I_TreeNode): void => {
61
- $recursion.findAndActivate(
62
- nodesLocal.value,
63
- [node.type, node.id],
64
- ['type', 'id'],
65
- 'nodes'
66
- )
67
- computeResourceLocal.value = node
68
- }
69
-
70
- watch(
71
- props.nodes,
72
- (newValue: UI_I_TreeNode) => {
73
- nodesLocal.value = [useDeepCopy(newValue)]
74
-
75
- if (newValue) {
76
- if (computeResourceLocal.value) {
77
- onSelectNode(computeResourceLocal.value)
78
- // Разворачиваем все родительские элементы до вибронного элемента
79
- $recursion.findAndExpandPathToNode(
80
- nodesLocal.value,
81
- [computeResourceLocal.value.type, computeResourceLocal.value.id],
82
- ['type', 'id'],
83
- 'nodes',
84
- 'nodesShow'
85
- )
86
- return
87
- }
88
- // onSelectNode(newValue)
89
- }
90
- },
91
- { deep: true, immediate: true }
92
- )
93
- </script>
94
-
95
- <style lang="scss" scoped></style>
1
+ <template>
2
+ <common-wizards-common-steps-compute-resource-new
3
+ v-if="isNewView"
4
+ :nodes="nodesLocal"
5
+ :compatibility="props.compatibilityText"
6
+ :is-oading="props.isLoading"
7
+ @select-node="onSelectNode"
8
+ @show-nodes="onShowNodes"
9
+ />
10
+
11
+ <common-wizards-common-steps-compute-resource-old
12
+ v-else
13
+ :nodes="nodesLocal"
14
+ :alert-messages="props.alertMessages"
15
+ :compatibility="props.compatibilityText"
16
+ :is-loading="props.isLoading"
17
+ @select-node="onSelectNode"
18
+ @show-nodes="onShowNodes"
19
+ />
20
+ </template>
21
+
22
+ <script lang="ts" setup>
23
+ import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
24
+
25
+ const { $store, $recursion }: any = useNuxtApp()
26
+
27
+ const computeResourceLocal = defineModel<UI_I_TreeNode | null>({
28
+ required: true,
29
+ })
30
+ const props = defineProps<{
31
+ node: UI_I_TreeNode | null
32
+ alertMessages: string[]
33
+ compatibilityText: [string, string]
34
+ isLoading: boolean
35
+ }>()
36
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
37
+
38
+ const nodesLocal = ref<UI_I_TreeNode[]>([])
39
+
40
+ const onShowNodes = (node: UI_I_TreeNode): void => {
41
+ $recursion.findAndShow(
42
+ nodesLocal.value,
43
+ [node.id, node.type],
44
+ ['id', 'type'],
45
+ 'nodes'
46
+ )
47
+ }
48
+ const onSelectNode = (node: UI_I_TreeNode): void => {
49
+ $recursion.findAndActivate(
50
+ nodesLocal.value,
51
+ [node.type, node.id],
52
+ ['type', 'id'],
53
+ 'nodes'
54
+ )
55
+ computeResourceLocal.value = node
56
+ }
57
+
58
+ watch(
59
+ () => props.node,
60
+ (newValue: UI_I_TreeNode | null) => {
61
+ if (!newValue) return
62
+
63
+ nodesLocal.value = [useDeepCopy(newValue)]
64
+
65
+ if (newValue) {
66
+ if (computeResourceLocal.value) {
67
+ onSelectNode(computeResourceLocal.value)
68
+ // Разворачиваем все родительские элементы до вибронного элемента
69
+ $recursion.findAndExpandPathToNode(
70
+ nodesLocal.value,
71
+ [computeResourceLocal.value.type, computeResourceLocal.value.id],
72
+ ['type', 'id'],
73
+ 'nodes',
74
+ 'nodesShow'
75
+ )
76
+ return
77
+ }
78
+ // onSelectNode(newValue)
79
+ }
80
+ },
81
+ { deep: true, immediate: true }
82
+ )
83
+ </script>
84
+
85
+ <style lang="scss" scoped></style>
@@ -1,88 +1,92 @@
1
- <template>
2
- <div class="compute-resource">
3
- <div class="compute-resource__container-tree">
4
- <ui-tree
5
- :nodes="props.nodes"
6
- :expand-all="false"
7
- :is-loading="false"
8
- class="compute-resource__tree"
9
- @toggle-node="onShowNodes"
10
- @select-node="onSelectNode"
11
- >
12
- <template #content="{ node }">
13
- <div class="flex-align-center">
14
- <span :class="['node-icon', node.iconClassName]"></span>
15
- <span class="node-name text-ellipsis">{{ node.name }}</span>
16
- </div>
17
- </template>
18
- </ui-tree>
19
- </div>
20
-
21
- <!-- TODO надо будет добавить новый компонент < compatibility > -->
22
- </div>
23
- </template>
24
-
25
- <script setup lang="ts">
26
- import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
27
-
28
- const props = withDefaults(
29
- defineProps<{
30
- nodes: UI_I_TreeNode[]
31
- compatibility: [string, string]
32
- isLoading?: boolean
33
- }>(),
34
- {
35
- isLoading: false,
36
- }
37
- )
38
- const emits = defineEmits<{
39
- (event: 'select-node', value: UI_I_TreeNode): void
40
- (event: 'show-nodes', value: UI_I_TreeNode): void
41
- }>()
42
-
43
- const onShowNodes = (node: UI_I_TreeNode): void => emits('show-nodes', node)
44
- const onSelectNode = (node: UI_I_TreeNode): void => emits('select-node', node)
45
- </script>
46
-
47
- <style scoped lang="scss">
48
- @import 'assets/scss/common/mixins.scss';
49
- .compute-resource {
50
- &__container-tree {
51
- height: 240px;
52
- background: var(--input-bg);
53
- border: 1px solid var(--line-color);
54
- border-radius: 8px;
55
- overflow: hidden;
56
-
57
- :deep(.compute-resource__tree) {
58
- .node-icon {
59
- margin-right: 8px;
60
- }
61
- .node-name {
62
- font-size: 12px;
63
- }
64
- .tree-content {
65
- padding: 8px 8px 0;
66
-
67
- &::-webkit-scrollbar-thumb {
68
- background: var(--move-to-tree-scrollbar-thumb-bg);
69
- border-radius: 8px;
70
- border: solid 3px var(--scrollbar-thumb-transparent-border);
71
- }
72
- &::-webkit-scrollbar-track {
73
- background: transparent;
74
- }
75
- &::-webkit-scrollbar-corner {
76
- background: transparent;
77
- }
78
-
79
- .node-wrapper {
80
- border-top-right-radius: 4px;
81
- border-bottom-right-radius: 4px;
82
- min-height: 26px;
83
- }
84
- }
85
- }
86
- }
87
- }
88
- </style>
1
+ <template>
2
+ <div class="compute-resource">
3
+ <div class="compute-resource__container-tree">
4
+ <ui-tree
5
+ :nodes="props.nodes"
6
+ :expand-all="false"
7
+ :is-loading="props.isLoading"
8
+ class="compute-resource__tree"
9
+ @toggle-node="onShowNodes"
10
+ @select-node="onSelectNode"
11
+ >
12
+ <template #content="{ node }">
13
+ <div class="flex-align-center">
14
+ <span :class="['node-icon', node.iconClassName]"></span>
15
+ <span class="node-name text-ellipsis">{{ node.name }}</span>
16
+ </div>
17
+ </template>
18
+ </ui-tree>
19
+ </div>
20
+
21
+ <common-wizards-common-steps-compute-resource-compatibility
22
+ :loading="props.isLoading"
23
+ :status="props.compatibility[0]"
24
+ :text="props.compatibility[1]"
25
+ />
26
+ </div>
27
+ </template>
28
+
29
+ <script setup lang="ts">
30
+ import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
31
+
32
+ const props = withDefaults(
33
+ defineProps<{
34
+ nodes: UI_I_TreeNode[]
35
+ compatibility: [string, string]
36
+ isLoading?: boolean
37
+ }>(),
38
+ {
39
+ isLoading: false,
40
+ }
41
+ )
42
+ const emits = defineEmits<{
43
+ (event: 'select-node', value: UI_I_TreeNode): void
44
+ (event: 'show-nodes', value: UI_I_TreeNode): void
45
+ }>()
46
+
47
+ const onShowNodes = (node: UI_I_TreeNode): void => emits('show-nodes', node)
48
+ const onSelectNode = (node: UI_I_TreeNode): void => emits('select-node', node)
49
+ </script>
50
+
51
+ <style scoped lang="scss">
52
+ @import 'assets/scss/common/mixins.scss';
53
+ .compute-resource {
54
+ &__container-tree {
55
+ height: 240px;
56
+ background: var(--input-bg);
57
+ border: 1px solid var(--line-color);
58
+ border-radius: 8px;
59
+ overflow: hidden;
60
+
61
+ :deep(.compute-resource__tree) {
62
+ .node-icon {
63
+ margin-right: 8px;
64
+ }
65
+ .node-name {
66
+ font-size: 12px;
67
+ }
68
+ .tree-content {
69
+ padding: 8px 8px 0;
70
+
71
+ &::-webkit-scrollbar-thumb {
72
+ background: var(--move-to-tree-scrollbar-thumb-bg);
73
+ border-radius: 8px;
74
+ border: solid 3px var(--scrollbar-thumb-transparent-border);
75
+ }
76
+ &::-webkit-scrollbar-track {
77
+ background: transparent;
78
+ }
79
+ &::-webkit-scrollbar-corner {
80
+ background: transparent;
81
+ }
82
+
83
+ .node-wrapper {
84
+ border-top-right-radius: 4px;
85
+ border-bottom-right-radius: 4px;
86
+ min-height: 26px;
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ </style>