bfg-common 1.5.215 → 1.5.217

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.
@@ -1349,7 +1349,7 @@
1349
1349
  "selectSwitch": "Выберыце перамыкач",
1350
1350
  "selectTargetDevice": "Выберыце мэтавае прылада",
1351
1351
  "selectTargetDeviceForNewConnection": "Выберыце мэтавае прылада для новага падключэння.",
1352
- "selectValidClusterOrHostDestination": "Выберыце кластар, хост або пул рэсурсаў у якасці месца прызначэння.",
1352
+ "selectValidClusterOrHostDestination": "Абярыце кластар, вузел і пул рэсурсаў.",
1353
1353
  "selectValidDestinationStorage": "Выберыце сапраўднае сховішча прызначэння.",
1354
1354
  "selectVmKernelAdapter": "Выберыце адаптар VMkernel",
1355
1355
  "send": "Адправіць",
@@ -1752,7 +1752,7 @@
1752
1752
  "commands": "Каманда",
1753
1753
  "perc": "Пярко",
1754
1754
  "bytes": "Байт",
1755
- "vmNameValidationDescription": "Імя павінна ўтрымліваць лацінскія літары, лічбы, '-', '_', '.' і павінна ўтрымліваць ад 5 да 54 знакаў. Калі прапусціць дадзены крок, сістэма згенеруе імя аўтаматычна.",
1755
+ "vmNameValidationDescription": "Імя павінна ўтрымліваць лацінскія літары, лічбы, '-','_','.'і павінна ўтрымліваць ад 5 да 54 знакаў. Калі прапусціць дадзены крок, сістэма згенеруе імя аўтаматычна",
1756
1756
  "tokens": "Tokens",
1757
1757
  "deleteToken": "Выдаліць маркер",
1758
1758
  "deleteTokenDesc": "Вы хочаце выдаліць выбраны токен?",
@@ -329,7 +329,7 @@
329
329
  "custom": "Custom",
330
330
  "customAttributes": "Custom Attributes",
331
331
  "customerImprovementProgram": "Customer Experience Improvement Program",
332
- "customizeHardware": "Customize Hardware",
332
+ "customizeHardware": "Customize hardware",
333
333
  "daemon": "Daemon",
334
334
  "datacenter": "Datacenter",
335
335
  "dataCenter": "DataCenter",
@@ -1311,11 +1311,11 @@
1311
1311
  "selectCompatibility": "Select compatibility",
1312
1312
  "selectCompatibilityVirtualMachineDependingHostsYourEnvironment": "Select compatibility for this virtual machine depending on the host in your environment",
1313
1313
  "selectCompatibilityVmDependingHostsEnvironment": "Select compatibility for this virtual machine depending on the host in your environment",
1314
- "selectComputeResource": "Select a Compute Resource",
1314
+ "selectComputeResource": "Select a compute resource",
1315
1315
  "selectConfiguration": "select a configuration",
1316
1316
  "selectConnectionType": "Select connection type",
1317
1317
  "selectConnectionTypeToCreate": "Select a connection type to create.",
1318
- "selectCreationType": "Select a Creation Type",
1318
+ "selectCreationType": "Select a creation type",
1319
1319
  "selectDatastoreClusterDatastore": "Select a datastore cluster or datastore",
1320
1320
  "selectDatastoreName": "Select a name",
1321
1321
  "selectDestination": "Select Destination",
@@ -1328,7 +1328,7 @@
1328
1328
  "selectExistingSwitch": "Select an existing switch",
1329
1329
  "selectFeedbackType": "Select a feedback type first",
1330
1330
  "selectFile": "Select File",
1331
- "selectGuestOS": "Select a Guest OS",
1331
+ "selectGuestOS": "Select a guest OS",
1332
1332
  "selectGuestOSMachineType": "Select a guest OS and Machine Type",
1333
1333
  "selectHardware": "Select Hardware",
1334
1334
  "selectHost": "Select a host",
@@ -1339,16 +1339,16 @@
1339
1339
  "selectLocationForVirtualMachines": "Select a location for this host's virtual machines.",
1340
1340
  "selectLocationVirtualMachine": "Select a location for the virtual machine.",
1341
1341
  "selectName": "Select a name",
1342
- "selectNameFolder": "Select a Name and Folder",
1342
+ "selectNameFolder": "Select a name and folder",
1343
1343
  "selectNetwork": "Select Network",
