bfg-common 1.1.63 → 1.1.64
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/localization/local_be.json +1 -1
- package/assets/localization/local_hy.json +1 -1
- package/assets/localization/local_kk.json +1 -1
- package/assets/localization/local_ru.json +1 -1
- package/components/atoms/alert/Notification.vue +167 -167
- package/components/atoms/autocomplete/Autocomplete.vue +236 -236
- package/components/atoms/datepicker/Datepicker.vue +612 -612
- package/components/atoms/list/SelectList.vue +62 -62
- package/components/atoms/nav/NavBar.vue +116 -116
- package/components/atoms/nav/VerticalNavBar.vue +89 -89
- package/components/atoms/notificationBar/NotificationBar.vue +175 -175
- package/components/atoms/perPage/PerPage.vue +52 -52
- package/components/atoms/popup/SimplePopup.vue +90 -90
- package/components/atoms/step/VerticalStep.vue +104 -104
- package/components/atoms/switch/Switch.vue +107 -107
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +206 -206
- package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
- package/components/atoms/tabs/Tabs.vue +189 -189
- package/components/atoms/tooltip/Signpost.vue +224 -224
- package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
- package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
- package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
- package/components/common/browse/Browse.vue +182 -182
- package/components/common/browse/blocks/Title.vue +66 -66
- package/components/common/diagramMain/Diagram.vue +186 -186
- package/components/common/diagramMain/DiagramMain.vue +986 -986
- package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
- package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
- package/components/common/diagramMain/network/Contents.vue +238 -238
- package/components/common/feedback/Buttons.vue +232 -232
- package/components/common/feedback/Message.vue +468 -468
- package/components/common/feedback/VisitPortal.vue +54 -54
- package/components/common/graph/Graph.vue +18 -20
- package/components/common/help/navbar/left/Left.vue +159 -159
- package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
- package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
- package/components/common/modals/Rename.vue +165 -165
- package/components/common/monitor/advanced/Advanced.vue +3 -33
- package/components/common/monitor/advanced/GraphView.vue +4 -4
- package/components/common/monitor/advanced/table/Table.vue +5 -5
- package/components/common/monitor/advanced/tools/Tools.vue +27 -91
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +17 -101
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +7 -25
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts +0 -55
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces.ts +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +3 -32
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +8 -25
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +19 -41
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/models/interfaces.ts +1 -1
- package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +38 -50
- package/components/common/monitor/config/getValidDateByOption.ts +6 -105
- package/components/common/monitor/overview/filters/Filters.vue +6 -6
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +8 -8
- package/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker.ts +1 -1
- package/components/common/perPage/PerPage.vue +51 -51
- package/components/common/recursionTree/RecursionTree.vue +201 -201
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/VirtualHardware.vue +641 -642
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +245 -274
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Cpu.vue +375 -375
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/Limit.vue +234 -234
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/config/options.ts +28 -28
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/Memory.vue +316 -316
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +35 -35
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +447 -447
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +1 -1
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/reservation/Reservation.vue +235 -235
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/order/Order.vue +203 -195
- package/components/common/vm/actions/add/select/storage/config/config.ts +154 -154
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
- package/models/store/interfaces.ts +37 -37
- package/models/store/storage/interfaces.ts +32 -32
- package/models/store/types.ts +32 -32
- package/modules/fixContentBuild/utils/methods.ts +114 -114
- package/package.json +1 -1
- package/public/spice-console/application/codec.js +257 -257
- package/public/spice-console/lib/rasterEngine.js +907 -907
- package/public/spice-console/network/spicechannel.js +369 -369
- package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
- package/public/spice-console-minify/lib/jgestures.min.js +24 -24
- package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
- package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
- package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
- package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
- package/utils/contentBuild.ts +34 -34
- package/components/common/monitor/advanced/tools/utils/countCores.ts +0 -7
|
@@ -39,22 +39,12 @@
|
|
|
39
39
|
:units-count="localUnitsCount"
|
|
40
40
|
:period-type="localPeriodType"
|
|
41
41
|
:selected-custom-time="localCustomTime"
|
|
42
|
-
:custom-date-from="props.customDateFrom"
|
|
43
|
-
:custom-date-to="props.customDateTo"
|
|
44
|
-
:custom-time-from="props.customTimeFrom"
|
|
45
|
-
:custom-time-to="props.customTimeTo"
|
|
46
|
-
:total-cores="props.totalCores"
|
|
47
|
-
:host-id="props.hostId"
|
|
48
42
|
@select-row="selectedRows = $event"
|
|
49
43
|
@update-chart-type="selectedChartTypeLocal = $event"
|
|
50
44
|
@update-custom-time="localCustomTime = $event"
|
|
51
45
|
@update-timespan-type="timespanType = $event"
|
|
52
46
|
@update-unit-count="unitCount = $event"
|
|
53
47
|
@update-period-type="localPeriodType = $event"
|
|
54
|
-
@update-custom-date-from="onUpdateCustomDateFrom"
|
|
55
|
-
@update-custom-date-to="onUpdateCustomDateTo"
|
|
56
|
-
@update-custom-time-from="onUpdateCustomTimeFrom"
|
|
57
|
-
@update-custom-time-to="onUpdateCustomTimeTo"
|
|
58
48
|
/>
|
|
59
49
|
</div>
|
|
60
50
|
</div>
|
|
@@ -74,7 +64,6 @@ import {
|
|
|
74
64
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
75
65
|
import { metricsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics'
|
|
76
66
|
import { getCurrentOptionsStorageFunc } from '~/components/common/monitor/advanced/tools/config/advancedToolbar'
|
|
77
|
-
import { checkDateFunc } from '~/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker'
|
|
78
67
|
|
|
79
68
|
const props = defineProps<{
|
|
80
69
|
type: UI_T_AdvancedType
|
|
@@ -87,12 +76,6 @@ const props = defineProps<{
|
|
|
87
76
|
periodType: string
|
|
88
77
|
selectedCustomTime: string
|
|
89
78
|
selectedChartOptionName: string
|
|
90
|
-
customDateFrom: string
|
|
91
|
-
customDateTo: string
|
|
92
|
-
customTimeFrom: string
|
|
93
|
-
customTimeTo: string
|
|
94
|
-
totalCores: number
|
|
95
|
-
hostId: string
|
|
96
79
|
}>()
|
|
97
80
|
|
|
98
81
|
const emits = defineEmits<{
|
|
@@ -107,35 +90,12 @@ const emits = defineEmits<{
|
|
|
107
90
|
(event: 'select-chart-name', value: string): void
|
|
108
91
|
(event: 'delete-option'): void
|
|
109
92
|
(event: 'save-option-name'): void
|
|
110
|
-
(event: 'update-custom-date-from', value: string): void
|
|
111
|
-
(event: 'update-custom-date-to', value: string): void
|
|
112
|
-
(event: 'update-custom-time-from', value: string): void
|
|
113
|
-
(event: 'update-custom-time-to', value: string): void
|
|
114
|
-
(event: 'submit-options', value: string): void
|
|
115
|
-
(event: 'select-objects', value: string): void
|
|
116
93
|
}>()
|
|
117
94
|
|
|
118
95
|
const routeType = '' + useRoute().params.type
|
|
119
96
|
|
|
120
97
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
121
98
|
|
|
122
|
-
const localCustomDateFrom = ref<string>('')
|
|
123
|
-
const onUpdateCustomDateFrom = (value: string): void => {
|
|
124
|
-
localCustomDateFrom.value = value
|
|
125
|
-
}
|
|
126
|
-
const localCustomDateTo = ref<string>('')
|
|
127
|
-
const onUpdateCustomDateTo = (value: string): void => {
|
|
128
|
-
localCustomDateTo.value = value
|
|
129
|
-
}
|
|
130
|
-
const localCustomTimeFrom = ref<string>('')
|
|
131
|
-
const onUpdateCustomTimeFrom = (value: string): void => {
|
|
132
|
-
localCustomTimeFrom.value = value
|
|
133
|
-
}
|
|
134
|
-
const localCustomTimeTo = ref<string>('')
|
|
135
|
-
const onUpdateCustomTimeTo = (value: string): void => {
|
|
136
|
-
localCustomTimeTo.value = value
|
|
137
|
-
}
|
|
138
|
-
|
|
139
99
|
const metricsItems = computed<UI_I_VerticalTabs[]>(() =>
|
|
140
100
|
metricsFunc(localization.value, props.type)
|
|
141
101
|
)
|
|
@@ -213,30 +173,17 @@ const selectedRows = ref<UI_I_AdvancedCounterItem[]>([])
|
|
|
213
173
|
const selectedChartTypeLocal = ref<string>('')
|
|
214
174
|
|
|
215
175
|
const checkValidations = (): boolean => {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
localCustomDateTo.value,
|
|
220
|
-
localCustomTimeFrom.value,
|
|
221
|
-
localCustomTimeTo.value
|
|
222
|
-
)
|
|
176
|
+
if (selectedRows.value.length) {
|
|
177
|
+
alerts.value = []
|
|
178
|
+
isShowAlerts.value = false
|
|
223
179
|
|
|
224
|
-
|
|
225
|
-
alerts.value = [localization.value.noCountersSelected]
|
|
226
|
-
isShowAlerts.value = true
|
|
227
|
-
return false
|
|
228
|
-
} else if (
|
|
229
|
-
timespanType.value === 'custom_interval' &&
|
|
230
|
-
localPeriodType.value === 'period' &&
|
|
231
|
-
checkDateResult !== '' &&
|
|
232
|
-
typeof checkDateResult === 'string'
|
|
233
|
-
) {
|
|
234
|
-
alerts.value = [checkDateResult]
|
|
235
|
-
isShowAlerts.value = true
|
|
236
|
-
return false
|
|
180
|
+
return true
|
|
237
181
|
}
|
|
238
182
|
|
|
239
|
-
|
|
183
|
+
alerts.value = [localization.value.noCountersSelected]
|
|
184
|
+
isShowAlerts.value = true
|
|
185
|
+
|
|
186
|
+
return false
|
|
240
187
|
}
|
|
241
188
|
|
|
242
189
|
const localSelectedChartOptionName = ref<string>('')
|
|
@@ -250,8 +197,6 @@ watch(
|
|
|
250
197
|
|
|
251
198
|
const selectedLocalOptionName = ref<string>('')
|
|
252
199
|
|
|
253
|
-
const selectedObjects = ref<string>('')
|
|
254
|
-
|
|
255
200
|
const onSubmit = (): void => {
|
|
256
201
|
if (!checkValidations()) return
|
|
257
202
|
|
|
@@ -260,37 +205,14 @@ const onSubmit = (): void => {
|
|
|
260
205
|
|
|
261
206
|
onSaveOptions(selectedLocalOptionName.value)
|
|
262
207
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
// emits('update-custom-date-to', localCustomDateTo.value) +
|
|
272
|
-
// emits('update-custom-time-from', localCustomTimeFrom.value) +
|
|
273
|
-
// emits('update-custom-time-to', localCustomTimeTo.value) +
|
|
274
|
-
// emits('update-chart-type', selectedChartTypeLocal.value) +
|
|
275
|
-
// emits('submit-options')
|
|
276
|
-
|
|
277
|
-
const savedObject = {
|
|
278
|
-
optionName: selectedLocalOptionName.value,
|
|
279
|
-
metric: selectedMetric.value,
|
|
280
|
-
counters: selectedRows.value,
|
|
281
|
-
timespanType: timespanType.value,
|
|
282
|
-
periodType: localPeriodType.value,
|
|
283
|
-
unitCount: unitCount.value,
|
|
284
|
-
localTimespanType: localCustomTime.value,
|
|
285
|
-
dateFrom: localCustomDateFrom.value,
|
|
286
|
-
timeFrom: localCustomTimeFrom.value,
|
|
287
|
-
dateTo: localCustomDateTo.value,
|
|
288
|
-
timeTo: localCustomTimeTo.value,
|
|
289
|
-
chartType: selectedChartTypeLocal.value,
|
|
290
|
-
objects: selectedObjects.value,
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
emits('submit-options', savedObject)
|
|
208
|
+
emits('select-metric', selectedMetric.value)
|
|
209
|
+
emits('select-row', selectedRows.value)
|
|
210
|
+
emits('update-chart-type', selectedChartTypeLocal.value)
|
|
211
|
+
emits('update-timespan-type', timespanType.value)
|
|
212
|
+
emits('update-unit-count', unitCount.value)
|
|
213
|
+
emits('update-period-type', localPeriodType.value)
|
|
214
|
+
emits('update-custom-time', localCustomTime.value)
|
|
215
|
+
emits('select-chart-name', selectedLocalOptionName.value)
|
|
294
216
|
onHide()
|
|
295
217
|
}
|
|
296
218
|
|
|
@@ -329,13 +251,7 @@ const onSaveOptions = (name: string): void => {
|
|
|
329
251
|
}
|
|
330
252
|
|
|
331
253
|
const setSelectOptions = (): void => {
|
|
332
|
-
|
|
333
|
-
localSelectedCountersKeys.value = props.selectedCountersKeys
|
|
334
|
-
localSelectedChartType.value = props.selectedChartType
|
|
335
|
-
localSelectedTimespanType.value = props.selectedTimespanType
|
|
336
|
-
localUnitsCount.value = props.unitsCount
|
|
337
|
-
localPeriodType.value = props.periodType
|
|
338
|
-
localCustomTime.value = props.selectedCustomTime
|
|
254
|
+
setDefaultOptions()
|
|
339
255
|
}
|
|
340
256
|
|
|
341
257
|
const setDefaultOptions = (): void => {
|
|
@@ -7,30 +7,18 @@
|
|
|
7
7
|
@select-row="emits('select-row', $event)"
|
|
8
8
|
/>
|
|
9
9
|
<common-monitor-advanced-tools-chart-options-modal-counters-timespan
|
|
10
|
-
:type="props.type"
|
|
11
|
-
:chart="props.chart"
|
|
12
10
|
:language="props.language"
|
|
11
|
+
:selected="selectedOptions"
|
|
13
12
|
:selected-chart-type="props.selectedChartType"
|
|
14
13
|
:selected-timespan-type="props.selectedTimespanType"
|
|
15
14
|
:units-count="props.unitsCount"
|
|
16
15
|
:period-type="props.periodType"
|
|
17
16
|
:selected-custom-time="props.selectedCustomTime"
|
|
18
|
-
:custom-date-from="props.customDateFrom"
|
|
19
|
-
:custom-date-to="props.customDateTo"
|
|
20
|
-
:custom-time-from="props.customTimeFrom"
|
|
21
|
-
:custom-time-to="props.customTimeTo"
|
|
22
|
-
:total-cores="props.totalCores"
|
|
23
|
-
:host-id="props.hostId"
|
|
24
17
|
@update-chart-type="emits('update-chart-type', $event)"
|
|
25
18
|
@update-custom-time="emits('update-custom-time', $event)"
|
|
26
19
|
@update-timespan-type="emits('update-timespan-type', $event)"
|
|
27
20
|
@update-unit-count="emits('update-unit-count', $event)"
|
|
28
21
|
@update-period-type="emits('update-period-type', $event)"
|
|
29
|
-
@update-custom-date-from="emits('update-custom-date-from', $event)"
|
|
30
|
-
@update-custom-date-to="emits('update-custom-date-to', $event)"
|
|
31
|
-
@update-custom-time-from="emits('update-custom-time-from', $event)"
|
|
32
|
-
@update-custom-time-to="emits('update-custom-time-to', $event)"
|
|
33
|
-
@select-objects="emits('select-objects', $event)"
|
|
34
22
|
/>
|
|
35
23
|
</div>
|
|
36
24
|
</template>
|
|
@@ -41,7 +29,10 @@ import {
|
|
|
41
29
|
T_ChartVm,
|
|
42
30
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
43
31
|
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
|
|
44
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
UI_I_AdvancedCounterItem,
|
|
34
|
+
UI_I_AdvancedTargetObject,
|
|
35
|
+
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
45
36
|
|
|
46
37
|
const props = defineProps<{
|
|
47
38
|
language: string
|
|
@@ -53,12 +44,6 @@ const props = defineProps<{
|
|
|
53
44
|
unitsCount: number
|
|
54
45
|
periodType: string
|
|
55
46
|
selectedCustomTime: string
|
|
56
|
-
customDateFrom: string
|
|
57
|
-
customDateTo: string
|
|
58
|
-
customTimeFrom: string
|
|
59
|
-
customTimeTo: string
|
|
60
|
-
totalCores: number
|
|
61
|
-
hostId: string
|
|
62
47
|
}>()
|
|
63
48
|
|
|
64
49
|
const emits = defineEmits<{
|
|
@@ -68,12 +53,9 @@ const emits = defineEmits<{
|
|
|
68
53
|
(event: 'update-timespan-type', value: string): void
|
|
69
54
|
(event: 'update-unit-count', value: number): void
|
|
70
55
|
(event: 'update-period-type', value: string): void
|
|
71
|
-
(event: 'update-custom-date-from', value: string): void
|
|
72
|
-
(event: 'update-custom-date-to', value: string): void
|
|
73
|
-
(event: 'update-custom-time-from', value: string): void
|
|
74
|
-
(event: 'update-custom-time-to', value: string): void
|
|
75
|
-
(event: 'select-objects', value: string): void
|
|
76
56
|
}>()
|
|
57
|
+
|
|
58
|
+
const selectedOptions = ref<UI_I_AdvancedTargetObject[][]>([])
|
|
77
59
|
</script>
|
|
78
60
|
|
|
79
61
|
<style scoped lang="scss">
|
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts
CHANGED
|
@@ -631,58 +631,3 @@ export const countersItemsFunc = (
|
|
|
631
631
|
|
|
632
632
|
return result
|
|
633
633
|
}
|
|
634
|
-
|
|
635
|
-
export const getDefaultMetricName = (type: string, view: string): string => {
|
|
636
|
-
if (type === 'datacenter') return 'cpu'
|
|
637
|
-
else if (type === 'host') {
|
|
638
|
-
if (view === 'cpuUsageInPercent') return 'cpu'
|
|
639
|
-
return view
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
return ''
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
export const getDefaultCounters = (
|
|
646
|
-
type: string,
|
|
647
|
-
view: string
|
|
648
|
-
): UI_I_AdvancedCounterItem[] => {
|
|
649
|
-
switch (type) {
|
|
650
|
-
case 'datacenter':
|
|
651
|
-
return [hostItemsFunc('cpu', {})[0]]
|
|
652
|
-
case 'host':
|
|
653
|
-
switch (view) {
|
|
654
|
-
case 'cpuUsageInPercent':
|
|
655
|
-
return hostItemsFunc('cpu', {}).splice(0, 2)
|
|
656
|
-
case 'disk':
|
|
657
|
-
const allItems = hostItemsFunc('disk', {})
|
|
658
|
-
return allItems.filter((_, key) => [0, 14].includes(key))
|
|
659
|
-
case 'memory':
|
|
660
|
-
return hostItemsFunc('memory', {})
|
|
661
|
-
case 'network':
|
|
662
|
-
return hostItemsFunc('network', {}).splice(1, 3)
|
|
663
|
-
}
|
|
664
|
-
break
|
|
665
|
-
case 'vm':
|
|
666
|
-
switch (view) {
|
|
667
|
-
case 'cpuUsageInPercent':
|
|
668
|
-
return []
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
// if (type === 'datacenter') {
|
|
673
|
-
// return [hostItemsFunc('cpu', {})[0]]
|
|
674
|
-
// } else if (type === 'host') {
|
|
675
|
-
// if (view === 'cpuUsageInPercent')
|
|
676
|
-
// return hostItemsFunc('cpu', {}).splice(0, 2)
|
|
677
|
-
// else if (view === 'disk') {
|
|
678
|
-
// const allItems = hostItemsFunc('disk', {})
|
|
679
|
-
// return allItems.filter((_, key) => [0, 14].includes(key))
|
|
680
|
-
// } else if (view === 'memory') return hostItemsFunc('memory', {})
|
|
681
|
-
// else if (view === 'network')
|
|
682
|
-
// return hostItemsFunc('network', {}).splice(1, 3)
|
|
683
|
-
// } else if (type === 'vm') {
|
|
684
|
-
// if (view === 'cpuUsageInPercent') return []
|
|
685
|
-
// }
|
|
686
|
-
|
|
687
|
-
return []
|
|
688
|
-
}
|
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue
CHANGED
|
@@ -7,52 +7,29 @@
|
|
|
7
7
|
:units-count="props.unitsCount"
|
|
8
8
|
:period-type="props.periodType"
|
|
9
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
10
|
@update-chart-type="emits('update-chart-type', $event)"
|
|
15
11
|
@update-custom-time="emits('update-custom-time', $event)"
|
|
16
12
|
@update-timespan-type="emits('update-timespan-type', $event)"
|
|
17
13
|
@update-unit-count="emits('update-unit-count', $event)"
|
|
18
14
|
@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
15
|
/>
|
|
24
16
|
<common-monitor-advanced-tools-chart-options-modal-counters-timespan-object
|
|
25
|
-
:
|
|
26
|
-
:chart="props.chart"
|
|
27
|
-
:total-cores="props.totalCores"
|
|
28
|
-
:host-id="props.hostId"
|
|
29
|
-
@select-objects="emits('select-objects', $event)"
|
|
17
|
+
:selected="props.selected"
|
|
30
18
|
/>
|
|
31
19
|
</div>
|
|
32
20
|
</template>
|
|
33
21
|
|
|
34
22
|
<script setup lang="ts">
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
T_ChartHost,
|
|
38
|
-
T_ChartVm,
|
|
39
|
-
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
23
|
+
import { UI_I_AdvancedTargetObject } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
40
24
|
|
|
41
25
|
const props = defineProps<{
|
|
42
|
-
|
|
43
|
-
chart: T_ChartHost | T_ChartVm
|
|
26
|
+
selected: UI_I_AdvancedTargetObject[][]
|
|
44
27
|
language: string
|
|
45
28
|
selectedChartType: string
|
|
46
29
|
selectedTimespanType: string
|
|
47
30
|
unitsCount: number
|
|
48
31
|
periodType: string
|
|
49
32
|
selectedCustomTime: string
|
|
50
|
-
customDateFrom: string
|
|
51
|
-
customDateTo: string
|
|
52
|
-
customTimeFrom: string
|
|
53
|
-
customTimeTo: string
|
|
54
|
-
totalCores: number
|
|
55
|
-
hostId: string
|
|
56
33
|
}>()
|
|
57
34
|
|
|
58
35
|
const emits = defineEmits<{
|
|
@@ -61,12 +38,6 @@ const emits = defineEmits<{
|
|
|
61
38
|
(event: 'update-timespan-type', value: string): void
|
|
62
39
|
(event: 'update-unit-count', value: number): void
|
|
63
40
|
(event: 'update-period-type', value: string): void
|
|
64
|
-
(event: 'update-period-type', value: string): void
|
|
65
|
-
(event: 'update-custom-date-from', value: string): void
|
|
66
|
-
(event: 'update-custom-date-to', value: string): void
|
|
67
|
-
(event: 'update-custom-time-from', value: string): void
|
|
68
|
-
(event: 'update-custom-time-to', value: string): void
|
|
69
|
-
(event: 'select-objects', value: string): void
|
|
70
41
|
}>()
|
|
71
42
|
</script>
|
|
72
43
|
|
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue
CHANGED
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
>
|
|
112
112
|
<input
|
|
113
113
|
id="current-date-from"
|
|
114
|
-
v-model.lazy="
|
|
114
|
+
v-model.lazy="currentDateFrom"
|
|
115
115
|
type="text"
|
|
116
116
|
class="chart-option-setting-row custom-time-input first-from"
|
|
117
117
|
/>
|
|
@@ -221,10 +221,6 @@ const props = defineProps<{
|
|
|
221
221
|
unitsCount: number
|
|
222
222
|
periodType: string
|
|
223
223
|
selectedCustomTime: string
|
|
224
|
-
customDateFrom: string
|
|
225
|
-
customDateTo: string
|
|
226
|
-
customTimeFrom: string
|
|
227
|
-
customTimeTo: string
|
|
228
224
|
}>()
|
|
229
225
|
|
|
230
226
|
const emits = defineEmits<{
|
|
@@ -233,10 +229,6 @@ const emits = defineEmits<{
|
|
|
233
229
|
(event: 'update-timespan-type', value: string): void
|
|
234
230
|
(event: 'update-unit-count', value: number): void
|
|
235
231
|
(event: 'update-period-type', value: string): void
|
|
236
|
-
(event: 'update-custom-date-from', value: string): void
|
|
237
|
-
(event: 'update-custom-date-to', value: string): void
|
|
238
|
-
(event: 'update-custom-time-from', value: string): void
|
|
239
|
-
(event: 'update-custom-time-to', value: string): void
|
|
240
232
|
}>()
|
|
241
233
|
|
|
242
234
|
const { $formattedDate, $isDate, $getTimeFormat, $getUnixByDate } = useNuxtApp()
|
|
@@ -356,28 +348,26 @@ const yesterday = new Date().setDate(new Date().getDate() - 1)
|
|
|
356
348
|
const dateFrom = ref<number>(yesterday)
|
|
357
349
|
const dateTo = ref<number>(new Date().getTime())
|
|
358
350
|
|
|
359
|
-
const
|
|
351
|
+
const currentDateFrom = ref<string>('')
|
|
360
352
|
const currentDateTo = ref<string>('')
|
|
361
353
|
const currentTimeFrom = ref<string>('')
|
|
362
354
|
const currentTimeTo = ref<string>('')
|
|
363
355
|
|
|
364
356
|
const getCurrentTime = (): void => {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
currentDateTo.value = props.customDateTo || $formattedDate(new Date(), '')
|
|
357
|
+
currentDateFrom.value = $formattedDate(yesterday, '')
|
|
358
|
+
currentDateTo.value = $formattedDate(new Date(), '')
|
|
368
359
|
|
|
369
360
|
const currentTime = format(new Date(), $getTimeFormat(true))
|
|
370
|
-
currentTimeFrom.value =
|
|
371
|
-
currentTimeTo.value =
|
|
361
|
+
currentTimeFrom.value = currentTime
|
|
362
|
+
currentTimeTo.value = currentTime
|
|
372
363
|
}
|
|
373
364
|
|
|
374
365
|
const onUpdateDateFrom = (val: number): void => {
|
|
375
366
|
if (!val) return
|
|
376
367
|
|
|
377
|
-
|
|
368
|
+
currentDateFrom.value = $formattedDate(new Date(val), '')
|
|
378
369
|
}
|
|
379
|
-
watch(
|
|
380
|
-
emits('update-custom-date-from', newValue)
|
|
370
|
+
watch(currentDateFrom, (newValue) => {
|
|
381
371
|
if (!newValue) return
|
|
382
372
|
|
|
383
373
|
if ($isDate(newValue)) dateFrom.value = $getUnixByDate(newValue)
|
|
@@ -389,17 +379,10 @@ const onUpdateDateTo = (val: number): void => {
|
|
|
389
379
|
currentDateTo.value = $formattedDate(new Date(val), '')
|
|
390
380
|
}
|
|
391
381
|
watch(currentDateTo, (newValue) => {
|
|
392
|
-
emits('update-custom-date-to', newValue)
|
|
393
382
|
if (!newValue) return
|
|
394
383
|
|
|
395
384
|
if ($isDate(newValue)) dateTo.value = $getUnixByDate(newValue)
|
|
396
385
|
})
|
|
397
|
-
watch(currentTimeFrom, (newValue) => {
|
|
398
|
-
emits('update-custom-time-from', newValue)
|
|
399
|
-
})
|
|
400
|
-
watch(currentTimeTo, (newValue) => {
|
|
401
|
-
emits('update-custom-time-to', newValue)
|
|
402
|
-
})
|
|
403
386
|
|
|
404
387
|
onMounted(() => {
|
|
405
388
|
getCurrentTime()
|
|
@@ -34,21 +34,10 @@ import {
|
|
|
34
34
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
35
35
|
import { UI_I_AdvancedTargetObject } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
36
36
|
import * as table from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/config/objectTable'
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
T_ChartHost,
|
|
40
|
-
T_ChartVm,
|
|
41
|
-
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
37
|
+
import { UI_I_ObjectItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/models/interfaces'
|
|
42
38
|
|
|
43
39
|
const props = defineProps<{
|
|
44
|
-
|
|
45
|
-
chart: T_ChartHost | T_ChartVm
|
|
46
|
-
totalCores: number
|
|
47
|
-
hostId: string
|
|
48
|
-
}>()
|
|
49
|
-
|
|
50
|
-
const emits = defineEmits<{
|
|
51
|
-
(event: 'select-objects', value: string): void
|
|
40
|
+
selected: UI_I_AdvancedTargetObject[][]
|
|
52
41
|
}>()
|
|
53
42
|
|
|
54
43
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -68,38 +57,28 @@ const columnItems = computed<UI_I_ColumnKey[]>(() =>
|
|
|
68
57
|
|
|
69
58
|
const bodyItems = ref<UI_I_BodyItem[][]>([])
|
|
70
59
|
|
|
71
|
-
const items: UI_I_AdvancedTargetObject[] = []
|
|
72
60
|
watch(
|
|
73
|
-
() =>
|
|
74
|
-
(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
id: 'total',
|
|
78
|
-
target_object: newValue[3],
|
|
79
|
-
})
|
|
80
|
-
for (let i = 0; i < newValue[2]; i++) {
|
|
81
|
-
items.push({
|
|
82
|
-
id: 'core' + i,
|
|
83
|
-
target_object: '' + i,
|
|
84
|
-
})
|
|
85
|
-
}
|
|
61
|
+
() => props.selected,
|
|
62
|
+
(val) => {
|
|
63
|
+
const items: UI_I_ObjectItem[] = []
|
|
64
|
+
if (!val.length) {
|
|
86
65
|
bodyItems.value = table.bodyItems(items)
|
|
66
|
+
return
|
|
87
67
|
}
|
|
88
|
-
},
|
|
89
|
-
{ immediate: true }
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
watch(selectedRow, (newValue) => {
|
|
93
|
-
const selectedItems: number[] = []
|
|
94
68
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
69
|
+
val.forEach((itemArr) => {
|
|
70
|
+
itemArr.forEach((item) =>
|
|
71
|
+
items.push({
|
|
72
|
+
id: item.id,
|
|
73
|
+
target_object: item.target_object,
|
|
74
|
+
})
|
|
75
|
+
)
|
|
76
|
+
})
|
|
98
77
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
78
|
+
bodyItems.value = table.bodyItems(items)
|
|
79
|
+
},
|
|
80
|
+
{ deep: true }
|
|
81
|
+
)
|
|
103
82
|
</script>
|
|
104
83
|
|
|
105
84
|
<style scoped lang="scss">
|
|
@@ -112,7 +91,6 @@ watch(selectedRow, (newValue) => {
|
|
|
112
91
|
}
|
|
113
92
|
.flex-to-absolute-positioning-container {
|
|
114
93
|
height: 100%;
|
|
115
|
-
max-height: 204px;
|
|
116
94
|
.flex-to-absolute-positioning-container-inner {
|
|
117
95
|
height: inherit;
|
|
118
96
|
|