bfg-common 1.4.647 → 1.4.649

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 (98) hide show
  1. package/components/atoms/TheIcon3.vue +50 -50
  2. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  3. package/components/atoms/stack/StackBlock.vue +185 -185
  4. package/components/atoms/table/dataGrid/DataGrid.vue +1633 -1633
  5. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +222 -222
  6. package/components/common/browse/BrowseNew.vue +237 -237
  7. package/components/common/browse/BrowseOld.vue +217 -217
  8. package/components/common/browse/blocks/contents/Files.vue +37 -37
  9. package/components/common/browse/blocks/contents/FilesOld.vue +72 -72
  10. package/components/common/browse/blocks/contents/filesNew/FilesNew.vue +96 -96
  11. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  12. package/components/common/context/lib/models/interfaces.ts +30 -30
  13. package/components/common/context/recursion/Recursion.vue +86 -86
  14. package/components/common/context/recursion/RecursionNew.vue +199 -199
  15. package/components/common/context/recursion/RecursionOld.vue +213 -213
  16. package/components/common/layout/theHeader/helpMenu/About.vue +85 -85
  17. package/components/common/layout/theHeader/helpMenu/aboutNew/AboutNew.vue +105 -105
  18. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +152 -152
  19. package/components/common/modals/confirmByInput/ConfirmByInput.vue +206 -206
  20. package/components/common/modals/unsavedChanges/UnsavedChanges.vue +56 -56
  21. package/components/common/monitor/overview/filters/Filters.vue +232 -234
  22. package/components/common/monitor/overview/filters/lib/config/filterOptions.ts +81 -82
  23. package/components/common/spiceConsole/Drawer.vue +370 -370
  24. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  25. package/components/common/split/vertical/Vertical.vue +160 -160
  26. package/components/common/vm/actions/add/Add.vue +617 -617
  27. package/components/common/vm/actions/clone/lib/config/steps.ts +129 -129
  28. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +267 -267
  29. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +269 -269
  30. package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +219 -219
  31. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/BusNew.vue +118 -118
  32. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveNew.vue +161 -161
  33. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveOld.vue +165 -165
  34. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +25 -25
  35. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +55 -55
  36. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +338 -338
  37. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +147 -147
  38. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +220 -220
  39. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/mode/ModeOld.vue +55 -55
  40. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/SharingNew.vue +44 -44
  41. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +281 -281
  42. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetworkNew.vue +124 -124
  43. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/LocationOld.vue +134 -134
  44. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/New.vue +63 -63
  45. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +95 -95
  46. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  47. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressNew.vue +69 -69
  48. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressOld.vue +83 -83
  49. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +85 -85
  50. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +91 -91
  51. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +35 -35
  52. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoNew.vue +48 -48
  53. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +15 -15
  54. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteNew.vue +42 -42
  55. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteOld.vue +30 -30
  56. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridNew.vue +30 -30
  57. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionNew.vue +46 -46
  58. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +56 -56
  59. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  60. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/OtherNew.vue +30 -30
  61. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/TotalVideoMemoryNew.vue +54 -54
  62. package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +145 -145
  63. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +102 -102
  64. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +75 -75
  65. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +26 -26
  66. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +57 -57
  67. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/FirmwareNew.vue +42 -42
  68. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/MenuNew.vue +25 -25
  69. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +171 -171
  70. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +50 -50
  71. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +141 -141
  72. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +140 -140
  73. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +30 -30
  74. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +30 -30
  75. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/FolderSharingNew.vue +30 -30
  76. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  77. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/KeymapNew.vue +39 -39
  78. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
  79. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +102 -102
  80. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordOld.vue +94 -94
  81. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
  82. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionNew.vue +38 -38
  83. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
  84. package/components/common/vm/actions/common/select/storage/Storage.vue +130 -130
  85. package/components/common/vm/actions/common/select/storage/StorageOld.vue +129 -129
  86. package/components/common/vm/actions/editSettings/EditSettings.vue +232 -232
  87. package/components/common/vm/actions/editSettings/EditSettingsOld.vue +183 -183
  88. package/components/common/vm/actions/editSettings/new/New.vue +177 -177
  89. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  90. package/composables/productNameLocal.ts +30 -30
  91. package/package.json +1 -1
  92. package/plugins/date.ts +233 -233
  93. package/plugins/recursion.ts +311 -311
  94. package/public/spice-console/lib/images/bitmap.js +203 -203
  95. package/public/spice-console/network/spicechannel.js +383 -383
  96. package/store/main/mutations.ts +7 -7
  97. package/store/main/state.ts +7 -7
  98. package/store/tasks/mappers/recentTasks.ts +64 -64