1344
1344
  "selectNfsVersion": "Select the NFS version.",
1345
1345
  "selectPhysicalNetworkAdapterFromListToViewItsDetails": "Select a physical network adapter from the list to view its details.",
1346
- "selectStorage": "Select Storage",
1346
+ "selectStorage": "Select storage",
1347
1347
  "selectStorageConfigurationDiskFiles": "Select the storage for the configuration and disk files",
1348
1348
  "selectSwitch": "Select Switch",
1349
1349
  "selectTargetDevice": "Select target device",
1350
1350
  "selectTargetDeviceForNewConnection": "Select a target device for the new connection.",
1351
- "selectValidClusterOrHostDestination": "Select a cluster, host or resource pool as destination.",
1351
+ "selectValidClusterOrHostDestination": "Select a cluster, host, resource pool.",
1352
1352
  "selectValidDestinationStorage": "Select a valid destination storage.",
1353
1353
  "selectVmKernelAdapter": "Select VMkernel adapter",
1354
1354
  "send": "Send",
@@ -1414,7 +1414,7 @@
1414
1414
  "specifyServerName": "The server name cannot be empty. Enter a name.",
1415
1415
  "specifyUniqueName": "Specify a unique name",
1416
1416
  "specifyUniqueNameTargetLocation": "Specify a unique name and target location",
1417
- "specifyValidClusterOrHostDestination": "Specify a valid cluster, host or resource pool as destination.",
1417
+ "specifyValidClusterOrHostDestination": "Specify a valid cluster, host, resource pool.",
1418
1418
  "specifyVMkernelIPv4Settings": "Specify VMkernel IPv4 settings.",
1419
1419
  "specifyVMkernelPortSettings": "Specify port settings.",
1420
1420
  "sphere": "Sphere",
@@ -1751,7 +1751,7 @@
1751
1751
  "commands": "Commands",
1752
1752
  "perc": "Perc",
1753
1753
  "bytes": "Bytes",
1754
- "vmNameValidationDescription": "The name must contain Latin letters and numbers, '-', '_', '.' and it must contain from 5 to 54 characters. If you skip this step, the system will generate the name automatically.",
1754
+ "vmNameValidationDescription": "The name must contain Latin letters and numbers, '-','_','.' and it must contain from 5 to 54 characters. If you skip this step, the system will generate the name automatically",
1755
1755
  "tokens": "Tokens",
1756
1756
  "deleteToken": "Delete Token",
1757
1757
  "deleteTokenDesc": "Do you want to delete the selected Token?",
@@ -1348,7 +1348,7 @@
1348
1348
  "selectSwitch": "Ընտրեք անջատիչ",
1349
1349
  "selectTargetDevice": "Ընտրեք թիրախային սարքը",
1350
1350
  "selectTargetDeviceForNewConnection": "Ընտրեք թիրախային սարքը նոր կապի համար:",
1351
- "selectValidClusterOrHostDestination": "Ընտրեք կլաստեր, հոսթ կամ ռեսուրսների փուլ՝ որպես նշանակության վայր։",
1351
+ "selectValidClusterOrHostDestination": "Որպես նպատակակետ ընտրեք կլաստեր, հոսթ, ռեսուրսների լողավազան:",
1352
1352
  "selectValidDestinationStorage": "Ընտրեք վավեր նպատակային պահեստ:",
1353
1353
  "selectVmKernelAdapter": "Ընտրեք VMkernel ադապտեր",
1354
1354
  "send": "Ուղարկել",
@@ -1751,7 +1751,7 @@
1751
1751
  "commands": "Հրամաններ",
1752
1752
  "perc": "Պերկ",
1753
1753
  "bytes": "Բայթ",
1754
- "vmNameValidationDescription": "Անունը պետք է պարունակի լատինական տառեր, թվեր, '-', '_', '.' և պետք է պարունակի 5-ից 54 նիշ: Եթե բաց թողնենք այս քայլը, համակարգը ինքնաբերաբար կստեղծի անուն:",
1754
+ "vmNameValidationDescription": "Անունը պետք է պարունակի լատինական տառեր, թվեր, '-','_','.'և պետք է պարունակի 5-ից 54 նիշ: Եթե բաց թողնենք այս քայլը, համակարգը ինքնաբերաբար կստեղծի անուն",
1755
1755
  "tokens": "Tokens",
