bfg-common 1.4.198 → 1.4.199

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 (48) hide show
  1. package/assets/img/icons/icons-sprite-dark-1.svg +407 -407
  2. package/assets/img/icons/icons-sprite-dark-2.svg +343 -343
  3. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  4. package/assets/img/icons/icons-sprite-dark-4.svg +255 -255
  5. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  6. package/assets/img/icons/icons-sprite-dark-6.svg +83 -83
  7. package/assets/img/icons/icons-sprite-light-1.svg +407 -407
  8. package/assets/img/icons/icons-sprite-light-2.svg +343 -343
  9. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  10. package/assets/img/icons/icons-sprite-light-4.svg +255 -255
  11. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  12. package/assets/img/icons/icons-sprite-light-6.svg +83 -83
  13. package/components/atoms/DiagramIcon.vue +29 -0
  14. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  15. package/components/atoms/stack/StackBlock.vue +185 -185
  16. package/components/common/browse/blocks/Title.vue +91 -91
  17. package/components/common/browse/blocks/info/Date.vue +21 -21
  18. package/components/common/context/lib/models/interfaces.ts +30 -30
  19. package/components/common/context/recursion/Recursion.vue +86 -86
  20. package/components/common/context/recursion/RecursionNew.vue +199 -199
  21. package/components/common/context/recursion/RecursionOld.vue +213 -213
  22. package/components/common/diagramMain/adapter/AdapterItem.vue +17 -4
  23. package/components/common/diagramMain/lib/models/interfaces.ts +24 -1
  24. package/components/common/diagramMain/lib/models/types.ts +7 -2
  25. package/components/common/diagramMain/lib/utils/utils.ts +331 -278
  26. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +1 -1
  27. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +1 -1
  28. package/components/common/vm/actions/add/Add.vue +609 -609
  29. package/components/common/vm/actions/clone/Clone.vue +522 -522
  30. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
  31. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
  32. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
  33. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +201 -201
  34. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
  35. package/components/common/wizards/network/add/Add.vue +18 -7
  36. package/components/common/wizards/network/add/lib/config/steps.ts +464 -464
  37. package/components/common/wizards/network/add/modals/SelectNetwork.vue +1 -1
  38. package/components/common/wizards/network/add/modals/SelectStandardSwitch.vue +1 -1
  39. package/components/common/wizards/network/add/modals/SelectSwitch.vue +1 -1
  40. package/components/common/wizards/network/add/steps/ConnectionSettings.vue +1 -1
  41. package/components/common/wizards/network/add/steps/PortProperties.vue +1 -1
  42. package/composables/productNameLocal.ts +30 -30
  43. package/package.json +1 -1
  44. package/plugins/recursion.ts +311 -311
  45. package/public/spice-console/lib/images/bitmap.js +203 -203
  46. package/store/tasks/mappers/recentTasks.ts +45 -45
  47. /package/components/common/wizards/network/add/lib/config/{index.ts → config.ts} +0 -0
  48. /package/components/common/wizards/network/add/lib/utils/{index.ts → utils.ts} +0 -0
