bfg-common 1.5.76 → 1.5.78
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 +11 -20
- package/components/common/wizards/datastore/add/New.vue +24 -45
- package/components/common/wizards/datastore/add/Old.vue +29 -16
- package/components/common/wizards/datastore/add/lib/config/steps.ts +18 -15
- package/components/common/wizards/datastore/add/lib/validations.ts +29 -13
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +0 -5
- package/components/common/wizards/datastore/add/{nfs/version/Version.vue → steps/_nfsVersion/NfsVersion.vue} +1 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibility.vue +60 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibilityNew.vue +27 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibilityOld.vue +60 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/config/tabsPannel.ts +31 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/models/interfaces.ts +9 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/models/types.ts +5 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/TablesView.vue +85 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/config/compatibleTable.ts +62 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/config/tableKeys.ts +15 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/models/interfaces.ts +11 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigure.vue +95 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureNew.vue +123 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureOld.vue +234 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/DeletePopover.vue +100 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/ServersList.vue +123 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/config/serversListConfig.ts +40 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/config/tableKeys.ts +3 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/models/interfaces.ts +3 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/models/types.ts +1 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/lib/models/interfaces.ts +5 -0
- package/package.json +1 -1
- package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +0 -92
- package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +0 -142
- /package/components/common/wizards/datastore/add/{nfs/version → steps/_nfsVersion}/lib/config/versionOptions.ts +0 -0
package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureOld.vue
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="configuration">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="props.alertMessages?.length"
|
|
5
|
+
test-id="configure-error-alert"
|
|
6
|
+
status="alert-danger"
|
|
7
|
+
:items="props.alertMessages"
|
|
8
|
+
@remove="onHideAlert"
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<atoms-alert
|
|
12
|
+
v-show="isShowAlertInfo"
|
|
13
|
+
test-id="configure-information-alert"
|
|
14
|
+
status="alert-info"
|
|
15
|
+
:items="[localization.common.nameAndConfigurationAlertInfo]"
|
|
16
|
+
@remove="isShowAlertInfo = false"
|
|
17
|
+
/>
|
|
18
|
+
<h6 class="nd-mt-0">{{ localization.common.nfsShareDetails }}</h6>
|
|
19
|
+
|
|
20
|
+
<div class="clr-form-control clr-row">
|
|
21
|
+
<label for="" class="clr-control-label clr-col-md-2">
|
|
22
|
+
{{ localization.common.name }}
|
|
23
|
+
</label>
|
|
24
|
+
|
|
25
|
+
<div class="clr-control-container" :class="nameErrorText && 'clr-error'">
|
|
26
|
+
<div class="flex-align-center">
|
|
27
|
+
<input
|
|
28
|
+
id="configuration-name-input"
|
|
29
|
+
v-model="formModelLocal.name"
|
|
30
|
+
data-id="configuration-name-input"
|
|
31
|
+
type="text"
|
|
32
|
+
class="clr-input"
|
|
33
|
+
@blur="initValidation(true, ['name'])"
|
|
34
|
+
@input="initValidation(false, ['name'])"
|
|
35
|
+
/>
|
|
36
|
+
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="clr-subtext" data-id="nfs-datastore-name-field-require">
|
|
40
|
+
{{ nameErrorText }}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="clr-form-control clr-row">
|
|
46
|
+
<label class="clr-control-label clr-col-md-2">
|
|
47
|
+
{{ localization.common.folder }}
|
|
48
|
+
</label>
|
|
49
|
+
|
|
50
|
+
<div
|
|
51
|
+
class="clr-control-container"
|
|
52
|
+
:class="folderErrorText && 'clr-error'"
|
|
53
|
+
>
|
|
54
|
+
<div class="flex-align-center">
|
|
55
|
+
<input
|
|
56
|
+
id="configuration-folder-input"
|
|
57
|
+
v-model="formModelLocal.folder"
|
|
58
|
+
data-id="configuration-folder-input"
|
|
59
|
+
type="text"
|
|
60
|
+
class="clr-input"
|
|
61
|
+
@blur="initValidation(true, ['folder'])"
|
|
62
|
+
@input="initValidation(false, ['folder'])"
|
|
63
|
+
/>
|
|
64
|
+
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div
|
|
68
|
+
v-if="folderErrorText"
|
|
69
|
+
class="clr-subtext"
|
|
70
|
+
data-id="folder-name-field-require"
|
|
71
|
+
>
|
|
72
|
+
{{ folderErrorText }}
|
|
73
|
+
</div>
|
|
74
|
+
<div v-else class="clr-subtext">E.g: /vols/vol0/datastore-001</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div class="nd-mt-0 clr-form-control clr-row">
|
|
79
|
+
<label class="clr-control-label clr-col-md-2">
|
|
80
|
+
{{ localization.common.server }}
|
|
81
|
+
</label>
|
|
82
|
+
|
|
83
|
+
<div
|
|
84
|
+
class="clr-control-container"
|
|
85
|
+
:class="serverErrorText && 'clr-error'"
|
|
86
|
+
>
|
|
87
|
+
<div class="flex-align-center input-action-wrapper">
|
|
88
|
+
<input
|
|
89
|
+
id="configuration-server-input"
|
|
90
|
+
v-model="formModelLocal.server"
|
|
91
|
+
data-id="configuration-server-input"
|
|
92
|
+
type="text"
|
|
93
|
+
class="clr-input"
|
|
94
|
+
@blur="initValidation(true, ['server'])"
|
|
95
|
+
@input="initValidation(false, ['server'])"
|
|
96
|
+
/>
|
|
97
|
+
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
98
|
+
</div>
|
|
99
|
+
<div
|
|
100
|
+
v-if="serverErrorText"
|
|
101
|
+
class="clr-subtext"
|
|
102
|
+
data-id="server-name-field-require"
|
|
103
|
+
>
|
|
104
|
+
{{ serverErrorText }}
|
|
105
|
+
</div>
|
|
106
|
+
<div v-else class="clr-subtext">
|
|
107
|
+
E.g: nas, nas.it.com or 192.168.0.1
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</template>
|
|
113
|
+
|
|
114
|
+
<script lang="ts" setup>
|
|
115
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
116
|
+
import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
117
|
+
import type { UI_I_InitialValidationFields } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
|
|
118
|
+
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
119
|
+
import { dynamicSteps } from '~/components/common/wizards/datastore/add/lib/config/steps'
|
|
120
|
+
|
|
121
|
+
const formModelLocal = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
|
122
|
+
const isShowAlertInfo = defineModel<boolean>('alertInfo', { required: true })
|
|
123
|
+
|
|
124
|
+
const props = defineProps<{
|
|
125
|
+
alertMessages: string[]
|
|
126
|
+
messagesFields: UI_I_WizardStep['fields']
|
|
127
|
+
}>()
|
|
128
|
+
const emits = defineEmits<{
|
|
129
|
+
(event: 'hide-alert', value: number): void
|
|
130
|
+
}>()
|
|
131
|
+
|
|
132
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
133
|
+
|
|
134
|
+
const initValidationFields = ref<UI_I_InitialValidationFields>({
|
|
135
|
+
name: false,
|
|
136
|
+
folder: false,
|
|
137
|
+
server: false,
|
|
138
|
+
})
|
|
139
|
+
const initValidation = (onlyBlur = false, types: string[]): void => {
|
|
140
|
+
onlyBlur && types.forEach((type) => (initValidationFields.value[type] = true))
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Validation error text for Name input field */
|
|
144
|
+
const nameErrorText = computed<string>(() => {
|
|
145
|
+
if (props.messagesFields?.name?.field && !formModelLocal.value.name) {
|
|
146
|
+
return props.messagesFields.name.field
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (!initValidationFields.value.name) return ''
|
|
150
|
+
return !formModelLocal.value.name
|
|
151
|
+
? localization.value.common.specifyDatastoreName
|
|
152
|
+
: ''
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
/* Validation error text for Folder input field */
|
|
156
|
+
const folderErrorText = computed<string>(() => {
|
|
157
|
+
if (props.messagesFields.folder?.field && !formModelLocal.value.folder) {
|
|
158
|
+
return props.messagesFields.folder.field
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (!initValidationFields.value.folder) return ''
|
|
162
|
+
return !formModelLocal.value.folder
|
|
163
|
+
? localization.value.common.specifyFolderName
|
|
164
|
+
: ''
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
/* Validation error text for Server input field */
|
|
168
|
+
const serverErrorText = computed<string>(() => {
|
|
169
|
+
if (props.messagesFields.server?.field && !formModelLocal.value.server) {
|
|
170
|
+
return props.messagesFields.server.field
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (!initValidationFields.value.server) return ''
|
|
174
|
+
return !formModelLocal.value.server
|
|
175
|
+
? localization.value.common.specifyServerName
|
|
176
|
+
: ''
|
|
177
|
+
})
|
|
178
|
+
const onHideAlert = (): void =>
|
|
179
|
+
emits('hide-alert', dynamicSteps.nameAndConfigure)
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<style lang="scss" scoped>
|
|
183
|
+
@import '~/assets/scss/common/mixins.scss';
|
|
184
|
+
.configuration {
|
|
185
|
+
@include flex($dir: column, $just: space-between);
|
|
186
|
+
height: 100%;
|
|
187
|
+
& > h6 {
|
|
188
|
+
font-weight: 500;
|
|
189
|
+
font-size: 14px;
|
|
190
|
+
padding-top: 6px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&__alert-info {
|
|
194
|
+
:deep(.alert-text) {
|
|
195
|
+
font-size: 11px;
|
|
196
|
+
letter-spacing: normal;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
.clr-form-control {
|
|
200
|
+
margin-top: 0;
|
|
201
|
+
display: flex;
|
|
202
|
+
flex-direction: row;
|
|
203
|
+
|
|
204
|
+
.clr-control-container {
|
|
205
|
+
min-height: 48px;
|
|
206
|
+
&.clr-error {
|
|
207
|
+
.clr-subtext,
|
|
208
|
+
.error-icon {
|
|
209
|
+
display: block;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
.error-icon {
|
|
213
|
+
display: none;
|
|
214
|
+
}
|
|
215
|
+
.error-icon {
|
|
216
|
+
fill: #db2100;
|
|
217
|
+
width: 24px;
|
|
218
|
+
height: 24px;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
&__servers-list {
|
|
223
|
+
height: 170px;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
.flex-align-center {
|
|
227
|
+
&.input-action-wrapper {
|
|
228
|
+
width: 260px;
|
|
229
|
+
}
|
|
230
|
+
input {
|
|
231
|
+
width: 210px;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
</style>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="popover">
|
|
3
|
+
<slot>
|
|
4
|
+
<span
|
|
5
|
+
class="popover__item"
|
|
6
|
+
data-id="delete-popover-text"
|
|
7
|
+
@click="onClickItem"
|
|
8
|
+
>{{ localization.common.removeMember }}</span
|
|
9
|
+
>
|
|
10
|
+
</slot>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script lang="ts" setup>
|
|
15
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
16
|
+
|
|
17
|
+
const emits = defineEmits<{
|
|
18
|
+
(event: 'hide'): void
|
|
19
|
+
(event: 'click-item'): void
|
|
20
|
+
}>()
|
|
21
|
+
|
|
22
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
23
|
+
const onClickItem = (): void => {
|
|
24
|
+
emits('click-item')
|
|
25
|
+
}
|
|
26
|
+
const hide = (): void => {
|
|
27
|
+
emits('hide')
|
|
28
|
+
}
|
|
29
|
+
const windowClick = (): void => {
|
|
30
|
+
hide()
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
onMounted(() => {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
window.addEventListener('click', windowClick)
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
onUnmounted(() => {
|
|
39
|
+
window.removeEventListener('click', windowClick)
|
|
40
|
+
})
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<style lang="scss" scoped>
|
|
44
|
+
@import '~/assets/scss/common/mixins.scss';
|
|
45
|
+
|
|
46
|
+
.popover {
|
|
47
|
+
@include flex($align: center, $just: space-between);
|
|
48
|
+
height: 38px;
|
|
49
|
+
background: var(--block-view-bg-color2);
|
|
50
|
+
padding: 0.3rem;
|
|
51
|
+
margin-left: 0.3rem;
|
|
52
|
+
border: 0.05rem solid var(--block-border-color);
|
|
53
|
+
box-shadow: 0 0.05rem 0.15rem hsl(0deg 0% 55% / 25%);
|
|
54
|
+
transform: translateY(-50%);
|
|
55
|
+
border-radius: 0.15rem;
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
z-index: var(--z-popover);
|
|
59
|
+
&:before,
|
|
60
|
+
&:after {
|
|
61
|
+
content: '';
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 50%;
|
|
64
|
+
right: 100%;
|
|
65
|
+
width: 0;
|
|
66
|
+
height: 0;
|
|
67
|
+
}
|
|
68
|
+
&:before {
|
|
69
|
+
margin-top: -0.3rem;
|
|
70
|
+
border-bottom: 0.3rem solid transparent;
|
|
71
|
+
border-top: 0.3rem solid transparent;
|
|
72
|
+
border-left: 0;
|
|
73
|
+
border-right: 0.3rem solid var(--block-border-color);
|
|
74
|
+
}
|
|
75
|
+
&:after {
|
|
76
|
+
margin-top: -0.25rem;
|
|
77
|
+
border-right: 0.25rem solid var(--block-view-bg-color2);
|
|
78
|
+
border-top: 0.25rem solid transparent;
|
|
79
|
+
border-bottom: 0.25rem solid transparent;
|
|
80
|
+
}
|
|
81
|
+
&__item {
|
|
82
|
+
@include text($fs: 14px, $c: var(--global-font-color3));
|
|
83
|
+
line-height: 1.15rem;
|
|
84
|
+
padding: 0.05rem 1.2rem 0;
|
|
85
|
+
&:hover {
|
|
86
|
+
background-color: var(--popover-hover-bg-color);
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
</style>
|
|
92
|
+
|
|
93
|
+
<style>
|
|
94
|
+
:root {
|
|
95
|
+
--popover-hover-bg-color: #e8e8e8;
|
|
96
|
+
}
|
|
97
|
+
:root.dark-theme {
|
|
98
|
+
--popover-hover-bg-color: #28404d;
|
|
99
|
+
}
|
|
100
|
+
</style>
|
package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/ServersList.vue
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
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-wizards-datastore-add-nfs-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 {
|
|
44
|
+
UI_I_HeadItem,
|
|
45
|
+
UI_I_BodyItem,
|
|
46
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
47
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
48
|
+
import { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
49
|
+
import { UI_I_DataServersListItem } from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces'
|
|
50
|
+
import * as serversTable from '~/components/common/wizards/datastore/add/nfs/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 headItems = computed<UI_I_HeadItem[]>(() =>
|
|
70
|
+
serversTable.headItems(localization.value)
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
const bodyItems = ref<UI_I_BodyItem[][]>([])
|
|
74
|
+
watch(
|
|
75
|
+
() => props.dataTable,
|
|
76
|
+
(newValue) => {
|
|
77
|
+
if (!newValue?.length) {
|
|
78
|
+
bodyItems.value = []
|
|
79
|
+
return
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
bodyItems.value = serversTable.bodyItems(newValue)
|
|
83
|
+
},
|
|
84
|
+
{ deep: true, immediate: true }
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
const selectedServerForRemove = ref<number | null>(null)
|
|
88
|
+
const showTooltip = ref<boolean>(false)
|
|
89
|
+
const onShowTooltipForRemove = (server: UI_I_BodyItem[]): void => {
|
|
90
|
+
selectedServerForRemove.value = server[0].id
|
|
91
|
+
showTooltip.value = true
|
|
92
|
+
}
|
|
93
|
+
const onRemoveServerFromList = (removeItem: UI_I_BodyItem[]): void => {
|
|
94
|
+
const { text } = removeItem[0]
|
|
95
|
+
|
|
96
|
+
const serverList = props.dataTable.filter(
|
|
97
|
+
(server: UI_I_DataServersListItem) => server.server_name !== text
|
|
98
|
+
)
|
|
99
|
+
emits('update:data-table', serverList)
|
|
100
|
+
showTooltip.value = false
|
|
101
|
+
}
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<style lang="scss" scoped>
|
|
105
|
+
.servers-list {
|
|
106
|
+
height: inherit;
|
|
107
|
+
.data-table {
|
|
108
|
+
&__action-icon {
|
|
109
|
+
width: 16px;
|
|
110
|
+
height: 16px;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
position: relative;
|
|
113
|
+
fill: var(--ellipsis-vertical-icon-color);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
height: inherit;
|
|
117
|
+
:deep(.datagrid-outer-wrapper) {
|
|
118
|
+
height: inherit;
|
|
119
|
+
padding-top: 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
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 { UI_I_Localization } from '~/lib/models/interfaces'
|
|
9
|
+
import { serversTableItemsKeys } from '~/components/common/wizards/datastore/add/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 @@
|
|
|
1
|
+
export type T_ServersTableItemsTuple = ['server_name']
|
package/package.json
CHANGED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="ready-complete">
|
|
3
|
-
<common-details-list :items="properties" class="ready-complete__list list">
|
|
4
|
-
<template #default="{ item }">
|
|
5
|
-
<common-details-item
|
|
6
|
-
:has-children="true"
|
|
7
|
-
open-by-default
|
|
8
|
-
:test-id="item.testId"
|
|
9
|
-
>
|
|
10
|
-
<template #stackBlockKey>
|
|
11
|
-
<span class="list__labels">
|
|
12
|
-
{{ item.label }}
|
|
13
|
-
</span>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<template #stackChildren>
|
|
17
|
-
<template
|
|
18
|
-
v-for="(item2, key2) in item.items"
|
|
19
|
-
:key="`${item2}_${key2}`"
|
|
20
|
-
>
|
|
21
|
-
<common-details-item
|
|
22
|
-
:has-children="false"
|
|
23
|
-
:test-id="item2.testId"
|
|
24
|
-
class="list__default-style"
|
|
25
|
-
>
|
|
26
|
-
<template #stackBlockKey>
|
|
27
|
-
<div>
|
|
28
|
-
{{ item2.label }}
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
<template #stackBlockContent>
|
|
32
|
-
<div v-if="item2.data">
|
|
33
|
-
<div
|
|
34
|
-
v-for="item3 in item2.data"
|
|
35
|
-
:key="item3"
|
|
36
|
-
class="flex-align-center"
|
|
37
|
-
>
|
|
38
|
-
<div class="vsphere-icon-host"></div>
|
|
39
|
-
<span>{{ item3 }}</span>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
<span v-else>
|
|
43
|
-
{{ item2.value }}
|
|
44
|
-
</span>
|
|
45
|
-
</template>
|
|
46
|
-
</common-details-item>
|
|
47
|
-
</template>
|
|
48
|
-
</template>
|
|
49
|
-
</common-details-item>
|
|
50
|
-
</template>
|
|
51
|
-
</common-details-list>
|
|
52
|
-
</div>
|
|
53
|
-
</template>
|
|
54
|
-
|
|
55
|
-
<script lang="ts" setup>
|
|
56
|
-
import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
57
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
58
|
-
|
|
59
|
-
const props = defineProps<{
|
|
60
|
-
dataReadyView: UI_I_DetailsItem[]
|
|
61
|
-
}>()
|
|
62
|
-
|
|
63
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
64
|
-
|
|
65
|
-
const properties = computed<UI_I_DetailsItem[]>(() => props.dataReadyView)
|
|
66
|
-
</script>
|
|
67
|
-
|
|
68
|
-
<style lang="scss" scoped>
|
|
69
|
-
@import '~/assets/scss/common/mixins.scss';
|
|
70
|
-
.ready-complete {
|
|
71
|
-
&__list {
|
|
72
|
-
@include flex($dir: column);
|
|
73
|
-
padding: 12px 0;
|
|
74
|
-
row-gap: 15px;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
.list {
|
|
78
|
-
&__labels {
|
|
79
|
-
@include text($fs: 13px, $fw: 700);
|
|
80
|
-
}
|
|
81
|
-
:deep(.list__default-style) {
|
|
82
|
-
.stack-block {
|
|
83
|
-
&__label {
|
|
84
|
-
align-items: flex-start;
|
|
85
|
-
}
|
|
86
|
-
&-content {
|
|
87
|
-
white-space: pre-line;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
</style>
|