bfg-common 1.4.838 → 1.4.839

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 (76) 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 +5 -16
  6. package/assets/localization/local_en.json +7 -19
  7. package/assets/localization/local_hy.json +5 -16
  8. package/assets/localization/local_kk.json +5 -16
  9. package/assets/localization/local_ru.json +6 -17
  10. package/assets/localization/local_zh.json +5 -16
  11. package/components/atoms/collapse/CollapseNav.vue +4 -4
  12. package/components/atoms/dropdown/dropdown/Dropdown.vue +0 -12
  13. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +2 -2
  14. package/components/atoms/table/dataGrid/lib/utils/export.ts +1 -1
  15. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  16. package/components/common/browse/lib/models/interfaces.ts +5 -5
  17. package/components/common/diagramMain/Header.vue +211 -211
  18. package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
  19. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  20. package/components/common/diagramMain/lib/models/types.ts +21 -21
  21. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  22. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +330 -330
  23. package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
  24. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +497 -497
  25. package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +812 -812
  26. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
  27. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
  28. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
  29. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
  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/graph/GraphNew.vue +176 -144
  46. package/components/common/modals/confirmByInput/ConfirmByInput.vue +177 -57
  47. package/components/common/monitor/advanced/Advanced.vue +170 -244
  48. package/components/common/monitor/advanced/AdvancedNew.vue +206 -0
  49. package/components/common/monitor/advanced/AdvancedOld.vue +243 -0
  50. package/components/common/monitor/advanced/{GraphView.vue → graphView/GraphView.vue} +170 -180
  51. package/components/common/monitor/advanced/graphView/GraphViewNew.vue +35 -0
  52. package/components/common/monitor/advanced/graphView/GraphViewOld.vue +56 -0
  53. package/components/common/monitor/advanced/table/Table.vue +31 -93
  54. package/components/common/monitor/advanced/table/tableNew/TableNew.vue +85 -0
  55. package/components/common/monitor/advanced/table/tableNew/lib/config/options.ts +139 -0
  56. package/components/common/monitor/advanced/table/tableNew/lib/utils/constructBody.ts +27 -0
  57. package/components/common/monitor/advanced/table/tableOld/TableOld.vue +93 -0
  58. package/components/common/monitor/advanced/tools/Tools.vue +163 -447
  59. package/components/common/monitor/advanced/tools/ToolsNew.vue +366 -0
  60. package/components/common/monitor/advanced/tools/ToolsOld.vue +447 -0
  61. package/components/common/pages/tasks/Tasks.vue +1 -3
  62. package/components/common/pages/tasks/table/Table.vue +0 -1
  63. package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +7 -23
  64. package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +0 -1
  65. package/components/common/pages/tasks/table/lib/config/config.ts +2 -2
  66. package/components/common/portlets/customAttributes/Portlet.vue +2 -9
  67. package/components/common/portlets/customAttributes/lib/config/config.ts +0 -7
  68. package/components/common/portlets/tag/Portlet.vue +2 -9
  69. package/components/common/portlets/tag/lib/config/config.ts +0 -7
  70. package/components/common/tools/Actions.vue +2 -5
  71. package/lib/config/uiTable.ts +20 -0
  72. package/lib/models/store/interfaces.ts +0 -1
  73. package/package.json +3 -3
  74. package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +0 -103
  75. package/components/common/modals/confirmByInput/ConfirmByInputOld.vue +0 -204
  76. /package/components/common/monitor/advanced/table/{lib → tableOld/lib}/config/performanceDatatable.ts +0 -0
