bfg-common 1.3.216 → 1.3.217

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 (44) hide show
  1. package/assets/localization/local_en.json +3 -1
  2. package/components/atoms/alert/Alert.vue +95 -95
  3. package/components/atoms/alert/Notification.vue +170 -170
  4. package/components/atoms/switch/Switch.vue +111 -111
  5. package/components/atoms/table/compact/Compact.vue +526 -526
  6. package/components/atoms/tooltip/Signpost.vue +225 -225
  7. package/components/common/diagramMain/lib/models/interfaces.ts +5 -5
  8. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +6 -6
  9. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +2 -9
  10. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +4 -132
  11. package/components/common/diagramMain/modals/lib/config/index.ts +0 -2
  12. package/components/common/diagramMain/modals/lib/config/initial.ts +0 -62
  13. package/components/common/diagramMain/modals/lib/config/networkModal.ts +92 -165
  14. package/components/common/pages/Tasks.vue +120 -120
  15. package/components/common/recursionTree/RecursionTree.vue +203 -203
  16. package/components/common/vm/actions/add/Add.vue +575 -575
  17. package/components/common/vm/actions/clone/Clone.vue +518 -518
  18. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +269 -269
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +693 -693
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuModel.vue +220 -220
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +59 -59
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +294 -294
  23. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +165 -165
  24. package/components/common/vm/actions/common/select/storage/lib/config/config.ts +166 -166
  25. package/components/common/vm/actions/editSettings/EditSettings.vue +313 -313
  26. package/components/common/weekSelect/WeekSelect.vue +112 -112
  27. package/components/common/weekSelect/lib/config/options.ts +10 -10
  28. package/components/common/wizards/network/add/Add.vue +17 -1
  29. package/components/common/wizards/network/add/validations/physicalAdapter.ts +70 -0
  30. package/composables/productNameLocal.ts +22 -22
  31. package/composables/useAppVersion.ts +21 -21
  32. package/composables/useEnvLanguage.ts +20 -20
  33. package/lib/utils/sendTask.ts +72 -72
  34. package/minify.js +146 -146
  35. package/package.json +1 -1
  36. package/public/spice-console/application/codec.js +257 -257
  37. package/public/spice-console/lib/rasterEngine.js +907 -907
  38. package/public/spice-console/network/spicechannel.js +369 -369
  39. package/store/main/lib/interfaces.ts +9 -9
  40. package/store/tasks/actions.ts +133 -133
  41. package/store/tasks/getters.ts +25 -25
  42. package/store/tasks/lib/models/interfaces.ts +18 -18
  43. package/store/tasks/mutations.ts +58 -58
  44. package/store/tasks/state.ts +16 -16
