bfg-common 1.5.750 → 1.5.753

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.
@@ -52,16 +52,18 @@
52
52
  :sub-title-height="heightName"
53
53
  >
54
54
  <template #subTitle>
55
- <div ref="subTitleBlockName" class="subtitle-block">
56
- <div
57
- id="name-alert-wrapper"
58
- :class="[{ 'mb-4': !isNameAlertWrapperEmpty }]"
59
- ></div>
60
- <ui-wizard-subtitle
61
- :sub-title="
55
+ <div ref="subTitleBlockName">
56
+ <div class="subtitle-block">
57
+ <div
58
+ id="name-alert-wrapper"
59
+ :class="[{ 'mb-4': !isNameAlertWrapperEmpty }]"
60
+ ></div>
61
+ <ui-wizard-subtitle
62
+ :sub-title="
62
63
  localization.vmWizard.specifyUniqueNameAndTargetLocationForVm
63
64
  "
64
- />
65
+ />
66
+ </div>
65
67
  </div>
66
68
  </template>
67
69
  <template #content>
@@ -103,7 +105,7 @@
103
105
  test-id="computed-resource-alert"
104
106
  type="error"
105
107
  size="md"
106
- class="subtitle-block__alert"
108
+ class="subtitle-block__alert mb-4"
107
109
  />
108
110
  <ui-wizard-subtitle
109
111
  :sub-title="
@@ -237,7 +239,7 @@
237
239
  :error-validation-fields="props.errorValidationFields"
238
240
  @remove-error-by-title="emits('remove-error-by-title', $event)"
239
241
  />
240
- <div class="vm-hardware-version-wrap justify-end flex flex-1 mt-7">
242
+ <div class="vm-hardware-version-wrap justify-end flex flex-1 mt-6">
241
243
  <span class="vm-hardware-version">{{
242
244
  props.compatibilityInfo
243
245
  }}</span>
@@ -290,7 +290,7 @@
290
290
  <common-vm-actions-common-customize-hardware-virtual-hardware-other />
291
291
  <div
292
292
  v-if="props.compatibilityInfo"
293
- class="vm-hardware-version-wrap justify-end flex flex-1 mt-4"
293
+ class="vm-hardware-version-wrap justify-end flex flex-1 mt-1"
294
294
  >
295
295
  <span class="vm-hardware-version">
296
296
  {{ props.compatibilityInfo }}
