bfg-common 1.0.25 → 1.0.26

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 (78) hide show
  1. package/assets/localization/local_be.json +160 -1
  2. package/assets/localization/local_en.json +160 -1
  3. package/assets/localization/local_hy.json +160 -1
  4. package/assets/localization/local_kk.json +160 -1
  5. package/assets/localization/local_ru.json +160 -1
  6. package/assets/localization/local_zh.json +160 -1
  7. package/components/atoms/alert/Notification.vue +167 -167
  8. package/components/atoms/autocomplete/Autocomplete.vue +236 -236
  9. package/components/atoms/combobox/Combobox.vue +131 -131
  10. package/components/atoms/datepicker/Datepicker.vue +612 -612
  11. package/components/atoms/list/SelectList.vue +62 -62
  12. package/components/atoms/modal/bySteps/BySteps.vue +234 -234
  13. package/components/atoms/nav/NavBar.vue +116 -116
  14. package/components/atoms/nav/VerticalNavBar.vue +89 -89
  15. package/components/atoms/notificationBar/NotificationBar.vue +175 -175
  16. package/components/atoms/perPage/PerPage.vue +52 -52
  17. package/components/atoms/popup/SimplePopup.vue +90 -90
  18. package/components/atoms/step/VerticalStep.vue +104 -104
  19. package/components/atoms/switch/Switch.vue +107 -107
  20. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -204
  21. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
  22. package/components/atoms/table/dataGrid/DataGridPagination.vue +83 -83
  23. package/components/atoms/tabs/Tabs.vue +189 -189
  24. package/components/atoms/tooltip/Signpost.vue +224 -224
  25. package/components/common/accordion/Accordion.vue +176 -176
  26. package/components/common/accordion/Recursion.vue +195 -195
  27. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  28. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  29. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  30. package/components/common/browse/Browse.vue +182 -182
  31. package/components/common/browse/blocks/Title.vue +66 -66
  32. package/components/common/diagramMain/Header.vue +160 -160
  33. package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
  34. package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
  35. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
  36. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
  37. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
  38. package/components/common/diagramMain/modals/viewSettings/Info.vue +94 -94
  39. package/components/common/diagramMain/network/Contents.vue +238 -238
  40. package/components/common/feedback/Buttons.vue +232 -232
  41. package/components/common/feedback/Message.vue +468 -468
  42. package/components/common/feedback/VisitPortal.vue +54 -54
  43. package/components/common/modals/Rename.vue +165 -165
  44. package/components/common/monitor/advanced/Advanced.vue +33 -18
  45. package/components/common/monitor/advanced/GraphView.vue +78 -146
  46. package/components/common/monitor/advanced/tools/Tools.vue +41 -20
  47. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +35 -19
  48. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +22 -21
  49. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +44 -35
  50. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/items.ts +637 -0
  51. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/tableConfig.ts +13 -15
  52. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces.ts +19 -6
  53. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/types.ts +3 -5
  54. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +4 -1
  55. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +381 -388
  56. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +18 -8
  57. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics.ts +52 -58
  58. package/components/common/monitor/advanced/tools/chartOptionsModal/models/types.ts +3 -0
  59. package/components/common/monitor/models/interfaces.ts +2 -0
  60. package/components/common/perPage/PerPage.vue +51 -51
  61. package/components/common/recursionTree/RecursionTree.vue +201 -201
  62. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
  63. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  64. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  65. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  66. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  67. package/models/store/storage/interfaces.ts +32 -32
  68. package/package.json +1 -1
  69. package/public/spice-console/application/application.js +1 -1
  70. package/public/spice-console/application/codec.js +257 -257
  71. package/public/spice-console/lib/rasterEngine.js +907 -907
  72. package/public/spice-console-minify/application/application.min.js +1 -1
  73. package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
  74. package/public/spice-console-minify/lib/jgestures.min.js +24 -24
  75. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
  76. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
  77. package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
  78. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