@@ -1,447 +1,163 @@
1
- <template>
2
- <div class="horizontal-flex-container overview-chart-title-bar">
3
- <div class="chart-title-content">
4
- <client-only>
5
- <span v-if="props.chartTitle" class="chart-title"
6
- >{{ props.chartTitle }},</span
7
- >
8
- <span v-if="chartTitleDate" class="chart-title uppercase">{{
9
- chartTitleDate
10
- }}</span>
11
- </client-only>
12
- </div>
13
- <div class="horizontal-flex-container">
14
- <label for="periodSelect" class="label-select"
15
- >{{ localization.inventoryMonitor.period }}:</label
16
- >
17
- <div class="select">
18
- <select
19
- id="periodSelect"
20
- v-model="selectedPeriod"
21
- data-id="period-select"
22
- :disabled="props.disabledPeriod"
23
- @change="onChangePeriod"
24
- >
25
- <option
26
- v-for="(item, index) in periodOptions"
27
- :key="index"
28
- :value="item.value"
29
- >
30
- {{ item.text }}
31
- </option>
32
- </select>
33
- </div>
34
- <a
35
- id="chart-options-button"
36
- class="chart-options-button"
37
- data-id="show-chart-options-button"
38
- @click="onShowChartOptions"
39
- >{{ localization.inventoryMonitor.chartOptions }}</a
40
- >
41
- </div>
42
- <div class="view-select-label horizontal-flex-container">
43
- <label for="viewSelect" class="label-select"
44
- >{{ localization.common.view }}:</label
45
- >
46
- <div class="select">
47
- <select
48
- id="viewSelect"
49
- v-model="selectedView"
50
- data-id="view-select"
51
- :disabled="props.disabledView"
52
- @change="onChangeView"
53
- >
54
- <option
55
- v-for="(item, index) in viewOptions"
56
- :key="index"
57
- :value="item.value"
58
- >
59
- {{ item.text }}
60
- </option>
61
- </select>
62
- </div>
63
- </div>
64
- <div class="chart-action-bar vui-action-bar">
65
- <ul>
66
- <li class="menu-item">
67
- <a
68
- id="advanced-page-link"
69
- data-id="advanced-page-button"
70
- class="item-link"
71
- @click="onOpenAdvancedPage"
72
- >
73
- <span class="vx-icon-window-popout icon"></span>
74
- </a>
75
- </li>
76
- <li class="menu-item">
77
- <atoms-dropdown :drop-menu="exportMenu" @select="onExportMenuItem">
78
- <template #icon>
79
- <a
80
- id="export-link"
81
- data-id="export-link"
82
- href="#"
83
- class="item-link"
84
- >
85
- <span class="vx-icon-export icon"></span>
86
- </a>
87
- </template>
88
- </atoms-dropdown>
89
- </li>
90
- </ul>
91
- </div>
92
- </div>
93
-
94
- <common-monitor-advanced-tools-chart-options-modal
95
- v-if="isShowModal"
96
- :type="props.type"
97
- :language="props.language"
98
- :selected-counters-keys="props.selectedCountersKeys"
99
- :selected-metric="props.selectedMetric"
100
- :selected-metric-local="props.selectedMetricLocal"
101
- :selected-chart-type="props.selectedChartType"
102
- :selected-timespan-type="props.selectedTimespanType"
103
- :units-count="props.unitsCount"
104
- :period-type="props.periodType"
105
- :selected-custom-time="props.selectedCustomTime"
106
- :selected-chart-option-name="props.selectedChartOptionName"
107
- :custom-date-from="props.customDateFrom"
108
- :custom-date-to="props.customDateTo"
109
- :custom-time-from="props.customTimeFrom"
110
- :custom-time-to="props.customTimeTo"
111
- :total-cores="props.totalCores"
112
- :host-id="props.hostId"
113
- :selected-objects="props.selectedObjects"
114
- :project="props.project"
115
- :objects-loading="props.objectsLoading"
116
- :objects-data="props.objectsData"
117
- :valid-date-end="props.validDateEnd"
118
- :format-date="props.formatDate"
119
- @hide="isShowModal = false"
120
- @select-row="emits('select-row', $event)"
121
- @select-metric-local="emits('select-metric-local', $event)"
122
- @update-chart-type="emits('update-chart-type', $event)"
123
- @update-timespan-type="emits('update-timespan-type', $event)"
124
- @update-unit-count="emits('update-unit-count', $event)"
125
- @update-period-type="emits('update-period-type', $event)"
126
- @update-custom-time="emits('update-custom-time', $event)"
127
- @delete-option="onDeleteOption"
128
- @save-option-name="onSaveOptionName"
129
- @submit-options="emits('submit-options', $event)"
130
- />
131
- </template>
132
-
133
- <script setup lang="ts">
134
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
135
- import type { UI_I_Localization } from '~/lib/models/interfaces'
136
- import type { UI_I_MonitorGraphPayload } from '~/components/common/monitor/lib/models/interfaces'
137
- import type { UI_I_DropMenu } from '~/components/common/monitor/advanced/tools/lib/models/interfaces'
138
- import type { UI_T_AdvancedType } from '~/components/common/monitor/advanced/lib/models/types'
139
- import type {
140
- UI_T_ChartHost,
141
- UI_T_ChartVm,
142
- } from '~/components/common/monitor/advanced/tools/chartOptionsModal/lib/models/types'
143
- import type { UI_I_OptionsForm } from '~/components/common/monitor/advanced/tools/chartOptionsModal/lib/models/interfaces'
144
- import type { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/models/interfaces'
145
- import type { UI_I_ObjectItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/models/interfaces'
146
- import type { UI_T_Project } from '~/lib/models/types'
147
- import { getValidDateByOptionFunc } from '~/components/common/monitor/lib/config/getValidDateByOption'
148
- import {
149
- periodFunc,
150
- viewFunc,
151
- exportFunc,
152
- getCurrentOptionsStorageFunc,
153
- } from '~/components/common/monitor/advanced/tools/lib/config/advancedToolbar'
154
- import { checkDateFunc } from '~/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker'
155
-
156
- const props = defineProps<{
157
- type: UI_T_AdvancedType
158
- startDate: number
159
- endDate: number
160
- chartTitle: string
161
- language: string
162
- selectedCountersKeys: number[]
163
- selectedMetric: UI_T_ChartHost | UI_T_ChartVm
164
- selectedMetricLocal: UI_T_ChartHost | UI_T_ChartVm
165
- selectedChartType: string
166
- selectedTimespanType: string
167
- unitsCount: number
168
- periodType: string
169
- selectedCustomTime: string
170
- selectedChartOptionName: string
171
- customDateFrom: string
172
- customDateTo: string
173
- customTimeFrom: string
174
- customTimeTo: string
175
- totalCores: number
176
- hostId: string
177
- selectedObjects: string
178
- project: UI_T_Project
179
- objectsLoading: boolean
180
- objectsData: UI_I_ObjectItem[]
181
- validDateEnd: number
182
- formatDate: string
183
- disabledPeriod?: boolean
184
- disabledView?: boolean
185
- }>()
186
-
187
- const emits = defineEmits<{
188
- (event: 'update-tools', value: UI_I_MonitorGraphPayload): void
189
- (event: 'exporting', value: string): void
190
- (event: 'open-advanced-page'): void
191
- (event: 'select-row', value: UI_I_AdvancedCounterItem[]): void
192
- (event: 'select-metric-local', value: string): void
193
- (event: 'update-chart-type', value: string): void
194
- (event: 'update-timespan-type', value: string): void
195
- (event: 'update-unit-count', value: number): void
196
- (event: 'update-period-type', value: string): void
197
- (event: 'update-custom-time', value: string): void
198
- (event: 'delete-option'): void
199
- (event: 'submit-options', value: UI_I_OptionsForm): void
200
- (event: 'update:selected-timespan-type', value: string): void
201
- }>()
202
-
203
- const routeType = '' + useRoute().params.type
204
-
205
- const localization = computed<UI_I_Localization>(() => useLocal())
206
- const { $formattedDatetime } = useNuxtApp()
207
-
208
- const selectedView = ref<string>('')
209
- const optionsNames = ref<string[]>([])
210
- const viewOptions = computed<UI_I_OptionItem[]>(() =>
211
- viewFunc(localization.value, props.type, optionsNames.value)
212
- )
213
-
214
- watch(
215
- () => props.selectedChartOptionName,
216
- (newValue) => {
217
- let currentValue = ''
218
-
219
- if (newValue) currentValue = newValue
220
- else if (
221
- selectedView.value &&
222
- optionsNames.value.includes(selectedView.value)
223
- )
224
- currentValue = selectedView.value
225
- else currentValue = selectedView.value || viewOptions.value[0]?.value
226
-
227
- selectedView.value = currentValue
228
- },
229
- { immediate: true }
230
- )
231
-
232
- const onDeleteOption = (): void => {
233
- emits('delete-option')
234
- optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
235
- }
236
-
237
- const periodOptions = computed<UI_I_OptionItem[]>(() =>
238
- periodFunc(localization.value, props.selectedTimespanType)
239
- )
240
- const selectedPeriod = computed<string>({
241
- get() {
242
- return props.selectedTimespanType || periodOptions.value[0].value
243
- },
244
- set(newValue) {
245
- emits('update:selected-timespan-type', newValue)
246
- },
247
- })
248
-
249
- const isShowModal = ref<boolean>(false)
250
- watch(isShowModal, (newValue) => {
251
- if (!newValue && !selectedView.value)
252
- selectedView.value = viewOptions.value[0].value
253
- })
254
-
255
- const updateTools = (): void => {
256
- const periodValue = selectedPeriod.value
257
- const viewValue = selectedView.value
258
- const prefix = props.project === 'sphere'
259
- const selectedValue = useLocalStorage(
260
- viewValue + 'ChartOptions',
261
- undefined,
262
- prefix
263
- )
264
-
265
- const fields = selectedValue
266
- ? selectedValue.counters.map((item) => item.name).join(', ')
267
- : ''
268
- const validPeriodData = getValidDateByOptionFunc(
269
- periodValue,
270
- selectedValue,
271
- props.unitsCount,
272
- props.selectedCustomTime
273
- )
274
-
275
- const period = [
276
- Math.round(validPeriodData[0] / 1000),
277
- Math.round(validPeriodData[1] / 1000),
278
- ]
279
-
280
- if (periodValue === 'custom_interval' && props.periodType === 'period') {
281
- const checkDateResult = checkDateFunc(
282
- localization.value,
283
- props.customDateFrom,
284
- props.customDateTo,
285
- props.customTimeFrom,
286
- props.customTimeTo,
287
- props.validDateEnd,
288
- props.formatDate
289
- )
290
- if (Array.isArray(checkDateResult)) {
291
- period[0] = Math.round(checkDateResult[0] / 1000)
292
- period[1] = Math.round(checkDateResult[1] / 1000)
293
- }
294
- }
295
-
296
- const tools: UI_I_MonitorGraphPayload = {
297
- fields,
298
- period,
299
- periodType: periodValue,
300
- view: viewValue,
301
- }
302
- if (selectedValue.metric) tools.metricType = selectedValue.metric
303
-
304
- emits('update-timespan-type', selectedPeriod.value)
305
- emits('update-tools', tools)
306
- }
307
-
308
- const onChangePeriod = (): void => {
309
- updateTools()
310
- }
311
-
312
- const onChangeView = (): void => {
313
- updateTools()
314
- }
315
-
316
- const chartTitleDate = computed<string>(() => {
317
- if (!props.startDate) return ''
318
-
319
- const start = $formattedDatetime(props.startDate, '', true)
320
- const end = $formattedDatetime(props.endDate, '', true)
321
- return `${start} - ${end}`
322
- })
323
-
324
- const onOpenAdvancedPage = (): void => emits('open-advanced-page')
325
-
326
- const exportMenu = ref<UI_I_DropMenu<string>[]>(exportFunc(localization.value))
327
-
328
- const onExportMenuItem = (item: UI_I_DropMenu<any>): void =>
329
- emits('exporting', item.action)
330
-
331
- const onShowChartOptions = (): void => {
332
- isShowModal.value = true
333
- }
334
-
335
- const onSaveOptionName = (): void => {
336
- optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
337
- }
338
-
339
- onMounted(() => {
340
- optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
341
- updateTools()
342
- })
343
- </script>
344
-
345
- <style scoped lang="scss">
346
- .horizontal-flex-container {
347
- display: flex;
348
- flex-direction: row;
349
- align-items: center;
350
- line-height: 20px;
351
- flex-shrink: 0;
352
-
353
- .chart-title-content {
354
- overflow: hidden;
355
- text-overflow: ellipsis;
356
- }
357
-
358
- .select select {
359
- height: 20px;
360
- margin: 5px;
361
- color: var(--global-font-color);
362
- }
363
- .single-option {
364
- margin-left: 5px;
365
- }
366
-
367
- .chart-title {
368
- color: var(--global-font-color);
369
- text-overflow: ellipsis;
370
- white-space: nowrap;
371
- overflow: hidden;
372
- margin: 6px;
373
- font-weight: 700;
374
- text-transform: capitalize;
375
-
376
- &.uppercase {
377
- text-transform: uppercase;
378
- }
379
- }
380
-
381
- .view-select-label {
382
- margin-left: auto;
383
- padding-right: 7px;
384
- padding-left: 7px;
385
- text-overflow: ellipsis;
386
- white-space: nowrap;
387
- align-items: center;
388
- }
389
-
390
- .chart-options-button {
391
- margin-left: 5px;
392
- text-overflow: ellipsis;
393
- white-space: nowrap;
394
- text-transform: capitalize;
395
- color: var(--dropdown-item-color);
396
- cursor: pointer;
397
- }
398
-
399
- .chart-action-bar {
400
- white-space: nowrap;
401
-
402
- .menu-item {
403
- padding-right: 4px;
404
- display: inline-block;
405
- list-style: none;
406
- vertical-align: middle;
407
-
408
- &:last-child {
409
- padding-right: 0;
410
- }
411
-
412
- .item-link {
413
- padding: 4px;
414
- line-height: 22px;
415
- border: 1px solid transparent;
416
- display: inline-block;
417
-
418
- &:hover {
419
- text-decoration: none;
420
- background-color: #e9f6fd;
421
- border: 1px solid #c7e9ff;
422
- }
423
-
424
- .icon {
425
- width: 16px;
426
- height: 16px;
427
- display: block;
428
- min-width: 16px;
429
- min-height: 16px;
430
- background-size: 100% auto;
431
- }
432
- }
433
-
434
- :deep(.dropdown-menu) {
435
- min-width: auto;
436
- padding: 0;
437
- }
438
- :deep(.user-menu-large) {
439
- padding: 0;
440
- }
441
- :deep(.angle-icon) {
442
- display: none;
443
- }
444
- }
445
- }
446
- }
447
- </style>
1
+ <template>
2
+ <common-monitor-advanced-tools-new
3
+ v-if="isNewView"
4
+ v-model:selected-timespan-type="localSelectedTimespanType"
5
+ :type="props.type"
6
+ :start-date="props.startDate"
7
+ :end-date="props.endDate"
8
+ :chart-title="props.chartTitle"
9
+ :language="props.language"
10
+ :selected-counters-keys="props.selectedCountersKeys"
11
+ :selected-metric="props.selectedMetric"
12
+ :selected-metric-local="props.selectedMetricLocal"
13
+ :disabled-period="props.disabledPeriod"
14
+ :disabled-view="props.disabledView"
15
+ :selected-chart-type="props.selectedChartType"
16
+ :units-count="props.unitsCount"
17
+ :period-type="props.periodType"
18
+ :selected-custom-time="props.selectedCustomTime"
19
+ :selected-chart-option-name="props.selectedChartOptionName"
20
+ :custom-date-from="props.customDateFrom"
21
+ :custom-date-to="props.customDateTo"
22
+ :custom-time-from="props.customTimeFrom"
23
+ :custom-time-to="props.customTimeTo"
24
+ :total-cores="totalCores"
25
+ :host-id="props.hostId"
26
+ :selected-objects="props.selectedObjects"
27
+ :project="props.project"
28
+ :objects-loading="props.objectsLoading"
29
+ :objects-data="props.objectsData"
30
+ :valid-date-end="props.validDateEnd"
31
+ :format-date="props.formatDate"
32
+ @update-tools="emits('update-tools', $event)"
33
+ @exporting="onExporting"
34
+ @open-advanced-page="emits('open-advanced-page')"
35
+ @select-row="emits('select-row', $event)"
36
+ @select-metric-local="emits('select-metric-local', $event)"
37
+ @update-chart-type="emits('update-chart-type', $event)"
38
+ @update-timespan-type="emits('update-timespan-type', $event)"
39
+ @update-unit-count="emits('update-unit-count', $event)"
40
+ @update-period-type="emits('update-period-type', $event)"
41
+ @update-custom-time="emits('update-custom-time', $event)"
42
+ @delete-option="emits('delete-option')"
43
+ @submit-options="emits('submit-options', $event)"
44
+ />
45
+ <common-monitor-advanced-tools-old
46
+ v-else
47
+ v-model:selected-timespan-type="localSelectedTimespanType"
48
+ :type="props.type"
49
+ :start-date="props.startDate"
50
+ :end-date="props.endDate"
51
+ :chart-title="props.chartTitle"
52
+ :language="props.language"
53
+ :selected-counters-keys="props.selectedCountersKeys"
54
+ :selected-metric="props.selectedMetric"
55
+ :selected-metric-local="props.selectedMetricLocal"
56
+ :disabled-period="props.disabledPeriod"
57
+ :disabled-view="props.disabledView"
58
+ :selected-chart-type="props.selectedChartType"
59
+ :units-count="props.unitsCount"
60
+ :period-type="props.periodType"
61
+ :selected-custom-time="props.selectedCustomTime"
62
+ :selected-chart-option-name="props.selectedChartOptionName"
63
+ :custom-date-from="props.customDateFrom"
64
+ :custom-date-to="props.customDateTo"
65
+ :custom-time-from="props.customTimeFrom"
66
+ :custom-time-to="props.customTimeTo"
67
+ :total-cores="totalCores"
68
+ :host-id="props.hostId"
69
+ :selected-objects="props.selectedObjects"
70
+ :project="props.project"
71
+ :objects-loading="props.objectsLoading"
72
+ :objects-data="props.objectsData"
73
+ :valid-date-end="props.validDateEnd"
74
+ :format-date="props.formatDate"
75
+ @update-tools="emits('update-tools', $event)"
76
+ @exporting="onExporting"
77
+ @open-advanced-page="emits('open-advanced-page')"
78
+ @select-row="emits('select-row', $event)"
79
+ @select-metric-local="emits('select-metric-local', $event)"
80
+ @update-chart-type="emits('update-chart-type', $event)"
81
+ @update-timespan-type="emits('update-timespan-type', $event)"
82
+ @update-unit-count="emits('update-unit-count', $event)"
83
+ @update-period-type="emits('update-period-type', $event)"
84
+ @update-custom-time="emits('update-custom-time', $event)"
85
+ @delete-option="emits('delete-option')"
86
+ @submit-options="emits('submit-options', $event)"
87
+ />
88
+ </template>
89
+
90
+ <script setup lang="ts">
91
+ import type { UI_I_MonitorGraphPayload } from '~/components/common/monitor/lib/models/interfaces'
92
+ import type { UI_T_AdvancedType } from '~/components/common/monitor/advanced/lib/models/types'
93
+ import type {
94
+ UI_T_ChartHost,
95
+ UI_T_ChartVm,
96
+ } from '~/components/common/monitor/advanced/tools/chartOptionsModal/lib/models/types'
97
+ import type { UI_I_OptionsForm } from '~/components/common/monitor/advanced/tools/chartOptionsModal/lib/models/interfaces'
98
+ import type { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/models/interfaces'
99
+ import type { UI_I_ObjectItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/models/interfaces'
100
+ import type { UI_T_Project } from '~/lib/models/types'
101
+
102
+ const props = defineProps<{
103
+ type: UI_T_AdvancedType
104
+ startDate: number
105
+ endDate: number
106
+ chartTitle: string
107
+ language: string
108
+ selectedCountersKeys: number[]
109
+ selectedMetric: UI_T_ChartHost | UI_T_ChartVm
110
+ selectedMetricLocal: UI_T_ChartHost | UI_T_ChartVm
111
+ selectedChartType: string
112
+ selectedTimespanType: string
113
+ unitsCount: number
114
+ periodType: string
115
+ selectedCustomTime: string
116
+ selectedChartOptionName: string
117
+ customDateFrom: string
118
+ customDateTo: string
119
+ customTimeFrom: string
120
+ customTimeTo: string
121
+ totalCores: number
122
+ hostId: string
123
+ selectedObjects: string
124
+ project: UI_T_Project
125
+ objectsLoading: boolean
126
+ objectsData: UI_I_ObjectItem[]
127
+ validDateEnd: number
128
+ formatDate: string
129
+ disabledPeriod?: boolean
130
+ disabledView?: boolean
131
+ }>()
132
+
133
+ const emits = defineEmits<{
134
+ (event: 'update-tools', value: UI_I_MonitorGraphPayload): void
135
+ (event: 'exporting', value: string): void
136
+ (event: 'open-advanced-page'): void
137
+ (event: 'select-row', value: UI_I_AdvancedCounterItem[]): void
138
+ (event: 'select-metric-local', value: string): void
139
+ (event: 'update-chart-type', value: string): void
140
+ (event: 'update-timespan-type', value: string): void
141
+ (event: 'update-unit-count', value: number): void
142
+ (event: 'update-period-type', value: string): void
143
+ (event: 'update-custom-time', value: string): void
144
+ (event: 'delete-option'): void
145
+ (event: 'submit-options', value: UI_I_OptionsForm): void
146
+ (event: 'update:selected-timespan-type', value: string): void
147
+ }>()
148
+
149
+ const { $store }: any = useNuxtApp()
150
+
151
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
152
+
153
+ const localSelectedTimespanType = computed<string>({
154
+ get() {
155
+ return props.selectedTimespanType
156
+ },
157
+ set(newValue) {
158
+ emits('update:selected-timespan-type', newValue)
159
+ },
160
+ })
161
+ </script>
162
+
163
+ <style scoped lang="scss"></style>