bfg-common 1.3.467 → 1.3.468

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.
Files changed (109) hide show
  1. package/assets/scss/common/normalize.scss +340 -340
  2. package/components/atoms/TheIcon2.vue +1353 -1353
  3. package/components/atoms/loader/Loader.vue +30 -30
  4. package/components/atoms/loader/PreLoader.vue +38 -38
  5. package/components/atoms/switch/Switch.vue +111 -111
  6. package/components/atoms/table/compact/Compact.vue +526 -526
  7. package/components/common/adapterManager/ui/table/Header.vue +93 -93
  8. package/components/common/adapterManager/ui/table/Table.vue +162 -162
  9. package/components/common/context/Context.vue +99 -99
  10. package/components/common/layout/theHeader/LanguageSwitch.vue +102 -0
  11. package/components/common/layout/theHeader/TheHeader.vue +91 -0
  12. package/components/common/layout/theHeader/TheHeaderNew.vue +229 -0
  13. package/components/common/layout/theHeader/TheHeaderOld.vue +241 -0
  14. package/components/common/layout/theHeader/feedback/Feedback.vue +104 -0
  15. package/components/common/layout/theHeader/feedback/FeedbackNew.vue +63 -0
  16. package/components/common/layout/theHeader/feedback/FeedbackOld.vue +73 -0
  17. package/components/common/layout/theHeader/helpMenu/About.vue +110 -0
  18. package/components/common/layout/theHeader/helpMenu/HelpMenu.vue +45 -0
  19. package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +112 -0
  20. package/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu.ts +25 -0
  21. package/components/common/layout/theHeader/helpMenu/helpMenuOld/HelpMenuOld.vue +69 -0
  22. package/components/common/layout/theHeader/helpMenu/helpMenuOld/lib/config/dropMenu.ts +22 -0
  23. package/components/common/layout/theHeader/helpMenu/helpMenuOld/lib/models/types.ts +1 -0
  24. package/components/common/layout/theHeader/lib/models/types.ts +5 -0
  25. package/components/common/layout/theHeader/modals/Reconnect.vue +98 -0
  26. package/components/common/layout/theHeader/modals/RedirectLogin.vue +60 -0
  27. package/components/common/layout/theHeader/userMenu/UserMenu.vue +95 -0
  28. package/components/common/layout/theHeader/userMenu/lib/models/interfaces.ts +32 -0
  29. package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +210 -0
  30. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/config/form.ts +31 -0
  31. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces.ts +12 -0
  32. package/components/common/layout/theHeader/userMenu/modals/preferences/Inventory.vue +43 -0
  33. package/components/common/layout/theHeader/userMenu/modals/preferences/Preferences.vue +119 -0
  34. package/components/common/layout/theHeader/userMenu/modals/preferences/View.vue +113 -0
  35. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +148 -0
  36. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/lang.ts +10 -0
  37. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/radioOptions.ts +22 -0
  38. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/enums.ts +9 -0
  39. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/interfaces.ts +11 -0
  40. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/types.ts +1 -0
  41. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +66 -0
  42. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +30 -0
  43. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/models/interfaces.ts +5 -0
  44. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/config/preferencesTabs.ts +68 -0
  45. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +1 -0
  46. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +67 -0
  47. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions.ts +27 -0
  48. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types.ts +1 -0
  49. package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +114 -0
  50. package/components/common/layout/theHeader/userMenu/userMenuNew/lib/config/dropMenu.ts +28 -0
  51. package/components/common/layout/theHeader/userMenu/userMenuOld/UserMenuOld.vue +36 -0
  52. package/components/common/layout/theHeader/userMenu/userMenuOld/lib/config/dropMenu.ts +36 -0
  53. package/components/common/layout/theHeader/userMenu/userMenuOld/lib/models/types.ts +5 -0
  54. package/components/common/lib/config/states.ts +160 -160
  55. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +142 -142
  56. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +248 -248
  57. package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +288 -288
  58. package/components/common/readyToComplete/ReadyToComplete.vue +15 -15
  59. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  60. package/components/common/split/horizontal/Horizontal.vue +70 -70
  61. package/components/common/vm/actions/clone/Clone.vue +511 -511
  62. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +273 -273
  63. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +697 -697
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +400 -400
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +329 -329
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +305 -305
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +168 -168
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +82 -82
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +32 -32
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +182 -182
  71. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +114 -114
  72. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +192 -192
  73. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +72 -72
  74. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +164 -164
  75. package/components/common/vm/actions/common/select/name/Name.vue +235 -235
  76. package/components/common/vm/actions/common/select/storage/Storage.vue +198 -198
  77. package/components/common/vm/actions/editSettings/EditSettings.vue +316 -316
  78. package/components/common/weekSelect/lib/config/options.ts +10 -10
  79. package/components/common/wizards/datastore/add/Add.vue +436 -436
  80. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +191 -191
  81. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -38
  82. package/components/common/wizards/datastore/add/lib/utils.ts +70 -70
  83. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +160 -160
  84. package/components/common/wizards/datastore/add/nfs/Nfs.vue +112 -112
  85. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +104 -104
  86. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -62
  87. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -53
  88. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +86 -86
  89. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +184 -184
  90. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +459 -459
  91. package/components/common/wizards/datastore/add/types/Types.vue +80 -80
  92. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +49 -49
  93. package/composables/useAppVersion.ts +22 -22
  94. package/composables/useEnvLanguage.ts +20 -20
  95. package/lib/utils/sendTask.ts +73 -73
  96. package/minify.js +146 -146
  97. package/package.json +2 -1
  98. package/plugins/spice-console/spice.console.ts +147 -147
  99. package/public/spice-console/application/codec.js +263 -263
  100. package/public/spice-console/lib/rasterEngine.js +907 -907
  101. package/public/spice-console/network/spicechannel.js +375 -375
  102. package/store/main/lib/interfaces.ts +9 -9
  103. package/store/tasks/actions.ts +133 -133
  104. package/store/tasks/getters.ts +25 -25
  105. package/store/tasks/lib/models/interfaces.ts +18 -18
  106. package/store/tasks/mutations.ts +58 -58
  107. package/store/tasks/state.ts +16 -16
  108. /package/components/{layout → common/layout}/theHeader/lib/models/enums.ts +0 -0
  109. /package/components/{layout → common/layout}/theHeader/lib/utils/localization.ts +0 -0