@@ -588,7 +588,7 @@ const onAddDevice = (data: number): void => {
588
588
  display: flex;
589
589
  flex-direction: column;
590
590
  gap: 12px;
591
- padding-bottom: 12px;
591
+ padding-bottom: 16px;
592
592
  background-color: var(--vm-wizard-block-view-bg-color);
593
593
 
594
594
  .vm-hardware-version-wrap {
@@ -557,6 +557,7 @@ const addPciDevice = (): void => {
557
557
  pciDevicesType.value.push('new')
558
558
 
559
559
  // pciDevicesLocal.value.push(useDeepCopy(defaultPciDevice))
560
+ if (!model.value.passthrough_pci_devices) model.value.passthrough_pci_devices = []
560
561
  model.value.passthrough_pci_devices.push(useDeepCopy(defaultPciDevice))
561
562
  }
562
563
  const onRemovePciDevice = (index: number): void => {
@@ -27,7 +27,7 @@
27
27
  :state="props.state"
28
28
  @remove-error-by-title="emits('remove-error-by-title', $event)"
29
29
  />
30
- <div class="vm-hardware-version-wrap justify-end flex flex-1 mt-4">
30
+ <div class="vm-hardware-version-wrap justify-end flex flex-1 mt-1">
31
31
  <span class="vm-hardware-version">
32
32
  {{ props.compatibilityInfo }}
33
33
  </span>
@@ -73,7 +73,7 @@ const emits = defineEmits<{
73
73
  flex-direction: column;
74
74
  gap: 12px;
75
75
  margin-top: 20px;
76
- padding: 0 0 12px;
76
+ padding: 0 0 16px;
77
77
  overflow: auto;
78
78
 
79
79
  .vm-hardware-version-wrap {
@@ -172,7 +172,6 @@ const versionsLocal = computed(() => {
172
172
  @container (max-width: 600px) {
173
173
  .version-select-wrap {
174
174
  grid-template-columns: 1fr;
175
- padding-bottom: 16px;
176
175
  }
177
176
  }
178
177
  }
@@ -221,7 +221,7 @@ const skeletonData = ref<UI_I_DataTableSkeleton>({
221
221
  //}
222
222
  .select-storage {
223
223
  padding-top: 12px;
224
- //padding-bottom: 16px;
224
+ padding-bottom: 16px;
225
225
 
226
226
  :deep(.title-sm) {
227
227
  font-size: 12px;
@@ -52,8 +52,16 @@ const onSelectNode = (node: UI_I_TreeNode): void => emits('select-node', node)
52
52
  <style scoped lang="scss">
53
53
  @import 'assets/scss/common/mixins.scss';
54
54
  .compute-resource {
55
+ display: grid;
56
+ grid-template-rows: 1fr auto;
57
+ min-height: 100%;
58
+ padding-top: 16px;
59
+ padding-bottom: 16px;
60
+ grid-row-gap: 24px;
61
+
55
62
  &__container-tree {
56
- height: 240px;
63
+ max-height: 240px;
64
+ height: 100%;
57
65
  background: var(--input-bg);
58
66
  border: 1px solid var(--line-color);
59
67
  border-radius: 8px;
@@ -159,7 +159,7 @@ export const bodyItems = (
159
159
  testId: `migrate-host-table-item-${key}`
160
160
  },
161
161
  {
162
- key: 'col14',
162
+ key: 'col13',
163
163
  text: host[hostTableItemKeys[13]],
164
164
  id: key,
165
165
  testId: `migrate-host-table-item-${key}`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.750",
4
+ "version": "1.5.753",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
package/plugins/time.ts CHANGED
@@ -1,58 +1,58 @@
1
- import { defineNuxtPlugin } from '#app'
2
- import type { UI_T_LangValue } from '~/lib/models/types'
3
- export default defineNuxtPlugin(() => {
4
- const time = function (): any {
5
- const self: any = {}
6
- self.millisecondsToHour = function (ms: number): number {
7
- return ~~(ms / 1000 / 60 / 60 / 24)
8
- }
9
- self.formatTime = (
10
- seconds: number,
11
- lang: UI_T_LangValue = 'ru_RU'
12
- ): string => {
13
- const units = {
14
- en_US: { s: 's', m: 'm', h: 'h' },
15
- ru_RU: { s: 'с', m: 'м', h: 'ч' },
16
- hy_AM: { s: 'վ', m: 'ր', h: 'ժ' },
17
- be_BY: { s: 'с', m: 'хв', h: 'г' },
18
- kk_KZ: { s: 'сек', m: 'мин', h: 'сағ' },
19
- zh_CHS: { s: '秒', m: '分', h: '时' },
20
- BROWSER: { s: 's', m: 'm', h: 'h' },
21
- }
22
-
23
- const unit = units[lang] || units.en_US
24
-
25
- if (seconds < 60) {
26
- return `${seconds}${unit.s}`
27
- }
28
-
29
- const hours = Math.floor(seconds / 3600)
30
- const minutes = Math.floor((seconds % 3600) / 60)
31
- const secs = seconds % 60
32
-
33
- let result = ''
34
-
35
- if (hours > 0) {
36
- result += `${hours}${unit.h} `
37
- }
38
-
39
- if (minutes > 0) {
40
- result += `${minutes}${unit.m} `
41
- }
42
-
43
- if (secs > 0) {
44
- result += `${secs}${unit.s}`
45
- }
46
-
47
- return result.trim()
48
- }
49
-
50
- return self
51
- }.call({})
52
-
53
- return {
54
- provide: {
55
- time,
56
- },
57
- }
58
- })
1
+ import { defineNuxtPlugin } from '#app'
2
+ import type { UI_T_LangValue } from '~/lib/models/types'
3
+ export default defineNuxtPlugin(() => {
4
+ const time = function (): any {
5
+ const self: any = {}
6
+ self.millisecondsToHour = function (ms: number): number {
7
+ return ~~(ms / 1000 / 60 / 60 / 24)
8
+ }
9
+ self.formatTime = (
10
+ seconds: number,
11
+ lang: UI_T_LangValue = 'ru_RU'
12
+ ): string => {
13
+ const units = {
14
+ en_US: { s: 's', m: 'm', h: 'h' },
15
+ ru_RU: { s: 'с', m: 'м', h: 'ч' },
16
+ hy_AM: { s: 'վ', m: 'ր', h: 'ժ' },
17
+ be_BY: { s: 'с', m: 'хв', h: 'г' },
18
+ kk_KZ: { s: 'сек', m: 'мин', h: 'сағ' },
19
+ zh_CHS: { s: '秒', m: '分', h: '时' },
20
+ BROWSER: { s: 's', m: 'm', h: 'h' },
21
+ }
22
+
23
+ const unit = units[lang] || units.en_US
24
+
25
+ if (seconds < 60) {
26
+ return `${seconds}${unit.s}`
27
+ }
28
+
29
+ const hours = Math.floor(seconds / 3600)
30
+ const minutes = Math.floor((seconds % 3600) / 60)
31
+ const secs = seconds % 60
32
+
33
+ let result = ''
34
+
35
+ if (hours > 0) {
36
+ result += `${hours}${unit.h} `
37
+ }
38
+
39
+ if (minutes > 0) {
40
+ result += `${minutes}${unit.m} `
41
+ }
42
+
43
+ if (secs > 0) {
44
+ result += `${secs}${unit.s}`
45
+ }
46
+
47
+ return result.trim()
48
+ }
49
+
50
+ return self
51
+ }.call({})
52
+
53
+ return {
54
+ provide: {
55
+ time,
56
+ },
57
+ }
58
+ })