bfg-common 1.4.861 → 1.4.862

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.
Files changed (56) hide show
  1. package/.idea/inspectionProfiles/Project_Default.xml +2 -1
  2. package/assets/localization/local_be.json +3012 -3009
  3. package/assets/localization/local_en.json +5 -2
  4. package/assets/localization/local_hy.json +5 -2
  5. package/assets/localization/local_kk.json +5 -2
  6. package/assets/localization/local_ru.json +5 -2
  7. package/assets/localization/local_zh.json +5 -2
  8. package/components/common/chartOptionsModal/counters/timespan/form/Form.vue +40 -313
  9. package/components/common/chartOptionsModal/counters/timespan/form/FormNew.vue +241 -0
  10. package/components/common/chartOptionsModal/counters/timespan/form/FormOld.vue +372 -0
  11. package/components/common/graph/GraphOld.vue +50 -31
  12. package/components/common/monitor/advanced/Advanced.vue +0 -3
  13. package/components/common/monitor/advanced/AdvancedNew.vue +0 -2
  14. package/components/common/monitor/advanced/AdvancedOld.vue +0 -2
  15. package/components/common/monitor/advanced/graphView/GraphView.vue +16 -18
  16. package/components/common/monitor/advanced/tools/Tools.vue +0 -3
  17. package/components/common/monitor/advanced/tools/ToolsNew.vue +0 -2
  18. package/components/common/monitor/advanced/tools/ToolsOld.vue +0 -2
  19. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +113 -114
  20. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModalNew.vue +190 -0
  21. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModalOld.vue +189 -0
  22. package/components/common/monitor/advanced/tools/chartOptionsModal/Notification.vue +13 -20
  23. package/components/common/monitor/advanced/tools/chartOptionsModal/NotificationNew.vue +20 -0
  24. package/components/common/monitor/advanced/tools/chartOptionsModal/NotificationOld.vue +27 -0
  25. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +28 -79
  26. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/ActionsNew.vue +160 -0
  27. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/ActionsOld.vue +114 -0
  28. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +75 -56
  29. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/CountersNew.vue +97 -0
  30. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/CountersOld.vue +110 -0
  31. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +19 -58
  32. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableNew/TableNew.vue +46 -0
  33. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableNew/config/options.ts +19 -0
  34. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableNew/config/tableData.ts +71 -0
  35. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableNew/utils/constructTable.ts +29 -0
  36. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableOld/TableOld.vue +85 -0
  37. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{lib → tableOld/lib}/config/tableConfig.ts +1 -1
  38. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +71 -47
  39. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/TimespanNew.vue +150 -0
  40. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/TimespanOld.vue +95 -0
  41. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +21 -26
  42. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/ObjectNew.vue +56 -0
  43. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/lib/config/options.ts +25 -0
  44. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/lib/config/tableData.ts +47 -0
  45. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/lib/utils/constructTable.ts +22 -0
  46. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectOld/ObjectOld.vue +84 -0
  47. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +17 -29
  48. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/MetricsOld.vue +32 -0
  49. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/metricsNew/MetricsNew.vue +101 -0
  50. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/metricsNew/lib/utils/constructAccordion.ts +32 -0
  51. package/components/common/monitor/overview/Overview.vue +224 -221
  52. package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModalNew.vue +186 -181
  53. package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +26 -30
  54. package/lib/utils/date.ts +12 -0
  55. package/package.json +2 -2
  56. /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{lib → tableOld/lib}/models/types.ts +0 -0