@@ -1,160 +1,160 @@
1
- <template>
2
- <div class="create-datastore-name">
3
- <atoms-alert
4
- v-show="errors.length"
5
- test-id="datastore-creat-name"
6
- status="alert-danger"
7
- :items="errors"
8
- @remove="onRemoveValidationErrors"
9
- />
10
-
11
- <div class="clr-form-control clr-row">
12
- <label for="datastore-name" class="clr-control-label clr-col-md-2">{{
13
- localization.datastoreName
14
- }}</label>
15
-
16
- <div class="clr-control-container" :class="nameErrorText && 'clr-error'">
17
- <div class="flex-align-center">
18
- <input
19
- id="datastore-name"
20
- v-model.trim="form.name.value"
21
- data-id="datastore-name-input"
22
- type="text"
23
- class="clr-input"
24
- @blur="onBlurInputName"
25
- @input="onInputName"
26
- />
27
- <atoms-the-icon class="error-icon" name="info-circle" />
28
- </div>
29
-
30
- <div class="clr-subtext ng-star-inserted">
31
- {{ nameErrorText }}
32
- </div>
33
- </div>
34
- </div>
35
- </div>
36
- </template>
37
-
38
- <script lang="ts" setup>
39
- import { UI_I_ValidationTouchResult } from '~/lib/models/plugins/validation/interfaces'
40
- import { UI_I_Localization } from '~/lib/models/interfaces'
41
- import { UI_I_FormValidationDataStore } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
42
- import { defaultFormFunc } from '~/components/common/wizards/datastore/add/local/createName/lib/config/defaultForm'
43
- import { checkValidityName } from '~/components/common/wizards/datastore/add/lib/utils'
44
-
45
- const props = defineProps<{
46
- localCreateNameSubmit: number
47
- }>()
48
- const emits = defineEmits<{
49
- (event: 'loading', value: boolean): void
50
- (event: 'submit', value: string): void
51
- }>()
52
-
53
- const localization = computed<UI_I_Localization>(() => useLocal())
54
- const { $validation } = useNuxtApp()
55
-
56
- const validation = $validation.call({})
57
- const defaultForm: UI_I_FormValidationDataStore = defaultFormFunc(
58
- localization.value
59
- )
60
- const form = ref<UI_I_FormValidationDataStore>(useDeepCopy(defaultForm))
61
-
62
- const setForm = () => {
63
- form.value = useDeepCopy(defaultForm)
64
- validation.setForm(form)
65
- }
66
- setForm()
67
-
68
- const validForm = ref<UI_I_ValidationTouchResult | null>(null)
69
-
70
- /* Validation for Name input */
71
- const isInitNameValidation = ref<boolean>(false)
72
- const onBlurInputName = (): void => {
73
- validForm.value = validation.touch()
74
- isInitNameValidation.value = true
75
- }
76
- const onInputName = () => {
77
- validForm.value = validation.touch()
78
- }
79
- const nameErrorText = computed<string>(() => {
80
- if (!isInitNameValidation.value) return ''
81
- return validForm.value?.errors?.name?.[0] || ''
82
- })
83
- /* Validation Name input end */
84
-
85
- const errors = ref<string[]>([])
86
- const showValidationErrors = (data: string[]): void => {
87
- errors.value = data
88
- }
89
- const onRemoveValidationErrors = (): void => {
90
- errors.value = []
91
- }
92
- const submit = async (): Promise<void> => {
93
- const name = form.value.name.value
94
-
95
- if (!name) {
96
- validForm.value = validation.touch()
97
- isInitNameValidation.value = true
98
- if (nameErrorText.value) return
99
- }
100
-
101
- if (name) {
102
- emits('loading', true)
103
-
104
- const { valid, msg } = await checkValidityName(name)
105
-
106
- emits('loading', false)
107
-
108
- if (!valid) {
109
- showValidationErrors([msg])
110
- return
111
- }
112
- }
113
-
114
- onRemoveValidationErrors()
115
- emits('submit', name)
116
- }
117
- watch(
118
- () => props.localCreateNameSubmit,
119
- () => {
120
- submit()
121
- }
122
- )
123
- </script>
124
-
125
- <style lang="scss" scoped>
126
- .create-datastore-name {
127
- &__alert-info {
128
- :deep(.alert-text) {
129
- font-size: 11px;
130
- letter-spacing: normal;
131
- }
132
- }
133
- .clr-form-control {
134
- display: flex;
135
- flex-direction: row;
136
-
137
- .clr-control-container {
138
- min-height: 48px;
139
- input {
140
- width: 375px;
141
- }
142
- &.clr-error {
143
- .clr-subtext,
144
- .error-icon {
145
- display: block;
146
- }
147
- }
148
- .clr-subtext,
149
- .error-icon {
150
- display: none;
151
- }
152
- .error-icon {
153
- fill: #db2100;
154
- width: 24px;
155
- height: 24px;
156
- }
157
- }
158
- }
159
- }
160
- </style>
1
+ <template>
2
+ <div class="create-datastore-name">
3
+ <atoms-alert
4
+ v-show="errors.length"
5
+ test-id="datastore-creat-name"
6
+ status="alert-danger"
7
+ :items="errors"
8
+ @remove="onRemoveValidationErrors"
9
+ />
10
+
11
+ <div class="clr-form-control clr-row">
12
+ <label for="datastore-name" class="clr-control-label clr-col-md-2">{{
13
+ localization.datastoreName
14
+ }}</label>
15
+
16
+ <div class="clr-control-container" :class="nameErrorText && 'clr-error'">
17
+ <div class="flex-align-center">
18
+ <input
19
+ id="datastore-name"
20
+ v-model.trim="form.name.value"
21
+ data-id="datastore-name-input"
22
+ type="text"
23
+ class="clr-input"
24
+ @blur="onBlurInputName"
25
+ @input="onInputName"
26
+ />
27
+ <atoms-the-icon class="error-icon" name="info-circle" />
28
+ </div>
29
+
30
+ <div class="clr-subtext ng-star-inserted">
31
+ {{ nameErrorText }}
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </template>
37
+
38
+ <script lang="ts" setup>
39
+ import { UI_I_ValidationTouchResult } from '~/lib/models/plugins/validation/interfaces'
40
+ import { UI_I_Localization } from '~/lib/models/interfaces'
41
+ import { UI_I_FormValidationDataStore } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
42
+ import { defaultFormFunc } from '~/components/common/wizards/datastore/add/local/createName/lib/config/defaultForm'
43
+ import { checkValidityName } from '~/components/common/wizards/datastore/add/lib/utils'
44
+
45
+ const props = defineProps<{
46
+ localCreateNameSubmit: number
47
+ }>()
48
+ const emits = defineEmits<{
49
+ (event: 'loading', value: boolean): void
50
+ (event: 'submit', value: string): void
51
+ }>()
52
+
53
+ const localization = computed<UI_I_Localization>(() => useLocal())
54
+ const { $validation } = useNuxtApp()
55
+
56
+ const validation = $validation.call({})
57
+ const defaultForm: UI_I_FormValidationDataStore = defaultFormFunc(
58
+ localization.value
59
+ )
60
+ const form = ref<UI_I_FormValidationDataStore>(useDeepCopy(defaultForm))
61
+
62
+ const setForm = () => {
63
+ form.value = useDeepCopy(defaultForm)
64
+ validation.setForm(form)
65
+ }
66
+ setForm()
67
+
68
+ const validForm = ref<UI_I_ValidationTouchResult | null>(null)
69
+
70
+ /* Validation for Name input */
71
+ const isInitNameValidation = ref<boolean>(false)
72
+ const onBlurInputName = (): void => {
73
+ validForm.value = validation.touch()
74
+ isInitNameValidation.value = true
75
+ }
76
+ const onInputName = () => {
77
+ validForm.value = validation.touch()
78
+ }
79
+ const nameErrorText = computed<string>(() => {
80
+ if (!isInitNameValidation.value) return ''
81
+ return validForm.value?.errors?.name?.[0] || ''
82
+ })
83
+ /* Validation Name input end */
84
+
85
+ const errors = ref<string[]>([])
86
+ const showValidationErrors = (data: string[]): void => {
87
+ errors.value = data
88
+ }
89
+ const onRemoveValidationErrors = (): void => {
90
+ errors.value = []
91
+ }
92
+ const submit = async (): Promise<void> => {
93
+ const name = form.value.name.value
94
+
95
+ if (!name) {
96
+ validForm.value = validation.touch()
97
+ isInitNameValidation.value = true
98
+ if (nameErrorText.value) return
99
+ }
100
+
101
+ if (name) {
102
+ emits('loading', true)
103
+
104
+ const { valid, msg } = await checkValidityName(name)
105
+
106
+ emits('loading', false)
107
+
108
+ if (!valid) {
109
+ showValidationErrors([msg])
110
+ return
111
+ }
112
+ }
113
+
114
+ onRemoveValidationErrors()
115
+ emits('submit', name)
116
+ }
117
+ watch(
118
+ () => props.localCreateNameSubmit,
119
+ () => {
120
+ submit()
121
+ }
122
+ )
123
+ </script>
124
+
125
+ <style lang="scss" scoped>
126
+ .create-datastore-name {
127
+ &__alert-info {
128
+ :deep(.alert-text) {
129
+ font-size: 11px;
130
+ letter-spacing: normal;
131
+ }
132
+ }
133
+ .clr-form-control {
134
+ display: flex;
135
+ flex-direction: row;
136
+
137
+ .clr-control-container {
138
+ min-height: 48px;
139
+ input {
140
+ width: 375px;
141
+ }
142
+ &.clr-error {
143
+ .clr-subtext,
144
+ .error-icon {
145
+ display: block;
146
+ }
147
+ }
148
+ .clr-subtext,
149
+ .error-icon {
150
+ display: none;
151
+ }
152
+ .error-icon {
153
+ fill: #db2100;
154
+ width: 24px;
155
+ height: 24px;
156
+ }
157
+ }
158
+ }
159
+ }
160
+ </style>
@@ -1,112 +1,112 @@
1
- <template>
2
- <div class="nfs-container">
3
- <span class="nfs-container__desc">{{ stepSubTitle }}</span>
4
-
5
- <common-wizards-datastore-add-nfs-version
6
- v-show="props.stepPosition === 1"
7
- v-model:version="nfsVersion"
8
- />
9
-
10
- <common-wizards-datastore-add-nfs-configuration
11
- v-show="props.stepPosition === 2"
12
- :mode="props.mode"
13
- :nfs-version="nfsVersion"
14
- :nfs-configuration-submit="nfsConfigurationSubmit"
15
- @loading="(e) => emits('loading', e)"
16
- @next="onChangeConfigurationAndNext"
17
- />
18
-
19
- <!-- <templates-home-datastore-actions-add-nfs-kerberos-authentication-->
20
- <!-- v-show="nfsVersion === 'nfs-4.1' && props.stepPosition === 3"-->
21
- <!-- :nfs-version="nfsVersion"-->
22
- <!-- />--><!-- TODO Он будет когда будем делать групповое -->
23
-
24
- <common-wizards-datastore-add-nfs-accessibility
25
- v-if="showHostAccessibility"
26
- :host-accessibility-submit="props.hostAccessibilitySubmit"
27
- :hosts="props.hosts"
28
- @next="onChangeAccessibilityAndNext"
29
- />
30
- <!-- TODO Он будет когда будем делать групповое -->
31
- </div>
32
- </template>
33
-
34
- <script lang="ts" setup>
35
- import { UI_I_Localization } from '~/lib/models/interfaces'
36
- import {
37
- UI_T_DatastoreType,
38
- UI_T_NfsType,
39
- UI_T_WizardDatastoreMode,
40
- } from '~/components/common/wizards/datastore/add/lib/models/types'
41
- import { UI_I_ConfigurationSendDataNfs } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
42
- import { subTitleFunc } from '~/components/common/wizards/datastore/add/lib/config/stepItems'
43
-
44
- const props = defineProps<{
45
- mode: UI_T_WizardDatastoreMode
46
- stepPosition: number
47
- datastoreType: UI_T_DatastoreType
48
- nfsConfigurationSubmit: number
49
- hostAccessibilitySubmit: number
50
- hosts?: any
51
- }>()
52
- const emits = defineEmits<{
53
- (event: 'loading', value: boolean): void
54
- (event: 'submit', value: UI_I_ConfigurationSendDataNfs): void
55
- (event: 'change-nfs-version', value: UI_T_NfsType): void
56
- }>()
57
-
58
- const localization = computed<UI_I_Localization>(() => useLocal())
59
-
60
- const nfsVersion = ref<UI_T_NfsType>('nfs-3')
61
-
62
- const stepSubTitle = computed<string>(() => {
63
- const { datastoreType, stepPosition } = props
64
- return subTitleFunc(
65
- localization.value,
66
- datastoreType,
67
- stepPosition,
68
- nfsVersion.value
69
- )
70
- })
71
-
72
- // const showHostAccessibility = computed<boolean>(() => {
73
- // return (
74
- // (props.stepPosition === 4 && nfsVersion.value === 'nfs-4.1') ||
75
- // (props.stepPosition === 3 && nfsVersion.value === 'nfs-3')
76
- // )
77
- // })
78
- const showHostAccessibility = computed<boolean>(() => {
79
- return props.mode === 'sphere' && props.stepPosition === 3
80
- })
81
-
82
- watch(nfsVersion, (newValue: UI_T_NfsType) => {
83
- emits('change-nfs-version', newValue)
84
- })
85
-
86
- let sendData: any = null
87
- const onChangeConfigurationAndNext = (
88
- event: UI_I_ConfigurationSendDataNfs
89
- ): void => {
90
- sendData = {
91
- name: event.name,
92
- folder: event.folder,
93
- server: event.server,
94
- hosts: [],
95
- }
96
- emits('submit', sendData)
97
- }
98
- const onChangeAccessibilityAndNext = (hosts: string[]): void => {
99
- sendData.hosts = hosts
100
- emits('submit', sendData)
101
- }
102
- </script>
103
-
104
- <style lang="scss" scoped>
105
- @import '~/assets/scss/common/mixins.scss';
106
- .nfs-container {
107
- @include flex($dir: column);
108
- height: 100%;
109
- &__desc {
110
- }
111
- }
112
- </style>
1
+ <template>
2
+ <div class="nfs-container">
3
+ <span class="nfs-container__desc">{{ stepSubTitle }}</span>
4
+
5
+ <common-wizards-datastore-add-nfs-version
6
+ v-show="props.stepPosition === 1"
7
+ v-model:version="nfsVersion"
8
+ />
9
+
10
+ <common-wizards-datastore-add-nfs-configuration
11
+ v-show="props.stepPosition === 2"
12
+ :mode="props.mode"
13
+ :nfs-version="nfsVersion"
14
+ :nfs-configuration-submit="nfsConfigurationSubmit"
15
+ @loading="(e) => emits('loading', e)"
16
+ @next="onChangeConfigurationAndNext"
17
+ />
18
+
19
+ <!-- <templates-home-datastore-actions-add-nfs-kerberos-authentication-->
20
+ <!-- v-show="nfsVersion === 'nfs-4.1' && props.stepPosition === 3"-->
21
+ <!-- :nfs-version="nfsVersion"-->
22
+ <!-- />--><!-- TODO Он будет когда будем делать групповое -->
23
+
24
+ <common-wizards-datastore-add-nfs-accessibility
25
+ v-if="showHostAccessibility"
26
+ :host-accessibility-submit="props.hostAccessibilitySubmit"
27
+ :hosts="props.hosts"
28
+ @next="onChangeAccessibilityAndNext"
29
+ />
30
+ <!-- TODO Он будет когда будем делать групповое -->
31
+ </div>
32
+ </template>
33
+
34
+ <script lang="ts" setup>
35
+ import { UI_I_Localization } from '~/lib/models/interfaces'
36
+ import {
37
+ UI_T_DatastoreType,
38
+ UI_T_NfsType,
39
+ UI_T_WizardDatastoreMode,
40
+ } from '~/components/common/wizards/datastore/add/lib/models/types'
41
+ import { UI_I_ConfigurationSendDataNfs } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
42
+ import { subTitleFunc } from '~/components/common/wizards/datastore/add/lib/config/stepItems'
43
+
44
+ const props = defineProps<{
45
+ mode: UI_T_WizardDatastoreMode
46
+ stepPosition: number
47
+ datastoreType: UI_T_DatastoreType
48
+ nfsConfigurationSubmit: number
49
+ hostAccessibilitySubmit: number
50
+ hosts?: any
51
+ }>()
52
+ const emits = defineEmits<{
53
+ (event: 'loading', value: boolean): void
54
+ (event: 'submit', value: UI_I_ConfigurationSendDataNfs): void
55
+ (event: 'change-nfs-version', value: UI_T_NfsType): void
56
+ }>()
57
+
58
+ const localization = computed<UI_I_Localization>(() => useLocal())
59
+
60
+ const nfsVersion = ref<UI_T_NfsType>('nfs-3')
61
+
62
+ const stepSubTitle = computed<string>(() => {
63
+ const { datastoreType, stepPosition } = props
64
+ return subTitleFunc(
65
+ localization.value,
66
+ datastoreType,
67
+ stepPosition,
68
+ nfsVersion.value
69
+ )
70
+ })
71
+
72
+ // const showHostAccessibility = computed<boolean>(() => {
73
+ // return (
74
+ // (props.stepPosition === 4 && nfsVersion.value === 'nfs-4.1') ||
75
+ // (props.stepPosition === 3 && nfsVersion.value === 'nfs-3')
76
+ // )
77
+ // })
78
+ const showHostAccessibility = computed<boolean>(() => {
79
+ return props.mode === 'sphere' && props.stepPosition === 3
80
+ })
81
+
82
+ watch(nfsVersion, (newValue: UI_T_NfsType) => {
83
+ emits('change-nfs-version', newValue)
84
+ })
85
+
86
+ let sendData: any = null
87
+ const onChangeConfigurationAndNext = (
88
+ event: UI_I_ConfigurationSendDataNfs
89
+ ): void => {
90
+ sendData = {
91
+ name: event.name,
92
+ folder: event.folder,
93
+ server: event.server,
94
+ hosts: [],
95
+ }
96
+ emits('submit', sendData)
97
+ }
98
+ const onChangeAccessibilityAndNext = (hosts: string[]): void => {
99
+ sendData.hosts = hosts
100
+ emits('submit', sendData)
101
+ }
102
+ </script>
103
+
104
+ <style lang="scss" scoped>
105
+ @import '~/assets/scss/common/mixins.scss';
106
+ .nfs-container {
107
+ @include flex($dir: column);
108
+ height: 100%;
109
+ &__desc {
110
+ }
111
+ }
112
+ </style>