bfg-common 1.1.31 → 1.1.32
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 -4
- package/assets/localization/local_en.json +1 -4
- package/assets/localization/local_hy.json +1 -4
- package/assets/localization/local_kk.json +1 -4
- package/assets/localization/local_ru.json +1 -4
- package/assets/localization/local_zh.json +1 -4
- 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 +174 -174
- 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/DataGrid.vue +5 -3
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -204
- 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/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/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/Confirmation.vue +4 -18
- package/components/common/modals/Rename.vue +165 -165
- package/components/common/monitor/advanced/Advanced.vue +0 -22
- package/components/common/monitor/advanced/tools/Tools.vue +7 -78
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +9 -218
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +9 -80
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/config/optionsActions.ts +10 -22
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/saveOptionsModal/SaveOptionsModal.vue +4 -27
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +0 -16
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +0 -16
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +29 -100
- package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +3 -29
- package/components/common/perPage/PerPage.vue +51 -51
- package/components/common/recursionTree/RecursionTree.vue +201 -201
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +445 -445
- 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/index.ts +92 -92
- 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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:show="true"
|
|
6
6
|
:title="localization.chartOptions"
|
|
7
7
|
@hide="onHide"
|
|
8
|
-
@submit="
|
|
8
|
+
@submit="onSave"
|
|
9
9
|
>
|
|
10
10
|
<template #modalBody>
|
|
11
11
|
<common-monitor-advanced-tools-chart-options-modal-notification
|
|
@@ -14,15 +14,7 @@
|
|
|
14
14
|
@remove="onRemoveAlerts"
|
|
15
15
|
/>
|
|
16
16
|
<div>
|
|
17
|
-
<common-monitor-advanced-tools-chart-options-modal-actions
|
|
18
|
-
:is-disabled-save="!selectedRows.length"
|
|
19
|
-
:options-names="optionsNames"
|
|
20
|
-
:selected-chart-option-name="localSelectedChartOptionName"
|
|
21
|
-
@save="onSaveOptions"
|
|
22
|
-
@check-validation="checkValidations"
|
|
23
|
-
@select-local-option-name="onSelectLocalOptionName"
|
|
24
|
-
@delete-chart-name="onDeleteChartName"
|
|
25
|
-
/>
|
|
17
|
+
<common-monitor-advanced-tools-chart-options-modal-actions />
|
|
26
18
|
|
|
27
19
|
<div class="horizontal-flex-container chart-options-content">
|
|
28
20
|
<common-monitor-advanced-tools-chart-options-modal-metrics
|
|
@@ -33,18 +25,10 @@
|
|
|
33
25
|
:chart="selectedMetric"
|
|
34
26
|
:language="props.language"
|
|
35
27
|
:type="props.type"
|
|
36
|
-
:selected-keys="
|
|
37
|
-
:selected-chart-type="
|
|
38
|
-
:selected-timespan-type="localSelectedTimespanType"
|
|
39
|
-
:units-count="localUnitsCount"
|
|
40
|
-
:period-type="localPeriodType"
|
|
41
|
-
:selected-custom-time="localCustomTime"
|
|
28
|
+
:selected-keys="props.selectedCountersKeys"
|
|
29
|
+
:selected-chart-type="props.selectedChartType"
|
|
42
30
|
@select-row="selectedRows = $event"
|
|
43
|
-
@update-chart-type="
|
|
44
|
-
@update-custom-time="localCustomTime = $event"
|
|
45
|
-
@update-timespan-type="timespanType = $event"
|
|
46
|
-
@update-unit-count="unitCount = $event"
|
|
47
|
-
@update-period-type="localPeriodType = $event"
|
|
31
|
+
@update-chart-type="selectedChartType = $event"
|
|
48
32
|
/>
|
|
49
33
|
</div>
|
|
50
34
|
</div>
|
|
@@ -63,7 +47,6 @@ import {
|
|
|
63
47
|
T_ChartVm,
|
|
64
48
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
|
|
65
49
|
import { metricsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics'
|
|
66
|
-
import { getCurrentOptionsStorageFunc } from '~/components/common/monitor/advanced/tools/config/advancedToolbar'
|
|
67
50
|
|
|
68
51
|
const props = defineProps<{
|
|
69
52
|
type: UI_T_AdvancedType
|
|
@@ -71,11 +54,6 @@ const props = defineProps<{
|
|
|
71
54
|
selectedCountersKeys: number[]
|
|
72
55
|
selectedMetric: T_ChartHost | T_ChartVm
|
|
73
56
|
selectedChartType: string
|
|
74
|
-
selectedTimespanType: string
|
|
75
|
-
unitsCount: number
|
|
76
|
-
periodType: string
|
|
77
|
-
selectedCustomTime: string
|
|
78
|
-
selectedChartOptionName: string
|
|
79
57
|
}>()
|
|
80
58
|
|
|
81
59
|
const emits = defineEmits<{
|
|
@@ -83,17 +61,8 @@ const emits = defineEmits<{
|
|
|
83
61
|
(event: 'select-row', value: UI_I_AdvancedCounterItem[]): void
|
|
84
62
|
(event: 'select-metric', value: string): void
|
|
85
63
|
(event: 'update-chart-type', value: string): void
|
|
86
|
-
(event: 'update-timespan-type', value: string): void
|
|
87
|
-
(event: 'update-unit-count', value: number): void
|
|
88
|
-
(event: 'update-period-type', value: string): void
|
|
89
|
-
(event: 'update-custom-time', value: string): void
|
|
90
|
-
(event: 'select-chart-name', value: string): void
|
|
91
|
-
(event: 'delete-option'): void
|
|
92
|
-
(event: 'save-option-name'): void
|
|
93
64
|
}>()
|
|
94
65
|
|
|
95
|
-
const routeType = '' + useRoute().params.type
|
|
96
|
-
|
|
97
66
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
98
67
|
|
|
99
68
|
const metricsItems = computed<UI_I_VerticalTabs[]>(() =>
|
|
@@ -103,60 +72,6 @@ const selectedMetric = ref<T_ChartHost | T_ChartVm>(
|
|
|
103
72
|
props.selectedMetric || '' + metricsItems.value[0]?.value
|
|
104
73
|
)
|
|
105
74
|
|
|
106
|
-
const localSelectedCountersKeys = ref<number[]>([])
|
|
107
|
-
watch(
|
|
108
|
-
() => props.selectedCountersKeys,
|
|
109
|
-
(newValue) => {
|
|
110
|
-
localSelectedCountersKeys.value = newValue
|
|
111
|
-
},
|
|
112
|
-
{ immediate: true, deep: true }
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
const localSelectedChartType = ref<string>('')
|
|
116
|
-
watch(
|
|
117
|
-
() => props.selectedChartType,
|
|
118
|
-
(newValue) => {
|
|
119
|
-
localSelectedChartType.value = newValue
|
|
120
|
-
},
|
|
121
|
-
{ immediate: true }
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
const localSelectedTimespanType = ref<string>('')
|
|
125
|
-
watch(
|
|
126
|
-
() => props.selectedTimespanType,
|
|
127
|
-
(newValue) => {
|
|
128
|
-
localSelectedTimespanType.value = newValue
|
|
129
|
-
},
|
|
130
|
-
{ immediate: true }
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
const localUnitsCount = ref<number>(0)
|
|
134
|
-
watch(
|
|
135
|
-
() => props.unitsCount,
|
|
136
|
-
(newValue) => {
|
|
137
|
-
localUnitsCount.value = newValue
|
|
138
|
-
},
|
|
139
|
-
{ immediate: true }
|
|
140
|
-
)
|
|
141
|
-
|
|
142
|
-
const localPeriodType = ref<string>('')
|
|
143
|
-
watch(
|
|
144
|
-
() => props.periodType,
|
|
145
|
-
(newValue) => {
|
|
146
|
-
localPeriodType.value = newValue
|
|
147
|
-
},
|
|
148
|
-
{ immediate: true }
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
const localCustomTime = ref<string>('')
|
|
152
|
-
watch(
|
|
153
|
-
() => props.selectedCustomTime,
|
|
154
|
-
(newValue) => {
|
|
155
|
-
localCustomTime.value = newValue
|
|
156
|
-
},
|
|
157
|
-
{ immediate: true }
|
|
158
|
-
)
|
|
159
|
-
|
|
160
75
|
const isShowAlerts = ref<boolean>(false)
|
|
161
76
|
const alerts = ref<string[]>([''])
|
|
162
77
|
|
|
@@ -170,15 +85,10 @@ const onHide = (): void => {
|
|
|
170
85
|
}
|
|
171
86
|
|
|
172
87
|
const selectedRows = ref<UI_I_AdvancedCounterItem[]>([])
|
|
173
|
-
const
|
|
88
|
+
const selectedChartType = ref<string>('')
|
|
174
89
|
|
|
175
90
|
const checkValidations = (): boolean => {
|
|
176
|
-
if (selectedRows.value.length)
|
|
177
|
-
alerts.value = []
|
|
178
|
-
isShowAlerts.value = false
|
|
179
|
-
|
|
180
|
-
return true
|
|
181
|
-
}
|
|
91
|
+
if (selectedRows.value.length) return true
|
|
182
92
|
|
|
183
93
|
alerts.value = [localization.value.noCountersSelected]
|
|
184
94
|
isShowAlerts.value = true
|
|
@@ -186,133 +96,14 @@ const checkValidations = (): boolean => {
|
|
|
186
96
|
return false
|
|
187
97
|
}
|
|
188
98
|
|
|
189
|
-
const
|
|
190
|
-
watch(
|
|
191
|
-
() => props.selectedChartOptionName,
|
|
192
|
-
(newValue) => {
|
|
193
|
-
localSelectedChartOptionName.value = newValue
|
|
194
|
-
},
|
|
195
|
-
{ immediate: true }
|
|
196
|
-
)
|
|
197
|
-
|
|
198
|
-
const selectedLocalOptionName = ref<string>('')
|
|
199
|
-
|
|
200
|
-
const onSubmit = (): void => {
|
|
99
|
+
const onSave = (): void => {
|
|
201
100
|
if (!checkValidations()) return
|
|
202
101
|
|
|
203
|
-
if (['select_options', 'default'].includes(selectedLocalOptionName.value))
|
|
204
|
-
selectedLocalOptionName.value = 'custom'
|
|
205
|
-
|
|
206
|
-
onSaveOptions(selectedLocalOptionName.value)
|
|
207
|
-
|
|
208
102
|
emits('select-metric', selectedMetric.value)
|
|
209
103
|
emits('select-row', selectedRows.value)
|
|
210
|
-
emits('update-chart-type',
|
|
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)
|
|
104
|
+
emits('update-chart-type', selectedChartType.value)
|
|
216
105
|
onHide()
|
|
217
106
|
}
|
|
218
|
-
|
|
219
|
-
const timespanType = ref<string>('')
|
|
220
|
-
const unitCount = ref<number>(1)
|
|
221
|
-
|
|
222
|
-
const optionsNames = ref<string[]>([])
|
|
223
|
-
|
|
224
|
-
const onSaveOptions = (name: string): void => {
|
|
225
|
-
const counters = selectedRows.value.map((item) => {
|
|
226
|
-
return {
|
|
227
|
-
id: item.id,
|
|
228
|
-
name: item.nameEn,
|
|
229
|
-
}
|
|
230
|
-
})
|
|
231
|
-
let chartType = 'line_graph'
|
|
232
|
-
if (selectedChartTypeLocal.value === 'spline') chartType = 'line_graph'
|
|
233
|
-
else if (selectedChartTypeLocal.value === 'area') chartType = 'stacked_graph'
|
|
234
|
-
|
|
235
|
-
const saveOptionsData = {
|
|
236
|
-
routeType,
|
|
237
|
-
chartType,
|
|
238
|
-
counters,
|
|
239
|
-
metric: selectedMetric.value,
|
|
240
|
-
timespan: {
|
|
241
|
-
periodType: localPeriodType.value,
|
|
242
|
-
units: localCustomTime.value,
|
|
243
|
-
unitsCount: unitCount.value,
|
|
244
|
-
type: timespanType.value,
|
|
245
|
-
},
|
|
246
|
-
}
|
|
247
|
-
useLocalStorage(`${name}ChartOptions`, saveOptionsData, false)
|
|
248
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType)
|
|
249
|
-
localSelectedChartOptionName.value = name
|
|
250
|
-
emits('save-option-name')
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
const setSelectOptions = (): void => {
|
|
254
|
-
setDefaultOptions()
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
const setDefaultOptions = (): void => {
|
|
258
|
-
selectedMetric.value = metricsItems.value[0]?.value
|
|
259
|
-
localSelectedCountersKeys.value = []
|
|
260
|
-
localSelectedChartType.value = 'spline'
|
|
261
|
-
localSelectedTimespanType.value = ''
|
|
262
|
-
localUnitsCount.value = 0
|
|
263
|
-
localPeriodType.value = ''
|
|
264
|
-
localCustomTime.value = ''
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
const setCustomOptions = (name: string): void => {
|
|
268
|
-
const selectedValue = useLocalStorage(name + 'ChartOptions', undefined, false)
|
|
269
|
-
|
|
270
|
-
if (selectedValue.routeType !== routeType) return
|
|
271
|
-
|
|
272
|
-
let currentChartType = ''
|
|
273
|
-
if (selectedValue.chartType === 'line_graph') currentChartType = 'spline'
|
|
274
|
-
else if (selectedValue.chartType === 'stacked_graph')
|
|
275
|
-
currentChartType = 'area'
|
|
276
|
-
|
|
277
|
-
selectedMetric.value = selectedValue.metric
|
|
278
|
-
localSelectedCountersKeys.value = selectedValue.counters.map(
|
|
279
|
-
(item) => item.id
|
|
280
|
-
)
|
|
281
|
-
localSelectedChartType.value = currentChartType
|
|
282
|
-
localSelectedTimespanType.value = selectedValue.timespan.type
|
|
283
|
-
localUnitsCount.value = selectedValue.timespan.unitsCount
|
|
284
|
-
localPeriodType.value = selectedValue.timespan.periodType
|
|
285
|
-
localCustomTime.value = selectedValue.timespan.units
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
const onSelectLocalOptionName = (name: string): void => {
|
|
289
|
-
selectedLocalOptionName.value = name
|
|
290
|
-
|
|
291
|
-
if (optionsNames.value.includes(name)) setCustomOptions(name)
|
|
292
|
-
else if (name === 'default') setDefaultOptions()
|
|
293
|
-
else if (name === 'select_options') setSelectOptions()
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
watch(
|
|
297
|
-
localSelectedChartOptionName,
|
|
298
|
-
(newValue) => {
|
|
299
|
-
if (!newValue) return
|
|
300
|
-
|
|
301
|
-
setCustomOptions(newValue)
|
|
302
|
-
},
|
|
303
|
-
{ immediate: true }
|
|
304
|
-
)
|
|
305
|
-
|
|
306
|
-
const onDeleteChartName = (name: string): void => {
|
|
307
|
-
window.localStorage.removeItem(name + 'ChartOptions')
|
|
308
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType)
|
|
309
|
-
setSelectOptions()
|
|
310
|
-
emits('delete-option')
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
onMounted(() => {
|
|
314
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType)
|
|
315
|
-
})
|
|
316
107
|
</script>
|
|
317
108
|
|
|
318
109
|
<style scoped lang="scss">
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
>{{ localization.chartOptions }}:</label
|
|
6
6
|
>
|
|
7
7
|
<div class="select">
|
|
8
|
-
<select id="chartOptionsSelect" v-model="
|
|
8
|
+
<select id="chartOptionsSelect" v-model="selectedChartOption">
|
|
9
9
|
<option
|
|
10
10
|
v-for="item in chartOptions"
|
|
11
11
|
:key="item.value"
|
|
12
12
|
:value="item.value"
|
|
13
|
+
disabled
|
|
13
14
|
>
|
|
14
15
|
{{ item.text }}
|
|
15
16
|
</option>
|
|
@@ -24,27 +25,15 @@
|
|
|
24
25
|
{{ localization.saveOptionsAs }}...
|
|
25
26
|
</button>
|
|
26
27
|
<common-monitor-advanced-tools-chart-options-modal-actions-save-options-modal
|
|
27
|
-
v-
|
|
28
|
+
v-show="isShowSaveOptionsModal"
|
|
28
29
|
@hide="onHideSaveOptionsModal"
|
|
29
30
|
@save="onSaveOptions"
|
|
30
31
|
/>
|
|
31
|
-
<button
|
|
32
|
-
class="btn chart-options-delete-button"
|
|
33
|
-
:disabled="!disabledDeleteAction"
|
|
34
|
-
@click="onDeleteAction"
|
|
35
|
-
>
|
|
32
|
+
<button class="btn chart-options-delete-button" disabled="">
|
|
36
33
|
{{ localization.deleteOptions }}
|
|
37
34
|
</button>
|
|
38
35
|
</div>
|
|
39
36
|
</div>
|
|
40
|
-
|
|
41
|
-
<common-modals-confirmation
|
|
42
|
-
v-if="isConfirmModal"
|
|
43
|
-
headline="localization.deletingSavedSettings"
|
|
44
|
-
:description="confirmModalDesc"
|
|
45
|
-
@hide-modal="isConfirmModal = false"
|
|
46
|
-
@confirm="onApplyDelete"
|
|
47
|
-
/>
|
|
48
37
|
</template>
|
|
49
38
|
|
|
50
39
|
<script setup lang="ts">
|
|
@@ -52,79 +41,19 @@ import { UI_I_Localization } from '~/models/interfaces'
|
|
|
52
41
|
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
53
42
|
import { chartOptionItemsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/actions/config/optionsActions'
|
|
54
43
|
|
|
55
|
-
const props = defineProps<{
|
|
56
|
-
isDisabledSave: boolean
|
|
57
|
-
optionsNames: string[]
|
|
58
|
-
selectedChartOptionName: string
|
|
59
|
-
}>()
|
|
60
|
-
|
|
61
|
-
const emits = defineEmits<{
|
|
62
|
-
(event: 'save', value: string): void
|
|
63
|
-
(event: 'check-validation'): void
|
|
64
|
-
(event: 'select-local-option-name', value: string): void
|
|
65
|
-
(event: 'delete-chart-name', value: string): void
|
|
66
|
-
}>()
|
|
67
|
-
|
|
68
44
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
69
45
|
|
|
70
|
-
const
|
|
71
|
-
const disabledDeleteAction = computed<boolean>(() => {
|
|
72
|
-
const chartOptionName = localSelectedChartOption.value
|
|
73
|
-
let result = false
|
|
74
|
-
|
|
75
|
-
if (chartOptionName !== 'select_options' && chartOptionName !== 'default')
|
|
76
|
-
result = true
|
|
77
|
-
|
|
78
|
-
return result
|
|
79
|
-
})
|
|
46
|
+
const selectedChartOption = ref<string>('select_options')
|
|
80
47
|
const chartOptions = computed<UI_I_OptionItem[]>(() =>
|
|
81
|
-
chartOptionItemsFunc(localization.value
|
|
82
|
-
)
|
|
83
|
-
watch(
|
|
84
|
-
() => props.selectedChartOptionName,
|
|
85
|
-
(newValue) => {
|
|
86
|
-
localSelectedChartOption.value =
|
|
87
|
-
newValue || localSelectedChartOption.value || 'select_options'
|
|
88
|
-
},
|
|
89
|
-
{ immediate: true }
|
|
90
|
-
)
|
|
91
|
-
watch(
|
|
92
|
-
localSelectedChartOption,
|
|
93
|
-
(newValue) => {
|
|
94
|
-
emits('select-local-option-name', newValue)
|
|
95
|
-
},
|
|
96
|
-
{ immediate: true }
|
|
48
|
+
chartOptionItemsFunc(localization.value)
|
|
97
49
|
)
|
|
98
50
|
|
|
99
51
|
const isShowSaveOptionsModal = ref<boolean>(false)
|
|
100
|
-
const onShowSaveOptionsModal = ():
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
emits('check-validation')
|
|
104
|
-
}
|
|
52
|
+
const onShowSaveOptionsModal = (): boolean =>
|
|
53
|
+
(isShowSaveOptionsModal.value = true)
|
|
105
54
|
const onHideSaveOptionsModal = (): boolean =>
|
|
106
55
|
(isShowSaveOptionsModal.value = false)
|
|
107
|
-
const onSaveOptions = (
|
|
108
|
-
onHideSaveOptionsModal()
|
|
109
|
-
emits('save', name)
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const isConfirmModal = ref<boolean>(false)
|
|
113
|
-
const confirmModalDesc = ref<string>('')
|
|
114
|
-
|
|
115
|
-
const onDeleteAction = (): void => {
|
|
116
|
-
confirmModalDesc.value = localization.value.deletingSavedSettingsDesc.replace(
|
|
117
|
-
'{0}',
|
|
118
|
-
localSelectedChartOption.value
|
|
119
|
-
)
|
|
120
|
-
isConfirmModal.value = true
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const onApplyDelete = (): void => {
|
|
124
|
-
isConfirmModal.value = false
|
|
125
|
-
emits('delete-chart-name', localSelectedChartOption.value)
|
|
126
|
-
localSelectedChartOption.value = 'select_options'
|
|
127
|
-
}
|
|
56
|
+
const onSaveOptions = (): boolean => onHideSaveOptionsModal()
|
|
128
57
|
</script>
|
|
129
58
|
|
|
130
59
|
<style scoped lang="scss">
|
package/components/common/monitor/advanced/tools/chartOptionsModal/actions/config/optionsActions.ts
CHANGED
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
2
2
|
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
3
3
|
|
|
4
|
-
export const chartOptionItemsFunc = (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
text: localization.default,
|
|
15
|
-
value: 'default',
|
|
16
|
-
},
|
|
17
|
-
]
|
|
18
|
-
names.forEach((name) => {
|
|
19
|
-
mainOptionsNames.push({
|
|
20
|
-
text: name,
|
|
21
|
-
value: name,
|
|
22
|
-
})
|
|
23
|
-
})
|
|
24
|
-
return mainOptionsNames
|
|
25
|
-
}
|
|
4
|
+
export const chartOptionItemsFunc = (localization: UI_I_Localization): UI_I_OptionItem[] => [
|
|
5
|
+
{
|
|
6
|
+
text: `--${localization.selectOption}--`,
|
|
7
|
+
value: 'select_options',
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
text: localization.default,
|
|
11
|
+
value: 'default',
|
|
12
|
+
},
|
|
13
|
+
]
|
|
@@ -7,16 +7,11 @@
|
|
|
7
7
|
@submit="onSave"
|
|
8
8
|
>
|
|
9
9
|
<template #modalBody>
|
|
10
|
-
<common-monitor-advanced-tools-chart-options-modal-notification
|
|
11
|
-
v-show="isShowAlerts"
|
|
12
|
-
:alerts="alerts"
|
|
13
|
-
@remove="onRemoveAlerts"
|
|
14
|
-
/>
|
|
15
10
|
<div class="form-control">
|
|
16
11
|
<label class="save-option-name-label" for="chartOptionsName"
|
|
17
12
|
>{{ localization.chartOptionsName }}:</label
|
|
18
13
|
>
|
|
19
|
-
<input id="chartOptionsName"
|
|
14
|
+
<input id="chartOptionsName" type="text" />
|
|
20
15
|
</div>
|
|
21
16
|
</template>
|
|
22
17
|
</atoms-modal>
|
|
@@ -27,40 +22,22 @@ import { UI_I_Localization } from '~/models/interfaces'
|
|
|
27
22
|
|
|
28
23
|
const emits = defineEmits<{
|
|
29
24
|
(event: 'hide'): void
|
|
30
|
-
(event: 'save'
|
|
25
|
+
(event: 'save'): void
|
|
31
26
|
}>()
|
|
32
27
|
|
|
33
28
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
34
29
|
|
|
35
|
-
const name = ref<string>('')
|
|
36
|
-
const isShowAlerts = ref<boolean>(false)
|
|
37
|
-
const alerts = ref<string[]>([])
|
|
38
|
-
|
|
39
30
|
const onHide = (): void => {
|
|
40
31
|
emits('hide')
|
|
41
32
|
}
|
|
42
33
|
const onSave = (): void => {
|
|
43
|
-
|
|
44
|
-
alerts.value = [localization.value.settingsNameErrorDesc + 'aaa']
|
|
45
|
-
isShowAlerts.value = true
|
|
46
|
-
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
emits('save', name.value)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const onRemoveAlerts = (): void => {
|
|
54
|
-
isShowAlerts.value = false
|
|
55
|
-
alerts.value = []
|
|
34
|
+
emits('save')
|
|
56
35
|
}
|
|
57
36
|
</script>
|
|
58
37
|
|
|
59
38
|
<style scoped lang="scss">
|
|
60
39
|
:deep(.modal-dialog) {
|
|
61
|
-
|
|
62
|
-
margin-bottom: 20px;
|
|
63
|
-
}
|
|
40
|
+
max-height: 220px;
|
|
64
41
|
|
|
65
42
|
.form-control {
|
|
66
43
|
display: flex;
|
|
@@ -10,15 +10,7 @@
|
|
|
10
10
|
:language="props.language"
|
|
11
11
|
:selected="selectedOptions"
|
|
12
12
|
:selected-chart-type="props.selectedChartType"
|
|
13
|
-
:selected-timespan-type="props.selectedTimespanType"
|
|
14
|
-
:units-count="props.unitsCount"
|
|
15
|
-
:period-type="props.periodType"
|
|
16
|
-
:selected-custom-time="props.selectedCustomTime"
|
|
17
13
|
@update-chart-type="emits('update-chart-type', $event)"
|
|
18
|
-
@update-custom-time="emits('update-custom-time', $event)"
|
|
19
|
-
@update-timespan-type="emits('update-timespan-type', $event)"
|
|
20
|
-
@update-unit-count="emits('update-unit-count', $event)"
|
|
21
|
-
@update-period-type="emits('update-period-type', $event)"
|
|
22
14
|
/>
|
|
23
15
|
</div>
|
|
24
16
|
</template>
|
|
@@ -40,19 +32,11 @@ const props = defineProps<{
|
|
|
40
32
|
type: UI_T_AdvancedType
|
|
41
33
|
selectedKeys: number[]
|
|
42
34
|
selectedChartType: string
|
|
43
|
-
selectedTimespanType: string
|
|
44
|
-
unitsCount: number
|
|
45
|
-
periodType: string
|
|
46
|
-
selectedCustomTime: string
|
|
47
35
|
}>()
|
|
48
36
|
|
|
49
37
|
const emits = defineEmits<{
|
|
50
38
|
(event: 'select-row', value: UI_I_AdvancedCounterItem[]): void
|
|
51
39
|
(event: 'update-chart-type', value: string): void
|
|
52
|
-
(event: 'update-custom-time', value: string): void
|
|
53
|
-
(event: 'update-timespan-type', value: string): void
|
|
54
|
-
(event: 'update-unit-count', value: number): void
|
|
55
|
-
(event: 'update-period-type', value: string): void
|
|
56
40
|
}>()
|
|
57
41
|
|
|
58
42
|
const selectedOptions = ref<UI_I_AdvancedTargetObject[][]>([])
|
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue
CHANGED
|
@@ -3,15 +3,7 @@
|
|
|
3
3
|
<common-monitor-advanced-tools-chart-options-modal-counters-timespan-form
|
|
4
4
|
:language="props.language"
|
|
5
5
|
:selected-chart-type="props.selectedChartType"
|
|
6
|
-
:selected-timespan-type="props.selectedTimespanType"
|
|
7
|
-
:units-count="props.unitsCount"
|
|
8
|
-
:period-type="props.periodType"
|
|
9
|
-
:selected-custom-time="props.selectedCustomTime"
|
|
10
6
|
@update-chart-type="emits('update-chart-type', $event)"
|
|
11
|
-
@update-custom-time="emits('update-custom-time', $event)"
|
|
12
|
-
@update-timespan-type="emits('update-timespan-type', $event)"
|
|
13
|
-
@update-unit-count="emits('update-unit-count', $event)"
|
|
14
|
-
@update-period-type="emits('update-period-type', $event)"
|
|
15
7
|
/>
|
|
16
8
|
<common-monitor-advanced-tools-chart-options-modal-counters-timespan-object
|
|
17
9
|
:selected="props.selected"
|
|
@@ -26,18 +18,10 @@ const props = defineProps<{
|
|
|
26
18
|
selected: UI_I_AdvancedTargetObject[][]
|
|
27
19
|
language: string
|
|
28
20
|
selectedChartType: string
|
|
29
|
-
selectedTimespanType: string
|
|
30
|
-
unitsCount: number
|
|
31
|
-
periodType: string
|
|
32
|
-
selectedCustomTime: string
|
|
33
21
|
}>()
|
|
34
22
|
|
|
35
23
|
const emits = defineEmits<{
|
|
36
24
|
(event: 'update-chart-type', value: string): void
|
|
37
|
-
(event: 'update-custom-time', value: string): void
|
|
38
|
-
(event: 'update-timespan-type', value: string): void
|
|
39
|
-
(event: 'update-unit-count', value: number): void
|
|
40
|
-
(event: 'update-period-type', value: string): void
|
|
41
25
|
}>()
|
|
42
26
|
</script>
|
|
43
27
|
|