bfg-common 1.3.462 → 1.3.464
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/mainNavigationPanel/MainNavigationPanel.vue +2 -2
- package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +7 -5
- package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +6 -4
- package/components/common/wizards/datastoreNew/add/Add.vue +41 -22
- package/components/common/wizards/datastoreNew/add/lib/config/steps.ts +4 -0
- package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +2 -1
- package/components/common/wizards/datastoreNew/add/lib/utils.ts +1 -1
- package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +1 -6
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/Accessibility.vue +3 -15
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/TablesView.vue +7 -32
- package/package.json +1 -1
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<common-main-navigation-panel-new
|
|
3
3
|
v-if="props.isNewView"
|
|
4
4
|
v-model:main-menu-hovered="mainMenuHovered"
|
|
5
|
+
v-model:menu-pined="menuPined"
|
|
5
6
|
:main-menu-status="props.mainMenuStatus"
|
|
6
7
|
:navigation-items="props.navigationItems"
|
|
7
8
|
:parent-status="props.parentStatus"
|
|
8
9
|
:disabled-pin="props.disabledPin"
|
|
9
|
-
:menu-pined="menuPined"
|
|
10
10
|
:menu-collapsed="menuCollapsed"
|
|
11
11
|
:show-menu="showMenu"
|
|
12
12
|
@toggle="emits('toggle', $event)"
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
<common-main-navigation-panel-old
|
|
18
18
|
v-else
|
|
19
19
|
v-model:main-menu-hovered="mainMenuHovered"
|
|
20
|
+
v-model:menu-pined="menuPined"
|
|
20
21
|
:main-menu-status="props.mainMenuStatus"
|
|
21
22
|
:navigation-items="props.navigationItems"
|
|
22
23
|
:parent-status="props.parentStatus"
|
|
23
24
|
:disabled-pin="props.disabledPin"
|
|
24
|
-
:menu-pined="menuPined"
|
|
25
25
|
:menu-collapsed="menuCollapsed"
|
|
26
26
|
:show-menu="showMenu"
|
|
27
27
|
@toggle="emits('toggle', $event)"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<div v-show="!props.menuCollapsed" class="pin-wrap">
|
|
13
13
|
<input
|
|
14
14
|
id="pin-menu-control"
|
|
15
|
-
v-model="
|
|
15
|
+
v-model="menuPined"
|
|
16
16
|
data-id="navigation-panel-pin-menu-control"
|
|
17
17
|
type="checkbox"
|
|
18
18
|
:disabled="props.disabledPin"
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
/>
|
|
21
21
|
<label for="pin-menu-control" class="pointer flex-align-center">
|
|
22
22
|
<ui-icon-main-navigation-panel
|
|
23
|
-
:name="
|
|
23
|
+
:name="menuPined ? 'unpin' : 'pin'"
|
|
24
24
|
width="12px"
|
|
25
25
|
height="12px"
|
|
26
26
|
/>
|
|
27
|
-
<span v-if="!
|
|
27
|
+
<span v-if="!menuPined">{{ localization.pinMenu }}</span>
|
|
28
28
|
<span v-else>{{ localization.unpinMenu }}</span>
|
|
29
29
|
</label>
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
<button
|
|
33
|
-
v-if="
|
|
33
|
+
v-if="menuPined"
|
|
34
34
|
id="nav-trigger"
|
|
35
35
|
data-id="navigation-panel-trigger"
|
|
36
36
|
class="nav-trigger"
|
|
@@ -78,7 +78,6 @@ const props = defineProps<{
|
|
|
78
78
|
navigationItems: UI_I_NavigationItem[][]
|
|
79
79
|
parentStatus: UI_T_ParentStatus
|
|
80
80
|
disabledPin: boolean
|
|
81
|
-
menuPined: boolean
|
|
82
81
|
menuCollapsed: boolean
|
|
83
82
|
showMenu: boolean
|
|
84
83
|
}>()
|
|
@@ -92,6 +91,9 @@ const emits = defineEmits<{
|
|
|
92
91
|
const mainMenuHovered = defineModel<boolean>('mainMenuHovered', {
|
|
93
92
|
required: true,
|
|
94
93
|
})
|
|
94
|
+
const menuPined = defineModel<boolean>('menuPined', {
|
|
95
|
+
required: true,
|
|
96
|
+
})
|
|
95
97
|
|
|
96
98
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
97
99
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
:class="['main-navigation-panel', { pinned:
|
|
3
|
+
:class="['main-navigation-panel', { pinned: menuPined }]"
|
|
4
4
|
@mouseenter="mainMenuHovered = true"
|
|
5
5
|
@mouseleave="mainMenuHovered = false"
|
|
6
6
|
>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div class="category-wrap">
|
|
12
12
|
<div class="clr-vertical-nav">
|
|
13
13
|
<button
|
|
14
|
-
v-if="
|
|
14
|
+
v-if="menuPined"
|
|
15
15
|
id="nav-trigger"
|
|
16
16
|
data-id="navigation-panel-trigger"
|
|
17
17
|
class="nav-trigger"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<div class="clr-checkbox-wrapper">
|
|
57
57
|
<input
|
|
58
58
|
id="pin-menu-control"
|
|
59
|
-
v-model="
|
|
59
|
+
v-model="menuPined"
|
|
60
60
|
data-id="navigation-panel-pin-menu-control"
|
|
61
61
|
type="checkbox"
|
|
62
62
|
:disabled="props.disabledPin"
|
|
@@ -79,7 +79,6 @@ const props = defineProps<{
|
|
|
79
79
|
navigationItems: UI_I_NavigationItem[][]
|
|
80
80
|
parentStatus: UI_T_ParentStatus
|
|
81
81
|
disabledPin: boolean
|
|
82
|
-
menuPined: boolean
|
|
83
82
|
menuCollapsed: boolean
|
|
84
83
|
showMenu: boolean
|
|
85
84
|
}>()
|
|
@@ -93,6 +92,9 @@ const emits = defineEmits<{
|
|
|
93
92
|
const mainMenuHovered = defineModel<boolean>('mainMenuHovered', {
|
|
94
93
|
required: true,
|
|
95
94
|
})
|
|
95
|
+
const menuPined = defineModel<boolean>('menuPined', {
|
|
96
|
+
required: true,
|
|
97
|
+
})
|
|
96
98
|
|
|
97
99
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
98
100
|
</script>
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
:datastore-type="datastoreType"
|
|
56
56
|
:alert-messages="alertMessages[selectedStep.id]"
|
|
57
57
|
:messages-fields="selectedStep.fields"
|
|
58
|
-
:host-accessibility-submit="hostAccessibilitySubmit"
|
|
59
58
|
:hosts="props.nfsHosts"
|
|
60
59
|
@submit="saveChangesAndNextNfs"
|
|
61
60
|
/>
|
|
@@ -172,7 +171,7 @@ const checkName = async (
|
|
|
172
171
|
}
|
|
173
172
|
if (label && help) {
|
|
174
173
|
return new Promise((resolve, _reject) =>
|
|
175
|
-
checkValidityName(label, wizard, (message: string) => {
|
|
174
|
+
checkValidityName(label, wizard, props.project, (message: string) => {
|
|
176
175
|
resolve({
|
|
177
176
|
isValid: message === '',
|
|
178
177
|
message: message === '' ? '' : message,
|
|
@@ -215,6 +214,31 @@ const checkDatastoreNameAsync = async (
|
|
|
215
214
|
stepHasError,
|
|
216
215
|
}
|
|
217
216
|
}
|
|
217
|
+
|
|
218
|
+
const checkSelectedLunDiskSync = (
|
|
219
|
+
localization: UI_I_Localization,
|
|
220
|
+
{ lunDisk, name }: UI_I_CreateDatastoreForm,
|
|
221
|
+
wizard: Wizard,
|
|
222
|
+
value: UI_I_WizardStep[]
|
|
223
|
+
): UI_I_ValidationReturn => {
|
|
224
|
+
let stepHasError = false
|
|
225
|
+
|
|
226
|
+
if (!lunDisk.length && name) {
|
|
227
|
+
stepHasError = wizard.setValidation(2, 'lunDisk', {
|
|
228
|
+
fieldMessage: '',
|
|
229
|
+
alertMessage: localization.selectDiskToContinueAlert,
|
|
230
|
+
// alertMessage: localization.selectHostToContinueAlert,
|
|
231
|
+
})
|
|
232
|
+
} else if (wizard.hasMessage(2, 'lunDisk')) {
|
|
233
|
+
value = wizard.removeValidation(2, 'lunDisk', value)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return {
|
|
237
|
+
newValue: value,
|
|
238
|
+
stepHasError,
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
218
242
|
const checkNfsFolderSync = (
|
|
219
243
|
localization: UI_I_Localization,
|
|
220
244
|
name: string,
|
|
@@ -317,9 +341,16 @@ const validationFunc = async (
|
|
|
317
341
|
|
|
318
342
|
value = nameValidation.newValue
|
|
319
343
|
|
|
320
|
-
|
|
344
|
+
const lunDiskValidation = checkSelectedLunDiskSync(
|
|
345
|
+
localization.value,
|
|
346
|
+
form.value,
|
|
347
|
+
wizard,
|
|
348
|
+
value
|
|
349
|
+
)
|
|
321
350
|
|
|
322
|
-
|
|
351
|
+
value = lunDiskValidation.newValue
|
|
352
|
+
|
|
353
|
+
stepHasError = nameValidation.stepHasError || lunDiskValidation.stepHasError
|
|
323
354
|
}
|
|
324
355
|
|
|
325
356
|
if (wizard.isValidateForStep(5, currentStep.id, nextStep.id)) {
|
|
@@ -411,12 +442,6 @@ const dataReadyView = computed<UI_I_DetailsItem>(() =>
|
|
|
411
442
|
)
|
|
412
443
|
const onNextStep = (_force = false): void => {}
|
|
413
444
|
|
|
414
|
-
const hostAccessibilitySubmit = ref<number>(0)
|
|
415
|
-
|
|
416
|
-
const isWizardModeForSphere = computed<boolean>(
|
|
417
|
-
() => props.project === 'sphere'
|
|
418
|
-
)
|
|
419
|
-
|
|
420
445
|
const onSaveAndNextSharedStorm = (event: any): void => {
|
|
421
446
|
const { sharedStorm } = datastoreForm.value
|
|
422
447
|
sharedStorm.name = event.name
|
|
@@ -426,8 +451,7 @@ const onSaveAndNextSharedStorm = (event: any): void => {
|
|
|
426
451
|
dataReadyView.value = constructDataReadyViewFunc(
|
|
427
452
|
localization.value,
|
|
428
453
|
'shared-storm',
|
|
429
|
-
event
|
|
430
|
-
isWizardModeForSphere.value
|
|
454
|
+
event
|
|
431
455
|
)
|
|
432
456
|
|
|
433
457
|
onNextStep(true)
|
|
@@ -446,16 +470,11 @@ const saveChangesAndNextNfs = (event: any, next = true): void => {
|
|
|
446
470
|
.map((host) => host.host)
|
|
447
471
|
: []
|
|
448
472
|
|
|
449
|
-
dataReadyView.value = constructDataReadyViewFunc(
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
hosts: hostsNames,
|
|
455
|
-
version: nfsVersion.value,
|
|
456
|
-
},
|
|
457
|
-
isWizardModeForSphere.value
|
|
458
|
-
)
|
|
473
|
+
dataReadyView.value = constructDataReadyViewFunc(localization.value, 'nfs', {
|
|
474
|
+
...event,
|
|
475
|
+
hosts: hostsNames,
|
|
476
|
+
version: ' nfsVersion.value',
|
|
477
|
+
})
|
|
459
478
|
|
|
460
479
|
next && onNextStep(true)
|
|
461
480
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { UI_T_NfsType } from '~/components/common/wizards/datastoreNew/add/lib/models/types'
|
|
2
|
+
import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
2
3
|
export interface UI_I_CreateDatastoreForm {
|
|
3
4
|
name: string
|
|
4
|
-
lunDisk:
|
|
5
|
+
lunDisk: UI_I_CreateStorageLunDiskItem
|
|
5
6
|
nfsVersion: UI_T_NfsType
|
|
6
7
|
type_code: 1 | 2 | 4
|
|
7
8
|
readonly: boolean
|
|
@@ -5,8 +5,8 @@ import Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
|
5
5
|
export const checkValidityName = async (
|
|
6
6
|
name: string,
|
|
7
7
|
wizard: Wizard,
|
|
8
|
+
project: UI_T_Project,
|
|
8
9
|
sendMessage: (message: string) => void,
|
|
9
|
-
project: UI_T_Project = 'procurator'
|
|
10
10
|
): Promise<void> => {
|
|
11
11
|
// TODO move to projects!!!
|
|
12
12
|
|
|
@@ -22,11 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
<common-wizards-datastore-new-add-nfs-accessibility
|
|
24
24
|
v-if="showHostAccessibility"
|
|
25
|
-
v-model="model"
|
|
25
|
+
v-model="model.hosts"
|
|
26
26
|
:alert-messages="props.alertMessages"
|
|
27
27
|
:hosts="props.hosts"
|
|
28
28
|
@hide-alert="(e) => emits('hide-alert', e)"
|
|
29
|
-
@next="onChangeAccessibilityAndNext"
|
|
30
29
|
/>
|
|
31
30
|
</div>
|
|
32
31
|
</template>
|
|
@@ -73,10 +72,6 @@ const onChangeConfigurationAndNext = (
|
|
|
73
72
|
}
|
|
74
73
|
emits('submit', sendData)
|
|
75
74
|
}
|
|
76
|
-
const onChangeAccessibilityAndNext = (hosts: string[]): void => {
|
|
77
|
-
sendData.hosts = hosts
|
|
78
|
-
emits('submit', sendData)
|
|
79
|
-
}
|
|
80
75
|
</script>
|
|
81
76
|
|
|
82
77
|
<style lang="scss" scoped>
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
/>
|
|
18
18
|
</div>
|
|
19
19
|
<div>
|
|
20
|
-
<common-wizards-datastore-add-nfs-accessibility-tables-view
|
|
21
|
-
v-model
|
|
20
|
+
<common-wizards-datastore-new-add-nfs-accessibility-tables-view
|
|
21
|
+
v-model="modelHosts"
|
|
22
22
|
:data-table="dataTable?.items || []"
|
|
23
23
|
:total-items="dataTable?.total_items || 0"
|
|
24
24
|
:total-pages="dataTable?.total_pages || 1"
|
|
@@ -42,10 +42,9 @@ const props = defineProps<{
|
|
|
42
42
|
alertMessages: string[]
|
|
43
43
|
hosts?: any
|
|
44
44
|
}>()
|
|
45
|
-
const
|
|
45
|
+
const modelHosts = defineModel<string[]>()
|
|
46
46
|
const emits = defineEmits<{
|
|
47
47
|
(event: 'hide-alert', value: number): void
|
|
48
|
-
(event: 'next', value: string[]): void
|
|
49
48
|
}>()
|
|
50
49
|
|
|
51
50
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -67,23 +66,12 @@ const pagination = ref<UI_I_Pagination>({
|
|
|
67
66
|
pageSize: 35,
|
|
68
67
|
})
|
|
69
68
|
const sort = ref<string | null>(null)
|
|
70
|
-
|
|
71
|
-
const selectedHosts = ref<string[]>([])
|
|
72
|
-
|
|
73
69
|
const updatePagination = (event: UI_I_Pagination): void => {
|
|
74
70
|
pagination.value = event
|
|
75
71
|
}
|
|
76
72
|
const sortTable = (event: string): void => {
|
|
77
73
|
sort.value = event
|
|
78
74
|
}
|
|
79
|
-
|
|
80
|
-
const submit = async () => {
|
|
81
|
-
if (!selectedHosts.value.length) {
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
emits('next', selectedHosts.value)
|
|
86
|
-
}
|
|
87
75
|
const onHideAlert = (): void => {
|
|
88
76
|
emits('hide-alert', 6)
|
|
89
77
|
}
|
package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/TablesView.vue
CHANGED
|
@@ -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"
|
|
@@ -46,14 +46,13 @@ import * as incompatibleTable from '~/components/common/wizards/datastore/add/nf
|
|
|
46
46
|
|
|
47
47
|
const props = defineProps<{
|
|
48
48
|
dataTable: I_CompatibleHostsTable[] | I_IncompatibleHostsTable[]
|
|
49
|
-
selectedRow: number[]
|
|
50
49
|
tableType: T_HostsAccessibilityTab
|
|
51
50
|
totalItems: number
|
|
52
51
|
totalPages: number
|
|
53
52
|
pagination: UI_I_Pagination
|
|
54
53
|
}>()
|
|
54
|
+
const selectedHostsIdLocal = defineModel<string[]>()
|
|
55
55
|
const emits = defineEmits<{
|
|
56
|
-
(event: 'update:selected-row', value: number[]): void
|
|
57
56
|
(event: 'pagination', value: UI_I_Pagination): void
|
|
58
57
|
(event: 'sort', value: string): void
|
|
59
58
|
}>()
|
|
@@ -61,16 +60,6 @@ const emits = defineEmits<{
|
|
|
61
60
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
62
61
|
|
|
63
62
|
const loading = computed<boolean>(() => false)
|
|
64
|
-
|
|
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
63
|
const filtering = (e: [string, string][]): void => {
|
|
75
64
|
console.log(e, 111)
|
|
76
65
|
}
|
|
@@ -101,11 +90,8 @@ watch(
|
|
|
101
90
|
},
|
|
102
91
|
{ deep: true, immediate: true }
|
|
103
92
|
)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
'incompatible-hosts': any
|
|
107
|
-
}
|
|
108
|
-
const tables: TablesView = {
|
|
93
|
+
|
|
94
|
+
const tables: any = {
|
|
109
95
|
'compatible-hosts': compatibleTable,
|
|
110
96
|
'incompatible-hosts': incompatibleTable,
|
|
111
97
|
}
|
|
@@ -113,20 +99,9 @@ const tables: TablesView = {
|
|
|
113
99
|
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
114
100
|
tables[props.tableType].headItems(localization.value)
|
|
115
101
|
)
|
|
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
|
-
)
|
|
102
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
103
|
+
return tables[props.tableType].bodyItems(props.dataTable)
|
|
104
|
+
})
|
|
130
105
|
</script>
|
|
131
106
|
|
|
132
107
|
<style lang="scss" scoped>
|