bfg-common 1.4.734 → 1.4.799

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 (84) hide show
  1. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  2. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  3. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  4. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  5. package/assets/localization/local_be.json +2 -16
  6. package/assets/localization/local_en.json +2 -16
  7. package/assets/localization/local_hy.json +2 -16
  8. package/assets/localization/local_kk.json +2 -16
  9. package/assets/localization/local_ru.json +2 -16
  10. package/assets/localization/local_zh.json +2 -16
  11. package/components/atoms/select/TheSelect.vue +1 -10
  12. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  13. package/components/common/browse/lib/models/interfaces.ts +5 -5
  14. package/components/common/{monitor/advanced/tools/chartOptionsModal → chartOptionsModal}/counters/timespan/form/Form.vue +544 -539
  15. package/components/common/{pages/hardwareHealth/historyTestimony/tools/chartOptionsModal → chartOptionsModal}/counters/timespan/form/lib/config/dateForm.ts +116 -115
  16. package/components/common/diagramMain/Header.vue +211 -211
  17. package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
  18. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  19. package/components/common/diagramMain/lib/models/types.ts +21 -21
  20. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  21. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +330 -330
  22. package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
  23. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +497 -497
  24. package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +812 -812
  25. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
  26. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
  27. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
  28. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
  29. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +398 -398
  30. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
  31. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +205 -205
  32. package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +23 -23
  33. package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
  34. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
  35. package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
  36. package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
  37. package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
  38. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
  39. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
  40. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
  41. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
  42. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
  43. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
  44. package/components/common/diagramMain/port/Ports.vue +47 -47
  45. package/components/common/monitor/advanced/Advanced.vue +5 -0
  46. package/components/common/monitor/advanced/tools/Tools.vue +9 -2
  47. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +9 -2
  48. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +2 -0
  49. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +95 -93
  50. package/components/common/monitor/overview/filters/Filters.vue +3 -0
  51. package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +15 -5
  52. package/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker.ts +24 -14
  53. package/components/common/pages/hardwareHealth/HardwareHealth.vue +12 -5
  54. package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +456 -451
  55. package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +387 -380
  56. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +13 -6
  57. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/Counters.vue +94 -94
  58. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/Timespan.vue +66 -66
  59. package/components/common/pages/tasks/Tasks.vue +0 -9
  60. package/components/common/pages/tasks/table/Table.vue +1 -0
  61. package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +6 -10
  62. package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +8 -8
  63. package/components/common/vm/actions/add/Add.vue +0 -2
  64. package/components/common/vm/actions/clone/Clone.vue +0 -2
  65. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +0 -3
  66. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +0 -2
  67. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +0 -2
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +1 -9
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +2 -5
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +1 -3
  71. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +4 -6
  72. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +10 -52
  73. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +5 -31
  74. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +5 -31
  75. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +2 -9
  76. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options.ts +4 -11
  77. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionNew.vue +1 -1
  78. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionOld.vue +1 -1
  79. package/components/common/vm/actions/editSettings/EditSettings.vue +0 -3
  80. package/components/common/vm/actions/editSettings/EditSettingsOld.vue +0 -2
  81. package/components/common/vm/actions/editSettings/new/New.vue +0 -2
  82. package/package.json +3 -3
  83. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/lib/config/dateForm.ts +0 -114
  84. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/form/Form.vue +0 -539