@@ -1,213 +1,213 @@
1
- <template>
2
- <ul class="context-wrap">
3
- <span v-if="props.isLoading">
4
- <atoms-loader-pre-loader
5
- id="loader"
6
- class="absolute-center context-menu__loading"
7
- :show="true"
8
- />
9
- </span>
10
- <li
11
- v-for="(item, key) in props.items"
12
- :key="key"
13
- :class="[
14
- 'menu-item',
15
- { disabled: item.disabled || isLoading },
16
- { 'item-header': item.isHeader },
17
- { 'has-border-top': item.hasBorderTop },
18
- ]"
19
- @mouseenter="emits('toggle-items', [item, true, $event])"
20
- @mouseleave="emits('toggle-items', [item, false, $event])"
21
- >
22
- <span
23
- class="context-link"
24
- :style="item.style"
25
- :data-id="`${item.testId}-context-link`"
26
- @mousedown="emits('select-item', item)"
27
- >
28
- <span :class="['context-icon', item.iconClassName]" />
29
- <span class="menu-item-text">{{ item.name }}</span>
30
- <span v-if="item.items.length" class="arrow-icon" />
31
- <span v-if="item.shortcut" class="shortcut">{{ item.shortcut }}</span>
32
- </span>
33
-
34
- <div class="context-children">
35
- <common-context-recursion
36
- v-show="item.isShowItems"
37
- :action-loading="props.actionLoading"
38
- :class="[{ 'child-show': item.isShowItems }]"
39
- :items="item.items"
40
- @select-item="emits('select-item', $event)"
41
- />
42
- </div>
43
- </li>
44
- </ul>
45
- </template>
46
-
47
- <script setup lang="ts">
48
- import type { UI_I_ContextMenuItem } from '~/components/common/context/lib/models/interfaces'
49
- import type { I_HTMLLiElement } from '~/components/common/context/recursion/lib/models/interfaces'
50
-
51
- const props = defineProps<{
52
- items: UI_I_ContextMenuItem[]
53
- actionLoading: string | null
54
- isLoading: boolean
55
- testId?: string
56
- }>()
57
-
58
- const emits = defineEmits<{
59
- (event: 'select-item', value: UI_I_ContextMenuItem): void
60
- (
61
- event: 'toggle-items',
62
- value: [UI_I_ContextMenuItem, boolean, I_HTMLLiElement]
63
- ): void
64
- }>()
65
- </script>
66
-
67
- <style scoped lang="scss">
68
- .loader-wrapper {
69
- width: 100%;
70
- height: 100%;
71
- z-index: 100;
72
- }
73
-
74
- .context-menu__loading {
75
- :deep(.spinner) {
76
- width: 45px;
77
- height: 45px;
78
- min-width: 45px;
79
- min-height: 45px;
80
- z-index: 1000;
81
- }
82
- }
83
- .context-wrap {
84
- width: auto;
85
- max-width: 400px;
86
- background: var(--global-bg-color);
87
- border-radius: 0;
88
- color: #333;
89
- border: 1px solid var(--context-menu-border-color);
90
- user-select: none;
91
- list-style: none;
92
- max-height: 100vh;
93
- overflow-y: auto;
94
-
95
- .menu-item {
96
- position: relative;
97
- color: #565656;
98
- border-bottom: 1px solid transparent;
99
- cursor: pointer;
100
- padding: 5px 0 3px;
101
-
102
- &.has-border-top {
103
- border-top: 1px solid var(--context-menu-inset-border-color);
104
- }
105
-
106
- &.item-header {
107
- font-size: 11px;
108
- background-color: var(--context-menu-item-header-color);
109
- cursor: default;
110
- }
111
- &:not(.item-header):not(.disabled):hover {
112
- background-color: var(--context-menu-hover-bg-color);
113
- color: #454545;
114
- border-bottom: 1px solid var(--context-menu-hover-border-color);
115
- }
116
- &.disabled {
117
- opacity: 0.5;
118
- user-select: none;
119
- cursor: default;
120
- }
121
- &.left {
122
- :deep(.context-children) {
123
- left: 0;
124
- background: red;
125
-
126
- .context-wrap {
127
- transform: translateX(-100%);
128
- left: auto;
129
- }
130
- }
131
- }
132
-
133
- .context-link {
134
- position: relative;
135
- overflow: hidden;
136
- text-overflow: ellipsis;
137
- white-space: nowrap;
138
- display: flex;
139
- align-items: center;
140
- user-select: none;
141
- padding: 3px 20px 4px 10px;
142
-
143
- .menu-item-text {
144
- flex: 1 1 0;
145
- }
146
-
147
- .context-icon {
148
- display: inline-block;
149
- margin: -2px 4px 0 0;
150
- vertical-align: middle;
151
- width: 18px;
152
- height: 18px;
153
- }
154
-
155
- .arrow-icon {
156
- position: absolute;
157
- top: 50%;
158
- margin-top: -8px;
159
- right: 4px;
160
- background-image: url('assets/img/icons/sprite.png');
161
- display: inline-block;
162
- width: 16px;
163
- height: 16px;
164
- overflow: hidden;
165
- background-repeat: no-repeat;
166
- font-size: 0;
167
- line-height: 0;
168
- text-align: center;
169
- transform: rotate(90deg);
170
- }
171
-
172
- .shortcut {
173
- padding-left: 10px;
174
- }
175
- }
176
-
177
- .context-children {
178
- position: absolute;
179
- top: 0;
180
- left: 100%;
181
-
182
- .context-wrap {
183
- position: fixed;
184
- }
185
- }
186
- }
187
- }
188
- .context-menu__loading {
189
- :deep(.spinner) {
190
- width: 45px;
191
- height: 45px;
192
- min-width: 45px;
193
- min-height: 45px;
194
- z-index: 1000;
195
- }
196
- }
197
- </style>
198
- <style>
199
- :root {
200
- --context-menu-hover-bg-color: #e8e8e8;
201
- --context-menu-border-color: #949494;
202
- --context-menu-inset-border-color: #d4d5d6;
203
- --context-menu-item-header-color: #eceff2;
204
- --context-menu-hover-border-color: #666;
205
- }
206
- :root.dark-theme {
207
- --context-menu-hover-bg-color: #324f61;
208
- --context-menu-border-color: #495865;
209
- --context-menu-inset-border-color: #485764;
210
- --context-menu-item-header-color: #29414e;
211
- --context-menu-hover-border-color: #fff;
212
- }
213
- </style>
1
+ <template>
2
+ <ul class="context-wrap">
3
+ <span v-if="props.isLoading">
4
+ <atoms-loader-pre-loader
5
+ id="loader"
6
+ class="absolute-center context-menu__loading"
7
+ :show="true"
8
+ />
9
+ </span>
10
+ <li
11
+ v-for="(item, key) in props.items"
12
+ :key="key"
13
+ :class="[
14
+ 'menu-item',
15
+ { disabled: item.disabled || isLoading },
16
+ { 'item-header': item.isHeader },
17
+ { 'has-border-top': item.hasBorderTop },
18
+ ]"
19
+ @mouseenter="emits('toggle-items', [item, true, $event])"
20
+ @mouseleave="emits('toggle-items', [item, false, $event])"
21
+ >
22
+ <span
23
+ class="context-link"
24
+ :style="item.style"
25
+ :data-id="`${item.testId}-context-link`"
26
+ @mousedown="emits('select-item', item)"
27
+ >
28
+ <span :class="['context-icon', item.iconClassName]" />
29
+ <span class="menu-item-text">{{ item.name }}</span>
30
+ <span v-if="item.items.length" class="arrow-icon" />
31
+ <span v-if="item.shortcut" class="shortcut">{{ item.shortcut }}</span>
32
+ </span>
33
+
34
+ <div class="context-children">
35
+ <common-context-recursion
36
+ v-show="item.isShowItems"
37
+ :action-loading="props.actionLoading"
38
+ :class="[{ 'child-show': item.isShowItems }]"
39
+ :items="item.items"
40
+ @select-item="emits('select-item', $event)"
41
+ />
42
+ </div>
43
+ </li>
44
+ </ul>
45
+ </template>
46
+
47
+ <script setup lang="ts">
48
+ import type { UI_I_ContextMenuItem } from '~/components/common/context/lib/models/interfaces'
49
+ import type { I_HTMLLiElement } from '~/components/common/context/recursion/lib/models/interfaces'
50
+
51
+ const props = defineProps<{
52
+ items: UI_I_ContextMenuItem[]
53
+ actionLoading: string | null
54
+ isLoading: boolean
55
+ testId?: string
56
+ }>()
57
+
58
+ const emits = defineEmits<{
59
+ (event: 'select-item', value: UI_I_ContextMenuItem): void
60
+ (
61
+ event: 'toggle-items',
62
+ value: [UI_I_ContextMenuItem, boolean, I_HTMLLiElement]
63
+ ): void
64
+ }>()
65
+ </script>
66
+
67
+ <style scoped lang="scss">
68
+ .loader-wrapper {
69
+ width: 100%;
70
+ height: 100%;
71
+ z-index: 100;
72
+ }
73
+
74
+ .context-menu__loading {
75
+ :deep(.spinner) {
76
+ width: 45px;
77
+ height: 45px;
78
+ min-width: 45px;
79
+ min-height: 45px;
80
+ z-index: 1000;
81
+ }
82
+ }
83
+ .context-wrap {
84
+ width: auto;
85
+ max-width: 400px;
86
+ background: var(--global-bg-color);
87
+ border-radius: 0;
88
+ color: #333;
89
+ border: 1px solid var(--context-menu-border-color);
90
+ user-select: none;
91
+ list-style: none;
92
+ max-height: 100vh;
93
+ overflow-y: auto;
94
+
95
+ .menu-item {
96
+ position: relative;
97
+ color: #565656;
98
+ border-bottom: 1px solid transparent;
99
+ cursor: pointer;
100
+ padding: 5px 0 3px;
101
+
102
+ &.has-border-top {
103
+ border-top: 1px solid var(--context-menu-inset-border-color);
104
+ }
105
+
106
+ &.item-header {
107
+ font-size: 11px;
108
+ background-color: var(--context-menu-item-header-color);
109
+ cursor: default;
110
+ }
111
+ &:not(.item-header):not(.disabled):hover {
112
+ background-color: var(--context-menu-hover-bg-color);
113
+ color: #454545;
114
+ border-bottom: 1px solid var(--context-menu-hover-border-color);
115
+ }
116
+ &.disabled {
117
+ opacity: 0.5;
118
+ user-select: none;
119
+ cursor: default;
120
+ }
121
+ &.left {
122
+ :deep(.context-children) {
123
+ left: 0;
124
+ background: red;
125
+
126
+ .context-wrap {
127
+ transform: translateX(-100%);
128
+ left: auto;
129
+ }
130
+ }
131
+ }
132
+
133
+ .context-link {
134
+ position: relative;
135
+ overflow: hidden;
136
+ text-overflow: ellipsis;
137
+ white-space: nowrap;
138
+ display: flex;
139
+ align-items: center;
140
+ user-select: none;
141
+ padding: 3px 20px 4px 10px;
142
+
143
+ .menu-item-text {
144
+ flex: 1 1 0;
145
+ }
146
+
147
+ .context-icon {
148
+ display: inline-block;
149
+ margin: -2px 4px 0 0;
150
+ vertical-align: middle;
151
+ width: 18px;
152
+ height: 18px;
153
+ }
154
+
155
+ .arrow-icon {
156
+ position: absolute;
157
+ top: 50%;
158
+ margin-top: -8px;
159
+ right: 4px;
160
+ background-image: url('assets/img/icons/sprite.png');
161
+ display: inline-block;
162
+ width: 16px;
163
+ height: 16px;
164
+ overflow: hidden;
165
+ background-repeat: no-repeat;
166
+ font-size: 0;
167
+ line-height: 0;
168
+ text-align: center;
169
+ transform: rotate(90deg);
170
+ }
171
+
172
+ .shortcut {
173
+ padding-left: 10px;
174
+ }
175
+ }
176
+
177
+ .context-children {
178
+ position: absolute;
179
+ top: 0;
180
+ left: 100%;
181
+
182
+ .context-wrap {
183
+ position: fixed;
184
+ }
185
+ }
186
+ }
187
+ }
188
+ .context-menu__loading {
189
+ :deep(.spinner) {
190
+ width: 45px;
191
+ height: 45px;
192
+ min-width: 45px;
193
+ min-height: 45px;
194
+ z-index: 1000;
195
+ }
196
+ }
197
+ </style>
198
+ <style>
199
+ :root {
200
+ --context-menu-hover-bg-color: #e8e8e8;
201
+ --context-menu-border-color: #949494;
202
+ --context-menu-inset-border-color: #d4d5d6;
203
+ --context-menu-item-header-color: #eceff2;
204
+ --context-menu-hover-border-color: #666;
205
+ }
206
+ :root.dark-theme {
207
+ --context-menu-hover-bg-color: #324f61;
208
+ --context-menu-border-color: #495865;
209
+ --context-menu-inset-border-color: #485764;
210
+ --context-menu-item-header-color: #29414e;
211
+ --context-menu-hover-border-color: #fff;
212
+ }
213
+ </style>
@@ -40,7 +40,7 @@
40
40
  </foreignObject>
