bfg-common 1.1.30 → 1.1.31

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 (75) hide show
  1. package/assets/localization/local_be.json +4 -1
  2. package/assets/localization/local_en.json +4 -1
  3. package/assets/localization/local_hy.json +4 -1
  4. package/assets/localization/local_kk.json +4 -1
  5. package/assets/localization/local_ru.json +4 -1
  6. package/assets/localization/local_zh.json +4 -1
  7. package/components/atoms/alert/Notification.vue +167 -167
  8. package/components/atoms/autocomplete/Autocomplete.vue +236 -236
  9. package/components/atoms/datepicker/Datepicker.vue +612 -612
  10. package/components/atoms/list/SelectList.vue +62 -62
  11. package/components/atoms/nav/NavBar.vue +116 -116
  12. package/components/atoms/nav/VerticalNavBar.vue +89 -89
  13. package/components/atoms/notificationBar/NotificationBar.vue +174 -174
  14. package/components/atoms/perPage/PerPage.vue +52 -52
  15. package/components/atoms/popup/SimplePopup.vue +90 -90
  16. package/components/atoms/step/VerticalStep.vue +104 -104
  17. package/components/atoms/switch/Switch.vue +107 -107
  18. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -204
  19. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
  20. package/components/atoms/tabs/Tabs.vue +189 -189
  21. package/components/atoms/tooltip/Signpost.vue +224 -224
  22. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  23. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  24. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  25. package/components/common/browse/Browse.vue +182 -182
  26. package/components/common/browse/blocks/Title.vue +66 -66
  27. package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
  28. package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
  29. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
  30. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
  31. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
  32. package/components/common/diagramMain/network/Contents.vue +238 -238
  33. package/components/common/feedback/Buttons.vue +232 -232
  34. package/components/common/feedback/Message.vue +468 -468
  35. package/components/common/feedback/VisitPortal.vue +54 -54
  36. package/components/common/help/navbar/left/Left.vue +159 -159
  37. package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
  38. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
  39. package/components/common/modals/Confirmation.vue +18 -4
  40. package/components/common/modals/Rename.vue +165 -165
  41. package/components/common/monitor/advanced/Advanced.vue +22 -0
  42. package/components/common/monitor/advanced/tools/Tools.vue +78 -7
  43. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +218 -9
  44. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +80 -9
  45. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/config/optionsActions.ts +22 -10
  46. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/saveOptionsModal/SaveOptionsModal.vue +27 -4
  47. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +16 -0
  48. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +16 -0
  49. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +100 -29
  50. package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +29 -3
  51. package/components/common/perPage/PerPage.vue +51 -51
  52. package/components/common/recursionTree/RecursionTree.vue +201 -201
  53. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +445 -445
  54. package/components/common/vm/actions/add/select/storage/config/config.ts +154 -154
  55. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
  56. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  57. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  58. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  59. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  60. package/models/store/interfaces.ts +37 -37
  61. package/models/store/storage/interfaces.ts +32 -32
  62. package/models/store/types.ts +32 -32
  63. package/modules/fixContentBuild/index.ts +92 -92
  64. package/modules/fixContentBuild/utils/methods.ts +114 -114
  65. package/package.json +1 -1
  66. package/public/spice-console/application/codec.js +257 -257
  67. package/public/spice-console/lib/rasterEngine.js +907 -907
  68. package/public/spice-console/network/spicechannel.js +369 -369
  69. package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
  70. package/public/spice-console-minify/lib/jgestures.min.js +24 -24
  71. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
  72. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
  73. package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
  74. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
  75. package/utils/contentBuild.ts +34 -34
@@ -11,7 +11,7 @@
11
11
  <div class="select">
12
12
  <select
13
13
  id="chart-timespan-type-select"
14
- v-model="selectedTimespan"
14
+ v-model="localSelectedTimespan"
15
15
  >
16
16
  <option
17
17
  v-for="(item, index) in timespanOptions"
@@ -27,7 +27,7 @@
27
27
  <div
28
28
  :class="[
29
29
  'custom-timespan-settings-container',
30
- { active: selectedTimespan === 'custom_interval' },
30
+ { active: localSelectedTimespan === 'custom_interval' },
31
31
  ]"
32
32
  >
33
33
  <table>
@@ -36,7 +36,7 @@
36
36
  <td class="relative">
37
37
  <input
38
38
  id="custom-time-lastInput"
39
- v-model="timespanRadioSelect"
39
+ v-model="localPeriodType"
40
40
  type="radio"
41
41
  value="last"
