bfg-common 1.4.799 → 1.4.800
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/assets/img/icons/icons-sprite-dark-1.svg +31 -14
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-4.svg +6 -1
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-1.svg +30 -13
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-4.svg +6 -1
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/localization/local_be.json +33 -8
- package/assets/localization/local_en.json +33 -8
- package/assets/localization/local_hy.json +33 -8
- package/assets/localization/local_kk.json +34 -9
- package/assets/localization/local_ru.json +43 -18
- package/assets/localization/local_zh.json +33 -8
- package/assets/scss/clarity/local_ar.json +6 -3
- package/assets/scss/common/icons/icons-1.scss +4 -4
- package/components/atoms/autocomplete/Autocomplete.vue +68 -12
- package/components/atoms/select/TheSelect.vue +10 -1
- package/components/atoms/table/dataGrid/DataGrid.vue +12 -4
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +4 -1
- package/components/atoms/table/dataGrid/lib/utils/export.ts +13 -13
- package/components/atoms/tabs/VerticalTabs.vue +11 -6
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/chartOptionsModal/counters/timespan/form/Form.vue +544 -544
- package/components/common/chartOptionsModal/counters/timespan/form/lib/config/dateForm.ts +116 -116
- package/components/common/context/Context.vue +16 -4
- package/components/common/context/recursion/Recursion.vue +2 -1
- package/components/common/context/recursion/RecursionNew.vue +57 -31
- package/components/common/context/recursion/RecursionOld.vue +33 -19
- package/components/common/diagramMain/Header.vue +211 -211
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +330 -330
- package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
- package/components/common/diagramMain/modals/editSettings/EditSettings.vue +497 -497
- package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +812 -812
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
- package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
- package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +7 -7
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +205 -205
- package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +23 -23
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
- package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/feedback/Buttons.vue +2 -2
- package/components/common/feedback/Message.vue +1 -0
- package/components/common/feedback/VisitPortal.vue +5 -1
- package/components/common/layout/theHeader/feedback/new/New.vue +29 -14
- package/components/common/layout/theHeader/feedback/new/additionalDetails/AdditionalDetails.vue +34 -9
- package/components/common/layout/theHeader/feedback/new/additionalDetails/Headline.vue +17 -6
- package/components/common/layout/theHeader/feedback/new/description/Description.vue +1 -0
- package/components/common/layout/theHeader/feedback/new/email/Email.vue +1 -1
- package/components/common/layout/theHeader/feedback/new/subtitle/Subtitle.vue +22 -6
- package/components/common/layout/theHeader/feedback/new/tabs/Tabs.vue +17 -15
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePasswordNew.vue +1 -1
- package/components/common/mainNavigationPanel/MainNavigationPanel.vue +3 -2
- package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +1 -1
- package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/Notification.vue +7 -7
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +95 -95
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +1 -1
- package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +463 -456
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +389 -387
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +8 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/Counters.vue +94 -94
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/Timespan.vue +66 -66
- package/components/common/pages/home/headline/Headline.vue +3 -2
- package/components/common/pages/home/headline/HeadlineNew.vue +1 -1
- package/components/common/pages/home/headline/HeadlineOld.vue +5 -0
- package/components/common/pages/home/widgets/vms/VmsNew.vue +1 -1
- package/components/common/pages/packages/Packages.vue +208 -0
- package/components/common/pages/packages/lib/config/actions.ts +59 -0
- package/components/common/pages/packages/lib/models/types.ts +8 -0
- package/components/common/pages/packages/tableView/TableView.vue +120 -0
- package/components/common/pages/packages/tableView/lib/config/configTable.ts +136 -0
- package/components/common/pages/packages/tableView/lib/config/tableKey.ts +14 -0
- package/components/common/pages/packages/tableView/lib/models/types.ts +12 -0
- package/components/common/pages/shortcuts/Shortcuts.vue +1 -1
- package/components/common/pages/tasks/Tasks.vue +23 -8
- package/components/common/pages/tasks/table/Table.vue +66 -16
- package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +27 -10
- package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +28 -12
- package/components/common/pages/tasks/table/lib/config/config.ts +11 -11
- package/components/common/select/radio/RadioGroup.vue +3 -3
- package/components/common/selectLanguage/SelectLanguage.vue +29 -25
- package/components/common/selectLanguage/lib/config/config.ts +1 -0
- package/components/common/split/horizontal/HorizontalNew.vue +42 -24
- package/components/common/split/horizontal/HorizontalOld.vue +43 -13
- package/components/common/vm/actions/add/Add.vue +6 -1
- package/components/common/vm/actions/clone/Clone.vue +8 -3
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +4 -0
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +6 -4
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +26 -10
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +12 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +6 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +4 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +6 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +9 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +3 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +3 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +87 -24
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +14 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +9 -7
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +0 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +43 -12
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoOld.vue +50 -25
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +5 -7
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoNew.vue +64 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoOld.vue +60 -19
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options.ts +11 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +16 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridNew.vue +59 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridOld.vue +60 -7
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionNew.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionOld.vue +1 -1
- package/components/common/vm/actions/common/lib/config/capabilities.ts +1 -1
- package/components/common/vm/actions/editSettings/EditSettings.vue +4 -0
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +2 -0
- package/components/common/vm/actions/editSettings/new/New.vue +2 -0
- package/components/common/wizards/datastore/add/Add.vue +4 -4
- package/components/common/wizards/datastore/add/lib/config/steps.ts +14 -14
- package/components/common/wizards/datastore/add/lib/validations.ts +9 -9
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +6 -9
- package/components/common/wizards/vm/migrate/Migrate.vue +12 -12
- package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +1 -1
- package/composables/useLocal.ts +3 -1
- package/composables/useLocalStorage.ts +1 -1
- package/lib/models/store/vm/interfaces.ts +11 -0
- package/lib/models/table/interfaces.ts +1 -0
- package/package.json +3 -3
- package/store/tasks/actions.ts +2 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="packages-table">
|
|
3
|
+
<atoms-table-data-grid
|
|
4
|
+
v-model:selected-row="selectedRowLocal"
|
|
5
|
+
v-model:column-keys="columnKeys"
|
|
6
|
+
v-model:page-size="paginationLocal.pageSize"
|
|
7
|
+
v-model:page="paginationLocal.page"
|
|
8
|
+
type="radio"
|
|
9
|
+
class="data-table"
|
|
10
|
+
test-id="packages-table"
|
|
11
|
+
:head-items="headItems"
|
|
12
|
+
:body-items="bodyItems"
|
|
13
|
+
:total-items="props.totalItems"
|
|
14
|
+
:total-pages="props.totalPages"
|
|
15
|
+
:loading="props.loading"
|
|
16
|
+
hide-footer
|
|
17
|
+
@filtering="onFiltering"
|
|
18
|
+
@sorting="onSorting"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
25
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
26
|
+
import type {
|
|
27
|
+
UI_I_ColumnKey,
|
|
28
|
+
UI_I_HeadItem,
|
|
29
|
+
UI_I_BodyItem,
|
|
30
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
31
|
+
import type { UI_T_SelectedRow } from '~/components/atoms/table/dataGrid/lib/models/types'
|
|
32
|
+
import type { UI_T_TimeValue } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types'
|
|
33
|
+
import * as table from '~/components/common/pages/packages/tableView/lib/config/configTable'
|
|
34
|
+
|
|
35
|
+
const props = defineProps<{
|
|
36
|
+
dataTable: any[]
|
|
37
|
+
totalItems: number
|
|
38
|
+
totalPages: number
|
|
39
|
+
pagination: UI_I_Pagination
|
|
40
|
+
loading: boolean
|
|
41
|
+
}>()
|
|
42
|
+
const emits = defineEmits<{
|
|
43
|
+
(event: 'pagination', value: UI_I_Pagination): void
|
|
44
|
+
(event: 'sort', value: string): void
|
|
45
|
+
}>()
|
|
46
|
+
const selectedRowLocal = defineModel<UI_T_SelectedRow>({ required: true })
|
|
47
|
+
|
|
48
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
49
|
+
|
|
50
|
+
const paginationLocal = ref<UI_I_Pagination>(props.pagination)
|
|
51
|
+
watch(
|
|
52
|
+
() => props.pagination,
|
|
53
|
+
(newValue) => {
|
|
54
|
+
paginationLocal.value = newValue
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
watch(
|
|
58
|
+
paginationLocal,
|
|
59
|
+
(newValue) => {
|
|
60
|
+
if (!newValue) return
|
|
61
|
+
|
|
62
|
+
emits('pagination', newValue)
|
|
63
|
+
},
|
|
64
|
+
{ deep: true, immediate: true }
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
68
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
69
|
+
table.headItems(localization.value)
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
const bodyItems = ref<UI_I_BodyItem[][]>([])
|
|
73
|
+
watch(
|
|
74
|
+
() => props.dataTable,
|
|
75
|
+
(newValue) => {
|
|
76
|
+
if (!newValue?.length) {
|
|
77
|
+
bodyItems.value = []
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
bodyItems.value = table.bodyItems(newValue, localization.value)
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
const { $store }: any = useNuxtApp()
|
|
85
|
+
|
|
86
|
+
const timeFormat = computed<UI_T_TimeValue>(
|
|
87
|
+
() => $store.getters['main/getTimeFormat']
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
watch([localization, timeFormat], () => {
|
|
91
|
+
bodyItems.value = table.bodyItems(props.dataTable, localization.value)
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
const onSorting = (data: [number, boolean]): void => {
|
|
95
|
+
const [column, status] = data
|
|
96
|
+
const direction = status ? 'desc' : 'asc'
|
|
97
|
+
|
|
98
|
+
const sort = `${column}.${direction}`
|
|
99
|
+
|
|
100
|
+
emits('sort', sort)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const onFiltering = (): void => {
|
|
104
|
+
console.log('onFiltering')
|
|
105
|
+
}
|
|
106
|
+
</script>
|
|
107
|
+
|
|
108
|
+
<style scoped lang="scss">
|
|
109
|
+
.packages-table {
|
|
110
|
+
height: inherit;
|
|
111
|
+
|
|
112
|
+
.data-table {
|
|
113
|
+
height: inherit;
|
|
114
|
+
|
|
115
|
+
:deep(.datagrid-outer-wrapper) {
|
|
116
|
+
height: inherit;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
</style>
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_ColumnKey,
|
|
3
|
+
UI_I_HeadItem,
|
|
4
|
+
UI_I_BodyItem,
|
|
5
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
6
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
+
import * as defaultSettings from '~/components/atoms/table/dataGrid/lib/config/settingsTable'
|
|
8
|
+
import { systemPackagesTableKeys } from '~/components/common/pages/packages/tableView/lib/config/tableKey'
|
|
9
|
+
|
|
10
|
+
const getItems = (
|
|
11
|
+
localization: UI_I_Localization
|
|
12
|
+
): [string, boolean, string, string][] => {
|
|
13
|
+
return [
|
|
14
|
+
[localization.common.name, true, '180px', systemPackagesTableKeys[0]],
|
|
15
|
+
[localization.common.version, true, '180px', systemPackagesTableKeys[1]],
|
|
16
|
+
[
|
|
17
|
+
localization.common.installedAt,
|
|
18
|
+
true,
|
|
19
|
+
'180px',
|
|
20
|
+
systemPackagesTableKeys[2],
|
|
21
|
+
],
|
|
22
|
+
[localization.common.startedAt, true, '180px', systemPackagesTableKeys[3]],
|
|
23
|
+
[localization.common.stoppedAt, true, '180px', systemPackagesTableKeys[4]],
|
|
24
|
+
[localization.common.status, true, '180px', systemPackagesTableKeys[5]],
|
|
25
|
+
[localization.common.required, true, '180px', systemPackagesTableKeys[6]],
|
|
26
|
+
[localization.common.enabled, true, '180px', systemPackagesTableKeys[7]],
|
|
27
|
+
[
|
|
28
|
+
localization.common.notRunnable,
|
|
29
|
+
true,
|
|
30
|
+
'180px',
|
|
31
|
+
systemPackagesTableKeys[8],
|
|
32
|
+
],
|
|
33
|
+
[localization.common.failCount, true, '180px', systemPackagesTableKeys[9]],
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const columnKeys = (
|
|
38
|
+
localization: UI_I_Localization
|
|
39
|
+
): UI_I_ColumnKey[] => {
|
|
40
|
+
return defaultSettings.defaultColumnKeys(getItems(localization))
|
|
41
|
+
}
|
|
42
|
+
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
43
|
+
return defaultSettings.defaultHeadItems(getItems(localization))
|
|
44
|
+
}
|
|
45
|
+
export const bodyItems = (
|
|
46
|
+
data: any[],
|
|
47
|
+
localization: UI_I_Localization
|
|
48
|
+
): UI_I_BodyItem[][] => {
|
|
49
|
+
const { $formattedDatetime }: any = useNuxtApp()
|
|
50
|
+
|
|
51
|
+
const bodyItems: UI_I_BodyItem[][] = []
|
|
52
|
+
data.forEach((item: any, key) => {
|
|
53
|
+
const installedAt = item[systemPackagesTableKeys[2]]
|
|
54
|
+
const formattedInstalledAt =
|
|
55
|
+
installedAt && $formattedDatetime(+installedAt * 1000, '', true)
|
|
56
|
+
|
|
57
|
+
const startedAt = item[systemPackagesTableKeys[3]]
|
|
58
|
+
const formattedStartedAt =
|
|
59
|
+
startedAt && $formattedDatetime(+startedAt * 1000, '', true)
|
|
60
|
+
|
|
61
|
+
const stoppedAt = item[systemPackagesTableKeys[4]]
|
|
62
|
+
const formattedStoppedAt =
|
|
63
|
+
stoppedAt && $formattedDatetime(+stoppedAt * 1000, '', true)
|
|
64
|
+
|
|
65
|
+
const onOffText = item[systemPackagesTableKeys[5]]
|
|
66
|
+
? localization.common.on3
|
|
67
|
+
: localization.common.off
|
|
68
|
+
|
|
69
|
+
const requiredText = item[systemPackagesTableKeys[6]]
|
|
70
|
+
? localization.common.yes
|
|
71
|
+
: localization.common.no
|
|
72
|
+
|
|
73
|
+
const enabledText = item[systemPackagesTableKeys[7]]
|
|
74
|
+
? localization.common.yes
|
|
75
|
+
: localization.common.no
|
|
76
|
+
|
|
77
|
+
const notRunnableText = item[systemPackagesTableKeys[8]]
|
|
78
|
+
? localization.common.yes
|
|
79
|
+
: localization.common.no
|
|
80
|
+
|
|
81
|
+
const failCount = item[systemPackagesTableKeys[9]] ?? 0
|
|
82
|
+
bodyItems.push([
|
|
83
|
+
{
|
|
84
|
+
key: 'col0',
|
|
85
|
+
text: item[systemPackagesTableKeys[0]],
|
|
86
|
+
id: key,
|
|
87
|
+
testId: `package-item-${key}`,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
key: 'col1',
|
|
91
|
+
text: item[systemPackagesTableKeys[1]],
|
|
92
|
+
id: key,
|
|
93
|
+
testId: `package-item-${key}`,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
key: 'col2',
|
|
97
|
+
text: formattedInstalledAt || '-',
|
|
98
|
+
id: key,
|
|
99
|
+
testId: `package-item-${key}`,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
key: 'col3',
|
|
103
|
+
text: formattedStartedAt || '-',
|
|
104
|
+
id: key,
|
|
105
|
+
testId: `package-item-${key}`,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
key: 'col4',
|
|
109
|
+
text: formattedStoppedAt || '-',
|
|
110
|
+
id: key,
|
|
111
|
+
testId: `package-item-${key}`,
|
|
112
|
+
},
|
|
113
|
+
{ key: 'col5', text: onOffText, id: key, testId: `package-item-${key}` },
|
|
114
|
+
{
|
|
115
|
+
key: 'col6',
|
|
116
|
+
text: requiredText,
|
|
117
|
+
id: key,
|
|
118
|
+
testId: `package-item-${key}`,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: 'col7',
|
|
122
|
+
text: enabledText,
|
|
123
|
+
id: key,
|
|
124
|
+
testId: `package-item-${key}`,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
key: 'col8',
|
|
128
|
+
text: notRunnableText,
|
|
129
|
+
id: key,
|
|
130
|
+
testId: `package-item-${key}`,
|
|
131
|
+
},
|
|
132
|
+
{ key: 'col9', text: failCount, id: key, testId: `package-item-${key}` },
|
|
133
|
+
])
|
|
134
|
+
})
|
|
135
|
+
return bodyItems
|
|
136
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { UI_T_SystemPackagesTableItemTuple } from '~/components/common/pages/packages/tableView/lib/models/types'
|
|
2
|
+
|
|
3
|
+
export const systemPackagesTableKeys: UI_T_SystemPackagesTableItemTuple = [
|
|
4
|
+
'name',
|
|
5
|
+
'version',
|
|
6
|
+
'installed_at',
|
|
7
|
+
'started_at',
|
|
8
|
+
'stopped_at',
|
|
9
|
+
'on',
|
|
10
|
+
'required',
|
|
11
|
+
'enabled',
|
|
12
|
+
'not_runnable',
|
|
13
|
+
'fail_count',
|
|
14
|
+
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="tasks">
|
|
2
|
+
<div class="tasks table-container-tasks-table">
|
|
3
3
|
<div class="tasks__headline">
|
|
4
4
|
{{ localization.mainNavigation.tasks }}
|
|
5
5
|
</div>
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
:loading="isLoading"
|
|
12
12
|
:project="props.project"
|
|
13
13
|
@pagination="onUpdatePagination"
|
|
14
|
+
@sort="onSortTable"
|
|
15
|
+
@col-search="onColSearching"
|
|
14
16
|
/>
|
|
15
17
|
</div>
|
|
16
18
|
</template>
|
|
@@ -23,6 +25,7 @@ import type {
|
|
|
23
25
|
} from '~/lib/models/table/interfaces'
|
|
24
26
|
import type { UI_I_Task } from '~/lib/models/store/tasks/interfaces'
|
|
25
27
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
28
|
+
import { useOnline } from '@vueuse/core'
|
|
26
29
|
|
|
27
30
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
31
|
const { $store }: any = useNuxtApp()
|
|
@@ -36,7 +39,7 @@ const pagination = ref<UI_I_Pagination>({
|
|
|
36
39
|
pageSize: 100,
|
|
37
40
|
})
|
|
38
41
|
const sort = ref<string | null>(null)
|
|
39
|
-
|
|
42
|
+
const filter = ref<string | null>(null)
|
|
40
43
|
const pauseGlobalRefresh = (): void => {
|
|
41
44
|
const tasksLastRequestType = $store.getters['tasks/getTasksLastRequestType']
|
|
42
45
|
$store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', tasksLastRequestType)
|
|
@@ -50,6 +53,7 @@ const getTasks = async (): Promise<void> => {
|
|
|
50
53
|
const payload: UI_I_DataTableQuery = {
|
|
51
54
|
...pagination.value,
|
|
52
55
|
sortBy: sort.value || '',
|
|
56
|
+
filter: filter.value || '',
|
|
53
57
|
}
|
|
54
58
|
await $store.dispatch('tasks/A_GET_TASKS', payload)
|
|
55
59
|
}
|
|
@@ -59,16 +63,26 @@ const onUpdatePagination = (event: UI_I_Pagination): void => {
|
|
|
59
63
|
pagination.value = event
|
|
60
64
|
getTasks()
|
|
61
65
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
const onSortTable = (event: string): void => {
|
|
67
|
+
sort.value = event
|
|
68
|
+
getTasks()
|
|
69
|
+
}
|
|
70
|
+
const onColSearching = (value: string): void => {
|
|
71
|
+
filter.value = value
|
|
72
|
+
getTasks()
|
|
73
|
+
}
|
|
67
74
|
|
|
68
75
|
const isLoading = computed<boolean>(() =>
|
|
69
76
|
$store.getters['tasks/getLoading']('tasks')
|
|
70
77
|
)
|
|
71
78
|
|
|
79
|
+
const isOnline = useOnline()
|
|
80
|
+
watch(isOnline, (newValue: boolean) => {
|
|
81
|
+
if (newValue) {
|
|
82
|
+
getTasks()
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
|
|
72
86
|
onUnmounted(() => {
|
|
73
87
|
pauseGlobalRefresh()
|
|
74
88
|
})
|
|
@@ -79,6 +93,7 @@ onUnmounted(() => {
|
|
|
79
93
|
display: flex; // TODO надо удалить потом (clr style)
|
|
80
94
|
flex-direction: column; // TODO надо удалить потом (clr style)
|
|
81
95
|
height: inherit;
|
|
96
|
+
background-color: var(--background-color);
|
|
82
97
|
padding: 10px 16px 30px;
|
|
83
98
|
&__headline {
|
|
84
99
|
font-family: Inter, sans-serif;
|
|
@@ -89,7 +104,7 @@ onUnmounted(() => {
|
|
|
89
104
|
margin-bottom: 22px;
|
|
90
105
|
}
|
|
91
106
|
:deep(.data-table-header) {
|
|
92
|
-
z-index:
|
|
107
|
+
z-index: 1000 !important; // TODO надо удалить потом (clr style)
|
|
93
108
|
}
|
|
94
109
|
}
|
|
95
110
|
</style>
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
:loading="props.loading"
|
|
7
7
|
:total-pages="props.totalPages"
|
|
8
8
|
:total-items="props.totalItems"
|
|
9
|
+
:texts="texts"
|
|
9
10
|
class="task-table"
|
|
10
|
-
@
|
|
11
|
+
@sort="onSorting"
|
|
11
12
|
@pagination="onPagination"
|
|
13
|
+
@column-filter="onColumnFilter"
|
|
12
14
|
>
|
|
13
15
|
<template #icon="{ item }">
|
|
14
16
|
<span class="flex-align-center">
|
|
@@ -39,6 +41,8 @@
|
|
|
39
41
|
v-if="item.data.error"
|
|
40
42
|
:id="item.data.testId"
|
|
41
43
|
:error="item.data.error"
|
|
44
|
+
:opened-error="openedError"
|
|
45
|
+
@toggle-error="onToggleError"
|
|
42
46
|
/>
|
|
43
47
|
</template>
|
|
44
48
|
|
|
@@ -46,26 +50,26 @@
|
|
|
46
50
|
<div class="actions">
|
|
47
51
|
<ui-button
|
|
48
52
|
variant="text"
|
|
49
|
-
:test-id="`
|
|
53
|
+
:test-id="`data-table-task-action-${item.data.id}`"
|
|
50
54
|
is-without-height
|
|
51
55
|
is-without-sizes
|
|
52
56
|
@click.stop="onToggleActions(item.data.id)"
|
|
53
57
|
>
|
|
54
58
|
<span
|
|
55
|
-
:class="['action-icon', { active:
|
|
59
|
+
:class="['action-icon', { active: actionsShowId === item.data.id }]"
|
|
56
60
|
>
|
|
57
61
|
<ui-icon name="vertical-dotes" width="20" height="20" />
|
|
58
62
|
</span>
|
|
59
63
|
</ui-button>
|
|
60
64
|
<ui-dropdown
|
|
61
|
-
:show="
|
|
62
|
-
:test-id="`
|
|
65
|
+
:show="actionsShowId === item.data.id"
|
|
66
|
+
:test-id="`data-table-task-dropdown-${item.data.id}`"
|
|
63
67
|
:items="actions"
|
|
64
|
-
:elem-id="`
|
|
68
|
+
:elem-id="`data-table-task-action-${item.data.id}`"
|
|
65
69
|
left
|
|
66
70
|
width="max-content"
|
|
67
|
-
@select="onSelectAction(item.data.target, $event
|
|
68
|
-
@hide="onHideActionsDropdown
|
|
71
|
+
@select="onSelectAction(item.data.target, $event)"
|
|
72
|
+
@hide="onHideActionsDropdown"
|
|
69
73
|
>
|
|
70
74
|
<template #row="{ item: dropMenu }">
|
|
71
75
|
<ui-icon
|
|
@@ -95,7 +99,9 @@ import type {
|
|
|
95
99
|
UI_I_DataTableHeader,
|
|
96
100
|
UI_I_DataTableBody,
|
|
97
101
|
UI_I_Pagination,
|
|
102
|
+
UI_I_TableTexts,
|
|
98
103
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
104
|
+
import type { UI_T_ArbitraryObject } from '~/node_modules/bfg-uikit/models/types'
|
|
99
105
|
import type { UI_T_Project, UI_T_ProcuratorTypeNodes } from '~/lib/models/types'
|
|
100
106
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
101
107
|
import type { UI_I_TaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
@@ -106,6 +112,7 @@ import {
|
|
|
106
112
|
getHeaderDataFunc,
|
|
107
113
|
getBodyDataFunc,
|
|
108
114
|
} from '~/components/common/pages/tasks/table/lib/config/config'
|
|
115
|
+
import { useDebounceFn } from '@vueuse/core'
|
|
109
116
|
|
|
110
117
|
const props = defineProps<{
|
|
111
118
|
project: UI_T_Project
|
|
@@ -117,12 +124,27 @@ const props = defineProps<{
|
|
|
117
124
|
const emits = defineEmits<{
|
|
118
125
|
(event: 'sort', value: string): void
|
|
119
126
|
(event: 'pagination', value: UI_I_Pagination): void
|
|
127
|
+
(event: 'col-search', value: string): void
|
|
120
128
|
}>()
|
|
121
129
|
|
|
122
130
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
123
131
|
const { $store }: any = useNuxtApp()
|
|
124
132
|
|
|
125
|
-
const
|
|
133
|
+
const texts = computed<UI_I_TableTexts>(() => ({
|
|
134
|
+
searchHere: localization.value.common.searchHere,
|
|
135
|
+
rowsPerPage: localization.value.common.rowsPerPage,
|
|
136
|
+
of: localization.value.common.of,
|
|
137
|
+
selected: localization.value.common.selected,
|
|
138
|
+
columns: localization.value.common.columns,
|
|
139
|
+
previous: localization.value.common.previous,
|
|
140
|
+
next: localization.value.common.next,
|
|
141
|
+
noItemsFound: localization.value.common.noItemsFound,
|
|
142
|
+
exportAll: localization.value.common.exportAll,
|
|
143
|
+
exportSelected: localization.value.common.exportSelected,
|
|
144
|
+
all: localization.value.common.all,
|
|
145
|
+
}))
|
|
146
|
+
|
|
147
|
+
const actionsShowId = ref<number>(-1)
|
|
126
148
|
|
|
127
149
|
const data = computed<UI_I_DataTable>(() => ({
|
|
128
150
|
id: 'tasks-table',
|
|
@@ -147,23 +169,52 @@ watch(
|
|
|
147
169
|
},
|
|
148
170
|
{ deep: true, immediate: true }
|
|
149
171
|
)
|
|
172
|
+
|
|
173
|
+
const openedError = ref<string>('')
|
|
174
|
+
|
|
175
|
+
const onToggleError = (value: string): void => {
|
|
176
|
+
if (!value || value === openedError.value) {
|
|
177
|
+
openedError.value = ''
|
|
178
|
+
} else {
|
|
179
|
+
openedError.value = value
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
150
183
|
const onSorting = (value: string): void => {
|
|
151
184
|
emits('sort', value)
|
|
152
185
|
}
|
|
153
186
|
const onPagination = (value: UI_I_Pagination): void => {
|
|
154
187
|
emits('pagination', value)
|
|
155
188
|
}
|
|
189
|
+
const sendFilter = useDebounceFn((searchText: string) => {
|
|
190
|
+
emits('col-search', searchText)
|
|
191
|
+
}, 1000)
|
|
192
|
+
const onColumnFilter = (obj: UI_T_ArbitraryObject<string>): void => {
|
|
193
|
+
let searchText = ''
|
|
194
|
+
|
|
195
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
196
|
+
const currentFilter = searchText
|
|
197
|
+
? ',' + key + '.' + value
|
|
198
|
+
: key + '.' + value
|
|
199
|
+
|
|
200
|
+
searchText = searchText + (value ? currentFilter : '')
|
|
201
|
+
}
|
|
202
|
+
sendFilter(searchText)
|
|
203
|
+
}
|
|
156
204
|
|
|
157
205
|
const actions = computed<UI_I_Dropdown[]>(() =>
|
|
158
206
|
getTargetActionsFunc(localization.value, props.project)
|
|
159
207
|
)
|
|
160
208
|
const onToggleActions = (id: number): void => {
|
|
161
|
-
|
|
209
|
+
if (actionsShowId.value === id) {
|
|
210
|
+
actionsShowId.value = -1
|
|
211
|
+
} else {
|
|
212
|
+
actionsShowId.value = id
|
|
213
|
+
}
|
|
162
214
|
}
|
|
163
215
|
const onSelectAction = (
|
|
164
216
|
data: UI_I_TableTarget<typeof props.project>,
|
|
165
|
-
action: 'view-target' | 'view-zone'
|
|
166
|
-
actionId: number
|
|
217
|
+
action: 'view-target' | 'view-zone'
|
|
167
218
|
): void => {
|
|
168
219
|
switch (action) {
|
|
169
220
|
case 'view-target':
|
|
@@ -173,10 +224,10 @@ const onSelectAction = (
|
|
|
173
224
|
onSelectNodeOfTree({ ...data, type: 'zone', nav: 'h' })
|
|
174
225
|
break
|
|
175
226
|
}
|
|
176
|
-
onHideActionsDropdown(
|
|
227
|
+
onHideActionsDropdown()
|
|
177
228
|
}
|
|
178
|
-
const onHideActionsDropdown = (
|
|
179
|
-
|
|
229
|
+
const onHideActionsDropdown = (): void => {
|
|
230
|
+
actionsShowId.value = -1
|
|
180
231
|
}
|
|
181
232
|
|
|
182
233
|
const onSelectNodeOfTree = (
|
|
@@ -228,7 +279,6 @@ const onSelectNodeOfTree = (
|
|
|
228
279
|
}
|
|
229
280
|
.chip-icon {
|
|
230
281
|
min-width: 14px;
|
|
231
|
-
margin-right: 6px;
|
|
232
282
|
}
|
|
233
283
|
.icon {
|
|
234
284
|
margin-right: 4px;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="error-info">
|
|
3
3
|
<ui-icon
|
|
4
|
-
:id="`
|
|
4
|
+
:id="`task-error-info-icon-${props.id}`"
|
|
5
5
|
name="info"
|
|
6
6
|
width="16px"
|
|
7
7
|
height="16px"
|
|
8
8
|
:class="['info-icon pointer', { show: isShowInfo }]"
|
|
9
|
-
@click.stop="
|
|
9
|
+
@click.stop="emits('toggle-error', props.id)"
|
|
10
10
|
/>
|
|
11
11
|
<ui-popup-window
|
|
12
12
|
v-model="isShowInfo"
|
|
13
|
-
width="232px"
|
|
13
|
+
max-width="232px"
|
|
14
|
+
min-width="232px"
|
|
14
15
|
top
|
|
15
16
|
left
|
|
16
|
-
:elem-id="`
|
|
17
|
+
:elem-id="`task-error-info-icon-${props.id}`"
|
|
17
18
|
>
|
|
18
19
|
<div class="common-widget-info">
|
|
19
20
|
<div class="headline justify-between flex-align-center">
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
class="pointer hide-icon"
|
|
27
28
|
width="16px"
|
|
28
29
|
height="16px"
|
|
29
|
-
@click.stop="
|
|
30
|
+
@click.stop="emits('toggle-error', '')"
|
|
30
31
|
/>
|
|
31
32
|
</div>
|
|
32
33
|
|
|
@@ -39,16 +40,28 @@
|
|
|
39
40
|
</template>
|
|
40
41
|
|
|
41
42
|
<script lang="ts" setup>
|
|
42
|
-
import type { UI_I_Localization } from '~/
|
|
43
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
43
44
|
|
|
44
45
|
const props = defineProps<{
|
|
45
46
|
id: string
|
|
46
47
|
error: string
|
|
48
|
+
openedError: string
|
|
47
49
|
}>()
|
|
48
50
|
|
|
49
51
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
50
52
|
|
|
51
|
-
const
|
|
53
|
+
const emits = defineEmits<{
|
|
54
|
+
(event: 'toggle-error', value: string): void
|
|
55
|
+
}>()
|
|
56
|
+
|
|
57
|
+
const isShowInfo = computed<boolean>({
|
|
58
|
+
get() {
|
|
59
|
+
return props.openedError === props.id
|
|
60
|
+
},
|
|
61
|
+
set() {
|
|
62
|
+
emits('toggle-error', '')
|
|
63
|
+
},
|
|
64
|
+
})
|
|
52
65
|
</script>
|
|
53
66
|
|
|
54
67
|
<style lang="scss" scoped>
|
|
@@ -58,13 +71,13 @@ const isShowInfo = ref<boolean>(false)
|
|
|
58
71
|
margin-left: 8px;
|
|
59
72
|
|
|
60
73
|
.info-icon {
|
|
61
|
-
color:
|
|
74
|
+
color: var(--form-icon-color);
|
|
62
75
|
|
|
63
76
|
&:hover {
|
|
64
|
-
color:
|
|
77
|
+
color: var(--close-icon);
|
|
65
78
|
}
|
|
66
79
|
&.show {
|
|
67
|
-
color:
|
|
80
|
+
color: var(--switch-bg-checked-reverse);
|
|
68
81
|
}
|
|
69
82
|
}
|
|
70
83
|
|
|
@@ -79,6 +92,10 @@ const isShowInfo = ref<boolean>(false)
|
|
|
79
92
|
margin-left: 8px;
|
|
80
93
|
}
|
|
81
94
|
|
|
95
|
+
.hide-icon {
|
|
96
|
+
color: var(--alert-icon);
|
|
97
|
+
}
|
|
98
|
+
|
|
82
99
|
.common-widget-info-description {
|
|
83
100
|
font-size: 13px;
|
|
84
101
|
line-height: 15.73px;
|