41
41
 
42
42
  <foreignObject
43
- v-if="!props.adapter.carrier"
43
+ v-if="!props.adapter.carrier && props.adapter.status !== 'error'"
44
44
  data-title="adapter-connection-icon"
45
45
  width="18"
46
46
  height="18"
@@ -50,6 +50,17 @@
50
50
  <atoms-diagram-icon name="adapter-carrier" />
51
51
  </foreignObject>
52
52
 
53
+ <foreignObject
54
+ v-if="props.adapter.status === 'error'"
55
+ data-title="adapter-connection-icon"
56
+ width="15"
57
+ height="15"
58
+ x="447"
59
+ :y="adapterSelectionPosition"
60
+ >
61
+ <atoms-diagram-icon name="adapter-error" />
62
+ </foreignObject>
63
+
53
64
  <common-diagram-main-highlights
54
65
  data-title="adapter-item-line"
55
66
  type="line-orange"
@@ -76,6 +87,7 @@
76
87
  </foreignObject>
77
88
 
78
89
  <foreignObject
90
+ v-if="props.adapter.status !== 'error'"
79
91
  data-title="adapter-action-icon"
80
92
  width="18"
81
93
  height="18"
@@ -97,7 +109,7 @@
97
109
  </foreignObject>
98
110
 
