bfg-common 1.4.900 → 1.4.901

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.
@@ -1,211 +1,214 @@
1
- <template>
2
- <template v-if="!props.inPortlet">
3
- <div class="diagram-header">
4
- <div class="diagram-header-left">
5
- <atoms-the-icon
6
- name="angle"
7
- :class="[
8
- 'diagram-header__arrow-icon',
9
- {
10
- open: props.isShowDiagram,
11
- },
12
- ]"
13
- :data-id="`${props.testId}-toggle-icon`"
14
- @click="onToggleDiagram"
15
- />
16
- <a>
17
- <span>
18
- {{ localization.common.standardSwitch }}:
19
- {{ props.diagramName }}
20
- </span>
21
- </a>
22
- </div>
23
- <div v-if="props.isShowDiagram" class="diagram-header__btn-container">
24
- <span class="vertical-separator"></span>
25
- <button
26
- id="add-networking-button"
27
- :data-id="`${props.testId}-add-networking-button`"
28
- type="button"
29
- @click="onShowModal('add-networking', props.diagramName)"
30
- >
31
- {{ localization.common.addNetworking }}
32
- </button>
33
- <button
34
- id="switch-edit-button"
35
- :data-id="`${props.testId}-edit-button`"
36
- type="button"
37
- @click="onShowModal('switch-edit')"
38
- >
39
- {{ localization.common.edit }}
40
- </button>
41
- <button
42
- id="switch-manage-physical-adapters-button"
43
- :data-id="`${props.testId}-manage-physical-adapters-button`"
44
- type="button"
45
- @click="onShowModal('switch-manage-physical-adapters')"
46
- >
47
- {{ localization.common.managePhysicalAdapters }}
48
- </button>
49
- <div class="diagram-main-actions-dots">
50
- <atoms-collapse-nav
51
- popup-class="diagram-main-actions__popup"
52
- :close-after-click="true"
53
- :items="switchMainNavigation"
54
- :test-id="`${props.testId}-actions`"
55
- @change="onShowModal"
56
- />
57
- </div>
58
- </div>
59
- </div>
60
- <hr class="horizontal-separator" />
61
- </template>
62
- </template>
63
-
64
- <script setup lang="ts">
65
- import type { UI_I_Localization } from '~/lib/models/interfaces'
66
- import type {
67
- UI_I_NavigationItem,
68
- UI_I_ModalsInitialData,
69
- } from '~/components/common/diagramMain/lib/models/interfaces'
70
- import { switchMainNavigationFunc } from '~/components/common/diagramMain/modals/lib/config'
71
-
72
- const props = defineProps<{
73
- inPortlet: boolean
74
- isShowDiagram: boolean
75
- diagramName: string
76
- testId: string
77
- }>()
78
-
79
- const emits = defineEmits<{
80
- (event: 'toggle-diagram'): void
81
- (
82
- event: 'show-modal',
83
- modalName: string,
84
- properties?: UI_I_ModalsInitialData
85
- ): void
86
- }>()
87
-
88
- const localization = computed<UI_I_Localization>(() => useLocal())
89
-
90
- const switchMainNavigation = computed<UI_I_NavigationItem[]>(() =>
91
- switchMainNavigationFunc(localization.value, props.testId)
92
- )
93
-
94
- const onToggleDiagram = () => emits('toggle-diagram')
95
-
96
- const onShowModal = (modalName: string, diagramName?: string) =>
97
- diagramName
98
- ? emits('show-modal', modalName, { switch_name: diagramName })
99
- : emits('show-modal', modalName)
100
- </script>
101
-
102
- <style scoped lang="scss">
103
- :root.dark-theme {
104
- .diagram-header {
105
- &-left {
106
- a {
107
- span {
108
- color: #79c6e6;
109
-
110
- &:hover {
111
- color: #49afd9;
112
- }
113
- }
114
- }
115
- }
116
-
117
- &__btn-container {
118
- button {
119
- color: #89cbdf;
120
-
121
- &:hover {
122
- color: #57c8ea;
123
- }
124
- }
125
- }
126
- }
127
- }
128
-
129
- .diagram-header {
130
- display: flex;
131
- padding-left: 8px;
132
- a {
133
- color: #0072a3;
134
- cursor: pointer;
135
- font-weight: 700;
136
- user-select: none;
137
- line-height: 20px;
138
- span {
139
- font-weight: 700;
140
- }
141
- }
142
-
143
- &-left {
144
- display: flex;
145
- flex-wrap: nowrap;
146
- color: #49afd9;
147
- }
148
-
149
- &__arrow-icon {
150
- width: 16px;
151
- height: 16px;
152
- margin-right: 4px;
153
- transform: rotate(90deg);
154
- align-self: center;
155
- fill: var(--triger-icon-color);
156
- cursor: pointer;
157
- &.open {
158
- transform: rotate(180deg);
159
- }
160
- }
161
-
162
- &__btn-container {
163
- display: flex;
164
-
165
- button {
166
- font-size: 11px;
167
- height: 24px;
168
- border: none;
169
- background: none;
170
- margin-right: 0;
171
- cursor: pointer;
172
- display: inline-block;
173
- white-space: nowrap;
174
- text-align: center;
175
- text-transform: uppercase;
176
- color: #49afd9;
177
- line-height: 20px;
178
- max-height: 16.8px;
179
- padding: 0 14px;
180
- font-weight: 500;
181
- letter-spacing: 1px;
182
-
183
- &:hover {
184
- color: #004d8a;
185
- }
186
- }
187
- }
188
- }
189
-
190
- .diagram-main-actions-dots {
191
- position: relative;
192
- transform: translate(62px, -11px);
193
- }
194
-
195
- .horizontal-separator {
196
- margin: 5px 10px 10px;
197
- border-left: 0;
198
- border-right: 0;
199
- border-color: #ddd;
200
- box-sizing: content-box;
201
- height: 0;
202
- overflow: visible;
203
- border-top: 0px solid #eee;
204
- }
205
-
206
- .vertical-separator {
207
- border: 1px solid #ddd;
208
- border-left: none;
209
- margin: 0 3px 0 14px;
210
- }
211
- </style>
1
+ <template>
2
+ <template v-if="!props.inPortlet">
3
+ <div class="diagram-header">
4
+ <div class="diagram-header-left">
5
+ <atoms-the-icon
6
+ name="angle"
7
+ :class="[
8
+ 'diagram-header__arrow-icon',
9
+ {
10
+ open: props.isShowDiagram,
11
+ },
12
+ ]"
13
+ :data-id="`${props.testId}-toggle-icon`"
14
+ @click="onToggleDiagram"
15
+ />
16
+ <a>
17
+ <span>
18
+ {{ localization.common.standardSwitch }}:
19
+ {{ props.diagramName }}
20
+ </span>
21
+ </a>
22
+ </div>
23
+ <div v-if="props.isShowDiagram" class="diagram-header__btn-container">
24
+ <span class="vertical-separator"></span>
25
+ <button
26
+ id="add-networking-button"
27
+ :data-id="`${props.testId}-add-networking-button`"
28
+ type="button"
29
+ @click="onShowModal('add-networking', props.diagramName)"
30
+ >
31
+ {{ localization.common.addNetworking }}
32
+ </button>
33
+ <button
34
+ id="switch-edit-button"
35
+ :data-id="`${props.testId}-edit-button`"
36
+ type="button"
37
+ @click="onShowModal('switch-edit')"
38
+ >
39
+ {{ localization.common.edit }}
40
+ </button>
41
+ <button
42
+ id="switch-manage-physical-adapters-button"
43
+ v-development="props.project === 'sphere'"
44
+ :data-id="`${props.testId}-manage-physical-adapters-button`"
45
+ type="button"
46
+ @click="onShowModal('switch-manage-physical-adapters')"
47
+ >
48
+ {{ localization.common.managePhysicalAdapters }}
49
+ </button>
50
+ <div class="diagram-main-actions-dots">
51
+ <atoms-collapse-nav
52
+ popup-class="diagram-main-actions__popup"
53
+ :close-after-click="true"
54
+ :items="switchMainNavigation"
55
+ :test-id="`${props.testId}-actions`"
56
+ @change="onShowModal"
57
+ />
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <hr class="horizontal-separator" />
62
+ </template>
63
+ </template>
64
+
65
+ <script setup lang="ts">
66
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
67
+ import type {
68
+ UI_I_NavigationItem,
69
+ UI_I_ModalsInitialData,
70
+ } from '~/components/common/diagramMain/lib/models/interfaces'
71
+ import type { UI_T_Project } from '~/lib/models/types'
72
+ import { switchMainNavigationFunc } from '~/components/common/diagramMain/modals/lib/config'
73
+
74
+ const props = defineProps<{
75
+ inPortlet: boolean
76
+ isShowDiagram: boolean
77
+ diagramName: string
78
+ testId: string
79
+ project?: UI_T_Project
80
+ }>()
81
+
82
+ const emits = defineEmits<{
83
+ (event: 'toggle-diagram'): void
84
+ (
85
+ event: 'show-modal',
86
+ modalName: string,
87
+ properties?: UI_I_ModalsInitialData
88
+ ): void
89
+ }>()
90
+
91
+ const localization = computed<UI_I_Localization>(() => useLocal())
92
+
93
+ const switchMainNavigation = computed<UI_I_NavigationItem[]>(() =>
94
+ switchMainNavigationFunc(localization.value, props.testId)
95
+ )
96
+
97
+ const onToggleDiagram = () => emits('toggle-diagram')
98
+
99
+ const onShowModal = (modalName: string, diagramName?: string) =>
100
+ diagramName
101
+ ? emits('show-modal', modalName, { switch_name: diagramName })
102
+ : emits('show-modal', modalName)
103
+ </script>
104
+
105
+ <style scoped lang="scss">
106
+ :root.dark-theme {
107
+ .diagram-header {
108
+ &-left {
109
+ a {
110
+ span {
111
+ color: #79c6e6;
112
+
113
+ &:hover {
114
+ color: #49afd9;
115
+ }
116
+ }
117
+ }
118
+ }
119
+
120
+ &__btn-container {
121
+ button {
122
+ color: #89cbdf;
123
+
124
+ &:hover {
125
+ color: #57c8ea;
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
131
+
132
+ .diagram-header {
133
+ display: flex;
134
+ padding-left: 8px;
135
+ a {
136
+ color: #0072a3;
137
+ cursor: pointer;
138
+ font-weight: 700;
139
+ user-select: none;
140
+ line-height: 20px;
141
+ span {
142
+ font-weight: 700;
143
+ }
144
+ }
145
+
146
+ &-left {
147
+ display: flex;
148
+ flex-wrap: nowrap;
149
+ color: #49afd9;
150
+ }
151
+
152
+ &__arrow-icon {
153
+ width: 16px;
154
+ height: 16px;
155
+ margin-right: 4px;
156
+ transform: rotate(90deg);
157
+ align-self: center;
158
+ fill: var(--triger-icon-color);
159
+ cursor: pointer;
160
+ &.open {
161
+ transform: rotate(180deg);
162
+ }
163
+ }
164
+
165
+ &__btn-container {
166
+ display: flex;
167
+
168
+ button {
169
+ font-size: 11px;
170
+ height: 24px;
171
+ border: none;
172
+ background: none;
173
+ margin-right: 0;
174
+ cursor: pointer;
175
+ display: inline-block;
176
+ white-space: nowrap;
177
+ text-align: center;
178
+ text-transform: uppercase;
179
+ color: #49afd9;
180
+ line-height: 20px;
181
+ max-height: 16.8px;
182
+ padding: 0 14px;
183
+ font-weight: 500;
184
+ letter-spacing: 1px;
185
+
186
+ &:hover {
187
+ color: #004d8a;
188
+ }
189
+ }
190
+ }
191
+ }
192
+
193
+ .diagram-main-actions-dots {
194
+ position: relative;
195
+ transform: translate(62px, -11px);
196
+ }
197
+
198
+ .horizontal-separator {
199
+ margin: 5px 10px 10px;
200
+ border-left: 0;
201
+ border-right: 0;
202
+ border-color: #ddd;
203
+ box-sizing: content-box;
204
+ height: 0;
205
+ overflow: visible;
206
+ border-top: 0px solid #eee;
207
+ }
208
+
209
+ .vertical-separator {
210
+ border: 1px solid #ddd;
211
+ border-left: none;
212
+ margin: 0 3px 0 14px;
213
+ }
214
+ </style>
@@ -550,6 +550,7 @@ export interface UI_I_NavigationItem {
550
550
  text: string
551
551
  value: string
552
552
  testId?: string
553
+ development?: boolean
553
554
  }
554
555
 
555
556
  export interface UI_I_ModalTabs {
@@ -9,6 +9,7 @@ export const switchMainNavigationFunc = (
9
9
  text: localization.common.migrateVmKernelAdapter,
10
10
  value: 'migrate-vmkernel-adapter',
11
11
  testId: `${testId}-migrate-vm-kernel-adapter`,
12
+ development: true
12
13
  },
13
14
  {
14
15
  text: localization.common.viewSettings,
@@ -21,6 +21,7 @@
21
21
  <common-wizards-network-add-steps-select-connection-type
22
22
  v-if="selectedStep.id === 0"
23
23
  v-model="connectionTypeLocal"
24
+ :project="props.project"
24
25
  />
25
26
  <common-wizards-network-add-steps-selected-target-device
26
27
  v-if="selectedStep.id === 1"
@@ -1,99 +1,105 @@
1
- <template>
2
- <div class="wizard-content-container add-networking-step">
3
- <div class="wizard-content">
4
- <form>
5
- <div class="radio">
6
- <input
7
- id="vmkernel-adapter"
8
- v-model="connectionTypeLocal"
9
- type="radio"
10
- value="0"
11
- name="connection-type"
12
- />
13
- <label for="vmkernel-adapter" data-id="vmkernel-adapter-radio">
14
- {{ localization.common.vmKernelNetworkAdapter }}
15
- </label>
16
- </div>
17
- <div class="add-networking-radio-button-description">
18
- {{ localization.common.vMKernelTcpIpStackHandlesTraffic }}
19
- </div>
20
- <div class="radio">
21
- <input
22
- id="virtual"
23
- v-model="connectionTypeLocal"
24
- type="radio"
25
- value="1"
26
- name="connection-type"
27
- />
28
- <label for="virtual" data-id="virtual-radio">
29
- {{ localization.common.virtualMachinePortGroupStandardSwitch }}
30
- </label>
31
- </div>
32
- <div class="add-networking-radio-button-description">
33
- {{ localization.common.portGroupHandlesVirtualMachineTraffic }}
34
- </div>
35
- <div class="radio">
36
- <input
37
- id="physical-adapter"
38
- v-model="connectionTypeLocal"
39
- type="radio"
40
- value="2"
41
- name="connection-type"
42
- />
43
- <label for="physical-adapter" data-id="physical-adapter-radio">
44
- {{ localization.common.physicalNetworkAdapter }}
45
- </label>
46
- </div>
47
- <div class="add-networking-radio-button-description">
48
- {{ localization.common.physicalNetworkAdapterHandlesNetworkTraffic }}
49
- </div>
50
- </form>
51
- </div>
52
- </div>
53
- </template>
54
-
55
- <script setup lang="ts">
56
- import type { UI_I_Localization } from '~/lib/models/interfaces'
57
-
58
- const props = defineProps<{
59
- modelValue: string
60
- }>()
61
-
62
- const localization = computed<UI_I_Localization>(() => useLocal())
63
-
64
- const emits = defineEmits<{
65
- (event: 'update:model-value', connectionType: string): void
66
- }>()
67
-
68
- const connectionTypeLocal = computed<string>({
69
- get() {
70
- return props.modelValue
71
- },
72
- set(newValue: string) {
73
- emits('update:model-value', newValue)
74
- },
75
- })
76
- </script>
77
-
78
- <style scoped lang="scss">
79
- .wizard-content {
80
- height: auto;
81
- width: inherit;
82
- margin: 0;
83
-
84
- .radio {
85
- min-height: 20px;
86
- margin: 10px 0;
87
-
88
- label {
89
- font-weight: 700;
90
- margin: 6px 12px 6px 0;
91
- }
92
- }
93
-
94
- .add-networking-radio-button-description {
95
- padding-left: 20px;
96
- color: #333;
97
- }
98
- }
99
- </style>
1
+ <template>
2
+ <div class="wizard-content-container add-networking-step">
3
+ <div class="wizard-content">
4
+ <form>
5
+ <div class="radio">
6
+ <input
7
+ id="vmkernel-adapter"
8
+ v-model="connectionTypeLocal"
9
+ type="radio"
10
+ value="0"
11
+ name="connection-type"
12
+ />
13
+ <label for="vmkernel-adapter" data-id="vmkernel-adapter-radio">
14
+ {{ localization.common.vmKernelNetworkAdapter }}
15
+ </label>
16
+ </div>
17
+ <div class="add-networking-radio-button-description">
18
+ {{ localization.common.vMKernelTcpIpStackHandlesTraffic }}
19
+ </div>
20
+ <div class="radio">
21
+ <input
22
+ id="virtual"
23
+ v-model="connectionTypeLocal"
24
+ type="radio"
25
+ value="1"
26
+ name="connection-type"
27
+ />
28
+ <label for="virtual" data-id="virtual-radio">
29
+ {{ localization.common.virtualMachinePortGroupStandardSwitch }}
30
+ </label>
31
+ </div>
32
+ <div class="add-networking-radio-button-description">
33
+ {{ localization.common.portGroupHandlesVirtualMachineTraffic }}
34
+ </div>
35
+ <div class="radio">
36
+ <input
37
+ id="physical-adapter"
38
+ v-model="connectionTypeLocal"
39
+ type="radio"
40
+ value="2"
41
+ name="connection-type"
42
+ />
43
+ <label
44
+ v-development="props.project === 'sphere'"
45
+ for="physical-adapter"
46
+ data-id="physical-adapter-radio"
47
+ >
48
+ {{ localization.common.physicalNetworkAdapter }}
49
+ </label>
50
+ </div>
51
+ <div class="add-networking-radio-button-description">
52
+ {{ localization.common.physicalNetworkAdapterHandlesNetworkTraffic }}
53
+ </div>
54
+ </form>
55
+ </div>
56
+ </div>
57
+ </template>
58
+
59
+ <script setup lang="ts">
60
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
61
+ import type { UI_T_Project } from '~/lib/models/types'
62
+
63
+ const props = defineProps<{
64
+ modelValue: string
65
+ project?: UI_T_Project
66
+ }>()
67
+
68
+ const localization = computed<UI_I_Localization>(() => useLocal())
69
+
70
+ const emits = defineEmits<{
71
+ (event: 'update:model-value', connectionType: string): void
72
+ }>()
73
+
74
+ const connectionTypeLocal = computed<string>({
75
+ get() {
76
+ return props.modelValue
77
+ },
78
+ set(newValue: string) {
79
+ emits('update:model-value', newValue)
80
+ },
81
+ })
82
+ </script>
83
+
84
+ <style scoped lang="scss">
85
+ .wizard-content {
86
+ height: auto;
87
+ width: inherit;
88
+ margin: 0;
89
+
90
+ .radio {
91
+ min-height: 20px;
92
+ margin: 10px 0;
93
+
94
+ label {
95
+ font-weight: 700;
96
+ margin: 6px 12px 6px 0;
97
+ }
98
+ }
99
+
100
+ .add-networking-radio-button-description {
101
+ padding-left: 20px;
102
+ color: #333;
103
+ }
104
+ }
105
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.900",
4
+ "version": "1.4.901",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",