@@ -1,388 +1,381 @@
1
- <template>
2
- <div class="chart-option-timespan-split">
3
- <div class="vertical-flex-container">
4
- <div class="timespan-objects-section-direction">
5
- <label for="chart-timespan-type-select"
6
- >{{ localization.timespan }}:</label
7
- >
8
- <div class="vertical-flex-container chart-option-timespan-settings">
9
- <div class="timespan-select chart-option-setting-row">
10
- <div class="view-select-label horizontal-flex-container">
11
- <div class="select">
12
- <select
13
- id="chart-timespan-type-select"
14
- v-model="selectedTimespan"
15
- >
16
- <option
17
- v-for="(item, index) in timespanOptions"
18
- :key="index"
19
- :value="item.value"
20
- >
21
- {{ item.text }}
22
- </option>
23
- </select>
24
- </div>
25
- </div>
26
- </div>
27
- <div
28
- :class="[
29
- 'custom-timespan-settings-container',
30
- { active: selectedTimespan === 'custom_interval' },
31
- ]"
32
- >
33
- <table>
34
- <tbody>
35
- <tr>
36
- <td class="relative">
37
- <input
38
- id="custom-time-lastInput"
39
- v-model="timespanRadioSelect"
40
- type="radio"
41
- value="last"
42
- class="custom-radio-button"
43
- name="lastFrom"
44
- />
45
- <label
46
- for="custom-time-lastInput"
47
- class="custom-radio-label"
48
- >{{ localization.last }}:
49
- </label>
50
- </td>
51
- <td>
52
- <div
53
- :class="[
54
- 'custom-timespan-type-last-container',
55
- { active: timespanRadioSelect === 'last' },
56
- ]"
57
- >
58
- <input
59
- id="chart-option-setting-row"
60
- v-model="last"
61
- type="number"
62
- class="chart-option-setting-row custom-time-input"
63
- />
64
- <div
65
- class="chart-option-setting-row custom-time-input inline-block"
66
- >
67
- <div
68
- class="view-select-label horizontal-flex-container"
69
- >
70
- <div class="select">
71
- <select
72
- id="chart-timespan-type-select"
73
- v-model="selectedCustomTime"
74
- >
75
- <option
76
- v-for="(item, index) in customTimeOptions"
77
- :key="index"
78
- :value="item.value"
79
- >
80
- {{ item.text }}
81
- </option>
82
- </select>
83
- </div>
84
- </div>
85
- </div>
86
- </div>
87
- </td>
88
- </tr>
89
- <tr>
90
- <td class="relative">
91
- <input
92
- id="custom-time-fromInput"
93
- v-model="timespanRadioSelect"
94
- type="radio"
95
- value="from"
96
- class="custom-radio-button"
97
- name="lastFrom"
98
- />
99
- <label
100
- for="custom-time-fromInput"
101
- class="custom-radio-label text-capitalize text-right"
102
- >{{ localization.from }}:
103
- </label>
104
- </td>
105
- <td>
106
- <div
107
- :class="[
108
- 'date-container-row disabled-container calendar-date-row',
109
- { active: timespanRadioSelect === 'from' },
110
- ]"
111
- >
112
- <input
113
- id="current-date-from"
114
- v-model.lazy="currentDateFrom"
115
- type="text"
116
- class="chart-option-setting-row custom-time-input first-from"
117
- />
118
- <div class="section-datepicker">
119
- <atoms-datepicker
120
- v-model="dateFrom"
121
- :lang="currentLang"
122
- class="calendar-from calendar-popup btn-show-hide-calendar"
123
- @update="onUpdateDateFrom"
124
- />
125
- </div>
126
- <input
127
- id="current-time-from"
128
- v-model="currentTimeFrom"
129
- type="text"
130
- class="chart-option-setting-row custom-time-input"
131
- />
132
- </div>
133
- </td>
134
- </tr>
135
- <tr>
136
- <td class="custom-time-label-text text-right">
137
- {{ localization.to }}:
138
- </td>
139
- <td>
140
- <div
141
- :class="[
142
- 'date-container-row disabled-container calendar-date-row',
143
- { active: timespanRadioSelect === 'from' },
144
- ]"
145
- >
146
- <input
147
- id="current-date-to"
148
- v-model.lazy="currentDateTo"
149
- type="text"
150
- class="chart-option-setting-row custom-time-input first-to"
151
- />
152
- <div class="section-datepicker">
153
- <atoms-datepicker
154
- v-model="dateTo"
155
- :lang="currentLang"
156
- class="calendar-from calendar-popup btn-show-hide-calendar"
157
- @update="onUpdateDateTo"
158
- />
159
- </div>
160
- <input
161
- id="current-time-to"
162
- v-model="currentTimeTo"
163
- type="text"
164
- class="chart-option-setting-row custom-time-input"
165
- />
166
- </div>
167
- </td>
168
- </tr>
169
- <tr>
170
- <td></td>
171
- <td
172
- :class="[
173
- 'disabled-container',
174
- { active: timespanRadioSelect === 'from' },
175
- ]"
176
- >
177
- <span> (time is in ISO 8601 format) </span>
178
- </td>
179
- </tr>
180
- </tbody>
181
- </table>
182
- </div>
183
- </div>
184
- </div>
185
- <div class="horizontal-flex-container chart-type-container">
186
- <div class="view-select-label horizontal-flex-container">
187
- <label for="chart-type-select" class="label-select"
188
- >{{ localization.chartType }}:</label
189
- >
190
- <div class="select">
191
- <select id="chart-type-select" v-model="selectedChartType">
192
- <option
193
- v-for="(item, index) in chartTypeOptions"
194
- :key="index"
195
- :value="item.value"
196
- >
197
- {{ item.text }}
198
- </option>
199
- </select>
200
- </div>
201
- </div>
202
- </div>
203
- </div>
204
- </div>
205
- </template>
206
-
207
- <script setup lang="ts">
208
- import { format } from 'date-fns'
209
- import { UI_I_Localization } from '~/models/interfaces'
210
- import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
211
- import {
212
- timespanFunc,
213
- customTimeFunc,
214
- chartTypeFunc,
215
- } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/config/dateForm'
216
-
217
- const { $store, $formattedDate, $isDate, $getTimeFormat, $getUnixByDate } =
218
- useNuxtApp()
219
-
220
- const localization = computed<UI_I_Localization>(() => useLocal())
221
-
222
- const timespanOptions = computed<UI_I_OptionItem[]>(() =>
223
- timespanFunc(localization.value)
224
- )
225
- const selectedTimespan = ref<string>(timespanOptions.value[0].value)
226
-
227
- const timespanRadioSelect = ref<string>('last')
228
-
229
- const last = ref<number>(1)
230
-
231
- const selectedCustomTime = ref<string>('hours')
232
- const customTimeOptions = computed<UI_I_OptionItem[]>(() =>
233
- customTimeFunc(localization.value)
234
- )
235
-
236
- const selectedChartType = ref<string>('line_graph')
237
- const chartTypeOptions = computed<UI_I_OptionItem[]>(() =>
238
- chartTypeFunc(localization.value)
239
- )
240
-
241
- const yesterday = new Date().setDate(new Date().getDate() - 1)
242
- const dateFrom = ref<number>(yesterday)
243
- const dateTo = ref<number>(new Date().getTime())
244
-
245
- const currentLang = ref<string>(useLocalStorage('lang') ?? 'ru_RU')
246
-
247
- const timeFormatUpdater = computed<number>(
248
- () => $store.getters['main/getTimeFormatUpdater']
249
- )
250
- watch(timeFormatUpdater, () => {
251
- currentLang.value = useLocalStorage('lang') ?? 'ru_RU'
252
- getCurrentTime()
253
- })
254
-
255
- const currentDateFrom = ref<string>('')
256
- const currentDateTo = ref<string>('')
257
- const currentTimeFrom = ref<string>('')
258
- const currentTimeTo = ref<string>('')
259
-
260
- const getCurrentTime = (): void => {
261
- currentDateFrom.value = $formattedDate(yesterday, '')
262
- currentDateTo.value = $formattedDate(new Date(), '')
263
-
264
- const currentTime = format(new Date(), $getTimeFormat(true))
265
- currentTimeFrom.value = currentTime
266
- currentTimeTo.value = currentTime
267
- }
268
-
269
- const onUpdateDateFrom = (val: number) => {
270
- if (!val) return
271
-
272
- currentDateFrom.value = $formattedDate(new Date(val), '')
273
- }
274
- watch(currentDateFrom, (val) => {
275
- if (!val) return
276
-
277
- if ($isDate(val)) dateFrom.value = $getUnixByDate(val)
278
- })
279
-
280
- const onUpdateDateTo = (val: number) => {
281
- if (!val) return
282
-
283
- currentDateTo.value = $formattedDate(new Date(val), '')
284
- }
285
- watch(currentDateTo, (val) => {
286
- if (!val) return
287
-
288
- if ($isDate(val)) dateTo.value = $getUnixByDate(val)
289
- })
290
-
291
- onMounted(() => {
292
- getCurrentTime()
293
- })
294
- </script>
295
-
296
- <style scoped lang="scss">
297
- .chart-option-timespan-split {
298
- overflow-x: auto;
299
- flex-basis: 56%;
300
- padding: 5px;
301
-
302
- .timespan-objects-section-direction {
303
- display: flex;
304
- flex-direction: row;
305
- align-items: flex-start;
306
-
307
- .chart-option-timespan-settings {
308
- margin-left: 15px;
309
-
310
- .chart-option-setting-row {
311
- width: 150px;
312
- margin-bottom: 5px;
313
- }
314
-
315
- .custom-radio-button {
316
- position: absolute;
317
- opacity: 0;
318
-
319
- &:checked + .custom-radio-label:before {
320
- box-shadow: inset 0 0 0 6px #0079b8;
321
- border: none;
322
- }
323
- }
324
- .custom-radio-label {
325
- display: block;
326
- position: relative;
327
- min-height: 19.2px;
328
- padding-left: 23px;
329
- cursor: pointer;
330
- line-height: 19.2px;
331
- color: #454545;
332
-
333
- &:before {
334
- position: absolute;
335
- top: 3px;
336
- left: 0;
337
- content: '';
338
- display: inline-block;
339
- height: 16px;
340
- width: 16px;
341
- border: 0.8px solid #565656;
342
- border-radius: 50%;
343
- }
344
- }
345
-
346
- .calendar-date-row {
347
- display: flex;
348
- align-items: center;
349
-
350
- .custom-time-input.first-from,
351
- .custom-time-input.first-to {
352
- max-width: 114px;
353
- }
354
- .btn-show-hide-calendar {
355
- margin: 0 9px;
356
- cursor: pointer;
357
- }
358
- }
359
-
360
- .custom-time-input {
361
- margin-left: 8px;
362
- margin-right: 8px;
363
- max-width: 140px;
364
- }
365
- }
366
-
367
- .custom-timespan-settings-container:not(.active),
368
- .custom-timespan-type-last-container:not(.active),
369
- .disabled-container:not(.active) {
370
- opacity: 0.6;
371
- pointer-events: none;
372
- }
373
- }
374
-
375
- .chart-type-container {
376
- margin-top: 15px;
377
-
378
- .horizontal-flex-container {
379
- display: flex;
380
- flex-direction: row;
381
-
382
- .select {
383
- margin-left: 15px;
384
- }
385
- }
386
- }
387
- }
388
- </style>
1
+ <template>
2
+ <div class="chart-option-timespan-split">
3
+ <div class="vertical-flex-container">
4
+ <div class="timespan-objects-section-direction">
5
+ <label for="chart-timespan-type-select"
6
+ >{{ localization.timespan }}:</label
7
+ >
8
+ <div class="vertical-flex-container chart-option-timespan-settings">
9
+ <div class="timespan-select chart-option-setting-row">
10
+ <div class="view-select-label horizontal-flex-container">
11
+ <div class="select">
12
+ <select
13
+ id="chart-timespan-type-select"
14
+ v-model="selectedTimespan"
15
+ >
16
+ <option
17
+ v-for="(item, index) in timespanOptions"
18
+ :key="index"
19
+ :value="item.value"
20
+ >
21
+ {{ item.text }}
22
+ </option>
23
+ </select>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ <div
28
+ :class="[
29
+ 'custom-timespan-settings-container',
30
+ { active: selectedTimespan === 'custom_interval' },
31
+ ]"
32
+ >
33
+ <table>
34
+ <tbody>
35
+ <tr>
36
+ <td class="relative">
37
+ <input
38
+ id="custom-time-lastInput"
39
+ v-model="timespanRadioSelect"
40
+ type="radio"
41
+ value="last"
42
+ class="custom-radio-button"
43
+ name="lastFrom"
44
+ />
45
+ <label
46
+ for="custom-time-lastInput"
47
+ class="custom-radio-label"
48
+ >{{ localization.last }}:
49
+ </label>
50
+ </td>
51
+ <td>
52
+ <div
53
+ :class="[
54
+ 'custom-timespan-type-last-container',
55
+ { active: timespanRadioSelect === 'last' },
56
+ ]"
57
+ >
58
+ <input
59
+ id="chart-option-setting-row"
60
+ v-model="last"
61
+ type="number"
62
+ class="chart-option-setting-row custom-time-input"
63
+ />
64
+ <div
65
+ class="chart-option-setting-row custom-time-input inline-block"
66
+ >
67
+ <div
68
+ class="view-select-label horizontal-flex-container"
69
+ >
70
+ <div class="select">
71
+ <select
72
+ id="chart-timespan-type-select"
73
+ v-model="selectedCustomTime"
74
+ >
75
+ <option
76
+ v-for="(item, index) in customTimeOptions"
77
+ :key="index"
78
+ :value="item.value"
79
+ >
80
+ {{ item.text }}
81
+ </option>
82
+ </select>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ </td>
88
+ </tr>
89
+ <tr>
90
+ <td class="relative">
91
+ <input
92
+ id="custom-time-fromInput"
93
+ v-model="timespanRadioSelect"
94
+ type="radio"
95
+ value="from"
96
+ class="custom-radio-button"
97
+ name="lastFrom"
98
+ />
99
+ <label
100
+ for="custom-time-fromInput"
101
+ class="custom-radio-label text-capitalize text-right"
102
+ >{{ localization.from }}:
103
+ </label>
104
+ </td>
105
+ <td>
106
+ <div
107
+ :class="[
108
+ 'date-container-row disabled-container calendar-date-row',
109
+ { active: timespanRadioSelect === 'from' },
110
+ ]"
111
+ >
112
+ <input
113
+ id="current-date-from"
114
+ v-model.lazy="currentDateFrom"
115
+ type="text"
116
+ class="chart-option-setting-row custom-time-input first-from"
117
+ />
118
+ <div class="section-datepicker">
119
+ <atoms-datepicker
120
+ v-model="dateFrom"
121
+ :lang="props.language"
122
+ class="calendar-from calendar-popup btn-show-hide-calendar"
123
+ @update="onUpdateDateFrom"
124
+ />
125
+ </div>
126
+ <input
127
+ id="current-time-from"
128
+ v-model="currentTimeFrom"
129
+ type="text"
130
+ class="chart-option-setting-row custom-time-input"
131
+ />
132
+ </div>
133
+ </td>
134
+ </tr>
135
+ <tr>
136
+ <td class="custom-time-label-text text-right">
137
+ {{ localization.to }}:
138
+ </td>
139
+ <td>
140
+ <div
141
+ :class="[
142
+ 'date-container-row disabled-container calendar-date-row',
143
+ { active: timespanRadioSelect === 'from' },
144
+ ]"
145
+ >
146
+ <input
147
+ id="current-date-to"
148
+ v-model.lazy="currentDateTo"
149
+ type="text"
150
+ class="chart-option-setting-row custom-time-input first-to"
151
+ />
152
+ <div class="section-datepicker">
153
+ <atoms-datepicker
154
+ v-model="dateTo"
155
+ :lang="props.language"
156
+ class="calendar-from calendar-popup btn-show-hide-calendar"
157
+ @update="onUpdateDateTo"
158
+ />
159
+ </div>
160
+ <input
161
+ id="current-time-to"
162
+ v-model="currentTimeTo"
163
+ type="text"
164
+ class="chart-option-setting-row custom-time-input"
165
+ />
166
+ </div>
167
+ </td>
168
+ </tr>
169
+ <tr>
170
+ <td></td>
171
+ <td
172
+ :class="[
173
+ 'disabled-container',
174
+ { active: timespanRadioSelect === 'from' },
175
+ ]"
176
+ >
177
+ <span> ({{ localization.isoTimeFormat }}) </span>
178
+ </td>
179
+ </tr>
180
+ </tbody>
181
+ </table>
182
+ </div>
183
+ </div>
184
+ </div>
185
+ <div class="horizontal-flex-container chart-type-container">
186
+ <div class="view-select-label horizontal-flex-container">
187
+ <label for="chart-type-select" class="label-select"
188
+ >{{ localization.chartType }}:</label
189
+ >
190
+ <div class="select">
191
+ <select id="chart-type-select" v-model="selectedChartType">
192
+ <option
193
+ v-for="(item, index) in chartTypeOptions"
194
+ :key="index"
195
+ :value="item.value"
196
+ >
197
+ {{ item.text }}
198
+ </option>
199
+ </select>
200
+ </div>
201
+ </div>
202
+ </div>
203
+ </div>
204
+ </div>
205
+ </template>
206
+
207
+ <script setup lang="ts">
208
+ import { format } from 'date-fns'
209
+ import { UI_I_Localization } from '~/models/interfaces'
210
+ import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
211
+ import {
212
+ timespanFunc,
213
+ customTimeFunc,
214
+ chartTypeFunc,
215
+ } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/config/dateForm'
216
+
217
+ const props = defineProps<{
218
+ language: string
219
+ }>()
220
+
221
+ const { $formattedDate, $isDate, $getTimeFormat, $getUnixByDate } = useNuxtApp()
222
+
223
+ const localization = computed<UI_I_Localization>(() => useLocal())
224
+
225
+ const timespanOptions = computed<UI_I_OptionItem[]>(() =>
226
+ timespanFunc(localization.value)
227
+ )
228
+ const selectedTimespan = ref<string>(timespanOptions.value[0].value)
229
+
230
+ const timespanRadioSelect = ref<string>('last')
231
+
232
+ const last = ref<number>(1)
233
+
234
+ const selectedCustomTime = ref<string>('hours')
235
+ const customTimeOptions = computed<UI_I_OptionItem[]>(() =>
236
+ customTimeFunc(localization.value)
237
+ )
238
+
239
+ const selectedChartType = ref<string>('line_graph')
240
+ const chartTypeOptions = computed<UI_I_OptionItem[]>(() =>
241
+ chartTypeFunc(localization.value)
242
+ )
243
+
244
+ const yesterday = new Date().setDate(new Date().getDate() - 1)
245
+ const dateFrom = ref<number>(yesterday)
246
+ const dateTo = ref<number>(new Date().getTime())
247
+
248
+ const currentDateFrom = ref<string>('')
249
+ const currentDateTo = ref<string>('')
250
+ const currentTimeFrom = ref<string>('')
251
+ const currentTimeTo = ref<string>('')
252
+
253
+ const getCurrentTime = (): void => {
254
+ currentDateFrom.value = $formattedDate(yesterday, '')
255
+ currentDateTo.value = $formattedDate(new Date(), '')
256
+
257
+ const currentTime = format(new Date(), $getTimeFormat(true))
258
+ currentTimeFrom.value = currentTime
259
+ currentTimeTo.value = currentTime
260
+ }
261
+
262
+ const onUpdateDateFrom = (val: number) => {
263
+ if (!val) return
264
+
265
+ currentDateFrom.value = $formattedDate(new Date(val), '')
266
+ }
267
+ watch(currentDateFrom, (val) => {
268
+ if (!val) return
269
+
270
+ if ($isDate(val)) dateFrom.value = $getUnixByDate(val)
271
+ })
272
+
273
+ const onUpdateDateTo = (val: number) => {
274
+ if (!val) return
275
+
276
+ currentDateTo.value = $formattedDate(new Date(val), '')
277
+ }
278
+ watch(currentDateTo, (val) => {
279
+ if (!val) return
280
+
281
+ if ($isDate(val)) dateTo.value = $getUnixByDate(val)
282
+ })
283
+
284
+ onMounted(() => {
285
+ getCurrentTime()
286
+ })
287
+ </script>
288
+
289
+ <style scoped lang="scss">
290
+ .chart-option-timespan-split {
291
+ overflow-x: auto;
292
+ flex-basis: 56%;
293
+ padding: 5px;
294
+
295
+ .timespan-objects-section-direction {
296
+ display: flex;
297
+ flex-direction: row;
298
+ align-items: flex-start;
299
+
300
+ .chart-option-timespan-settings {
301
+ margin-left: 15px;
302
+
303
+ .chart-option-setting-row {
304
+ width: 150px;
305
+ margin-bottom: 5px;
306
+ }
307
+
308
+ .custom-radio-button {
309
+ position: absolute;
310
+ opacity: 0;
311
+
312
+ &:checked + .custom-radio-label:before {
313
+ box-shadow: inset 0 0 0 6px #0079b8;
314
+ border: none;
315
+ }
316
+ }
317
+ .custom-radio-label {
318
+ display: block;
319
+ position: relative;
320
+ min-height: 19.2px;
321
+ padding-left: 23px;
322
+ cursor: pointer;
323
+ line-height: 19.2px;
324
+ color: #454545;
325
+
326
+ &:before {
327
+ position: absolute;
328
+ top: 3px;
329
+ left: 0;
330
+ content: '';
331
+ display: inline-block;
332
+ height: 16px;
333
+ width: 16px;
334
+ border: 0.8px solid #565656;
335
+ border-radius: 50%;
336
+ }
337
+ }
338
+
339
+ .calendar-date-row {
340
+ display: flex;
341
+ align-items: center;
342
+
343
+ .custom-time-input.first-from,
344
+ .custom-time-input.first-to {
345
+ max-width: 114px;
346
+ }
347
+ .btn-show-hide-calendar {
348
+ margin: 0 9px;
349
+ cursor: pointer;
350
+ }
351
+ }
352
+
353
+ .custom-time-input {
354
+ margin-left: 8px;
355
+ margin-right: 8px;
356
+ max-width: 140px;
357
+ }
358
+ }
359
+
360
+ .custom-timespan-settings-container:not(.active),
361
+ .custom-timespan-type-last-container:not(.active),
362
+ .disabled-container:not(.active) {
363
+ opacity: 0.6;
364
+ pointer-events: none;
365
+ }
366
+ }
367
+
368
+ .chart-type-container {
369
+ margin-top: 15px;
370
+
371
+ .horizontal-flex-container {
372
+ display: flex;
373
+ flex-direction: row;
374
+
375
+ .select {
376
+ margin-left: 15px;
377
+ }
378
+ }
379
+ }
380
+ }
381
+ </style>