bfg-common 1.5.93 → 1.5.95
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/scss/common/normalize.scss +9 -1
- package/components/atoms/alert/Notification.vue +2 -4
- package/components/atoms/autocomplete/Autocomplete.vue +5 -6
- package/components/atoms/collapse/CollapseNav.vue +7 -3
- package/components/atoms/collapse/CollapseNavItem.vue +1 -1
- package/components/atoms/comboDropdownMenu/ComboDropdownMenu.vue +1 -1
- package/components/atoms/combobox/Combobox.vue +4 -4
- package/components/atoms/datepicker/Datepicker.vue +10 -10
- package/components/atoms/dropdown/Portlet.vue +1 -2
- package/components/atoms/dropdown/dropdown/Dropdown.vue +3 -3
- package/components/atoms/dropdown/tree/Tree.vue +3 -3
- package/components/atoms/list/SelectList.vue +1 -1
- package/components/atoms/list/dragDropList/DragDropList.vue +18 -9
- package/components/atoms/modal/Modal.vue +5 -3
- package/components/atoms/modal/bySteps/BySteps.vue +8 -8
- package/components/atoms/nav/NavBar.vue +1 -1
- package/components/atoms/nav/VerticalNavBar.vue +1 -1
- package/components/atoms/notificationBar/NotificationBar.vue +2 -2
- package/components/atoms/popover/Popover.vue +3 -5
- package/components/atoms/popover/lib/models/interfaces.ts +4 -0
- package/components/atoms/select/TheSelect.vue +5 -4
- package/components/atoms/stack/StackBlock.vue +1 -1
- package/components/atoms/stack/StackContent.vue +1 -1
- package/components/atoms/step/VerticalStep.vue +1 -1
- package/components/atoms/step/lib/models/verticalStepItem.ts +1 -3
- package/components/atoms/switch/Switch.vue +6 -6
- package/components/atoms/table/compact/Compact.vue +23 -20
- package/components/atoms/table/dataGrid/DataGrid.vue +27 -24
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +5 -5
- package/components/atoms/table/dataGrid/DataGridPage.vue +6 -8
- package/components/atoms/table/info/Info.vue +2 -2
- package/components/atoms/table/simpleEvent/SimpleEvent.vue +1 -1
- package/components/atoms/table/simpleInfo/SimpleInfo.vue +1 -1
- package/components/atoms/tabs/Tabs.vue +4 -2
- package/components/atoms/tooltip/Signpost.vue +1 -0
- package/components/atoms/tooltip/Tooltip.vue +1 -1
- package/components/atoms/tooltip/TooltipError.vue +1 -0
- package/components/atoms/wizard/Wizard.vue +1 -1
- package/components/atoms/wizard/step/Step.vue +1 -1
- package/components/common/accordion/Recursion.vue +2 -2
- package/components/common/adapterManager/AddAdapterModal.vue +2 -2
- package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +1 -1
- package/components/common/adapterManager/ui/table/Adapters.vue +1 -1
- package/components/common/adapterManager/ui/table/Header.vue +1 -1
- package/components/common/adapterManager/ui/table/Table.vue +4 -4
- package/components/common/browse/Browse.vue +1 -1
- package/components/common/browse/BrowseNew.vue +3 -3
- package/components/common/browse/BrowseOld.vue +3 -3
- package/components/common/browse/blocks/TitleNew.vue +4 -4
- package/components/common/browse/blocks/TitleOld.vue +5 -5
- package/components/common/browse/blocks/contents/Files.vue +1 -1
- package/components/common/browse/blocks/contents/FilesOld.vue +2 -2
- package/components/common/browse/blocks/contents/filesNew/FilesNew.vue +1 -1
- package/components/common/browse/blocks/info/Date.vue +1 -0
- package/components/common/chartOptionsModal/counters/timespan/form/FormNew.vue +1 -1
- package/components/common/context/Context.vue +1 -1
- package/components/common/context/recursion/RecursionOld.vue +2 -2
- package/components/common/details/DetailsItem.vue +1 -1
- package/components/common/details/lib/models/interfaces.ts +1 -0
- package/components/common/feedback/Buttons.vue +1 -1
- package/components/common/feedback/Feedback.vue +4 -2
- package/components/common/feedback/Message.vue +5 -5
- package/components/common/feedback/VisitPortal.vue +1 -0
- package/components/common/graph/graphNew/GraphNew.vue +2 -2
- package/components/common/graph/lib/utils/renderGraph.ts +1 -1
- package/components/common/layout/theHeader/feedback/new/New.vue +1 -1
- package/components/common/layout/theHeader/feedback/new/additionalDetails/AdditionalDetails.vue +9 -7
- package/components/common/layout/theHeader/feedback/new/additionalDetails/Headline.vue +2 -3
- package/components/common/layout/theHeader/feedback/new/description/Description.vue +1 -1
- package/components/common/layout/theHeader/feedback/new/email/Email.vue +1 -1
- package/components/common/layout/theHeader/feedback/new/subtitle/Subtitle.vue +2 -3
- package/components/common/layout/theHeader/helpMenu/aboutNew/AboutNew.vue +2 -2
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +2 -7
- package/components/common/layout/theHeader/helpMenu/helpMenuOld/HelpMenuOld.vue +1 -1
- package/components/common/layout/theHeader/modals/Reconnect.vue +2 -2
- package/components/common/layout/theHeader/modals/RedirectLogin.vue +3 -3
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePasswordNew.vue +8 -8
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePasswordOld.vue +3 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesNew.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesOld.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguageNew.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguageOld.vue +2 -5
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsoleOld.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/InventoryNew.vue +1 -1
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +2 -2
- package/components/common/layout/theHeader/userMenu/userMenuNew/lib/config/dropMenu.ts +1 -1
- package/components/common/layout/theHeader/userMenu/userMenuOld/UserMenuOld.vue +1 -1
- package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +2 -2
- package/components/common/modals/Rename.vue +2 -2
- package/components/common/modals/confirmByInput/ConfirmByInput.vue +2 -3
- package/components/common/modals/confirmByInput/ConfirmByInputOld.vue +3 -3
- package/components/common/modals/confirmation/ConfirmationOld.vue +1 -1
- package/components/common/modals/unsavedChanges/UnsavedChanges.vue +1 -1
- package/components/common/monitor/advanced/Advanced.vue +1 -1
- package/components/common/monitor/advanced/AdvancedNew.vue +1 -1
- package/components/common/monitor/advanced/AdvancedOld.vue +1 -1
- package/components/common/monitor/advanced/graphView/GraphViewNew.vue +1 -1
- package/components/common/monitor/advanced/graphView/GraphViewOld.vue +1 -1
- package/components/common/monitor/advanced/table/Table.vue +1 -1
- package/components/common/monitor/advanced/table/tableNew/TableNew.vue +2 -2
- package/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable.ts +2 -2
- package/components/common/monitor/advanced/tools/ToolsOld.vue +2 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModalOld.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/NotificationOld.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/ActionsOld.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/saveOptionsModal/SaveOptionsModal.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/CountersNew.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableOld/lib/config/tableConfig.ts +2 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/config/objectTable.ts +10 -3
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/ObjectNew.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectOld/ObjectOld.vue +2 -2
- package/components/common/monitor/advanced/tools/lib/utils/countCores.ts +1 -1
- package/components/common/monitor/lib/models/interfaces.ts +1 -1
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModalOld.vue +3 -3
- package/components/common/monitor/overview/filters/customIntervalModal/customIntervalModalNew/CustomIntervalModalNew.vue +4 -3
- package/components/common/monitor/resourceAllocation/lib/models/interfaces.ts +8 -8
- package/components/common/monitor/resourceAllocation/resourceAllocation.vue +2 -2
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +1 -1
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/Notification.vue +1 -1
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/SaveOptionsModal.vue +1 -1
- package/components/common/pages/hardwareHealth/tableView/lib/config/alertWarningTable.ts +1 -1
- package/components/common/pages/hardwareHealth/tableView/lib/config/historyTestimonyTable.ts +5 -5
- package/components/common/wizards/datastore/add/Add.vue +0 -1
- package/components/common/wizards/datastore/add/New.vue +1 -16
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +1 -1
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +0 -10
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDevice.vue +78 -223
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +19 -188
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceOld.vue +199 -12
- package/components/common/wizards/datastore/add/steps/nameAndDevice/lib/config/selectOptions.ts +6 -3
- package/components/common/wizards/datastore/add/steps/nameAndDevice/lib/models/interfaces.ts +1 -11
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/Table.vue +22 -33
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces.ts +14 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/new/New.vue +118 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/new/lib/config/lunDiskTable.ts +86 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/old/Old.vue +133 -0
- package/components/common/wizards/datastore/add/steps/readyComplete/ReadyCompleteNew.vue +1 -0
- package/components/common/wizards/datastore/add/steps/readyComplete/lib/config/propertiesDetails.ts +9 -3
- package/package.json +1 -1
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/types.ts +0 -1
- package/components/common/wizards/datastore/add/steps/nameAndDevice/lib/models/types.ts +0 -1
- /package/components/common/wizards/datastore/add/steps/nameAndDevice/table/{lib → old/lib}/config/lunDiskTable.ts +0 -0
- /package/components/common/wizards/datastore/add/steps/nameAndDevice/table/{lib → old/lib}/config/tableKeys.ts +0 -0
- /package/components/common/wizards/datastore/add/steps/nameAndDevice/table/{lib → old/lib}/models/types.ts +0 -0
|
@@ -1,37 +1,224 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<div class="device-selection-step">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="props.alertMessages?.length"
|
|
5
|
+
:test-id="errorAlertDataId"
|
|
6
|
+
status="alert-danger"
|
|
7
|
+
:items="props.alertMessages"
|
|
8
|
+
@remove="onHideAlert"
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<div class="clr-form-control clr-row">
|
|
12
|
+
<label for="" class="clr-control-label clr-col-md-2">
|
|
13
|
+
{{ localization.common.name }}
|
|
14
|
+
</label>
|
|
15
|
+
|
|
16
|
+
<div class="clr-control-container" :class="nameErrorText && 'clr-error'">
|
|
17
|
+
<div class="flex-align-center">
|
|
18
|
+
<input
|
|
19
|
+
id="device-selection-input"
|
|
20
|
+
v-model="formModelLocal.name"
|
|
21
|
+
data-id="device-selection-input"
|
|
22
|
+
type="text"
|
|
23
|
+
class="clr-input"
|
|
24
|
+
@blur="initValidation(true)"
|
|
25
|
+
@input="initValidation(false)"
|
|
26
|
+
/>
|
|
27
|
+
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="clr-subtext" data-id="storm-datastore-name-field-require">
|
|
31
|
+
{{ nameErrorText }}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<atoms-alert
|
|
37
|
+
v-if="isShowInfoAlert"
|
|
38
|
+
test-id="device-selection-information-alert"
|
|
39
|
+
class="device-selection-step__alert-info"
|
|
40
|
+
status="alert-info"
|
|
41
|
+
:items="[localization.common.nameAndDeviceSelectionAlertInfo]"
|
|
42
|
+
@remove="isShowInfoAlert = false"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<div
|
|
46
|
+
v-if="props.project === 'sphere' && !props.hostId"
|
|
47
|
+
class="clr-form-control clr-row"
|
|
48
|
+
>
|
|
49
|
+
<label class="clr-control-label clr-col-12 clr-col-md-2">
|
|
50
|
+
{{ localization.common.selectHost }}
|
|
51
|
+
</label>
|
|
52
|
+
|
|
53
|
+
<div>
|
|
54
|
+
<div class="clr-select-wrapper">
|
|
55
|
+
<select
|
|
56
|
+
id="device-host-select"
|
|
57
|
+
v-model="formModelLocal.hosts"
|
|
58
|
+
data-id="device-host-select"
|
|
59
|
+
class="dropdown-toggle"
|
|
60
|
+
@change="emits('select-host')"
|
|
61
|
+
>
|
|
62
|
+
<option
|
|
63
|
+
v-for="(item, index) in hostOptions"
|
|
64
|
+
:key="index"
|
|
65
|
+
:value="[item.value]"
|
|
66
|
+
:disabled="item.disabled"
|
|
67
|
+
>
|
|
68
|
+
{{ item.text }}
|
|
69
|
+
</option>
|
|
70
|
+
</select>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="clr-subtext">
|
|
73
|
+
{{ localization.common.selectHostToViewAccessible }}
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div class="device-selection-step__disk-list">
|
|
79
|
+
<common-wizards-datastore-add-shared-storm-device-selection-table
|
|
80
|
+
v-model="formModelLocal.lunDisk"
|
|
81
|
+
:lun-disks-data="props.lunDisksData"
|
|
82
|
+
:pagination="pagination"
|
|
83
|
+
:loading="props.loading"
|
|
84
|
+
:is-main-filter="props.isMainFilter"
|
|
85
|
+
@pagination="updatePagination"
|
|
86
|
+
@sort="emits('sort', $event)"
|
|
87
|
+
@main-filter="emits('main-filter', $event)"
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
5
90
|
</div>
|
|
6
91
|
</template>
|
|
7
92
|
|
|
8
93
|
<script lang="ts" setup>
|
|
9
94
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
10
95
|
import type {
|
|
11
|
-
|
|
96
|
+
UI_I_Localization,
|
|
12
97
|
UI_I_ArbitraryObject,
|
|
13
98
|
} from '~/lib/models/interfaces'
|
|
99
|
+
import { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
100
|
+
import type { UI_I_SelectHostOptions } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/lib/models/interfaces'
|
|
14
101
|
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
102
|
+
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
103
|
+
import type { UI_I_CreateStorageLunDisks } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces'
|
|
104
|
+
import { validateNameAndGenerateDataId } from '~/components/common/wizards/datastore/add/lib/utils'
|
|
105
|
+
import { dynamicSteps } from '~/components/common/wizards/datastore/add/lib/config/steps'
|
|
17
106
|
|
|
107
|
+
const formModelLocal = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
|
108
|
+
const isShowInfoAlert = defineModel<boolean>('isShowInfoAlert', {
|
|
109
|
+
required: true,
|
|
110
|
+
})
|
|
18
111
|
const props = defineProps<{
|
|
19
112
|
project: UI_T_Project
|
|
20
|
-
stepId: number
|
|
21
113
|
alertMessages: string[]
|
|
22
114
|
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
23
|
-
datastoreType: UI_T_DatastoreTypeCode
|
|
24
|
-
hosts?: UI_I_CreateDatastoreHosts | undefined
|
|
25
115
|
isMainFilter?: boolean
|
|
26
116
|
hostId?: string
|
|
117
|
+
lunDisksData: UI_I_CreateStorageLunDisks
|
|
118
|
+
hostOptions: UI_I_SelectHostOptions[]
|
|
119
|
+
loading: boolean
|
|
27
120
|
}>()
|
|
28
|
-
const model = defineModel<any>()
|
|
29
121
|
const emits = defineEmits<{
|
|
122
|
+
(event: 'select-host'): void
|
|
30
123
|
(event: 'hide-alert', value: number): void
|
|
31
124
|
(event: 'main-filter', value: string): void
|
|
125
|
+
(event: 'sort', value: string): void
|
|
32
126
|
}>()
|
|
33
127
|
|
|
34
|
-
|
|
128
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
129
|
+
|
|
130
|
+
const isInitDatastoreNameValidation = ref<boolean>(false)
|
|
131
|
+
const initValidation = (onlyBlur: boolean): void => {
|
|
132
|
+
onlyBlur && (isInitDatastoreNameValidation.value = true)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const nameErrorText = computed<string>(() => {
|
|
136
|
+
if (
|
|
137
|
+
props.messagesFields?.datastoreName?.field &&
|
|
138
|
+
!formModelLocal.value.name
|
|
139
|
+
) {
|
|
140
|
+
return props.messagesFields.datastoreName.field
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (!isInitDatastoreNameValidation.value) return ''
|
|
144
|
+
return !formModelLocal.value.name
|
|
145
|
+
? localization.value.common.specifyDatastoreName
|
|
146
|
+
: ''
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
const defaultDataId = ref<string>('device-selection-alert-error')
|
|
150
|
+
const errorAlertDataId = computed<string>(() => {
|
|
151
|
+
if (!props.alertMessages?.length) return
|
|
152
|
+
|
|
153
|
+
return !formModelLocal.value.lunDisk.length
|
|
154
|
+
? `${defaultDataId.value}-not-selected-lundisk`
|
|
155
|
+
: validateNameAndGenerateDataId(
|
|
156
|
+
formModelLocal.value.name,
|
|
157
|
+
props.alertMessages[0],
|
|
158
|
+
defaultDataId.value
|
|
159
|
+
)
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
/* Lun disk table */
|
|
163
|
+
|
|
164
|
+
const pagination = ref<UI_I_Pagination>({
|
|
165
|
+
page: 1,
|
|
166
|
+
pageSize: 35,
|
|
167
|
+
})
|
|
168
|
+
const sort = ref<string | null>(null)
|
|
169
|
+
|
|
170
|
+
const updatePagination = (event: UI_I_Pagination): void => {
|
|
171
|
+
pagination.value = event
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const onHideAlert = (): void => {
|
|
175
|
+
emits('hide-alert', dynamicSteps.nameAndDevice)
|
|
176
|
+
}
|
|
35
177
|
</script>
|
|
36
178
|
|
|
37
|
-
<style lang="scss" scoped
|
|
179
|
+
<style lang="scss" scoped>
|
|
180
|
+
.device-selection-step {
|
|
181
|
+
display: flex;
|
|
182
|
+
flex-direction: column;
|
|
183
|
+
height: inherit;
|
|
184
|
+
overflow-y: auto;
|
|
185
|
+
overflow-x: hidden;
|
|
186
|
+
&__alert-info {
|
|
187
|
+
:deep(.alert-text) {
|
|
188
|
+
font-size: 11px;
|
|
189
|
+
letter-spacing: normal;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
.dropdown-toggle {
|
|
193
|
+
min-width: 160px;
|
|
194
|
+
}
|
|
195
|
+
.clr-form-control {
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: row;
|
|
198
|
+
|
|
199
|
+
.clr-control-container {
|
|
200
|
+
min-height: 48px;
|
|
201
|
+
&.clr-error {
|
|
202
|
+
.clr-subtext,
|
|
203
|
+
.error-icon {
|
|
204
|
+
display: block;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
.clr-subtext,
|
|
208
|
+
.error-icon {
|
|
209
|
+
display: none;
|
|
210
|
+
}
|
|
211
|
+
.error-icon {
|
|
212
|
+
fill: #db2100;
|
|
213
|
+
width: 24px;
|
|
214
|
+
height: 24px;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
&__disk-list {
|
|
219
|
+
display: flex;
|
|
220
|
+
flex-direction: column;
|
|
221
|
+
height: 100%;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
</style>
|
package/components/common/wizards/datastore/add/steps/nameAndDevice/lib/config/selectOptions.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import { UI_I_SelectHostOptions } from '~/components/common/wizards/datastore/add/
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_SelectHostOptions } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/lib/models/interfaces'
|
|
3
3
|
|
|
4
4
|
const constructHostListFunc = (
|
|
5
5
|
data: { host: string; id: string }[]
|
|
@@ -19,5 +19,8 @@ export const hostsOptionsFunc = (
|
|
|
19
19
|
|
|
20
20
|
const data = constructHostListFunc(hosts)
|
|
21
21
|
|
|
22
|
-
return [
|
|
22
|
+
return [
|
|
23
|
+
{ text: localization.common.selectHost, value: '', disabled: true },
|
|
24
|
+
...data,
|
|
25
|
+
]
|
|
23
26
|
}
|
package/components/common/wizards/datastore/add/steps/nameAndDevice/lib/models/interfaces.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UI_I_DataTableQuery } from '~/lib/models/table/interfaces'
|
|
1
|
+
import type { UI_I_DataTableQuery } from '~/lib/models/table/interfaces'
|
|
2
2
|
|
|
3
3
|
export interface UI_I_LunDiskSpherePayload extends UI_I_DataTableQuery {
|
|
4
4
|
host: string
|
|
@@ -14,13 +14,3 @@ export interface UI_I_SelectHostOptions {
|
|
|
14
14
|
value: string
|
|
15
15
|
disabled?: boolean
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
export interface UI_I_CreateStorageLunDiskItem {
|
|
19
|
-
name: string
|
|
20
|
-
identifier: string
|
|
21
|
-
lun: number
|
|
22
|
-
capacity_mb: string
|
|
23
|
-
hardware_acceleration: string
|
|
24
|
-
drive_type: string
|
|
25
|
-
sector_format: string
|
|
26
|
-
}
|
|
@@ -1,32 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
:loading="loading"
|
|
16
|
-
:is-main-filter="props.isMainFilter"
|
|
17
|
-
:main-filter-placeholder="localization.filter"
|
|
18
|
-
hide-page-size
|
|
19
|
-
@main-filter="onMainFiltering"
|
|
20
|
-
@sorting="sorting"
|
|
21
|
-
>
|
|
22
|
-
<template #icon="{ item }">
|
|
23
|
-
<span :class="['datagrid-cell-icon', item.data.iconClassName]" />
|
|
24
|
-
<span class="text-ellipsis">
|
|
25
|
-
{{ item.text }}
|
|
26
|
-
</span>
|
|
27
|
-
</template>
|
|
28
|
-
</atoms-table-data-grid>
|
|
29
|
-
</div>
|
|
2
|
+
<common-wizards-datastore-add-steps-name-and-device-table-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
:data-table="props.lunDisksData?.items || []"
|
|
5
|
+
:total-items="props.lunDisksData?.total_items || 0"
|
|
6
|
+
:total-pages="props.lunDisksData?.total_pages || 1"
|
|
7
|
+
/>
|
|
8
|
+
|
|
9
|
+
<common-wizards-datastore-add-steps-name-and-device-table-old
|
|
10
|
+
v-else
|
|
11
|
+
:data-table="props.lunDisksData?.items || []"
|
|
12
|
+
:total-items="props.lunDisksData?.total_items || 0"
|
|
13
|
+
:total-pages="props.lunDisksData?.total_pages || 1"
|
|
14
|
+
/>
|
|
30
15
|
</template>
|
|
31
16
|
|
|
32
17
|
<script lang="ts" setup>
|
|
@@ -38,18 +23,19 @@ import type {
|
|
|
38
23
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
39
24
|
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
40
25
|
import { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
41
|
-
import {
|
|
26
|
+
import type {
|
|
27
|
+
UI_I_CreateStorageLunDiskItem,
|
|
28
|
+
UI_I_CreateStorageLunDisks,
|
|
29
|
+
} from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces'
|
|
42
30
|
import * as lunDiskTable from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/table/lib/config/lunDiskTable'
|
|
43
31
|
|
|
32
|
+
const modelLunDisk = defineModel<UI_I_CreateStorageLunDiskItem[]>()
|
|
44
33
|
const props = defineProps<{
|
|
45
|
-
|
|
34
|
+
lunDisksData: UI_I_CreateStorageLunDisks
|
|
46
35
|
loading: boolean
|
|
47
|
-
totalItems: number
|
|
48
|
-
totalPages: number
|
|
49
36
|
pagination: UI_I_Pagination
|
|
50
37
|
isMainFilter?: boolean
|
|
51
38
|
}>()
|
|
52
|
-
const modelLunDisk = defineModel<UI_I_CreateStorageLunDiskItem[]>()
|
|
53
39
|
const emits = defineEmits<{
|
|
54
40
|
(event: 'pagination', value: UI_I_Pagination): void
|
|
55
41
|
(event: 'sort', value: string): void
|
|
@@ -57,6 +43,9 @@ const emits = defineEmits<{
|
|
|
57
43
|
}>()
|
|
58
44
|
|
|
59
45
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
46
|
+
const { $store }: any = useNuxtApp()
|
|
47
|
+
|
|
48
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
60
49
|
|
|
61
50
|
const sorting = (e: [number, boolean]): void => {
|
|
62
51
|
const [column, status] = e
|
package/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
|
|
2
|
+
|
|
3
|
+
export interface UI_I_CreateStorageLunDiskItem {
|
|
4
|
+
name: string
|
|
5
|
+
identifier: string
|
|
6
|
+
lun: number
|
|
7
|
+
capacity_mb: string
|
|
8
|
+
hardware_acceleration: string
|
|
9
|
+
drive_type: string
|
|
10
|
+
sector_format: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UI_I_CreateStorageLunDisks
|
|
14
|
+
extends API_UI_I_DataTable<UI_I_CreateStorageLunDiskItem[]> {}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="host-accessibility-table">
|
|
3
|
+
<h2>
|
|
4
|
+
{{ tableHeadline }}
|
|
5
|
+
</h2>
|
|
6
|
+
|
|
7
|
+
<ui-data-table
|
|
8
|
+
test-id="accessibility-table"
|
|
9
|
+
:data="data"
|
|
10
|
+
:options="options"
|
|
11
|
+
:loading="props.loading"
|
|
12
|
+
:total-pages="props.totalPages"
|
|
13
|
+
:total-items="props.totalItems"
|
|
14
|
+
:texts="texts"
|
|
15
|
+
class="accessibility-host-table"
|
|
16
|
+
size="sm"
|
|
17
|
+
@select-row="onSelectRow"
|
|
18
|
+
>
|
|
19
|
+
<template #icon="{ item }">
|
|
20
|
+
<span :class="['icon', item.data.iconClassName]" />
|
|
21
|
+
<span class="text-ellipsis">
|
|
22
|
+
{{ item.text }}
|
|
23
|
+
</span>
|
|
24
|
+
</template>
|
|
25
|
+
</ui-data-table>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script lang="ts" setup>
|
|
30
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
31
|
+
import type {
|
|
32
|
+
UI_I_DataTable,
|
|
33
|
+
UI_I_DataTableHeader,
|
|
34
|
+
UI_I_DataTableBody,
|
|
35
|
+
UI_I_TableTexts,
|
|
36
|
+
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
37
|
+
import {
|
|
38
|
+
options,
|
|
39
|
+
getHeaderDataFunc,
|
|
40
|
+
getBodyDataFunc,
|
|
41
|
+
} from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/new/lib/config/compatibleTable'
|
|
42
|
+
import { UI_I_CompatibleHostsTableItem } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
43
|
+
|
|
44
|
+
const selectedHostsIdLocal = defineModel<string[]>({ required: true })
|
|
45
|
+
const props = defineProps<{
|
|
46
|
+
tableData: UI_I_CompatibleHostsTableItem[]
|
|
47
|
+
totalItems: number
|
|
48
|
+
totalPages: number
|
|
49
|
+
loading: boolean
|
|
50
|
+
}>()
|
|
51
|
+
|
|
52
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
53
|
+
|
|
54
|
+
const texts = computed<UI_I_TableTexts>(() => ({
|
|
55
|
+
searchHere: localization.value.common.searchHere,
|
|
56
|
+
rowsPerPage: localization.value.common.rowsPerPage,
|
|
57
|
+
of: localization.value.common.of,
|
|
58
|
+
selected: localization.value.common.selected,
|
|
59
|
+
columns: localization.value.common.columns,
|
|
60
|
+
previous: localization.value.common.previous,
|
|
61
|
+
next: localization.value.common.next,
|
|
62
|
+
noItemsFound: localization.value.common.noItemsFound,
|
|
63
|
+
exportAll: localization.value.common.exportAll,
|
|
64
|
+
exportSelected: localization.value.common.exportSelected,
|
|
65
|
+
all: localization.value.common.all,
|
|
66
|
+
filter: localization.value.common.filter,
|
|
67
|
+
}))
|
|
68
|
+
|
|
69
|
+
const data = computed<UI_I_DataTable>(() => ({
|
|
70
|
+
id: 'accessibility-host-table',
|
|
71
|
+
header: hostHeadItems.value,
|
|
72
|
+
body: hostBodyItems.value,
|
|
73
|
+
}))
|
|
74
|
+
|
|
75
|
+
const hostHeadItems = computed<UI_I_DataTableHeader[]>(() =>
|
|
76
|
+
getHeaderDataFunc(localization.value)
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
const hostBodyItems = ref<UI_I_DataTableBody[]>([])
|
|
80
|
+
watch(
|
|
81
|
+
() => props.tableData,
|
|
82
|
+
(newValue: UI_I_CompatibleHostsTableItem[]) => {
|
|
83
|
+
if (!newValue?.length) {
|
|
84
|
+
hostBodyItems.value = []
|
|
85
|
+
return
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
hostBodyItems.value = getBodyDataFunc(newValue)
|
|
89
|
+
},
|
|
90
|
+
{ deep: true, immediate: true }
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
const tableHeadline = computed<string>(() => {
|
|
94
|
+
const { selected } = localization.value.common
|
|
95
|
+
return ` ${props.totalItems} ${selected}`
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
const onSelectRow = (value: UI_I_DataTableBody[]): void => {
|
|
99
|
+
// TODO поправить сейчас работает неправильно < selectedHostsIdLocal >
|
|
100
|
+
selectedHostsIdLocal.value = value?.[0].row
|
|
101
|
+
}
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<style lang="scss" scoped>
|
|
105
|
+
.host-accessibility-table {
|
|
106
|
+
h2 {
|
|
107
|
+
font-family: Inter, serif;
|
|
108
|
+
color: var(--title-form-first-color);
|
|
109
|
+
font-weight: 400;
|
|
110
|
+
font-size: 12px;
|
|
111
|
+
line-height: 100%;
|
|
112
|
+
margin-bottom: 12px;
|
|
113
|
+
}
|
|
114
|
+
.icon {
|
|
115
|
+
margin-right: 4px;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
</style>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_DataTableBody,
|
|
3
|
+
UI_I_DataTableOptions,
|
|
4
|
+
UI_I_DataTableHeader,
|
|
5
|
+
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
+
import type { UI_I_CompatibleHostsTableItem } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
8
|
+
import {
|
|
9
|
+
hostIconByState,
|
|
10
|
+
clusterIconByState,
|
|
11
|
+
} from '~/components/common/lib/config/states'
|
|
12
|
+
|
|
13
|
+
export const getHeaderDataFunc = (
|
|
14
|
+
localization: UI_I_Localization
|
|
15
|
+
): UI_I_DataTableHeader[] => [
|
|
16
|
+
{
|
|
17
|
+
col: 'col0',
|
|
18
|
+
colName: 'host',
|
|
19
|
+
text: localization.common.host,
|
|
20
|
+
isSortable: true,
|
|
21
|
+
sort: 'asc',
|
|
22
|
+
width: '250px',
|
|
23
|
+
show: true,
|
|
24
|
+
filter: false,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
col: 'col1',
|
|
28
|
+
colName: 'cluster',
|
|
29
|
+
text: localization.common.cluster,
|
|
30
|
+
isSortable: true,
|
|
31
|
+
sort: 'asc',
|
|
32
|
+
width: '250px',
|
|
33
|
+
show: true,
|
|
34
|
+
filter: false,
|
|
35
|
+
},
|
|
36
|
+
]
|
|
37
|
+
export const options: UI_I_DataTableOptions = {
|
|
38
|
+
perPageOptions: [{ text: '10', value: 100, default: true }],
|
|
39
|
+
isSelectable: true,
|
|
40
|
+
isFocusable: false,
|
|
41
|
+
showPagination: false,
|
|
42
|
+
showPaginationOnTop: false,
|
|
43
|
+
showPageInfo: false,
|
|
44
|
+
isSortable: true,
|
|
45
|
+
server: true,
|
|
46
|
+
isResizable: true,
|
|
47
|
+
showSearch: false,
|
|
48
|
+
showSelectedRows: false,
|
|
49
|
+
showColumnManager: false,
|
|
50
|
+
withActions: false,
|
|
51
|
+
selectType: 'checkbox',
|
|
52
|
+
inBlock: true,
|
|
53
|
+
showExport: false,
|
|
54
|
+
withCollapse: false,
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const getBodyDataFunc = (
|
|
58
|
+
bodyData: UI_I_CompatibleHostsTableItem[]
|
|
59
|
+
): UI_I_DataTableBody[] => {
|
|
60
|
+
return bodyData.map((host, _index: number) => {
|
|
61
|
+
return {
|
|
62
|
+
row: Number(host.id),
|
|
63
|
+
collapse: false,
|
|
64
|
+
isHiddenCollapse: false,
|
|
65
|
+
collapseToggle: false,
|
|
66
|
+
data: [
|
|
67
|
+
{
|
|
68
|
+
key: 'icon',
|
|
69
|
+
col: 'col0',
|
|
70
|
+
text: host.host,
|
|
71
|
+
data: {
|
|
72
|
+
iconClassName: `vsphere-icon-${hostIconByState[host.state]}`,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
key: 'icon',
|
|
77
|
+
col: 'col1',
|
|
78
|
+
text: host.cluster || '--',
|
|
79
|
+
data: {
|
|
80
|
+
iconClassName: `vsphere-icon-${clusterIconByState[1]}`,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
}
|