@@ -1,93 +1,95 @@
1
- <template>
2
- <div class="timespan-objects-section-direction">
3
- <common-monitor-advanced-tools-chart-options-modal-counters-timespan-form
4
- :language="props.language"
5
- :selected-chart-type="props.selectedChartType"
6
- :selected-timespan-type="props.selectedTimespanType"
7
- :units-count="props.unitsCount"
8
- :period-type="props.periodType"
9
- :selected-custom-time="props.selectedCustomTime"
10
- :custom-date-from="props.customDateFrom"
11
- :custom-date-to="props.customDateTo"
12
- :custom-time-from="props.customTimeFrom"
13
- :custom-time-to="props.customTimeTo"
14
- @update-chart-type="emits('update-chart-type', $event)"
15
- @update-custom-time="emits('update-custom-time', $event)"
16
- @update-timespan-type="emits('update-timespan-type', $event)"
17
- @update-unit-count="emits('update-unit-count', $event)"
18
- @update-period-type="emits('update-period-type', $event)"
19
- @update-custom-date-from="emits('update-custom-date-from', $event)"
20
- @update-custom-date-to="emits('update-custom-date-to', $event)"
21
- @update-custom-time-from="emits('update-custom-time-from', $event)"
22
- @update-custom-time-to="emits('update-custom-time-to', $event)"
23
- />
24
- <common-monitor-advanced-tools-chart-options-modal-counters-timespan-object
25
- :type="props.type"
26
- :chart="props.chart"
27
- :total-cores="props.totalCores"
28
- :host-id="props.hostId"
29
- :selected-metrics-keys="props.selectedMetricsKeys"
30
- :total-metric-items="props.totalMetricItems"
31
- :selected-objects="props.selectedObjects"
32
- :loading="props.objectsLoading"
33
- :current-items="props.objectsData"
34
- @select-objects="emits('select-objects', $event)"
35
- />
36
- </div>
37
- </template>
38
-
39
- <script setup lang="ts">
40
- import type { UI_T_AdvancedType } from '~/components/common/monitor/advanced/lib/models/types'
41
- import type {
42
- UI_T_ChartHost,
43
- UI_T_ChartVm,
44
- } from '~/components/common/monitor/advanced/tools/chartOptionsModal/lib/models/types'
45
- import type { UI_I_ObjectItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/models/interfaces'
46
-
47
- const props = defineProps<{
48
- type: UI_T_AdvancedType
49
- chart: UI_T_ChartHost | UI_T_ChartVm
50
- language: string
51
- selectedChartType: string
52
- selectedTimespanType: string
53
- unitsCount: number
54
- periodType: string
55
- selectedCustomTime: string
56
- customDateFrom: string
57
- customDateTo: string
58
- customTimeFrom: string
59
- customTimeTo: string
60
- totalCores: number
61
- hostId: string
62
- selectedMetricsKeys: number[]
63
- totalMetricItems: number
64
- selectedObjects: string
65
- objectsLoading: boolean
66
- objectsData: UI_I_ObjectItem[]
67
- }>()
68
-
69
- const emits = defineEmits<{
70
- (event: 'update-chart-type', value: string): void
71
- (event: 'update-custom-time', value: string): void
72
- (event: 'update-timespan-type', value: string): void
73
- (event: 'update-unit-count', value: number): void
74
- (event: 'update-period-type', value: string): void
75
- (event: 'update-custom-date-from', value: string): void
76
- (event: 'update-custom-date-to', value: string): void
77
- (event: 'update-custom-time-from', value: string): void
78
- (event: 'update-custom-time-to', value: string): void
79
- (event: 'select-objects', value: string): void
80
- }>()
81
- </script>
82
-
83
- <style scoped lang="scss">
84
- .timespan-objects-section-direction {
85
- display: flex;
86
- flex-direction: row;
87
- }
88
- @media (max-width: 1024px) {
89
- .timespan-objects-section-direction {
90
- flex-direction: column;
91
- }
92
- }
93
- </style>
1
+ <template>
2
+ <div class="timespan-objects-section-direction">
3
+ <common-chart-options-modal-counters-timespan-form
4
+ :language="props.language"
5
+ :selected-chart-type="props.selectedChartType"
6
+ :selected-timespan-type="props.selectedTimespanType"
7
+ :units-count="props.unitsCount"
8
+ :period-type="props.periodType"
9
+ :selected-custom-time="props.selectedCustomTime"
10
+ :custom-date-from="props.customDateFrom"
11
+ :custom-date-to="props.customDateTo"
12
+ :custom-time-from="props.customTimeFrom"
13
+ :custom-time-to="props.customTimeTo"
14
+ :valid-date-end="props.validDateEnd"
15
+ @update-chart-type="emits('update-chart-type', $event)"
16
+ @update-custom-time="emits('update-custom-time', $event)"
17
+ @update-timespan-type="emits('update-timespan-type', $event)"
18
+ @update-unit-count="emits('update-unit-count', $event)"
19
+ @update-period-type="emits('update-period-type', $event)"
20
+ @update-custom-date-from="emits('update-custom-date-from', $event)"
21
+ @update-custom-date-to="emits('update-custom-date-to', $event)"
22
+ @update-custom-time-from="emits('update-custom-time-from', $event)"
23
+ @update-custom-time-to="emits('update-custom-time-to', $event)"
24
+ />
25
+ <common-monitor-advanced-tools-chart-options-modal-counters-timespan-object
26
+ :type="props.type"
27
+ :chart="props.chart"
28
+ :total-cores="props.totalCores"
29
+ :host-id="props.hostId"
30
+ :selected-metrics-keys="props.selectedMetricsKeys"
31
+ :total-metric-items="props.totalMetricItems"
32
+ :selected-objects="props.selectedObjects"
33
+ :loading="props.objectsLoading"
34
+ :current-items="props.objectsData"
35
+ @select-objects="emits('select-objects', $event)"
36
+ />
37
+ </div>
38
+ </template>
39
+
40
+ <script setup lang="ts">
41
+ import type { UI_T_AdvancedType } from '~/components/common/monitor/advanced/lib/models/types'
42
+ import type {
43
+ UI_T_ChartHost,
44
+ UI_T_ChartVm,
45
+ } from '~/components/common/monitor/advanced/tools/chartOptionsModal/lib/models/types'
46
+ import type { UI_I_ObjectItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/models/interfaces'
47
+
48
+ const props = defineProps<{
49
+ type: UI_T_AdvancedType
50
+ chart: UI_T_ChartHost | UI_T_ChartVm
51
+ language: string
52
+ selectedChartType: string
53
+ selectedTimespanType: string
54
+ unitsCount: number
55
+ periodType: string
56
+ selectedCustomTime: string
57
+ customDateFrom: string
58
+ customDateTo: string
59
+ customTimeFrom: string
60
+ customTimeTo: string
61
+ totalCores: number
62
+ hostId: string
63
+ selectedMetricsKeys: number[]
64
+ totalMetricItems: number
65
+ selectedObjects: string
66
+ objectsLoading: boolean
67
+ objectsData: UI_I_ObjectItem[]
68
+ validDateEnd: number
69
+ }>()
70
+
71
+ const emits = defineEmits<{
72
+ (event: 'update-chart-type', value: string): void
73
+ (event: 'update-custom-time', value: string): void
74
+ (event: 'update-timespan-type', value: string): void
75
+ (event: 'update-unit-count', value: number): void
76
+ (event: 'update-period-type', value: string): void
77
+ (event: 'update-custom-date-from', value: string): void
78
+ (event: 'update-custom-date-to', value: string): void
79
+ (event: 'update-custom-time-from', value: string): void
80
+ (event: 'update-custom-time-to', value: string): void
81
+ (event: 'select-objects', value: string): void
82
+ }>()
83
+ </script>
84
+
85
+ <style scoped lang="scss">
86
+ .timespan-objects-section-direction {
87
+ display: flex;
88
+ flex-direction: row;
89
+ }
90
+ @media (max-width: 1024px) {
91
+ .timespan-objects-section-direction {
92
+ flex-direction: column;
93
+ }
94
+ }
95
+ </style>
@@ -51,10 +51,12 @@
51
51
  </div>
52
52
 
53
53
  <common-monitor-overview-filters-custom-interval-modal
54
+ v-if="props.validDateEnd"
54
55
  v-show="isShowIntervalModal"
55
56
  :selected-periods="props.selectedPeriods"
56
57
  :format-date="props.formatDate"
57
58
  :current-lang="props.currentLang"
59
+ :valid-date-end="props.validDateEnd"
58
60
  @hide="onHideIntervalModal"
59
61
  @submit="onSubmitIntervalModal"
60
62
  />
@@ -82,6 +84,7 @@ const props = defineProps<{
82
84
  selectedPeriods: number[]
83
85
  formatDate: string
84
86
  currentLang: string
87
+ validDateEnd: number
85
88
  formatTime?: string
86
89
  }>()
87
90
 
@@ -113,6 +113,7 @@ const props = defineProps<{
113
113
  formatDate: string
114
114
  selectedPeriods: number[]
115
115
  currentLang: string
116
+ validDateEnd: number
116
117
  }>()
117
118
 
118
119
  const emits = defineEmits<{
@@ -147,11 +148,10 @@ const currentTimeTo = ref<string>('')
147
148
  const getCurrentTime = (): void => {
148
149
  if (!props.selectedPeriods.length) {
149
150
  currentDateFrom.value = $formattedDate(yesterday, props.formatDate)
150
- currentDateTo.value = $formattedDate(new Date(), props.formatDate)
151
+ currentDateTo.value = $formattedDate(props.validDateEnd, props.formatDate)
151
152
 
152
- const currentTime = format(new Date(), 'H:mm:ss')
153
- currentTimeFrom.value = currentTime
154
- currentTimeTo.value = currentTime
153
+ currentTimeFrom.value = format(new Date(), 'H:mm:ss')
154
+ currentTimeTo.value = format(props.validDateEnd, 'H:mm:ss')
155
155
 
156
156
  return
157
157
  }
@@ -204,7 +204,9 @@ const onSubmit = (): void => {
204
204
  currentDateFrom.value,
205
205
  currentDateTo.value,
206
206
  currentTimeFrom.value,
207
- currentTimeTo.value
207
+ currentTimeTo.value,
208
+ props.validDateEnd,
209
+ props.formatDate
208
210
  )
209
211
 
210
212
  if (typeof result === 'string') {
@@ -217,6 +219,14 @@ const onSubmit = (): void => {
217
219
  onHide()
218
220
  }
219
221
 
222
+ watch(
223
+ () => [props.selectedPeriods, props.currentLang],
224
+ (): void => {
225
+ getCurrentTime()
226
+ },
227
+ { deep: true }
228
+ )
229
+
220
230
  onMounted(() => {
221
231
  selectedItem.value = location.hostname
222
232
  getCurrentTime()
@@ -1,16 +1,13 @@
1
1
  import type { UI_I_Localization } from '~/lib/models/interfaces'
2
2
 
3
3
  const isMoreThanOneMonth = (startDate: number, endDate: number): boolean => {
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
- )
4
+ const date1 = new Date(startDate)
5
+ const date2 = new Date(endDate)
6
+
7
+ const nextMonth = new Date(date1)
8
+ nextMonth.setMonth(date1.getMonth() + 1)
9
+
10
+ return nextMonth < date2
14
11
  }
15
12
 
16
13
  export const checkDateFunc = (
@@ -18,7 +15,9 @@ export const checkDateFunc = (
18
15
  dateFrom: string,
19
16
  dateTo: string,
20
17
  timeFrom: string,
21
- timeTo: string
18
+ timeTo: string,
19
+ unixValidEnd: number,
20
+ formatDate: string
22
21
  ): string | number[] => {
23
22
  const { $isDate, $getUnixByDate } = useNuxtApp()
24
23
 
@@ -38,9 +37,20 @@ export const checkDateFunc = (
38
37
  return result
39
38
  }
40
39
 
41
- if (unixEndDate > new Date().getTime())
42
- result = localization.inventoryMonitor.oneOfSelectedDatesIsInTheFuture
43
- else if (unixEndDate === unixStartDate)
40
+ if (unixEndDate > unixValidEnd) {
41
+ const { $formattedDatetime } = useNuxtApp()
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)
44
54
  result = localization.inventoryMonitor.timeToShouldBeLaterTimeFrom
45
55
  else if (unixEndDate - unixStartDate <= 3600000)
46
56
  result = localization.inventoryMonitor.timeRangeShouldNotBeSmallerThanHour
@@ -51,6 +51,8 @@
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"
54
56
  @update-tools="onUpdateHistoryTestimonyTools"
55
57
  />
56
58
 
@@ -76,12 +78,13 @@ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/model
76
78
  import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
77
79
  import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
78
80
  import { hardwareHealthTabsFunc } from '~/components/common/pages/hardwareHealth/lib/config/tabsPannel'
79
- import type {
80
- UI_I_HardwareHealthHistoryTestimonyTools
81
- } from "~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces";
81
+ import type { UI_I_HardwareHealthHistoryTestimonyTools } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
82
82
 
83
83
  const emits = defineEmits<{
84
- (event: 'update-history-testimony-tools', value: UI_I_HardwareHealthHistoryTestimonyTools): void
84
+ (
85
+ event: 'update-history-testimony-tools',
86
+ value: UI_I_HardwareHealthHistoryTestimonyTools
87
+ ): void
85
88
  }>()
86
89
  const props = defineProps<{
87
90
  data: UI_I_HardwareHealthSensors[]
@@ -94,6 +97,8 @@ const props = defineProps<{
94
97
  formattedDatetime: any
95
98
  getDateFormat: any
96
99
  language: string
100
+ validDateEnd: number
101
+ formatDate: string
97
102
  }>()
98
103
 
99
104
  const localization = computed<UI_I_Localization>(() => useLocal())
@@ -168,7 +173,9 @@ watch(activeTab, () => {
168
173
  uniqueKey.value++
169
174
  })
170
175
 
171
- const onUpdateHistoryTestimonyTools = (tools: UI_I_HardwareHealthHistoryTestimonyTools): void => {
176
+ const onUpdateHistoryTestimonyTools = (
177
+ tools: UI_I_HardwareHealthHistoryTestimonyTools
178
+ ): void => {
172
179
  emits('update-history-testimony-tools', tools)
173
180
  }
174
181