bfg-common 1.0.16 → 1.0.18

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 (28) hide show
  1. package/components/common/adapterManager/AdapterManager.vue +9 -9
  2. package/components/common/adapterManager/ui/table/Table.vue +2 -2
  3. package/components/common/addNetworking/AddNetworking.vue +2 -2
  4. package/components/common/addNetworking/config/sendData.ts +1 -1
  5. package/components/common/addNetworking/mappers/mappers.ts +1 -1
  6. package/components/common/diagramMain/DiagramMain.vue +2 -2
  7. package/components/common/diagramMain/config/initial.ts +1 -1
  8. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +236 -236
  9. package/components/common/diagramMain/modals/config/initial.ts +31 -45
  10. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +6 -5
  11. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +183 -178
  12. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +2 -1
  13. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +393 -392
  14. package/components/common/diagramMain/models/interfaces.ts +53 -74
  15. package/components/common/diagramMain/models/types.ts +1 -1
  16. package/components/common/monitor/models/interfaces.ts +1 -0
  17. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Cpu.vue +371 -371
  18. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/MaxCpu.vue +105 -105
  19. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Sa.vue +102 -102
  20. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/shares/Shares.vue +155 -155
  21. package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/Limit.vue +214 -214
  22. package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/Memory.vue +282 -282
  23. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +451 -451
  24. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +151 -151
  25. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +230 -230
  26. package/components/common/vm/actions/add/select/compatibility/Compatibility.vue +151 -151
  27. package/package.json +1 -1
  28. package/public/spice-console/network/spicechannel.js +1 -1
