bfg-common 1.2.197 → 1.2.198
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 +9 -2
- package/assets/localization/local_en.json +9 -2
- package/assets/localization/local_hy.json +9 -2
- package/assets/localization/local_kk.json +9 -2
- package/assets/localization/local_ru.json +9 -2
- package/assets/localization/local_zh.json +9 -2
- package/components/atoms/table/dataGrid/DataGrid.vue +1490 -1490
- package/components/atoms/table/simpleTable/SimpleTable.vue +5 -2
- package/components/atoms/wizard/Wizard.vue +4 -4
- package/components/atoms/wizard/models/interfaces.ts +4 -3
- package/components/atoms/wizard/utils/utils.ts +106 -27
- package/components/common/diagramMain/DiagramMain.vue +11 -47
- package/components/common/diagramMain/modals/config/index.ts +0 -6
- package/components/common/diagramMain/modals/config/vmKernelAdapter.ts +2 -2
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +1 -1
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +1 -1
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +531 -0
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/config/steps.ts +114 -0
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +161 -0
- package/components/common/diagramMain/modals/{steps → migrateVmkernelAdapter/steps}/SelectVmkernelAdapter.vue +24 -86
- package/components/common/diagramMain/modals/{steps → migrateVmkernelAdapter/steps}/VmkernelAdapterReadyComplete.vue +7 -11
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +47 -0
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +146 -0
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +54 -0
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -0
- package/components/common/diagramMain/models/enums.ts +6 -7
- package/components/common/diagramMain/models/interfaces.ts +28 -29
- package/components/common/diagramMain/models/types.ts +0 -1
- package/components/common/monitor/advanced/Advanced.vue +10 -3
- package/components/common/monitor/advanced/tools/Tools.vue +15 -7
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +21 -9
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +7 -3
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +3 -3
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts +5 -5
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +7 -3
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +24 -3
- package/components/common/monitor/advanced/tools/chartOptionsModal/models/types.ts +2 -2
- package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +14 -7
- package/components/common/monitor/overview/filters/Filters.vue +5 -4
- package/components/common/monitor/overview/filters/config/filterOptions.ts +3 -2
- package/components/common/tools/viewSettings/ViewSettings.vue +71 -0
- package/components/common/tools/viewSettings/models/interfaces.ts +9 -0
- package/components/common/vm/actions/add/Add.vue +785 -525
- package/components/common/vm/actions/add/utils.ts +105 -0
- package/components/common/vm/actions/addOld/Add.vue +690 -0
- package/components/common/vm/actions/addOld/FolderTreeView.vue +83 -0
- package/components/common/vm/actions/addOld/utils.ts +118 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +394 -394
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +1 -1
- package/components/common/vm/actions/common/select/name/Name.vue +10 -5
- package/components/common/vm/actions/common/select/name/NameOld.vue +215 -0
- package/components/common/vm/actions/common/select/storage/Storage.vue +6 -4
- package/components/common/vm/actions/common/select/storage/StorageOld.vue +194 -0
- package/components/common/wizards/network/add/Add.vue +874 -0
- package/components/common/{addNetworking → wizards/network/add}/config/index.ts +2 -16
- package/components/common/{addNetworking → wizards/network/add}/config/initialData.ts +4 -19
- package/components/common/{addNetworking → wizards/network/add}/config/portPropertiesStep.ts +1 -1
- package/components/common/{addNetworking → wizards/network/add}/config/selectSwitch.ts +1 -1
- package/components/common/{addNetworking → wizards/network/add}/config/sendData.ts +1 -1
- package/components/common/{addNetworking/config/addNetworkingSteps.ts → wizards/network/add/config/steps.ts} +107 -60
- package/components/common/{addNetworking → wizards/network/add}/modals/SelectNetwork.vue +2 -2
- package/components/common/{addNetworking → wizards/network/add}/modals/SelectStandardSwitch.vue +2 -2
- package/components/common/{addNetworking → wizards/network/add}/modals/SelectSwitch.vue +2 -2
- package/components/common/wizards/network/add/models/enums.ts +17 -0
- package/components/common/{addNetworking → wizards/network/add}/models/interfaces.ts +30 -37
- package/components/common/wizards/network/add/models/types.ts +2 -0
- package/components/common/wizards/network/add/steps/ConnectionSettings.vue +148 -0
- package/components/common/{addNetworking → wizards/network/add}/steps/CreateStandardSwitch.vue +0 -7
- package/components/common/wizards/network/add/steps/IpFourSettings.vue +245 -0
- package/components/common/{addNetworking → wizards/network/add}/steps/PhysicalAdapter.vue +1 -12
- package/components/common/{addNetworking → wizards/network/add}/steps/PortProperties.vue +57 -180
- package/components/common/{addNetworking → wizards/network/add}/steps/ReadyComplete.vue +1 -10
- package/components/common/{addNetworking → wizards/network/add}/steps/SelectConnectionType.vue +3 -15
- package/components/common/{addNetworking → wizards/network/add}/steps/SelectedTargetDevice.vue +106 -212
- package/components/common/wizards/network/add/utils/index.ts +4 -0
- package/components/common/wizards/network/add/validations/common.ts +58 -0
- package/components/common/wizards/network/add/validations/connectionSettings.ts +75 -0
- package/components/common/wizards/network/add/validations/createStandardSwitch.ts +58 -0
- package/components/common/wizards/network/add/validations/ipFourSettings.ts +188 -0
- package/components/common/wizards/network/add/validations/networkValidation.ts +73 -0
- package/components/common/wizards/network/add/validations/portProperties.ts +87 -0
- package/components/common/wizards/network/add/validations/targetDevice.ts +113 -0
- package/components/common/wizards/network/add/validations/validations.ts +43 -0
- package/models/composables/useMyFetch/interfaces.ts +25 -25
- package/package.json +1 -1
- package/components/common/addNetworking/AddNetworking.vue +0 -1123
- package/components/common/addNetworking/Wizard.vue +0 -286
- package/components/common/addNetworking/config/temporaryData.ts +0 -8
- package/components/common/addNetworking/config/validation.ts +0 -23
- package/components/common/addNetworking/models/enums.ts +0 -7
- package/components/common/addNetworking/models/types.ts +0 -13
- package/components/common/addNetworking/steps/ConnectionSettings.vue +0 -269
- package/components/common/addNetworking/steps/Header.vue +0 -53
- package/components/common/addNetworking/steps/IpFourSettings.vue +0 -361
- package/components/common/addNetworking/utils/index.ts +0 -212
- package/components/common/diagramMain/modals/MigrateVmkernelAdapter.vue +0 -603
- package/components/common/diagramMain/modals/config/migrateVmkernelAdapterSteps.ts +0 -81
- package/components/common/diagramMain/modals/config/validation.ts +0 -3
- package/components/common/diagramMain/modals/steps/ConnectionSettings.vue +0 -221
- package/components/common/diagramMain/modals/steps/Header.vue +0 -60
- /package/components/common/{addNetworking → wizards/network/add}/mappers/mappers.ts +0 -0
|
@@ -18,10 +18,9 @@ export const enum UI_E_PositionsY {
|
|
|
18
18
|
SPACE_FROM_RECT_BOTTOM = 2.5,
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
21
|
+
export enum UI_E_MigrationValidationFields {
|
|
22
|
+
SELECT_ADAPTER_VM = 'vm',
|
|
23
|
+
|
|
24
|
+
CONNECTION_SETTINGS_NETWORK = 'name',
|
|
25
|
+
CONNECTION_SETTINGS_VLAN = 'vlan',
|
|
26
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UI_E_NetworkType
|
|
1
|
+
import { UI_E_NetworkType } from './enums'
|
|
2
2
|
import { UI_T_Adapters } from '~/components/common/diagramMain/models/types'
|
|
3
3
|
|
|
4
4
|
export interface UI_I_Port {
|
|
@@ -117,7 +117,6 @@ export interface UI_I_NetworkInfo {
|
|
|
117
117
|
shapingPolicy: UI_I_NetworkSummaryPortletListItem[]
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
|
|
121
120
|
export interface UI_I_NetworkFull extends UI_I_Network, UI_I_NetworkInfo {}
|
|
122
121
|
|
|
123
122
|
export interface UI_I_SwitchInfo extends UI_I_NetworkInfo {
|
|
@@ -164,7 +163,7 @@ export interface UI_I_AdaptersWithPositions {
|
|
|
164
163
|
}
|
|
165
164
|
|
|
166
165
|
export interface UI_I_NetworksWithPositions
|
|
167
|
-
|
|
166
|
+
extends Omit<UI_I_Network, 'ports'> {
|
|
168
167
|
ports: (UI_I_Port & { portPosition: number })[]
|
|
169
168
|
portsCount: number
|
|
170
169
|
portsHeight: number
|
|
@@ -209,11 +208,6 @@ export interface UI_I_ToggleDiagramAdaptersPayload {
|
|
|
209
208
|
paths: string[]
|
|
210
209
|
}
|
|
211
210
|
|
|
212
|
-
export interface UI_I_PropertiesErrorFields {
|
|
213
|
-
networkLabel: string
|
|
214
|
-
vlanId: string
|
|
215
|
-
}
|
|
216
|
-
|
|
217
211
|
export interface UI_I_SecurityFields {
|
|
218
212
|
promiscuousMode: {
|
|
219
213
|
checked: boolean
|
|
@@ -251,7 +245,7 @@ export interface UI_I_TeamingFailoverFields {
|
|
|
251
245
|
}
|
|
252
246
|
}
|
|
253
247
|
export interface UI_I_TeamingFailoverWithAdaptersFields
|
|
254
|
-
|
|
248
|
+
extends UI_I_TeamingFailoverFields {
|
|
255
249
|
adapters: UI_I_AdapterStatus
|
|
256
250
|
}
|
|
257
251
|
|
|
@@ -303,23 +297,6 @@ export interface UI_I_AdapterStatus {
|
|
|
303
297
|
unused: string[]
|
|
304
298
|
}
|
|
305
299
|
|
|
306
|
-
export interface UI_I_Step {
|
|
307
|
-
id: number
|
|
308
|
-
name: string
|
|
309
|
-
status: UI_E_StepStatus
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export interface UI_I_PropertiesFieldsErrorMessages {
|
|
313
|
-
mtu: string
|
|
314
|
-
}
|
|
315
|
-
export interface UI_I_IpFourSettingsFieldsErrorMessages {
|
|
316
|
-
ipFourAddress: string
|
|
317
|
-
subnetMask: string
|
|
318
|
-
defaultGateway: string
|
|
319
|
-
}
|
|
320
|
-
export interface UI_I_SelectVmKernelAdapterFieldsErrorMessages {
|
|
321
|
-
vm: string
|
|
322
|
-
}
|
|
323
300
|
export interface UI_I_SwitchPropertiesFields {
|
|
324
301
|
mtu: number
|
|
325
302
|
num_ports: string
|
|
@@ -456,9 +433,9 @@ export interface UI_I_PropertiesFields {
|
|
|
456
433
|
|
|
457
434
|
export interface UI_I_EditFieldsData {
|
|
458
435
|
properties?:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
436
|
+
| UI_I_PropertiesFields
|
|
437
|
+
| UI_I_SwitchPropertiesFields
|
|
438
|
+
| UI_I_PortPropertiesFields
|
|
462
439
|
security?: UI_I_SecurityFields
|
|
463
440
|
trafficShaping?: UI_I_TrafficShapingFields
|
|
464
441
|
teamingFailover?: UI_I_TeamingFailoverWithAdaptersFields
|
|
@@ -563,3 +540,25 @@ export interface UI_I_NetworkEditSendData {
|
|
|
563
540
|
nics: UI_I_AdapterStatus
|
|
564
541
|
override_nics: string | number | boolean
|
|
565
542
|
}
|
|
543
|
+
|
|
544
|
+
export interface UI_I_MigrateVmkernelAdapterEmits {
|
|
545
|
+
(
|
|
546
|
+
event: 'check-network-label',
|
|
547
|
+
networkLabel: string,
|
|
548
|
+
cb: (error_message: string) => void
|
|
549
|
+
): void
|
|
550
|
+
(event: 'hide'): void
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export interface UI_I_MigrationVmkernelAdapterReadyComplete {
|
|
554
|
+
vm: string
|
|
555
|
+
currentSettings: {
|
|
556
|
+
switch: string
|
|
557
|
+
network: string
|
|
558
|
+
}
|
|
559
|
+
newSettings: {
|
|
560
|
+
switch: string
|
|
561
|
+
network: string
|
|
562
|
+
}
|
|
563
|
+
vlanId: string
|
|
564
|
+
}
|
|
@@ -4,6 +4,5 @@ export type UI_T_AdapterStatusNames = 'active' | 'standby' | 'unused'
|
|
|
4
4
|
export type UI_T_PropertiesFieldName = 'vlanId' | 'networkLabel'
|
|
5
5
|
export type UI_T_TrafficShapingFieldName = 'average' | 'peak' | 'burstSize'
|
|
6
6
|
export type UI_T_PortPropertiesFieldName = 'mtu'
|
|
7
|
-
export type UI_T_VmKernelAdapterFieldName = 'vm'
|
|
8
7
|
|
|
9
8
|
export type UI_T_Adapters = UI_I_Adapter & { adapterPosition: number }
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
:total-cores="totalCores"
|
|
34
34
|
:host-id="props.hostId"
|
|
35
35
|
:selected-objects="props.selectedObjects"
|
|
36
|
+
:project="props.project"
|
|
37
|
+
:objects-loading="props.objectsLoading"
|
|
36
38
|
@update-tools="emits('update-tools', $event)"
|
|
37
39
|
@exporting="onExporting"
|
|
38
40
|
@open-advanced-page="onGetEmptyPage"
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
@update-custom-time-from="emits('update-custom-time-from', $event)"
|
|
50
52
|
@update-custom-time-to="emits('update-custom-time-to', $event)"
|
|
51
53
|
@submit-options="emits('submit-options', $event)"
|
|
54
|
+
@update-cores="emits('update-cores')"
|
|
52
55
|
/>
|
|
53
56
|
|
|
54
57
|
<div v-show="!props.data" class="empty-container">
|
|
@@ -92,11 +95,12 @@ import { I_SeriesLine } from 'bfg-nuxt-3-graph/graph/models/interfaces'
|
|
|
92
95
|
import { UI_I_MonitorGraphPayload } from '~/components/common/monitor/models/interfaces'
|
|
93
96
|
import { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/models/interfaces'
|
|
94
97
|
import {
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
UI_T_ChartHost,
|
|
99
|
+
UI_T_ChartVm,
|
|
97
100
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
98
101
|
import { UI_I_OptionsForm } from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/interfaces'
|
|
99
102
|
import { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
103
|
+
import { UI_T_Project } from '~/models/types'
|
|
100
104
|
import { getCountCores } from '~/components/common/monitor/advanced/tools/utils/countCores'
|
|
101
105
|
|
|
102
106
|
const props = defineProps<{
|
|
@@ -110,7 +114,7 @@ const props = defineProps<{
|
|
|
110
114
|
formattedDatetime: any
|
|
111
115
|
getDateFormat: any
|
|
112
116
|
selectedCountersKeys: number[]
|
|
113
|
-
selectedMetric:
|
|
117
|
+
selectedMetric: UI_T_ChartHost | UI_T_ChartVm
|
|
114
118
|
selectedChartType: string
|
|
115
119
|
selectedTimespanType: string
|
|
116
120
|
unitsCount: number
|
|
@@ -123,6 +127,8 @@ const props = defineProps<{
|
|
|
123
127
|
customTimeTo: string
|
|
124
128
|
hostId: string
|
|
125
129
|
selectedObjects: string
|
|
130
|
+
project: UI_T_Project
|
|
131
|
+
objectsLoading: boolean
|
|
126
132
|
disabledPeriod?: boolean
|
|
127
133
|
disabledView?: boolean
|
|
128
134
|
isEmpty?: boolean
|
|
@@ -146,6 +152,7 @@ const emits = defineEmits<{
|
|
|
146
152
|
(event: 'update-custom-time-to', value: string): void
|
|
147
153
|
(event: 'submit-options', value: UI_I_OptionsForm): void
|
|
148
154
|
(event: 'update:selected-timespan-type', value: string): void
|
|
155
|
+
(event: 'update-cores'): void
|
|
149
156
|
}>()
|
|
150
157
|
|
|
151
158
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -101,6 +101,8 @@
|
|
|
101
101
|
:total-cores="props.totalCores"
|
|
102
102
|
:host-id="props.hostId"
|
|
103
103
|
:selected-objects="props.selectedObjects"
|
|
104
|
+
:project="props.project"
|
|
105
|
+
:objects-loading="props.objectsLoading"
|
|
104
106
|
@hide="isShowModal = false"
|
|
105
107
|
@select-row="emits('select-row', $event)"
|
|
106
108
|
@select-metric="emits('select-metric', $event)"
|
|
@@ -116,6 +118,7 @@
|
|
|
116
118
|
@update-custom-time-from="emits('update-custom-time-from', $event)"
|
|
117
119
|
@update-custom-time-to="emits('update-custom-time-to', $event)"
|
|
118
120
|
@submit-options="emits('submit-options', $event)"
|
|
121
|
+
@update-cores="emits('update-cores')"
|
|
119
122
|
/>
|
|
120
123
|
</template>
|
|
121
124
|
|
|
@@ -126,11 +129,12 @@ import { UI_I_MonitorGraphPayload } from '~/components/common/monitor/models/int
|
|
|
126
129
|
import { UI_I_DropMenu } from '~/components/common/monitor/advanced/tools/models/interfaces'
|
|
127
130
|
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
|
|
128
131
|
import {
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
UI_T_ChartHost,
|
|
133
|
+
UI_T_ChartVm,
|
|
131
134
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
132
135
|
import { UI_I_OptionsForm } from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/interfaces'
|
|
133
136
|
import { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
137
|
+
import { UI_T_Project } from '~/models/types'
|
|
134
138
|
import { getValidDateByOptionFunc } from '~/components/common/monitor/config/getValidDateByOption'
|
|
135
139
|
import {
|
|
136
140
|
periodFunc,
|
|
@@ -146,7 +150,7 @@ const props = defineProps<{
|
|
|
146
150
|
chartTitle: string
|
|
147
151
|
language: string
|
|
148
152
|
selectedCountersKeys: number[]
|
|
149
|
-
selectedMetric:
|
|
153
|
+
selectedMetric: UI_T_ChartHost | UI_T_ChartVm
|
|
150
154
|
selectedChartType: string
|
|
151
155
|
selectedTimespanType: string
|
|
152
156
|
unitsCount: number
|
|
@@ -160,6 +164,8 @@ const props = defineProps<{
|
|
|
160
164
|
totalCores: number
|
|
161
165
|
hostId: string
|
|
162
166
|
selectedObjects: string
|
|
167
|
+
project: UI_T_Project
|
|
168
|
+
objectsLoading: boolean
|
|
163
169
|
disabledPeriod?: boolean
|
|
164
170
|
disabledView?: boolean
|
|
165
171
|
}>()
|
|
@@ -182,6 +188,7 @@ const emits = defineEmits<{
|
|
|
182
188
|
(event: 'update-custom-time-to', value: string): void
|
|
183
189
|
(event: 'submit-options', value: UI_I_OptionsForm): void
|
|
184
190
|
(event: 'update:selected-timespan-type', value: string): void
|
|
191
|
+
(event: 'update-cores'): void
|
|
185
192
|
}>()
|
|
186
193
|
|
|
187
194
|
const routeType = '' + useRoute().params.type
|
|
@@ -215,7 +222,7 @@ watch(
|
|
|
215
222
|
|
|
216
223
|
const onDeleteOption = (): void => {
|
|
217
224
|
emits('delete-option')
|
|
218
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType)
|
|
225
|
+
optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
|
|
219
226
|
}
|
|
220
227
|
|
|
221
228
|
const periodOptions = computed<UI_I_OptionItem[]>(() =>
|
|
@@ -239,10 +246,11 @@ watch(isShowModal, (newValue) => {
|
|
|
239
246
|
const updateTools = (): void => {
|
|
240
247
|
const periodValue = selectedPeriod.value
|
|
241
248
|
const viewValue = selectedView.value
|
|
249
|
+
const prefix = props.project === 'sphere'
|
|
242
250
|
const selectedValue = useLocalStorage(
|
|
243
251
|
viewValue + 'ChartOptions',
|
|
244
252
|
undefined,
|
|
245
|
-
|
|
253
|
+
prefix
|
|
246
254
|
)
|
|
247
255
|
|
|
248
256
|
const fields = selectedValue
|
|
@@ -314,11 +322,11 @@ const onShowChartOptions = (): void => {
|
|
|
314
322
|
}
|
|
315
323
|
|
|
316
324
|
const onSaveOptionName = (): void => {
|
|
317
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType)
|
|
325
|
+
optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
|
|
318
326
|
}
|
|
319
327
|
|
|
320
328
|
onMounted(() => {
|
|
321
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType)
|
|
329
|
+
optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
|
|
322
330
|
updateTools()
|
|
323
331
|
})
|
|
324
332
|
</script>
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
:host-id="props.hostId"
|
|
49
49
|
:selected-metrics-keys="selectedMetricsKeys"
|
|
50
50
|
:selected-objects="props.selectedObjects"
|
|
51
|
+
:objects-loading="props.objectsLoading"
|
|
51
52
|
@select-row="selectedRows = $event"
|
|
52
53
|
@update-chart-type="selectedChartTypeLocal = $event"
|
|
53
54
|
@update-custom-time="localCustomTime = $event"
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
@update-custom-time-from="onUpdateCustomTimeFrom"
|
|
60
61
|
@update-custom-time-to="onUpdateCustomTimeTo"
|
|
61
62
|
@select-objects="localSelectedObjects = $event"
|
|
63
|
+
@update-cores="emits('update-cores')"
|
|
62
64
|
/>
|
|
63
65
|
</div>
|
|
64
66
|
</div>
|
|
@@ -73,10 +75,11 @@ import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/t
|
|
|
73
75
|
import { UI_I_VerticalTabs } from '~/components/atoms/tabs/models/interfaces'
|
|
74
76
|
import { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
75
77
|
import {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
UI_T_ChartHost,
|
|
79
|
+
UI_T_ChartVm,
|
|
78
80
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
79
81
|
import { UI_I_OptionsForm } from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/interfaces'
|
|
82
|
+
import { UI_T_Project } from '~/models/types'
|
|
80
83
|
import { metricsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics'
|
|
81
84
|
import { getCurrentOptionsStorageFunc } from '~/components/common/monitor/advanced/tools/config/advancedToolbar'
|
|
82
85
|
import { checkDateFunc } from '~/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker'
|
|
@@ -86,7 +89,7 @@ const props = defineProps<{
|
|
|
86
89
|
type: UI_T_AdvancedType
|
|
87
90
|
language: string
|
|
88
91
|
selectedCountersKeys: number[]
|
|
89
|
-
selectedMetric:
|
|
92
|
+
selectedMetric: UI_T_ChartHost | UI_T_ChartVm
|
|
90
93
|
selectedChartType: string
|
|
91
94
|
selectedTimespanType: string
|
|
92
95
|
unitsCount: number
|
|
@@ -100,6 +103,8 @@ const props = defineProps<{
|
|
|
100
103
|
totalCores: number
|
|
101
104
|
hostId: string
|
|
102
105
|
selectedObjects: string
|
|
106
|
+
project: UI_T_Project
|
|
107
|
+
objectsLoading: boolean
|
|
103
108
|
}>()
|
|
104
109
|
|
|
105
110
|
const emits = defineEmits<{
|
|
@@ -119,6 +124,7 @@ const emits = defineEmits<{
|
|
|
119
124
|
(event: 'update-custom-time-to', value: string): void
|
|
120
125
|
(event: 'submit-options', value: UI_I_OptionsForm): void
|
|
121
126
|
(event: 'select-objects', value: string): void
|
|
127
|
+
(event: 'update-cores'): void
|
|
122
128
|
}>()
|
|
123
129
|
|
|
124
130
|
const routeType = '' + useRoute().params.type
|
|
@@ -145,7 +151,7 @@ const onUpdateCustomTimeTo = (value: string): void => {
|
|
|
145
151
|
const metricsItems = computed<UI_I_VerticalTabs[]>(() =>
|
|
146
152
|
metricsFunc(localization.value, props.type)
|
|
147
153
|
)
|
|
148
|
-
const selectedMetric = ref<
|
|
154
|
+
const selectedMetric = ref<UI_T_ChartHost | UI_T_ChartVm>(
|
|
149
155
|
props.selectedMetric || '' + metricsItems.value[0]?.value
|
|
150
156
|
)
|
|
151
157
|
|
|
@@ -375,8 +381,9 @@ const onSaveOptions = (name: string): void => {
|
|
|
375
381
|
type: timespanType.value,
|
|
376
382
|
},
|
|
377
383
|
}
|
|
378
|
-
|
|
379
|
-
|
|
384
|
+
const prefix = props.project === 'sphere'
|
|
385
|
+
useLocalStorage(`${name}ChartOptions`, saveOptionsData, prefix)
|
|
386
|
+
optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
|
|
380
387
|
localSelectedChartOptionName.value = name
|
|
381
388
|
emits('save-option-name')
|
|
382
389
|
}
|
|
@@ -402,7 +409,12 @@ const setDefaultOptions = (): void => {
|
|
|
402
409
|
}
|
|
403
410
|
|
|
404
411
|
const setCustomOptions = (name: string): void => {
|
|
405
|
-
const
|
|
412
|
+
const prefix = props.project === 'sphere'
|
|
413
|
+
const selectedValue = useLocalStorage(
|
|
414
|
+
name + 'ChartOptions',
|
|
415
|
+
undefined,
|
|
416
|
+
prefix
|
|
417
|
+
)
|
|
406
418
|
|
|
407
419
|
if (selectedValue.routeType !== routeType) return
|
|
408
420
|
|
|
@@ -442,7 +454,7 @@ watch(
|
|
|
442
454
|
|
|
443
455
|
const onDeleteChartName = (name: string): void => {
|
|
444
456
|
window.localStorage.removeItem(name + 'ChartOptions')
|
|
445
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType)
|
|
457
|
+
optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
|
|
446
458
|
setSelectOptions()
|
|
447
459
|
emits('delete-option')
|
|
448
460
|
}
|
|
@@ -455,7 +467,7 @@ const isDisabledSubmit = computed<boolean>(
|
|
|
455
467
|
)
|
|
456
468
|
|
|
457
469
|
onMounted(() => {
|
|
458
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType)
|
|
470
|
+
optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
|
|
459
471
|
})
|
|
460
472
|
</script>
|
|
461
473
|
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
:selected-metrics-keys="props.selectedMetricsKeys"
|
|
26
26
|
:total-metric-items="totalMetricItems"
|
|
27
27
|
:selected-objects="props.selectedObjects"
|
|
28
|
+
:objects-loading="props.objectsLoading"
|
|
28
29
|
@update-chart-type="emits('update-chart-type', $event)"
|
|
29
30
|
@update-custom-time="emits('update-custom-time', $event)"
|
|
30
31
|
@update-timespan-type="emits('update-timespan-type', $event)"
|
|
@@ -35,21 +36,22 @@
|
|
|
35
36
|
@update-custom-time-from="emits('update-custom-time-from', $event)"
|
|
36
37
|
@update-custom-time-to="emits('update-custom-time-to', $event)"
|
|
37
38
|
@select-objects="emits('select-objects', $event)"
|
|
39
|
+
@update-cores="emits('update-cores')"
|
|
38
40
|
/>
|
|
39
41
|
</div>
|
|
40
42
|
</template>
|
|
41
43
|
|
|
42
44
|
<script setup lang="ts">
|
|
43
45
|
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
UI_T_ChartHost,
|
|
47
|
+
UI_T_ChartVm,
|
|
46
48
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
47
49
|
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
|
|
48
50
|
import { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
49
51
|
|
|
50
52
|
const props = defineProps<{
|
|
51
53
|
language: string
|
|
52
|
-
chart:
|
|
54
|
+
chart: UI_T_ChartHost | UI_T_ChartVm
|
|
53
55
|
type: UI_T_AdvancedType
|
|
54
56
|
selectedKeys: number[]
|
|
55
57
|
selectedChartType: string
|
|
@@ -65,6 +67,7 @@ const props = defineProps<{
|
|
|
65
67
|
hostId: string
|
|
66
68
|
selectedMetricsKeys: number[]
|
|
67
69
|
selectedObjects: string
|
|
70
|
+
objectsLoading: boolean
|
|
68
71
|
}>()
|
|
69
72
|
|
|
70
73
|
const emits = defineEmits<{
|
|
@@ -79,6 +82,7 @@ const emits = defineEmits<{
|
|
|
79
82
|
(event: 'update-custom-time-from', value: string): void
|
|
80
83
|
(event: 'update-custom-time-to', value: string): void
|
|
81
84
|
(event: 'select-objects', value: string): void
|
|
85
|
+
(event: 'update-cores'): void
|
|
82
86
|
}>()
|
|
83
87
|
|
|
84
88
|
const totalMetricItems = ref<number>(0)
|
|
@@ -32,14 +32,14 @@ import {UI_I_Localization, UI_I_Pagination} from '~/models/interfaces'
|
|
|
32
32
|
import * as table from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/tableConfig'
|
|
33
33
|
import { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
34
34
|
import {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
UI_T_ChartHost,
|
|
36
|
+
UI_T_ChartVm,
|
|
37
37
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
38
38
|
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
|
|
39
39
|
import { countersItemsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils'
|
|
40
40
|
|
|
41
41
|
const props = defineProps<{
|
|
42
|
-
chart:
|
|
42
|
+
chart: UI_T_ChartHost | UI_T_ChartVm
|
|
43
43
|
type: UI_T_AdvancedType
|
|
44
44
|
selectedKeys: number[]
|
|
45
45
|
}>()
|
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts
CHANGED
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
I_VmMetrics,
|
|
6
6
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
UI_T_ChartHost,
|
|
9
|
+
UI_T_ChartVm,
|
|
10
10
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
11
11
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
12
12
|
|
|
13
13
|
const hostItemsFunc = (
|
|
14
|
-
chart:
|
|
14
|
+
chart: UI_T_ChartHost,
|
|
15
15
|
localization: UI_I_Localization
|
|
16
16
|
): UI_I_AdvancedCounterItem[] => {
|
|
17
17
|
const cpu: UI_I_AdvancedCounterItem[] = [
|
|
@@ -395,7 +395,7 @@ const hostItemsFunc = (
|
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
const vmItemsFunc = (
|
|
398
|
-
chart:
|
|
398
|
+
chart: UI_T_ChartVm,
|
|
399
399
|
localization: UI_I_Localization
|
|
400
400
|
): UI_I_AdvancedCounterItem[] => {
|
|
401
401
|
const disk: UI_I_AdvancedCounterItem[] = [
|
|
@@ -614,7 +614,7 @@ const vmItemsFunc = (
|
|
|
614
614
|
|
|
615
615
|
export const countersItemsFunc = (
|
|
616
616
|
type: UI_T_AdvancedType,
|
|
617
|
-
chart:
|
|
617
|
+
chart: UI_T_ChartHost | UI_T_ChartVm,
|
|
618
618
|
localization: UI_I_Localization
|
|
619
619
|
): UI_I_AdvancedCounterItem[] => {
|
|
620
620
|
let result: UI_I_AdvancedCounterItem[] = []
|
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue
CHANGED
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
:selected-metrics-keys="props.selectedMetricsKeys"
|
|
30
30
|
:total-metric-items="props.totalMetricItems"
|
|
31
31
|
:selected-objects="props.selectedObjects"
|
|
32
|
+
:loading="props.objectsLoading"
|
|
32
33
|
@select-objects="emits('select-objects', $event)"
|
|
34
|
+
@update-cores="emits('update-cores')"
|
|
33
35
|
/>
|
|
34
36
|
</div>
|
|
35
37
|
</template>
|
|
@@ -37,13 +39,13 @@
|
|
|
37
39
|
<script setup lang="ts">
|
|
38
40
|
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
|
|
39
41
|
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
UI_T_ChartHost,
|
|
43
|
+
UI_T_ChartVm,
|
|
42
44
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
43
45
|
|
|
44
46
|
const props = defineProps<{
|
|
45
47
|
type: UI_T_AdvancedType
|
|
46
|
-
chart:
|
|
48
|
+
chart: UI_T_ChartHost | UI_T_ChartVm
|
|
47
49
|
language: string
|
|
48
50
|
selectedChartType: string
|
|
49
51
|
selectedTimespanType: string
|
|
@@ -59,6 +61,7 @@ const props = defineProps<{
|
|
|
59
61
|
selectedMetricsKeys: number[]
|
|
60
62
|
totalMetricItems: number
|
|
61
63
|
selectedObjects: string
|
|
64
|
+
objectsLoading: boolean
|
|
62
65
|
}>()
|
|
63
66
|
|
|
64
67
|
const emits = defineEmits<{
|
|
@@ -73,6 +76,7 @@ const emits = defineEmits<{
|
|
|
73
76
|
(event: 'update-custom-time-from', value: string): void
|
|
74
77
|
(event: 'update-custom-time-to', value: string): void
|
|
75
78
|
(event: 'select-objects', value: string): void
|
|
79
|
+
(event: 'update-cores'): void
|
|
76
80
|
}>()
|
|
77
81
|
</script>
|
|
78
82
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
v-model:page="pagination.page"
|
|
13
13
|
type="checkbox"
|
|
14
14
|
class="data-table"
|
|
15
|
+
:loading="props.loading"
|
|
15
16
|
:head-items="headItems"
|
|
16
17
|
:body-items="bodyItems"
|
|
17
18
|
:total-items="bodyItems.length"
|
|
@@ -36,22 +37,24 @@ import { UI_I_AdvancedTargetObject } from '~/components/common/monitor/advanced/
|
|
|
36
37
|
import * as table from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/config/objectTable'
|
|
37
38
|
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
|
|
38
39
|
import {
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
UI_T_ChartHost,
|
|
41
|
+
UI_T_ChartVm,
|
|
41
42
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
42
43
|
|
|
43
44
|
const props = defineProps<{
|
|
44
45
|
type: UI_T_AdvancedType
|
|
45
|
-
chart:
|
|
46
|
+
chart: UI_T_ChartHost | UI_T_ChartVm
|
|
46
47
|
totalCores: number
|
|
47
48
|
hostId: string
|
|
48
49
|
selectedMetricsKeys: number[]
|
|
49
50
|
totalMetricItems: number
|
|
50
51
|
selectedObjects: string
|
|
52
|
+
loading: boolean
|
|
51
53
|
}>()
|
|
52
54
|
|
|
53
55
|
const emits = defineEmits<{
|
|
54
56
|
(event: 'select-objects', value: string): void
|
|
57
|
+
(event: 'update-cores'): void
|
|
55
58
|
}>()
|
|
56
59
|
|
|
57
60
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -72,6 +75,24 @@ const columnItems = computed<UI_I_ColumnKey[]>(() =>
|
|
|
72
75
|
const bodyItems = ref<UI_I_BodyItem[][]>([])
|
|
73
76
|
|
|
74
77
|
let items: UI_I_AdvancedTargetObject[] = []
|
|
78
|
+
let firstRequest = false
|
|
79
|
+
const getTotalCores = (): void => {
|
|
80
|
+
if (
|
|
81
|
+
props.selectedMetricsKeys.includes(1) &&
|
|
82
|
+
!props.totalCores &&
|
|
83
|
+
!firstRequest
|
|
84
|
+
) {
|
|
85
|
+
emits('update-cores')
|
|
86
|
+
firstRequest = true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
watch(
|
|
90
|
+
() => props.selectedMetricsKeys,
|
|
91
|
+
() => {
|
|
92
|
+
getTotalCores()
|
|
93
|
+
},
|
|
94
|
+
{ deep: true }
|
|
95
|
+
)
|
|
75
96
|
watch(
|
|
76
97
|
() => [
|
|
77
98
|
props.type,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type UI_T_ChartHost = 'cpu' | 'memory' | 'network' | 'disk'
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type UI_T_ChartVm = 'cpu' | 'memory' | 'network' | 'disk' | 'datastore'
|
|
@@ -3,6 +3,7 @@ import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
|
3
3
|
import { UI_I_DropMenu } from '~/components/common/monitor/advanced/tools/models/interfaces'
|
|
4
4
|
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
|
|
5
5
|
import { UI_I_OptionData } from '~/components/common/monitor/advanced/models/interfaces'
|
|
6
|
+
import { UI_T_Project } from '~/models/types'
|
|
6
7
|
|
|
7
8
|
export const periodFunc = (
|
|
8
9
|
localization: UI_I_Localization,
|
|
@@ -103,15 +104,21 @@ export const exportFunc = (
|
|
|
103
104
|
{ text: localization.toCsv + '...', action: 'csv' },
|
|
104
105
|
]
|
|
105
106
|
|
|
106
|
-
export const getCurrentOptionsStorageFunc = (
|
|
107
|
+
export const getCurrentOptionsStorageFunc = (
|
|
108
|
+
routeType: string,
|
|
109
|
+
project: UI_T_Project
|
|
110
|
+
): string[] => {
|
|
111
|
+
const prefix = project === 'sphere'
|
|
107
112
|
const optionsNames = []
|
|
108
113
|
for (const key of Object.entries(localStorage)) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
if (key[0].includes('ChartOptions')) {
|
|
115
|
+
const currentOptions = useLocalStorage(key[0], undefined, prefix)
|
|
116
|
+
if (
|
|
117
|
+
key[0].includes('ChartOptions') &&
|
|
118
|
+
currentOptions.routeType === routeType
|
|
119
|
+
) {
|
|
120
|
+
optionsNames.push(key[0].replace('ChartOptions', ''))
|
|
121
|
+
}
|
|
115
122
|
}
|
|
116
123
|
}
|
|
117
124
|
return optionsNames
|
|
@@ -55,13 +55,14 @@
|
|
|
55
55
|
<script setup lang="ts">
|
|
56
56
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
57
57
|
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
58
|
+
import { UI_T_Project } from '~/models/types'
|
|
59
|
+
import { UI_I_MonitorGraphPayload } from '~/components/common/monitor/models/interfaces'
|
|
60
|
+
import { UI_T_OverviewViewType } from '~/components/common/monitor/overview/filters/models/types'
|
|
58
61
|
import {
|
|
59
62
|
periodFunc,
|
|
60
63
|
viewFunc,
|
|
61
64
|
} from '~/components/common/monitor/overview/filters/config/filterOptions'
|
|
62
|
-
import { UI_I_MonitorGraphPayload } from '~/components/common/monitor/models/interfaces'
|
|
63
65
|
import { getValidDateByOptionFunc } from '~/components/common/monitor/config/getValidDateByOption'
|
|
64
|
-
import { UI_T_OverviewViewType } from '~/components/common/monitor/overview/filters/models/types'
|
|
65
66
|
|
|
66
67
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
67
68
|
const { $formattedDatetime } = useNuxtApp()
|
|
@@ -73,7 +74,7 @@ const props = defineProps<{
|
|
|
73
74
|
view: UI_T_OverviewViewType
|
|
74
75
|
selectedPeriods: number[]
|
|
75
76
|
formatDate: string
|
|
76
|
-
|
|
77
|
+
project: UI_T_Project
|
|
77
78
|
formatTime?: string
|
|
78
79
|
}>()
|
|
79
80
|
|
|
@@ -142,7 +143,7 @@ const disabledPeriodOptions = computed<boolean>(() => props.chartType === 'pie')
|
|
|
142
143
|
|
|
143
144
|
const selectedView = ref<string>('')
|
|
144
145
|
const viewOptions = computed<UI_I_OptionItem[]>(() =>
|
|
145
|
-
viewFunc(localization.value, props.view, props.
|
|
146
|
+
viewFunc(localization.value, props.view, props.project)
|
|
146
147
|
)
|
|
147
148
|
watch(
|
|
148
149
|
() => viewOptions.value,
|