1756
1756
  "deleteToken": "Ջնջել Token",
1757
1757
  "deleteTokenDesc": "Ցանկանու՞մ եք ջնջել ընտրված Token:",
@@ -1348,7 +1348,7 @@
1348
1348
  "selectSwitch": "Ауыстырғышты таңдаңыз",
1349
1349
  "selectTargetDevice": "Мақсатты құрылғыны таңдаңыз",
1350
1350
  "selectTargetDeviceForNewConnection": "Жаңа қосылым үшін мақсатты құрылғыны таңдаңыз.",
1351
- "selectValidClusterOrHostDestination": "Кластерді, хостты немесе курортты тек тағайындау ретінде таңдаңыз.",
1351
+ "selectValidClusterOrHostDestination": "Кластерді, торапты және ресурстар пулын таңдаңыз.",
1352
1352
  "selectValidDestinationStorage": "Жарамды мақсатты жадты таңдаңыз.",
1353
1353
  "selectVmKernelAdapter": "Vmkernel адаптерін таңдаңыз",
1354
1354
  "send": "Жіберу",
@@ -1751,7 +1751,7 @@
1751
1751
  "commands": "Командалар",
1752
1752
  "perc": "Жеңілдік",
1753
1753
  "bytes": "Байттар",
1754
- "vmNameValidationDescription": "Атауында латын әріптері, сандары болуы керек, '-', '_', '.' және 5-тен 54 таңбаға дейін болуы керек. Егер сіз бұл қадамды өткізіп жіберсеңіз, жүйе автоматты түрде атау жасайды.",
1754
+ "vmNameValidationDescription": "Атауында латын әріптері, сандары болуы керек, '-','_','.'және 5-тен 54 таңбаға дейін болуы керек. Егер сіз бұл қадамды өткізіп жіберсеңіз, жүйе автоматты түрде атау жасайды",
1755
1755
  "tokens": "Tokens",
1756
1756
  "deleteToken": "Токенді жою",
1757
1757
  "deleteTokenDesc": "Таңдалған таңбалауышты жою керек пе?",
@@ -1348,7 +1348,7 @@
1348
1348
  "selectSwitch": "Выберите коммутатор",
1349
1349
  "selectTargetDevice": "Выберите целевое устройство.",
1350
1350
  "selectTargetDeviceForNewConnection": "Выберите целевое устройство для нового подключения.",
1351
- "selectValidClusterOrHostDestination": "Выберите кластер, хост или пул ресурсов в качестве назначения.",
1351
+ "selectValidClusterOrHostDestination": "Выберите кластер, узел, пул ресурсов.",
1352
1352
  "selectValidDestinationStorage": "Выберите действительное целевое хранилище.",
1353
1353
  "selectVmKernelAdapter": "Выберите адаптер VMkernel",
1354
1354
  "send": "Отправить",
@@ -1751,7 +1751,7 @@
1751
1751
  "commands": "Команды",
1752
1752
  "perc": "Перк",
1753
1753
  "bytes": "Байты",
1754
- "vmNameValidationDescription": "Имя должно содержать латинские буквы, цифры, '-', '_', '.' и должно содержать от 5 до 54 символов. Если пропустить данный шаг, система сгенерирует имя автоматически.",
1754
+ "vmNameValidationDescription": "Имя должно содержать латинские буквы, цифры, '-','_','.' и должно содержать от 5 до 54 символов. Если пропустить данный шаг, система сгенерирует имя автоматически",
1755
1755
  "tokens": "Токены",
1756
1756
  "deleteToken": "Удалить токен",
1757
1757
  "deleteTokenDesc": "Вы хотите удалить выбранный токен?",
@@ -1347,7 +1347,7 @@
1347
1347
  "selectSwitch": "选择开关",
1348
1348
  "selectTargetDevice": "选择目标设备",
1349
1349
  "selectTargetDeviceForNewConnection": "为新连接选择目标设备。",
1350
- "selectValidClusterOrHostDestination": "选择一个集群、主机或资源池作为目标位置。",
1350
+ "selectValidClusterOrHostDestination": "请选择集群、节点和资源池",
1351
1351
  "selectValidDestinationStorage": "选择一个有效的目标存储。",