42
42
  class="custom-radio-button"
@@ -52,12 +52,12 @@
52
52
  <div
53
53
  :class="[
54
54
  'custom-timespan-type-last-container',
55
- { active: timespanRadioSelect === 'last' },
55
+ { active: localPeriodType === 'last' },
56
56
  ]"
57
57
  >
58
58
  <input
59
59
  id="chart-option-setting-row"
60
- v-model="last"
60
+ v-model="localLast"
61
61
  type="number"
62
62
  class="chart-option-setting-row custom-time-input"
63
63
  />
@@ -70,7 +70,7 @@
70
70
  <div class="select">
71
71
  <select
72
72
  id="chart-timespan-type-select"
73
- v-model="selectedCustomTime"
73
+ v-model="localSelectedCustomTime"
74
74
  >
75
75
  <option
76
76
  v-for="(item, index) in customTimeOptions"
@@ -90,9 +90,9 @@
90
90
  <td class="relative">
91
91
  <input
92
92
  id="custom-time-fromInput"
93
- v-model="timespanRadioSelect"
93
+ v-model="localPeriodType"
94
94
  type="radio"
95
- value="from"
95
+ value="period"
96
96
  class="custom-radio-button"
97
97
  name="lastFrom"
98
98
  />
@@ -106,7 +106,7 @@
106
106
  <div
107
107
  :class="[
108
108
  'date-container-row disabled-container calendar-date-row',
109
- { active: timespanRadioSelect === 'from' },
109
+ { active: localPeriodType === 'period' },
110
110
  ]"
111
111
  >
112
112
  <input
@@ -140,7 +140,7 @@
140
140
  <div
141
141
  :class="[
142
142
  'date-container-row disabled-container calendar-date-row',
143
- { active: timespanRadioSelect === 'from' },
143
+ { active: localPeriodType === 'period' },
144
144
  ]"
145
145
  >
146
146
  <input
@@ -171,7 +171,7 @@
171
171
  <td
172
172
  :class="[
173
173
  'disabled-container',
174
- { active: timespanRadioSelect === 'from' },
174
+ { active: localPeriodType === 'period' },
175
175
  ]"
176
176
  >
177
177
  <span> ({{ localization.isoTimeFormat }}) </span>