@@ -1,234 +1,232 @@
1
- <template>
2
- <div class="horizontal-flex-container overview-chart-title-bar">
3
- <div class="horizontal-flex-container">
4
- <label for="periodSelect" class="label-select"
5
- >{{ localization.inventoryMonitor.period }}:</label
6
- >
7
- <div v-if="!disabledPeriodOptions" class="select">
8
- <select
9
- id="periodSelect"
10
- v-model="selectedPeriod"
11
- data-id="period-select"
12
- >
13
- <option
14
- v-for="(item, index) in periodOptions"
15
- :key="index"
16
- :value="item.value"
17
- >
18
- {{ item.text }}
19
- </option>
20
- </select>
21
- </div>
22
- <span v-else class="single-option">{{ periodOptions[0].text }}</span>
23
- </div>
24
- <div v-show="isShowCustomIntervalButton">
25
- <a
26
- id="show-interval-modal-button"
27
- data-id="show-interval-modal-button"
28
- @click="onShowIntervalModal"
29
- >{{ localization.inventoryMonitor.changeCustomInterval }}</a
30
- >
31
- </div>
32
- <div v-if="!disabledPeriodOptions" class="chart-title">
33
- {{ chartTitleDate }}
34
- </div>
35
- <div class="view-select-label horizontal-flex-container">
36
- <label for="viewSelect" class="label-select"
37
- >{{ localization.common.view }}:</label
38
- >
39
- <div class="select">
40
- <select id="viewSelect" v-model="selectedView" data-id="view-select">
41
- <option
42
- v-for="(item, index) in viewOptions"
43
- :key="index"
44
- :value="item.value"
45
- >
46
- {{ item.text }}
47
- </option>
48
- </select>
49
- </div>
50
- </div>
51
- </div>
52
-
53
- <common-monitor-overview-filters-custom-interval-modal
54
- v-if="isShowIntervalModal"
55
- :selected-periods="props.selectedPeriods"
56
- :format-date="props.formatDate"
57
- :current-lang="props.currentLang"
58
- @hide="onHideIntervalModal"
59
- @submit="onSubmitIntervalModal"
60
- />
61
- </template>
62
-
63
- <script setup lang="ts">
64
- import type { UI_I_Localization } from '~/lib/models/interfaces'
65
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
66
- import type { UI_T_Project } from '~/lib/models/types'
67
- import type { UI_I_MonitorGraphPayload } from '~/components/common/monitor/lib/models/interfaces'
68
- import type { UI_T_OverviewViewType } from '~/components/common/monitor/overview/filters/lib/models/types'
69
- import {
70
- periodFunc,
71
- viewFunc,
72
- } from '~/components/common/monitor/overview/filters/lib/config/filterOptions'
73
- import { getValidDateByOptionFunc } from '~/components/common/monitor/lib/config/getValidDateByOption'
74
-
75
- const localization = computed<UI_I_Localization>(() => useLocal())
76
- const { $formattedDatetime } = useNuxtApp()
77
-
78
- const props = defineProps<{
79
- startDate: number
80
- endDate: number
81
- chartType: 'spline' | 'pie'
82
- view: UI_T_OverviewViewType
83
- selectedPeriods: number[]
84
- formatDate: string
85
- project: UI_T_Project
86
- currentLang: string
87
- formatTime?: string
88
- }>()
89
-
90
- const emits = defineEmits<{
91
- (event: 'update-filters', value: UI_I_MonitorGraphPayload): void
92
- (event: 'update-custom-date', value: number[]): void
93
- }>()
94
-
95
- const selectedPeriod = ref<string>('')
96
- const periodOptions = computed<UI_I_OptionItem[]>(() =>
97
- periodFunc(localization.value)
98
- )
99
- watch(
100
- () => periodOptions.value,
101
- (newValue: UI_I_OptionItem[]) => {
102
- if (newValue) selectedPeriod.value = newValue[0].value
103
- },
104
- { immediate: true }
105
- )
106
-
107
- const isShowCustomIntervalButton = computed<boolean>(
108
- () => selectedPeriod.value === 'custom_interval'
109
- )
110
-
111
- const isShowIntervalModal = ref<boolean>(false)
112
- const onShowIntervalModal = (): void => {
113
- isShowIntervalModal.value = true
114
- }
115
- const onHideIntervalModal = (): void => {
116
- isShowIntervalModal.value = false
117
- }
118
- const onSubmitIntervalModal = (customDates: number[]): void => {
119
- customDatesData.value = customDates
120
- sendUpdatedFilters()
121
- onHideIntervalModal()
122
- emits('update-custom-date', customDates)
123
- }
124
-
125
- const chartTitleDate = computed<string>(() => {
126
- const startValue = props.startDate
127
- const endValue = props.endDate
128
- if (!startValue && !endValue) return ''
129
-
130
- const start = $formattedDatetime(
131
- startValue,
132
- props.formatDate,
133
- true,
134
- '',
135
- props.formatTime
136
- )
137
- const end = $formattedDatetime(
138
- endValue,
139
- props.formatDate,
140
- true,
141
- '',
142
- props.formatTime
143
- )
144
- return `${start} - ${end}`
145
- })
146
-
147
- // const disabledPeriodOptions = computed<boolean>(
148
- // () => props.chartType === 'pie' || !chartTitleDate.value
149
- // )
150
-
151
- const disabledPeriodOptions = computed<boolean>(() => props.chartType === 'pie')
152
-
153
- const selectedView = ref<string>('')
154
- const viewOptions = computed<UI_I_OptionItem[]>(() =>
155
- viewFunc(localization.value, props.view, props.project)
156
- )
157
- watch(
158
- () => viewOptions.value,
159
- (newValue: UI_I_OptionItem[]) => {
160
- if (newValue) selectedView.value = newValue[0].value
161
- },
162
- { immediate: true }
163
- )
164
-
165
- const customDatesData = ref<number[]>([])
166
- const sendUpdatedFilters = (): void => {
167
- const currentPeriod =
168
- selectedPeriod.value === 'custom_interval'
169
- ? customDatesData.value
170
- : getValidDateByOptionFunc(selectedPeriod.value)
171
- const filters: UI_I_MonitorGraphPayload = {
172
- period: currentPeriod,
173
- view: selectedView.value,
174
- periodName: selectedPeriod.value,
175
- }
176
-
177
- emits('update-filters', filters)
178
- }
179
- watch(
180
- () => [selectedPeriod.value, selectedView.value],
181
- (newValue: string[]) => {
182
- newValue[0] !== 'custom_interval' && sendUpdatedFilters()
183
- },
184
- { immediate: true }
185
- )
186
- </script>
187
-
188
- <style scoped lang="scss">
189
- .horizontal-flex-container {
190
- display: flex;
191
- flex-direction: row;
192
- align-items: center;
193
- line-height: 20px;
194
- flex-shrink: 0;
195
- padding-top: 5px;
196
-
197
- .select {
198
- position: relative;
199
-
200
- select {
201
- height: 20px;
202
- margin: 5px;
203
- color: var(--global-font-color);
204
- }
205
- }
206
- .single-option {
207
- margin-left: 5px;
208
- }
209
-
210
- .chart-title {
211
- color: var(--global-font-color);
212
- text-overflow: ellipsis;
213
- white-space: nowrap;
214
- overflow: hidden;
215
- margin: 6px;
216
- font-weight: 700;
217
- text-transform: uppercase;
218
- }
219
-
220
- #show-interval-modal-button {
221
- cursor: pointer;
222
- color: var(--dropdown-item-color);
223
- }
224
-
225
- .view-select-label {
226
- margin-left: auto;
227
- padding-right: 7px;
228
- padding-left: 7px;
229
- text-overflow: ellipsis;
230
- white-space: nowrap;
231
- align-items: center;
232
- }
233
- }
234
- </style>
1
+ <template>
2
+ <div class="horizontal-flex-container overview-chart-title-bar">
3
+ <div class="horizontal-flex-container">
4
+ <label for="periodSelect" class="label-select"
5
+ >{{ localization.inventoryMonitor.period }}:</label
6
+ >
7
+ <div v-if="!disabledPeriodOptions" class="select">
8
+ <select
9
+ id="periodSelect"
10
+ v-model="selectedPeriod"
11
+ data-id="period-select"
12
+ >
13
+ <option
14
+ v-for="(item, index) in periodOptions"
15
+ :key="index"
16
+ :value="item.value"
17
+ >
18
+ {{ item.text }}
19
+ </option>
20
+ </select>
21
+ </div>
22
+ <span v-else class="single-option">{{ periodOptions[0].text }}</span>
23
+ </div>
24
+ <div v-show="isShowCustomIntervalButton">
25
+ <a
26
+ id="show-interval-modal-button"
27
+ data-id="show-interval-modal-button"
28
+ @click="onShowIntervalModal"
29
+ >{{ localization.inventoryMonitor.changeCustomInterval }}</a
30
+ >
31
+ </div>
32
+ <div v-if="!disabledPeriodOptions" class="chart-title">
33
+ {{ chartTitleDate }}
34
+ </div>
35
+ <div class="view-select-label horizontal-flex-container">
36
+ <label for="viewSelect" class="label-select"
37
+ >{{ localization.common.view }}:</label
38
+ >
39
+ <div class="select">
40
+ <select id="viewSelect" v-model="selectedView" data-id="view-select">
41
+ <option
42
+ v-for="(item, index) in viewOptions"
43
+ :key="index"
44
+ :value="item.value"
45
+ >
46
+ {{ item.text }}
47
+ </option>
48
+ </select>
49
+ </div>
50
+ </div>
51
+ </div>
52
+
53
+ <common-monitor-overview-filters-custom-interval-modal
54
+ v-if="isShowIntervalModal"
55
+ :selected-periods="props.selectedPeriods"
56
+ :format-date="props.formatDate"
57
+ :current-lang="props.currentLang"
58
+ @hide="onHideIntervalModal"
59
+ @submit="onSubmitIntervalModal"
60
+ />
61
+ </template>
62
+
63
+ <script setup lang="ts">
64
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
65
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
66
+ import type { UI_I_MonitorGraphPayload } from '~/components/common/monitor/lib/models/interfaces'
67
+ import type { UI_T_OverviewViewType } from '~/components/common/monitor/overview/filters/lib/models/types'
68
+ import {
69
+ periodFunc,
70
+ viewFunc,
71
+ } from '~/components/common/monitor/overview/filters/lib/config/filterOptions'
72
+ import { getValidDateByOptionFunc } from '~/components/common/monitor/lib/config/getValidDateByOption'
73
+
74
+ const localization = computed<UI_I_Localization>(() => useLocal())
75
+ const { $formattedDatetime } = useNuxtApp()
76
+
77
+ const props = defineProps<{
78
+ startDate: number
79
+ endDate: number
80
+ chartType: 'spline' | 'pie'
81
+ view: UI_T_OverviewViewType
82
+ selectedPeriods: number[]
83
+ formatDate: string
84
+ currentLang: string
85
+ formatTime?: string
86
+ }>()
87
+
88
+ const emits = defineEmits<{
89
+ (event: 'update-filters', value: UI_I_MonitorGraphPayload): void
90
+ (event: 'update-custom-date', value: number[]): void
91
+ }>()
92
+
93
+ const selectedPeriod = ref<string>('')
94
+ const periodOptions = computed<UI_I_OptionItem[]>(() =>
95
+ periodFunc(localization.value)
96
+ )
97
+ watch(
98
+ () => periodOptions.value,
99
+ (newValue: UI_I_OptionItem[]) => {
100
+ if (newValue) selectedPeriod.value = newValue[0].value
101
+ },
102
+ { immediate: true }
103
+ )
104
+
105
+ const isShowCustomIntervalButton = computed<boolean>(
106
+ () => selectedPeriod.value === 'custom_interval'
107
+ )
108
+
109
+ const isShowIntervalModal = ref<boolean>(false)
110
+ const onShowIntervalModal = (): void => {
111
+ isShowIntervalModal.value = true
112
+ }
113
+ const onHideIntervalModal = (): void => {
114
+ isShowIntervalModal.value = false
115
+ }
116
+ const onSubmitIntervalModal = (customDates: number[]): void => {
117
+ customDatesData.value = customDates
118
+ sendUpdatedFilters()
119
+ onHideIntervalModal()
120
+ emits('update-custom-date', customDates)
121
+ }
122
+
123
+ const chartTitleDate = computed<string>(() => {
124
+ const startValue = props.startDate
125
+ const endValue = props.endDate
126
+ if (!startValue && !endValue) return ''
127
+
128
+ const start = $formattedDatetime(
129
+ startValue,
130
+ props.formatDate,
131
+ true,
132
+ '',
133
+ props.formatTime
134
+ )
135
+ const end = $formattedDatetime(
136
+ endValue,
137
+ props.formatDate,
138
+ true,
139
+ '',
140
+ props.formatTime
141
+ )
142
+ return `${start} - ${end}`
143
+ })
144
+
145
+ // const disabledPeriodOptions = computed<boolean>(
146
+ // () => props.chartType === 'pie' || !chartTitleDate.value
147
+ // )
148
+
149
+ const disabledPeriodOptions = computed<boolean>(() => props.chartType === 'pie')
150
+
151
+ const selectedView = ref<string>('')
152
+ const viewOptions = computed<UI_I_OptionItem[]>(() =>
153
+ viewFunc(localization.value, props.view)
154
+ )
155
+ watch(
156
+ () => viewOptions.value,
157
+ (newValue: UI_I_OptionItem[]) => {
158
+ if (newValue) selectedView.value = newValue[0].value
159
+ },
160
+ { immediate: true }
161
+ )
162
+
163
+ const customDatesData = ref<number[]>([])
164
+ const sendUpdatedFilters = (): void => {
165
+ const currentPeriod =
166
+ selectedPeriod.value === 'custom_interval'
167
+ ? customDatesData.value
168
+ : getValidDateByOptionFunc(selectedPeriod.value)
169
+ const filters: UI_I_MonitorGraphPayload = {
170
+ period: currentPeriod,
171
+ view: selectedView.value,
172
+ periodName: selectedPeriod.value,
173
+ }
174
+
175
+ emits('update-filters', filters)
176
+ }
177
+ watch(
178
+ () => [selectedPeriod.value, selectedView.value],
179
+ (newValue: string[]) => {
180
+ newValue[0] !== 'custom_interval' && sendUpdatedFilters()
181
+ },
182
+ { immediate: true }
183
+ )
184
+ </script>
185
+
186
+ <style scoped lang="scss">
187
+ .horizontal-flex-container {
188
+ display: flex;
189
+ flex-direction: row;
190
+ align-items: center;
191
+ line-height: 20px;
192
+ flex-shrink: 0;
193
+ padding-top: 5px;
194
+
195
+ .select {
196
+ position: relative;
197
+
198
+ select {
199
+ height: 20px;
200
+ margin: 5px;
201
+ color: var(--global-font-color);
202
+ }
203
+ }
204
+ .single-option {
205
+ margin-left: 5px;
206
+ }
207
+
208
+ .chart-title {
209
+ color: var(--global-font-color);
210
+ text-overflow: ellipsis;
211
+ white-space: nowrap;
212
+ overflow: hidden;
213
+ margin: 6px;
214
+ font-weight: 700;
215
+ text-transform: uppercase;
216
+ }
217
+
218
+ #show-interval-modal-button {
219
+ cursor: pointer;
220
+ color: var(--dropdown-item-color);
221
+ }
222
+
223
+ .view-select-label {
224
+ margin-left: auto;
225
+ padding-right: 7px;
226
+ padding-left: 7px;
227
+ text-overflow: ellipsis;
228
+ white-space: nowrap;
229
+ align-items: center;
230
+ }
231
+ }
232
+ </style>
@@ -1,82 +1,81 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
3
- import type { UI_I_OverviewViewOptionData } from '~/components/common/monitor/overview/filters/lib/models/interfaces'
4
- import type { UI_T_OverviewViewType } from '~/components/common/monitor/overview/filters/lib/models/types'
5
- import type { UI_T_Project } from '~/lib/models/types'
6
-
7
- export const periodFunc = (
8
- localization: UI_I_Localization
9
- ): UI_I_OptionItem[] => [
10
- {
11
- text: localization.inventoryMonitor.realTime,
12
- value: 'real_time',
13
- },
14
- {
15
- text: localization.inventoryMonitor.lastDay,
16
- value: 'last_day',
17
- },
18
- {
19
- text: localization.inventoryMonitor.lastWeek,
20
- value: 'last_week',
21
- },
22
- {
23
- text: localization.inventoryMonitor.lastMonth,
24
- value: 'last_month',
25
- },
26
- // {
27
- // text: localization.inventoryMonitor.lastYear,
28
- // value: 'last_year',
29
- // },
30
- {
31
- text: localization.inventoryMonitor.customInterval,
32
- value: 'custom_interval',
33
- },
34
- ]
35
-
36
- export const viewFunc = (
37
- localization: UI_I_Localization,
38
- viewType: UI_T_OverviewViewType,
39
- project: UI_T_Project
40
- ): UI_I_OptionItem[] => {
41
- const host = [
42
- { text: localization.inventoryMonitor.overview, value: 'overview' },
43
- { text: localization.common.memory, value: 'memory' },
44
- { text: localization.common.network, value: 'network' },
45
- { text: localization.common.disks, value: 'disks' },
46
- // { text: localization.common.virtual_machines, value: 'virtual_machines' },
47
- ]
48
- if (project === 'procurator')
49
- host.push({
50
- text: localization.inventoryMonitor.spaceUtilization,
51
- value: 'spaceUtilization',
52
- })
53
-
54
- const viewData: UI_I_OverviewViewOptionData = {
55
- zone: [{ text: localization.inventoryMonitor.overview, value: 'overview' }],
56
- datacenter: [
57
- {
58
- text: localization.common.clusters,
59
- value: 'clusters',
60
- },
61
- // {
62
- // text: localization.inventoryMonitor.spaceUtilization,
63
- // value: 'spaceUtilization',
64
- // },
65
- // {
66
- // text: localization.common.datastores,
67
- // value: 'datastores',
68
- // },
69
- ],
70
- host,
71
- vm: [
72
- { text: localization.inventoryMonitor.overview, value: 'overview' },
73
- // { text: localization.common.space, value: 'space' },
74
- // { text: localization.inventoryMonitor.spaceUtilization, value: 'space_utilization' },
75
- { text: localization.common.network, value: 'network' },
76
- { text: localization.common.disks, value: 'disks' },
77
- ],
78
- cluster: [{ text: localization.inventoryMonitor.overview, value: 'overview' }],
79
- }
80
-
81
- return viewData[viewType]
82
- }
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
3
+ import type { UI_I_OverviewViewOptionData } from '~/components/common/monitor/overview/filters/lib/models/interfaces'
4
+ import type { UI_T_OverviewViewType } from '~/components/common/monitor/overview/filters/lib/models/types'
5
+
6
+ export const periodFunc = (
7
+ localization: UI_I_Localization
8
+ ): UI_I_OptionItem[] => [
9
+ {
10
+ text: localization.inventoryMonitor.realTime,
11
+ value: 'real_time',
12
+ },
13
+ {
14
+ text: localization.inventoryMonitor.lastDay,
15
+ value: 'last_day',
16
+ },
17
+ {
18
+ text: localization.inventoryMonitor.lastWeek,
19
+ value: 'last_week',
20
+ },
21
+ {
22
+ text: localization.inventoryMonitor.lastMonth,
23
+ value: 'last_month',
24
+ },
25
+ // {
26
+ // text: localization.inventoryMonitor.lastYear,
27
+ // value: 'last_year',
28
+ // },
29
+ {
30
+ text: localization.inventoryMonitor.customInterval,
31
+ value: 'custom_interval',
32
+ },
33
+ ]
34
+
35
+ export const viewFunc = (
36
+ localization: UI_I_Localization,
37
+ viewType: UI_T_OverviewViewType
38
+ ): UI_I_OptionItem[] => {
39
+ const host = [
40
+ { text: localization.inventoryMonitor.overview, value: 'overview' },
41
+ { text: localization.common.memory, value: 'memory' },
42
+ { text: localization.common.network, value: 'network' },
43
+ { text: localization.common.disks, value: 'disks' },
44
+ {
45
+ text: localization.inventoryMonitor.spaceUtilization,
46
+ value: 'spaceUtilization',
47
+ },
48
+ // { text: localization.common.virtual_machines, value: 'virtual_machines' },
49
+ ]
50
+
51
+ const viewData: UI_I_OverviewViewOptionData = {
52
+ zone: [{ text: localization.inventoryMonitor.overview, value: 'overview' }],
53
+ datacenter: [
54
+ {
55
+ text: localization.common.clusters,
56
+ value: 'clusters',
57
+ },
58
+ // {
59
+ // text: localization.inventoryMonitor.spaceUtilization,
60
+ // value: 'spaceUtilization',
61
+ // },
62
+ // {
63
+ // text: localization.common.datastores,
64
+ // value: 'datastores',
65
+ // },
66
+ ],
67
+ host,
68
+ vm: [
69
+ { text: localization.inventoryMonitor.overview, value: 'overview' },
70
+ // { text: localization.common.space, value: 'space' },
71
+ // { text: localization.inventoryMonitor.spaceUtilization, value: 'space_utilization' },
72
+ { text: localization.common.network, value: 'network' },
73
+ { text: localization.common.disks, value: 'disks' },
74
+ ],
75
+ cluster: [
76
+ { text: localization.inventoryMonitor.overview, value: 'overview' },
77
+ ],
78
+ }
79
+
80
+ return viewData[viewType]
81
+ }