1352
1352
  "selectVmKernelAdapter": "选择VMkernel适配器",
1353
1353
  "send": "发送",
@@ -1750,7 +1750,7 @@
1750
1750
  "commands": "命令",
1751
1751
  "perc": "全氯乙烯",
1752
1752
  "bytes": "字节",
1753
- "vmNameValidationDescription": "名称必须包含拉丁字母、数字、'-' 、'_' 、'.' 。 并且必须包含 5 到 54 个字符。 如果跳过此步骤,系统会自动生成一个名称。",
1753
+ "vmNameValidationDescription": "名称必须包含拉丁字母、数字、'-'、'_'、'.'。 并且必须包含 5 到 54 个字符。 如果跳过此步骤,系统会自动生成一个名称",
1754
1754
  "tokens": "Tokens",
1755
1755
  "deleteToken": "删除令牌",
1756
1756
  "deleteTokenDesc": "您想删除选定的令牌吗?",
@@ -320,7 +320,6 @@ li {
320
320
  min-width: 30ch;
321
321
  }
322
322
  }
323
- //TODO remove with old design
324
323
  .description {
325
324
  color: var(--global-font-color) !important;
326
325
  }
@@ -118,7 +118,7 @@ const emits = defineEmits<{
118
118
  padding: 8px;
119
119
 
120
120
  //overflow-x: hidden;
121
- overflow-y: auto;
121
+ //overflow-y: auto;
122
122
 
123
123
  .context-loader {
124
124
  position: absolute;
@@ -42,11 +42,13 @@ const navigate = computed<string>(() => '/' + props.item.navigateTo)
42
42
 
43
43
  <style>
44
44
  :root {
45
- --shortcut-item-hover-bg: #e9ebed33;
45
+ --shortcut-item-hover-bg: linear-gradient(135deg, #FFFFFF 0%, #F0F8FD 100%);
46
+ --shortcut-item-hover-box-shadow: inset 0 0 0 1.5px #008fd6, 0px 2px 24px 0px #0000001f;
46
47
  --shortcut-item-disabled-text-icon-color: #bdc3c7;
47
48
  }
48
49
  :root.dark-theme {
49
- --shortcut-item-hover-bg: #e9ebed08;
50
+ --shortcut-item-hover-bg: linear-gradient(135deg, #334453 0%, #324C5E 100%);
51
+ --shortcut-item-hover-box-shadow: inset 0 0 0 1.5px #2BA2DE, 0px -1px 12px 0px rgba(0, 0, 0, 0.1), 0px 4px 20px 0px rgba(0, 0, 0, 0.12);
50
52
  --shortcut-item-disabled-text-icon-color: #bdc3c770;
51
53
  }
52
54
  </style>
@@ -55,6 +57,7 @@ const navigate = computed<string>(() => '/' + props.item.navigateTo)
55
57
  .category-block-item {
56
58
  max-width: 176px;
57
59
  min-height: 110px;
60
+ transition: background 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 200ms ease-in-out, color 150ms ease-in-out;
58
61
 
59
62
  &.disabled {
60
63
  opacity: 0.6;
@@ -90,6 +93,8 @@ const navigate = computed<string>(() => '/' + props.item.navigateTo)
90
93
 
91
94
  &:hover:not(.disabled) {
92
95
  background: var(--shortcut-item-hover-bg);
96
+ box-shadow: var(--shortcut-item-hover-box-shadow);
97
+ transform: translateY(-1px);
93
98
  cursor: pointer;
94
99
  .unit {
95
100
  &-icon {
@@ -61,6 +61,7 @@ setForm()
61
61
 
62
62
  const showValidationErrors = (): void => {
63
63
  const valid = validation.touch()
64
+ console.log(valid, 111)
64
65
  passwordErrorText.value = !valid.isValid ? valid.errors.password[0] : ''
65
66
  emits('valid', valid.isValid)
66
67
  }
@@ -82,9 +83,9 @@ const setPasswordDisable = (): void => {
82
83
  const passwordErrorText = ref<string>('')
83
84
 
84
85
  const changePassword = (value: string): void => {
85
- showValidationErrors()
86
-
87
86
  password.value = value
87
+
88
+ showValidationErrors()
88
89
  }
89
90
 
90
91
  const isEnabledPassword = ref<boolean>(!!password.value)
@@ -94,6 +95,8 @@ const onGeneratePassword = (): void => {
94
95
 
95
96
  form.value.password.value = generatedPassword
96
97
  password.value = generatedPassword
98
+
99
+ showValidationErrors()
97
100
  }
98
101
  </script>
99
102
 
@@ -1,12 +1,24 @@
1
- export const generatePassword = (passwordLength = 12): string => {
2
- const chars =
3
- '0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()ABCDEFGHIJKLMNOPQRSTUVWXYZ'
1
+ export const generatePassword = (length = 12): string => {
2
+ const lowercase = 'abcdefghijklmnopqrstuvwxyz';
3
+ const uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
4
+ const digits = '0123456789';
5
+ const special = '!@#$%^&*';
6
+ const all = lowercase + uppercase + digits + special;
4
7
 
5
- let password = ''
6
- for (let i = 0; i <= passwordLength; i++) {
7
- const randomNumber = Math.floor(Math.random() * chars.length)
8
- password += chars.substring(randomNumber, randomNumber + 1)
8
+ // Гарантируем наличие обязательных символов
9
+ const requiredChars = [
10
+ lowercase[Math.floor(Math.random() * lowercase.length)],
11
+ uppercase[Math.floor(Math.random() * uppercase.length)],
12
+ digits[Math.floor(Math.random() * digits.length)],
13
+ special[Math.floor(Math.random() * special.length)]
14
+ ];
15
+
16
+ // Оставшиеся символы
17
+ const remainingLength = length - requiredChars.length;
18
+ for (let i = 0; i < remainingLength; i++) {
19
+ requiredChars.push(all[Math.floor(Math.random() * all.length)]);
9
20
  }
10
21
 
11
- return password
22
+ // Перемешиваем
23
+ return requiredChars.sort(() => 0.5 - Math.random()).join('');
12
24
  }
@@ -1,166 +1,141 @@
1
- <template>
2
- <div class="select-compute-resource">
3
- <Teleport to="#compute-resource-alert-wrapper">
4
- <ui-alert
5
- v-show="props.errors.length"
6
- :messages="props.errors"
7
- status="alert-danger"
8
- test-id="computed-resource-alert"
9
- class="errors-alert"
10
- size="md"
11
- @remove="emits('remove-validation-errors')"
12
- />
13
- </Teleport>
14
-
15
- <div class="tree-view-wrap">
16
- <common-vm-actions-common-select-compute-resource-tree-view
17
- v-model="selectedNode"
18
- :data-center="props.dataCenter"
19
- :compute-resource="props.computeResource"
20
- :compute-resource-tree="props.computeResourceTree"
21
- @get-compute-resource-tree="emits('get-compute-resource-tree', $event)"
22
- @show-compute-resource-tree="
23
- emits('show-compute-resource-tree', $event)
24
- "
25
- @select-compute-resource-tree="
26
- emits('select-compute-resource-tree', $event)
27
- "
28
- @clear-compute-resource-tree="emits('clear-compute-resource-tree')"
29
- />
30
- </div>
31
-
32
- <div class="compatibility-wrap">
33
- <p class="compatibility">
34
- {{ localization.inventorySummary.compatibility }}
35
- </p>
36
- <div class="compatibility-message flex-align-start">
37
- <ui-skeleton-item v-if="!selectedNode" width="160px" height="16px" />
38
- <template v-else-if="props.compatibilityText[1]">
39
- <ui-icon
40
- v-show="!props.compatibilityText[0]"
41
- name="error"
42
- width="16"
43
- height="16"
44
- class="icon-compatibility-alert"
45
- />
46
-
47
- <ui-icon
48
- v-show="props.compatibilityText[0]"
49
- name="success-fill"
50
- width="16"
51
- height="16"
52
- class="icon-compatibility-alert"
53
- />
54
- <span class="compatibility-message-description">{{
55
- props.compatibilityText[1]
56
- }}</span>
57
- </template>
58
- </div>
59
- </div>
60
- </div>
61
- </template>
62
-
63
- <script setup lang="ts">
64
- import type { UI_I_Localization } from '~/lib/models/interfaces'
65
- import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
66
-
67
- const selectedNode = defineModel<UI_I_TreeNode>('modelValue', {
68
- required: true,
69
- })
70
-
71
- const props = defineProps<{
72
- dataCenter: UI_I_TreeNode | null
73
- computeResource: UI_I_TreeNode
74
- computeResourceTree: UI_I_TreeNode[]
75
- errors: string[]
76
- compatibilityText: [boolean, string]
77
- }>()
78
-
79
- const emits = defineEmits<{
80
- (
81
- event: 'get-compute-resource-tree',
82
- value: { id: string | number; cb: () => void }
83
- ): void
84
- (event: 'show-compute-resource-tree', value: UI_I_TreeNode): void
85
- (event: 'select-compute-resource-tree', value: UI_I_TreeNode): void
86
- (event: 'clear-compute-resource-tree'): void
87
- (event: 'remove-validation-errors'): void
88
- }>()
89
-
90
- const localization = computed<UI_I_Localization>(() => useLocal())
91
- </script>
92
-
93
- <style>
94
- :root {
95
- --select-compute-resource-border-color: #e9ebed;
96
- --select-compute-resource-location-bg-color: #ffffff;
97
- --select-compute-resource-compatibility-title-color: #4d5d69;
98
- --select-compute-resource-compatibilityd-empty-escription-color: #4d5d69;
99
- --select-compute-resource-compatibility-description-color: #4d5d69;
100
- }
101
- :root.dark-theme {
102
- --select-compute-resource-border-color: #e9ebed1f;
103
- --select-compute-resource-location-bg-color: #1b2a371f;
104
- --select-compute-resource-compatibility-title-color: #e9eaec;
105
- --select-compute-resource-compatibilityd-empty-escription-color: #9da6ad;
106
- --select-compute-resource-compatibility-description-color: #e9eaec;
107
- }
108
- </style>
109
- <style scoped lang="scss">
110
- .select-compute-resource {
111
- padding-bottom: 22px;
112
-
113
- .tree-view-wrap {
114
- //height: 170px;
115
- min-height: 160px;
116
- max-height: 240px;
117
- border-radius: 8px;
118
- border: 1px solid var(--select-compute-resource-border-color);
119
- padding: 8px;
120
- background-color: var(--select-compute-resource-location-bg-color);
121
- margin: 16px 0 24px;
122
- overflow: auto;
123
-
124
- :deep(.tree-content) {
125
- padding: 0 !important;
126
-
127
- .node-wrapper {
128
- border-radius: 4px;
129
-
130
- .node-name {
131
- font-size: 12px;
132
- margin-left: 8px;
133
- overflow: hidden;
134
- text-overflow: ellipsis;
135
- white-space: nowrap;
136
- }
137
- }
138
- }
139
- }
140
-
141
- .compatibility-wrap {
142
- .compatibility {
143
- font-size: 16px;
144
- font-weight: 500;
145
- color: var(--select-compute-resource-compatibility-title-color);
146
- margin-bottom: 16px;
147
- }
148
- .compatibility-message {
149
- border-radius: 8px;
150
- border: 1px solid var(--select-compute-resource-border-color);
151
- padding: 12px;
152
- background-color: var(--select-compute-resource-location-bg-color);
153
- gap: 10px;
154
-
155
- .icon-compatibility-alert {
156
- min-width: 16px;
157
- min-height: 16px;
158
- }
159
- .compatibility-message-description {
160
- font-size: 13px;
161
- color: var(--select-compute-resource-compatibility-description-color);
162
- }
163
- }
164
- }
165
- }
166
- </style>
1
+ <template>
2
+ <div class="select-compute-resource">
3
+ <Teleport to="#compute-resource-alert-wrapper">
4
+ <ui-alert
5
+ v-show="props.errors.length"
6
+ :messages="props.errors"
7
+ status="alert-danger"
8
+ test-id="computed-resource-alert"
9
+ class="errors-alert"
10
+ @remove="emits('remove-validation-errors')"
11
+ />
12
+ </Teleport>
13
+
14
+ <div class="tree-view-wrap">
15
+ <common-vm-actions-common-select-compute-resource-tree-view
16
+ v-model="selectedNode"
17
+ :data-center="props.dataCenter"
18
+ :compute-resource="props.computeResource"
19
+ :compute-resource-tree="props.computeResourceTree"
20
+ @get-compute-resource-tree="emits('get-compute-resource-tree', $event)"
21
+ @show-compute-resource-tree="
22
+ emits('show-compute-resource-tree', $event)
23
+ "
24
+ @select-compute-resource-tree="
25
+ emits('select-compute-resource-tree', $event)
26
+ "
27
+ @clear-compute-resource-tree="emits('clear-compute-resource-tree')"
28
+ />
29
+ </div>
30
+
31
+ <div class="compatibility-wrap">
32
+ <p class="compatibility">
33
+ {{ localization.inventorySummary.compatibility }}
34
+ </p>
35
+ <div class="compatibility-message flex-align-center">
36
+ <ui-skeleton-item v-if="!selectedNode" width="160px" height="16px" />
37
+ <template v-else-if="props.compatibilityText[1]">
38
+ <ui-icon
39
+ v-show="!props.compatibilityText[0]"
40
+ name="error"
41
+ width="16"
42
+ height="16"
43
+ />
44
+
45
+ <ui-icon
46
+ v-show="props.compatibilityText[0]"
47
+ name="success-fill"
48
+ width="16"
49
+ height="16"
50
+ />
51
+ <span class="compatibility-message-description">{{
52
+ props.compatibilityText[1]
53
+ }}</span>
54
+ </template>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </template>
59
+
60
+ <script setup lang="ts">
61
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
62
+ import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
63
+
64
+ const selectedNode = defineModel<UI_I_TreeNode>('modelValue', {
65
+ required: true,
66
+ })
67
+
68
+ const props = defineProps<{
69
+ dataCenter: UI_I_TreeNode | null
70
+ computeResource: UI_I_TreeNode
71
+ computeResourceTree: UI_I_TreeNode[]
72
+ errors: string[]
73
+ compatibilityText: [boolean, string]
74
+ }>()
75
+
76
+ const emits = defineEmits<{
77
+ (
78
+ event: 'get-compute-resource-tree',
79
+ value: { id: string | number; cb: () => void }
80
+ ): void
81
+ (event: 'show-compute-resource-tree', value: UI_I_TreeNode): void
82
+ (event: 'select-compute-resource-tree', value: UI_I_TreeNode): void
83
+ (event: 'clear-compute-resource-tree'): void
84
+ (event: 'remove-validation-errors'): void
85
+ }>()
86
+
87
+ const localization = computed<UI_I_Localization>(() => useLocal())
88
+ </script>
89
+
90
+ <style>
91
+ :root {
92
+ --select-compute-resource-border-color: #e9ebed;
93
+ --select-compute-resource-location-bg-color: #ffffff;
94
+ --select-compute-resource-compatibility-title-color: #4d5d69;
95
+ --select-compute-resource-compatibility-description-color: #4d5d69;
96
+ }
97
+ :root.dark-theme {
98
+ --select-compute-resource-border-color: #e9ebed1f;
99
+ --select-compute-resource-location-bg-color: transparent;
100
+ --select-compute-resource-compatibility-title-color: #e9eaec;
101
+ --select-compute-resource-compatibility-description-color: #9da6ad;
102
+ }
103
+ </style>
104
+ <style scoped lang="scss">
105
+ .select-compute-resource {
106
+ .tree-view-wrap {
107
+ height: 170px;
108
+ border-radius: 8px;
109
+ border: 1px solid var(--select-compute-resource-border-color);
110
+ padding: 12px;
111
+ background-color: var(--select-compute-resource-location-bg-color);
112
+ margin: 16px 0 24px;
113
+ overflow: auto;
114
+
115
+ :deep(.tree-content) {
116
+ padding: 0 !important;
117
+ }
118
+ }
119
+
120
+ .compatibility-wrap {
121
+ .compatibility {
122
+ font-size: 16px;
123
+ font-weight: 500;
124
+ color: var(--select-compute-resource-compatibility-title-color);
125
+ margin-bottom: 16px;
126
+ }
127
+ .compatibility-message {
128
+ border-radius: 8px;
129
+ border: 1px solid var(--select-compute-resource-border-color);
130
+ padding: 12px;
131
+ background-color: var(--select-compute-resource-location-bg-color);
132
+ gap: 12px;
133
+
134
+ .compatibility-message-description {
135
+ font-size: 13px;
136
+ color: var(--select-compute-resource-compatibility-description-color);
137
+ }
138
+ }
139
+ }
140
+ }
141
+ </style>