bfg-common 1.5.217 → 1.5.218
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/backup/lib/utils/getBackupOrBackupStorageId.ts +29 -0
- package/components/common/backup/storage/actions/add/Add.vue +51 -0
- package/components/common/backup/storage/actions/add/temp/Add.vue +527 -0
- package/components/common/backup/storage/actions/add/temp/lib/config/stepItems.ts +236 -0
- package/components/common/backup/storage/actions/add/temp/lib/models/interfaces.ts +58 -0
- package/components/common/backup/storage/actions/add/temp/lib/models/types.ts +14 -0
- package/components/common/backup/storage/actions/add/temp/lib/utils.ts +71 -0
- package/components/common/backup/storage/actions/add/temp/local/Local.vue +83 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/Accessibility.vue +104 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/lib/config/tabsPannel.ts +25 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/lib/models/interfaces.ts +9 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/lib/models/types.ts +5 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/TablesView.vue +141 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/compatibleTable.ts +62 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/hostsTableItems.ts +27 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/tableKeys.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/local/createName/CreateName.vue +160 -0
- package/components/common/backup/storage/actions/add/temp/local/createName/lib/config/defaultForm.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/nfs/Nfs.vue +106 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/Accessibility.vue +104 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/config/tabsPannel.ts +25 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/interfaces.ts +9 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/types.ts +5 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/TablesView.vue +141 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +27 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/tableKeys.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/Configuration.vue +469 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/lib/config/defaultForm.ts +51 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/lib/models/interfaces.ts +14 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/DeletePopover.vue +99 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/ServersList.vue +125 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/config/serversListConfig.ts +40 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/config/tableKeys.ts +3 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/models/interfaces.ts +13 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/models/types.ts +1 -0
- package/components/common/backup/storage/actions/add/temp/nfs/kerberosAuthentication/KerberosAuthentication.vue +55 -0
- package/components/common/backup/storage/actions/add/temp/nfs/kerberosAuthentication/lib/config/radioOptions.ts +27 -0
- package/components/common/backup/storage/actions/add/temp/nfs/version/Version.vue +42 -0
- package/components/common/backup/storage/actions/add/temp/nfs/version/lib/config/versionOptions.ts +22 -0
- package/components/common/backup/storage/actions/add/temp/readyComplete/ReadyComplete.vue +85 -0
- package/components/common/backup/storage/actions/add/temp/readyComplete/lib/config/propertiesDetails.ts +165 -0
- package/components/common/backup/storage/actions/add/temp/readyComplete/lib/models/interfaces.ts +4 -0
- package/components/common/backup/storage/actions/add/temp/samba/Samba.vue +95 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/Accessibility.vue +104 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/lib/config/tabsPannel.ts +25 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/lib/models/interfaces.ts +9 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/lib/models/types.ts +5 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/TablesView.vue +141 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/compatibleTable.ts +62 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/tableKeys.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/Configuration.vue +470 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/lib/config/defaultForm.ts +51 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/lib/models/interfaces.ts +14 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/DeletePopover.vue +99 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/ServersList.vue +124 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/config/serversListConfig.ts +40 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/config/tableKeys.ts +3 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/models/interfaces.ts +13 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/models/types.ts +1 -0
- package/components/common/backup/storage/actions/add/temp/samba/kerberosAuthentication/KerberosAuthentication.vue +55 -0
- package/components/common/backup/storage/actions/add/temp/samba/kerberosAuthentication/lib/config/radioOptions.ts +27 -0
- package/components/common/backup/storage/actions/add/temp/sharedStorm/SharedStorm.vue +106 -0
- package/components/common/backup/storage/actions/add/temp/sharedStorm/storage/Storage.vue +71 -0
- package/components/common/backup/storage/actions/add/temp/sharedStorm/storage/lib/config/defaultForm.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/types/Types.vue +79 -0
- package/components/common/backup/storage/actions/add/temp/types/lib/config/typeOptions.ts +62 -0
- package/components/common/backup/storage/actions/delete/Delete.vue +65 -0
- package/components/common/backup/storage/actions/delete/lib/models/interfaces.ts +5 -0
- 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/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
- package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
- package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +3 -3
- package/components/common/selectLanguage/lib/config/config.ts +6 -6
- package/package.json +2 -2
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="servers-list">
|
|
3
|
+
<atoms-table-data-grid
|
|
4
|
+
v-model:selected-row="selectedDisk"
|
|
5
|
+
v-model:page-size="pagination.pageSize"
|
|
6
|
+
v-model:page="pagination.page"
|
|
7
|
+
type="any"
|
|
8
|
+
class="data-table"
|
|
9
|
+
test-id="servers-list-table"
|
|
10
|
+
:head-items="headItems"
|
|
11
|
+
:body-items="bodyItems"
|
|
12
|
+
:total-items="1"
|
|
13
|
+
:total-pages="1"
|
|
14
|
+
off-select-by-row
|
|
15
|
+
:loading="loading"
|
|
16
|
+
hide-footer
|
|
17
|
+
>
|
|
18
|
+
<template #type="{ item }">
|
|
19
|
+
<div class="data-table__action-icon">
|
|
20
|
+
<atoms-popover
|
|
21
|
+
test-id="servers-list"
|
|
22
|
+
@click="onShowTooltipForRemove(item)"
|
|
23
|
+
>
|
|
24
|
+
<template #elem>
|
|
25
|
+
<atoms-the-icon name="ellipsis-vertical" />
|
|
26
|
+
</template>
|
|
27
|
+
<template #content>
|
|
28
|
+
<common-backup-storage-actions-add-temp-samba-configuration-servers-list-delete-popover
|
|
29
|
+
v-if="showTooltip && item[0].id === selectedServerForRemove"
|
|
30
|
+
class="data-table__popover"
|
|
31
|
+
@hide="showTooltip = false"
|
|
32
|
+
@click-item="onRemoveServerFromList(item)"
|
|
33
|
+
/>
|
|
34
|
+
</template>
|
|
35
|
+
</atoms-popover>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
</atoms-table-data-grid>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script lang="ts" setup>
|
|
43
|
+
import type {
|
|
44
|
+
UI_I_HeadItem,
|
|
45
|
+
UI_I_BodyItem,
|
|
46
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
47
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
48
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
49
|
+
import type { UI_I_DataServersListItem } from '~/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/models/interfaces'
|
|
50
|
+
import * as serversTable from '~/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/config/serversListConfig'
|
|
51
|
+
|
|
52
|
+
const props = defineProps<{
|
|
53
|
+
dataTable: UI_I_DataServersListItem[] | []
|
|
54
|
+
loading?: boolean
|
|
55
|
+
}>()
|
|
56
|
+
const emits = defineEmits<{
|
|
57
|
+
(event: 'update:data-table', value: UI_I_DataServersListItem[]): void
|
|
58
|
+
}>()
|
|
59
|
+
|
|
60
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
61
|
+
|
|
62
|
+
const selectedDisk = ref<number | null>(null)
|
|
63
|
+
|
|
64
|
+
const pagination = ref<UI_I_Pagination>({
|
|
65
|
+
page: 1,
|
|
66
|
+
pageSize: 34,
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
// const columnKeys = ref<UI_I_ColumnKey[]>(serversTable.columnKeys(localization.value))
|
|
70
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
71
|
+
serversTable.headItems(localization.value)
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
const bodyItems = ref<UI_I_BodyItem[][]>([])
|
|
75
|
+
watch(
|
|
76
|
+
() => props.dataTable,
|
|
77
|
+
(newValue) => {
|
|
78
|
+
if (!newValue?.length) {
|
|
79
|
+
bodyItems.value = []
|
|
80
|
+
return
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
bodyItems.value = serversTable.bodyItems(newValue)
|
|
84
|
+
},
|
|
85
|
+
{ deep: true, immediate: true }
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
const selectedServerForRemove = ref<number | null>(null)
|
|
89
|
+
const showTooltip = ref<boolean>(false)
|
|
90
|
+
const onShowTooltipForRemove = (server: UI_I_BodyItem[]): void => {
|
|
91
|
+
selectedServerForRemove.value = server[0].id
|
|
92
|
+
showTooltip.value = true
|
|
93
|
+
}
|
|
94
|
+
const onRemoveServerFromList = (removeItem: UI_I_BodyItem[]): void => {
|
|
95
|
+
const { text } = removeItem[0]
|
|
96
|
+
|
|
97
|
+
const serverList = props.dataTable.filter(
|
|
98
|
+
(server: UI_I_DataServersListItem) => server.server_name !== text
|
|
99
|
+
)
|
|
100
|
+
emits('update:data-table', serverList)
|
|
101
|
+
showTooltip.value = false
|
|
102
|
+
}
|
|
103
|
+
</script>
|
|
104
|
+
|
|
105
|
+
<style lang="scss" scoped>
|
|
106
|
+
.servers-list {
|
|
107
|
+
height: inherit;
|
|
108
|
+
.data-table {
|
|
109
|
+
&__action-icon {
|
|
110
|
+
width: 16px;
|
|
111
|
+
height: 16px;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
position: relative;
|
|
114
|
+
fill: var(--ellipsis-vertical-icon-color);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
height: inherit;
|
|
118
|
+
:deep(.datagrid-outer-wrapper) {
|
|
119
|
+
height: inherit;
|
|
120
|
+
padding-top: 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_HeadItem,
|
|
3
|
+
UI_I_BodyItem,
|
|
4
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
5
|
+
import {
|
|
6
|
+
constructHeadItem,
|
|
7
|
+
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
8
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
9
|
+
import { serversTableItemsKeys } from '~/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/config/tableKeys'
|
|
10
|
+
|
|
11
|
+
const getItems = (
|
|
12
|
+
localization: UI_I_Localization
|
|
13
|
+
): [string, boolean, string, string][] => {
|
|
14
|
+
return [
|
|
15
|
+
[localization.common.serversToBeAdded, true, '96px', serversTableItemsKeys[0]],
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
20
|
+
const result: UI_I_HeadItem[] = []
|
|
21
|
+
getItems(localization).forEach((item) => {
|
|
22
|
+
const col = 'type'
|
|
23
|
+
result.push(constructHeadItem(col, item[0], item[3], false, item[2]))
|
|
24
|
+
})
|
|
25
|
+
return result
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
|
|
29
|
+
const bodyItems: UI_I_BodyItem[][] = []
|
|
30
|
+
data.forEach((server, key) => {
|
|
31
|
+
bodyItems.push([
|
|
32
|
+
{
|
|
33
|
+
key: 'col0',
|
|
34
|
+
text: server[serversTableItemsKeys[0]],
|
|
35
|
+
id: key,
|
|
36
|
+
},
|
|
37
|
+
])
|
|
38
|
+
})
|
|
39
|
+
return bodyItems
|
|
40
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { UI_I_Validation } from '~/lib/models/plugins/validation/interfaces'
|
|
2
|
+
|
|
3
|
+
export interface UI_I_FormValidationConfiguration {
|
|
4
|
+
name: UI_I_Validation
|
|
5
|
+
folder: UI_I_Validation
|
|
6
|
+
server: UI_I_Validation
|
|
7
|
+
username: UI_I_Validation
|
|
8
|
+
password: UI_I_Validation
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface UI_I_DataServersListItem {
|
|
12
|
+
server_name: string
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type T_ServersTableItemsTuple = ['server_name']
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="kerberos-auth">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="isShowAlert"
|
|
5
|
+
test-id="kerberos-authentication"
|
|
6
|
+
status="alert-warning"
|
|
7
|
+
:items="[localization.common.kerberosAuthenticationAlert]"
|
|
8
|
+
@remove="isShowAlert = false"
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<div class="kerberos-auth__inner">
|
|
12
|
+
<div v-for="item in kerberosTypes" :key="item.value" class="radio">
|
|
13
|
+
<input
|
|
14
|
+
:id="item.label"
|
|
15
|
+
v-model="kerberosType"
|
|
16
|
+
:data-id="item.testId"
|
|
17
|
+
type="radio"
|
|
18
|
+
:value="item.value"
|
|
19
|
+
/>
|
|
20
|
+
<label :for="item.label">
|
|
21
|
+
{{ item.label }}
|
|
22
|
+
</label>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script lang="ts" setup>
|
|
29
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
30
|
+
import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
31
|
+
import type { UI_T_KerberosAuthentication } from '~/components/common/backup/storage/actions/add/temp/lib/models/types'
|
|
32
|
+
import { kerberosOptionsFunc } from '~/components/common/backup/storage/actions/add/temp/samba/kerberosAuthentication/lib/config/radioOptions'
|
|
33
|
+
|
|
34
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
35
|
+
|
|
36
|
+
const kerberosType = ref<UI_T_KerberosAuthentication>('dont-use')
|
|
37
|
+
const isShowAlert = ref<boolean>(true)
|
|
38
|
+
|
|
39
|
+
const kerberosTypes = readonly<UI_I_RadioOption[]>(
|
|
40
|
+
kerberosOptionsFunc(localization.value)
|
|
41
|
+
)
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style lang="scss" scoped>
|
|
45
|
+
.kerberos-auth {
|
|
46
|
+
&__inner {
|
|
47
|
+
margin-top: 12px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
input[type='radio']:focus:checked + label::before,
|
|
52
|
+
input[type='radio']:focus + label::before {
|
|
53
|
+
box-shadow: inset 0 0 0 0.25rem #0094d2;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
3
|
+
|
|
4
|
+
export const kerberosOptionsFunc = (
|
|
5
|
+
localization: UI_I_Localization
|
|
6
|
+
): UI_I_RadioOption[] => {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
label: localization.common.dontUseKerberosAuthentication,
|
|
10
|
+
value: 'dont-use',
|
|
11
|
+
disabled: false,
|
|
12
|
+
testId: 'dont-use-value',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: localization.common.useKerberosAuthenticationKrb5,
|
|
16
|
+
value: 'use-only-krb5',
|
|
17
|
+
disabled: false,
|
|
18
|
+
testId: 'use-only-krb5-value',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: localization.common.useKerberosAuthenticationIntegrity,
|
|
22
|
+
value: 'use-integrity',
|
|
23
|
+
disabled: false,
|
|
24
|
+
testId: 'use-integrity-value',
|
|
25
|
+
},
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="shared-storm-step h-full">
|
|
3
|
+
<!-- TODO move to common-->
|
|
4
|
+
<!-- <common-backup-storage-actions-add-temp-local-create-name-->
|
|
5
|
+
<!-- v-show="props.stepPosition === 1"-->
|
|
6
|
+
<!-- :local-create-name-submit="props.createNameSubmit"-->
|
|
7
|
+
<!-- test-id="shared-storm"-->
|
|
8
|
+
<!-- @loading="(e) => emits('loading', e)"-->
|
|
9
|
+
<!-- @submit="onChangeName"-->
|
|
10
|
+
<!-- />-->
|
|
11
|
+
<common-backup-storage-actions-add-temp-local-create-name
|
|
12
|
+
v-show="props.stepPosition === 1"
|
|
13
|
+
:mode="props.mode"
|
|
14
|
+
:local-create-name-submit="props.createNameSubmit"
|
|
15
|
+
test-id="shared-storm"
|
|
16
|
+
@loading="(e) => emits('loading', e)"
|
|
17
|
+
@submit="onChangeName($event)"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<common-backup-storage-actions-add-temp-shared-storm-storage
|
|
21
|
+
v-show="props.stepPosition === 2"
|
|
22
|
+
:storage="storage"
|
|
23
|
+
:datastore="datastore"
|
|
24
|
+
:get-datastore-table-func="getDatastoreTableFunc"
|
|
25
|
+
:storage-submit="storageSubmitLocal"
|
|
26
|
+
@change="onChangeStorage"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<templates-inventory-actions-backup-storage-add-temp-nfs-accessibility
|
|
30
|
+
v-if="mode === 'sphere' && props.stepPosition === 3"
|
|
31
|
+
:host-accessibility-submit="props.hostAccessibilitySubmit"
|
|
32
|
+
:hosts="props.hosts"
|
|
33
|
+
@next="onChangeAccessibilityAndNext"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script lang="ts" setup>
|
|
39
|
+
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
40
|
+
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
41
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
42
|
+
import type { I_SharedStormData } from '~/components/common/backup/storage/actions/add/temp/lib/models/interfaces'
|
|
43
|
+
|
|
44
|
+
const props = defineProps<{
|
|
45
|
+
mode: UI_T_Project
|
|
46
|
+
hosts: any
|
|
47
|
+
stepPosition: number
|
|
48
|
+
createNameSubmit: number
|
|
49
|
+
storageSubmit: number
|
|
50
|
+
hostAccessibilitySubmit: number
|
|
51
|
+
datastore: UI_I_DatastoreTableItem[]
|
|
52
|
+
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
53
|
+
}>()
|
|
54
|
+
const emits = defineEmits<{
|
|
55
|
+
(event: 'loading', value: boolean): void
|
|
56
|
+
(event: 'submit', value: I_SharedStormData): void
|
|
57
|
+
}>()
|
|
58
|
+
|
|
59
|
+
// const { $store }: any = useNuxtApp()
|
|
60
|
+
|
|
61
|
+
const storage = ref<UI_I_DatastoreTableItem | null>(null)
|
|
62
|
+
const onChangeStorage = (data: UI_I_DatastoreTableItem | null): void => {
|
|
63
|
+
storage.value = data
|
|
64
|
+
}
|
|
65
|
+
// const datastore = computed<UI_I_DatastoreTableItem[]>(
|
|
66
|
+
// () => $store.getters['storage/getDatastoreTable'] || []
|
|
67
|
+
// )
|
|
68
|
+
// const getDatastoreTableFunc = async (
|
|
69
|
+
// payload: UI_I_TablePayload
|
|
70
|
+
// ): Promise<void> => {
|
|
71
|
+
// await $store.dispatch('storage/A_GET_DATASTORE_TABLE', payload)
|
|
72
|
+
// }
|
|
73
|
+
|
|
74
|
+
const sendData: any = {
|
|
75
|
+
name: '',
|
|
76
|
+
storm_id: '',
|
|
77
|
+
storm_name: '',
|
|
78
|
+
hosts: []
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const onChangeName = (name: string): void => {
|
|
82
|
+
sendData.name = name
|
|
83
|
+
emits('submit', sendData)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const storageSubmitLocal = ref<Function | null>(null)
|
|
87
|
+
watch(
|
|
88
|
+
() => props.storageSubmit,
|
|
89
|
+
() => {
|
|
90
|
+
storageSubmitLocal.value = (isValid: boolean): void => {
|
|
91
|
+
if (isValid) {
|
|
92
|
+
sendData.storm_id = storage.value?.id
|
|
93
|
+
sendData.storm_name = storage.value?.name
|
|
94
|
+
emits('submit', sendData)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
const onChangeAccessibilityAndNext = (hosts: string[]): void => {
|
|
101
|
+
sendData.hosts = hosts
|
|
102
|
+
emits('submit', sendData)
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<common-vm-actions-common-select-storage
|
|
3
|
+
:storage-submit="props.storageSubmit"
|
|
4
|
+
:datastore="props.datastore"
|
|
5
|
+
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
6
|
+
hide-compatibility
|
|
7
|
+
class="storage-datatable h-full"
|
|
8
|
+
@submit="onChangeStorage"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
14
|
+
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
15
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
16
|
+
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
17
|
+
|
|
18
|
+
const props = defineProps<{
|
|
19
|
+
storageSubmit: Function | null
|
|
20
|
+
storage: UI_I_DatastoreTableItem | null
|
|
21
|
+
datastore: UI_I_DatastoreTableItem[]
|
|
22
|
+
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
23
|
+
}>()
|
|
24
|
+
const emits = defineEmits<{
|
|
25
|
+
(event: 'change', value: UI_I_DatastoreTableItem): void
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
29
|
+
|
|
30
|
+
const storages = ref<UI_I_DatastoreTableItem[]>([])
|
|
31
|
+
const addStorage = (storage: UI_I_DatastoreTableItem): void => {
|
|
32
|
+
const hasStorage = storages.value.some((item) => item.id === storage.id)
|
|
33
|
+
if (hasStorage) {
|
|
34
|
+
return
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
storages.value.push(storage)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const selectedLocation = ref<string>(props.storage?.id || '')
|
|
41
|
+
|
|
42
|
+
const locationOptions = ref<UI_I_OptionItem[]>([])
|
|
43
|
+
|
|
44
|
+
watch(
|
|
45
|
+
() => props.storage,
|
|
46
|
+
(newValue) => {
|
|
47
|
+
if (locationOptions.value.length || !newValue) {
|
|
48
|
+
return
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
locationOptions.value = [
|
|
52
|
+
{
|
|
53
|
+
text: localization.value.common.storeWithVirtualMachine,
|
|
54
|
+
value: newValue.id,
|
|
55
|
+
},
|
|
56
|
+
{ text: `${localization.value.common.browse}...`, value: -1 },
|
|
57
|
+
]
|
|
58
|
+
selectedLocation.value = newValue.id
|
|
59
|
+
storages.value.push(newValue)
|
|
60
|
+
addStorage(newValue)
|
|
61
|
+
},
|
|
62
|
+
{ immediate: true }
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
const onChangeStorage = (storage: UI_I_DatastoreTableItem | null): void => {
|
|
66
|
+
if (!storage) return
|
|
67
|
+
emits('change', storage)
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
|
|
3
|
+
export const defaultFormFunc = (localization: UI_I_Localization): any => {
|
|
4
|
+
return {
|
|
5
|
+
name: {
|
|
6
|
+
value: '',
|
|
7
|
+
validations: [
|
|
8
|
+
{
|
|
9
|
+
value: 'required',
|
|
10
|
+
errorText: localization.common.specifyDatastoreName,
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="datastore-types">
|
|
3
|
+
<div class="header-row flex items-center">
|
|
4
|
+
<span class="datastore-types__subtitle">
|
|
5
|
+
{{ localization.common.specifyDatastoreType }}
|
|
6
|
+
</span>
|
|
7
|
+
<div id="type-select-help-icon" class="signpost-container relative flex cursor-pointer">
|
|
8
|
+
<atoms-the-icon
|
|
9
|
+
data-id="toggle-type-select-help-icon"
|
|
10
|
+
fill="#0072a3"
|
|
11
|
+
width="24px"
|
|
12
|
+
height="24px"
|
|
13
|
+
name="info-circle"
|
|
14
|
+
@click="isShowTypeHelp = !isShowTypeHelp"
|
|
15
|
+
/>
|
|
16
|
+
<atoms-tooltip-signpost
|
|
17
|
+
v-if="isShowTypeHelp"
|
|
18
|
+
elem-id="type-select-help-icon"
|
|
19
|
+
@hide="isShowTypeHelp = false"
|
|
20
|
+
>
|
|
21
|
+
<p class="help-desc">{{ localization.common.datastoreTypeHelpDesc }}</p>
|
|
22
|
+
</atoms-tooltip-signpost>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<common-select-radio-group
|
|
27
|
+
v-model="selectedType"
|
|
28
|
+
:options="datastoreTypes"
|
|
29
|
+
/>
|
|
30
|
+
</section>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script lang="ts" setup>
|
|
34
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
35
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
36
|
+
import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
37
|
+
import type {
|
|
38
|
+
UI_T_DatastoreType
|
|
39
|
+
} from '~/components/common/backup/storage/actions/add/temp/lib/models/types'
|
|
40
|
+
import { datastoreTypesFunc } from '~/components/common/backup/storage/actions/add/temp/types/lib/config/typeOptions'
|
|
41
|
+
|
|
42
|
+
const props = defineProps<{
|
|
43
|
+
// project: UI_T_Project
|
|
44
|
+
type: UI_T_DatastoreType
|
|
45
|
+
}>()
|
|
46
|
+
const emits = defineEmits<{
|
|
47
|
+
(event: 'update:type', value: UI_T_DatastoreType): void
|
|
48
|
+
}>()
|
|
49
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
50
|
+
|
|
51
|
+
const datastoreTypes = ref<UI_I_RadioOption[]>(
|
|
52
|
+
datastoreTypesFunc(localization.value)
|
|
53
|
+
// datastoreTypesFunc(localization.value, props.project)
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
const selectedType = computed<UI_T_DatastoreType>({
|
|
57
|
+
get() {
|
|
58
|
+
return props.type
|
|
59
|
+
},
|
|
60
|
+
set(newValue) {
|
|
61
|
+
emits('update:type', newValue)
|
|
62
|
+
},
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const isShowTypeHelp = ref<boolean>(false)
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style lang="scss" scoped>
|
|
69
|
+
.datastore-types {
|
|
70
|
+
.signpost-container {
|
|
71
|
+
.help-desc-container {
|
|
72
|
+
max-width: 350px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.header-row {
|
|
76
|
+
gap: 10px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
// import type { UI_T_Project } from '~/lib/models/types'
|
|
3
|
+
import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
4
|
+
|
|
5
|
+
export const datastoreTypesFunc = (
|
|
6
|
+
localization: UI_I_Localization,
|
|
7
|
+
// project: UI_T_Project
|
|
8
|
+
): UI_I_RadioOption[] => {
|
|
9
|
+
// const types = [
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
label: localization.common.localStorage,
|
|
13
|
+
value: 'local',
|
|
14
|
+
disabled: false,
|
|
15
|
+
description: localization.common.localDesc,
|
|
16
|
+
isTooltip: false,
|
|
17
|
+
tooltipContent: localization.common.localStorageHelpDesc,
|
|
18
|
+
testId: 'datastore-type-local',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: localization.common.nfs,
|
|
22
|
+
value: 'nfs',
|
|
23
|
+
disabled: false,
|
|
24
|
+
description: localization.common.nfsDesc,
|
|
25
|
+
isTooltip: false,
|
|
26
|
+
tooltipContent: localization.common.nfsHelpDesc,
|
|
27
|
+
testId: 'datastore-type-nfs',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: localization.common.samba,
|
|
31
|
+
value: 'samba',
|
|
32
|
+
disabled: false,
|
|
33
|
+
description: localization.common.sambaDesc,
|
|
34
|
+
isTooltip: false,
|
|
35
|
+
tooltipContent: localization.common.sambaHelpDesc,
|
|
36
|
+
testId: 'datastore-type-samba',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: localization.common.sharedStorm,
|
|
40
|
+
value: 'shared-storm',
|
|
41
|
+
disabled: false,
|
|
42
|
+
description: localization.common.sharedStormDesc,
|
|
43
|
+
isTooltip: false,
|
|
44
|
+
tooltipContent: localization.common.stormSharedStorageHelpDesc,
|
|
45
|
+
testId: 'datastore-type-shared-storm',
|
|
46
|
+
},
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
// if (project === 'procurator') {
|
|
50
|
+
// types.unshift({
|
|
51
|
+
// label: localization.common.localStorage,
|
|
52
|
+
// value: 'local',
|
|
53
|
+
// disabled: false,
|
|
54
|
+
// description: localization.common.localDesc,
|
|
55
|
+
// isTooltip: false,
|
|
56
|
+
// tooltipContent: localization.common.localStorageHelpDesc,
|
|
57
|
+
// testId: 'datastore-type-local',
|
|
58
|
+
// })
|
|
59
|
+
// }
|
|
60
|
+
|
|
61
|
+
// return types
|
|
62
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<common-modals-confirm-by-input
|
|
3
|
+
:title="localization.common.confirmDeletionDatastoreTitle"
|
|
4
|
+
:sub-title="props.datastore?.name || ''"
|
|
5
|
+
test-id="datastore-delete"
|
|
6
|
+
width="576px"
|
|
7
|
+
@hide="onHide"
|
|
8
|
+
@confirm="onDelete"
|
|
9
|
+
>
|
|
10
|
+
<template #content>
|
|
11
|
+
<p class="delete-group__text">
|
|
12
|
+
{{ localization.common.confirmDeletionDatastoreBodyFirst }}
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p class="delete-group__text">
|
|
16
|
+
{{ localization.common.confirmDeletionDatastoreBodySecond }}
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p class="delete-group__text">
|
|
20
|
+
{{ localization.common.confirmDeletionDatastoreBodyThird }}
|
|
21
|
+
</p>
|
|
22
|
+
</template>
|
|
23
|
+
</common-modals-confirm-by-input>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
28
|
+
import type { UI_I_DeleteItem } from '~/components/common/backup/storage/actions/delete/lib/models/interfaces'
|
|
29
|
+
import { sendTask } from '~/lib/utils/sendTask'
|
|
30
|
+
import { getBackupTreeNodeIdByTypeFromRoute } from '~/components/common/backup/lib/utils/getBackupOrBackupStorageId'
|
|
31
|
+
|
|
32
|
+
const props = defineProps<{
|
|
33
|
+
datastore: UI_I_DeleteItem | null
|
|
34
|
+
}>()
|
|
35
|
+
const emits = defineEmits<{
|
|
36
|
+
(event: 'delete', value: string): void
|
|
37
|
+
(event: 'hide'): void
|
|
38
|
+
}>()
|
|
39
|
+
|
|
40
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
41
|
+
|
|
42
|
+
const targetId = computed<string>(() =>
|
|
43
|
+
getBackupTreeNodeIdByTypeFromRoute('last')
|
|
44
|
+
)
|
|
45
|
+
const onDelete = (): void => {
|
|
46
|
+
emits('delete', targetId.value)
|
|
47
|
+
}
|
|
48
|
+
const onHide = (): void => {
|
|
49
|
+
emits('hide')
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<style lang="scss" scoped>
|
|
54
|
+
@import 'bfg-common/assets/scss/common/mixins.scss';
|
|
55
|
+
.delete-group__text {
|
|
56
|
+
@include text($fs: 0.6rem);
|
|
57
|
+
font-size: 0.6rem;
|
|
58
|
+
letter-spacing: normal;
|
|
59
|
+
line-height: 1rem;
|
|
60
|
+
|
|
61
|
+
&:first-child {
|
|
62
|
+
margin-bottom: 1.2em;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
</style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type UI_T_BlocksWidth = [number, number, number]
|
|
1
|
+
export type UI_T_BlocksWidth = [number, number, number]
|