@@ -1,221 +1,224 @@
1
- <template>
2
- <common-monitor-overview-new
3
- v-if="isNewView"
4
- :charts="chartsLocal"
5
- :all-data="allData"
6
- :update-helper="updateHelper"
7
- />
8
- <common-monitor-overview-old
9
- v-else
10
- :charts="chartsLocal"
11
- :all-data="allData"
12
- :update-helper="updateHelper"
13
- />
14
- </template>
15
-
16
- <script setup lang="ts">
17
- import { format } from 'date-fns'
18
- import type {
19
- I_SeriesColumn,
20
- I_SeriesLine,
21
- I_ColumnGraph,
22
- I_LineGraph,
23
- } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
24
- import {
25
- columnGraphDataFunc,
26
- graphDataFunc,
27
- } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/utils/renderGraph'
28
- import type { UI_I_Localization } from '~/lib/models/interfaces'
29
- import type { UI_I_GraphDataSettingItem } from '~/components/common/monitor/lib/models/interfaces'
30
-
31
- const props = defineProps<{
32
- charts: UI_I_GraphDataSettingItem[]
33
- themeMode?: string
34
- formatDate?: string
35
- formatTime?: string
36
- graphType: string
37
- }>()
38
-
39
- const { $formattedDatetime, $store }: any = useNuxtApp()
40
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
41
-
42
- const localization = computed<UI_I_Localization>(() => useLocal())
43
-
44
- const allData = ref<UI_I_GraphDataSettingItem[]>([])
45
-
46
- const chartsLocal = ref<any>([])
47
-
48
- const getCurrentChart = (chart: any): void => {
49
- chartsLocal.value = chart
50
- }
51
-
52
- const instanceOfSeriesLine = (
53
- object: I_SeriesLine | I_SeriesColumn
54
- ): object is I_SeriesLine => {
55
- return 'lines' in object
56
- }
57
-
58
- const getCurrentData = (
59
- chart: UI_I_GraphDataSettingItem,
60
- chartType: string
61
- ): I_LineGraph | I_ColumnGraph | null => {
62
- if (!chart || !chart.data) return null
63
-
64
- const themeMode = useLocalStorage('themeMode') || props.themeMode
65
- const isDarkMode = themeMode === 'dark-theme'
66
-
67
- let graphData = null
68
-
69
- if (chartType === 'column' && !instanceOfSeriesLine(chart.data)) {
70
- graphData = columnGraphDataFunc(chart, localization.value, isDarkMode)
71
- } else if (instanceOfSeriesLine(chart.data)) {
72
- graphData = graphDataFunc(
73
- chart.data,
74
- isDarkMode,
75
- localization.value,
76
- () => {},
77
- false,
78
- true,
79
- true,
80
- props.graphType,
81
- '',
82
- 700,
83
- getCurrentChart,
84
- $formattedDatetime,
85
- format,
86
- props.formatDate,
87
- props.formatTime
88
- )
89
- }
90
-
91
- return graphData
92
- }
93
-
94
- const updateHelper = ref<number>(0)
95
-
96
- const updateGraph = (charts: Array<UI_I_GraphDataSettingItem | null>): void => {
97
- allData.value = []
98
- charts.forEach((chart) => {
99
- if (chart && chart.data) {
100
- const constructedData = getCurrentData(chart, chart.chartType)
101
- if (constructedData)
102
- allData.value.push({
103
- title: chart.title,
104
- loader: chart.loader,
105
- data: constructedData,
106
- chartType: 'column',
107
- })
108
- } else {
109
- allData.value.push({
110
- title: '',
111
- loader: chart.loader,
112
- data: null,
113
- chartType: 'column',
114
- })
115
- }
116
- })
117
- updateHelper.value++
118
- }
119
-
120
- watch(
121
- () => props.charts,
122
- (newValue) => {
123
- updateGraph(newValue)
124
- },
125
- { deep: true, immediate: true }
126
- )
127
- </script>
128
-
129
- <style>
130
- :root {
131
- --loader-bg-color: #ffffff;
132
- }
133
- :root.dark-theme {
134
- --loader-bg-color: #22343c;
135
- }
136
- </style>
137
-
138
- <style scoped lang="scss">
139
- .charts-view {
140
- position: relative;
141
- display: flex;
142
- flex-direction: row;
143
- flex-wrap: wrap;
144
- justify-content: space-between;
145
- overflow: auto;
146
- height: 100%;
147
-
148
- .graphic-loader-block {
149
- background-color: var(--loader-bg-color);
150
- height: 100%;
151
- display: flex;
152
- flex-direction: column;
153
- align-items: center;
154
- justify-content: center;
155
- }
156
-
157
- .graph-empty-block {
158
- display: flex;
159
- flex-direction: column;
160
- height: 100%;
161
- background-color: var(--loader-bg-color);
162
-
163
- .title {
164
- text-align: center;
165
- font-size: 18px;
166
- margin-top: 10px;
167
- color: var(--global-font-color);
168
- }
169
-
170
- .body-block {
171
- height: 100%;
172
- display: flex;
173
- justify-content: center;
174
- text-align: center;
175
- align-items: center;
176
- color: var(--global-font-color);
177
- }
178
- }
179
-
180
- .chart-container {
181
- box-sizing: border-box;
182
- flex-grow: 1;
183
- padding: 5px;
184
- min-height: 300px;
185
- height: 100%;
186
- min-width: 300px;
187
- width: 100%;
188
- position: relative;
189
-
190
- &:first-child:last-child {
191
- height: 100%;
192
- width: 100%;
193
- }
194
-
195
- &:first-child:nth-last-child(2),
196
- &:nth-child(2):last-child {
197
- width: 50%;
198
- height: 100%;
199
- }
200
- }
201
-
202
- .content-global-loading {
203
- width: 100%;
204
- height: 100%;
205
- display: flex;
206
- align-items: center;
207
- justify-content: center;
208
- color: var(--global-font-color);
209
- }
210
- }
211
- @media (min-width: 1280px) {
212
- .charts-view .chart-container {
213
- width: 50%;
214
- }
215
- }
216
- @media (min-height: 800px) {
217
- .charts-view .chart-container {
218
- height: 50%;
219
- }
220
- }
221
- </style>
1
+ <template>
2
+ <common-monitor-overview-new
3
+ v-if="isNewView"
4
+ :charts="chartsLocal"
5
+ :all-data="allData"
6
+ :update-helper="updateHelper"
7
+ />
8
+ <common-monitor-overview-old
9
+ v-else
10
+ :charts="chartsLocal"
11
+ :all-data="allData"
12
+ :update-helper="updateHelper"
13
+ />
14
+ </template>
15
+
16
+ <script setup lang="ts">
17
+ import { format } from 'date-fns'
18
+ import type {
19
+ I_SeriesColumn,
20
+ I_SeriesLine,
21
+ I_ColumnGraph,
22
+ I_LineGraph,
23
+ } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
24
+ import {
25
+ columnGraphDataFunc,
26
+ graphDataFunc,
27
+ } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/utils/renderGraph'
28
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
29
+ import type { UI_I_GraphDataSettingItem } from '~/components/common/monitor/lib/models/interfaces'
30
+
31
+ const props = defineProps<{
32
+ charts: UI_I_GraphDataSettingItem[]
33
+ themeMode?: string
34
+ formatDate?: string
35
+ formatTime?: string
36
+ graphType: string
37
+ }>()
38
+
39
+ const { $formattedDatetime, $store }: any = useNuxtApp()
40
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
41
+
42
+ const localization = computed<UI_I_Localization>(() => useLocal())
43
+
44
+ const allData = ref<UI_I_GraphDataSettingItem[]>([])
45
+
46
+ const chartsLocal = ref<any>([])
47
+
48
+ const getCurrentChart = (chart: any): void => {
49
+ chartsLocal.value = chart
50
+ }
51
+
52
+ const instanceOfSeriesLine = (
53
+ object: I_SeriesLine | I_SeriesColumn
54
+ ): object is I_SeriesLine => {
55
+ return 'lines' in object
56
+ }
57
+
58
+ const getCurrentData = (
59
+ chart: UI_I_GraphDataSettingItem,
60
+ chartType: string
61
+ ): I_LineGraph | I_ColumnGraph | null => {
62
+ if (!chart || !chart.data) return null
63
+
64
+ const themeMode = useLocalStorage('themeMode') || props.themeMode
65
+ const isDarkMode = themeMode === 'dark-theme'
66
+
67
+ let graphData = null
68
+
69
+ if (chartType === 'column' && !instanceOfSeriesLine(chart.data)) {
70
+ graphData = columnGraphDataFunc({
71
+ chart,
72
+ isDarkMode,
73
+ localization: localization.value,
74
+ })
75
+ } else if (instanceOfSeriesLine(chart.data)) {
76
+ graphData = graphDataFunc({
77
+ graphData: chart.data,
78
+ isDarkMode: isDarkMode,
79
+ localization: localization.value,
80
+ fullScreenCallBack: () => {},
81
+ disabledTitle: false,
82
+ disabledExportButton: true,
83
+ disabledLegends: true,
84
+ graphType: props.graphType,
85
+ width: 700,
86
+ chartCallBack: getCurrentChart,
87
+ formattedDatetime: $formattedDatetime,
88
+ format: format,
89
+ formatDate: props.formatDate,
90
+ timeFormat: props.formatTime,
91
+ })
92
+ }
93
+
94
+ return graphData
95
+ }
96
+
97
+ const updateHelper = ref<number>(0)
98
+
99
+ const updateGraph = (charts: Array<UI_I_GraphDataSettingItem | null>): void => {
100
+ allData.value = []
101
+ charts.forEach((chart) => {
102
+ if (chart && chart.data) {
103
+ const constructedData = getCurrentData(chart, chart.chartType)
104
+ if (constructedData)
105
+ allData.value.push({
106
+ title: chart.title,
107
+ loader: chart.loader,
108
+ data: constructedData,
109
+ chartType: 'column',
110
+ })
111
+ } else {
112
+ allData.value.push({
113
+ title: '',
114
+ loader: chart.loader,
115
+ data: null,
116
+ chartType: 'column',
117
+ })
118
+ }
119
+ })
120
+ updateHelper.value++
121
+ }
122
+
123
+ watch(
124
+ () => props.charts,
125
+ (newValue) => {
126
+ updateGraph(newValue)
127
+ },
128
+ { deep: true, immediate: true }
129
+ )
130
+ </script>
131
+
132
+ <style>
133
+ :root {
134
+ --loader-bg-color: #ffffff;
135
+ }
136
+ :root.dark-theme {
137
+ --loader-bg-color: #22343c;
138
+ }
139
+ </style>
140
+
141
+ <style scoped lang="scss">
142
+ .charts-view {
143
+ position: relative;
144
+ display: flex;
145
+ flex-direction: row;
146
+ flex-wrap: wrap;
147
+ justify-content: space-between;
148
+ overflow: auto;
149
+ height: 100%;
150
+
151
+ .graphic-loader-block {
152
+ background-color: var(--loader-bg-color);
153
+ height: 100%;
154
+ display: flex;
155
+ flex-direction: column;
156
+ align-items: center;
157
+ justify-content: center;
158
+ }
159
+
160
+ .graph-empty-block {
161
+ display: flex;
162
+ flex-direction: column;
163
+ height: 100%;
164
+ background-color: var(--loader-bg-color);
165
+
166
+ .title {
167
+ text-align: center;
168
+ font-size: 18px;
169
+ margin-top: 10px;
170
+ color: var(--global-font-color);
171
+ }
172
+
173
+ .body-block {
174
+ height: 100%;
175
+ display: flex;
176
+ justify-content: center;
177
+ text-align: center;
178
+ align-items: center;
179
+ color: var(--global-font-color);
180
+ }
181
+ }
182
+
183
+ .chart-container {
184
+ box-sizing: border-box;
185
+ flex-grow: 1;
186
+ padding: 5px;
187
+ min-height: 300px;
188
+ height: 100%;
189
+ min-width: 300px;
190
+ width: 100%;
191
+ position: relative;
192
+
193
+ &:first-child:last-child {
194
+ height: 100%;
195
+ width: 100%;
196
+ }
197
+
198
+ &:first-child:nth-last-child(2),
199
+ &:nth-child(2):last-child {
200
+ width: 50%;
201
+ height: 100%;
202
+ }
203
+ }
204
+
205
+ .content-global-loading {
206
+ width: 100%;
207
+ height: 100%;
208
+ display: flex;
209
+ align-items: center;
210
+ justify-content: center;
211
+ color: var(--global-font-color);
212
+ }
213
+ }
214
+ @media (min-width: 1280px) {
215
+ .charts-view .chart-container {
216
+ width: 50%;
217
+ }
218
+ }
219
+ @media (min-height: 800px) {
220
+ .charts-view .chart-container {
221
+ height: 50%;
222
+ }
223
+ }
224
+ </style>