bfg-common 1.4.732 → 1.4.734
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-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/assets/localization/local_be.json +16 -2
- package/assets/localization/local_en.json +16 -2
- package/assets/localization/local_hy.json +16 -2
- package/assets/localization/local_kk.json +16 -2
- package/assets/localization/local_ru.json +16 -2
- package/assets/localization/local_zh.json +16 -2
- package/components/atoms/select/TheSelect.vue +10 -1
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- 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 +398 -398
- 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/monitor/advanced/Advanced.vue +0 -5
- package/components/common/monitor/advanced/tools/Tools.vue +2 -9
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +2 -9
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +0 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +93 -95
- package/components/common/{chartOptionsModal → monitor/advanced/tools/chartOptionsModal}/counters/timespan/form/Form.vue +539 -544
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/lib/config/dateForm.ts +114 -0
- package/components/common/monitor/overview/filters/Filters.vue +0 -3
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +5 -15
- package/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker.ts +14 -24
- package/components/common/pages/hardwareHealth/HardwareHealth.vue +5 -12
- package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +451 -456
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +380 -387
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +6 -13
- 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/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/form/Form.vue +539 -0
- package/components/common/{chartOptionsModal → pages/hardwareHealth/historyTestimony/tools/chartOptionsModal}/counters/timespan/form/lib/config/dateForm.ts +115 -116
- package/components/common/pages/tasks/Tasks.vue +9 -0
- package/components/common/pages/tasks/table/Table.vue +0 -1
- package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +10 -6
- package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +8 -8
- package/components/common/vm/actions/add/Add.vue +2 -0
- package/components/common/vm/actions/clone/Clone.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +3 -0
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +9 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +5 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +3 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +6 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +52 -10
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +31 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +31 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +9 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options.ts +11 -4
- 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/editSettings/EditSettings.vue +3 -0
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +2 -0
- package/components/common/vm/actions/editSettings/new/New.vue +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
3
|
+
import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
|
|
4
|
+
|
|
5
|
+
export const timespanFunc = (
|
|
6
|
+
localization: UI_I_Localization
|
|
7
|
+
): UI_I_OptionItem[] => [
|
|
8
|
+
{
|
|
9
|
+
text: localization.inventoryMonitor.realTime,
|
|
10
|
+
value: 'real_time',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
text: localization.inventoryMonitor.lastDay,
|
|
14
|
+
value: 'last_day',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
text: localization.inventoryMonitor.lastWeek,
|
|
18
|
+
value: 'last_week',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
text: localization.inventoryMonitor.lastMonth,
|
|
22
|
+
value: 'last_month',
|
|
23
|
+
},
|
|
24
|
+
// {
|
|
25
|
+
// text: localization.inventoryMonitor.lastYear,
|
|
26
|
+
// value: 'last_year',
|
|
27
|
+
// },
|
|
28
|
+
{
|
|
29
|
+
text: localization.inventoryMonitor.customInterval,
|
|
30
|
+
value: 'custom_interval',
|
|
31
|
+
},
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
export const customTimeFunc = (
|
|
35
|
+
localization: UI_I_Localization,
|
|
36
|
+
value: number,
|
|
37
|
+
lang: string
|
|
38
|
+
): UI_I_OptionItem[] => {
|
|
39
|
+
const isLangRu = lang === 'ru_RU'
|
|
40
|
+
|
|
41
|
+
const hourText = isLangRu
|
|
42
|
+
? getCorrectRuForm(value, 'hour')
|
|
43
|
+
: localization.common.hours2
|
|
44
|
+
const dayText = isLangRu
|
|
45
|
+
? getCorrectRuForm(value, 'day')
|
|
46
|
+
: localization.common.days2
|
|
47
|
+
const weekText = isLangRu
|
|
48
|
+
? getCorrectRuForm(value, 'week')
|
|
49
|
+
: localization.common.weeks2
|
|
50
|
+
const monthText = isLangRu
|
|
51
|
+
? getCorrectRuForm(value, 'month')
|
|
52
|
+
: localization.common.months2
|
|
53
|
+
|
|
54
|
+
return [
|
|
55
|
+
{
|
|
56
|
+
text: hourText,
|
|
57
|
+
value: 'hours',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
text: dayText,
|
|
61
|
+
value: 'days',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
text: weekText,
|
|
65
|
+
value: 'weeks',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
text: monthText,
|
|
69
|
+
value: 'months',
|
|
70
|
+
},
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const chartTypeFunc = (
|
|
75
|
+
localization: UI_I_Localization
|
|
76
|
+
): UI_I_OptionItem[] => [
|
|
77
|
+
{
|
|
78
|
+
text: localization.inventoryMonitor.lineGraph,
|
|
79
|
+
value: 'line_graph',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
text: localization.inventoryMonitor.stackedGraph,
|
|
83
|
+
value: 'stacked_graph',
|
|
84
|
+
},
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
const getCorrectRuForm = (value: number, type: string): string => {
|
|
88
|
+
// TODO поправить используя correctRuUnit из плагина date
|
|
89
|
+
const forms: UI_I_ArbitraryObject<string[]> = {
|
|
90
|
+
hour: ['Час', 'Часа', 'Часов'],
|
|
91
|
+
day: ['День', 'Дня', 'Дней'],
|
|
92
|
+
week: ['Неделя', 'Недели', 'Недель'],
|
|
93
|
+
month: ['Месяц', 'Месяца', 'Месяцев'],
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
let text: string
|
|
97
|
+
|
|
98
|
+
if (!value) {
|
|
99
|
+
return getCorrectRuForm[type]
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (value % 10 === 1 && value % 100 !== 11) {
|
|
103
|
+
text = forms[type][0]
|
|
104
|
+
} else if (
|
|
105
|
+
[2, 3, 4].includes(value % 10) &&
|
|
106
|
+
![12, 13, 14].includes(value % 100)
|
|
107
|
+
) {
|
|
108
|
+
text = forms[type][1]
|
|
109
|
+
} else {
|
|
110
|
+
text = forms[type][2]
|
|
111
|
+
}
|
|
112
|
+
getCorrectRuForm[type] = text
|
|
113
|
+
return text
|
|
114
|
+
}
|
|
@@ -51,12 +51,10 @@
|
|
|
51
51
|
</div>
|
|
52
52
|
|
|
53
53
|
<common-monitor-overview-filters-custom-interval-modal
|
|
54
|
-
v-if="props.validDateEnd"
|
|
55
54
|
v-show="isShowIntervalModal"
|
|
56
55
|
:selected-periods="props.selectedPeriods"
|
|
57
56
|
:format-date="props.formatDate"
|
|
58
57
|
:current-lang="props.currentLang"
|
|
59
|
-
:valid-date-end="props.validDateEnd"
|
|
60
58
|
@hide="onHideIntervalModal"
|
|
61
59
|
@submit="onSubmitIntervalModal"
|
|
62
60
|
/>
|
|
@@ -84,7 +82,6 @@ const props = defineProps<{
|
|
|
84
82
|
selectedPeriods: number[]
|
|
85
83
|
formatDate: string
|
|
86
84
|
currentLang: string
|
|
87
|
-
validDateEnd: number
|
|
88
85
|
formatTime?: string
|
|
89
86
|
}>()
|
|
90
87
|
|
package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue
CHANGED
|
@@ -113,7 +113,6 @@ const props = defineProps<{
|
|
|
113
113
|
formatDate: string
|
|
114
114
|
selectedPeriods: number[]
|
|
115
115
|
currentLang: string
|
|
116
|
-
validDateEnd: number
|
|
117
116
|
}>()
|
|
118
117
|
|
|
119
118
|
const emits = defineEmits<{
|
|
@@ -148,10 +147,11 @@ const currentTimeTo = ref<string>('')
|
|
|
148
147
|
const getCurrentTime = (): void => {
|
|
149
148
|
if (!props.selectedPeriods.length) {
|
|
150
149
|
currentDateFrom.value = $formattedDate(yesterday, props.formatDate)
|
|
151
|
-
currentDateTo.value = $formattedDate(
|
|
150
|
+
currentDateTo.value = $formattedDate(new Date(), props.formatDate)
|
|
152
151
|
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
const currentTime = format(new Date(), 'H:mm:ss')
|
|
153
|
+
currentTimeFrom.value = currentTime
|
|
154
|
+
currentTimeTo.value = currentTime
|
|
155
155
|
|
|
156
156
|
return
|
|
157
157
|
}
|
|
@@ -204,9 +204,7 @@ const onSubmit = (): void => {
|
|
|
204
204
|
currentDateFrom.value,
|
|
205
205
|
currentDateTo.value,
|
|
206
206
|
currentTimeFrom.value,
|
|
207
|
-
currentTimeTo.value
|
|
208
|
-
props.validDateEnd,
|
|
209
|
-
props.formatDate
|
|
207
|
+
currentTimeTo.value
|
|
210
208
|
)
|
|
211
209
|
|
|
212
210
|
if (typeof result === 'string') {
|
|
@@ -219,14 +217,6 @@ const onSubmit = (): void => {
|
|
|
219
217
|
onHide()
|
|
220
218
|
}
|
|
221
219
|
|
|
222
|
-
watch(
|
|
223
|
-
() => [props.selectedPeriods, props.currentLang],
|
|
224
|
-
(): void => {
|
|
225
|
-
getCurrentTime()
|
|
226
|
-
},
|
|
227
|
-
{ deep: true }
|
|
228
|
-
)
|
|
229
|
-
|
|
230
220
|
onMounted(() => {
|
|
231
221
|
selectedItem.value = location.hostname
|
|
232
222
|
getCurrentTime()
|
package/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
2
|
|
|
3
3
|
const isMoreThanOneMonth = (startDate: number, endDate: number): boolean => {
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const start = new Date(startDate)
|
|
5
|
+
const end = new Date(endDate)
|
|
6
|
+
const yearDiff = end.getFullYear() - start.getFullYear()
|
|
7
|
+
const monthDiff = end.getMonth() - start.getMonth()
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
yearDiff > 0 ||
|
|
11
|
+
(yearDiff === 0 && monthDiff > 1) ||
|
|
12
|
+
(yearDiff === 0 && monthDiff === 1 && end.getDate() >= start.getDate())
|
|
13
|
+
)
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
export const checkDateFunc = (
|
|
@@ -15,9 +18,7 @@ export const checkDateFunc = (
|
|
|
15
18
|
dateFrom: string,
|
|
16
19
|
dateTo: string,
|
|
17
20
|
timeFrom: string,
|
|
18
|
-
timeTo: string
|
|
19
|
-
unixValidEnd: number,
|
|
20
|
-
formatDate: string
|
|
21
|
+
timeTo: string
|
|
21
22
|
): string | number[] => {
|
|
22
23
|
const { $isDate, $getUnixByDate } = useNuxtApp()
|
|
23
24
|
|
|
@@ -37,20 +38,9 @@ export const checkDateFunc = (
|
|
|
37
38
|
return result
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
if (unixEndDate >
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const currentShowValidEnd = $formattedDatetime(
|
|
44
|
-
new Date(unixValidEnd),
|
|
45
|
-
formatDate,
|
|
46
|
-
true
|
|
47
|
-
)
|
|
48
|
-
result =
|
|
49
|
-
localization.inventoryMonitor.timeRangeShouldNotBeMoreThanValidTo.replace(
|
|
50
|
-
'{0}',
|
|
51
|
-
currentShowValidEnd
|
|
52
|
-
)
|
|
53
|
-
} else if (unixEndDate === unixStartDate)
|
|
41
|
+
if (unixEndDate > new Date().getTime())
|
|
42
|
+
result = localization.inventoryMonitor.oneOfSelectedDatesIsInTheFuture
|
|
43
|
+
else if (unixEndDate === unixStartDate)
|
|
54
44
|
result = localization.inventoryMonitor.timeToShouldBeLaterTimeFrom
|
|
55
45
|
else if (unixEndDate - unixStartDate <= 3600000)
|
|
56
46
|
result = localization.inventoryMonitor.timeRangeShouldNotBeSmallerThanHour
|
|
@@ -51,8 +51,6 @@
|
|
|
51
51
|
:is-dark-mode="props.isDarkMode"
|
|
52
52
|
:get-date-format="props.getDateFormat"
|
|
53
53
|
:main-selected-row="selectedRow"
|
|
54
|
-
:valid-date-end="props.validDateEnd"
|
|
55
|
-
:format-date="props.formatDate"
|
|
56
54
|
@update-tools="onUpdateHistoryTestimonyTools"
|
|
57
55
|
/>
|
|
58
56
|
|
|
@@ -78,13 +76,12 @@ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/model
|
|
|
78
76
|
import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
|
|
79
77
|
import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
|
|
80
78
|
import { hardwareHealthTabsFunc } from '~/components/common/pages/hardwareHealth/lib/config/tabsPannel'
|
|
81
|
-
import type {
|
|
79
|
+
import type {
|
|
80
|
+
UI_I_HardwareHealthHistoryTestimonyTools
|
|
81
|
+
} from "~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces";
|
|
82
82
|
|
|
83
83
|
const emits = defineEmits<{
|
|
84
|
-
(
|
|
85
|
-
event: 'update-history-testimony-tools',
|
|
86
|
-
value: UI_I_HardwareHealthHistoryTestimonyTools
|
|
87
|
-
): void
|
|
84
|
+
(event: 'update-history-testimony-tools', value: UI_I_HardwareHealthHistoryTestimonyTools): void
|
|
88
85
|
}>()
|
|
89
86
|
const props = defineProps<{
|
|
90
87
|
data: UI_I_HardwareHealthSensors[]
|
|
@@ -97,8 +94,6 @@ const props = defineProps<{
|
|
|
97
94
|
formattedDatetime: any
|
|
98
95
|
getDateFormat: any
|
|
99
96
|
language: string
|
|
100
|
-
validDateEnd: number
|
|
101
|
-
formatDate: string
|
|
102
97
|
}>()
|
|
103
98
|
|
|
104
99
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -173,9 +168,7 @@ watch(activeTab, () => {
|
|
|
173
168
|
uniqueKey.value++
|
|
174
169
|
})
|
|
175
170
|
|
|
176
|
-
const onUpdateHistoryTestimonyTools = (
|
|
177
|
-
tools: UI_I_HardwareHealthHistoryTestimonyTools
|
|
178
|
-
): void => {
|
|
171
|
+
const onUpdateHistoryTestimonyTools = (tools: UI_I_HardwareHealthHistoryTestimonyTools): void => {
|
|
179
172
|
emits('update-history-testimony-tools', tools)
|
|
180
173
|
}
|
|
181
174
|
|