@@ -1,151 +1,151 @@
1
- <template>
2
- <div class="">
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.limitIops }}
6
- </template>
7
- <template #stackBlockContent>
8
- <div class="flex-align-center">
9
- <atoms-tooltip-error
10
- :has-error="!!apiError"
11
- :selector="`.vm-wizard-disk-device-io-field-${props.index}`"
12
- @remove="onRemoveValidationError"
13
- >
14
- <template #elem>
15
- <div class="select mr-1">
16
- <select
17
- :id="`vm-wizard-disk-device-io-field-${props.index}`"
18
- v-model="limitIopsTypeLocal"
19
- :class="`vm-wizard-disk-device-io-field-${props.index}`"
20
- @click.stop
21
- >
22
- <option
23
- v-for="(item, key) in limitIopsTypeOptions"
24
- :key="key"
25
- :value="item.value"
26
- >
27
- {{ item.text }}
28
- </option>
29
- </select>
30
- </div>
31
- </template>
32
- <template #content>{{ apiError }}</template>
33
- </atoms-tooltip-error>
34
-
35
- <atoms-combobox
36
- v-show="limitIopsType !== 'unlimited'"
37
- v-model.number="limitIopsLocal"
38
- :items="limitIopsOptions"
39
- @click.stop
40
- />
41
- <div v-show="limitIopsErrorText" class="flex-align-center">
42
- <atoms-tooltip>
43
- <template #elem>
44
- <atoms-the-icon
45
- width="24px"
46
- height="24px"
47
- class="is-error tooltip-trigger"
48
- name="info"
49
- />
50
- </template>
51
- <template #content>
52
- {{ limitIopsErrorText }}
53
- </template>
54
- </atoms-tooltip>
55
- </div>
56
- </div>
57
- </template>
58
- </atoms-stack-block>
59
- </div>
60
- </template>
61
-
62
- <script setup lang="ts">
63
- import {
64
- limitIopsOptionsFunc,
65
- limitIopsTypeOptionsFunc,
66
- } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/limitIops/config/options'
67
- import { UI_I_Localization } from '~/models/interfaces'
68
- import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
69
- import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
70
-
71
- const localization = computed<UI_I_Localization>(() => useLocal())
72
-
73
- const props = defineProps<{
74
- limitIops: number
75
- limitIopsType: string
76
- index: number
77
- errorValidationFields: UI_I_ErrorValidationField<string>[]
78
- }>()
79
- const emits = defineEmits<{
80
- (event: 'update:limit-iops', value: number): void
81
- (event: 'update:limit-iops-type', value: string): void
82
- (event: 'valid', value: boolean): void
83
- (event: 'remove-error-by-title', value: string): void
84
- }>()
85
-
86
- const limitIopsTypeOptions = ref<UI_I_OptionItem[]>(
87
- limitIopsTypeOptionsFunc(localization.value)
88
- )
89
-
90
- const minLimitIops = 16
91
- const maxLimitIops = 2_147_483_647
92
- const limitIopsOptions = ref<UI_I_OptionItem[]>(
93
- limitIopsOptionsFunc(localization.value, minLimitIops, maxLimitIops)
94
- )
95
-
96
- const limitIopsLocal = computed<number>({
97
- get() {
98
- return props.limitIops
99
- },
100
- set(newValue) {
101
- emits('update:limit-iops', newValue)
102
- },
103
- })
104
- const limitIopsTypeLocal = computed<string>({
105
- get() {
106
- return props.limitIopsType
107
- },
108
- set(newValue) {
109
- emits('update:limit-iops-type', newValue)
110
- },
111
- })
112
-
113
- const limitIopsErrorText = computed<string>(() => {
114
- if (limitIopsTypeLocal.value === 'unlimited') return ''
115
-
116
- const validValue = /^\d+(\.\d+)?$/.test(props.limitIops + '')
117
- if (!validValue) {
118
- return localization.value.inputContainsInvalidCharacters
119
- }
120
-
121
- if (+props.limitIops < minLimitIops || +props.limitIops > maxLimitIops) {
122
- return localization.value.enterValueBetween
123
- .replace('{0}', '' + minLimitIops)
124
- .replace('{1}', '' + maxLimitIops)
125
- }
126
- return ''
127
- })
128
- watch(
129
- limitIopsErrorText,
130
- (newValue) => {
131
- emits('valid', !!newValue)
132
- },
133
- { immediate: true }
134
- )
135
-
136
- const typeError = computed<string>(() => `disk_devices[${props.index}].io`)
137
-
138
- const apiError = computed<string>(() => {
139
- return (
140
- props.errorValidationFields?.find(
141
- (message) => message.field === typeError.value
142
- )?.error_message || ''
143
- )
144
- })
145
-
146
- const onRemoveValidationError = (): void => {
147
- emits('remove-error-by-title', typeError.value)
148
- }
149
- </script>
150
-
151
- <style scoped></style>
1
+ <template>
2
+ <div class="">
3
+ <atoms-stack-block :has-children="false">
4
+ <template #stackBlockKey>
5
+ {{ localization.limitIops }}
6
+ </template>
7
+ <template #stackBlockContent>
8
+ <div class="flex-align-center">
9
+ <atoms-tooltip-error
10
+ :has-error="!!apiError"
11
+ :selector="`.vm-wizard-disk-device-io-field-${props.index}`"
12
+ @remove="onRemoveValidationError"
13
+ >
14
+ <template #elem>
15
+ <div class="select mr-1">
16
+ <select
17
+ :id="`vm-wizard-disk-device-io-field-${props.index}`"
18
+ v-model="limitIopsTypeLocal"
19
+ :class="`vm-wizard-disk-device-io-field-${props.index}`"
20
+ @click.stop
21
+ >
22
+ <option
23
+ v-for="(item, key) in limitIopsTypeOptions"
24
+ :key="key"
25
+ :value="item.value"
26
+ >
27
+ {{ item.text }}
28
+ </option>
29
+ </select>
30
+ </div>
31
+ </template>
32
+ <template #content>{{ apiError }}</template>
33
+ </atoms-tooltip-error>
34
+
35
+ <atoms-combobox
36
+ v-show="limitIopsType !== 'unlimited'"
37
+ v-model.number="limitIopsLocal"
38
+ :items="limitIopsOptions"
39
+ @click.stop
40
+ />
41
+ <div v-show="limitIopsErrorText" class="flex-align-center">
42
+ <atoms-tooltip>
43
+ <template #elem>
44
+ <atoms-the-icon
45
+ width="24px"
46
+ height="24px"
47
+ class="is-error tooltip-trigger"
48
+ name="info"
49
+ />
50
+ </template>
51
+ <template #content>
52
+ {{ limitIopsErrorText }}
53
+ </template>
54
+ </atoms-tooltip>
55
+ </div>
56
+ </div>
57
+ </template>
58
+ </atoms-stack-block>
59
+ </div>
60
+ </template>
61
+
62
+ <script setup lang="ts">
63
+ import {
64
+ limitIopsOptionsFunc,
65
+ limitIopsTypeOptionsFunc,
66
+ } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/limitIops/config/options'
67
+ import { UI_I_Localization } from '~/models/interfaces'
68
+ import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
69
+ import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
70
+
71
+ const localization = computed<UI_I_Localization>(() => useLocal())
72
+
73
+ const props = defineProps<{
74
+ limitIops: number
75
+ limitIopsType: string
76
+ index: number
77
+ errorValidationFields: UI_I_ErrorValidationField<string>[]
78
+ }>()
79
+ const emits = defineEmits<{
80
+ (event: 'update:limit-iops', value: number): void
81
+ (event: 'update:limit-iops-type', value: string): void
82
+ (event: 'valid', value: boolean): void
83
+ (event: 'remove-error-by-title', value: string): void
84
+ }>()
85
+
86
+ const limitIopsTypeOptions = ref<UI_I_OptionItem[]>(
87
+ limitIopsTypeOptionsFunc(localization.value)
88
+ )
89
+
90
+ const minLimitIops = 16
91
+ const maxLimitIops = 2_147_483_647
92
+ const limitIopsOptions = ref<UI_I_OptionItem[]>(
93
+ limitIopsOptionsFunc(localization.value, minLimitIops, maxLimitIops)
94
+ )
95
+
96
+ const limitIopsLocal = computed<number>({
97
+ get() {
98
+ return props.limitIops
99
+ },
100
+ set(newValue) {
101
+ emits('update:limit-iops', newValue)
102
+ },
103
+ })
104
+ const limitIopsTypeLocal = computed<string>({
105
+ get() {
106
+ return props.limitIopsType
107
+ },
108
+ set(newValue) {
109
+ emits('update:limit-iops-type', newValue)
110
+ },
111
+ })
112
+
113
+ const limitIopsErrorText = computed<string>(() => {
114
+ if (limitIopsTypeLocal.value === 'unlimited') return ''
115
+
116
+ const validValue = /^\d+(\.\d+)?$/.test(props.limitIops + '')
117
+ if (!validValue) {
118
+ return localization.value.inputContainsInvalidCharacters
119
+ }
120
+
121
+ if (+props.limitIops < minLimitIops || +props.limitIops > maxLimitIops) {
122
+ return localization.value.enterValueBetween
123
+ .replace('{0}', '' + minLimitIops)
124
+ .replace('{1}', '' + maxLimitIops)
125
+ }
126
+ return ''
127
+ })
128
+ watch(
129
+ limitIopsErrorText,
130
+ (newValue) => {
131
+ emits('valid', !!newValue)
132
+ },
133
+ { immediate: true }
134
+ )
135
+
136
+ const typeError = computed<string>(() => `disk_devices[${props.index}].io`)
137
+
138
+ const apiError = computed<string>(() => {
139
+ return (
140
+ props.errorValidationFields?.find(
141
+ (message) => message.field === typeError.value
142
+ )?.error_message || ''
143
+ )
144
+ })
145
+
146
+ const onRemoveValidationError = (): void => {
147
+ emits('remove-error-by-title', typeError.value)
148
+ }
149
+ </script>
150
+
151
+ <style scoped></style>