bfg-common 1.5.771 → 1.5.774

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 (121) 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_be.json +3 -0
  7. package/assets/localization/local_en.json +3 -0
  8. package/assets/localization/local_hy.json +3 -0
  9. package/assets/localization/local_kk.json +3 -0
  10. package/assets/localization/local_ru.json +3 -0
  11. package/assets/localization/local_zh.json +3 -0
  12. package/components/atoms/TheIcon3.vue +50 -50
  13. package/components/atoms/collapse/CollapseNav.vue +170 -170
  14. package/components/atoms/perPage/PerPage.vue +58 -58
  15. package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
  16. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  17. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  18. package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
  19. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  20. package/components/common/configure/advancedSystemSettings/AdvancedSystemSettings.vue +49 -0
  21. package/components/common/configure/advancedSystemSettings/modals/edit/Edit.vue +55 -0
  22. package/components/common/configure/advancedSystemSettings/modals/edit/New.vue +37 -0
  23. package/components/common/configure/advancedSystemSettings/modals/edit/Old.vue +46 -0
  24. package/components/common/configure/advancedSystemSettings/tableView/TableView.vue +30 -0
  25. package/components/common/configure/advancedSystemSettings/tableView/new/New.vue +193 -0
  26. package/components/common/configure/advancedSystemSettings/tableView/new/lib/config/hostTable.ts +308 -0
  27. package/components/common/configure/advancedSystemSettings/tableView/old/Old.vue +128 -0
  28. package/components/common/configure/advancedSystemSettings/tableView/old/lib/config/table.ts +93 -0
  29. package/components/common/configure/advancedSystemSettings/tableView/old/lib/config/tableKeys.ts +9 -0
  30. package/components/common/configure/advancedSystemSettings/tableView/old/lib/models/types.ts +5 -0
  31. package/components/common/configure/advancedSystemSettings/tools/New.vue +5 -0
  32. package/components/common/configure/advancedSystemSettings/tools/Old.vue +28 -0
  33. package/components/common/configure/advancedSystemSettings/tools/Tools.vue +28 -0
  34. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  35. package/components/common/diagramMain/port/Port.vue +580 -580
  36. package/components/common/layout/console/Console.vue +70 -70
  37. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
  38. package/components/common/layout/theHeader/userMenu/modals/preferences/view/New.vue +64 -64
  39. package/components/common/pages/backups/DetailView.vue +52 -52
  40. package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
  41. package/components/common/pages/backups/modals/Modals.vue +243 -243
  42. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  43. package/components/common/pages/backups/modals/lib/config/restore.ts +116 -116
  44. package/components/common/pages/backups/modals/lib/models/interfaces.ts +187 -187
  45. package/components/common/pages/backups/modals/restore/Restore.vue +302 -302
  46. package/components/common/pages/backups/modals/restore/disks/Disks.vue +50 -50
  47. package/components/common/pages/backups/modals/restore/lib/config/readyToCompleteOptions.ts +94 -94
  48. package/components/common/pages/backups/modals/restore/lib/config/steps.ts +130 -130
  49. package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
  50. package/components/common/pages/backups/modals/restore/types/New.vue +95 -95
  51. package/components/common/pages/backups/modals/restore/types/Old.vue +62 -62
  52. package/components/common/pages/backups/modals/restore/types/Types.vue +31 -31
  53. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  54. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  55. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  56. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  57. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  58. package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
  59. package/components/common/pages/tasks/Tasks.vue +125 -125
  60. package/components/common/pages/tasks/table/Table.vue +373 -373
  61. package/components/common/pages/tasks/table/lib/config/config.ts +279 -279
  62. package/components/common/pages/tasks/table/lib/models/interfaces.ts +9 -9
  63. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  64. package/components/common/select/radio/RadioGroup.vue +137 -137
  65. package/components/common/spiceConsole/Drawer.vue +420 -420
  66. package/components/common/spiceConsole/SpiceConsole.vue +184 -184
  67. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  68. package/components/common/tools/Actions.vue +207 -207
  69. package/components/common/treeView/TreeView.vue +52 -52
  70. package/components/common/vm/actions/clone/lib/config/steps.ts +295 -295
  71. package/components/common/vm/actions/clone/new/New.vue +438 -438
  72. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  73. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
  74. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
  75. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  76. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  77. package/components/common/vm/actions/common/select/options/New.vue +264 -264
  78. package/components/common/vm/actions/common/select/options/Options.vue +58 -58
  79. package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
  80. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  81. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  82. package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
  83. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  84. package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
  85. package/components/common/wizards/common/steps/name/Name.vue +178 -178
  86. package/components/common/wizards/common/steps/name/New.vue +221 -221
  87. package/components/common/wizards/common/steps/name/Old.vue +121 -121
  88. package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
  89. package/components/common/wizards/common/steps/name/location/New.vue +40 -40
  90. package/components/common/wizards/datastore/add/Add.vue +227 -227
  91. package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
  92. package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
  93. package/composables/useAppVersion.ts +21 -21
  94. package/composables/useBrowse.ts +24 -24
  95. package/composables/useLocal.ts +6 -6
  96. package/composables/useLocalCommon.ts +39 -39
  97. package/lib/models/types.ts +59 -59
  98. package/package.json +1 -1
  99. package/plugins/console.ts +21 -21
  100. package/plugins/mouse.ts +21 -21
  101. package/plugins/panelStates.ts +70 -70
  102. package/plugins/text.ts +59 -59
  103. package/public/spice-console/application/clientgui.js +854 -854
  104. package/public/spice-console/application/packetfactory.js +211 -211
  105. package/public/spice-console/application/virtualmouse.js +147 -147
  106. package/public/spice-console/lib/images/bitmap.js +203 -203
  107. package/public/spice-console/network/spicechannel.js +440 -440
  108. package/public/spice-console/process/cursorprocess.js +128 -128
  109. package/public/spice-console/process/inputprocess.js +227 -227
  110. package/public/spice-console/process/mainprocess.js +212 -212
  111. package/public/spice-console/run.js +210 -210
  112. package/store/inventory/modules/configure/advancedSystemSettings/actions.ts +122 -0
  113. package/store/inventory/modules/configure/advancedSystemSettings/getters.ts +9 -0
  114. package/store/inventory/modules/configure/advancedSystemSettings/lib/models/interfaces.ts +11 -0
  115. package/store/inventory/modules/configure/advancedSystemSettings/mutations.ts +12 -0
  116. package/store/inventory/modules/configure/advancedSystemSettings/state.ts +9 -0
  117. package/store/inventory/modules/configure/advancedSystemSettings/store.ts +12 -0
  118. package/store/main/mutations.ts +7 -7
  119. package/store/main/state.ts +7 -7
  120. package/store/tasks/mappers/recentTasks.ts +123 -123
  121. package/store/tasks/mutations.ts +82 -82
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <atoms-loader v-show="loading" test-id="advanced-system-settings-spinner" />
3
+ <div class="advanced-system-settings flex flex-col h-full">
4
+ <common-configure-advanced-system-settings-tools
5
+ class="mb-1"
6
+ @show-edit="isShowEdit = true"
7
+ />
8
+
9
+ <common-configure-advanced-system-settings-table-view :data="settings" />
10
+
11
+ <common-configure-advanced-system-settings-modals-edit
12
+ v-if="isShowEdit"
13
+ :host="props.host"
14
+ :settings="settings"
15
+ @hide="isShowEdit = false"
16
+ @submit="isShowEdit = false"
17
+ />
18
+ </div>
19
+ </template>
20
+
21
+ <script lang="ts" setup>
22
+ const props = defineProps<{
23
+ host: string
24
+ }>()
25
+
26
+ const { $store }: any = useNuxtApp()
27
+
28
+ const loading = ref<boolean>(false)
29
+
30
+ const settings = computed<any>(
31
+ () => $store.getters['advancedSystemSettings/getSettings']
32
+ )
33
+ const getSettings = async (): Promise<void> => {
34
+ loading.value = true
35
+
36
+ await $store.dispatch('advancedSystemSettings/A_GET_SETTINGS', props.host)
37
+
38
+ loading.value = false
39
+ }
40
+ getSettings()
41
+
42
+ const isShowEdit = ref<boolean>(false)
43
+ </script>
44
+
45
+ <style lang="scss" scoped>
46
+ .advanced-system-settings {
47
+ padding-left: 10px;
48
+ }
49
+ </style>
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <component
3
+ :is="currentComponent"
4
+ v-model="settingsLocal"
5
+ :host="props.host"
6
+ :settings="props.settings"
7
+ @hide="onHide"
8
+ @submit="onSubmit"
9
+ />
10
+ </template>
11
+
12
+ <script lang="ts" setup>
13
+
14
+ const props = defineProps<{
15
+ host: string
16
+ settings: any
17
+ }>()
18
+
19
+ const emits = defineEmits<{
20
+ (event: 'hide'): void
21
+ }>()
22
+
23
+ const { $store }: any = useNuxtApp()
24
+
25
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
26
+ const currentComponent = computed(() =>
27
+ isNewView.value
28
+ ? defineAsyncComponent(() => import('./New.vue'))
29
+ : defineAsyncComponent(() => import('./Old.vue'))
30
+ )
31
+
32
+ const settingsLocal = ref<any>(useDeepCopy(props.settings))
33
+
34
+
35
+ const loading = ref<boolean>(false)
36
+
37
+ const onSubmit = (): void => {
38
+ loading.value = true
39
+
40
+ $store.dispatch('advancedSystemSettings/A_UPDATE_SETTINGS', {
41
+ host: props.host,
42
+ settings: settingsLocal.value
43
+ })
44
+
45
+ loading.value = false
46
+
47
+ onHide()
48
+ }
49
+
50
+ const onHide = (): void => {
51
+ emits('hide')
52
+ }
53
+ </script>
54
+
55
+ <style lang="scss" scoped></style>
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <atoms-modal
3
+ :title="localization.common.edit"
4
+ :second-title="props.host"
5
+ test-id="advanced-system-settings-edit"
6
+ class="advanced-system-settings"
7
+ show
8
+ @hide="onHide"
9
+ >
10
+ <template #modalBody>
11
+ <common-configure-advanced-system-settings-table-view :data="props.settings" />
12
+ </template>
13
+ </atoms-modal>
14
+ </template>
15
+
16
+ <script lang="ts" setup>
17
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
18
+
19
+ const props = defineProps<{
20
+ host: string
21
+ settings: any
22
+ }>()
23
+
24
+ const emits = defineEmits<{
25
+ (event: 'hide'): void
26
+ // (event: 'submit'): void
27
+ }>()
28
+
29
+ const localization = computed<UI_I_Localization>(() => useLocal())
30
+
31
+ const onHide = (): void => {
32
+ emits('hide')
33
+ }
34
+ </script>
35
+
36
+ <style lang="scss" scoped>
37
+ </style>
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <atoms-modal
3
+ :title="localization.common.edit"
4
+ :second-title="props.host"
5
+ test-id="advanced-system-settings-edit"
6
+ class="advanced-system-settings"
7
+ width="863px"
8
+ show
9
+ @hide="onHide"
10
+ @submit="onSubmit"
11
+ >
12
+ <template #modalBody>
13
+ <common-configure-advanced-system-settings-table-view
14
+ v-model:settings="model"
15
+ :data="props.settings"
16
+ is-edit
17
+ />
18
+ </template>
19
+ </atoms-modal>
20
+ </template>
21
+
22
+ <script lang="ts" setup>
23
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
24
+
25
+ const model = defineModel<any>({required: true})
26
+ const props = defineProps<{
27
+ host: string
28
+ settings: any
29
+ }>()
30
+
31
+ const emits = defineEmits<{
32
+ (event: 'hide'): void
33
+ (event: 'submit'): void
34
+ }>()
35
+
36
+ const localization = computed<UI_I_Localization>(() => useLocal())
37
+
38
+ const onHide = (): void => {
39
+ emits('hide')
40
+ }
41
+ const onSubmit = (): void => {
42
+ emits('submit')
43
+ }
44
+ </script>
45
+
46
+ <style lang="scss" scoped></style>
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <component
3
+ :is="currentComponent"
4
+ v-model:settings="settings"
5
+ :data-table="props.data?.items || []"
6
+ :total-items="props.data?.total_items || 0"
7
+ :total-pages="props.data?.total_pages || 1"
8
+ :is-edit="props.isEdit"
9
+ />
10
+ </template>
11
+
12
+ <script lang="ts" setup>
13
+ const settings = defineModel<any>('settings', {required: true})
14
+ const props = withDefaults(
15
+ defineProps<{
16
+ data: any
17
+ isEdit?: boolean
18
+ }>(),
19
+ { isEdit: false }
20
+ )
21
+
22
+ const { $store }: any = useNuxtApp()
23
+
24
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
25
+ const currentComponent = computed(() =>
26
+ isNewView.value
27
+ ? defineAsyncComponent(() => import('./new/New.vue'))
28
+ : defineAsyncComponent(() => import('./old/Old.vue'))
29
+ )
30
+ </script>
@@ -0,0 +1,193 @@
1
+ <template>
2
+ <div class="device-table-container">
3
+ <ui-data-table
4
+ :data="data"
5
+ :options="options"
6
+ :total-pages="props.totalPages"
7
+ :total-items="props.totalItems"
8
+ :texts="texts"
9
+ :default-layout="false"
10
+ :skeleton="tableSkeleton"
11
+ test-id="compute-resource-table"
12
+ class="device-table"
13
+ size="sm"
14
+ @select-row="onSelectRow"
15
+ >
16
+ <template #icon="{ item }">
17
+ <span :class="['device-table__icon', item.data.iconClassName]" />
18
+ <span class="device-table__text text-ellipsis">
19
+ {{ item.text }}
20
+ </span>
21
+ </template>
22
+
23
+ <template #progress="{ item }">
24
+ <div class="progress flex items-center justify-between w-full">
25
+ <div class="progress-line">
26
+ <div
27
+ v-if="item.data"
28
+ :style="`width: ${item.data}%`"
29
+ class="progress-line-fill"
30
+ ></div>
31
+ </div>
32
+ <div
33
+ :class="[
34
+ 'progress-text',
35
+ {
36
+ 'progress-full': item.data === 100,
37
+ },
38
+ ]"
39
+ >
40
+ {{ item.text }}
41
+ </div>
42
+ </div>
43
+ </template>
44
+
45
+ <template #status="{ item }">
46
+ <ui-chip
47
+ :test-id="item.data.testId"
48
+ :color="item.data.chipColor"
49
+ size="sm"
50
+ rounded
51
+ >
52
+ <ui-icon
53
+ :name="item.data.icon"
54
+ width="14px"
55
+ height="14px"
56
+ class="chip-icon"
57
+ ></ui-icon>
58
+ {{ item.text }}
59
+ </ui-chip>
60
+ </template>
61
+
62
+ <template #skeleton-header>
63
+ <div class="flex justify-between items-center">
64
+ <ui-skeleton-item width="80" height="20" />
65
+ <ui-skeleton-item width="88" height="28" border-radius="6" />
66
+ </div>
67
+ </template>
68
+ </ui-data-table>
69
+ </div>
70
+ </template>
71
+
72
+ <script lang="ts" setup>
73
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
74
+ import type {
75
+ UI_I_DataTable,
76
+ UI_I_DataTableHeader,
77
+ UI_I_DataTableBody,
78
+ UI_I_TableTexts,
79
+ } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
80
+ import type { UI_I_DataTableSkeleton } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
81
+ import {
82
+ options,
83
+ getHeaderDataFunc,
84
+ getBodyDataFunc,
85
+ } from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable'
86
+
87
+ const selectedDataLocal = defineModel<number | null>({ required: true })
88
+ const props = defineProps<{
89
+ dataTable: any[]
90
+ totalItems: number
91
+ totalPages: number
92
+ isEdit: boolean
93
+ }>()
94
+
95
+ const localization = computed<UI_I_Localization>(() => useLocal())
96
+
97
+ const texts = computed<UI_I_TableTexts>(() => ({
98
+ searchHere: localization.value.common.searchHere,
99
+ rowsPerPage: localization.value.common.rowsPerPage,
100
+ of: localization.value.common.of,
101
+ selected: localization.value.common.selected2,
102
+ columns: localization.value.common.columns,
103
+ previous: localization.value.common.previous,
104
+ next: localization.value.common.next,
105
+ noItemsFound: localization.value.common.noItemsFound,
106
+ exportAll: localization.value.common.exportAll,
107
+ exportSelected: localization.value.common.exportSelected,
108
+ all: localization.value.common.all,
109
+ filter: localization.value.common.filter,
110
+ }))
111
+
112
+ const tableSkeleton = ref<UI_I_DataTableSkeleton>({
113
+ columnsCount: 4,
114
+ headColumns: [],
115
+ bodyColumns: [],
116
+ withoutPagination: true,
117
+ })
118
+
119
+ const data = computed<UI_I_DataTable>(() => ({
120
+ id: 'compute-resource-host-table',
121
+ title: `${localization.value.common.hosts} (${props.totalItems})`,
122
+ header: deviceHeadItems.value,
123
+ body: deviceBodyItems.value,
124
+ }))
125
+
126
+ const deviceHeadItems = computed<UI_I_DataTableHeader[]>(() =>
127
+ getHeaderDataFunc(localization.value)
128
+ )
129
+
130
+ const deviceBodyItems = ref<UI_I_DataTableBody[]>([])
131
+ watch(
132
+ () => props.dataTable,
133
+ (newValue: UI_T_ComputeResourceTableItem[]) => {
134
+ if (!newValue?.length) {
135
+ deviceBodyItems.value = []
136
+ return
137
+ }
138
+
139
+ deviceBodyItems.value = getBodyDataFunc(newValue, localization.value)
140
+ },
141
+ { deep: true, immediate: true }
142
+ )
143
+
144
+ const onSelectRow = (value: UI_I_DataTableBody[]): void => {
145
+ selectedDataLocal.value = value?.[0].row
146
+ }
147
+ </script>
148
+
149
+ <style lang="scss" scoped>
150
+ .device-table-container {
151
+ margin: 20px 0 24px;
152
+ :deep(.column-manager-button.sm span) {
153
+ font-weight: 500;
154
+ }
155
+ :deep(.table-title .title-container h6) {
156
+ font-size: 12px;
157
+ }
158
+ .device-table {
159
+ &__icon {
160
+ margin-right: 4px;
161
+ }
162
+ &__text {
163
+ font-size: 12px;
164
+ }
165
+ }
166
+ .progress {
167
+ &-line {
168
+ height: 12px;
169
+ width: 100%;
170
+ background: #e9ebed8f;
171
+ border-radius: 6px;
172
+
173
+ &-fill {
174
+ height: 12px;
175
+ min-width: 12px;
176
+ background: #008fd6;
177
+ border-radius: 6px;
178
+ }
179
+ }
180
+
181
+ &-text {
182
+ width: 53px;
183
+ min-width: 53px;
184
+ margin-left: 8px;
185
+ text-align: right;
186
+
187
+ &.progress-full {
188
+ color: #ea3223;
189
+ }
190
+ }
191
+ }
192
+ }
193
+ </style>