bfg-common 1.5.714 → 1.5.716
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.
- package/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/layout/theHeader/TheHeaderNew.vue +315 -315
- package/components/common/layout/theHeader/TheHeaderOld.vue +262 -262
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesOld.vue +144 -144
- package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
- package/components/common/pages/backups/DetailView.vue +52 -52
- package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
- package/components/common/pages/backups/modals/Modals.vue +243 -243
- package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
- package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
- package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/pages/tasks/Tasks.vue +125 -122
- package/components/common/pages/tasks/table/Table.vue +373 -370
- package/components/common/pages/tasks/table/lib/config/config.ts +279 -279
- package/components/common/pages/tasks/table/lib/models/interfaces.ts +6 -0
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/spiceConsole/Drawer.vue +420 -420
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/clone/lib/config/steps.ts +295 -295
- package/components/common/vm/actions/clone/new/New.vue +438 -438
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/options/New.vue +264 -264
- package/components/common/vm/actions/common/select/options/Options.vue +58 -58
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +228 -228
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/composables/useAppVersion.ts +21 -21
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/package.json +1 -1
- package/plugins/console.ts +21 -21
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +128 -128
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +212 -212
- package/public/spice-console/run.js +210 -210
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/actions.ts +1 -1
- package/store/tasks/mappers/recentTasks.ts +123 -123
- package/store/tasks/mappers/tasks.ts +8 -1
- package/store/tasks/mutations.ts +82 -82
|
@@ -1,279 +1,279 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_DataTableBody,
|
|
3
|
-
UI_I_DataTableOptions,
|
|
4
|
-
UI_I_DataTableHeader,
|
|
5
|
-
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
|
-
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
7
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
8
|
-
import type {
|
|
9
|
-
UI_T_Project,
|
|
10
|
-
UI_T_ProcuratorTypeNodes,
|
|
11
|
-
UI_T_LangValue,
|
|
12
|
-
} from '~/lib/models/types'
|
|
13
|
-
import type { UI_I_TaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
14
|
-
import { UI_E_RecentTaskStatus } from '~/lib/models/store/tasks/enums'
|
|
15
|
-
import {
|
|
16
|
-
UI_E_RTaskChipColor,
|
|
17
|
-
UI_E_RTaskStatusIcon,
|
|
18
|
-
} from '~/components/common/pages/tasks/table/lib/models/enums'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
{ text: '
|
|
165
|
-
{ text: '
|
|
166
|
-
{ text: '
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
): UI_I_DataTableBody[] => {
|
|
191
|
-
const { $formattedDatetime, $time } = useNuxtApp() as any
|
|
192
|
-
|
|
193
|
-
return bodyData.map((task, index: number) => {
|
|
194
|
-
const iconClassName =
|
|
195
|
-
const id =
|
|
196
|
-
const nav =
|
|
197
|
-
const type =
|
|
198
|
-
|
|
199
|
-
const targetData = {
|
|
200
|
-
id,
|
|
201
|
-
nav,
|
|
202
|
-
type,
|
|
203
|
-
icon: iconClassName,
|
|
204
|
-
isLink: !!iconClassName,
|
|
205
|
-
testId: `${task.targetType}-item`,
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
const statusData = {
|
|
209
|
-
icon: UI_E_RTaskStatusIcon[task.status],
|
|
210
|
-
chipColor: UI_E_RTaskChipColor[task.status],
|
|
211
|
-
error: task.error,
|
|
212
|
-
testId: `${task.taskName.replaceAll(/[\s.]/g, '-')}-${index}-status`,
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
const zoneData = {
|
|
216
|
-
id: task?.zoneId || '',
|
|
217
|
-
isLink: project === 'sphere',
|
|
218
|
-
nav,
|
|
219
|
-
icon: 'vsphere-icon-vcenter',
|
|
220
|
-
type: 'zone',
|
|
221
|
-
testId: `${task.targetType}-zone`,
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
const formattedStartTime =
|
|
225
|
-
task.startTime === '--'
|
|
226
|
-
? '--'
|
|
227
|
-
: $formattedDatetime(+task.startTime * 1000, { hasSeconds: true })
|
|
228
|
-
|
|
229
|
-
const formattedCompletionTime =
|
|
230
|
-
task.completion === '--'
|
|
231
|
-
? '--'
|
|
232
|
-
: $formattedDatetime(+task.completion * 1000, { hasSeconds: true })
|
|
233
|
-
|
|
234
|
-
const currentLanguage: UI_T_LangValue = useLocalStorage('lang') || 'en_US'
|
|
235
|
-
const queuedFor = $time.formatTime(task.queuedFor, currentLanguage)
|
|
236
|
-
const executionTime = $time.formatTime(task.execution, currentLanguage)
|
|
237
|
-
|
|
238
|
-
return {
|
|
239
|
-
row: index,
|
|
240
|
-
collapse: true,
|
|
241
|
-
isHiddenCollapse: false,
|
|
242
|
-
collapseToggle: false,
|
|
243
|
-
data: [
|
|
244
|
-
{ col: 'col0', text: task.taskName || '--' },
|
|
245
|
-
{
|
|
246
|
-
key: 'icon',
|
|
247
|
-
col: 'col1',
|
|
248
|
-
text: task.target || '--',
|
|
249
|
-
data: targetData,
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
key: 'status',
|
|
253
|
-
col: 'col2',
|
|
254
|
-
text: localization.common[UI_E_RecentTaskStatus[task.status]],
|
|
255
|
-
data: statusData,
|
|
256
|
-
},
|
|
257
|
-
{ col: 'col3', text: task.details || task.error || '--' }, // PC-2874
|
|
258
|
-
{ col: 'col4', text: task.initiator || '--' },
|
|
259
|
-
{ col: 'col5', text: queuedFor },
|
|
260
|
-
{ col: 'col6', text: formattedStartTime },
|
|
261
|
-
{ col: 'col7', text: formattedCompletionTime },
|
|
262
|
-
{ col: 'col8', text: executionTime },
|
|
263
|
-
{ col: 'col9', text: task.server || '--' },
|
|
264
|
-
{
|
|
265
|
-
key: 'icon',
|
|
266
|
-
col: 'col10',
|
|
267
|
-
text: task.zone || '--',
|
|
268
|
-
data: zoneData,
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
key: 'default-actions',
|
|
272
|
-
col: 'default-actions',
|
|
273
|
-
text: '',
|
|
274
|
-
data: { id: index, target: targetData },
|
|
275
|
-
},
|
|
276
|
-
],
|
|
277
|
-
}
|
|
278
|
-
})
|
|
279
|
-
}
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_DataTableBody,
|
|
3
|
+
UI_I_DataTableOptions,
|
|
4
|
+
UI_I_DataTableHeader,
|
|
5
|
+
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
|
+
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
7
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
8
|
+
import type {
|
|
9
|
+
UI_T_Project,
|
|
10
|
+
UI_T_ProcuratorTypeNodes,
|
|
11
|
+
UI_T_LangValue,
|
|
12
|
+
} from '~/lib/models/types'
|
|
13
|
+
import type { UI_I_TaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
14
|
+
import { UI_E_RecentTaskStatus } from '~/lib/models/store/tasks/enums'
|
|
15
|
+
import {
|
|
16
|
+
UI_E_RTaskChipColor,
|
|
17
|
+
UI_E_RTaskStatusIcon,
|
|
18
|
+
} from '~/components/common/pages/tasks/table/lib/models/enums'
|
|
19
|
+
import type { UI_I_TaskConfig } from '~/components/common/pages/tasks/table/lib/models/interfaces'
|
|
20
|
+
|
|
21
|
+
export const getHeaderDataFunc = (
|
|
22
|
+
localization: UI_I_Localization
|
|
23
|
+
): UI_I_DataTableHeader[] => [
|
|
24
|
+
{
|
|
25
|
+
col: 'col0',
|
|
26
|
+
colName: 'task_name',
|
|
27
|
+
text: localization.tasks.taskName,
|
|
28
|
+
isSortable: true,
|
|
29
|
+
sort: 'asc',
|
|
30
|
+
width: '248px',
|
|
31
|
+
show: true,
|
|
32
|
+
filter: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
col: 'col1',
|
|
36
|
+
colName: 'target',
|
|
37
|
+
text: localization.common.target,
|
|
38
|
+
isSortable: true,
|
|
39
|
+
sort: 'asc',
|
|
40
|
+
width: '180px',
|
|
41
|
+
show: true,
|
|
42
|
+
filter: true,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
col: 'col2',
|
|
46
|
+
colName: 'status',
|
|
47
|
+
text: localization.common.status,
|
|
48
|
+
isSortable: true,
|
|
49
|
+
sort: 'asc',
|
|
50
|
+
width: '180px',
|
|
51
|
+
show: true,
|
|
52
|
+
filter: true,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
col: 'col3',
|
|
56
|
+
colName: 'details',
|
|
57
|
+
text: localization.common.details,
|
|
58
|
+
isSortable: true,
|
|
59
|
+
sort: 'asc',
|
|
60
|
+
width: '180px',
|
|
61
|
+
show: true,
|
|
62
|
+
filter: true,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
col: 'col4',
|
|
66
|
+
colName: 'initiator',
|
|
67
|
+
text: localization.common.initiator,
|
|
68
|
+
isSortable: true,
|
|
69
|
+
sort: 'asc',
|
|
70
|
+
width: '180px',
|
|
71
|
+
show: true,
|
|
72
|
+
filter: true,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
col: 'col5',
|
|
76
|
+
colName: 'queued_for',
|
|
77
|
+
text: localization.common.queuedFor,
|
|
78
|
+
isSortable: false,
|
|
79
|
+
sort: 'asc',
|
|
80
|
+
width: '180px',
|
|
81
|
+
show: true,
|
|
82
|
+
filter: true,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
col: 'col6',
|
|
86
|
+
colName: 'start_time',
|
|
87
|
+
text: localization.common.startTime,
|
|
88
|
+
isSortable: false,
|
|
89
|
+
sort: 'asc',
|
|
90
|
+
width: '208px',
|
|
91
|
+
show: true,
|
|
92
|
+
filter: true,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
col: 'col7',
|
|
96
|
+
colName: 'completion',
|
|
97
|
+
text: localization.common.completionTime,
|
|
98
|
+
isSortable: true,
|
|
99
|
+
sort: 'asc',
|
|
100
|
+
width: '208px',
|
|
101
|
+
show: true,
|
|
102
|
+
filter: true,
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
col: 'col8',
|
|
106
|
+
colName: 'execution_time',
|
|
107
|
+
text: localization.common.executionTime,
|
|
108
|
+
isSortable: false,
|
|
109
|
+
sort: 'asc',
|
|
110
|
+
width: '180px',
|
|
111
|
+
show: true,
|
|
112
|
+
filter: true,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
col: 'col9',
|
|
116
|
+
colName: 'server',
|
|
117
|
+
text: localization.common.server,
|
|
118
|
+
isSortable: true,
|
|
119
|
+
sort: 'asc',
|
|
120
|
+
width: '400px',
|
|
121
|
+
show: true,
|
|
122
|
+
filter: true,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
col: 'col10',
|
|
126
|
+
colName: 'zone',
|
|
127
|
+
text: localization.common.zone,
|
|
128
|
+
isSortable: true,
|
|
129
|
+
sort: 'asc',
|
|
130
|
+
width: '144px',
|
|
131
|
+
show: true,
|
|
132
|
+
filter: true,
|
|
133
|
+
},
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
export const getTargetActionsFunc = (
|
|
137
|
+
localization: UI_I_Localization,
|
|
138
|
+
project: UI_T_Project
|
|
139
|
+
): UI_I_Dropdown[] => {
|
|
140
|
+
const actions: UI_I_Dropdown[] = [
|
|
141
|
+
{
|
|
142
|
+
value: 'view-target',
|
|
143
|
+
text: localization.common.viewTarget,
|
|
144
|
+
iconName: 'hide',
|
|
145
|
+
selected: false,
|
|
146
|
+
},
|
|
147
|
+
]
|
|
148
|
+
|
|
149
|
+
if (project === 'sphere') {
|
|
150
|
+
actions.push({
|
|
151
|
+
value: 'view-zone',
|
|
152
|
+
text: localization.common.viewZone,
|
|
153
|
+
iconName: 'hide',
|
|
154
|
+
selected: false,
|
|
155
|
+
})
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return actions
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export const options: UI_I_DataTableOptions = {
|
|
162
|
+
perPageOptions: [
|
|
163
|
+
{ text: '10', value: 10 },
|
|
164
|
+
{ text: '25', value: 25 },
|
|
165
|
+
{ text: '50', value: 50 },
|
|
166
|
+
{ text: '100', value: 100, default: true },
|
|
167
|
+
],
|
|
168
|
+
isSelectable: true,
|
|
169
|
+
isFocusable: false,
|
|
170
|
+
showPagination: true,
|
|
171
|
+
showPaginationOnTop: true,
|
|
172
|
+
showPageInfo: true,
|
|
173
|
+
isSortable: true,
|
|
174
|
+
server: true,
|
|
175
|
+
isResizable: true,
|
|
176
|
+
showSearch: false,
|
|
177
|
+
showSelectedRows: true,
|
|
178
|
+
showColumnManager: true,
|
|
179
|
+
withActions: true,
|
|
180
|
+
inBlock: true,
|
|
181
|
+
showExport: true,
|
|
182
|
+
withCollapse: true,
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export const getBodyDataFunc = (
|
|
186
|
+
bodyData: UI_I_TaskItem<UI_T_ProcuratorTypeNodes>[],
|
|
187
|
+
localization: UI_I_Localization,
|
|
188
|
+
project: UI_T_Project,
|
|
189
|
+
config: UI_I_TaskConfig
|
|
190
|
+
): UI_I_DataTableBody[] => {
|
|
191
|
+
const { $formattedDatetime, $time } = useNuxtApp() as any
|
|
192
|
+
|
|
193
|
+
return bodyData.map((task, index: number) => {
|
|
194
|
+
const iconClassName = config.iconFunc(task.targetType)
|
|
195
|
+
const id = config.idFunc(task)
|
|
196
|
+
const nav = config.navFunc(task.targetType)
|
|
197
|
+
const type = config.typeFunc(task.targetType)
|
|
198
|
+
|
|
199
|
+
const targetData = {
|
|
200
|
+
id,
|
|
201
|
+
nav,
|
|
202
|
+
type,
|
|
203
|
+
icon: iconClassName,
|
|
204
|
+
isLink: !!iconClassName,
|
|
205
|
+
testId: `${task.targetType}-item`,
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const statusData = {
|
|
209
|
+
icon: UI_E_RTaskStatusIcon[task.status],
|
|
210
|
+
chipColor: UI_E_RTaskChipColor[task.status],
|
|
211
|
+
error: task.error,
|
|
212
|
+
testId: `${task.taskName.replaceAll(/[\s.]/g, '-')}-${index}-status`,
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const zoneData = {
|
|
216
|
+
id: task?.zoneId || '',
|
|
217
|
+
isLink: project === 'sphere',
|
|
218
|
+
nav,
|
|
219
|
+
icon: 'vsphere-icon-vcenter',
|
|
220
|
+
type: 'zone',
|
|
221
|
+
testId: `${task.targetType}-zone`,
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const formattedStartTime =
|
|
225
|
+
task.startTime === '--'
|
|
226
|
+
? '--'
|
|
227
|
+
: $formattedDatetime(+task.startTime * 1000, { hasSeconds: true })
|
|
228
|
+
|
|
229
|
+
const formattedCompletionTime =
|
|
230
|
+
task.completion === '--'
|
|
231
|
+
? '--'
|
|
232
|
+
: $formattedDatetime(+task.completion * 1000, { hasSeconds: true })
|
|
233
|
+
|
|
234
|
+
const currentLanguage: UI_T_LangValue = useLocalStorage('lang') || 'en_US'
|
|
235
|
+
const queuedFor = $time.formatTime(task.queuedFor, currentLanguage)
|
|
236
|
+
const executionTime = $time.formatTime(task.execution, currentLanguage)
|
|
237
|
+
|
|
238
|
+
return {
|
|
239
|
+
row: index,
|
|
240
|
+
collapse: true,
|
|
241
|
+
isHiddenCollapse: false,
|
|
242
|
+
collapseToggle: false,
|
|
243
|
+
data: [
|
|
244
|
+
{ col: 'col0', text: task.taskName || '--' },
|
|
245
|
+
{
|
|
246
|
+
key: 'icon',
|
|
247
|
+
col: 'col1',
|
|
248
|
+
text: task.target || '--',
|
|
249
|
+
data: targetData,
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
key: 'status',
|
|
253
|
+
col: 'col2',
|
|
254
|
+
text: localization.common[UI_E_RecentTaskStatus[task.status]],
|
|
255
|
+
data: statusData,
|
|
256
|
+
},
|
|
257
|
+
{ col: 'col3', text: task.details || task.error || '--' }, // PC-2874
|
|
258
|
+
{ col: 'col4', text: task.initiator || '--' },
|
|
259
|
+
{ col: 'col5', text: queuedFor },
|
|
260
|
+
{ col: 'col6', text: formattedStartTime },
|
|
261
|
+
{ col: 'col7', text: formattedCompletionTime },
|
|
262
|
+
{ col: 'col8', text: executionTime },
|
|
263
|
+
{ col: 'col9', text: task.server || '--' },
|
|
264
|
+
{
|
|
265
|
+
key: 'icon',
|
|
266
|
+
col: 'col10',
|
|
267
|
+
text: task.zone || '--',
|
|
268
|
+
data: zoneData,
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
key: 'default-actions',
|
|
272
|
+
col: 'default-actions',
|
|
273
|
+
text: '',
|
|
274
|
+
data: { id: index, target: targetData },
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
}
|
|
278
|
+
})
|
|
279
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-ready-to-complete-new v-if="isNewView" :data="props.data" />
|
|
3
|
-
<common-ready-to-complete-old v-else :data="props.data" />
|
|
4
|
-
</template>
|
|
5
|
-
|
|
6
|
-
<script lang="ts" setup>
|
|
7
|
-
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
8
|
-
|
|
9
|
-
const props = defineProps<{
|
|
10
|
-
data: UI_I_TableInfoItem[]
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
const { $store }: any = useNuxtApp()
|
|
14
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<style lang="scss" scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<common-ready-to-complete-new v-if="isNewView" :data="props.data" />
|
|
3
|
+
<common-ready-to-complete-old v-else :data="props.data" />
|
|
4
|
+
</template>
|
|
5
|
+
|
|
6
|
+
<script lang="ts" setup>
|
|
7
|
+
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
data: UI_I_TableInfoItem[]
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const { $store }: any = useNuxtApp()
|
|
14
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<style lang="scss" scoped></style>
|