bfg-common 1.3.227 → 1.3.229
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/atoms/alert/Alert.vue +95 -95
- package/components/atoms/alert/Notification.vue +170 -170
- package/components/atoms/switch/Switch.vue +111 -111
- package/components/atoms/table/compact/Compact.vue +526 -526
- package/components/atoms/tooltip/Signpost.vue +225 -225
- package/components/common/diagramMain/lib/models/interfaces.ts +3 -3
- package/components/common/pages/Tasks.vue +120 -120
- package/components/common/recursionTree/RecursionTree.vue +203 -203
- package/components/common/vm/actions/add/Add.vue +575 -575
- package/components/common/vm/actions/clone/Clone.vue +518 -518
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +269 -269
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +693 -693
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuModel.vue +220 -220
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +59 -59
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +294 -294
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +165 -165
- package/components/common/vm/actions/common/select/storage/lib/config/config.ts +166 -166
- package/components/common/vm/actions/editSettings/EditSettings.vue +313 -313
- package/components/common/weekSelect/WeekSelect.vue +112 -112
- package/components/common/weekSelect/lib/config/options.ts +10 -10
- package/components/common/wizards/network/add/lib/config/sendData.ts +65 -64
- package/components/common/wizards/network/add/lib/models/interfaces.ts +40 -40
- package/composables/useAppVersion.ts +21 -21
- package/composables/useEnvLanguage.ts +20 -20
- package/lib/utils/sendTask.ts +72 -72
- package/minify.js +146 -146
- package/package.json +1 -1
- package/plugins/binary.ts +46 -35
- package/public/spice-console/application/codec.js +257 -257
- package/public/spice-console/lib/rasterEngine.js +907 -907
- package/public/spice-console/network/spicechannel.js +369 -369
- package/store/main/lib/interfaces.ts +9 -9
- package/store/tasks/actions.ts +133 -133
- package/store/tasks/getters.ts +25 -25
- package/store/tasks/lib/models/interfaces.ts +18 -18
- package/store/tasks/mutations.ts +58 -58
- package/store/tasks/state.ts +16 -16
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex-align-center">
|
|
3
|
-
<common-select-input
|
|
4
|
-
v-model="selectedOption"
|
|
5
|
-
:data="options"
|
|
6
|
-
class="mr-1"
|
|
7
|
-
/>
|
|
8
|
-
|
|
9
|
-
<div class="btn-group">
|
|
10
|
-
<button
|
|
11
|
-
v-for="item in tabs"
|
|
12
|
-
:key="item"
|
|
13
|
-
:class="['btn btn-sm btn-secondary', { 'btn-primary': item.isActive }]"
|
|
14
|
-
:disabled="!isCustom"
|
|
15
|
-
@click="onSelectDay(item.value)"
|
|
16
|
-
>
|
|
17
|
-
{{ item.text }}
|
|
18
|
-
</button>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script lang="ts" setup>
|
|
24
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
25
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
26
|
-
import type { UI_I_TabItem } from '~/components/common/weekSelect/lib/models/interfaces'
|
|
27
|
-
import { optionsFunc } from '~/components/common/weekSelect/lib/config/options'
|
|
28
|
-
|
|
29
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
30
|
-
|
|
31
|
-
const model = defineModel<number[]>()
|
|
32
|
-
|
|
33
|
-
const selectedOption = ref<number>(0)
|
|
34
|
-
if (model.value.length === 2 && model.value.includes(6) && model.value.includes(0)) {
|
|
35
|
-
selectedOption.value = 1
|
|
36
|
-
} else if (model.value.length < 7) {
|
|
37
|
-
selectedOption.value = 2
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const options = ref<UI_I_SelectInputItem[]>(optionsFunc(localization.value))
|
|
41
|
-
|
|
42
|
-
const isCustom = computed<boolean>(() => selectedOption.value === 2)
|
|
43
|
-
const onSelectDay = (value: number): void => {
|
|
44
|
-
const index = model.value?.indexOf(value)
|
|
45
|
-
if (index === -1) {
|
|
46
|
-
model.value.push(value)
|
|
47
|
-
model.value.sort((a: number, b: number) => a - b)
|
|
48
|
-
}
|
|
49
|
-
else if (model.value.length > 1) {
|
|
50
|
-
model.value = model.value?.filter((_: number, key: number) => key !== index)
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const tabs = computed<UI_I_TabItem[]>(() => {
|
|
55
|
-
return [
|
|
56
|
-
{ text: localization.value.weekM, value: 1, isActive: checkIsActiveDay(1) },
|
|
57
|
-
{ text: localization.value.weekT, value: 2, isActive: checkIsActiveDay(2) },
|
|
58
|
-
{ text: localization.value.weekW, value: 3, isActive: checkIsActiveDay(3) },
|
|
59
|
-
{
|
|
60
|
-
text: localization.value.weekTh,
|
|
61
|
-
value: 4,
|
|
62
|
-
isActive: checkIsActiveDay(4),
|
|
63
|
-
},
|
|
64
|
-
{ text: localization.value.weekF, value: 5, isActive: checkIsActiveDay(5) },
|
|
65
|
-
{ text: localization.value.weekS, value: 6, isActive: checkIsActiveDay(6) },
|
|
66
|
-
{
|
|
67
|
-
text: localization.value.weekSu,
|
|
68
|
-
value: 0,
|
|
69
|
-
isActive: checkIsActiveDay(0),
|
|
70
|
-
},
|
|
71
|
-
]
|
|
72
|
-
})
|
|
73
|
-
const checkIsActiveDay = (value: number): boolean => {
|
|
74
|
-
let result = false
|
|
75
|
-
switch (selectedOption.value) {
|
|
76
|
-
case 0:
|
|
77
|
-
result = true
|
|
78
|
-
break
|
|
79
|
-
case 1:
|
|
80
|
-
if (value === 6 || value === 0) result = true
|
|
81
|
-
break
|
|
82
|
-
default:
|
|
83
|
-
result = !!model.value?.includes(value)
|
|
84
|
-
break
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return result
|
|
88
|
-
}
|
|
89
|
-
watch(
|
|
90
|
-
tabs,
|
|
91
|
-
(newValue: UI_I_TabItem[]) => {
|
|
92
|
-
if (selectedOption.value === 2) return
|
|
93
|
-
|
|
94
|
-
model.value = newValue.filter((tab) => tab.isActive).map((tab) => tab.value)
|
|
95
|
-
},
|
|
96
|
-
{ immediate: true }
|
|
97
|
-
)
|
|
98
|
-
</script>
|
|
99
|
-
|
|
100
|
-
<style lang="scss" scoped>
|
|
101
|
-
:deep(.select::after) {
|
|
102
|
-
top: 2px;
|
|
103
|
-
right: -16px;
|
|
104
|
-
}
|
|
105
|
-
.btn-group {
|
|
106
|
-
button {
|
|
107
|
-
width: 24px;
|
|
108
|
-
min-width: 24px;
|
|
109
|
-
padding: 0;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex-align-center">
|
|
3
|
+
<common-select-input
|
|
4
|
+
v-model="selectedOption"
|
|
5
|
+
:data="options"
|
|
6
|
+
class="mr-1"
|
|
7
|
+
/>
|
|
8
|
+
|
|
9
|
+
<div class="btn-group">
|
|
10
|
+
<button
|
|
11
|
+
v-for="item in tabs"
|
|
12
|
+
:key="item"
|
|
13
|
+
:class="['btn btn-sm btn-secondary', { 'btn-primary': item.isActive }]"
|
|
14
|
+
:disabled="!isCustom"
|
|
15
|
+
@click="onSelectDay(item.value)"
|
|
16
|
+
>
|
|
17
|
+
{{ item.text }}
|
|
18
|
+
</button>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
25
|
+
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
26
|
+
import type { UI_I_TabItem } from '~/components/common/weekSelect/lib/models/interfaces'
|
|
27
|
+
import { optionsFunc } from '~/components/common/weekSelect/lib/config/options'
|
|
28
|
+
|
|
29
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
30
|
+
|
|
31
|
+
const model = defineModel<number[]>()
|
|
32
|
+
|
|
33
|
+
const selectedOption = ref<number>(0)
|
|
34
|
+
if (model.value.length === 2 && model.value.includes(6) && model.value.includes(0)) {
|
|
35
|
+
selectedOption.value = 1
|
|
36
|
+
} else if (model.value.length < 7) {
|
|
37
|
+
selectedOption.value = 2
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const options = ref<UI_I_SelectInputItem[]>(optionsFunc(localization.value))
|
|
41
|
+
|
|
42
|
+
const isCustom = computed<boolean>(() => selectedOption.value === 2)
|
|
43
|
+
const onSelectDay = (value: number): void => {
|
|
44
|
+
const index = model.value?.indexOf(value)
|
|
45
|
+
if (index === -1) {
|
|
46
|
+
model.value.push(value)
|
|
47
|
+
model.value.sort((a: number, b: number) => a - b)
|
|
48
|
+
}
|
|
49
|
+
else if (model.value.length > 1) {
|
|
50
|
+
model.value = model.value?.filter((_: number, key: number) => key !== index)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const tabs = computed<UI_I_TabItem[]>(() => {
|
|
55
|
+
return [
|
|
56
|
+
{ text: localization.value.weekM, value: 1, isActive: checkIsActiveDay(1) },
|
|
57
|
+
{ text: localization.value.weekT, value: 2, isActive: checkIsActiveDay(2) },
|
|
58
|
+
{ text: localization.value.weekW, value: 3, isActive: checkIsActiveDay(3) },
|
|
59
|
+
{
|
|
60
|
+
text: localization.value.weekTh,
|
|
61
|
+
value: 4,
|
|
62
|
+
isActive: checkIsActiveDay(4),
|
|
63
|
+
},
|
|
64
|
+
{ text: localization.value.weekF, value: 5, isActive: checkIsActiveDay(5) },
|
|
65
|
+
{ text: localization.value.weekS, value: 6, isActive: checkIsActiveDay(6) },
|
|
66
|
+
{
|
|
67
|
+
text: localization.value.weekSu,
|
|
68
|
+
value: 0,
|
|
69
|
+
isActive: checkIsActiveDay(0),
|
|
70
|
+
},
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
const checkIsActiveDay = (value: number): boolean => {
|
|
74
|
+
let result = false
|
|
75
|
+
switch (selectedOption.value) {
|
|
76
|
+
case 0:
|
|
77
|
+
result = true
|
|
78
|
+
break
|
|
79
|
+
case 1:
|
|
80
|
+
if (value === 6 || value === 0) result = true
|
|
81
|
+
break
|
|
82
|
+
default:
|
|
83
|
+
result = !!model.value?.includes(value)
|
|
84
|
+
break
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return result
|
|
88
|
+
}
|
|
89
|
+
watch(
|
|
90
|
+
tabs,
|
|
91
|
+
(newValue: UI_I_TabItem[]) => {
|
|
92
|
+
if (selectedOption.value === 2) return
|
|
93
|
+
|
|
94
|
+
model.value = newValue.filter((tab) => tab.isActive).map((tab) => tab.value)
|
|
95
|
+
},
|
|
96
|
+
{ immediate: true }
|
|
97
|
+
)
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style lang="scss" scoped>
|
|
101
|
+
:deep(.select::after) {
|
|
102
|
+
top: 2px;
|
|
103
|
+
right: -16px;
|
|
104
|
+
}
|
|
105
|
+
.btn-group {
|
|
106
|
+
button {
|
|
107
|
+
width: 24px;
|
|
108
|
+
min-width: 24px;
|
|
109
|
+
padding: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const optionsFunc = (
|
|
5
|
-
localization: UI_I_Localization
|
|
6
|
-
): UI_I_SelectInputItem[] => [
|
|
7
|
-
{ label: localization.daily, value: 0 },
|
|
8
|
-
{ label: localization.weekly, value: 1 },
|
|
9
|
-
{ label: localization.custom, value: 2 },
|
|
10
|
-
]
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
3
|
+
|
|
4
|
+
export const optionsFunc = (
|
|
5
|
+
localization: UI_I_Localization
|
|
6
|
+
): UI_I_SelectInputItem[] => [
|
|
7
|
+
{ label: localization.daily, value: 0 },
|
|
8
|
+
{ label: localization.weekly, value: 1 },
|
|
9
|
+
{ label: localization.custom, value: 2 },
|
|
10
|
+
]
|
|
@@ -13,58 +13,54 @@ import {
|
|
|
13
13
|
import { makeSwitchSendData } from '~/components/common/diagramMain/lib/utils/utils'
|
|
14
14
|
|
|
15
15
|
export const addNetworkingSecondOrThirdSchemeDataFunc = (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
connectionSettings: UI_I_ConnectionSettings,
|
|
17
|
+
targetDevice: UI_I_TargetDevice,
|
|
18
|
+
vlan: number,
|
|
19
|
+
isSecondScheme: boolean = false,
|
|
20
|
+
adapterStatus?: UI_I_AdapterStatus
|
|
21
21
|
): UI_I_AddNetworkingSecondOrThirdSchemeDataSend =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
22
|
+
isSecondScheme
|
|
23
|
+
? {
|
|
24
|
+
vlan,
|
|
25
|
+
name: connectionSettings.networkLabel,
|
|
26
|
+
switch: targetDevice.standardSwitch,
|
|
27
|
+
}
|
|
28
|
+
: {
|
|
29
|
+
vlan,
|
|
30
|
+
name: connectionSettings.networkLabel,
|
|
31
|
+
new_switch: {
|
|
32
|
+
mtu: targetDevice.selected === '3' ? targetDevice.mtu : undefined,
|
|
33
|
+
nics: {
|
|
34
|
+
active: adapterStatus?.active || [],
|
|
35
|
+
standby: adapterStatus?.standby || [],
|
|
36
|
+
unused: adapterStatus?.unused || [],
|
|
38
37
|
},
|
|
39
|
-
}
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
40
|
|
|
41
41
|
export const addNetworkingZeroOrFirstSchemeDataFunc = (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
targetDevice: UI_I_TargetDevice,
|
|
43
|
+
vlan: number,
|
|
44
|
+
portProperties: UI_I_PortProperties,
|
|
45
|
+
ipFourSettings: UI_I_IpFourSettings,
|
|
46
|
+
isFirstScheme?: boolean,
|
|
47
|
+
adapterStatus?: UI_I_AdapterStatus
|
|
48
48
|
): UI_I_AddNetworkingZeroOrFirstSchemeDataSend => {
|
|
49
|
+
const { $binary } = useNuxtApp()
|
|
49
50
|
const sendData: UI_I_AddNetworkingZeroOrFirstSchemeDataSend = {
|
|
50
|
-
switch: targetDevice.selected === '1' ? targetDevice.standardSwitch : '',
|
|
51
|
-
new_network: {
|
|
52
|
-
vlan: Number(vlan),
|
|
53
|
-
},
|
|
54
|
-
network_name: portProperties.networkLabel,
|
|
55
51
|
tcp_stack: portProperties.tcp,
|
|
56
52
|
mtu: portProperties.mtu.size,
|
|
57
53
|
services: {
|
|
58
54
|
Management: portProperties.services.management,
|
|
59
|
-
VMotion: portProperties.services.vMotion,
|
|
55
|
+
// VMotion: portProperties.services.vMotion,
|
|
60
56
|
Provisioning: portProperties.services.provisioning,
|
|
61
57
|
VSAN: portProperties.services.vSAN,
|
|
62
|
-
FaultToleranceLogging: portProperties.services.faultToleranceLogging,
|
|
63
|
-
VSphereReplication: portProperties.services.replication,
|
|
64
|
-
VSphereReplicationNFC: portProperties.services.replicationNFC,
|
|
65
|
-
VSphereBackupNFC: portProperties.services.backupNFC,
|
|
66
|
-
NVMeOverTCP: portProperties.services.nVMeOverTCP,
|
|
67
|
-
NVMeOverRDMA: portProperties.services.nVMeOverRDMA,
|
|
58
|
+
// FaultToleranceLogging: portProperties.services.faultToleranceLogging,
|
|
59
|
+
// VSphereReplication: portProperties.services.replication,
|
|
60
|
+
// VSphereReplicationNFC: portProperties.services.replicationNFC,
|
|
61
|
+
// VSphereBackupNFC: portProperties.services.backupNFC,
|
|
62
|
+
// NVMeOverTCP: portProperties.services.nVMeOverTCP,
|
|
63
|
+
// NVMeOverRDMA: portProperties.services.nVMeOverRDMA,
|
|
68
64
|
},
|
|
69
65
|
ipv4_settings: {
|
|
70
66
|
auto: ipFourSettings.ipSettings === '0',
|
|
@@ -72,13 +68,18 @@ export const addNetworkingZeroOrFirstSchemeDataFunc = (
|
|
|
72
68
|
mask: ipFourSettings.static.subnetMask,
|
|
73
69
|
gateway_override: ipFourSettings.static.defaultGateway.override,
|
|
74
70
|
gateway: ipFourSettings.static.defaultGateway.override
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
? ipFourSettings.static.defaultGateway.value
|
|
72
|
+
: '',
|
|
73
|
+
},
|
|
74
|
+
new_network: {
|
|
75
|
+
vlan: Number(vlan),
|
|
76
|
+
switch: targetDevice.selected === '1' ? targetDevice.standardSwitch : '',
|
|
77
|
+
name: portProperties.networkLabel,
|
|
77
78
|
},
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
if (isFirstScheme) {
|
|
81
|
-
sendData.new_switch = {
|
|
82
|
+
sendData.new_network.new_switch = {
|
|
82
83
|
mtu: targetDevice.selected === '3' ? targetDevice.mtu : undefined,
|
|
83
84
|
nics: {
|
|
84
85
|
active: adapterStatus?.active || [],
|
|
@@ -91,44 +92,44 @@ export const addNetworkingZeroOrFirstSchemeDataFunc = (
|
|
|
91
92
|
const isAutoIp: boolean = ipFourSettings.ipSettings === '0'
|
|
92
93
|
|
|
93
94
|
sendData.ipv4_settings = isAutoIp
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
? { auto: true }
|
|
96
|
+
: {
|
|
96
97
|
auto: false,
|
|
97
|
-
ipv4: ipFourSettings.static.ipFourAddress,
|
|
98
|
-
mask: ipFourSettings.static.subnetMask,
|
|
98
|
+
ipv4: $binary.stringToByteIP(ipFourSettings.static.ipFourAddress),
|
|
99
|
+
mask: $binary.stringToByteIP(ipFourSettings.static.subnetMask),
|
|
99
100
|
gateway_override: ipFourSettings.static.defaultGateway.override,
|
|
100
101
|
gateway: ipFourSettings.static.defaultGateway.override
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
? $binary.stringToByteIP(ipFourSettings.static.defaultGateway.value)
|
|
103
|
+
: 0,
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
return sendData
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
export const addNetworkingFourthOrFifthSchemeDataFunc = (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
switchId: string,
|
|
111
|
+
isFourthScheme: boolean = false,
|
|
112
|
+
adapterStatus: UI_I_AdapterStatus,
|
|
113
|
+
switchData: UI_I_DiagramData[] | null,
|
|
114
|
+
mtu?: number
|
|
114
115
|
): any => {
|
|
115
116
|
let data: UI_I_DiagramData | null = null
|
|
116
117
|
if (switchData) {
|
|
117
118
|
data = switchData.find(
|
|
118
|
-
|
|
119
|
+
(d: UI_I_DiagramData) => d.diagramName === switchId
|
|
119
120
|
) as UI_I_DiagramData
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
return isFourthScheme
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
? makeSwitchSendData(data as UI_I_DiagramData, adapterStatus)
|
|
125
|
+
: // {
|
|
126
|
+
// id: switchId,
|
|
127
|
+
// nics: {
|
|
128
|
+
// active: adapterStatus?.active || [],
|
|
129
|
+
// standby: adapterStatus?.standby || [],
|
|
130
|
+
// unused: adapterStatus?.unused || [],
|
|
131
|
+
// },
|
|
132
|
+
// }
|
|
132
133
|
{
|
|
133
134
|
mtu: mtu,
|
|
134
135
|
nics: {
|
|
@@ -94,19 +94,6 @@ export interface UI_I_PortPropertiesEnabledService {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export interface UI_I_AddNetworkingZeroOrFirstSchemeDataSend {
|
|
97
|
-
switch?: string
|
|
98
|
-
new_switch?: {
|
|
99
|
-
mtu: number | undefined
|
|
100
|
-
nics: {
|
|
101
|
-
active: string[]
|
|
102
|
-
standby: string[]
|
|
103
|
-
unused: string[]
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
network_name: string
|
|
107
|
-
new_network?: {
|
|
108
|
-
vlan: number
|
|
109
|
-
}
|
|
110
97
|
tcp_stack: string
|
|
111
98
|
mtu: number
|
|
112
99
|
services: {
|
|
@@ -114,19 +101,32 @@ export interface UI_I_AddNetworkingZeroOrFirstSchemeDataSend {
|
|
|
114
101
|
VMotion?: boolean
|
|
115
102
|
Provisioning: boolean
|
|
116
103
|
VSAN: boolean
|
|
117
|
-
FaultToleranceLogging
|
|
118
|
-
VSphereReplication
|
|
119
|
-
VSphereReplicationNFC
|
|
120
|
-
VSphereBackupNFC
|
|
121
|
-
NVMeOverTCP
|
|
122
|
-
NVMeOverRDMA
|
|
104
|
+
FaultToleranceLogging?: boolean
|
|
105
|
+
VSphereReplication?: boolean
|
|
106
|
+
VSphereReplicationNFC?: boolean
|
|
107
|
+
VSphereBackupNFC?: boolean
|
|
108
|
+
NVMeOverTCP?: boolean
|
|
109
|
+
NVMeOverRDMA?: boolean
|
|
123
110
|
}
|
|
124
111
|
ipv4_settings: {
|
|
125
112
|
auto: boolean
|
|
126
|
-
ipv4?: string
|
|
127
|
-
mask?: string
|
|
113
|
+
ipv4?: number | string
|
|
114
|
+
mask?: number | string
|
|
128
115
|
gateway_override?: boolean
|
|
129
|
-
gateway?: string
|
|
116
|
+
gateway?: number | string
|
|
117
|
+
}
|
|
118
|
+
new_network: {
|
|
119
|
+
vlan: number
|
|
120
|
+
name: string
|
|
121
|
+
switch?: string
|
|
122
|
+
new_switch?: {
|
|
123
|
+
mtu: number | undefined
|
|
124
|
+
nics: {
|
|
125
|
+
active: string[]
|
|
126
|
+
standby: string[]
|
|
127
|
+
unused: string[]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -192,30 +192,30 @@ export interface UI_I_ReadyCompleteFirstColumn {
|
|
|
192
192
|
export interface UI_I_AddNetworkingEmits {
|
|
193
193
|
(event: 'hide'): void
|
|
194
194
|
(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
event: 'add-networking-data-validate',
|
|
196
|
+
networkData:
|
|
197
|
+
| UI_I_AddNetworkingSecondOrThirdSchemeDataSend
|
|
198
|
+
| UI_I_AddNetworkingZeroOrFirstSchemeDataSend
|
|
199
|
+
| UI_I_AddNetworkingFourthOrFifthSchemeDataSend,
|
|
200
|
+
type: string,
|
|
201
|
+
setValidation: (err_arg: UI_I_ArbitraryObject<string>) => void
|
|
202
202
|
): void
|
|
203
203
|
(
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
204
|
+
event: 'send-add-networking-data',
|
|
205
|
+
schemeData:
|
|
206
|
+
| UI_I_AddNetworkingSecondOrThirdSchemeDataSend
|
|
207
|
+
| UI_I_AddNetworkingZeroOrFirstSchemeDataSend
|
|
208
|
+
| UI_I_AddNetworkingFourthOrFifthSchemeDataSend,
|
|
209
|
+
type: string,
|
|
210
|
+
hideSendNetworkDataLoader: () => void,
|
|
211
|
+
onHideAddNetworkingModal: () => void
|
|
212
212
|
): void
|
|
213
213
|
(event: 'get-existing-standard-switches', cb: () => void): void
|
|
214
214
|
(event: 'get-free-adapters', cb: () => void): void
|
|
215
215
|
(
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
event: 'check-network-label',
|
|
217
|
+
networkLabel: string,
|
|
218
|
+
cb: (error_message: string) => void
|
|
219
219
|
): void
|
|
220
220
|
(event: 'get-tcp-stacks'): void
|
|
221
221
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
|
|
2
|
-
|
|
3
|
-
export function useAppVersion(): UI_I_UseAppVersionReturnType {
|
|
4
|
-
const config = useRuntimeConfig()
|
|
5
|
-
const version = config.public.APP_VERSION
|
|
6
|
-
|
|
7
|
-
const regexHasDot = /\./
|
|
8
|
-
const regexHasDotAndB = /\..*b/
|
|
9
|
-
const regexHasDotAndD = /\..*d/
|
|
10
|
-
|
|
11
|
-
const isBeta = regexHasDotAndB.test(version)
|
|
12
|
-
const isDev =
|
|
13
|
-
regexHasDotAndD.test(version) ||
|
|
14
|
-
(!regexHasDot.test(version) && version.length < 8)
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
version,
|
|
18
|
-
isBeta,
|
|
19
|
-
isDev,
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
|
|
2
|
+
|
|
3
|
+
export function useAppVersion(): UI_I_UseAppVersionReturnType {
|
|
4
|
+
const config = useRuntimeConfig()
|
|
5
|
+
const version = config.public.APP_VERSION
|
|
6
|
+
|
|
7
|
+
const regexHasDot = /\./
|
|
8
|
+
const regexHasDotAndB = /\..*b/
|
|
9
|
+
const regexHasDotAndD = /\..*d/
|
|
10
|
+
|
|
11
|
+
const isBeta = regexHasDotAndB.test(version)
|
|
12
|
+
const isDev =
|
|
13
|
+
regexHasDotAndD.test(version) ||
|
|
14
|
+
(!regexHasDot.test(version) && version.length < 8)
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
version,
|
|
18
|
+
isBeta,
|
|
19
|
+
isDev,
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export function useEnvLanguage(): string {
|
|
2
|
-
const { $store }: any = useNuxtApp()
|
|
3
|
-
|
|
4
|
-
let localizationCode = 'en_US'
|
|
5
|
-
const langFromLocalStorage =
|
|
6
|
-
useLocalStorage('lang') || $store.getters['main/getInterfaceLang'] // Из $store для Сферы, но думаю нужно сделать одинаково из localStorage
|
|
7
|
-
if (langFromLocalStorage) {
|
|
8
|
-
if (
|
|
9
|
-
langFromLocalStorage === 'en_US' ||
|
|
10
|
-
langFromLocalStorage === 'ru_RU' ||
|
|
11
|
-
langFromLocalStorage === 'hy_AM'
|
|
12
|
-
) {
|
|
13
|
-
localizationCode = langFromLocalStorage
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
localizationCode = localizationCode.slice(0, 2).toUpperCase()
|
|
18
|
-
|
|
19
|
-
return localizationCode
|
|
20
|
-
}
|
|
1
|
+
export function useEnvLanguage(): string {
|
|
2
|
+
const { $store }: any = useNuxtApp()
|
|
3
|
+
|
|
4
|
+
let localizationCode = 'en_US'
|
|
5
|
+
const langFromLocalStorage =
|
|
6
|
+
useLocalStorage('lang') || $store.getters['main/getInterfaceLang'] // Из $store для Сферы, но думаю нужно сделать одинаково из localStorage
|
|
7
|
+
if (langFromLocalStorage) {
|
|
8
|
+
if (
|
|
9
|
+
langFromLocalStorage === 'en_US' ||
|
|
10
|
+
langFromLocalStorage === 'ru_RU' ||
|
|
11
|
+
langFromLocalStorage === 'hy_AM'
|
|
12
|
+
) {
|
|
13
|
+
localizationCode = langFromLocalStorage
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
localizationCode = localizationCode.slice(0, 2).toUpperCase()
|
|
18
|
+
|
|
19
|
+
return localizationCode
|
|
20
|
+
}
|