bfg-common 1.1.62 → 1.1.63

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 (90) hide show
  1. package/assets/localization/local_be.json +1 -1
  2. package/assets/localization/local_hy.json +1 -1
  3. package/assets/localization/local_kk.json +1 -1
  4. package/assets/localization/local_ru.json +1 -1
  5. package/components/atoms/alert/Notification.vue +167 -167
  6. package/components/atoms/autocomplete/Autocomplete.vue +236 -236
  7. package/components/atoms/datepicker/Datepicker.vue +612 -612
  8. package/components/atoms/list/SelectList.vue +62 -62
  9. package/components/atoms/nav/NavBar.vue +116 -116
  10. package/components/atoms/nav/VerticalNavBar.vue +89 -89
  11. package/components/atoms/notificationBar/NotificationBar.vue +175 -175
  12. package/components/atoms/perPage/PerPage.vue +52 -52
  13. package/components/atoms/popup/SimplePopup.vue +90 -90
  14. package/components/atoms/step/VerticalStep.vue +104 -104
  15. package/components/atoms/switch/Switch.vue +107 -107
  16. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +206 -206
  17. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
  18. package/components/atoms/tabs/Tabs.vue +189 -189
  19. package/components/atoms/tooltip/Signpost.vue +224 -224
  20. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  21. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  22. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  23. package/components/common/browse/Browse.vue +182 -182
  24. package/components/common/browse/blocks/Title.vue +66 -66
  25. package/components/common/diagramMain/Diagram.vue +186 -186
  26. package/components/common/diagramMain/DiagramMain.vue +986 -986
  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/graph/Graph.vue +20 -18
  37. package/components/common/help/navbar/left/Left.vue +159 -159
  38. package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
  39. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
  40. package/components/common/modals/Rename.vue +165 -165
  41. package/components/common/monitor/advanced/Advanced.vue +33 -3
  42. package/components/common/monitor/advanced/GraphView.vue +4 -4
  43. package/components/common/monitor/advanced/table/Table.vue +5 -5
  44. package/components/common/monitor/advanced/tools/Tools.vue +91 -27
  45. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +101 -17
  46. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +25 -7
  47. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts +55 -0
  48. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces.ts +1 -1
  49. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +32 -3
  50. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +25 -8
  51. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +41 -19
  52. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/models/interfaces.ts +1 -1
  53. package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +50 -38
  54. package/components/common/monitor/advanced/tools/utils/countCores.ts +7 -0
  55. package/components/common/monitor/config/getValidDateByOption.ts +105 -6
  56. package/components/common/monitor/overview/filters/Filters.vue +6 -6
  57. package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +8 -8
  58. package/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker.ts +1 -1
  59. package/components/common/perPage/PerPage.vue +51 -51
  60. package/components/common/recursionTree/RecursionTree.vue +201 -201
  61. package/components/common/vm/actions/add/customizeHardware/virtualHardware/VirtualHardware.vue +642 -641
  62. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +274 -245
  63. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Cpu.vue +375 -375
  64. package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/Limit.vue +234 -234
  65. package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/config/options.ts +28 -28
  66. package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/Memory.vue +316 -316
  67. package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +35 -35
  68. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +447 -447
  69. package/components/common/vm/actions/add/customizeHardware/virtualHardware/reservation/Reservation.vue +235 -235
  70. package/components/common/vm/actions/add/select/storage/config/config.ts +154 -154
  71. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
  72. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  73. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  74. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  75. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  76. package/models/store/interfaces.ts +37 -37
  77. package/models/store/storage/interfaces.ts +32 -32
  78. package/models/store/types.ts +32 -32
  79. package/modules/fixContentBuild/utils/methods.ts +114 -114
  80. package/package.json +1 -1
  81. package/public/spice-console/application/codec.js +257 -257
  82. package/public/spice-console/lib/rasterEngine.js +907 -907
  83. package/public/spice-console/network/spicechannel.js +369 -369
  84. package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
  85. package/public/spice-console-minify/lib/jgestures.min.js +24 -24
  86. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
  87. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
  88. package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
  89. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
  90. package/utils/contentBuild.ts +34 -34
@@ -5,29 +5,41 @@ import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/t
5
5
  import { UI_I_OptionData } from '~/components/common/monitor/advanced/models/interfaces'
6
6
 
