bfg-common 1.5.869 → 1.5.871
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/assets/img/icons/icons-sprite-dark-5.svg +15 -2
- package/assets/img/icons/icons-sprite-light-5.svg +18 -5
- package/assets/localization/local_be.json +4 -1
- package/assets/localization/local_en.json +7 -4
- package/assets/localization/local_hy.json +4 -1
- package/assets/localization/local_kk.json +4 -1
- package/assets/localization/local_ru.json +10 -7
- package/assets/localization/local_zh.json +4 -1
- package/components/common/adapterManager/AdapterManagerNew.vue +39 -5
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +3 -2
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +3 -3
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonNew.vue +1 -0
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonNew.vue +1 -0
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterNew.vue +10 -4
- package/components/common/adapterManager/ui/secondTitle/SecondTitleNew.vue +15 -0
- package/components/common/adapterManager/ui/table/TableNew.vue +3 -2
- package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +69 -36
- package/components/common/adapterManager/ui/table/header/HeaderNew.vue +5 -1
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +218 -218
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +19 -19
- package/components/common/diagramMain/modals/viewSettings/info/InfoNew.vue +17 -0
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +13 -8
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/lib/config/optionsMetrics.ts +6 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +20 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/New.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Old.vue +3 -2
- package/components/common/wizards/network/add/Add.vue +872 -872
- package/components/common/wizards/network/add/AddNew.vue +483 -476
- package/components/common/wizards/network/add/lib/config/initialData.ts +86 -86
- package/components/common/wizards/network/add/lib/config/selectSwitch.ts +237 -237
- package/components/common/wizards/network/add/lib/utils/utils.ts +9 -9
- package/components/common/wizards/network/add/mappers/mappers.ts +199 -199
- package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettings.vue +89 -84
- package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettingsNew.vue +3 -0
- package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettingsOld.vue +126 -126
- package/components/common/wizards/network/add/steps/createStandardSwitch/CreateStandardSwitch.vue +81 -81
- package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettings.vue +144 -144
- package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsNew.vue +48 -9
- package/components/common/wizards/network/add/steps/portProperties/PortProperties.vue +196 -193
- package/components/common/wizards/network/add/steps/portProperties/PortPropertiesNew.vue +312 -294
- package/components/common/wizards/network/add/steps/readyComplete/ReadyComplete.vue +24 -24
- package/components/common/wizards/network/add/steps/selectConnectionType/SelectConnectionType.vue +34 -34
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDevice.vue +187 -187
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +455 -455
- package/components/common/wizards/network/add/steps/selectTargetDevice/modals/SelectNetwork.vue +63 -63
- package/components/common/wizards/network/add/steps/selectTargetDevice/modals/SelectStandardSwitch.vue +63 -63
- package/components/common/wizards/network/add/steps/selectTargetDevice/modals/SelectSwitch.vue +63 -63
- package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectSwitch.vue +180 -180
- package/components/common/wizards/network/add/validations/common.ts +30 -30
- package/components/common/wizards/network/add/validations/networkValidation.ts +2 -2
- package/components/common/wizards/network/add/validations/portProperties.ts +115 -115
- package/package.json +2 -2
package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettingsOld.vue
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="wizard-content-container add-networking-step">
|
|
3
|
-
<div class="wizard-content wizard-content-port">
|
|
4
|
-
<atoms-alert
|
|
5
|
-
v-if="props.alertMessages.length"
|
|
6
|
-
:items="props.alertMessages"
|
|
7
|
-
status="alert-danger"
|
|
8
|
-
test-id="connection-settings-alert"
|
|
9
|
-
@remove="onHideAlert"
|
|
10
|
-
/>
|
|
11
|
-
<form>
|
|
12
|
-
<div class="horizontal-flex-container">
|
|
13
|
-
<label class="property-label-group" for="network-label">
|
|
14
|
-
{{ localization.common.networkLabel }}
|
|
15
|
-
</label>
|
|
16
|
-
<div class="margin-left-property-value-group">
|
|
17
|
-
<div class="property-value-group">
|
|
18
|
-
<fieldset>
|
|
19
|
-
<atoms-tooltip-error
|
|
20
|
-
:has-error="!!props.messagesFields.name.field"
|
|
21
|
-
>
|
|
22
|
-
<template #elem>
|
|
23
|
-
<input
|
|
24
|
-
id="network-label"
|
|
25
|
-
v-model="fieldsLocal.networkLabel"
|
|
26
|
-
:class="[
|
|
27
|
-
'tooltip-field port-properties-network-label',
|
|
28
|
-
{
|
|
29
|
-
'danger-not-valid': props.messagesFields.name.field,
|
|
30
|
-
},
|
|
31
|
-
]"
|
|
32
|
-
data-id="network-input"
|
|
33
|
-
name="network-label"
|
|
34
|
-
type="text"
|
|
35
|
-
@click.stop
|
|
36
|
-
/>
|
|
37
|
-
</template>
|
|
38
|
-
<template #content>
|
|
39
|
-
{{ props.messagesFields.name.field }}
|
|
40
|
-
</template>
|
|
41
|
-
</atoms-tooltip-error>
|
|
42
|
-
</fieldset>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div class="horizontal-flex-container port-properties-padding">
|
|
48
|
-
<label class="property-label-group">
|
|
49
|
-
{{ localization.common.vlanId }}
|
|
50
|
-
</label>
|
|
51
|
-
<div class="margin-left-property-value-group">
|
|
52
|
-
<div class="property-value-group">
|
|
53
|
-
<fieldset>
|
|
54
|
-
<div class="flex-align-center">
|
|
55
|
-
<atoms-combobox
|
|
56
|
-
v-model.trim="fieldsLocal.vlanId"
|
|
57
|
-
:items="vlanIdSelectDataLocal"
|
|
58
|
-
:class="{
|
|
59
|
-
'danger-not-valid': props.messagesFields.vlan.field,
|
|
60
|
-
}"
|
|
61
|
-
test-id="vlan-id-combobox"
|
|
62
|
-
@click.stop
|
|
63
|
-
/>
|
|
64
|
-
<div
|
|
65
|
-
v-show="props.messagesFields.vlan.field"
|
|
66
|
-
class="flex-align-center"
|
|
67
|
-
>
|
|
68
|
-
<div class="tooltip flex align-middle">
|
|
69
|
-
<atoms-the-icon
|
|
70
|
-
width="24px"
|
|
71
|
-
height="24px"
|
|
72
|
-
class="is-error tooltip-trigger"
|
|
73
|
-
name="info"
|
|
74
|
-
/>
|
|
75
|
-
<div class="tooltip-top-left tooltip-content error">
|
|
76
|
-
{{ props.messagesFields.vlan.field }}
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</fieldset>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
</form>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
</template>
|
|
89
|
-
|
|
90
|
-
<script setup lang="ts">
|
|
91
|
-
import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
92
|
-
import type {
|
|
93
|
-
UI_I_ArbitraryObject,
|
|
94
|
-
UI_I_Localization,
|
|
95
|
-
} from '~/lib/models/interfaces'
|
|
96
|
-
import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
97
|
-
import { vlanIdSelectDataFunc } from '~/components/common/wizards/network/add/lib/config/config'
|
|
98
|
-
|
|
99
|
-
const props = defineProps<{
|
|
100
|
-
fields: UI_I_ConnectionSettings
|
|
101
|
-
alertMessages: string[]
|
|
102
|
-
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
103
|
-
}>()
|
|
104
|
-
|
|
105
|
-
const emits = defineEmits<{
|
|
106
|
-
(event: 'hide-alert', stepId: 5): void
|
|
107
|
-
}>()
|
|
108
|
-
|
|
109
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
110
|
-
const vlanIdSelectDataLocal = computed<UI_I_Localization>(() =>
|
|
111
|
-
vlanIdSelectDataFunc(localization.value)
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
const fieldsLocal = computed({
|
|
115
|
-
get(): UI_I_ConnectionSettings {
|
|
116
|
-
return props.fields
|
|
117
|
-
},
|
|
118
|
-
set(value: UI_I_ConnectionSettings) {
|
|
119
|
-
emits('update:fields', value)
|
|
120
|
-
},
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
const onHideAlert = (): void => {
|
|
124
|
-
emits('hide-alert', 5)
|
|
125
|
-
}
|
|
126
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wizard-content-container add-networking-step">
|
|
3
|
+
<div class="wizard-content wizard-content-port">
|
|
4
|
+
<atoms-alert
|
|
5
|
+
v-if="props.alertMessages.length"
|
|
6
|
+
:items="props.alertMessages"
|
|
7
|
+
status="alert-danger"
|
|
8
|
+
test-id="connection-settings-alert"
|
|
9
|
+
@remove="onHideAlert"
|
|
10
|
+
/>
|
|
11
|
+
<form>
|
|
12
|
+
<div class="horizontal-flex-container">
|
|
13
|
+
<label class="property-label-group" for="network-label">
|
|
14
|
+
{{ localization.common.networkLabel }}
|
|
15
|
+
</label>
|
|
16
|
+
<div class="margin-left-property-value-group">
|
|
17
|
+
<div class="property-value-group">
|
|
18
|
+
<fieldset>
|
|
19
|
+
<atoms-tooltip-error
|
|
20
|
+
:has-error="!!props.messagesFields.name.field"
|
|
21
|
+
>
|
|
22
|
+
<template #elem>
|
|
23
|
+
<input
|
|
24
|
+
id="network-label"
|
|
25
|
+
v-model="fieldsLocal.networkLabel"
|
|
26
|
+
:class="[
|
|
27
|
+
'tooltip-field port-properties-network-label',
|
|
28
|
+
{
|
|
29
|
+
'danger-not-valid': props.messagesFields.name.field,
|
|
30
|
+
},
|
|
31
|
+
]"
|
|
32
|
+
data-id="network-input"
|
|
33
|
+
name="network-label"
|
|
34
|
+
type="text"
|
|
35
|
+
@click.stop
|
|
36
|
+
/>
|
|
37
|
+
</template>
|
|
38
|
+
<template #content>
|
|
39
|
+
{{ props.messagesFields.name.field }}
|
|
40
|
+
</template>
|
|
41
|
+
</atoms-tooltip-error>
|
|
42
|
+
</fieldset>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="horizontal-flex-container port-properties-padding">
|
|
48
|
+
<label class="property-label-group">
|
|
49
|
+
{{ localization.common.vlanId }}
|
|
50
|
+
</label>
|
|
51
|
+
<div class="margin-left-property-value-group">
|
|
52
|
+
<div class="property-value-group">
|
|
53
|
+
<fieldset>
|
|
54
|
+
<div class="flex-align-center">
|
|
55
|
+
<atoms-combobox
|
|
56
|
+
v-model.trim="fieldsLocal.vlanId"
|
|
57
|
+
:items="vlanIdSelectDataLocal"
|
|
58
|
+
:class="{
|
|
59
|
+
'danger-not-valid': props.messagesFields.vlan.field,
|
|
60
|
+
}"
|
|
61
|
+
test-id="vlan-id-combobox"
|
|
62
|
+
@click.stop
|
|
63
|
+
/>
|
|
64
|
+
<div
|
|
65
|
+
v-show="props.messagesFields.vlan.field"
|
|
66
|
+
class="flex-align-center"
|
|
67
|
+
>
|
|
68
|
+
<div class="tooltip flex align-middle">
|
|
69
|
+
<atoms-the-icon
|
|
70
|
+
width="24px"
|
|
71
|
+
height="24px"
|
|
72
|
+
class="is-error tooltip-trigger"
|
|
73
|
+
name="info"
|
|
74
|
+
/>
|
|
75
|
+
<div class="tooltip-top-left tooltip-content error">
|
|
76
|
+
{{ props.messagesFields.vlan.field }}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</fieldset>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</form>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<script setup lang="ts">
|
|
91
|
+
import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
92
|
+
import type {
|
|
93
|
+
UI_I_ArbitraryObject,
|
|
94
|
+
UI_I_Localization,
|
|
95
|
+
} from '~/lib/models/interfaces'
|
|
96
|
+
import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
97
|
+
import { vlanIdSelectDataFunc } from '~/components/common/wizards/network/add/lib/config/config'
|
|
98
|
+
|
|
99
|
+
const props = defineProps<{
|
|
100
|
+
fields: UI_I_ConnectionSettings
|
|
101
|
+
alertMessages: string[]
|
|
102
|
+
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
103
|
+
}>()
|
|
104
|
+
|
|
105
|
+
const emits = defineEmits<{
|
|
106
|
+
(event: 'hide-alert', stepId: 5): void
|
|
107
|
+
}>()
|
|
108
|
+
|
|
109
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
110
|
+
const vlanIdSelectDataLocal = computed<UI_I_Localization>(() =>
|
|
111
|
+
vlanIdSelectDataFunc(localization.value)
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
const fieldsLocal = computed({
|
|
115
|
+
get(): UI_I_ConnectionSettings {
|
|
116
|
+
return props.fields
|
|
117
|
+
},
|
|
118
|
+
set(value: UI_I_ConnectionSettings) {
|
|
119
|
+
emits('update:fields', value)
|
|
120
|
+
},
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
const onHideAlert = (): void => {
|
|
124
|
+
emits('hide-alert', 5)
|
|
125
|
+
}
|
|
126
|
+
</script>
|
package/components/common/wizards/network/add/steps/createStandardSwitch/CreateStandardSwitch.vue
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="currentComponent"
|
|
4
|
-
:adapters="props.adapters"
|
|
5
|
-
:free-adapters="props.freeAdapters"
|
|
6
|
-
:added-adapters="props.addedAdapters"
|
|
7
|
-
:core-adapters="props.coreAdapters"
|
|
8
|
-
:adapter-status="props.adapterStatus"
|
|
9
|
-
:is-dark-mode="props.isDarkMode"
|
|
10
|
-
test-id="adapter-manager"
|
|
11
|
-
is-active
|
|
12
|
-
full-mode
|
|
13
|
-
:is-show-no-active-adapters-modal="props.isShowNoActiveAdaptersModal"
|
|
14
|
-
:is-show-no-connected-active-adapters-modal="
|
|
15
|
-
props.isShowNoConnectedActiveAdaptersModal
|
|
16
|
-
"
|
|
17
|
-
@hide-no-active-adapters-modal="onHideNoActiveAdaptersModal"
|
|
18
|
-
@hide-no-connected-active-adapters-modal="
|
|
19
|
-
onHideNoConnectedActiveAdaptersModal
|
|
20
|
-
"
|
|
21
|
-
@submit-from-modal="onConfirmNoActiveAdaptersModal"
|
|
22
|
-
@change-added-adapters="onChangeAddedAdapters"
|
|
23
|
-
@change-adapter-status="onChangeAdapterStatus"
|
|
24
|
-
@get-free-adapters="onGetFreeAdapters"
|
|
25
|
-
/>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script setup lang="ts">
|
|
29
|
-
import type { UI_I_ItemsWithTotalCounts } from '~/lib/models/interfaces'
|
|
30
|
-
import type {
|
|
31
|
-
UI_I_Adapter,
|
|
32
|
-
UI_I_AdapterStatus,
|
|
33
|
-
UI_I_SwitchAdapterItem,
|
|
34
|
-
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
35
|
-
|
|
36
|
-
const props = defineProps<{
|
|
37
|
-
addedAdapters: string[]
|
|
38
|
-
freeAdapters: UI_I_Adapter[]
|
|
39
|
-
adapterStatus: UI_I_AdapterStatus
|
|
40
|
-
adapters: UI_I_ItemsWithTotalCounts<UI_I_SwitchAdapterItem>
|
|
41
|
-
coreAdapters: string[]
|
|
42
|
-
isShowNoConnectedActiveAdaptersModal: boolean
|
|
43
|
-
isShowNoActiveAdaptersModal: boolean
|
|
44
|
-
isDarkMode: boolean
|
|
45
|
-
}>()
|
|
46
|
-
|
|
47
|
-
const emits = defineEmits<{
|
|
48
|
-
(event: 'get-free-adapters', showModal: () => void): void
|
|
49
|
-
(event: 'change-added-adapters', addedAdapters: string[]): void
|
|
50
|
-
(event: 'change-adapter-status', adapterStatus: UI_I_AdapterStatus): void
|
|
51
|
-
(event: 'confirm-no-active-adapters-modal'): void
|
|
52
|
-
(event: 'hide-no-connected-active-adapters-modal'): void
|
|
53
|
-
(event: 'hide-no-active-adapters-modal'): void
|
|
54
|
-
}>()
|
|
55
|
-
|
|
56
|
-
const { $store }: any = useNuxtApp()
|
|
57
|
-
|
|
58
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
59
|
-
|
|
60
|
-
const currentComponent = computed(() =>
|
|
61
|
-
isNewView.value
|
|
62
|
-
? defineAsyncComponent(() => import('./CreateStandardSwitchNew.vue'))
|
|
63
|
-
: defineAsyncComponent(() => import('./CreateStandardSwitchOld.vue'))
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
const onGetFreeAdapters = (showModal: () => void): void =>
|
|
67
|
-
emits('get-free-adapters', showModal)
|
|
68
|
-
|
|
69
|
-
const onChangeAddedAdapters = (addedAdapters: string[]): void =>
|
|
70
|
-
emits('change-added-adapters', addedAdapters)
|
|
71
|
-
|
|
72
|
-
const onChangeAdapterStatus = (adapterStatus: UI_I_AdapterStatus): void =>
|
|
73
|
-
emits('change-adapter-status', adapterStatus)
|
|
74
|
-
|
|
75
|
-
const onConfirmNoActiveAdaptersModal = (): void =>
|
|
76
|
-
emits('confirm-no-active-adapters-modal')
|
|
77
|
-
const onHideNoConnectedActiveAdaptersModal = (): void =>
|
|
78
|
-
emits('hide-no-connected-active-adapters-modal')
|
|
79
|
-
const onHideNoActiveAdaptersModal = (): void =>
|
|
80
|
-
emits('hide-no-active-adapters-modal')
|
|
81
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
:adapters="props.adapters"
|
|
5
|
+
:free-adapters="props.freeAdapters"
|
|
6
|
+
:added-adapters="props.addedAdapters"
|
|
7
|
+
:core-adapters="props.coreAdapters"
|
|
8
|
+
:adapter-status="props.adapterStatus"
|
|
9
|
+
:is-dark-mode="props.isDarkMode"
|
|
10
|
+
test-id="adapter-manager"
|
|
11
|
+
is-active
|
|
12
|
+
full-mode
|
|
13
|
+
:is-show-no-active-adapters-modal="props.isShowNoActiveAdaptersModal"
|
|
14
|
+
:is-show-no-connected-active-adapters-modal="
|
|
15
|
+
props.isShowNoConnectedActiveAdaptersModal
|
|
16
|
+
"
|
|
17
|
+
@hide-no-active-adapters-modal="onHideNoActiveAdaptersModal"
|
|
18
|
+
@hide-no-connected-active-adapters-modal="
|
|
19
|
+
onHideNoConnectedActiveAdaptersModal
|
|
20
|
+
"
|
|
21
|
+
@submit-from-modal="onConfirmNoActiveAdaptersModal"
|
|
22
|
+
@change-added-adapters="onChangeAddedAdapters"
|
|
23
|
+
@change-adapter-status="onChangeAdapterStatus"
|
|
24
|
+
@get-free-adapters="onGetFreeAdapters"
|
|
25
|
+
/>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import type { UI_I_ItemsWithTotalCounts } from '~/lib/models/interfaces'
|
|
30
|
+
import type {
|
|
31
|
+
UI_I_Adapter,
|
|
32
|
+
UI_I_AdapterStatus,
|
|
33
|
+
UI_I_SwitchAdapterItem,
|
|
34
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
35
|
+
|
|
36
|
+
const props = defineProps<{
|
|
37
|
+
addedAdapters: string[]
|
|
38
|
+
freeAdapters: UI_I_Adapter[]
|
|
39
|
+
adapterStatus: UI_I_AdapterStatus
|
|
40
|
+
adapters: UI_I_ItemsWithTotalCounts<UI_I_SwitchAdapterItem>
|
|
41
|
+
coreAdapters: string[]
|
|
42
|
+
isShowNoConnectedActiveAdaptersModal: boolean
|
|
43
|
+
isShowNoActiveAdaptersModal: boolean
|
|
44
|
+
isDarkMode: boolean
|
|
45
|
+
}>()
|
|
46
|
+
|
|
47
|
+
const emits = defineEmits<{
|
|
48
|
+
(event: 'get-free-adapters', showModal: () => void): void
|
|
49
|
+
(event: 'change-added-adapters', addedAdapters: string[]): void
|
|
50
|
+
(event: 'change-adapter-status', adapterStatus: UI_I_AdapterStatus): void
|
|
51
|
+
(event: 'confirm-no-active-adapters-modal'): void
|
|
52
|
+
(event: 'hide-no-connected-active-adapters-modal'): void
|
|
53
|
+
(event: 'hide-no-active-adapters-modal'): void
|
|
54
|
+
}>()
|
|
55
|
+
|
|
56
|
+
const { $store }: any = useNuxtApp()
|
|
57
|
+
|
|
58
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
59
|
+
|
|
60
|
+
const currentComponent = computed(() =>
|
|
61
|
+
isNewView.value
|
|
62
|
+
? defineAsyncComponent(() => import('./CreateStandardSwitchNew.vue'))
|
|
63
|
+
: defineAsyncComponent(() => import('./CreateStandardSwitchOld.vue'))
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
const onGetFreeAdapters = (showModal: () => void): void =>
|
|
67
|
+
emits('get-free-adapters', showModal)
|
|
68
|
+
|
|
69
|
+
const onChangeAddedAdapters = (addedAdapters: string[]): void =>
|
|
70
|
+
emits('change-added-adapters', addedAdapters)
|
|
71
|
+
|
|
72
|
+
const onChangeAdapterStatus = (adapterStatus: UI_I_AdapterStatus): void =>
|
|
73
|
+
emits('change-adapter-status', adapterStatus)
|
|
74
|
+
|
|
75
|
+
const onConfirmNoActiveAdaptersModal = (): void =>
|
|
76
|
+
emits('confirm-no-active-adapters-modal')
|
|
77
|
+
const onHideNoConnectedActiveAdaptersModal = (): void =>
|
|
78
|
+
emits('hide-no-connected-active-adapters-modal')
|
|
79
|
+
const onHideNoActiveAdaptersModal = (): void =>
|
|
80
|
+
emits('hide-no-active-adapters-modal')
|
|
81
|
+
</script>
|