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
|
@@ -2,7 +2,7 @@ import type {
|
|
|
2
2
|
UI_T_NfsType,
|
|
3
3
|
UI_T_DatastoreTypeCode,
|
|
4
4
|
} from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
5
|
-
import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastore/add/
|
|
5
|
+
import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces'
|
|
6
6
|
|
|
7
7
|
export interface UI_I_CreateDatastoreForm {
|
|
8
8
|
name: string
|
package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces.ts
CHANGED
|
@@ -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,95 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<atoms-alert
|
|
37
|
-
v-if="alertInfo"
|
|
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="onHideAlertInfo"
|
|
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="model.hosts"
|
|
58
|
-
data-id="device-host-select"
|
|
59
|
-
class="dropdown-toggle"
|
|
60
|
-
@change="onSelectHost"
|
|
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="model.lunDisk"
|
|
81
|
-
:data-table="dataTable?.items || []"
|
|
82
|
-
:total-items="dataTable?.total_items || 0"
|
|
83
|
-
:total-pages="dataTable?.total_pages || 1"
|
|
84
|
-
:pagination="pagination"
|
|
85
|
-
:loading="loading"
|
|
86
|
-
:is-main-filter="props.isMainFilter"
|
|
87
|
-
@pagination="updatePagination"
|
|
88
|
-
@sort="sortTable"
|
|
89
|
-
@main-filter="emits('main-filter', $event)"
|
|
90
|
-
/>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
2
|
+
<common-wizards-datastore-add-steps-name-and-device-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model="formModel"
|
|
5
|
+
v-model:is-show-info-alert="isShowAlertInfo"
|
|
6
|
+
:project="props.project"
|
|
7
|
+
:messages-fields="props.messagesFields"
|
|
8
|
+
:host-id="props.hostId"
|
|
9
|
+
:lun-disks-data="lunDisksData"
|
|
10
|
+
:host-options="hostOptions"
|
|
11
|
+
:is-main-filter="props.isMainFilter"
|
|
12
|
+
:loading="loading"
|
|
13
|
+
@select-host="onSelectHost"
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
<common-wizards-datastore-add-steps-name-and-device-old
|
|
17
|
+
v-else
|
|
18
|
+
v-model="formModel"
|
|
19
|
+
v-model:is-show-info-alert="isShowAlertInfo"
|
|
20
|
+
:project="props.project"
|
|
21
|
+
:alert-messages="props.alertMessages"
|
|
22
|
+
:messages-fields="props.messagesFields"
|
|
23
|
+
:host-id="props.hostId"
|
|
24
|
+
:lun-disks-data="lunDisksData"
|
|
25
|
+
:host-options="hostOptions"
|
|
26
|
+
:is-main-filter="props.isMainFilter"
|
|
27
|
+
:loading="loading"
|
|
28
|
+
@select-host="onSelectHost"
|
|
29
|
+
@sort="onSortTable"
|
|
30
|
+
@hide-alert="(e) => emits('hide-alert', e)"
|
|
31
|
+
/>
|
|
93
32
|
</template>
|
|
94
33
|
|
|
95
34
|
<script lang="ts" setup>
|
|
@@ -98,112 +37,46 @@ import type {
|
|
|
98
37
|
UI_I_Localization,
|
|
99
38
|
UI_I_ArbitraryObject,
|
|
100
39
|
} from '~/lib/models/interfaces'
|
|
101
|
-
import {
|
|
102
|
-
API_UI_I_DataTable,
|
|
40
|
+
import type {
|
|
103
41
|
UI_I_Pagination,
|
|
104
42
|
UI_I_DataTableQuery,
|
|
105
43
|
} from '~/lib/models/table/interfaces'
|
|
106
44
|
import type {
|
|
107
|
-
UI_I_CreateStorageLunDiskItem,
|
|
108
45
|
UI_I_LunDiskSpherePayload,
|
|
109
46
|
UI_I_SelectHostOptions,
|
|
110
|
-
} from '~/components/common/wizards/datastore/add/
|
|
47
|
+
} from '~/components/common/wizards/datastore/add/steps/nameAndDevice/lib/models/interfaces'
|
|
111
48
|
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
112
|
-
import type {
|
|
113
|
-
import type {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
49
|
+
import type { UI_I_CompatibleHosts } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
50
|
+
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
51
|
+
import type { UI_I_CreateStorageLunDisks } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces'
|
|
52
|
+
import { hostsOptionsFunc } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/lib/config/selectOptions'
|
|
116
53
|
|
|
54
|
+
const formModel = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
|
117
55
|
const props = defineProps<{
|
|
118
56
|
project: UI_T_Project
|
|
119
|
-
stepId: number
|
|
120
57
|
alertMessages: string[]
|
|
121
58
|
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
122
|
-
|
|
123
|
-
hosts?: UI_I_CreateDatastoreHosts | undefined
|
|
59
|
+
hosts?: UI_I_CompatibleHosts | undefined
|
|
124
60
|
isMainFilter?: boolean
|
|
125
61
|
hostId?: string
|
|
126
62
|
}>()
|
|
127
|
-
const model = defineModel<any>()
|
|
128
63
|
const emits = defineEmits<{
|
|
129
64
|
(event: 'hide-alert', value: number): void
|
|
130
65
|
(event: 'main-filter', value: string): void
|
|
131
66
|
}>()
|
|
132
67
|
|
|
133
68
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
134
|
-
const { $store } = useNuxtApp()
|
|
69
|
+
const { $store }: any = useNuxtApp()
|
|
135
70
|
|
|
136
|
-
const
|
|
137
|
-
const initValidation = (onlyBlur: boolean): void => {
|
|
138
|
-
onlyBlur && (isInitDatastoreNameValidation.value = true)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const nameErrorText = computed<string>(() => {
|
|
142
|
-
if (props.messagesFields?.datastoreName?.field && !model.value.name) {
|
|
143
|
-
return props.messagesFields.datastoreName.field
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (!isInitDatastoreNameValidation.value) return ''
|
|
147
|
-
return !model.value.name ? localization.value.common.specifyDatastoreName : ''
|
|
148
|
-
})
|
|
149
|
-
|
|
150
|
-
const defaultDataId = ref<string>('device-selection-alert-error')
|
|
151
|
-
const errorAlertDataId = computed<string>(() => {
|
|
152
|
-
if (!props.alertMessages?.length) return
|
|
153
|
-
|
|
154
|
-
return !model.value.lunDisk.length
|
|
155
|
-
? `${defaultDataId.value}-not-selected-lundisk`
|
|
156
|
-
: validateNameAndGenerateDataId(
|
|
157
|
-
model.value.name,
|
|
158
|
-
props.alertMessages[0],
|
|
159
|
-
defaultDataId.value
|
|
160
|
-
)
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
const alertInfo = ref<boolean>(true)
|
|
164
|
-
const onHideAlertInfo = (): void => {
|
|
165
|
-
alertInfo.value = false
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/* Lun disk table */
|
|
71
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
169
72
|
|
|
73
|
+
const isShowAlertInfo = ref<boolean>(true)
|
|
170
74
|
const pagination = ref<UI_I_Pagination>({
|
|
171
75
|
page: 1,
|
|
172
76
|
pageSize: 35,
|
|
173
77
|
})
|
|
174
78
|
const sort = ref<string | null>(null)
|
|
175
79
|
|
|
176
|
-
const updatePagination = (event: UI_I_Pagination): void => {
|
|
177
|
-
pagination.value = event
|
|
178
|
-
}
|
|
179
|
-
const sortTable = (event: string): void => {
|
|
180
|
-
sort.value = event
|
|
181
|
-
|
|
182
|
-
props.project === 'procurator'
|
|
183
|
-
? initLunDisksDataTable()
|
|
184
|
-
: initLunDisksForSphere(model.value.hosts[0])
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
const loading = computed<boolean>(() =>
|
|
188
|
-
$store.getters['storage/getLoading']('datastoreHosts')
|
|
189
|
-
)
|
|
190
|
-
const dataTable = computed<API_UI_I_DataTable<
|
|
191
|
-
UI_I_CreateStorageLunDiskItem[]
|
|
192
|
-
> | null>(() => {
|
|
193
|
-
return $store.getters['storage/getNewDatastoreHosts']
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
/* Select host */
|
|
197
|
-
const hostOptions = computed<UI_I_SelectHostOptions[]>(() =>
|
|
198
|
-
hostsOptionsFunc(localization.value, props.hosts?.items)
|
|
199
|
-
)
|
|
200
|
-
|
|
201
|
-
const onSelectHost = (): void => {
|
|
202
|
-
if (props.datastoreType !== 'shared-storm') return // TODO рефакторинг ( удалить проверку )
|
|
203
|
-
|
|
204
|
-
initLunDisksForSphere(model.value.hosts[0])
|
|
205
|
-
}
|
|
206
|
-
|
|
207
80
|
const initLunDisksForSphere = async (host: string): Promise<void> => {
|
|
208
81
|
await $store.dispatch('storage/A_GET_DISKS_LIST', {
|
|
209
82
|
host,
|
|
@@ -211,69 +84,51 @@ const initLunDisksForSphere = async (host: string): Promise<void> => {
|
|
|
211
84
|
sortBy: sort.value,
|
|
212
85
|
} as UI_I_LunDiskSpherePayload)
|
|
213
86
|
}
|
|
214
|
-
|
|
215
|
-
initLunDisksForSphere(props.hostId)
|
|
216
|
-
}
|
|
217
|
-
const initLunDisksDataTable = async (): Promise<void> => {
|
|
87
|
+
const initLunDisksForProcurator = async (): Promise<void> => {
|
|
218
88
|
await $store.dispatch('storage/A_GET_LUN_DISK_LIST', {
|
|
219
89
|
...pagination.value,
|
|
220
90
|
sortBy: sort.value,
|
|
221
91
|
} as UI_I_DataTableQuery)
|
|
222
92
|
}
|
|
223
93
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
94
|
+
onMounted(() => {
|
|
95
|
+
switch (props.project) {
|
|
96
|
+
case 'procurator':
|
|
97
|
+
initLunDisksForProcurator()
|
|
98
|
+
break
|
|
99
|
+
case 'sphere':
|
|
100
|
+
if (props.hostId) {
|
|
101
|
+
initLunDisksForSphere(props.hostId)
|
|
102
|
+
}
|
|
103
|
+
break
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
const loading = computed<boolean>(() =>
|
|
108
|
+
$store.getters['storage/getLoading']('datastoreHosts')
|
|
109
|
+
)
|
|
110
|
+
const lunDisksData = computed<UI_I_CreateStorageLunDisks | null>(() => {
|
|
111
|
+
return $store.getters['storage/getNewDatastoreHosts']
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
const onSortTable = (event: string): void => {
|
|
115
|
+
sort.value = event
|
|
116
|
+
|
|
117
|
+
props.project === 'procurator'
|
|
118
|
+
? initLunDisksForProcurator()
|
|
119
|
+
: initLunDisksForSphere(formModel.value.hosts[0])
|
|
227
120
|
}
|
|
121
|
+
// const updatePagination = (event: UI_I_Pagination): void => {
|
|
122
|
+
// pagination.value = event
|
|
123
|
+
// }
|
|
228
124
|
|
|
229
|
-
|
|
230
|
-
|
|
125
|
+
/* Select host for Sphere */
|
|
126
|
+
const hostOptions = computed<UI_I_SelectHostOptions[]>(() =>
|
|
127
|
+
hostsOptionsFunc(localization.value, props.hosts?.items)
|
|
128
|
+
)
|
|
129
|
+
const onSelectHost = (): void => {
|
|
130
|
+
initLunDisksForSphere(formModel.value.hosts[0])
|
|
231
131
|
}
|
|
232
132
|
</script>
|
|
233
133
|
|
|
234
|
-
<style lang="scss" scoped>
|
|
235
|
-
.device-selection-step {
|
|
236
|
-
display: flex;
|
|
237
|
-
flex-direction: column;
|
|
238
|
-
height: inherit;
|
|
239
|
-
overflow-y: auto;
|
|
240
|
-
overflow-x: hidden;
|
|
241
|
-
&__alert-info {
|
|
242
|
-
:deep(.alert-text) {
|
|
243
|
-
font-size: 11px;
|
|
244
|
-
letter-spacing: normal;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
.dropdown-toggle {
|
|
248
|
-
min-width: 160px;
|
|
249
|
-
}
|
|
250
|
-
.clr-form-control {
|
|
251
|
-
display: flex;
|
|
252
|
-
flex-direction: row;
|
|
253
|
-
|
|
254
|
-
.clr-control-container {
|
|
255
|
-
min-height: 48px;
|
|
256
|
-
&.clr-error {
|
|
257
|
-
.clr-subtext,
|
|
258
|
-
.error-icon {
|
|
259
|
-
display: block;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
.clr-subtext,
|
|
263
|
-
.error-icon {
|
|
264
|
-
display: none;
|
|
265
|
-
}
|
|
266
|
-
.error-icon {
|
|
267
|
-
fill: #db2100;
|
|
268
|
-
width: 24px;
|
|
269
|
-
height: 24px;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
&__disk-list {
|
|
274
|
-
display: flex;
|
|
275
|
-
flex-direction: column;
|
|
276
|
-
height: 100%;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
</style>
|
|
134
|
+
<style lang="scss" scoped></style>
|
|
@@ -1,88 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<
|
|
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="model.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="alertInfo"
|
|
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="onHideAlertInfo"
|
|
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="model.hosts"
|
|
58
|
-
data-id="device-host-select"
|
|
59
|
-
class="dropdown-toggle"
|
|
60
|
-
@change="onSelectHost"
|
|
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">
|
|
2
|
+
<div class="name-and-device">
|
|
3
|
+
<div class="name-and-device__disk-list">
|
|
79
4
|
<common-wizards-datastore-add-shared-storm-device-selection-table
|
|
80
|
-
v-model="
|
|
81
|
-
:data
|
|
82
|
-
:total-items="dataTable?.total_items || 0"
|
|
83
|
-
:total-pages="dataTable?.total_pages || 1"
|
|
5
|
+
v-model="formModelLocal.lunDisk"
|
|
6
|
+
:lun-disks-data="props.lunDisksData"
|
|
84
7
|
:pagination="pagination"
|
|
85
|
-
:loading="loading"
|
|
8
|
+
:loading="props.loading"
|
|
86
9
|
:is-main-filter="props.isMainFilter"
|
|
87
10
|
@pagination="updatePagination"
|
|
88
11
|
@sort="sortTable"
|
|
@@ -98,45 +21,38 @@ import type {
|
|
|
98
21
|
UI_I_Localization,
|
|
99
22
|
UI_I_ArbitraryObject,
|
|
100
23
|
} from '~/lib/models/interfaces'
|
|
101
|
-
import {
|
|
102
|
-
|
|
103
|
-
UI_I_Pagination,
|
|
104
|
-
UI_I_DataTableQuery,
|
|
105
|
-
} from '~/lib/models/table/interfaces'
|
|
106
|
-
import type {
|
|
107
|
-
UI_I_CreateStorageLunDiskItem,
|
|
108
|
-
UI_I_LunDiskSpherePayload,
|
|
109
|
-
UI_I_SelectHostOptions,
|
|
110
|
-
} from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
24
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
25
|
+
import type { UI_I_SelectHostOptions } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
111
26
|
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
112
|
-
import type {
|
|
27
|
+
import type { UI_I_CompatibleHosts } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
113
28
|
import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
114
|
-
import {
|
|
29
|
+
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
30
|
+
import type { UI_I_CreateStorageLunDisks } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces'
|
|
115
31
|
import { validateNameAndGenerateDataId } from '~/components/common/wizards/datastore/add/lib/utils'
|
|
116
32
|
|
|
33
|
+
const formModelLocal = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
|
34
|
+
const isShowInfoAlert = defineModel<boolean>('isShowInfoAlert', {
|
|
35
|
+
required: true,
|
|
36
|
+
})
|
|
117
37
|
const props = defineProps<{
|
|
118
38
|
project: UI_T_Project
|
|
119
|
-
|
|
39
|
+
lunDisksData: UI_I_CreateStorageLunDisks
|
|
40
|
+
hostOptions: UI_I_SelectHostOptions[]
|
|
120
41
|
alertMessages: string[]
|
|
121
42
|
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
122
43
|
datastoreType: UI_T_DatastoreTypeCode
|
|
123
|
-
hosts?:
|
|
44
|
+
hosts?: UI_I_CompatibleHosts | undefined
|
|
124
45
|
isMainFilter?: boolean
|
|
125
46
|
hostId?: string
|
|
47
|
+
loading: boolean
|
|
126
48
|
}>()
|
|
127
|
-
const model = defineModel<any>()
|
|
128
49
|
const emits = defineEmits<{
|
|
129
|
-
(event: 'hide-alert', value: number): void
|
|
130
50
|
(event: 'main-filter', value: string): void
|
|
131
51
|
}>()
|
|
132
52
|
|
|
133
53
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
134
|
-
const { $store } = useNuxtApp()
|
|
135
54
|
|
|
136
55
|
const isInitDatastoreNameValidation = ref<boolean>(false)
|
|
137
|
-
const initValidation = (onlyBlur: boolean): void => {
|
|
138
|
-
onlyBlur && (isInitDatastoreNameValidation.value = true)
|
|
139
|
-
}
|
|
140
56
|
|
|
141
57
|
const nameErrorText = computed<string>(() => {
|
|
142
58
|
if (props.messagesFields?.datastoreName?.field && !model.value.name) {
|
|
@@ -161,9 +77,6 @@ const errorAlertDataId = computed<string>(() => {
|
|
|
161
77
|
})
|
|
162
78
|
|
|
163
79
|
const alertInfo = ref<boolean>(true)
|
|
164
|
-
const onHideAlertInfo = (): void => {
|
|
165
|
-
alertInfo.value = false
|
|
166
|
-
}
|
|
167
80
|
|
|
168
81
|
/* Lun disk table */
|
|
169
82
|
|
|
@@ -184,96 +97,14 @@ const sortTable = (event: string): void => {
|
|
|
184
97
|
: initLunDisksForSphere(model.value.hosts[0])
|
|
185
98
|
}
|
|
186
99
|
|
|
187
|
-
const loading = computed<boolean>(() =>
|
|
188
|
-
$store.getters['storage/getLoading']('datastoreHosts')
|
|
189
|
-
)
|
|
190
|
-
const dataTable = computed<API_UI_I_DataTable<
|
|
191
|
-
UI_I_CreateStorageLunDiskItem[]
|
|
192
|
-
> | null>(() => {
|
|
193
|
-
return $store.getters['storage/getNewDatastoreHosts']
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
/* Select host */
|
|
197
|
-
const hostOptions = computed<UI_I_SelectHostOptions[]>(() =>
|
|
198
|
-
hostsOptionsFunc(localization.value, props.hosts?.items)
|
|
199
|
-
)
|
|
200
|
-
|
|
201
100
|
const onSelectHost = (): void => {
|
|
202
101
|
if (props.datastoreType !== 'shared-storm') return // TODO рефакторинг ( удалить проверку )
|
|
203
102
|
|
|
204
103
|
initLunDisksForSphere(model.value.hosts[0])
|
|
205
104
|
}
|
|
206
|
-
|
|
207
|
-
const initLunDisksForSphere = async (host: string): Promise<void> => {
|
|
208
|
-
await $store.dispatch('storage/A_GET_DISKS_LIST', {
|
|
209
|
-
host,
|
|
210
|
-
...pagination.value,
|
|
211
|
-
sortBy: sort.value,
|
|
212
|
-
} as UI_I_LunDiskSpherePayload)
|
|
213
|
-
}
|
|
214
|
-
if (props.hostId) {
|
|
215
|
-
initLunDisksForSphere(props.hostId)
|
|
216
|
-
}
|
|
217
|
-
const initLunDisksDataTable = async (): Promise<void> => {
|
|
218
|
-
await $store.dispatch('storage/A_GET_LUN_DISK_LIST', {
|
|
219
|
-
...pagination.value,
|
|
220
|
-
sortBy: sort.value,
|
|
221
|
-
} as UI_I_DataTableQuery)
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
if (props.project === 'procurator') {
|
|
225
|
-
// && props.stepId === 2
|
|
226
|
-
initLunDisksDataTable()
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const onHideAlert = (): void => {
|
|
230
|
-
emits('hide-alert', props.stepId)
|
|
231
|
-
}
|
|
232
105
|
</script>
|
|
233
106
|
|
|
234
107
|
<style lang="scss" scoped>
|
|
235
|
-
.
|
|
236
|
-
display: flex;
|
|
237
|
-
flex-direction: column;
|
|
238
|
-
height: inherit;
|
|
239
|
-
overflow-y: auto;
|
|
240
|
-
overflow-x: hidden;
|
|
241
|
-
&__alert-info {
|
|
242
|
-
:deep(.alert-text) {
|
|
243
|
-
font-size: 11px;
|
|
244
|
-
letter-spacing: normal;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
.dropdown-toggle {
|
|
248
|
-
min-width: 160px;
|
|
249
|
-
}
|
|
250
|
-
.clr-form-control {
|
|
251
|
-
display: flex;
|
|
252
|
-
flex-direction: row;
|
|
253
|
-
|
|
254
|
-
.clr-control-container {
|
|
255
|
-
min-height: 48px;
|
|
256
|
-
&.clr-error {
|
|
257
|
-
.clr-subtext,
|
|
258
|
-
.error-icon {
|
|
259
|
-
display: block;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
.clr-subtext,
|
|
263
|
-
.error-icon {
|
|
264
|
-
display: none;
|
|
265
|
-
}
|
|
266
|
-
.error-icon {
|
|
267
|
-
fill: #db2100;
|
|
268
|
-
width: 24px;
|
|
269
|
-
height: 24px;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
&__disk-list {
|
|
274
|
-
display: flex;
|
|
275
|
-
flex-direction: column;
|
|
276
|
-
height: 100%;
|
|
277
|
-
}
|
|
108
|
+
.name-and-device {
|
|
278
109
|
}
|
|
279
110
|
</style>
|