7
7
  export const periodFunc = (
8
- localization: UI_I_Localization
9
- ): UI_I_OptionItem[] => [
10
- {
11
- text: localization.realTime,
12
- value: 'real_time',
13
- },
14
- {
15
- text: localization.lastDay,
16
- value: 'last_day',
17
- },
18
- {
19
- text: localization.lastWeek,
20
- value: 'last_week',
21
- },
22
- {
23
- text: localization.lastMonth,
24
- value: 'last_month',
25
- },
26
- // {
27
- // text: localization.lastYear,
28
- // value: 'last_year',
29
- // },
30
- ]
8
+ localization: UI_I_Localization,
9
+ selectedTimespanType: string
10
+ ): UI_I_OptionItem[] => {
11
+ const result = [
12
+ {
13
+ text: localization.realTime,
14
+ value: 'real_time',
15
+ },
16
+ {
17
+ text: localization.lastDay,
18
+ value: 'last_day',
19
+ },
20
+ {
21
+ text: localization.lastWeek,
22
+ value: 'last_week',
23
+ },
24
+ {
25
+ text: localization.lastMonth,
26
+ value: 'last_month',
27
+ },
28
+ // {
29
+ // text: localization.lastYear,
30
+ // value: 'last_year',
31
+ // },
32
+ ]
33
+
34
+ if (selectedTimespanType === 'custom_interval') {
35
+ result.push({
36
+ text: localization.customInterval,
37
+ value: 'custom_interval',
38
+ })
39
+ }
40
+
41
+ return result
42
+ }
31
43
 
32
44
  export const viewFunc = (
33
45
  localization: UI_I_Localization,
@@ -43,29 +55,29 @@ export const viewFunc = (
43
55
  ],
44
56
  host: [
45
57
  { text: localization.cpuUsageInPercent, value: 'cpuUsageInPercent' },
46
- { text: localization.datastore, value: 'datastore' },
58
+ // { text: localization.datastore, value: 'datastore' },
47
59
  { text: localization.memory, value: 'memory' },
48
60
  { text: localization.disk, value: 'disk' },
49
61
  { text: localization.network, value: 'network' },
50
- { text: localization.power, value: 'power' },
51
- { text: localization.storageAdapters, value: 'storageAdapters' },
52
- { text: localization.storagePath, value: 'storagePath' },
53
- { text: localization.system, value: 'system' },
54
- {
55
- text: localization.procuratorReplication,
56
- value: 'procuratorReplication',
57
- },
62
+ // { text: localization.power, value: 'power' },
63
+ // { text: localization.storageAdapters, value: 'storageAdapters' },
64
+ // { text: localization.storagePath, value: 'storagePath' },
65
+ // { text: localization.system, value: 'system' },
66
+ // {
67
+ // text: localization.procuratorReplication,
68
+ // value: 'procuratorReplication',
69
+ // },
58
70
  ],
59
71
  vm: [
60
72
  { text: localization.cpuUsageInPercent, value: 'cpuUsageInPercent' },
61
- { text: localization.cpuUsageInMhz, value: 'cpuUsageInMhz' },
62
- { text: localization.cpuReady, value: 'cpuReady' },
63
- { text: localization.datastore, value: 'datastore' },
64
- { text: localization.disk, value: 'disk' },
73
+ // { text: localization.cpuUsageInMhz, value: 'cpuUsageInMhz' },
74
+ // { text: localization.cpuReady, value: 'cpuReady' },
75
+ // { text: localization.datastore, value: 'datastore' },
65
76
  { text: localization.memory, value: 'memory' },
77
+ { text: localization.disk, value: 'disk' },
66
78
  { text: localization.network, value: 'network' },
67
- { text: localization.power, value: 'power' },
68
- { text: localization.virtualDisk, value: 'virtualDisk' },
79
+ // { text: localization.power, value: 'power' },
80
+ // { text: localization.virtualDisk, value: 'virtualDisk' },
69
81
  ],
70
82
  }
71
83
  const currentOptions = viewData[type]
@@ -0,0 +1,7 @@
1
+ import { I_SeriesLine } from 'bfg-nuxt-3-graph/graph/models/interfaces'
2
+
3
+ export const getCountCores = (data: I_SeriesLine | null): number => {
4
+ if (!data) return 0
5
+
6
+ return Math.max(...data.lines[0].data)
7
+ }
@@ -1,14 +1,113 @@
1
1
  import { subDays, subHours, subMonths, subWeeks, subYears } from 'date-fns'
