bfg-common 1.4.58 → 1.4.60
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/wizards/datastore/add/Add.vue +232 -362
- package/components/common/wizards/{datastoreNew → datastore}/add/lib/config/steps.ts +3 -0
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +11 -30
- package/components/common/wizards/datastore/add/lib/models/types.ts +0 -7
- package/components/common/wizards/datastore/add/lib/utils.ts +14 -54
- package/components/common/wizards/{datastoreNew → datastore}/add/lib/validations.ts +2 -2
- package/components/common/wizards/datastore/add/local/Local.vue +19 -45
- package/components/common/wizards/datastore/add/local/createName/CreateName.vue +31 -81
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +25 -74
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +15 -56
- package/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces.ts +0 -4
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/TablesView.vue +9 -66
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +1 -1
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +57 -214
- package/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces.ts +4 -11
- package/components/common/wizards/datastore/add/nfs/version/Version.vue +3 -19
- package/components/common/wizards/datastore/add/nfs/version/lib/config/versionOptions.ts +4 -4
- package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +3 -10
- package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +37 -95
- package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +32 -45
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +64 -267
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +5 -5
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +1 -11
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/types.ts +1 -14
- package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/Table.vue +2 -2
- package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/lunDiskTable.ts +1 -1
- package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/tableKeys.ts +1 -1
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +13 -13
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +8 -8
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +2 -2
- package/components/common/wizards/datastore/add/types/Types.vue +18 -17
- package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +7 -16
- package/lib/models/enums.ts +1 -0
- package/package.json +1 -1
- package/components/common/wizards/datastore/add/lib/config/stepItems.ts +0 -225
- package/components/common/wizards/datastore/add/local/createName/lib/config/defaultForm.ts +0 -15
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +0 -53
- package/components/common/wizards/datastore/add/nfs/configuration/lib/config/defaultForm.ts +0 -33
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/DeletePopover.vue +0 -100
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +0 -124
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/serversListConfig.ts +0 -40
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/tableKeys.ts +0 -3
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces.ts +0 -11
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +0 -55
- package/components/common/wizards/datastore/add/readyComplete/lib/models/interfaces.ts +0 -4
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +0 -144
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/hostsTable.ts +0 -87
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/tableKeys.ts +0 -11
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/defaultForm.ts +0 -18
- package/components/common/wizards/datastore/add/sharedStorm/version/Version.vue +0 -39
- package/components/common/wizards/datastoreNew/add/Add.vue +0 -307
- package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +0 -19
- package/components/common/wizards/datastoreNew/add/lib/models/types.ts +0 -7
- package/components/common/wizards/datastoreNew/add/lib/utils.ts +0 -64
- package/components/common/wizards/datastoreNew/add/local/Local.vue +0 -45
- package/components/common/wizards/datastoreNew/add/local/createName/CreateName.vue +0 -116
- package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +0 -63
- package/components/common/wizards/datastoreNew/add/nfs/_kerberosAuthentication/lib/config/radioOptions.ts +0 -27
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/Accessibility.vue +0 -63
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/config/tabsPannel.ts +0 -24
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/interfaces.ts +0 -9
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/types.ts +0 -5
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/TablesView.vue +0 -85
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +0 -62
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +0 -68
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/tableKeys.ts +0 -15
- package/components/common/wizards/datastoreNew/add/nfs/configuration/Configuration.vue +0 -236
- package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/lib/models/types.ts +0 -1
- package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces.ts +0 -5
- package/components/common/wizards/datastoreNew/add/nfs/version/Version.vue +0 -26
- package/components/common/wizards/datastoreNew/add/nfs/version/lib/config/versionOptions.ts +0 -22
- package/components/common/wizards/datastoreNew/add/readyComplete/ReadyComplete.vue +0 -88
- package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts +0 -140
- package/components/common/wizards/datastoreNew/add/sharedStorm/SharedStorm.vue +0 -84
- package/components/common/wizards/datastoreNew/add/sharedStorm/_version/lib/config/versionOptions.ts +0 -21
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue +0 -276
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +0 -23
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +0 -48
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/types.ts +0 -1
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +0 -236
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/graphicTooltip/graphicTooltip.vue +0 -64
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +0 -46
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +0 -225
- package/components/common/wizards/datastoreNew/add/types/Types.vue +0 -83
- package/components/common/wizards/datastoreNew/add/types/lib/config/typeOptions.ts +0 -41
- /package/components/common/wizards/{datastoreNew → datastore}/add/lib/models/enums.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/_kerberosAuthentication/KerberosAuthentication.vue +0 -0
- /package/components/common/wizards/datastore/add/nfs/{kerberosAuthentication → _kerberosAuthentication}/lib/config/radioOptions.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/accessibility/tablesView/lib/models/interfaces.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/DeletePopover.vue +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/ServersList.vue +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/serversListConfig.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/tableKeys.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/models/interfaces.ts +0 -0
- /package/components/common/wizards/datastore/add/nfs/configuration/{serversList → _serversList}/lib/models/types.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/_version/Version.vue +0 -0
- /package/components/common/wizards/datastore/add/sharedStorm/{version → _version}/lib/config/versionOptions.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/models/types.ts +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="data-table-view">
|
|
3
3
|
<div>
|
|
4
4
|
<atoms-table-data-grid
|
|
5
|
-
v-model:selected-row="
|
|
5
|
+
v-model:selected-row="selectedHostsIdLocal"
|
|
6
6
|
v-model:page-size="pagination.pageSize"
|
|
7
7
|
v-model:page="pagination.page"
|
|
8
8
|
type="checkbox"
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
:total-pages="props.totalPages"
|
|
15
15
|
:items-per-page="itemsPerPage"
|
|
16
16
|
:loading="loading"
|
|
17
|
-
@filtering="filtering"
|
|
18
|
-
@sorting="sorting"
|
|
19
17
|
>
|
|
20
18
|
<template #icon="{ item }">
|
|
21
19
|
<span :class="['datagrid-cell-icon', item.data.iconClassName]" />
|
|
@@ -35,77 +33,33 @@ import type {
|
|
|
35
33
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
36
34
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
37
35
|
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
36
|
+
import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
|
|
38
37
|
import type { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
|
|
39
|
-
import
|
|
38
|
+
import {
|
|
40
39
|
I_CompatibleHostsTable,
|
|
41
40
|
I_IncompatibleHostsTable,
|
|
42
41
|
} from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
|
|
43
|
-
import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
|
|
44
42
|
import * as compatibleTable from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable'
|
|
45
43
|
import * as incompatibleTable from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/incompatibleTable'
|
|
46
44
|
|
|
47
45
|
const props = defineProps<{
|
|
48
46
|
dataTable: I_CompatibleHostsTable[] | I_IncompatibleHostsTable[]
|
|
49
|
-
selectedRow: number[]
|
|
50
47
|
tableType: T_HostsAccessibilityTab
|
|
51
48
|
totalItems: number
|
|
52
49
|
totalPages: number
|
|
53
|
-
pagination: UI_I_Pagination
|
|
54
|
-
}>()
|
|
55
|
-
const emits = defineEmits<{
|
|
56
|
-
(event: 'update:selected-row', value: number[]): void
|
|
57
|
-
(event: 'pagination', value: UI_I_Pagination): void
|
|
58
|
-
(event: 'sort', value: string): void
|
|
59
50
|
}>()
|
|
51
|
+
const selectedHostsIdLocal = defineModel<string[]>()
|
|
60
52
|
|
|
61
53
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
62
54
|
|
|
63
55
|
const loading = computed<boolean>(() => false)
|
|
64
56
|
|
|
65
|
-
const selected = computed<number[]>({
|
|
66
|
-
get() {
|
|
67
|
-
return props.selectedRow
|
|
68
|
-
},
|
|
69
|
-
set(value) {
|
|
70
|
-
emits('update:selected-row', value)
|
|
71
|
-
},
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
const filtering = (e: [string, string][]): void => {
|
|
75
|
-
console.log(e, 111)
|
|
76
|
-
}
|
|
77
|
-
const sorting = (e: [number, boolean]): void => {
|
|
78
|
-
const [column, status] = e
|
|
79
|
-
const direction = status ? 'desc' : 'asc'
|
|
80
|
-
|
|
81
|
-
const sort = `${column}.${direction}`
|
|
82
|
-
|
|
83
|
-
emits('sort', sort)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
57
|
const pagination = ref<UI_I_Pagination>({
|
|
87
58
|
page: 1,
|
|
88
59
|
pageSize: 1,
|
|
89
60
|
})
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
(newValue) => {
|
|
93
|
-
pagination.value = newValue
|
|
94
|
-
},
|
|
95
|
-
{ immediate: true }
|
|
96
|
-
)
|
|
97
|
-
watch(
|
|
98
|
-
pagination,
|
|
99
|
-
(newValue) => {
|
|
100
|
-
emits('pagination', newValue)
|
|
101
|
-
},
|
|
102
|
-
{ deep: true, immediate: true }
|
|
103
|
-
)
|
|
104
|
-
interface TablesView {
|
|
105
|
-
'compatible-hosts': any
|
|
106
|
-
'incompatible-hosts': any
|
|
107
|
-
}
|
|
108
|
-
const tables: TablesView = {
|
|
61
|
+
|
|
62
|
+
const tables: any = {
|
|
109
63
|
'compatible-hosts': compatibleTable,
|
|
110
64
|
'incompatible-hosts': incompatibleTable,
|
|
111
65
|
}
|
|
@@ -113,20 +67,9 @@ const tables: TablesView = {
|
|
|
113
67
|
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
114
68
|
tables[props.tableType].headItems(localization.value)
|
|
115
69
|
)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
() => props.dataTable,
|
|
120
|
-
(newValue) => {
|
|
121
|
-
if (!newValue?.length) {
|
|
122
|
-
bodyItems.value = []
|
|
123
|
-
return
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
bodyItems.value = tables[props.tableType].bodyItems(newValue)
|
|
127
|
-
},
|
|
128
|
-
{ deep: true, immediate: true }
|
|
129
|
-
)
|
|
70
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
71
|
+
return tables[props.tableType].bodyItems(props.dataTable)
|
|
72
|
+
})
|
|
130
73
|
</script>
|
|
131
74
|
|
|
132
75
|
<style lang="scss" scoped>
|
|
@@ -3,8 +3,8 @@ import type {
|
|
|
3
3
|
UI_I_BodyItem,
|
|
4
4
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
5
5
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
6
|
-
import type { I_CompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
|
|
7
6
|
import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
7
|
+
import type { I_CompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
|
|
8
8
|
import { compatibleHostsTableKeys } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/tableKeys'
|
|
9
9
|
import {
|
|
10
10
|
hostIconByState,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<div class="configuration">
|
|
3
3
|
<div>
|
|
4
4
|
<atoms-alert
|
|
5
|
-
v-show="
|
|
6
|
-
test-id="
|
|
5
|
+
v-show="props.alertMessages?.length"
|
|
6
|
+
test-id="configure-error-alert"
|
|
7
7
|
status="alert-danger"
|
|
8
|
-
:items="
|
|
9
|
-
@remove="
|
|
8
|
+
:items="props.alertMessages"
|
|
9
|
+
@remove="onHideAlert"
|
|
10
10
|
/>
|
|
11
11
|
|
|
12
12
|
<atoms-alert
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
<div class="flex-align-center">
|
|
31
31
|
<input
|
|
32
32
|
id="configuration-name-input"
|
|
33
|
-
v-model="
|
|
33
|
+
v-model="model.name"
|
|
34
34
|
data-id="configuration-name-input"
|
|
35
35
|
type="text"
|
|
36
36
|
class="clr-input"
|
|
37
|
-
@blur="
|
|
38
|
-
@input="
|
|
37
|
+
@blur="initValidation(true, ['name'])"
|
|
38
|
+
@input="initValidation(false, ['name'])"
|
|
39
39
|
/>
|
|
40
40
|
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
41
41
|
</div>
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
<div class="flex-align-center">
|
|
59
59
|
<input
|
|
60
60
|
id="configuration-folder-input"
|
|
61
|
-
v-model="
|
|
61
|
+
v-model="model.folder"
|
|
62
62
|
data-id="configuration-folder-input"
|
|
63
63
|
type="text"
|
|
64
64
|
class="clr-input"
|
|
65
|
-
@blur="
|
|
66
|
-
@input="
|
|
65
|
+
@blur="initValidation(true, ['folder'])"
|
|
66
|
+
@input="initValidation(false, ['folder'])"
|
|
67
67
|
/>
|
|
68
68
|
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
69
69
|
</div>
|
|
@@ -90,13 +90,13 @@
|
|
|
90
90
|
>
|
|
91
91
|
<div class="flex-align-center input-action-wrapper">
|
|
92
92
|
<input
|
|
93
|
-
id="configuration-
|
|
94
|
-
v-model="
|
|
95
|
-
data-id="configuration-
|
|
93
|
+
id="configuration-folder-input"
|
|
94
|
+
v-model="model.server"
|
|
95
|
+
data-id="configuration-folder-input"
|
|
96
96
|
type="text"
|
|
97
97
|
class="clr-input"
|
|
98
|
-
@blur="
|
|
99
|
-
@input="
|
|
98
|
+
@blur="initValidation(true, ['server'])"
|
|
99
|
+
@input="initValidation(false, ['server'])"
|
|
100
100
|
/>
|
|
101
101
|
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
102
102
|
</div>
|
|
@@ -111,231 +111,74 @@
|
|
|
111
111
|
E.g: nas, nas.it.com or 192.168.0.1
|
|
112
112
|
</div>
|
|
113
113
|
</div>
|
|
114
|
-
|
|
115
|
-
<!-- <button-->
|
|
116
|
-
<!-- v-show="props.nfsVersion === 'nfs-4.1' && false"-->
|
|
117
|
-
<!-- class="btn btn-sm nd-mt-0"-->
|
|
118
|
-
<!-- @click="onAddServerToList"-->
|
|
119
|
-
<!-- >-->
|
|
120
|
-
<!-- {{ localization.add }}-->
|
|
121
|
-
<!-- </button>-->
|
|
122
|
-
</div>
|
|
123
|
-
|
|
124
|
-
<div
|
|
125
|
-
v-show="props.nfsVersion === 'nfs-4.1' && false"
|
|
126
|
-
class="configuration__servers-list"
|
|
127
|
-
>
|
|
128
|
-
<common-wizards-datastore-add-nfs-configuration-servers-list
|
|
129
|
-
v-model:data-table="dataServers"
|
|
130
|
-
/>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
|
|
134
|
-
<div v-if="false" class="clr-form-control clr-row mt-1">
|
|
135
|
-
<label for="" class="clr-control-label clr-col-md-2">{{
|
|
136
|
-
localization.localization.accessMode
|
|
137
|
-
}}</label>
|
|
138
|
-
|
|
139
|
-
<div class="clr-col-md-10 clr-col-12 clr-checkbox-wrapper">
|
|
140
|
-
<input
|
|
141
|
-
id="playback-compression"
|
|
142
|
-
v-model="accessMode"
|
|
143
|
-
data-id="playback-compression-checkbox"
|
|
144
|
-
type="checkbox"
|
|
145
|
-
/>
|
|
146
|
-
<label for="playback-compression" class="clr-control-label">{{
|
|
147
|
-
localization.localization.mountNfsReadOnly
|
|
148
|
-
}}</label>
|
|
149
114
|
</div>
|
|
150
115
|
</div>
|
|
151
116
|
</div>
|
|
152
117
|
</template>
|
|
153
118
|
|
|
154
119
|
<script lang="ts" setup>
|
|
155
|
-
import type {
|
|
156
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
157
|
-
import type {
|
|
158
|
-
UI_I_DataServersListItem,
|
|
159
|
-
UI_I_FormValidationConfiguration,
|
|
160
|
-
} from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces'
|
|
120
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
161
121
|
import type {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
} from '~/
|
|
165
|
-
import type {
|
|
166
|
-
import {
|
|
167
|
-
import { checkValidityName } from '~/components/common/wizards/datastore/add/lib/utils'
|
|
122
|
+
UI_I_Localization,
|
|
123
|
+
UI_I_ArbitraryObject,
|
|
124
|
+
} from '~/lib/models/interfaces'
|
|
125
|
+
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
126
|
+
import type { UI_I_InitialValidationFields } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
|
|
168
127
|
|
|
169
128
|
const props = defineProps<{
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
129
|
+
project: UI_T_Project
|
|
130
|
+
alertMessages: string[]
|
|
131
|
+
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
173
132
|
}>()
|
|
174
|
-
const
|
|
133
|
+
const model = defineModel<any>()
|
|
175
134
|
const emits = defineEmits<{
|
|
176
|
-
(event: '
|
|
177
|
-
(event: 'next', value: UI_I_ConfigurationSendDataNfs): void
|
|
135
|
+
(event: 'hide-alert', value: number): void
|
|
178
136
|
}>()
|
|
179
|
-
const { $validation } = useNuxtApp()
|
|
180
|
-
|
|
181
|
-
const validation = $validation.call({})
|
|
182
|
-
const defaultForm: UI_I_FormValidationConfiguration = defaultFormFunc(
|
|
183
|
-
localization.value
|
|
184
|
-
)
|
|
185
|
-
const form = ref<UI_I_FormValidationConfiguration>(useDeepCopy(defaultForm))
|
|
186
|
-
const setForm = () => {
|
|
187
|
-
form.value = useDeepCopy(defaultForm)
|
|
188
|
-
validation.setForm(form)
|
|
189
|
-
}
|
|
190
|
-
setForm()
|
|
191
|
-
|
|
192
|
-
const validForm = ref<UI_I_ValidationTouchResult | null>(null)
|
|
193
|
-
|
|
194
|
-
/* Validation for Name input */
|
|
195
|
-
const isInitNameValidation = ref<boolean>(false)
|
|
196
|
-
const onBlurInputName = (): void => {
|
|
197
|
-
validForm.value = validation.touch()
|
|
198
|
-
isInitNameValidation.value = true
|
|
199
|
-
}
|
|
200
|
-
const onInputName = (): void => {
|
|
201
|
-
validForm.value = validation.touch()
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const nameErrorText = computed<string>(() => {
|
|
205
|
-
if (!isInitNameValidation.value) return ''
|
|
206
|
-
return validForm.value?.errors?.name?.[0] || ''
|
|
207
|
-
})
|
|
208
|
-
/* Validation Name input end */
|
|
209
|
-
|
|
210
|
-
/* Validation for Folder input */
|
|
211
|
-
const isInitFolderValidation = ref<boolean>(false)
|
|
212
|
-
const onBlurInputFolder = (): void => {
|
|
213
|
-
validForm.value = validation.touch()
|
|
214
|
-
isInitFolderValidation.value = true
|
|
215
|
-
}
|
|
216
|
-
const onInputFolder = (): void => {
|
|
217
|
-
validForm.value = validation.touch()
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const folderErrorText = computed<string>(() => {
|
|
221
|
-
if (!isInitFolderValidation.value) return ''
|
|
222
|
-
return validForm.value?.errors?.folder?.[0] || ''
|
|
223
|
-
})
|
|
224
|
-
/* Validation Folder input end */
|
|
225
137
|
|
|
226
|
-
|
|
227
|
-
const isInitServerValidation = ref<boolean>(false)
|
|
228
|
-
const onBlurInputServer = (): void => {
|
|
229
|
-
validForm.value = validation.touch()
|
|
230
|
-
isInitServerValidation.value = true
|
|
231
|
-
}
|
|
232
|
-
const onInputServer = (): void => {
|
|
233
|
-
validForm.value = validation.touch()
|
|
234
|
-
isInitServerValidation.value = true
|
|
235
|
-
}
|
|
138
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
236
139
|
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
140
|
+
const initValidationFields = ref<UI_I_InitialValidationFields>({
|
|
141
|
+
name: false,
|
|
142
|
+
folder: false,
|
|
143
|
+
server: false,
|
|
241
144
|
})
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
const accessMode = ref<boolean>(false)
|
|
246
|
-
|
|
247
|
-
const dataServers = ref<UI_I_DataServersListItem[]>([])
|
|
248
|
-
// const onAddServerToList = (): void => {
|
|
249
|
-
// const { server } = form.value
|
|
250
|
-
// // const { nfsVersion } = props
|
|
251
|
-
//
|
|
252
|
-
// if (!dataServers.value.length && !server.value) {
|
|
253
|
-
// validForm.value = validation.touch()
|
|
254
|
-
// isInitServerValidation.value = true
|
|
255
|
-
//
|
|
256
|
-
// return
|
|
257
|
-
// }
|
|
258
|
-
//
|
|
259
|
-
// // if (dataServers.value.length && !server.value) return
|
|
260
|
-
//
|
|
261
|
-
// const data: UI_I_DataServersListItem = {
|
|
262
|
-
// server_name: server.value,
|
|
263
|
-
// }
|
|
264
|
-
//
|
|
265
|
-
// const hasEqualItem = !!dataServers.value.find(
|
|
266
|
-
// (server: UI_I_DataServersListItem) => server.server_name === data.server_name
|
|
267
|
-
// )
|
|
268
|
-
//
|
|
269
|
-
// !hasEqualItem && dataServers.value.push(data)
|
|
270
|
-
//
|
|
271
|
-
// // if (nfsVersion === 'nfs-4.1') server.value = ''
|
|
272
|
-
// }
|
|
273
|
-
|
|
274
|
-
const alertInfo = ref<boolean>(props.mode === 'procurator')
|
|
275
|
-
|
|
276
|
-
const resetValidation = (): void => {
|
|
277
|
-
isInitNameValidation.value =
|
|
278
|
-
isInitFolderValidation.value =
|
|
279
|
-
isInitServerValidation.value =
|
|
280
|
-
false
|
|
281
|
-
validForm.value = null
|
|
282
|
-
errors.value = []
|
|
145
|
+
const initValidation = (onlyBlur = false, types: string[]): void => {
|
|
146
|
+
onlyBlur && types.forEach((type) => (initValidationFields.value[type] = true))
|
|
283
147
|
}
|
|
284
148
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
()
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
)
|
|
291
|
-
const submit = async (): Promise<void> => {
|
|
292
|
-
const { name, server, folder } = form.value
|
|
293
|
-
|
|
294
|
-
validForm.value = validation.touch()
|
|
295
|
-
isInitNameValidation.value =
|
|
296
|
-
isInitFolderValidation.value =
|
|
297
|
-
isInitServerValidation.value =
|
|
298
|
-
true
|
|
299
|
-
|
|
300
|
-
if (nameErrorText.value || folderErrorText.value || serverErrorText.value) {
|
|
301
|
-
return
|
|
149
|
+
/* Validation error text for Name input field */
|
|
150
|
+
const nameErrorText = computed<string>(() => {
|
|
151
|
+
if (props.messagesFields?.name?.field && !model.value.name) {
|
|
152
|
+
return props.messagesFields.name.field
|
|
302
153
|
}
|
|
303
154
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
emits('loading', false)
|
|
155
|
+
if (!initValidationFields.value.name) return ''
|
|
156
|
+
return !model.value.name ? localization.value.common.specifyDatastoreName : ''
|
|
157
|
+
})
|
|
309
158
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
159
|
+
/* Validation error text for Folder input field */
|
|
160
|
+
const folderErrorText = computed<string>(() => {
|
|
161
|
+
if (props.messagesFields.folder?.field && !model.value.folder) {
|
|
162
|
+
return props.messagesFields.folder.field
|
|
313
163
|
}
|
|
314
164
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
165
|
+
if (!initValidationFields.value.folder) return ''
|
|
166
|
+
return !model.value.folder ? localization.value.common.specifyFolderName : ''
|
|
167
|
+
})
|
|
318
168
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
169
|
+
/* Validation error text for Server input field */
|
|
170
|
+
const serverErrorText = computed<string>(() => {
|
|
171
|
+
if (props.messagesFields.server?.field && !model.value.server) {
|
|
172
|
+
return props.messagesFields.server.field
|
|
323
173
|
}
|
|
324
174
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
const errors = ref<string[]>([])
|
|
332
|
-
|
|
333
|
-
const showValidationErrors = (errorText: string): void => {
|
|
334
|
-
errors.value = [errorText]
|
|
335
|
-
}
|
|
336
|
-
const onCloseAlertDanger = (): void => {
|
|
337
|
-
errors.value = []
|
|
175
|
+
if (!initValidationFields.value.server) return ''
|
|
176
|
+
return !model.value.server ? localization.value.common.specifyServerName : ''
|
|
177
|
+
})
|
|
178
|
+
const onHideAlert = (): void => {
|
|
179
|
+
emits('hide-alert', 5)
|
|
338
180
|
}
|
|
181
|
+
const alertInfo = ref<boolean>(props.project === 'procurator')
|
|
339
182
|
</script>
|
|
340
183
|
|
|
341
184
|
<style lang="scss" scoped>
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// }
|
|
6
|
-
export interface UI_I_ConfigurationSendDataNfs {
|
|
7
|
-
name: string
|
|
8
|
-
folder: string
|
|
9
|
-
server: UI_I_DataServersListItem[]
|
|
10
|
-
|
|
11
|
-
// readonly: boolean
|
|
1
|
+
export interface UI_I_InitialValidationFields {
|
|
2
|
+
name: boolean
|
|
3
|
+
folder: boolean
|
|
4
|
+
server: boolean
|
|
12
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="nfs-version">
|
|
3
3
|
<common-select-radio-group
|
|
4
|
-
v-model="
|
|
4
|
+
v-model="selectedNfsVersionLocal"
|
|
5
5
|
:options="nfsVersion"
|
|
6
6
|
/>
|
|
7
7
|
</section>
|
|
@@ -13,30 +13,14 @@ import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/mode
|
|
|
13
13
|
import type { UI_T_NfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
14
14
|
import { nfsVersionFunc } from '~/components/common/wizards/datastore/add/nfs/version/lib/config/versionOptions'
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
}>()
|
|
19
|
-
const emits = defineEmits<{
|
|
20
|
-
(event: 'update:version', value: UI_T_NfsType): void
|
|
21
|
-
}>()
|
|
16
|
+
const selectedNfsVersionLocal = defineModel<UI_T_NfsType>()
|
|
17
|
+
|
|
22
18
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
23
19
|
|
|
24
20
|
const nfsVersion = ref<UI_I_RadioOption[]>(nfsVersionFunc(localization.value))
|
|
25
|
-
|
|
26
|
-
const selectedVersion = computed<UI_T_NfsType>({
|
|
27
|
-
get() {
|
|
28
|
-
return props.version
|
|
29
|
-
},
|
|
30
|
-
set(newValue) {
|
|
31
|
-
emits('update:version', newValue)
|
|
32
|
-
},
|
|
33
|
-
})
|
|
34
21
|
</script>
|
|
35
22
|
|
|
36
23
|
<style lang="scss" scoped>
|
|
37
24
|
.nfs-version {
|
|
38
|
-
//&__desc {
|
|
39
|
-
// margin-left: 22px;
|
|
40
|
-
//}
|
|
41
25
|
}
|
|
42
26
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
3
3
|
export const nfsVersionFunc = (
|
|
4
4
|
localization: UI_I_Localization
|
|
5
5
|
): UI_I_RadioOption[] => {
|
|
@@ -8,14 +8,14 @@ export const nfsVersionFunc = (
|
|
|
8
8
|
label: 'NFS 3',
|
|
9
9
|
value: 'nfs-3',
|
|
10
10
|
disabled: false,
|
|
11
|
-
description: localization.
|
|
11
|
+
description: localization.nfsVersionDesc1,
|
|
12
12
|
testId: 'datastore-nfs-version-3',
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
label: 'NFS 4.1',
|
|
16
16
|
value: 'nfs-4.1',
|
|
17
17
|
disabled: false,
|
|
18
|
-
description: localization.
|
|
18
|
+
description: localization.nfsVersionDesc2,
|
|
19
19
|
testId: 'datastore-nfs-version-4.1',
|
|
20
20
|
},
|
|
21
21
|
]
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ready-complete">
|
|
3
|
-
<div class="ready-complete__desc">{{ localization.common.readyCompleteDesc }}</div>
|
|
4
|
-
|
|
5
3
|
<common-details-list :items="properties" class="ready-complete__list list">
|
|
6
4
|
<template #default="{ item }">
|
|
7
|
-
<common-details-item
|
|
8
|
-
:has-children="true"
|
|
9
|
-
:test-id="item.testId"
|
|
10
|
-
open-by-default
|
|
11
|
-
>
|
|
5
|
+
<common-details-item :has-children="true" open-by-default>
|
|
12
6
|
<template #stackBlockKey>
|
|
13
7
|
<span class="list__labels">
|
|
14
8
|
{{ localization.common.chosenDatastoreName }}
|
|
@@ -55,13 +49,12 @@
|
|
|
55
49
|
</template>
|
|
56
50
|
|
|
57
51
|
<script lang="ts" setup>
|
|
58
|
-
import
|
|
59
|
-
import
|
|
52
|
+
import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
53
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
60
54
|
|
|
61
55
|
const props = defineProps<{
|
|
62
56
|
dataReadyView: UI_I_DetailsItem[]
|
|
63
57
|
}>()
|
|
64
|
-
// console.log(props)
|
|
65
58
|
|
|
66
59
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
67
60
|
|