bfg-common 1.1.63 → 1.1.64
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.
- package/assets/localization/local_be.json +1 -1
- package/assets/localization/local_hy.json +1 -1
- package/assets/localization/local_kk.json +1 -1
- package/assets/localization/local_ru.json +1 -1
- package/components/atoms/alert/Notification.vue +167 -167
- package/components/atoms/autocomplete/Autocomplete.vue +236 -236
- package/components/atoms/datepicker/Datepicker.vue +612 -612
- package/components/atoms/list/SelectList.vue +62 -62
- package/components/atoms/nav/NavBar.vue +116 -116
- package/components/atoms/nav/VerticalNavBar.vue +89 -89
- package/components/atoms/notificationBar/NotificationBar.vue +175 -175
- package/components/atoms/perPage/PerPage.vue +52 -52
- package/components/atoms/popup/SimplePopup.vue +90 -90
- package/components/atoms/step/VerticalStep.vue +104 -104
- package/components/atoms/switch/Switch.vue +107 -107
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +206 -206
- package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
- package/components/atoms/tabs/Tabs.vue +189 -189
- package/components/atoms/tooltip/Signpost.vue +224 -224
- package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
- package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
- package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
- package/components/common/browse/Browse.vue +182 -182
- package/components/common/browse/blocks/Title.vue +66 -66
- package/components/common/diagramMain/Diagram.vue +186 -186
- package/components/common/diagramMain/DiagramMain.vue +986 -986
- package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
- package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
- package/components/common/diagramMain/network/Contents.vue +238 -238
- package/components/common/feedback/Buttons.vue +232 -232
- package/components/common/feedback/Message.vue +468 -468
- package/components/common/feedback/VisitPortal.vue +54 -54
- package/components/common/graph/Graph.vue +18 -20
- package/components/common/help/navbar/left/Left.vue +159 -159
- package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
- package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
- package/components/common/modals/Rename.vue +165 -165
- package/components/common/monitor/advanced/Advanced.vue +3 -33
- package/components/common/monitor/advanced/GraphView.vue +4 -4
- package/components/common/monitor/advanced/table/Table.vue +5 -5
- package/components/common/monitor/advanced/tools/Tools.vue +27 -91
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +17 -101
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +7 -25
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts +0 -55
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces.ts +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +3 -32
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +8 -25
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +19 -41
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/models/interfaces.ts +1 -1
- package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +38 -50
- package/components/common/monitor/config/getValidDateByOption.ts +6 -105
- package/components/common/monitor/overview/filters/Filters.vue +6 -6
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +8 -8
- package/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker.ts +1 -1
- package/components/common/perPage/PerPage.vue +51 -51
- package/components/common/recursionTree/RecursionTree.vue +201 -201
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/VirtualHardware.vue +641 -642
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +245 -274
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Cpu.vue +375 -375
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/Limit.vue +234 -234
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/config/options.ts +28 -28
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/Memory.vue +316 -316
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +35 -35
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +447 -447
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +1 -1
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/reservation/Reservation.vue +235 -235
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/order/Order.vue +203 -195
- package/components/common/vm/actions/add/select/storage/config/config.ts +154 -154
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
- package/models/store/interfaces.ts +37 -37
- package/models/store/storage/interfaces.ts +32 -32
- package/models/store/types.ts +32 -32
- package/modules/fixContentBuild/utils/methods.ts +114 -114
- package/package.json +1 -1
- package/public/spice-console/application/codec.js +257 -257
- package/public/spice-console/lib/rasterEngine.js +907 -907
- package/public/spice-console/network/spicechannel.js +369 -369
- package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
- package/public/spice-console-minify/lib/jgestures.min.js +24 -24
- package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
- package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
- package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
- package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
- package/utils/contentBuild.ts +34 -34
- package/components/common/monitor/advanced/tools/utils/countCores.ts +0 -7
|
@@ -5,41 +5,29 @@ 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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
}
|
|
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
|
+
]
|
|
43
31
|
|
|
44
32
|
export const viewFunc = (
|
|
45
33
|
localization: UI_I_Localization,
|
|
@@ -55,29 +43,29 @@ export const viewFunc = (
|
|
|
55
43
|
],
|
|
56
44
|
host: [
|
|
57
45
|
{ text: localization.cpuUsageInPercent, value: 'cpuUsageInPercent' },
|
|
58
|
-
|
|
46
|
+
{ text: localization.datastore, value: 'datastore' },
|
|
59
47
|
{ text: localization.memory, value: 'memory' },
|
|
60
48
|
{ text: localization.disk, value: 'disk' },
|
|
61
49
|
{ text: localization.network, value: 'network' },
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
+
},
|
|
70
58
|
],
|
|
71
59
|
vm: [
|
|
72
60
|
{ text: localization.cpuUsageInPercent, value: 'cpuUsageInPercent' },
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
{ text: localization.memory, value: 'memory' },
|
|
61
|
+
{ text: localization.cpuUsageInMhz, value: 'cpuUsageInMhz' },
|
|
62
|
+
{ text: localization.cpuReady, value: 'cpuReady' },
|
|
63
|
+
{ text: localization.datastore, value: 'datastore' },
|
|
77
64
|
{ text: localization.disk, value: 'disk' },
|
|
65
|
+
{ text: localization.memory, value: 'memory' },
|
|
78
66
|
{ text: localization.network, value: 'network' },
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
{ text: localization.power, value: 'power' },
|
|
68
|
+
{ text: localization.virtualDisk, value: 'virtualDisk' },
|
|
81
69
|
],
|
|
82
70
|
}
|
|
83
71
|
const currentOptions = viewData[type]
|
|
@@ -1,113 +1,14 @@
|
|
|
1
1
|
import { subDays, subHours, subMonths, subWeeks, subYears } from 'date-fns'
|
|
2
2
|
|
|
3
|
-
export const getValidDateByOptionFunc = (
|
|
4
|
-
type: string,
|
|
5
|
-
selectedOptions = null,
|
|
6
|
-
unitsCount: null | number = null,
|
|
7
|
-
timeType: null | string = ''
|
|
8
|
-
): number[] => {
|
|
3
|
+
export const getValidDateByOptionFunc = (type: string): number[] => {
|
|
9
4
|
const newDate = new Date()
|
|
10
5
|
let startTime = 0
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
// }
|
|
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()
|
|
111
12
|
|
|
112
13
|
return [startTime, newDate.getTime()]
|
|
113
14
|
}
|
|
@@ -87,8 +87,8 @@ const periodOptions = computed<UI_I_OptionItem[]>(() =>
|
|
|
87
87
|
)
|
|
88
88
|
watch(
|
|
89
89
|
() => periodOptions.value,
|
|
90
|
-
(
|
|
91
|
-
if (
|
|
90
|
+
(val: UI_I_OptionItem[]) => {
|
|
91
|
+
if (val) selectedPeriod.value = val[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
|
-
(
|
|
146
|
-
if (
|
|
145
|
+
(val: UI_I_OptionItem[]) => {
|
|
146
|
+
if (val) selectedView.value = val[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
|
-
(
|
|
167
|
-
|
|
166
|
+
(value: string[]) => {
|
|
167
|
+
value[0] !== 'custom_interval' && sendUpdatedFilters()
|
|
168
168
|
},
|
|
169
169
|
{ immediate: true }
|
|
170
170
|
)
|
package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue
CHANGED
|
@@ -149,26 +149,26 @@ watch(timeFormatUpdater, () => {
|
|
|
149
149
|
getCurrentTime()
|
|
150
150
|
})
|
|
151
151
|
|
|
152
|
-
const onUpdateDateFrom = (val: number)
|
|
152
|
+
const onUpdateDateFrom = (val: number) => {
|
|
153
153
|
if (!val) return
|
|
154
154
|
|
|
155
155
|
currentDateFrom.value = $formattedDate(new Date(val), '')
|
|
156
156
|
}
|
|
157
|
-
watch(currentDateFrom, (
|
|
158
|
-
if (!
|
|
157
|
+
watch(currentDateFrom, (val) => {
|
|
158
|
+
if (!val) return
|
|
159
159
|
|
|
160
|
-
if ($isDate(
|
|
160
|
+
if ($isDate(val)) dateFrom.value = $getUnixByDate(val)
|
|
161
161
|
})
|
|
162
162
|
|
|
163
|
-
const onUpdateDateTo = (val: number)
|
|
163
|
+
const onUpdateDateTo = (val: number) => {
|
|
164
164
|
if (!val) return
|
|
165
165
|
|
|
166
166
|
currentDateTo.value = $formattedDate(new Date(val), '')
|
|
167
167
|
}
|
|
168
|
-
watch(currentDateTo, (
|
|
169
|
-
if (!
|
|
168
|
+
watch(currentDateTo, (val) => {
|
|
169
|
+
if (!val) return
|
|
170
170
|
|
|
171
|
-
if ($isDate(
|
|
171
|
+
if ($isDate(val)) dateTo.value = $getUnixByDate(val)
|
|
172
172
|
})
|
|
173
173
|
|
|
174
174
|
const alertShow = ref<boolean>(false)
|
package/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker.ts
CHANGED
|
@@ -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))
|
|
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>
|