2
2
 
3
- export const getValidDateByOptionFunc = (type: string): number[] => {
3
+ export const getValidDateByOptionFunc = (
4
+ type: string,
5
+ selectedOptions = null,
6
+ unitsCount: null | number = null,
7
+ timeType: null | string = ''
8
+ ): number[] => {
4
9
  const newDate = new Date()
5
10
  let startTime = 0
6
11
 
7
- if (type === 'real_time') startTime = subHours(newDate, 1).getTime()
8
- else if (type === 'last_day') startTime = subDays(newDate, 1).getTime()
9
- else if (type === 'last_week') startTime = subWeeks(newDate, 1).getTime()
10
- else if (type === 'last_month') startTime = subMonths(newDate, 1).getTime()
11
- else if (type === 'last_year') startTime = subYears(newDate, 1).getTime()
12
+ switch (type) {
13
+ case 'real_time':
14
+ startTime = subHours(newDate, 1).getTime()
15
+ break
16
+ case 'last_day':
17
+ startTime = subDays(newDate, 1).getTime()
18
+ break
19
+ case 'last_week':
20
+ startTime = subWeeks(newDate, 1).getTime()
21
+ break
22
+ case 'last_month':
23
+ startTime = subMonths(newDate, 1).getTime()
24
+ break
25
+ case 'last_year':
26
+ startTime = subYears(newDate, 1).getTime()
27
+ break
28
+ case 'custom_interval':
29
+ if (selectedOptions) {
30
+ switch (selectedOptions.timespan.periodType) {
31
+ case 'last':
32
+ const currentUnits =
33
+ selectedOptions.timespan.unitsCount < 1
34
+ ? 1
35
+ : +selectedOptions.timespan.unitsCount
36
+
37
+ switch (selectedOptions.timespan.units) {
38
+ case 'hours':
39
+ startTime = subHours(newDate, currentUnits).getTime()
40
+ break
41
+ case 'days':
42
+ startTime = subDays(newDate, currentUnits).getTime()
43
+ break
44
+ case 'weeks':
45
+ startTime = subWeeks(newDate, currentUnits).getTime()
46
+ break
47
+ case 'months':
48
+ startTime = subMonths(newDate, currentUnits).getTime()
49
+ break
50
+ }
51
+ }
52
+ } else if (
53
+ !selectedOptions &&
54
+ typeof unitsCount === 'number' &&
55
+ typeof timeType === 'string'
56
+ ) {
57
+ switch (timeType) {
58
+ case 'hours':
59
+ startTime = subHours(newDate, unitsCount).getTime()
60
+ break
61
+ case 'days':
62
+ startTime = subDays(newDate, unitsCount).getTime()
63
+ break
64
+ case 'weeks':
65
+ startTime = subWeeks(newDate, unitsCount).getTime()
66
+ break
67
+ case 'months':
68
+ startTime = subMonths(newDate, unitsCount).getTime()
69
+ break
70
+ }
71
+ }
72
+ break
73
+ }
74
+
75
+ // if (type === 'real_time') startTime = subHours(newDate, 1).getTime()
76
+ // else if (type === 'last_day') startTime = subDays(newDate, 1).getTime()
77
+ // else if (type === 'last_week') startTime = subWeeks(newDate, 1).getTime()
78
+ // else if (type === 'last_month') startTime = subMonths(newDate, 1).getTime()
79
+ // else if (type === 'last_year') startTime = subYears(newDate, 1).getTime()
80
+ // else if (type === 'custom_interval' && selectedOptions) {
81
+ // if (selectedOptions.timespan.periodType === 'last') {
82
+ // const currentUnits =
83
+ // selectedOptions.timespan.unitsCount < 1
84
+ // ? 1
85
+ // : +selectedOptions.timespan.unitsCount
86
+ //
87
+ // if (selectedOptions.timespan.units === 'hours')
88
+ // startTime = subHours(newDate, currentUnits).getTime()
89
+ // else if (selectedOptions.timespan.units === 'days')
90
+ // startTime = subDays(newDate, currentUnits).getTime()
91
+ // else if (selectedOptions.timespan.units === 'weeks')
92
+ // startTime = subWeeks(newDate, currentUnits).getTime()
93
+ // else if (selectedOptions.timespan.units === 'months')
94
+ // startTime = subMonths(newDate, currentUnits).getTime()
95
+ // }
96
+ // } else if (
97
+ // type === 'custom_interval' &&
98
+ // !selectedOptions &&
99
+ // typeof unitsCount === 'number' &&
100
+ // typeof timeType === 'string'
101
+ // ) {
102
+ // if (timeType === 'hours')
103
+ // startTime = subHours(newDate, unitsCount).getTime()
104
+ // else if (timeType === 'days')
105
+ // startTime = subDays(newDate, unitsCount).getTime()
106
+ // else if (timeType === 'weeks')
107
+ // startTime = subWeeks(newDate, unitsCount).getTime()
108
+ // else if (timeType === 'months')
109
+ // startTime = subMonths(newDate, unitsCount).getTime()
110
+ // }
12
111
 
13
112
  return [startTime, newDate.getTime()]
14
113
  }
@@ -87,8 +87,8 @@ const periodOptions = computed<UI_I_OptionItem[]>(() =>
87
87
  )
88
88
  watch(
89
89
  () => periodOptions.value,
90
- (val: UI_I_OptionItem[]) => {
91
- if (val) selectedPeriod.value = val[0].value
90
+ (newValue: UI_I_OptionItem[]) => {
91
+ if (newValue) selectedPeriod.value = newValue[0].value
92
92
  },
93
93
  { immediate: true }
94
94
  )
@@ -142,8 +142,8 @@ const viewOptions = computed<UI_I_OptionItem[]>(() =>
142
142
  )
143
143
  watch(
144
144
  () => viewOptions.value,
145
- (val: UI_I_OptionItem[]) => {
146
- if (val) selectedView.value = val[0].value
145
+ (newValue: UI_I_OptionItem[]) => {
146
+ if (newValue) selectedView.value = newValue[0].value
147
147
  },
148
148
  { immediate: true }
149
149
  )
@@ -163,8 +163,8 @@ const sendUpdatedFilters = (): void => {
163
163
  }
164
164
  watch(
165
165
  () => [selectedPeriod.value, selectedView.value],
166
- (value: string[]) => {
167
- value[0] !== 'custom_interval' && sendUpdatedFilters()
166
+ (newValue: string[]) => {
167
+ newValue[0] !== 'custom_interval' && sendUpdatedFilters()
168
168
  },
169
169
  { immediate: true }
170
170
  )
@@ -149,26 +149,26 @@ watch(timeFormatUpdater, () => {
149
149
  getCurrentTime()
150
150
  })
151
151
 
152
- const onUpdateDateFrom = (val: number) => {
152
+ const onUpdateDateFrom = (val: number): void => {
153
153
  if (!val) return
154
154
 
155
155
  currentDateFrom.value = $formattedDate(new Date(val), '')
156
156
  }
157
- watch(currentDateFrom, (val) => {
158
- if (!val) return
157
+ watch(currentDateFrom, (newValue) => {
158
+ if (!newValue) return
159
159
 
160
- if ($isDate(val)) dateFrom.value = $getUnixByDate(val)
160
+ if ($isDate(newValue)) dateFrom.value = $getUnixByDate(newValue)
161
161
  })
162
162
 
163
- const onUpdateDateTo = (val: number) => {
163
+ const onUpdateDateTo = (val: number): void => {
164
164
  if (!val) return
165
165
 
166
166
  currentDateTo.value = $formattedDate(new Date(val), '')
167
167
  }
168
- watch(currentDateTo, (val) => {
169
- if (!val) return
168
+ watch(currentDateTo, (newValue) => {
169
+ if (!newValue) return
170
170
 
171
- if ($isDate(val)) dateTo.value = $getUnixByDate(val)
171
+ if ($isDate(newValue)) dateTo.value = $getUnixByDate(newValue)
172
172
  })
173
173
 
174
174
  const alertShow = ref<boolean>(false)
@@ -13,7 +13,7 @@ export const checkDateFunc = (
13
13
  const startDate = dateFrom + ' ' + timeFrom
14
14
  const endDate = dateTo + ' ' + timeTo
15
15
 
16
- if (!$isDate(startDate) || !$isDate(endDate))
16
+ if (!$isDate(startDate) || !$isDate(endDate) || !timeFrom || !timeTo)
17
17
  result = localization.invalidTimeEntry
18
18
  else {
19
19
  const endDateFormatted = $formattedDatetime(endDate, '', true)
@@ -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>