bfg-common 1.3.352 → 1.3.354
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/components/common/diagramMain/Diagram.vue +3 -11
- package/components/common/diagramMain/DiagramMain.vue +20 -0
- package/components/common/diagramMain/network/NoNetwork.vue +12 -4
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +3 -3
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
@click.capture="onClickDiagram"
|
|
12
12
|
>
|
|
13
13
|
<common-diagram-main-switch
|
|
14
|
-
:networks-count="networksCount"
|
|
14
|
+
:networks-count="props.networksCount"
|
|
15
15
|
:main-rect-height="props.mainRectHeight"
|
|
16
16
|
:main-switch-line="props.mainSwitchLine"
|
|
17
17
|
:selected-main-line="props.selectedMainLine"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
:is-selected-linked-with-adapter="isSelectedLinkedWithAdapter"
|
|
20
20
|
/>
|
|
21
21
|
<common-diagram-main-adapter
|
|
22
|
-
:networks-count="networksCount"
|
|
22
|
+
:networks-count="props.networksCount"
|
|
23
23
|
:adapters-with-positions="props.adaptersWithPositions"
|
|
24
24
|
:selected-main-line="props.selectedMainLine"
|
|
25
25
|
:selected-port="props.selectedPort"
|
|
@@ -92,6 +92,7 @@ const props = defineProps<{
|
|
|
92
92
|
selectedNetwork: string
|
|
93
93
|
selectedSwitchLineY: UI_I_SwitchLine
|
|
94
94
|
isDarkMode: boolean
|
|
95
|
+
networksCount: number
|
|
95
96
|
}>()
|
|
96
97
|
|
|
97
98
|
const emits = defineEmits<{
|
|
@@ -182,15 +183,6 @@ const isSelectedLinkedWithAdapter = computed<boolean>(() => {
|
|
|
182
183
|
return false
|
|
183
184
|
})
|
|
184
185
|
|
|
185
|
-
const networksCount = computed<number>(
|
|
186
|
-
() =>
|
|
187
|
-
props.networksWithPositions.filter(
|
|
188
|
-
(networkWithPositions: UI_I_NetworksWithPositions) =>
|
|
189
|
-
networkWithPositions.activeAdapters.length > 0 &&
|
|
190
|
-
networkWithPositions.state.state !== 3
|
|
191
|
-
).length
|
|
192
|
-
)
|
|
193
|
-
|
|
194
186
|
const onClickDiagram = (ev: MouseEvent) => emits('click-diagram', ev)
|
|
195
187
|
const onToggleAdapters = () => emits('toggle-adapters')
|
|
196
188
|
const onSelectAdapter = (adapterId: string) =>
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
:selected-network="selectedNetwork"
|
|
27
27
|
:selected-switch-line-y="selectedSwitchLineY"
|
|
28
28
|
:is-dark-mode="props.isDarkMode"
|
|
29
|
+
:networks-count="networksCount"
|
|
29
30
|
@click-diagram="onClickDiagram"
|
|
30
31
|
@toggle-adapters="onToggleAdapters"
|
|
31
32
|
@select-adapter="onSelectAdapter"
|
|
@@ -619,6 +620,15 @@ const adaptersWithPositions = computed<UI_I_AdaptersWithPositions>(() => {
|
|
|
619
620
|
return countAdaptersPositions()
|
|
620
621
|
})
|
|
621
622
|
|
|
623
|
+
const networksCount = computed<number>(
|
|
624
|
+
() =>
|
|
625
|
+
networksWithPositions.value.filter(
|
|
626
|
+
(networkWithPositions: UI_I_NetworksWithPositions) =>
|
|
627
|
+
networkWithPositions.activeAdapters.length > 0 &&
|
|
628
|
+
networkWithPositions.state.state !== 3
|
|
629
|
+
).length
|
|
630
|
+
)
|
|
631
|
+
|
|
622
632
|
watch(
|
|
623
633
|
() => props.diagramData?.networks,
|
|
624
634
|
(newValue: UI_I_Network[] | null) => {
|
|
@@ -630,14 +640,24 @@ watch(
|
|
|
630
640
|
onSelectAdapter(selectedAdapter.value.adapterId)
|
|
631
641
|
return
|
|
632
642
|
}
|
|
643
|
+
|
|
633
644
|
if (selectedPort.value.portId !== '-1') {
|
|
634
645
|
onSelectPort(selectedPort.value.networkId, selectedPort.value.portId)
|
|
635
646
|
return
|
|
636
647
|
}
|
|
648
|
+
|
|
637
649
|
if (selectedNetwork.value !== '-1') {
|
|
638
650
|
onSelectNetwork(selectedNetwork.value)
|
|
639
651
|
return
|
|
640
652
|
}
|
|
653
|
+
|
|
654
|
+
if (selectedMainLine.value && networksCount.value === 0) {
|
|
655
|
+
selectedMainLine.value = false
|
|
656
|
+
return
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
if (selectedMainLine.value) return
|
|
660
|
+
|
|
641
661
|
resetSelection()
|
|
642
662
|
},
|
|
643
663
|
{ deep: true }
|
|
@@ -6,14 +6,12 @@
|
|
|
6
6
|
shape-rendering="geometricprecision"
|
|
7
7
|
x="16.5"
|
|
8
8
|
y="17.5"
|
|
9
|
-
|
|
10
|
-
stroke="#888"
|
|
9
|
+
class="panel"
|
|
11
10
|
></rect>
|
|
12
11
|
<path
|
|
13
12
|
d="M 313.5 17.5 H 333.5 V 55.5 H 313.5 "
|
|
14
13
|
shape-rendering="geometricprecision"
|
|
15
|
-
|
|
16
|
-
stroke="#888"
|
|
14
|
+
class="panel"
|
|
17
15
|
></path>
|
|
18
16
|
<text
|
|
19
17
|
dy="14px"
|
|
@@ -40,6 +38,11 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
40
38
|
.diagram__heading {
|
|
41
39
|
fill: #c1cdd4;
|
|
42
40
|
}
|
|
41
|
+
|
|
42
|
+
.panel {
|
|
43
|
+
fill: #1b2a32;
|
|
44
|
+
stroke: #adbbc4;
|
|
45
|
+
}
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
.diagram {
|
|
@@ -50,4 +53,9 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
50
53
|
line-height: 1.2rem;
|
|
51
54
|
}
|
|
52
55
|
}
|
|
56
|
+
|
|
57
|
+
.panel {
|
|
58
|
+
fill: #fff;
|
|
59
|
+
stroke: #888;
|
|
60
|
+
}
|
|
53
61
|
</style>
|
package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue
CHANGED
|
@@ -230,7 +230,7 @@ const dataTable = computed<API_UI_I_DataTable<
|
|
|
230
230
|
|
|
231
231
|
/* Select host */
|
|
232
232
|
// const hostData = ref<UI_I_SelectHostOptions[] | null>(null)
|
|
233
|
-
const selectedHost = ref<string>('')
|
|
233
|
+
const selectedHost = ref<string>(props.hostId || '')
|
|
234
234
|
const hostOptions = computed<UI_I_SelectHostOptions[]>(() =>
|
|
235
235
|
hostsOptionsFunc(localization.value, props.datacenterHosts)
|
|
236
236
|
) // <!-- TODO Нам сейчас он не нужен. Мы монтируем nfs только на один хост ( procurator )-->
|
|
@@ -277,7 +277,7 @@ const validationTextForSphere = (): string => {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
if (props.datastoreType === 'shared-storm') {
|
|
280
|
-
return !selectedHost.value
|
|
280
|
+
return !selectedHost.value
|
|
281
281
|
? 'selectHostToContinueAlert'
|
|
282
282
|
: 'selectDiskToContinueAlert'
|
|
283
283
|
}
|
|
@@ -321,7 +321,7 @@ const submit = async (): Promise<void> => {
|
|
|
321
321
|
|
|
322
322
|
const valid = validation.touch()
|
|
323
323
|
const isShowAlertDanger =
|
|
324
|
-
mode === 'procurator'
|
|
324
|
+
mode === 'procurator'
|
|
325
325
|
? !selectedLunDisk.value.length
|
|
326
326
|
: validatePropertiesForSphere()
|
|
327
327
|
|