@@ -217,10 +217,18 @@ import {
217
217
  const props = defineProps<{
218
218
  language: string
219
219
  selectedChartType: string
220
+ selectedTimespanType: string
221
+ unitsCount: number
222
+ periodType: string
223
+ selectedCustomTime: string
220
224
  }>()
221
225
 
222
226
  const emits = defineEmits<{
223
227
  (event: 'update-chart-type', value: string): void
228
+ (event: 'update-custom-time', value: string): void
229
+ (event: 'update-timespan-type', value: string): void
230
+ (event: 'update-unit-count', value: number): void
231
+ (event: 'update-period-type', value: string): void
224
232
  }>()
225
233
 
226
234
  const { $formattedDate, $isDate, $getTimeFormat, $getUnixByDate } = useNuxtApp()
@@ -230,16 +238,75 @@ const localization = computed<UI_I_Localization>(() => useLocal())
230
238
  const timespanOptions = computed<UI_I_OptionItem[]>(() =>
231
239
  timespanFunc(localization.value)
232
240
  )
233
- const selectedTimespan = ref<string>(timespanOptions.value[0].value)
241
+ const localSelectedTimespan = ref<string>(
242
+ props.selectedTimespanType || timespanOptions.value[0].value
243
+ )
244
+ watch(
245
+ () => props.selectedTimespanType,
246
+ (newValue) => {
247
+ localSelectedTimespan.value = newValue || timespanOptions.value[0].value
248
+ }
249
+ )
250
+ const localPeriodType = ref<string>('last')
251
+ watch(
252
+ () => props.periodType,
253
+ (newValue) => {
254
+ localPeriodType.value = newValue || 'last'
255
+ },
256
+ { immediate: true }
257
+ )
258
+
259
+ watch(
260
+ localSelectedTimespan,
261
+ (newValue) => {
262
+ emits('update-timespan-type', newValue)
263
+ },
264
+ { immediate: true }
265
+ )
234
266
 
235
- const timespanRadioSelect = ref<string>('last')
267
+ watch(
268
+ localPeriodType,
269
+ (newValue) => {
270
+ const currentValue = newValue || 'period'
271
+ emits('update-period-type', currentValue)
272
+ },
273
+ { immediate: true }
274
+ )
236
275
 
237
- const last = ref<number>(1)
276
+ const localLast = ref<number>(1)
277
+ watch(
278
+ localLast,
279
+ (newValue) => {
280
+ emits('update-unit-count', newValue)
281
+ },
282
+ { immediate: true }
283
+ )
284
+ watch(
285
+ () => props.unitsCount,
286
+ (newValue) => {
287
+ localLast.value = newValue > 0 ? newValue : 1
288
+ },
289
+ { immediate: true }
290
+ )
238
291
 
239
- const selectedCustomTime = ref<string>('hours')
292
+ const localSelectedCustomTime = ref<string>('hours')
240
293
  const customTimeOptions = computed<UI_I_OptionItem[]>(() =>
241
294
  customTimeFunc(localization.value)
242
295
  )
296
+ watch(
297
+ () => props.selectedCustomTime,
298
+ (newValue) => {
299
+ localSelectedCustomTime.value = newValue || 'hours'
300
+ },
301
+ { immediate: true }
302
+ )
303
+ watch(
304
+ localSelectedCustomTime,
305
+ (newValue) => {
306
+ emits('update-custom-time', newValue)
307
+ },
308
+ { immediate: true }
309
+ )
243
310
 
244
311
  const chartType = ref<string>('line_graph')
245
312
  const chartTypeOptions = computed<UI_I_OptionItem[]>(() =>
@@ -264,14 +331,18 @@ watch(
264
331
  { immediate: true }
265
332
  )
266
333
 
267
- watch(chartType, (newValue) => {
268
- let currentValue = 'spline'
334
+ watch(
335
+ chartType,
336
+ (newValue) => {
337
+ let currentValue = 'spline'
269
338
 
270
- if (newValue === 'line_graph') currentValue = 'spline'
271
- else if (newValue === 'stacked_graph') currentValue = 'area'
339
+ if (newValue === 'line_graph') currentValue = 'spline'
340
+ else if (newValue === 'stacked_graph') currentValue = 'area'
272
341
 
273
- emits('update-chart-type', currentValue)
274
- })
342
+ emits('update-chart-type', currentValue)
343
+ },
344
+ { immediate: true }
345
+ )
275
346
 
276
347
  const yesterday = new Date().setDate(new Date().getDate() - 1)
277
348
  const dateFrom = ref<number>(yesterday)
@@ -291,26 +362,26 @@ const getCurrentTime = (): void => {
291
362
  currentTimeTo.value = currentTime
292
363
  }
293
364
 
294
- const onUpdateDateFrom = (val: number) => {
365
+ const onUpdateDateFrom = (val: number): void => {
295
366
  if (!val) return
296
367
 
297
368
  currentDateFrom.value = $formattedDate(new Date(val), '')
298
369
  }
299
- watch(currentDateFrom, (val) => {
300
- if (!val) return
370
+ watch(currentDateFrom, (newValue) => {
371
+ if (!newValue) return
301
372
 
302
- if ($isDate(val)) dateFrom.value = $getUnixByDate(val)
373
+ if ($isDate(newValue)) dateFrom.value = $getUnixByDate(newValue)
303
374
  })
304
375
 
305
- const onUpdateDateTo = (val: number) => {
376
+ const onUpdateDateTo = (val: number): void => {
306
377
  if (!val) return
307
378
 
308
379
  currentDateTo.value = $formattedDate(new Date(val), '')
309
380
  }
310
- watch(currentDateTo, (val) => {
311
- if (!val) return
381
+ watch(currentDateTo, (newValue) => {
382
+ if (!newValue) return
312
383
 
313
- if ($isDate(val)) dateTo.value = $getUnixByDate(val)
384
+ if ($isDate(newValue)) dateTo.value = $getUnixByDate(newValue)
314
385
  })
315
386
 
316
387
  onMounted(() => {
@@ -4,7 +4,9 @@ import { UI_I_DropMenu } from '~/components/common/monitor/advanced/tools/models
4
4
  import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
5
5
  import { UI_I_OptionData } from '~/components/common/monitor/advanced/models/interfaces'
6
6
 
7
- export const periodFunc = (localization: UI_I_Localization): UI_I_OptionItem[] => [
7
+ export const periodFunc = (
8
+ localization: UI_I_Localization
9
+ ): UI_I_OptionItem[] => [
8
10
  {
9
11
  text: localization.realTime,
10
12
  value: 'real_time',
@@ -29,7 +31,8 @@ export const periodFunc = (localization: UI_I_Localization): UI_I_OptionItem[] =
29
31
 
30
32
  export const viewFunc = (
31
33
  localization: UI_I_Localization,
32
- type: UI_T_AdvancedType
34
+ type: UI_T_AdvancedType,
35
+ optionsNames?: string[]
33
36
  ): UI_I_OptionItem[] => {
34
37
  const viewData: UI_I_OptionData = {
35
38
  host: [
@@ -59,8 +62,17 @@ export const viewFunc = (
59
62
  { text: localization.virtualDisk, value: 'virtualDisk' },
60
63
  ],
61
64
  }
65
+ const currentOptions = viewData[type]
62
66
 
63
- return viewData[type]
67
+ if (optionsNames) {
68
+ optionsNames.forEach((item) => {
69
+ currentOptions.push({
70
+ text: item,
71
+ value: item,
72
+ })
73
+ })
74
+ }
75
+ return currentOptions
64
76
  }
65
77
 
66
78
  export const exportFunc = (
@@ -71,3 +83,17 @@ export const exportFunc = (
71
83
  { text: localization.toSvg + '...', action: 'svg' },
72
84
  { text: localization.toCsv + '...', action: 'csv' },
73
85
  ]
86
+
87
+ export const getCurrentOptionsStorageFunc = (routeType: string): string[] => {
88
+ const optionsNames = []
89
+ for (const key of Object.entries(localStorage)) {
90
+ const currentOptions = useLocalStorage(key[0], undefined, false)
91
+ if (
92
+ key[0].includes('ChartOptions') &&
93
+ currentOptions.routeType === routeType
94
+ ) {
95
+ optionsNames.push(key[0].replace('ChartOptions', ''))
96
+ }
97
+ }
98
+ return optionsNames
99
+ }
@@ -1,51 +1,51 @@
1
- <template>
2
- <div class="page-size">
3
- {{ selectLabel }}
4
-
5
- <div class="clr-select-wrapper">
6
- <select
7
- :id="`${props.testId}-page-size-select`"
8
- :value="props.pageSize"
9
- class="clr-page-size-select"
10
- @change="change"
11
- >
12
- <option
13
- v-for="(item, key) in props.options"
14
- :key="key"
15
- :value="item.value"
16
- >
17
- {{ item.text }}
18
- </option>
19
- </select>
20
- </div>
21
- </div>
22
- </template>
23
-
24
- <script setup lang="ts">
25
- import { UI_I_Localization } from '~/models/interfaces'
26
- import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
27
-
28
- const props = withDefaults(
29
- defineProps<{
30
- testId: string
31
- pageSize: number
32
- options: UI_I_OptionItem[]
33
- label?: string
34
- }>(),
35
- {
36
- label: 'itemsPerPage',
37
- }
38
- )
39
- const emits = defineEmits<{
40
- (event: 'change', num: number): void
41
- }>()
42
-
43
- const localization = computed<UI_I_Localization>(() => useLocal())
44
- const selectLabel = computed<string>(() => localization.value[props.label])
45
-
46
- const change = (e: InputEvent): void => {
47
- emits('change', +(e.target as HTMLInputElement).value)
48
- }
49
- </script>
50
-
51
- <style scoped></style>
1
+ <template>
2
+ <div class="page-size">
3
+ {{ selectLabel }}
4
+
5
+ <div class="clr-select-wrapper">
6
+ <select
7
+ :id="`${props.testId}-page-size-select`"
8
+ :value="props.pageSize"
9
+ class="clr-page-size-select"
10
+ @change="change"
11
+ >
12
+ <option
13
+ v-for="(item, key) in props.options"
14
+ :key="key"
15
+ :value="item.value"
16
+ >
17
+ {{ item.text }}
18
+ </option>
19
+ </select>
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+ <script setup lang="ts">
25
+ import { UI_I_Localization } from '~/models/interfaces'
26
+ import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
27
+
28
+ const props = withDefaults(
29
+ defineProps<{
30
+ testId: string
31
+ pageSize: number
32
+ options: UI_I_OptionItem[]
33
+ label?: string
34
+ }>(),
35
+ {
36
+ label: 'itemsPerPage',
37
+ }
38
+ )
39
+ const emits = defineEmits<{
40
+ (event: 'change', num: number): void
41
+ }>()
42
+
43
+ const localization = computed<UI_I_Localization>(() => useLocal())
44
+ const selectLabel = computed<string>(() => localization.value[props.label])
45
+
46
+ const change = (e: InputEvent): void => {
47
+ emits('change', +(e.target as HTMLInputElement).value)
48
+ }
49
+ </script>
50
+
51
+ <style scoped></style>