bfg-common 1.4.839 → 1.4.841
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 +17 -4
- package/assets/localization/local_en.json +17 -4
- package/assets/localization/local_hy.json +17 -4
- package/assets/localization/local_kk.json +17 -4
- package/assets/localization/local_ru.json +18 -5
- package/assets/localization/local_zh.json +17 -4
- package/components/atoms/collapse/CollapseNav.vue +4 -4
- package/components/atoms/dropdown/dropdown/Dropdown.vue +12 -0
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +2 -2
- package/components/atoms/table/dataGrid/lib/utils/export.ts +1 -1
- package/components/common/graph/GraphNew.vue +176 -176
- package/components/common/modals/confirmByInput/ConfirmByInput.vue +57 -177
- package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +103 -0
- package/components/common/modals/confirmByInput/ConfirmByInputOld.vue +204 -0
- package/components/common/monitor/advanced/Advanced.vue +196 -170
- package/components/common/monitor/advanced/AdvancedNew.vue +181 -206
- package/components/common/monitor/advanced/AdvancedOld.vue +12 -40
- package/components/common/monitor/advanced/graphView/GraphView.vue +181 -170
- package/components/common/monitor/advanced/graphView/GraphViewNew.vue +35 -35
- package/components/common/monitor/advanced/graphView/GraphViewOld.vue +56 -56
- package/components/common/monitor/advanced/table/Table.vue +31 -31
- package/components/common/monitor/advanced/table/tableNew/TableNew.vue +85 -85
- package/components/common/monitor/advanced/table/tableNew/lib/config/options.ts +139 -139
- package/components/common/monitor/advanced/table/tableNew/lib/utils/constructBody.ts +27 -27
- package/components/common/monitor/advanced/tools/Tools.vue +304 -163
- package/components/common/monitor/advanced/tools/ToolsNew.vue +220 -366
- package/components/common/monitor/advanced/tools/ToolsOld.vue +29 -165
- package/components/common/pages/tasks/Tasks.vue +3 -1
- package/components/common/pages/tasks/table/Table.vue +1 -0
- package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +23 -7
- package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +1 -0
- package/components/common/pages/tasks/table/lib/config/config.ts +2 -2
- package/components/common/portlets/customAttributes/Portlet.vue +9 -2
- package/components/common/portlets/customAttributes/lib/config/config.ts +7 -0
- package/components/common/portlets/tag/Portlet.vue +9 -2
- package/components/common/portlets/tag/lib/config/config.ts +7 -0
- package/components/common/tools/Actions.vue +5 -2
- package/lib/config/uiTable.ts +20 -20
- package/lib/models/store/interfaces.ts +1 -0
- package/package.json +2 -2
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<span v-if="props.chartTitle" class="chart-title"
|
|
6
6
|
>{{ props.chartTitle }},</span
|
|
7
7
|
>
|
|
8
|
-
<span v-if="chartTitleDate" class="chart-title uppercase">{{
|
|
9
|
-
chartTitleDate
|
|
8
|
+
<span v-if="props.chartTitleDate" class="chart-title uppercase">{{
|
|
9
|
+
props.chartTitleDate
|
|
10
10
|
}}</span>
|
|
11
11
|
</client-only>
|
|
12
12
|
</div>
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
<div class="select">
|
|
18
18
|
<select
|
|
19
19
|
id="periodSelect"
|
|
20
|
-
v-model="
|
|
20
|
+
v-model="selectedPeriodLocal"
|
|
21
21
|
data-id="period-select"
|
|
22
22
|
:disabled="props.disabledPeriod"
|
|
23
|
-
@change="
|
|
23
|
+
@change="emits('change-period')"
|
|
24
24
|
>
|
|
25
25
|
<option
|
|
26
|
-
v-for="(item, index) in periodOptions"
|
|
26
|
+
v-for="(item, index) in props.periodOptions"
|
|
27
27
|
:key="index"
|
|
28
28
|
:value="item.value"
|
|
29
29
|
>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
id="chart-options-button"
|
|
36
36
|
class="chart-options-button"
|
|
37
37
|
data-id="show-chart-options-button"
|
|
38
|
-
@click="
|
|
38
|
+
@click="isShowModalLocal = true"
|
|
39
39
|
>{{ localization.inventoryMonitor.chartOptions }}</a
|
|
40
40
|
>
|
|
41
41
|
</div>
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
<div class="select">
|
|
47
47
|
<select
|
|
48
48
|
id="viewSelect"
|
|
49
|
-
v-model="
|
|
49
|
+
v-model="selectedViewLocal"
|
|
50
50
|
data-id="view-select"
|
|
51
51
|
:disabled="props.disabledView"
|
|
52
|
-
@change="
|
|
52
|
+
@change="emits('change-view')"
|
|
53
53
|
>
|
|
54
54
|
<option
|
|
55
|
-
v-for="(item, index) in viewOptions"
|
|
55
|
+
v-for="(item, index) in props.viewOptions"
|
|
56
56
|
:key="index"
|
|
57
57
|
:value="item.value"
|
|
58
58
|
>
|
|
@@ -68,13 +68,16 @@
|
|
|
68
68
|
id="advanced-page-link"
|
|
69
69
|
data-id="advanced-page-button"
|
|
70
70
|
class="item-link"
|
|
71
|
-
@click="
|
|
71
|
+
@click="emits('open-advanced-page')"
|
|
72
72
|
>
|
|
73
73
|
<span class="vx-icon-window-popout icon"></span>
|
|
74
74
|
</a>
|
|
75
75
|
</li>
|
|
76
76
|
<li class="menu-item">
|
|
77
|
-
<atoms-dropdown
|
|
77
|
+
<atoms-dropdown
|
|
78
|
+
:drop-menu="exportMenu"
|
|
79
|
+
@select="emits('exporting', $event.action)"
|
|
80
|
+
>
|
|
78
81
|
<template #icon>
|
|
79
82
|
<a
|
|
80
83
|
id="export-link"
|
|
@@ -92,7 +95,7 @@
|
|
|
92
95
|
</div>
|
|
93
96
|
|
|
94
97
|
<common-monitor-advanced-tools-chart-options-modal
|
|
95
|
-
v-if="
|
|
98
|
+
v-if="isShowModalLocal"
|
|
96
99
|
:type="props.type"
|
|
97
100
|
:language="props.language"
|
|
98
101
|
:selected-counters-keys="props.selectedCountersKeys"
|
|
@@ -116,7 +119,7 @@
|
|
|
116
119
|
:objects-data="props.objectsData"
|
|
117
120
|
:valid-date-end="props.validDateEnd"
|
|
118
121
|
:format-date="props.formatDate"
|
|
119
|
-
@hide="
|
|
122
|
+
@hide="isShowModalLocal = false"
|
|
120
123
|
@select-row="emits('select-row', $event)"
|
|
121
124
|
@select-metric-local="emits('select-metric-local', $event)"
|
|
122
125
|
@update-chart-type="emits('update-chart-type', $event)"
|
|
@@ -124,8 +127,8 @@
|
|
|
124
127
|
@update-unit-count="emits('update-unit-count', $event)"
|
|
125
128
|
@update-period-type="emits('update-period-type', $event)"
|
|
126
129
|
@update-custom-time="emits('update-custom-time', $event)"
|
|
127
|
-
@delete-option="
|
|
128
|
-
@save-option-name="
|
|
130
|
+
@delete-option="emits('delete-option')"
|
|
131
|
+
@save-option-name="emits('save-option-name')"
|
|
129
132
|
@submit-options="emits('submit-options', $event)"
|
|
130
133
|
/>
|
|
131
134
|
</template>
|
|
@@ -133,7 +136,6 @@
|
|
|
133
136
|
<script setup lang="ts">
|
|
134
137
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
135
138
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
136
|
-
import type { UI_I_MonitorGraphPayload } from '~/components/common/monitor/lib/models/interfaces'
|
|
137
139
|
import type { UI_I_DropMenu } from '~/components/common/monitor/advanced/tools/lib/models/interfaces'
|
|
138
140
|
import type { UI_T_AdvancedType } from '~/components/common/monitor/advanced/lib/models/types'
|
|
139
141
|
import type {
|
|
@@ -144,20 +146,12 @@ import type { UI_I_OptionsForm } from '~/components/common/monitor/advanced/tool
|
|
|
144
146
|
import type { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/models/interfaces'
|
|
145
147
|
import type { UI_I_ObjectItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/models/interfaces'
|
|
146
148
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
147
|
-
import {
|
|
148
|
-
import {
|
|
149
|
-
periodFunc,
|
|
150
|
-
viewFunc,
|
|
151
|
-
exportFunc,
|
|
152
|
-
getCurrentOptionsStorageFunc,
|
|
153
|
-
} from '~/components/common/monitor/advanced/tools/lib/config/advancedToolbar'
|
|
154
|
-
import { checkDateFunc } from '~/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker'
|
|
149
|
+
import { exportFunc } from '~/components/common/monitor/advanced/tools/lib/config/advancedToolbar'
|
|
155
150
|
|
|
156
151
|
const props = defineProps<{
|
|
157
152
|
type: UI_T_AdvancedType
|
|
158
|
-
startDate: number
|
|
159
|
-
endDate: number
|
|
160
153
|
chartTitle: string
|
|
154
|
+
chartTitleDate: string
|
|
161
155
|
language: string
|
|
162
156
|
selectedCountersKeys: number[]
|
|
163
157
|
selectedMetric: UI_T_ChartHost | UI_T_ChartVm
|
|
@@ -180,12 +174,20 @@ const props = defineProps<{
|
|
|
180
174
|
objectsData: UI_I_ObjectItem[]
|
|
181
175
|
validDateEnd: number
|
|
182
176
|
formatDate: string
|
|
177
|
+
viewOptions: UI_I_OptionItem[]
|
|
178
|
+
periodOptions: UI_I_OptionItem[]
|
|
183
179
|
disabledPeriod?: boolean
|
|
184
180
|
disabledView?: boolean
|
|
185
181
|
}>()
|
|
186
182
|
|
|
183
|
+
const selectedViewLocal = defineModel<string>('selected-view')
|
|
184
|
+
const isShowModalLocal = defineModel<boolean>('is-show-modal-local')
|
|
185
|
+
const selectedPeriodLocal = defineModel<string>('selected-period')
|
|
186
|
+
|
|
187
187
|
const emits = defineEmits<{
|
|
188
|
-
(event: '
|
|
188
|
+
(event: 'save-option-name'): void
|
|
189
|
+
(event: 'change-period'): void
|
|
190
|
+
(event: 'change-view'): void
|
|
189
191
|
(event: 'exporting', value: string): void
|
|
190
192
|
(event: 'open-advanced-page'): void
|
|
191
193
|
(event: 'select-row', value: UI_I_AdvancedCounterItem[]): void
|
|
@@ -197,149 +199,11 @@ const emits = defineEmits<{
|
|
|
197
199
|
(event: 'update-custom-time', value: string): void
|
|
198
200
|
(event: 'delete-option'): void
|
|
199
201
|
(event: 'submit-options', value: UI_I_OptionsForm): void
|
|
200
|
-
(event: 'update:selected-timespan-type', value: string): void
|
|
201
202
|
}>()
|
|
202
203
|
|
|
203
|
-
const routeType = '' + useRoute().params.type
|
|
204
|
-
|
|
205
204
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
206
|
-
const { $formattedDatetime } = useNuxtApp()
|
|
207
|
-
|
|
208
|
-
const selectedView = ref<string>('')
|
|
209
|
-
const optionsNames = ref<string[]>([])
|
|
210
|
-
const viewOptions = computed<UI_I_OptionItem[]>(() =>
|
|
211
|
-
viewFunc(localization.value, props.type, optionsNames.value)
|
|
212
|
-
)
|
|
213
|
-
|
|
214
|
-
watch(
|
|
215
|
-
() => props.selectedChartOptionName,
|
|
216
|
-
(newValue) => {
|
|
217
|
-
let currentValue = ''
|
|
218
|
-
|
|
219
|
-
if (newValue) currentValue = newValue
|
|
220
|
-
else if (
|
|
221
|
-
selectedView.value &&
|
|
222
|
-
optionsNames.value.includes(selectedView.value)
|
|
223
|
-
)
|
|
224
|
-
currentValue = selectedView.value
|
|
225
|
-
else currentValue = selectedView.value || viewOptions.value[0]?.value
|
|
226
|
-
|
|
227
|
-
selectedView.value = currentValue
|
|
228
|
-
},
|
|
229
|
-
{ immediate: true }
|
|
230
|
-
)
|
|
231
|
-
|
|
232
|
-
const onDeleteOption = (): void => {
|
|
233
|
-
emits('delete-option')
|
|
234
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
const periodOptions = computed<UI_I_OptionItem[]>(() =>
|
|
238
|
-
periodFunc(localization.value, props.selectedTimespanType)
|
|
239
|
-
)
|
|
240
|
-
const selectedPeriod = computed<string>({
|
|
241
|
-
get() {
|
|
242
|
-
return props.selectedTimespanType || periodOptions.value[0].value
|
|
243
|
-
},
|
|
244
|
-
set(newValue) {
|
|
245
|
-
emits('update:selected-timespan-type', newValue)
|
|
246
|
-
},
|
|
247
|
-
})
|
|
248
|
-
|
|
249
|
-
const isShowModal = ref<boolean>(false)
|
|
250
|
-
watch(isShowModal, (newValue) => {
|
|
251
|
-
if (!newValue && !selectedView.value)
|
|
252
|
-
selectedView.value = viewOptions.value[0].value
|
|
253
|
-
})
|
|
254
|
-
|
|
255
|
-
const updateTools = (): void => {
|
|
256
|
-
const periodValue = selectedPeriod.value
|
|
257
|
-
const viewValue = selectedView.value
|
|
258
|
-
const prefix = props.project === 'sphere'
|
|
259
|
-
const selectedValue = useLocalStorage(
|
|
260
|
-
viewValue + 'ChartOptions',
|
|
261
|
-
undefined,
|
|
262
|
-
prefix
|
|
263
|
-
)
|
|
264
|
-
|
|
265
|
-
const fields = selectedValue
|
|
266
|
-
? selectedValue.counters.map((item) => item.name).join(', ')
|
|
267
|
-
: ''
|
|
268
|
-
const validPeriodData = getValidDateByOptionFunc(
|
|
269
|
-
periodValue,
|
|
270
|
-
selectedValue,
|
|
271
|
-
props.unitsCount,
|
|
272
|
-
props.selectedCustomTime
|
|
273
|
-
)
|
|
274
|
-
|
|
275
|
-
const period = [
|
|
276
|
-
Math.round(validPeriodData[0] / 1000),
|
|
277
|
-
Math.round(validPeriodData[1] / 1000),
|
|
278
|
-
]
|
|
279
|
-
|
|
280
|
-
if (periodValue === 'custom_interval' && props.periodType === 'period') {
|
|
281
|
-
const checkDateResult = checkDateFunc(
|
|
282
|
-
localization.value,
|
|
283
|
-
props.customDateFrom,
|
|
284
|
-
props.customDateTo,
|
|
285
|
-
props.customTimeFrom,
|
|
286
|
-
props.customTimeTo,
|
|
287
|
-
props.validDateEnd,
|
|
288
|
-
props.formatDate
|
|
289
|
-
)
|
|
290
|
-
if (Array.isArray(checkDateResult)) {
|
|
291
|
-
period[0] = Math.round(checkDateResult[0] / 1000)
|
|
292
|
-
period[1] = Math.round(checkDateResult[1] / 1000)
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
const tools: UI_I_MonitorGraphPayload = {
|
|
297
|
-
fields,
|
|
298
|
-
period,
|
|
299
|
-
periodType: periodValue,
|
|
300
|
-
view: viewValue,
|
|
301
|
-
}
|
|
302
|
-
if (selectedValue.metric) tools.metricType = selectedValue.metric
|
|
303
|
-
|
|
304
|
-
emits('update-timespan-type', selectedPeriod.value)
|
|
305
|
-
emits('update-tools', tools)
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
const onChangePeriod = (): void => {
|
|
309
|
-
updateTools()
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
const onChangeView = (): void => {
|
|
313
|
-
updateTools()
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
const chartTitleDate = computed<string>(() => {
|
|
317
|
-
if (!props.startDate) return ''
|
|
318
|
-
|
|
319
|
-
const start = $formattedDatetime(props.startDate, '', true)
|
|
320
|
-
const end = $formattedDatetime(props.endDate, '', true)
|
|
321
|
-
return `${start} - ${end}`
|
|
322
|
-
})
|
|
323
|
-
|
|
324
|
-
const onOpenAdvancedPage = (): void => emits('open-advanced-page')
|
|
325
205
|
|
|
326
206
|
const exportMenu = ref<UI_I_DropMenu<string>[]>(exportFunc(localization.value))
|
|
327
|
-
|
|
328
|
-
const onExportMenuItem = (item: UI_I_DropMenu<any>): void =>
|
|
329
|
-
emits('exporting', item.action)
|
|
330
|
-
|
|
331
|
-
const onShowChartOptions = (): void => {
|
|
332
|
-
isShowModal.value = true
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
const onSaveOptionName = (): void => {
|
|
336
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
onMounted(() => {
|
|
340
|
-
optionsNames.value = getCurrentOptionsStorageFunc(routeType, props.project)
|
|
341
|
-
updateTools()
|
|
342
|
-
})
|
|
343
207
|
</script>
|
|
344
208
|
|
|
345
209
|
<style scoped lang="scss">
|
|
@@ -94,7 +94,8 @@ onUnmounted(() => {
|
|
|
94
94
|
flex-direction: column; // TODO надо удалить потом (clr style)
|
|
95
95
|
height: inherit;
|
|
96
96
|
background-color: var(--background-color);
|
|
97
|
-
padding: 10px 16px
|
|
97
|
+
padding: 10px 16px 16px;
|
|
98
|
+
|
|
98
99
|
&__headline {
|
|
99
100
|
font-family: Inter, sans-serif;
|
|
100
101
|
font-weight: 400;
|
|
@@ -103,6 +104,7 @@ onUnmounted(() => {
|
|
|
103
104
|
color: var(--title-form-first-color);
|
|
104
105
|
margin-bottom: 22px;
|
|
105
106
|
}
|
|
107
|
+
|
|
106
108
|
:deep(.data-table-header) {
|
|
107
109
|
z-index: 1000 !important; // TODO надо удалить потом (clr style)
|
|
108
110
|
}
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
name="info"
|
|
6
6
|
width="16px"
|
|
7
7
|
height="16px"
|
|
8
|
-
:class="[
|
|
8
|
+
:class="[
|
|
9
|
+
'info-icon pointer',
|
|
10
|
+
{ show: isShowInfo, 'in-collapse-content': props.inCollapseContent },
|
|
11
|
+
]"
|
|
9
12
|
@click.stop="emits('toggle-error', props.id)"
|
|
10
13
|
/>
|
|
11
14
|
<ui-popup-window
|
|
@@ -42,11 +45,17 @@
|
|
|
42
45
|
<script lang="ts" setup>
|
|
43
46
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
44
47
|
|
|
45
|
-
const props =
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
const props = withDefaults(
|
|
49
|
+
defineProps<{
|
|
50
|
+
id: string
|
|
51
|
+
error: string
|
|
52
|
+
openedError: string
|
|
53
|
+
inCollapseContent?: boolean
|
|
54
|
+
}>(),
|
|
55
|
+
{
|
|
56
|
+
inCollapseContent: false,
|
|
57
|
+
}
|
|
58
|
+
)
|
|
50
59
|
|
|
51
60
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
52
61
|
|
|
@@ -77,7 +86,7 @@ const isShowInfo = computed<boolean>({
|
|
|
77
86
|
color: var(--close-icon);
|
|
78
87
|
}
|
|
79
88
|
&.show {
|
|
80
|
-
color: var(--
|
|
89
|
+
color: var(--btn-primary-fill-bg-color);
|
|
81
90
|
}
|
|
82
91
|
}
|
|
83
92
|
|
|
@@ -104,4 +113,11 @@ const isShowInfo = computed<boolean>({
|
|
|
104
113
|
}
|
|
105
114
|
}
|
|
106
115
|
}
|
|
116
|
+
|
|
117
|
+
:deep(.in-collapse-content) {
|
|
118
|
+
path,
|
|
119
|
+
circle {
|
|
120
|
+
stroke-width: 1.4 !important;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
107
123
|
</style>
|
|
@@ -175,7 +175,7 @@ export const options: UI_I_DataTableOptions = {
|
|
|
175
175
|
withActions: true,
|
|
176
176
|
inBlock: true,
|
|
177
177
|
showExport: true,
|
|
178
|
-
withCollapse: true
|
|
178
|
+
withCollapse: true,
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
export const getBodyDataFunc = (
|
|
@@ -203,7 +203,7 @@ export const getBodyDataFunc = (
|
|
|
203
203
|
icon: UI_E_RTaskStatusIcon[task.status],
|
|
204
204
|
chipColor: UI_E_RTaskChipColor[task.status],
|
|
205
205
|
error: task.error,
|
|
206
|
-
testId: `${task.taskName}-${index}-status`,
|
|
206
|
+
testId: `${task.taskName.replaceAll(/[\s.]/g, '-')}-${index}-status`,
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
const zoneNodeParams = taskConfig.zoneNodeFunc(task, nav)
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
:dragged-any="props.draggedAny"
|
|
9
9
|
:is-open="props.isOpen"
|
|
10
10
|
:portlet-id="props.portletId"
|
|
11
|
+
:is-loading="props.isLoading"
|
|
11
12
|
@toggle="onTogglePortlet"
|
|
12
13
|
>
|
|
13
|
-
<template #portletBody>
|
|
14
|
+
<template #portletBody="{ isLoadingBody }">
|
|
14
15
|
<ui-data-table
|
|
15
16
|
test-id="attributes-portlet-table"
|
|
16
17
|
:data="data"
|
|
@@ -18,6 +19,8 @@
|
|
|
18
19
|
server-off
|
|
19
20
|
:default-layout="false"
|
|
20
21
|
size="sm"
|
|
22
|
+
:loading="isLoadingBody"
|
|
23
|
+
:skeleton="skeletonData"
|
|
21
24
|
>
|
|
22
25
|
<template #notFound>
|
|
23
26
|
<div
|
|
@@ -149,9 +152,10 @@
|
|
|
149
152
|
</template>
|
|
150
153
|
</ui-data-table>
|
|
151
154
|
</template>
|
|
152
|
-
<template #portletFooter>
|
|
155
|
+
<template #portletFooter="{ isLoadingFooter }">
|
|
153
156
|
<div class="footer">
|
|
154
157
|
<ui-button
|
|
158
|
+
v-if="!isLoadingFooter"
|
|
155
159
|
test-id="add-new-attribute-button"
|
|
156
160
|
variant="text"
|
|
157
161
|
is-without-height
|
|
@@ -161,6 +165,7 @@
|
|
|
161
165
|
>
|
|
162
166
|
{{ localization.zabbix.addNew }}...
|
|
163
167
|
</ui-button>
|
|
168
|
+
<ui-portlet-skeleton-footer v-else />
|
|
164
169
|
</div>
|
|
165
170
|
</template>
|
|
166
171
|
</ui-portlet>
|
|
@@ -197,6 +202,7 @@ import {
|
|
|
197
202
|
createRow,
|
|
198
203
|
makeNewAttributeCreateActionRowFunc,
|
|
199
204
|
availableTypesFunc,
|
|
205
|
+
skeletonData,
|
|
200
206
|
} from '~/components/common/portlets/customAttributes/lib/config/config'
|
|
201
207
|
|
|
202
208
|
const props = defineProps<{
|
|
@@ -207,6 +213,7 @@ const props = defineProps<{
|
|
|
207
213
|
selectedItemName: string
|
|
208
214
|
type: UI_I_Dropdown
|
|
209
215
|
bodyItems: UI_I_DataTableBody[]
|
|
216
|
+
isLoading: boolean
|
|
210
217
|
}>()
|
|
211
218
|
|
|
212
219
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -2,6 +2,7 @@ import type {
|
|
|
2
2
|
UI_I_DataTableOptions,
|
|
3
3
|
UI_I_DataTableHeader,
|
|
4
4
|
UI_I_DataTableBody,
|
|
5
|
+
UI_I_DataTableSkeleton,
|
|
5
6
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
7
|
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
7
8
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
@@ -136,3 +137,9 @@ export const availableTypesFunc = (type: UI_I_Dropdown): UI_I_Dropdown[] => [
|
|
|
136
137
|
},
|
|
137
138
|
type,
|
|
138
139
|
]
|
|
140
|
+
|
|
141
|
+
export const skeletonData: UI_I_DataTableSkeleton = {
|
|
142
|
+
columnsCount: 3,
|
|
143
|
+
withoutPagination: true,
|
|
144
|
+
withoutHeader: true,
|
|
145
|
+
}
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
:dragged-any="props.draggedAny"
|
|
9
9
|
:is-open="props.isOpen"
|
|
10
10
|
:portlet-id="props.portletId"
|
|
11
|
+
:is-loading="props.isLoading"
|
|
11
12
|
@toggle="onTogglePortlet"
|
|
12
13
|
>
|
|
13
|
-
<template #portletBody>
|
|
14
|
+
<template #portletBody="{ isLoadingBody }">
|
|
14
15
|
<ui-data-table
|
|
15
16
|
test-id="tags-portlet-table"
|
|
16
17
|
:data="data"
|
|
@@ -18,6 +19,8 @@
|
|
|
18
19
|
server-off
|
|
19
20
|
:default-layout="false"
|
|
20
21
|
size="sm"
|
|
22
|
+
:loading="isLoadingBody"
|
|
23
|
+
:skeleton="skeletonData"
|
|
21
24
|
>
|
|
22
25
|
<!-- :loading="loading"-->
|
|
23
26
|
<template #icon="{ item }">
|
|
@@ -64,9 +67,10 @@
|
|
|
64
67
|
</template>
|
|
65
68
|
</ui-data-table>
|
|
66
69
|
</template>
|
|
67
|
-
<template #portletFooter>
|
|
70
|
+
<template #portletFooter="{ isLoadingFooter }">
|
|
68
71
|
<div class="footer">
|
|
69
72
|
<ui-button
|
|
73
|
+
v-if="!isLoadingFooter"
|
|
70
74
|
test-id="show-assign-new-tag-modal"
|
|
71
75
|
variant="text"
|
|
72
76
|
is-without-height
|
|
@@ -75,6 +79,7 @@
|
|
|
75
79
|
>
|
|
76
80
|
{{ localization.common.assignNew }}...
|
|
77
81
|
</ui-button>
|
|
82
|
+
<ui-portlet-skeleton-footer v-else />
|
|
78
83
|
</div>
|
|
79
84
|
</template>
|
|
80
85
|
</ui-portlet>
|
|
@@ -120,6 +125,7 @@ import {
|
|
|
120
125
|
tagTableHeaderOptions,
|
|
121
126
|
tagTableHeaderDataFunc,
|
|
122
127
|
tagsAssignBodyItemsTemporary,
|
|
128
|
+
skeletonData,
|
|
123
129
|
} from '~/components/common/portlets/tag/lib/config/config'
|
|
124
130
|
|
|
125
131
|
const props = defineProps<{
|
|
@@ -129,6 +135,7 @@ const props = defineProps<{
|
|
|
129
135
|
draggedAny?: boolean
|
|
130
136
|
selectedItemName: string
|
|
131
137
|
bodyItems: UI_I_DataTableBody[]
|
|
138
|
+
isLoading: boolean
|
|
132
139
|
}>()
|
|
133
140
|
|
|
134
141
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -2,6 +2,7 @@ import type {
|
|
|
2
2
|
UI_I_DataTableOptions,
|
|
3
3
|
UI_I_DataTableBody,
|
|
4
4
|
UI_I_DataTableHeader,
|
|
5
|
+
UI_I_DataTableSkeleton,
|
|
5
6
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
7
|
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
7
8
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
@@ -199,3 +200,9 @@ export const tagsAssignBodyItemsTemporary: UI_I_DataTableBody[] = [
|
|
|
199
200
|
],
|
|
200
201
|
},
|
|
201
202
|
]
|
|
203
|
+
|
|
204
|
+
export const skeletonData: UI_I_DataTableSkeleton = {
|
|
205
|
+
columnsCount: 3,
|
|
206
|
+
withoutPagination: true,
|
|
207
|
+
withoutHeader: true,
|
|
208
|
+
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
:disabled="button.disabled"
|
|
21
21
|
:multiple="button?.multiple || false"
|
|
22
22
|
class="btn-group__file"
|
|
23
|
-
@change="(event) => onSelectFiles(event, button.type)"
|
|
23
|
+
@change="(event) => onSelectFiles(event, button.type, key)"
|
|
24
24
|
/>
|
|
25
25
|
</label>
|
|
26
26
|
|
|
@@ -69,8 +69,11 @@ const onClickButton = (type: string): void => {
|
|
|
69
69
|
emits('click', type)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
const onSelectFiles = (event: Event, type: string): void => {
|
|
72
|
+
const onSelectFiles = (event: Event, type: string, key: number): void => {
|
|
73
73
|
emits('click', type, event)
|
|
74
|
+
|
|
75
|
+
const input = document.getElementById(`select-file-button-${key}`) as HTMLInputElement | null
|
|
76
|
+
input && (input.value = '')
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
const visibleCount = ref<number>(props.actions.length)
|
package/lib/config/uiTable.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { UI_I_TableTexts } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
2
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
// TODO поменять все :texts для таблицы нового дизайна
|
|
5
|
-
export const tableTextsFunc = (
|
|
6
|
-
localization: UI_I_Localization
|
|
7
|
-
): UI_I_TableTexts => {
|
|
8
|
-
return {
|
|
9
|
-
rowsPerPage: localization.common.rowsPerPage,
|
|
10
|
-
of: localization.common.of,
|
|
11
|
-
searchHere: localization.common.searchHere,
|
|
12
|
-
selected: localization.common.selected,
|
|
13
|
-
columns: localization.common.columns,
|
|
14
|
-
previous: localization.common.previous,
|
|
15
|
-
next: localization.common.next,
|
|
16
|
-
noItemsFound: localization.common.noItemsFound,
|
|
17
|
-
exportSelected: localization.common.exportSelected,
|
|
18
|
-
exportAll: localization.common.exportAll,
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
import type { UI_I_TableTexts } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
2
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
|
+
|
|
4
|
+
// TODO поменять все :texts для таблицы нового дизайна
|
|
5
|
+
export const tableTextsFunc = (
|
|
6
|
+
localization: UI_I_Localization
|
|
7
|
+
): UI_I_TableTexts => {
|
|
8
|
+
return {
|
|
9
|
+
rowsPerPage: localization.common.rowsPerPage,
|
|
10
|
+
of: localization.common.of,
|
|
11
|
+
searchHere: localization.common.searchHere,
|
|
12
|
+
selected: localization.common.selected,
|
|
13
|
+
columns: localization.common.columns,
|
|
14
|
+
previous: localization.common.previous,
|
|
15
|
+
next: localization.common.next,
|
|
16
|
+
noItemsFound: localization.common.noItemsFound,
|
|
17
|
+
exportSelected: localization.common.exportSelected,
|
|
18
|
+
exportAll: localization.common.exportAll,
|
|
19
|
+
}
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.841",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@vueuse/components": "^10.1.2",
|
|
36
36
|
"date-fns": "^2.29.3",
|
|
37
37
|
"bfg-nuxt-3-graph": "1.0.20",
|
|
38
|
-
"bfg-uikit": "1.0.
|
|
38
|
+
"bfg-uikit": "1.0.348",
|
|
39
39
|
"html2canvas": "^1.4.1",
|
|
40
40
|
"prettier-eslint": "^15.0.1"
|
|
41
41
|
}
|