bfg-common 1.4.884 → 1.4.886
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 +3025 -3018
- package/assets/localization/local_en.json +3029 -3022
- package/assets/localization/local_hy.json +3029 -3022
- package/assets/localization/local_kk.json +8 -1
- package/assets/localization/local_ru.json +8 -1
- package/assets/localization/local_zh.json +8 -2
- package/components/common/graph/GraphNew.vue +179 -178
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +106 -106
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/ActionsNew.vue +1 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/lib/utils/optionsActions.ts +28 -25
- package/components/common/monitor/overview/Overview.vue +132 -224
- package/components/common/monitor/overview/OverviewNew.vue +120 -142
- package/components/common/monitor/overview/filters/Filters.vue +169 -166
- package/components/common/monitor/overview/filters/FiltersNew.vue +183 -172
- package/components/common/monitor/overview/filters/FiltersOld.vue +2 -0
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +173 -175
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModalNew.vue +209 -186
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModalOld.vue +2 -2
- package/package.json +2 -2
package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModalNew.vue
CHANGED
|
@@ -1,186 +1,209 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ui-modal
|
|
3
|
-
show
|
|
4
|
-
:title="titleLocal"
|
|
5
|
-
:subtitle="props.
|
|
6
|
-
:texts="modalTexts"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
//
|
|
133
|
-
//
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<ui-modal
|
|
3
|
+
show
|
|
4
|
+
:title="titleLocal"
|
|
5
|
+
:subtitle="props.selectedNodeName"
|
|
6
|
+
:texts="modalTexts"
|
|
7
|
+
width="560px"
|
|
8
|
+
test-id="overview-custom-interval-modal"
|
|
9
|
+
@hide="onHide"
|
|
10
|
+
@submit="onSubmit"
|
|
11
|
+
>
|
|
12
|
+
<template #content>
|
|
13
|
+
<div class="time-range">
|
|
14
|
+
<ui-alert
|
|
15
|
+
v-show="alertShow"
|
|
16
|
+
status="alert-danger"
|
|
17
|
+
:messages="props.alertItems"
|
|
18
|
+
class="overview-alert"
|
|
19
|
+
test-id="overview-alert"
|
|
20
|
+
size="md"
|
|
21
|
+
hide-close-button
|
|
22
|
+
@remove="alertShow = false"
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<p class="date-time-format-description">
|
|
26
|
+
{{ localization.inventoryMonitor.dateTimeIsoFormat }}
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<div class="filed-wrap from">
|
|
30
|
+
<lable for="date-from" class="filed-lable">{{
|
|
31
|
+
localization.inventoryMonitor.from
|
|
32
|
+
}}</lable>
|
|
33
|
+
<ui-input-with-datepicker
|
|
34
|
+
id="date-from"
|
|
35
|
+
v-model="currentDateFromLocal"
|
|
36
|
+
:format="datepickerFormat"
|
|
37
|
+
:local="props.currentLang"
|
|
38
|
+
:datepicker-texts="datepickerTexts"
|
|
39
|
+
:placeholder="datepickerTexts.ddMmYyyy"
|
|
40
|
+
test-id="date-from"
|
|
41
|
+
time-format="12"
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="filed-wrap">
|
|
46
|
+
<lable for="date-to" class="filed-lable">{{
|
|
47
|
+
localization.common.on2
|
|
48
|
+
}}</lable>
|
|
49
|
+
<ui-input-with-datepicker
|
|
50
|
+
id="date-to"
|
|
51
|
+
v-model="currentDateToLocal"
|
|
52
|
+
:format="datepickerFormat"
|
|
53
|
+
:local="props.currentLang"
|
|
54
|
+
:datepicker-texts="datepickerTexts"
|
|
55
|
+
:placeholder="datepickerTexts.ddMmYyyy"
|
|
56
|
+
:max="maxDateTo"
|
|
57
|
+
test-id="date-to"
|
|
58
|
+
time-format="12"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<template #footerLeftContent><span></span></template>
|
|
65
|
+
</ui-modal>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script setup lang="ts">
|
|
69
|
+
import type { UI_I_ModalTexts } from 'bfg-uikit/components/ui/modal/models/interfaces'
|
|
70
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
71
|
+
import { getUiDatepickerFormatByLanguage } from '~/lib/utils/date'
|
|
72
|
+
|
|
73
|
+
const alertShow = defineModel<boolean>('alert-show')
|
|
74
|
+
const currentDateFrom = defineModel<string>('current-date-from')
|
|
75
|
+
// const dateFrom = defineModel<string>('date-from')
|
|
76
|
+
const currentTimeFrom = defineModel<string>('current-time-from')
|
|
77
|
+
const currentDateTo = defineModel<string>('current-date-to')
|
|
78
|
+
// const dateTo = defineModel<string>('date-to')
|
|
79
|
+
const currentTimeTo = defineModel<string>('current-time-to')
|
|
80
|
+
|
|
81
|
+
const props = defineProps<{
|
|
82
|
+
titleIntervalModal: string
|
|
83
|
+
selectedNodeName: string
|
|
84
|
+
currentLang: string
|
|
85
|
+
alertItems: any[]
|
|
86
|
+
formatDate: string
|
|
87
|
+
}>()
|
|
88
|
+
|
|
89
|
+
const emits = defineEmits<{
|
|
90
|
+
(event: 'hide'): void
|
|
91
|
+
(event: 'submit'): void
|
|
92
|
+
(event: 'update-date-from', value: any): void
|
|
93
|
+
(event: 'update-date-to', value: any): void
|
|
94
|
+
}>()
|
|
95
|
+
|
|
96
|
+
const { $isDate, $getUnixByDate, $formattedDate, $formattedTime } = useNuxtApp()
|
|
97
|
+
|
|
98
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
99
|
+
|
|
100
|
+
const datepickerTexts = computed<UI_I_DatepickerTexts>(() => {
|
|
101
|
+
return {
|
|
102
|
+
thisYear: localization.value.common.thisYear,
|
|
103
|
+
thisMonth: localization.value.common.thisMonth,
|
|
104
|
+
today: localization.value.common.today,
|
|
105
|
+
now: localization.value.common.now,
|
|
106
|
+
hhMmSs: localization.value.common.hhMmSs,
|
|
107
|
+
ddMmYyyy: localization.value.common.ddMmYyyy,
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
const datepickerFormat = computed<string>(() =>
|
|
112
|
+
getUiDatepickerFormatByLanguage(props.currentLang)
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
const titleLocal = computed<string>(() =>
|
|
116
|
+
props.titleIntervalModal.replace(':', '')
|
|
117
|
+
)
|
|
118
|
+
const modalTexts = computed<UI_I_ModalTexts>(() => ({
|
|
119
|
+
button1: localization.value.common.cancel,
|
|
120
|
+
button2: localization.value.common.save,
|
|
121
|
+
}))
|
|
122
|
+
|
|
123
|
+
const currentDateFromLocal = computed<number>({
|
|
124
|
+
get() {
|
|
125
|
+
// console.log(currentDateFrom.value, 11111, currentTimeFrom.value)
|
|
126
|
+
// TODO fix PM
|
|
127
|
+
return $isDate(currentDateFrom.value)
|
|
128
|
+
? $getUnixByDate(currentDateFrom.value + ' ' + currentTimeFrom.value)
|
|
129
|
+
: 0
|
|
130
|
+
},
|
|
131
|
+
set(newValue) {
|
|
132
|
+
// console.log($formattedDate(new Date(newValue), props.formatDate), 22222)
|
|
133
|
+
// console.log($formattedTime(newValue, '', true), 33333)
|
|
134
|
+
currentDateFrom.value = $formattedDate(new Date(newValue), props.formatDate)
|
|
135
|
+
currentTimeFrom.value = $formattedTime(newValue, '', true)
|
|
136
|
+
},
|
|
137
|
+
})
|
|
138
|
+
const currentDateToLocal = computed<number>({
|
|
139
|
+
get() {
|
|
140
|
+
// TODO fix PM
|
|
141
|
+
return $isDate(currentDateTo.value)
|
|
142
|
+
? $getUnixByDate(currentDateTo.value + ' ' + currentTimeTo.value)
|
|
143
|
+
: 0
|
|
144
|
+
},
|
|
145
|
+
set(newValue) {
|
|
146
|
+
currentDateTo.value = $formattedDate(new Date(newValue), props.formatDate)
|
|
147
|
+
currentTimeTo.value = $formattedTime(newValue, '', true)
|
|
148
|
+
},
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
const maxDateTo = ref<number>(new Date().getTime())
|
|
152
|
+
|
|
153
|
+
// const onUpdateDateFrom = (event: any): void => {
|
|
154
|
+
// emits('update-date-from', event)
|
|
155
|
+
// }
|
|
156
|
+
// const onUpdateDateTo = (event: any): void => {
|
|
157
|
+
// emits('update-date-to', event)
|
|
158
|
+
// }
|
|
159
|
+
|
|
160
|
+
const onSubmit = (): void => {
|
|
161
|
+
emits('submit')
|
|
162
|
+
}
|
|
163
|
+
const onHide = (): void => {
|
|
164
|
+
emits('hide')
|
|
165
|
+
}
|
|
166
|
+
</script>
|
|
167
|
+
|
|
168
|
+
<style>
|
|
169
|
+
:root {
|
|
170
|
+
--overview-time-range-lable-color: #4d5d69;
|
|
171
|
+
--overview-time-range-border-color: rgba(233, 235, 237, 0.64);
|
|
172
|
+
}
|
|
173
|
+
:root.dark-theme {
|
|
174
|
+
--overview-time-range-lable-color: #e9eaec;
|
|
175
|
+
--overview-time-range-border-color: #e9ebed1f;
|
|
176
|
+
}
|
|
177
|
+
</style>
|
|
178
|
+
<style scoped lang="scss">
|
|
179
|
+
.time-range {
|
|
180
|
+
padding: 16px 32px 0;
|
|
181
|
+
|
|
182
|
+
.overview-alert {
|
|
183
|
+
margin-bottom: 16px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.date-time-format-description {
|
|
187
|
+
font-size: 12px;
|
|
188
|
+
color: #9da6ad;
|
|
189
|
+
padding-bottom: 12px;
|
|
190
|
+
border-bottom: 1px solid var(--overview-time-range-border-color);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.filed-wrap {
|
|
194
|
+
margin-bottom: 16px;
|
|
195
|
+
|
|
196
|
+
&.from {
|
|
197
|
+
margin-bottom: 24px;
|
|
198
|
+
}
|
|
199
|
+
.filed-lable {
|
|
200
|
+
display: block;
|
|
201
|
+
font-size: 16px;
|
|
202
|
+
font-weight: 500;
|
|
203
|
+
color: var(--overview-time-range-lable-color);
|
|
204
|
+
margin: 16px 0;
|
|
205
|
+
text-transform: capitalize;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
</style>
|
package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModalOld.vue
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
show
|
|
4
4
|
width="580px"
|
|
5
5
|
:title="props.titleIntervalModal"
|
|
6
|
-
:second-title="props.
|
|
6
|
+
:second-title="props.selectedNodeName"
|
|
7
7
|
test-id="overview-custom-interval-modal"
|
|
8
8
|
@hide="onHide"
|
|
9
9
|
@submit="onSubmit"
|
|
@@ -116,7 +116,7 @@ const currentTimeTo = defineModel<boolean>('current-time-to')
|
|
|
116
116
|
|
|
117
117
|
const props = defineProps<{
|
|
118
118
|
titleIntervalModal: string
|
|
119
|
-
|
|
119
|
+
selectedNodeName: string
|
|
120
120
|
currentLang: string
|
|
121
121
|
alertItems: any[]
|
|
122
122
|
}>()
|
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.886",
|
|
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.21",
|
|
38
|
-
"bfg-uikit": "1.0.
|
|
38
|
+
"bfg-uikit": "1.0.369",
|
|
39
39
|
"html2canvas": "^1.4.1",
|
|
40
40
|
"prettier-eslint": "^15.0.1"
|
|
41
41
|
}
|