bfg-common 1.5.749 → 1.5.752
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/localization/local_be.json +9 -11
- package/assets/localization/local_en.json +9 -11
- package/assets/localization/local_hy.json +9 -11
- package/assets/localization/local_kk.json +9 -11
- package/assets/localization/local_ru.json +9 -11
- package/assets/localization/local_zh.json +9 -11
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/diagramMain/Header.vue +0 -4
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/layout/theHeader/feedback/new/email/Email.vue +2 -2
- package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils.ts +2 -2
- package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
- package/components/common/vm/actions/add/New.vue +12 -10
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/New.vue +1 -1
- package/components/common/vm/actions/common/select/compatibility/New.vue +0 -1
- package/components/common/vm/actions/common/select/storage/new/New.vue +1 -1
- package/components/common/wizards/common/steps/computeResource/New.vue +9 -1
- package/components/common/wizards/network/add/Add.vue +5 -25
- package/components/common/wizards/network/add/lib/config/config.ts +1 -1
- package/components/common/wizards/network/add/lib/config/initialData.ts +3 -5
- package/components/common/wizards/network/add/lib/config/selectConnectionTypeStep.ts +0 -1
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +1 -2
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue +6 -18
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +1 -11
- package/lib/config/regExp.ts +1 -1
- package/package.json +1 -1
- package/plugins/time.ts +58 -58
- package/plugins/validation.ts +6 -6
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script setup lang="ts">
|
|
16
|
-
import {
|
|
16
|
+
import { RegExp } from '~/lib/config/regExp'
|
|
17
17
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
18
18
|
|
|
19
19
|
const emailModelLocal = defineModel<string>({ required: true })
|
|
@@ -23,7 +23,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
23
23
|
const emailErrorText = computed<string>(() => {
|
|
24
24
|
if (!emailModelLocal.value) return ''
|
|
25
25
|
|
|
26
|
-
return
|
|
26
|
+
return RegExp.email.test(emailModelLocal.value)
|
|
27
27
|
? ''
|
|
28
28
|
: localization.value.common.emailErrorText
|
|
29
29
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import {
|
|
2
|
+
import { RegExp } from '~/lib/config/regExp'
|
|
3
3
|
|
|
4
4
|
export const getPasswordMismatchError = (
|
|
5
5
|
localization: UI_I_Localization,
|
|
@@ -16,7 +16,7 @@ export const validateField = (
|
|
|
16
16
|
password: string,
|
|
17
17
|
newPassword: string
|
|
18
18
|
): string => {
|
|
19
|
-
if (!
|
|
19
|
+
if (!RegExp.password.test(newPassword)) {
|
|
20
20
|
return localization.common.currentPasswordIncorrect
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-stack-block
|
|
3
|
-
:has-children="false"
|
|
4
|
-
test-id="backup-window-stack-block"
|
|
5
|
-
>
|
|
6
|
-
<template #stackBlockKey>
|
|
7
|
-
<span>{{ localization.common.backupWindow }}</span>
|
|
8
|
-
</template>
|
|
9
|
-
<template #stackBlockContent>
|
|
10
|
-
<input
|
|
11
|
-
v-model="model.start_window_min"
|
|
12
|
-
data-id="hours-input"
|
|
13
|
-
type="number"
|
|
14
|
-
class="hrs"
|
|
15
|
-
/>
|
|
16
|
-
</template>
|
|
17
|
-
</atoms-stack-block>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script lang="ts" setup>
|
|
21
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
-
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
23
|
-
|
|
24
|
-
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
25
|
-
|
|
26
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<style lang="scss" scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-stack-block
|
|
3
|
+
:has-children="false"
|
|
4
|
+
test-id="backup-window-stack-block"
|
|
5
|
+
>
|
|
6
|
+
<template #stackBlockKey>
|
|
7
|
+
<span>{{ localization.common.backupWindow }}</span>
|
|
8
|
+
</template>
|
|
9
|
+
<template #stackBlockContent>
|
|
10
|
+
<input
|
|
11
|
+
v-model="model.start_window_min"
|
|
12
|
+
data-id="hours-input"
|
|
13
|
+
type="number"
|
|
14
|
+
class="hrs"
|
|
15
|
+
/>
|
|
16
|
+
</template>
|
|
17
|
+
</atoms-stack-block>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts" setup>
|
|
21
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
23
|
+
|
|
24
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
25
|
+
|
|
26
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style lang="scss" scoped></style>
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-stack-block
|
|
3
|
-
:has-children="false"
|
|
4
|
-
test-id="backup-max-bandwidth-stack-block"
|
|
5
|
-
>
|
|
6
|
-
<template #stackBlockKey>
|
|
7
|
-
<span>{{ localization.common.maxBandwidth }}</span>
|
|
8
|
-
</template>
|
|
9
|
-
<template #stackBlockContent>
|
|
10
|
-
<div class="flex-align-center">
|
|
11
|
-
<input
|
|
12
|
-
v-model="maxBindwidthLocal"
|
|
13
|
-
data-id="mbps-input"
|
|
14
|
-
type="number"
|
|
15
|
-
class="mbps"
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
<common-select-input
|
|
19
|
-
v-model="selectedType"
|
|
20
|
-
:data="maxBandwidthOptionsLocal"
|
|
21
|
-
test-id="backup-max-bandwidth-type"
|
|
22
|
-
class="ml-1"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
</atoms-stack-block>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script lang="ts" setup>
|
|
30
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
31
|
-
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
32
|
-
import type { UI_T_BandwidthOption } from '~/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/models/types'
|
|
33
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
34
|
-
import { maxBandwidthOptions } from '~/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options'
|
|
35
|
-
|
|
36
|
-
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
37
|
-
|
|
38
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
39
|
-
const { $binary }: any = useNuxtApp()
|
|
40
|
-
|
|
41
|
-
const maxBandwidthOptionsLocal =
|
|
42
|
-
ref<UI_I_SelectInputItem[]>(maxBandwidthOptions)
|
|
43
|
-
|
|
44
|
-
const maxBindwidthLocal = computed<number>({
|
|
45
|
-
get() {
|
|
46
|
-
return selectedType.value === 1
|
|
47
|
-
? $binary.bToGb(model.value.bandwidth_limit)
|
|
48
|
-
: $binary.bToMb(model.value.bandwidth_limit)
|
|
49
|
-
},
|
|
50
|
-
set(newValue: number) {
|
|
51
|
-
model.value.bandwidth_limit =
|
|
52
|
-
selectedType.value === 1
|
|
53
|
-
? $binary.gbToB(newValue)
|
|
54
|
-
: $binary.mbToB(newValue)
|
|
55
|
-
},
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
const selectedType = ref<UI_T_BandwidthOption>(0)
|
|
59
|
-
watch(selectedType, (newValue) => {
|
|
60
|
-
if (newValue === 1) model.value.bandwidth_limit *= 1_024
|
|
61
|
-
else model.value.bandwidth_limit /= 1_024
|
|
62
|
-
})
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<style lang="scss" scoped>
|
|
66
|
-
#backup-transaction-logs {
|
|
67
|
-
margin: 4px 4px 0 0;
|
|
68
|
-
}
|
|
69
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-stack-block
|
|
3
|
+
:has-children="false"
|
|
4
|
+
test-id="backup-max-bandwidth-stack-block"
|
|
5
|
+
>
|
|
6
|
+
<template #stackBlockKey>
|
|
7
|
+
<span>{{ localization.common.maxBandwidth }}</span>
|
|
8
|
+
</template>
|
|
9
|
+
<template #stackBlockContent>
|
|
10
|
+
<div class="flex-align-center">
|
|
11
|
+
<input
|
|
12
|
+
v-model="maxBindwidthLocal"
|
|
13
|
+
data-id="mbps-input"
|
|
14
|
+
type="number"
|
|
15
|
+
class="mbps"
|
|
16
|
+
/>
|
|
17
|
+
|
|
18
|
+
<common-select-input
|
|
19
|
+
v-model="selectedType"
|
|
20
|
+
:data="maxBandwidthOptionsLocal"
|
|
21
|
+
test-id="backup-max-bandwidth-type"
|
|
22
|
+
class="ml-1"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
</atoms-stack-block>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script lang="ts" setup>
|
|
30
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
31
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
32
|
+
import type { UI_T_BandwidthOption } from '~/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/models/types'
|
|
33
|
+
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
34
|
+
import { maxBandwidthOptions } from '~/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options'
|
|
35
|
+
|
|
36
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
37
|
+
|
|
38
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
39
|
+
const { $binary }: any = useNuxtApp()
|
|
40
|
+
|
|
41
|
+
const maxBandwidthOptionsLocal =
|
|
42
|
+
ref<UI_I_SelectInputItem[]>(maxBandwidthOptions)
|
|
43
|
+
|
|
44
|
+
const maxBindwidthLocal = computed<number>({
|
|
45
|
+
get() {
|
|
46
|
+
return selectedType.value === 1
|
|
47
|
+
? $binary.bToGb(model.value.bandwidth_limit)
|
|
48
|
+
: $binary.bToMb(model.value.bandwidth_limit)
|
|
49
|
+
},
|
|
50
|
+
set(newValue: number) {
|
|
51
|
+
model.value.bandwidth_limit =
|
|
52
|
+
selectedType.value === 1
|
|
53
|
+
? $binary.gbToB(newValue)
|
|
54
|
+
: $binary.mbToB(newValue)
|
|
55
|
+
},
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
const selectedType = ref<UI_T_BandwidthOption>(0)
|
|
59
|
+
watch(selectedType, (newValue) => {
|
|
60
|
+
if (newValue === 1) model.value.bandwidth_limit *= 1_024
|
|
61
|
+
else model.value.bandwidth_limit /= 1_024
|
|
62
|
+
})
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<style lang="scss" scoped>
|
|
66
|
+
#backup-transaction-logs {
|
|
67
|
+
margin: 4px 4px 0 0;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {UI_I_SelectInputItem} from "~/components/common/select/input/lib/models/interfaces";
|
|
2
|
-
|
|
3
|
-
export const maxBandwidthOptions: UI_I_SelectInputItem[] = [
|
|
4
|
-
{ label: 'Mbps', value: 0 },
|
|
5
|
-
{ label: 'Gbps', value: 1 },
|
|
6
|
-
]
|
|
1
|
+
import type {UI_I_SelectInputItem} from "~/components/common/select/input/lib/models/interfaces";
|
|
2
|
+
|
|
3
|
+
export const maxBandwidthOptions: UI_I_SelectInputItem[] = [
|
|
4
|
+
{ label: 'Mbps', value: 0 },
|
|
5
|
+
{ label: 'Gbps', value: 1 },
|
|
6
|
+
]
|
package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-stack-block
|
|
3
|
-
:has-children="false"
|
|
4
|
-
test-id="backup-strategy-stack-block"
|
|
5
|
-
>
|
|
6
|
-
<template #stackBlockKey>
|
|
7
|
-
<span>{{ localization.common.strategy }}</span>
|
|
8
|
-
</template>
|
|
9
|
-
<template #stackBlockContent>
|
|
10
|
-
<common-select-input
|
|
11
|
-
v-model="model.strategy"
|
|
12
|
-
:data="strategyOptions"
|
|
13
|
-
test-id="backup-strategy"
|
|
14
|
-
/>
|
|
15
|
-
</template>
|
|
16
|
-
</atoms-stack-block>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script lang="ts" setup>
|
|
20
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
21
|
-
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
22
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
23
|
-
import { strategyOptionsFunc } from '~/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions'
|
|
24
|
-
|
|
25
|
-
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
26
|
-
|
|
27
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
|
-
|
|
29
|
-
const strategyOptions = ref<UI_I_SelectInputItem[]>(
|
|
30
|
-
strategyOptionsFunc(localization.value)
|
|
31
|
-
)
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<style lang="scss" scoped>
|
|
35
|
-
#backup-transaction-logs {
|
|
36
|
-
margin: 4px 4px 0 0;
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-stack-block
|
|
3
|
+
:has-children="false"
|
|
4
|
+
test-id="backup-strategy-stack-block"
|
|
5
|
+
>
|
|
6
|
+
<template #stackBlockKey>
|
|
7
|
+
<span>{{ localization.common.strategy }}</span>
|
|
8
|
+
</template>
|
|
9
|
+
<template #stackBlockContent>
|
|
10
|
+
<common-select-input
|
|
11
|
+
v-model="model.strategy"
|
|
12
|
+
:data="strategyOptions"
|
|
13
|
+
test-id="backup-strategy"
|
|
14
|
+
/>
|
|
15
|
+
</template>
|
|
16
|
+
</atoms-stack-block>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
21
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
22
|
+
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
23
|
+
import { strategyOptionsFunc } from '~/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions'
|
|
24
|
+
|
|
25
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
26
|
+
|
|
27
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
|
+
|
|
29
|
+
const strategyOptions = ref<UI_I_SelectInputItem[]>(
|
|
30
|
+
strategyOptionsFunc(localization.value)
|
|
31
|
+
)
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style lang="scss" scoped>
|
|
35
|
+
#backup-transaction-logs {
|
|
36
|
+
margin: 4px 4px 0 0;
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface UI_I_DynamicSteps {
|
|
2
|
-
general: number
|
|
3
|
-
disks: number
|
|
4
|
-
datastores: number
|
|
5
|
-
configuration: number
|
|
6
|
-
readyComplete: number
|
|
7
|
-
schedulingOptions: number
|
|
8
|
-
}
|
|
1
|
+
export interface UI_I_DynamicSteps {
|
|
2
|
+
general: number
|
|
3
|
+
disks: number
|
|
4
|
+
datastores: number
|
|
5
|
+
configuration: number
|
|
6
|
+
readyComplete: number
|
|
7
|
+
schedulingOptions: number
|
|
8
|
+
}
|
|
@@ -52,16 +52,18 @@
|
|
|
52
52
|
:sub-title-height="heightName"
|
|
53
53
|
>
|
|
54
54
|
<template #subTitle>
|
|
55
|
-
<div ref="subTitleBlockName"
|
|
56
|
-
<div
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
<div ref="subTitleBlockName">
|
|
56
|
+
<div class="subtitle-block">
|
|
57
|
+
<div
|
|
58
|
+
id="name-alert-wrapper"
|
|
59
|
+
:class="[{ 'mb-4': !isNameAlertWrapperEmpty }]"
|
|
60
|
+
></div>
|
|
61
|
+
<ui-wizard-subtitle
|
|
62
|
+
:sub-title="
|
|
62
63
|
localization.vmWizard.specifyUniqueNameAndTargetLocationForVm
|
|
63
64
|
"
|
|
64
|
-
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
65
67
|
</div>
|
|
66
68
|
</template>
|
|
67
69
|
<template #content>
|
|
@@ -103,7 +105,7 @@
|
|
|
103
105
|
test-id="computed-resource-alert"
|
|
104
106
|
type="error"
|
|
105
107
|
size="md"
|
|
106
|
-
class="subtitle-block__alert"
|
|
108
|
+
class="subtitle-block__alert mb-4"
|
|
107
109
|
/>
|
|
108
110
|
<ui-wizard-subtitle
|
|
109
111
|
:sub-title="
|
|
@@ -237,7 +239,7 @@
|
|
|
237
239
|
:error-validation-fields="props.errorValidationFields"
|
|
238
240
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
239
241
|
/>
|
|
240
|
-
<div class="vm-hardware-version-wrap justify-end flex flex-1 mt-
|
|
242
|
+
<div class="vm-hardware-version-wrap justify-end flex flex-1 mt-6">
|
|
241
243
|
<span class="vm-hardware-version">{{
|
|
242
244
|
props.compatibilityInfo
|
|
243
245
|
}}</span>
|
|
@@ -588,7 +588,7 @@ const onAddDevice = (data: number): void => {
|
|
|
588
588
|
display: flex;
|
|
589
589
|
flex-direction: column;
|
|
590
590
|
gap: 12px;
|
|
591
|
-
padding-bottom:
|
|
591
|
+
padding-bottom: 16px;
|
|
592
592
|
background-color: var(--vm-wizard-block-view-bg-color);
|
|
593
593
|
|
|
594
594
|
.vm-hardware-version-wrap {
|
|
@@ -52,8 +52,16 @@ const onSelectNode = (node: UI_I_TreeNode): void => emits('select-node', node)
|
|
|
52
52
|
<style scoped lang="scss">
|
|
53
53
|
@import 'assets/scss/common/mixins.scss';
|
|
54
54
|
.compute-resource {
|
|
55
|
+
display: grid;
|
|
56
|
+
grid-template-rows: 1fr auto;
|
|
57
|
+
min-height: 100%;
|
|
58
|
+
padding-top: 16px;
|
|
59
|
+
padding-bottom: 16px;
|
|
60
|
+
grid-row-gap: 24px;
|
|
61
|
+
|
|
55
62
|
&__container-tree {
|
|
56
|
-
height: 240px;
|
|
63
|
+
max-height: 240px;
|
|
64
|
+
height: 100%;
|
|
57
65
|
background: var(--input-bg);
|
|
58
66
|
border: 1px solid var(--line-color);
|
|
59
67
|
border-radius: 8px;
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
connectionSettingsInitial,
|
|
147
147
|
portPropertiesInitial,
|
|
148
148
|
ipFourSettingsInitial,
|
|
149
|
-
|
|
149
|
+
targetDeviceInitial,
|
|
150
150
|
addNetworkingZeroOrFirstSchemeDataFunc,
|
|
151
151
|
addNetworkingSecondOrThirdSchemeDataFunc,
|
|
152
152
|
addNetworkingFourthOrFifthSchemeDataFunc,
|
|
@@ -245,19 +245,8 @@ const alertMessages = computed<string[][]>(() => wizard.alertMessages.value)
|
|
|
245
245
|
|
|
246
246
|
const readyCompleteFields = ref<UI_I_ReadyCompleteFields[]>([])
|
|
247
247
|
|
|
248
|
-
const globalPermissions = computed<any>(
|
|
249
|
-
() => $store.getters['globalPermissions/getPermissions']
|
|
250
|
-
)
|
|
251
|
-
|
|
252
248
|
// Step's content data (connectionType)
|
|
253
|
-
const connectionType = ref<string>(
|
|
254
|
-
!globalPermissions.value['Networks.CreateSysx'] &&
|
|
255
|
-
!globalPermissions.value['Networks.CreatePortGroup']
|
|
256
|
-
? '2'
|
|
257
|
-
: !globalPermissions.value['Networks.CreateSysx']
|
|
258
|
-
? '1'
|
|
259
|
-
: '0'
|
|
260
|
-
)
|
|
249
|
+
const connectionType = ref<string>('0')
|
|
261
250
|
|
|
262
251
|
const connectionTypeLocal = computed<string>({
|
|
263
252
|
get() {
|
|
@@ -289,11 +278,7 @@ const onChangeAdapterStatus = (adapterStatusNew: UI_I_AdapterStatus): void => {
|
|
|
289
278
|
}
|
|
290
279
|
|
|
291
280
|
// Step's content data and changers (targetDevice)
|
|
292
|
-
const targetDevice = ref<UI_I_TargetDevice>(
|
|
293
|
-
useDeepCopy(
|
|
294
|
-
targetDeviceInitialFunc(globalPermissions.value['Networks.UpdateSwitch'])
|
|
295
|
-
)
|
|
296
|
-
)
|
|
281
|
+
const targetDevice = ref<UI_I_TargetDevice>(useDeepCopy(targetDeviceInitial))
|
|
297
282
|
const mtuFromSwitch = ref<number>(1500)
|
|
298
283
|
|
|
299
284
|
const onChangeTargetDevice = (newTargetDevice: UI_I_TargetDevice): void => {
|
|
@@ -384,10 +369,7 @@ watch(
|
|
|
384
369
|
? (targetDevice.value.selected = '1')
|
|
385
370
|
: (targetDevice.value.selected = '0')
|
|
386
371
|
newCT === '1' && (targetDevice.value.selected = '1')
|
|
387
|
-
newCT === '2' &&
|
|
388
|
-
(globalPermissions.value['Networks.UpdateSwitch']
|
|
389
|
-
? (targetDevice.value.selected = '2')
|
|
390
|
-
: (targetDevice.value.selected = '3'))
|
|
372
|
+
newCT === '2' && (targetDevice.value.selected = '2')
|
|
391
373
|
}
|
|
392
374
|
if (newCT === '0') {
|
|
393
375
|
;(newTD.selected === '0' || newTD.selected === '1') &&
|
|
@@ -514,9 +496,7 @@ watch(
|
|
|
514
496
|
const reset = (): void => {
|
|
515
497
|
wizard.reset()
|
|
516
498
|
connectionTypeLocal.value = '0'
|
|
517
|
-
targetDevice.value = useDeepCopy(
|
|
518
|
-
targetDeviceInitialFunc(globalPermissions.value['Networks.UpdateSwitch'])
|
|
519
|
-
)
|
|
499
|
+
targetDevice.value = useDeepCopy(targetDeviceInitial)
|
|
520
500
|
connectionSettings.value = useDeepCopy(connectionSettingsInitial)
|
|
521
501
|
portProperties.value = useDeepCopy(portPropertiesInitial)
|
|
522
502
|
ipFourSettings.value = useDeepCopy(ipFourSettingsInitial)
|
|
@@ -22,15 +22,13 @@ export const servicesInitial: UI_I_Services = {
|
|
|
22
22
|
nVMeOverRDMA: false,
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export const
|
|
26
|
-
|
|
27
|
-
): UI_I_TargetDevice => ({
|
|
28
|
-
selected: updateSwitchPermission ? '1' : '3',
|
|
25
|
+
export const targetDeviceInitial: UI_I_TargetDevice = {
|
|
26
|
+
selected: '1',
|
|
29
27
|
network: '',
|
|
30
28
|
switch: '',
|
|
31
29
|
standardSwitch: '',
|
|
32
30
|
mtu: 1500,
|
|
33
|
-
}
|
|
31
|
+
}
|
|
34
32
|
|
|
35
33
|
export const portPropertiesInitial: UI_I_PortProperties = {
|
|
36
34
|
networkLabel: '',
|
package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue
CHANGED
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
|
|
35
35
|
<div
|
|
36
36
|
v-show="props.connectionType === '2'"
|
|
37
|
-
v-permission="'Networks.UpdateSwitch'"
|
|
38
37
|
:class="['radio-block', { selected: fieldsLocal.selected === '2' }]"
|
|
39
38
|
@click="fieldsLocal.selected = '2'"
|
|
40
39
|
>
|
|
@@ -47,8 +46,8 @@
|
|
|
47
46
|
/>
|
|
48
47
|
</div>
|
|
49
48
|
|
|
49
|
+
<!-- v-permission="'Networks.CreateSwitch'" -->
|
|
50
50
|
<div
|
|
51
|
-
v-permission="'Networks.CreateSwitch'"
|
|
52
51
|
:class="['radio-block', { selected: fieldsLocal.selected === '3' }]"
|
|
53
52
|
@click="fieldsLocal.selected = '3'"
|
|
54
53
|
>
|
package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue
CHANGED
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
</div>
|
|
136
136
|
|
|
137
137
|
<div v-show="props.connectionType === '2'">
|
|
138
|
-
<div
|
|
138
|
+
<div class="radio">
|
|
139
139
|
<input
|
|
140
140
|
id="existing-switch"
|
|
141
141
|
v-model="fieldsLocal.selected"
|
|
@@ -149,7 +149,6 @@
|
|
|
149
149
|
</label>
|
|
150
150
|
</div>
|
|
151
151
|
<fieldset
|
|
152
|
-
v-permission="'Networks.UpdateSwitch'"
|
|
153
152
|
:class="{
|
|
154
153
|
disabled: fieldsLocal.selected !== '2',
|
|
155
154
|
}"
|
|
@@ -198,7 +197,8 @@
|
|
|
198
197
|
</div>
|
|
199
198
|
|
|
200
199
|
<div>
|
|
201
|
-
|
|
200
|
+
<!-- v-permission="'Networks.CreateSwitch'"-->
|
|
201
|
+
<div class="radio">
|
|
202
202
|
<input
|
|
203
203
|
id="standard-switch"
|
|
204
204
|
v-model="fieldsLocal.selected"
|
|
@@ -213,7 +213,6 @@
|
|
|
213
213
|
</label>
|
|
214
214
|
</div>
|
|
215
215
|
<fieldset
|
|
216
|
-
v-permission="'Networks.CreateSwitch'"
|
|
217
216
|
:class="{
|
|
218
217
|
disabled: fieldsLocal.selected !== '3',
|
|
219
218
|
}"
|
|
@@ -268,7 +267,9 @@ import type {
|
|
|
268
267
|
UI_I_ArbitraryObject,
|
|
269
268
|
UI_I_Localization,
|
|
270
269
|
} from '~/lib/models/interfaces'
|
|
271
|
-
import type {
|
|
270
|
+
import type {
|
|
271
|
+
UI_I_TargetDevice,
|
|
272
|
+
} from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
272
273
|
|
|
273
274
|
const props = defineProps<{
|
|
274
275
|
fields: UI_I_TargetDevice
|
|
@@ -287,19 +288,6 @@ const emits = defineEmits<{
|
|
|
287
288
|
|
|
288
289
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
289
290
|
|
|
290
|
-
const existingStandardSwitchPermission = computed<string>(() => {
|
|
291
|
-
switch (props.connectionType) {
|
|
292
|
-
case '0':
|
|
293
|
-
return 'Networks.CreateSysx'
|
|
294
|
-
case '1':
|
|
295
|
-
return 'Networks.CreatePortGroup'
|
|
296
|
-
case '2':
|
|
297
|
-
return 'Networks.UpdateSwitch'
|
|
298
|
-
default:
|
|
299
|
-
return ''
|
|
300
|
-
}
|
|
301
|
-
})
|
|
302
|
-
|
|
303
291
|
const fieldsLocal = computed({
|
|
304
292
|
get() {
|
|
305
293
|
return props.fields
|