@@ -1,225 +1,225 @@
1
- <template>
2
- <div
3
- id="signpost"
4
- :class="['signpost', signpostClass]"
5
- :style="signpostStyles"
6
- @click.stop
7
- @mouseenter="hovered = true"
8
- @mouseleave="hovered = false"
9
- >
10
- <div class="signpost-wrap">
11
- <div class="popover-pointer" />
12
- <div class="signpost-content-header">
13
- <button
14
- :id="`${props.testId}-close-icon`"
15
- class="signpost-action close"
16
- @click="hide"
17
- >
18
- <atoms-the-icon class="close-icon" name="close" />
19
- </button>
20
- </div>
21
- <div class="signpost-content-body">
22
- <slot />
23
- </div>
24
- </div>
25
- </div>
26
- </template>
27
-
28
- <script setup lang="ts">
29
- import { UI_I_ElPosition } from '~/components/atoms/tooltip/lib/models/interfaces'
30
- const props = withDefaults(
31
- defineProps<{
32
- elemId: string
33
- testId?: string
34
- }>(),
35
- { testId: 'ui-signpost' }
36
- )
37
- const emits = defineEmits<{
38
- (event: 'hide'): void
39
- }>()
40
- const hide = (): void => {
41
- emits('hide')
42
- }
43
-
44
- const signpostStyles = ref<UI_I_ElPosition | null>(null)
45
- watch(
46
- () => props.elemId,
47
- (newValue: string) => {
48
- const element =
49
- (document.getElementById(newValue) as HTMLDivElement) || null
50
- const { width, x, y } = element.getBoundingClientRect()
51
-
52
- signpostStyles.value = {
53
- top: `${y}px`,
54
- left: `${x + width / 2}px`,
55
- }
56
- setTimeout(() => {
57
- setSignpostPosition()
58
- }, 0)
59
- },
60
- { immediate: true }
61
- )
62
- const signpostClass = ref<string[]>([])
63
- const setSignpostPosition = (): void => {
64
- const signpost =
65
- (document.getElementById('signpost') as HTMLDivElement) || null
66
- const signpostRect = (signpost?.getBoundingClientRect() as DOMRect) || null
67
-
68
- type PositionX = 'right' | 'left'
69
- let positionX: PositionX = 'right'
70
-
71
- type PositionY = 'top' | 'middle'
72
- let positionY: PositionY = 'middle'
73
-
74
- const isOutRight = signpostRect.left + signpostRect.width > window.innerWidth
75
- const isOutTop = signpostRect.top < 0
76
-
77
- if (isOutTop) {
78
- positionY = 'top'
79
- }
80
- if (isOutRight) {
81
- positionX = 'left'
82
- }
83
-
84
- signpostClass.value.push(positionY)
85
- signpostClass.value.push(positionX)
86
- signpostClass.value.push('show')
87
- }
88
-
89
- const hovered = ref<boolean>(false)
90
- const windowClick = (): void => {
91
- hide()
92
- }
93
- const windowScroll = (): void => {
94
- if (hovered.value) {
95
- return
96
- }
97
- hide()
98
- }
99
- onMounted(() => {
100
- setTimeout(() => {
101
- window.addEventListener('click', windowClick)
102
- window.addEventListener('scroll', windowScroll, true)
103
- })
104
- })
105
- onUnmounted(() => {
106
- window.removeEventListener('click', windowClick)
107
- window.removeEventListener('scroll', windowScroll, true)
108
- })
109
- </script>
110
-
111
- <style scoped lang="scss">
112
- .signpost {
113
- opacity: 0;
114
- position: fixed;
115
- cursor: default;
116
- transform: translateY(calc(-50% + 14px)) translateX(20px);
117
- z-index: 1000000000;
118
-
119
- &.show {
120
- opacity: 1;
121
- }
122
- &.left {
123
- transform: translateY(calc(-50% + 14px)) translateX(calc(-100% - 20px));
124
-
125
- .signpost-wrap {
126
- .popover-pointer {
127
- left: 100%;
128
- border-right: unset;
129
- border-left: 12px solid var(--signpost-border-color);
130
-
131
- &::before {
132
- border-right: unset;
133
- border-left: 12px solid var(--signpost-bgcolor);
134
- left: unset;
135
- right: 2px;
136
- }
137
- }
138
- }
139
- }
140
- &.top {
141
- transform: translateY(calc(0% + 10px)) translateX(20px);
142
-
143
- &.left {
144
- transform: translateY(calc(0% + 10px)) translateX(calc(-100% - 20px));
145
-
146
- .popover-pointer {
147
- top: 5px;
148
- }
149
- }
150
-
151
- .signpost-wrap {
152
- .popover-pointer {
153
- top: 5px;
154
- }
155
- }
156
- }
157
-
158
- .signpost-wrap {
159
- border-radius: 3px;
160
- border: 1px solid var(--signpost-border-color);
161
- background-color: var(--signpost-bgcolor);
162
- position: relative;
163
-
164
- .popover-pointer {
165
- border-bottom: 12px solid transparent;
166
- top: 50%;
167
- transform: translateY(-50%);
168
- border-right: 12px solid var(--signpost-border-color);
169
- left: -12px;
170
- height: 0;
171
- width: 0;
172
- position: absolute;
173
-
174
- &::before {
175
- border-bottom: 12px solid transparent;
176
- top: 1px;
177
- border-right: 12px solid var(--signpost-bgcolor);
178
- left: 2px;
179
- content: '';
180
- height: 0;
181
- width: 0;
182
- position: absolute;
183
- }
184
- }
185
-
186
- .signpost-content-header {
187
- display: flex;
188
- justify-content: flex-end;
189
- position: absolute;
190
- width: 100%;
191
- background-color: inherit;
192
- top: 0;
193
-
194
- button {
195
- line-height: 24px;
196
-
197
- .close-icon {
198
- width: 16px;
199
- height: 16px;
200
- }
201
- }
202
- }
203
-
204
- .signpost-content-body {
205
- padding: 24px;
206
- max-height: 480px;
207
- overflow-y: auto;
208
- text-transform: none;
209
- }
210
- }
211
- }
212
- </style>
213
-
214
- <style>
215
- :root {
216
- --signpost-bgcolor: #fff;
217
- --signpost-border-color: #b3b3b3;
218
- --signpost-color: #acbac3;
219
- }
220
- :root.dark-theme {
221
- --signpost-bgcolor: #21333b;
222
- --signpost-border-color: #000;
223
- --signpost-color: #acbac3;
224
- }
225
- </style>
1
+ <template>
2
+ <div
3
+ id="signpost"
4
+ :class="['signpost', signpostClass]"
5
+ :style="signpostStyles"
6
+ @click.stop
7
+ @mouseenter="hovered = true"
8
+ @mouseleave="hovered = false"
9
+ >
10
+ <div class="signpost-wrap">
11
+ <div class="popover-pointer" />
12
+ <div class="signpost-content-header">
13
+ <button
14
+ :id="`${props.testId}-close-icon`"
15
+ class="signpost-action close"
16
+ @click="hide"
17
+ >
18
+ <atoms-the-icon class="close-icon" name="close" />
19
+ </button>
20
+ </div>
21
+ <div class="signpost-content-body">
22
+ <slot />
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </template>
27
+
28
+ <script setup lang="ts">
29
+ import { UI_I_ElPosition } from '~/components/atoms/tooltip/lib/models/interfaces'
30
+ const props = withDefaults(
31
+ defineProps<{
32
+ elemId: string
33
+ testId?: string
34
+ }>(),
35
+ { testId: 'ui-signpost' }
36
+ )
37
+ const emits = defineEmits<{
38
+ (event: 'hide'): void
39
+ }>()
40
+ const hide = (): void => {
41
+ emits('hide')
42
+ }
43
+
44
+ const signpostStyles = ref<UI_I_ElPosition | null>(null)
45
+ watch(
46
+ () => props.elemId,
47
+ (newValue: string) => {
48
+ const element =
49
+ (document.getElementById(newValue) as HTMLDivElement) || null
50
+ const { width, x, y } = element.getBoundingClientRect()
51
+
52
+ signpostStyles.value = {
53
+ top: `${y}px`,
54
+ left: `${x + width / 2}px`,
55
+ }
56
+ setTimeout(() => {
57
+ setSignpostPosition()
58
+ }, 0)
59
+ },
60
+ { immediate: true }
61
+ )
62
+ const signpostClass = ref<string[]>([])
63
+ const setSignpostPosition = (): void => {
64
+ const signpost =
65
+ (document.getElementById('signpost') as HTMLDivElement) || null
66
+ const signpostRect = (signpost?.getBoundingClientRect() as DOMRect) || null
67
+
68
+ type PositionX = 'right' | 'left'
69
+ let positionX: PositionX = 'right'
70
+
71
+ type PositionY = 'top' | 'middle'
72
+ let positionY: PositionY = 'middle'
73
+
74
+ const isOutRight = signpostRect.left + signpostRect.width > window.innerWidth
75
+ const isOutTop = signpostRect.top < 0
76
+
77
+ if (isOutTop) {
78
+ positionY = 'top'
79
+ }
80
+ if (isOutRight) {
81
+ positionX = 'left'
82
+ }
83
+
84
+ signpostClass.value.push(positionY)
85
+ signpostClass.value.push(positionX)
86
+ signpostClass.value.push('show')
87
+ }
88
+
89
+ const hovered = ref<boolean>(false)
90
+ const windowClick = (): void => {
91
+ hide()
92
+ }
93
+ const windowScroll = (): void => {
94
+ if (hovered.value) {
95
+ return
96
+ }
97
+ hide()
98
+ }
99
+ onMounted(() => {
100
+ setTimeout(() => {
101
+ window.addEventListener('click', windowClick)
102
+ window.addEventListener('scroll', windowScroll, true)
103
+ })
104
+ })
105
+ onUnmounted(() => {
106
+ window.removeEventListener('click', windowClick)
107
+ window.removeEventListener('scroll', windowScroll, true)
108
+ })
109
+ </script>
110
+
111
+ <style scoped lang="scss">
112
+ .signpost {
113
+ opacity: 0;
114
+ position: fixed;
115
+ cursor: default;
116
+ transform: translateY(calc(-50% + 14px)) translateX(20px);
117
+ z-index: 1000000000;
118
+
119
+ &.show {
120
+ opacity: 1;
121
+ }
122
+ &.left {
123
+ transform: translateY(calc(-50% + 14px)) translateX(calc(-100% - 20px));
124
+
125
+ .signpost-wrap {
126
+ .popover-pointer {
127
+ left: 100%;
128
+ border-right: unset;
129
+ border-left: 12px solid var(--signpost-border-color);
130
+
131
+ &::before {
132
+ border-right: unset;
133
+ border-left: 12px solid var(--signpost-bgcolor);
134
+ left: unset;
135
+ right: 2px;
136
+ }
137
+ }
138
+ }
139
+ }
140
+ &.top {
141
+ transform: translateY(calc(0% + 10px)) translateX(20px);
142
+
143
+ &.left {
144
+ transform: translateY(calc(0% + 10px)) translateX(calc(-100% - 20px));
145
+
146
+ .popover-pointer {
147
+ top: 5px;
148
+ }
149
+ }
150
+
151
+ .signpost-wrap {
152
+ .popover-pointer {
153
+ top: 5px;
154
+ }
155
+ }
156
+ }
157
+
158
+ .signpost-wrap {
159
+ border-radius: 3px;
160
+ border: 1px solid var(--signpost-border-color);
161
+ background-color: var(--signpost-bgcolor);
162
+ position: relative;
163
+
164
+ .popover-pointer {
165
+ border-bottom: 12px solid transparent;
166
+ top: 50%;
167
+ transform: translateY(-50%);
168
+ border-right: 12px solid var(--signpost-border-color);
169
+ left: -12px;
170
+ height: 0;
171
+ width: 0;
172
+ position: absolute;
173
+
174
+ &::before {
175
+ border-bottom: 12px solid transparent;
176
+ top: 1px;
177
+ border-right: 12px solid var(--signpost-bgcolor);
178
+ left: 2px;
179
+ content: '';
180
+ height: 0;
181
+ width: 0;
182
+ position: absolute;
183
+ }
184
+ }
185
+
186
+ .signpost-content-header {
187
+ display: flex;
188
+ justify-content: flex-end;
189
+ position: absolute;
190
+ width: 100%;
191
+ background-color: inherit;
192
+ top: 0;
193
+
194
+ button {
195
+ line-height: 24px;
196
+
197
+ .close-icon {
198
+ width: 16px;
199
+ height: 16px;
200
+ }
201
+ }
202
+ }
203
+
204
+ .signpost-content-body {
205
+ padding: 24px;
206
+ max-height: 480px;
207
+ overflow-y: auto;
208
+ text-transform: none;
209
+ }
210
+ }
211
+ }
212
+ </style>
213
+
214
+ <style>
215
+ :root {
216
+ --signpost-bgcolor: #fff;
217
+ --signpost-border-color: #b3b3b3;
218
+ --signpost-color: #acbac3;
219
+ }
220
+ :root.dark-theme {
221
+ --signpost-bgcolor: #21333b;
222
+ --signpost-border-color: #000;
223
+ --signpost-color: #acbac3;
224
+ }
225
+ </style>
@@ -606,16 +606,16 @@ export interface API_UI_I_Network {
606
606
  id: string
607
607
  name: string
608
608
  state: UI_I_State
609
- index: UI_I_ListIndex
609
+ index?: UI_I_ListIndex
610
610
  vlan: number
611
611
  net_bridge: string
612
612
  kind: UI_E_Kind
613
613
  switch: string // vswitch_name
614
- vms_count: number // vms_amount
615
- active_ports: number
616
- nics_overrided: boolean
614
+ vms_count?: number // vms_amount
615
+ active_ports?: number
616
+ nics_overrided?: boolean
617
617
  vm_list?: API_UI_I_NetworkVMList[]
618
- sysx?: UI_I_Sysx
618
+ sysx_id?: UI_I_Sysx
619
619
  security: API_UI_I_Security
620
620
  shaping: API_UI_I_Shaping
621
621
  teaming: API_UI_I_Teaming
@@ -33,13 +33,13 @@
33
33
  name="selectName"
34
34
  >
35
35
  <option
36
- :value="props.isSwitch ? 2 : 'no'"
36
+ :value="2"
37
37
  :label="localization.reject"
38
38
  >
39
39
  {{ localization.reject }}
40
40
  </option>
41
41
  <option
42
- :value="props.isSwitch ? 1 : 'yes'"
42
+ :value="1"
43
43
  :label="localization.accept"
44
44
  >
45
45
  {{ localization.accept }}
@@ -83,13 +83,13 @@
83
83
  name="selectName"
84
84
  >
85
85
  <option
86
- :value="props.isSwitch ? 2 : 'no'"
86
+ :value="2"
87
87
  :label="localization.reject"
88
88
  >
89
89
  {{ localization.reject }}
90
90
  </option>
91
91
  <option
92
- :value="props.isSwitch ? 1 : 'yes'"
92
+ :value="1"
93
93
  :label="localization.accept"
94
94
  >
95
95
  {{ localization.accept }}
@@ -133,13 +133,13 @@
133
133
  name="selectName"
134
134
  >
135
135
  <option
136
- :value="props.isSwitch ? 2 : 'no'"
136
+ :value="2"
137
137
  :label="localization.reject"
138
138
  >
139
139
  {{ localization.reject }}
140
140
  </option>
141
141
  <option
142
- :value="props.isSwitch ? 1 : 'yes'"
142
+ :value="1"
143
143
  :label="localization.accept"
144
144
  >
145
145
  {{ localization.accept }}
@@ -106,9 +106,7 @@ import {
106
106
  } from '~/components/common/diagramMain/lib/models/interfaces'
107
107
  import {
108
108
  teamingFailoverFieldsInitialFunc,
109
- teamingFailoverNetworkFieldsInitialFunc,
110
109
  teamingAndFailoverTemplateMakerFunc,
111
- teamingAndFailoverNetworkTemplateMakerFunc,
112
110
  } from '~/components/common/diagramMain/modals/lib/config'
113
111
 
114
112
  // Props from up
@@ -132,16 +130,11 @@ const localization = computed<UI_I_Localization>(() => useLocal())
132
130
 
133
131
  // Making fields template
134
132
  const teamingAndFailoverTemplate = computed<UI_I_TeamingAndFailoverTemplate[]>(
135
- () =>
136
- props.isSwitch
137
- ? teamingAndFailoverTemplateMakerFunc(localization.value)
138
- : teamingAndFailoverNetworkTemplateMakerFunc(localization.value)
133
+ () => teamingAndFailoverTemplateMakerFunc(localization.value)
139
134
  )
140
135
  // Temporary data for this component
141
136
  const fieldsValues = ref<UI_I_TeamingFailoverFields>(
142
- props.isSwitch
143
- ? teamingFailoverFieldsInitialFunc(props.isSwitch, props.initialData)
144
- : teamingFailoverNetworkFieldsInitialFunc(props.isSwitch, props.initialData)
137
+ teamingFailoverFieldsInitialFunc(props.isSwitch, props.initialData)
145
138
  )
146
139
 
147
140
  const emits = defineEmits<{