99
111
  <foreignObject
100
- v-if="props.adapter.carrier"
112
+ v-if="props.adapter.carrier && props.adapter.status !== 'error'"
101
113
  data-title="adapter-second-connected-icon"
102
114
  width="18"
103
115
  height="18"
@@ -110,7 +122,7 @@
110
122
  </foreignObject>
111
123
 
112
124
  <foreignObject
113
- v-else
125
+ v-if="!props.adapter.carrier && props.adapter.status !== 'error'"
114
126
  data-title="adapter-second-not-connected-icon"
115
127
  width="18"
116
128
  height="18"
@@ -127,6 +139,7 @@
127
139
  <script setup lang="ts">
128
140
  import {
129
141
  UI_I_Adapter,
142
+ UI_I_AdapterWithError,
130
143
  UI_I_ModalsInitialData,
131
144
  UI_I_SelectedAdapter,
132
145
  UI_I_SelectedPort,
@@ -137,7 +150,7 @@ import { adapterPopupFieldsFunc } from '~/components/common/diagramMain/modals/l
137
150
  import { dataForSelectedAdapterFunc } from '~/components/common/diagramMain/lib/config'
138
151
 
139
152
  const props = defineProps<{
140
- adapter: UI_I_Adapter & { adapterPosition: number }
153
+ adapter: (UI_I_Adapter | UI_I_AdapterWithError) & { adapterPosition: number }
141
154
  selectedPort: UI_I_SelectedPort
142
155
  selectedAdapter: UI_I_SelectedAdapter
143
156
  networksWithPositions: UI_I_NetworksWithPositions[]
@@ -41,7 +41,7 @@ export interface UI_I_Adapter {
41
41
 
42
42
  export interface UI_I_PhysicalAdapters {
43
43
  toggle: boolean
44
- adapters: UI_I_Adapter[]
44
+ adapters: (UI_I_Adapter | UI_I_AdapterWithError)[]
45
45
  }
46
46
  export interface UI_I_MainRectHeights {
47
47
  networksHeight: number
@@ -341,6 +341,11 @@ export interface UI_I_AdapterStatus {
341
341
  inherit?: boolean
342
342
  }
343
343
 
344
+ export interface UI_I_AdapterNameWithStatus {
345
+ adapterName: string
346
+ status: string
347
+ }
348
+
344
349
  export interface UI_I_SwitchPropertiesFields {
345
350
  mtu: number
346
351
  num_ports: string
@@ -445,6 +450,18 @@ export interface UI_I_ModalsInitialData<T = string | number | boolean> {
445
450
  tcpIp?: string
446
451
  }
447
452
 
453
+ export interface UI_I_AdapterWithError {
454
+ name: string
455
+ id: string
456
+ testId: string
457
+ fullName: string
458
+ state: UI_I_State
459
+ carrier: boolean
460
+ networks: string[]
461
+ switch: string
462
+ status: string
463
+ }
464
+
448
465
  export interface UI_I_SwitchAdapterItem {
449
466
  name: string
450
467
  id: string
@@ -466,6 +483,12 @@ export interface UI_I_SwitchAdapterItem {
466
483
  mac: string
467
484
  }
468
485
 
486
+ export interface UI_I_AvailableAdapters {
487
+ activeAdapters: string[]
488
+ standbyAdapters: string[]
489
+ unusedAdapters: string[]
490
+ }
491
+
469
492
  export interface API_UI_I_SwitchAdapterItem {
470
493
  id: string
471
494
  state: UI_I_State
@@ -1,4 +1,7 @@
1
- import type { UI_I_Adapter } from '~/components/common/diagramMain/lib/models/interfaces'
1
+ import type {
2
+ UI_I_Adapter,
3
+ UI_I_AdapterWithError,
4
+ } from '~/components/common/diagramMain/lib/models/interfaces'
2
5
 
3
6
  export type UI_T_AdapterStatusNames = 'active' | 'standby' | 'unused'
4
7
  export type UI_T_PropertiesFieldName = 'vlanId' | 'networkLabel'
@@ -13,4 +16,6 @@ export type UI_T_LoadBalancingMode =
13
16
  export type UI_T_IYN = 'inherit' | 'yes' | 'no'
14
17
  export type UI_T_Carier = 'inherit' | 'carier' | 'beakon'
15
18
 
16
- export type UI_T_Adapters = UI_I_Adapter & { adapterPosition: number }
19
+ export type UI_T_Adapters = (UI_I_Adapter | UI_I_AdapterWithError) & {
20
+ adapterPosition: number
21
+ }