bfg-common 1.5.225 → 1.5.227

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 (104) hide show
  1. package/assets/localization/local_be.json +15 -1
  2. package/assets/localization/local_en.json +17 -3
  3. package/assets/localization/local_hy.json +15 -1
  4. package/assets/localization/local_kk.json +15 -1
  5. package/assets/localization/local_ru.json +15 -1
  6. package/assets/localization/local_zh.json +15 -1
  7. package/components/atoms/table/info/Info.vue +4 -0
  8. package/components/common/backup/storage/actions/add/Add.vue +36 -22
  9. package/components/common/backup/storage/actions/add/New.vue +2 -50
  10. package/components/common/backup/storage/actions/add/Old.vue +24 -81
  11. package/components/common/backup/storage/actions/add/lib/config/steps.ts +9 -9
  12. package/components/common/backup/storage/actions/add/lib/models/interfaces.ts +1 -0
  13. package/components/common/backup/storage/actions/add/lib/utils.ts +1 -34
  14. package/components/common/backup/storage/actions/add/lib/validations.ts +70 -14
  15. package/components/common/backup/storage/actions/add/steps/common/tooltipInfo/TooltipInfo.vue +94 -0
  16. package/components/common/backup/storage/actions/add/steps/name/New.vue +4 -4
  17. package/components/common/backup/storage/actions/add/steps/name/Old.vue +9 -28
  18. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigure.vue +41 -41
  19. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigureNew.vue +294 -279
  20. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigureOld.vue +13 -10
  21. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/lib/models/interfaces.ts +2 -0
  22. package/components/common/backup/storage/actions/add/steps/nameAndConfigure/lib/models/types.ts +1 -0
  23. package/components/common/backup/storage/actions/add/steps/readyComplete/ReadyComplete.vue +6 -5
  24. package/components/common/backup/storage/actions/add/steps/readyComplete/ReadyCompleteOld.vue +0 -11
  25. package/components/common/backup/storage/actions/add/steps/readyComplete/lib/config/propertiesDetails.ts +36 -100
  26. package/components/common/backup/storage/actions/add/steps/typeMode/TypeMode.vue +0 -3
  27. package/components/common/backup/storage/actions/add/steps/typeMode/TypeModeNew.vue +0 -3
  28. package/components/common/backup/storage/actions/add/steps/typeMode/TypeModeOld.vue +0 -5
  29. package/components/common/pages/scheduledTasks/modals/common/frequency/Frequency.vue +1 -0
  30. package/components/common/pages/scheduledTasks/modals/common/frequency/end/End.vue +9 -1
  31. package/components/common/pages/scheduledTasks/modals/common/frequency/lib/utils.ts +24 -7
  32. package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +2 -1
  33. package/lib/models/interfaces.ts +3 -0
  34. package/package.json +2 -2
  35. package/components/common/backup/storage/actions/add/lib/models/enums.ts +0 -5
  36. package/components/common/backup/storage/actions/add/temp/Add.vue +0 -527
  37. package/components/common/backup/storage/actions/add/temp/lib/config/stepItems.ts +0 -236
  38. package/components/common/backup/storage/actions/add/temp/lib/models/interfaces.ts +0 -58
  39. package/components/common/backup/storage/actions/add/temp/lib/models/types.ts +0 -14
  40. package/components/common/backup/storage/actions/add/temp/lib/utils.ts +0 -71
  41. package/components/common/backup/storage/actions/add/temp/local/Local.vue +0 -83
  42. package/components/common/backup/storage/actions/add/temp/local/accessibility/Accessibility.vue +0 -104
  43. package/components/common/backup/storage/actions/add/temp/local/accessibility/lib/config/tabsPannel.ts +0 -25
  44. package/components/common/backup/storage/actions/add/temp/local/accessibility/lib/models/interfaces.ts +0 -9
  45. package/components/common/backup/storage/actions/add/temp/local/accessibility/lib/models/types.ts +0 -5
  46. package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/TablesView.vue +0 -141
  47. package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/compatibleTable.ts +0 -62
  48. package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/hostsTableItems.ts +0 -27
  49. package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/incompatibleTable.ts +0 -68
  50. package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/tableKeys.ts +0 -15
  51. package/components/common/backup/storage/actions/add/temp/local/createName/CreateName.vue +0 -160
  52. package/components/common/backup/storage/actions/add/temp/local/createName/lib/config/defaultForm.ts +0 -15
  53. package/components/common/backup/storage/actions/add/temp/nfs/Nfs.vue +0 -106
  54. package/components/common/backup/storage/actions/add/temp/nfs/accessibility/Accessibility.vue +0 -104
  55. package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/config/tabsPannel.ts +0 -25
  56. package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/interfaces.ts +0 -9
  57. package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/types.ts +0 -5
  58. package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/TablesView.vue +0 -141
  59. package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +0 -62
  60. package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +0 -27
  61. package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +0 -68
  62. package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/tableKeys.ts +0 -15
  63. package/components/common/backup/storage/actions/add/temp/nfs/configuration/Configuration.vue +0 -469
  64. package/components/common/backup/storage/actions/add/temp/nfs/configuration/lib/config/defaultForm.ts +0 -51
  65. package/components/common/backup/storage/actions/add/temp/nfs/configuration/lib/models/interfaces.ts +0 -14
  66. package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/DeletePopover.vue +0 -99
  67. package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/ServersList.vue +0 -125
  68. package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/config/serversListConfig.ts +0 -40
  69. package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/config/tableKeys.ts +0 -3
  70. package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/models/interfaces.ts +0 -13
  71. package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/models/types.ts +0 -1
  72. package/components/common/backup/storage/actions/add/temp/nfs/kerberosAuthentication/KerberosAuthentication.vue +0 -55
  73. package/components/common/backup/storage/actions/add/temp/nfs/kerberosAuthentication/lib/config/radioOptions.ts +0 -27
  74. package/components/common/backup/storage/actions/add/temp/nfs/version/Version.vue +0 -42
  75. package/components/common/backup/storage/actions/add/temp/nfs/version/lib/config/versionOptions.ts +0 -22
  76. package/components/common/backup/storage/actions/add/temp/readyComplete/ReadyComplete.vue +0 -85
  77. package/components/common/backup/storage/actions/add/temp/readyComplete/lib/config/propertiesDetails.ts +0 -165
  78. package/components/common/backup/storage/actions/add/temp/readyComplete/lib/models/interfaces.ts +0 -4
  79. package/components/common/backup/storage/actions/add/temp/samba/Samba.vue +0 -95
  80. package/components/common/backup/storage/actions/add/temp/samba/accessibility/Accessibility.vue +0 -104
  81. package/components/common/backup/storage/actions/add/temp/samba/accessibility/lib/config/tabsPannel.ts +0 -25
  82. package/components/common/backup/storage/actions/add/temp/samba/accessibility/lib/models/interfaces.ts +0 -9
  83. package/components/common/backup/storage/actions/add/temp/samba/accessibility/lib/models/types.ts +0 -5
  84. package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/TablesView.vue +0 -141
  85. package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/compatibleTable.ts +0 -62
  86. package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/hostsTableItems.ts +0 -53
  87. package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/incompatibleTable.ts +0 -68
  88. package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/tableKeys.ts +0 -15
  89. package/components/common/backup/storage/actions/add/temp/samba/configuration/Configuration.vue +0 -470
  90. package/components/common/backup/storage/actions/add/temp/samba/configuration/lib/config/defaultForm.ts +0 -51
  91. package/components/common/backup/storage/actions/add/temp/samba/configuration/lib/models/interfaces.ts +0 -14
  92. package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/DeletePopover.vue +0 -99
  93. package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/ServersList.vue +0 -124
  94. package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/config/serversListConfig.ts +0 -40
  95. package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/config/tableKeys.ts +0 -3
  96. package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/models/interfaces.ts +0 -13
  97. package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/models/types.ts +0 -1
  98. package/components/common/backup/storage/actions/add/temp/samba/kerberosAuthentication/KerberosAuthentication.vue +0 -55
  99. package/components/common/backup/storage/actions/add/temp/samba/kerberosAuthentication/lib/config/radioOptions.ts +0 -27
  100. package/components/common/backup/storage/actions/add/temp/sharedStorm/SharedStorm.vue +0 -106
  101. package/components/common/backup/storage/actions/add/temp/sharedStorm/storage/Storage.vue +0 -71
  102. package/components/common/backup/storage/actions/add/temp/sharedStorm/storage/lib/config/defaultForm.ts +0 -15
  103. package/components/common/backup/storage/actions/add/temp/types/Types.vue +0 -79
  104. package/components/common/backup/storage/actions/add/temp/types/lib/config/typeOptions.ts +0 -62
@@ -1,6 +1,6 @@
1
+ import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
1
2
  import type { API_UI_I_Error } from '~/lib/models/store/interfaces'
2
3
  import type { UI_T_Project } from '~/lib/models/types'
3
- import Wizard from '~/components/atoms/wizard/lib/utils/utils'
4
4
  import { UI_E_Kind } from '~/lib/models/enums'
5
5
 
6
6
  export const checkValidityName = async (
@@ -28,36 +28,3 @@ export const checkValidityName = async (
28
28
  }
29
29
  sendMessage('')
30
30
  }
31
-
32
- export const validateNameAndGenerateDataId = (
33
- name: string,
34
- _errorMessage: string,
35
- defaultDataId?: string
36
- ): string => {
37
- let baseDataId = defaultDataId || 'storage-name-alert-error'
38
-
39
- const patterns = [
40
- {
41
- regex: /^[a-zA-Z0-9_\-\.]+$/,
42
- error_message:
43
- /invalid name, must only contain letters, numbers, and '_', '-' '.' symbols/,
44
- suffix: '-invalid-name-symbols',
45
- },
46
- {
47
- regex: /^.{3,64}$/,
48
- error_message:
49
- /invalid name length, must be between: \d+ and \d+ characters/,
50
- suffix: '-invalid-name-length',
51
- },
52
- ]
53
-
54
- // Проверка error_message на соответствие шаблонам
55
-
56
- for (const pattern of patterns) {
57
- if (!pattern.regex.test(name)) {
58
- return `${baseDataId}${pattern.suffix}`
59
- }
60
- }
61
-
62
- return baseDataId
63
- }
@@ -1,12 +1,12 @@
1
+ import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
2
+ import type { UI_T_Project } from '~/lib/models/types'
1
3
  import type { UI_I_Localization } from '~/lib/models/interfaces'
2
4
  import type {
3
5
  UI_I_AsyncCheckReturn,
4
6
  UI_I_ValidationReturn,
5
7
  UI_I_WizardStep,
6
8
  } from '~/components/atoms/wizard/lib/models/interfaces'
7
- import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
8
9
  import type { UI_I_CreateDatastoreForm } from '~/components/common/backup/storage/actions/add/lib/models/interfaces'
9
- import type { UI_T_Project } from '~/lib/models/types'
10
10
  import { checkValidityName } from '~/components/common/backup/storage/actions/add/lib/utils'
11
11
  import { dynamicSteps } from '~/components/common/backup/storage/actions/add/lib/config/steps'
12
12
 
@@ -16,13 +16,7 @@ const checkName = async (
16
16
  wizard: Wizard,
17
17
  project: UI_T_Project
18
18
  ): Promise<UI_I_AsyncCheckReturn> => {
19
- const typeCode = form.type_code
20
-
21
- let help: boolean = true
22
- if (typeCode === 2 || typeCode === 3) {
23
- help = !!form.folder && !!form.server
24
- }
25
- if (form.name && help) {
19
+ if (form.name) {
26
20
  return new Promise((resolve, _reject) =>
27
21
  checkValidityName(form.name, wizard, project, (message: string) => {
28
22
  resolve({
@@ -34,7 +28,7 @@ const checkName = async (
34
28
  } else {
35
29
  return {
36
30
  isValid: false,
37
- message: !form.name ? localization.common.specifyDatastoreName : '',
31
+ message: !form.name ? localization.common.fieldRequired : '',
38
32
  }
39
33
  }
40
34
  }
@@ -69,7 +63,7 @@ export const checkDatastoreNameAsync = async (
69
63
  }
70
64
  }
71
65
 
72
- export const checkNfsFolderSync = (
66
+ export const checkFolderSync = (
73
67
  localization: UI_I_Localization,
74
68
  name: string,
75
69
  wizard: Wizard,
@@ -82,7 +76,7 @@ export const checkNfsFolderSync = (
82
76
  dynamicSteps.nameAndConfigure,
83
77
  'folder',
84
78
  {
85
- fieldMessage: localization.common.specifyFolderName,
79
+ fieldMessage: localization.common.fieldRequired,
86
80
  alertMessage: '',
87
81
  }
88
82
  )
@@ -100,7 +94,7 @@ export const checkNfsFolderSync = (
100
94
  }
101
95
  }
102
96
 
103
- export const checkNfsServerSync = (
97
+ export const checkServerSync = (
104
98
  localization: UI_I_Localization,
105
99
  name: string,
106
100
  wizard: Wizard,
@@ -113,7 +107,7 @@ export const checkNfsServerSync = (
113
107
  dynamicSteps.nameAndConfigure,
114
108
  'server',
115
109
  {
116
- fieldMessage: localization.common.specifyServerName,
110
+ fieldMessage: localization.common.fieldRequired,
117
111
  alertMessage: '',
118
112
  }
119
113
  )
@@ -131,6 +125,68 @@ export const checkNfsServerSync = (
131
125
  }
132
126
  }
133
127
 
128
+ export const checkUsernameSync = (
129
+ localization: UI_I_Localization,
130
+ name: string,
131
+ wizard: Wizard,
132
+ value: UI_I_WizardStep[]
133
+ ): UI_I_ValidationReturn => {
134
+ let stepHasError = false
135
+
136
+ if (!name) {
137
+ stepHasError = wizard.setValidation(
138
+ dynamicSteps.nameAndConfigure,
139
+ 'user',
140
+ {
141
+ fieldMessage: localization.common.fieldRequired,
142
+ alertMessage: '',
143
+ }
144
+ )
145
+ } else if (wizard.hasMessage(dynamicSteps.nameAndConfigure, 'user')) {
146
+ value = wizard.removeValidation(
147
+ dynamicSteps.nameAndConfigure,
148
+ 'user',
149
+ value
150
+ )
151
+ }
152
+
153
+ return {
154
+ newValue: value,
155
+ stepHasError,
156
+ }
157
+ }
158
+
159
+ export const checkPasswordSync = (
160
+ localization: UI_I_Localization,
161
+ name: string,
162
+ wizard: Wizard,
163
+ value: UI_I_WizardStep[]
164
+ ): UI_I_ValidationReturn => {
165
+ let stepHasError = false
166
+
167
+ if (!name) {
168
+ stepHasError = wizard.setValidation(
169
+ dynamicSteps.nameAndConfigure,
170
+ 'password',
171
+ {
172
+ fieldMessage: localization.common.fieldRequired,
173
+ alertMessage: '',
174
+ }
175
+ )
176
+ } else if (wizard.hasMessage(dynamicSteps.nameAndConfigure, 'password')) {
177
+ value = wizard.removeValidation(
178
+ dynamicSteps.nameAndConfigure,
179
+ 'password',
180
+ value
181
+ )
182
+ }
183
+
184
+ return {
185
+ newValue: value,
186
+ stepHasError,
187
+ }
188
+ }
189
+
134
190
  export const checkHostsAccessibilitySync = (
135
191
  localization: UI_I_Localization,
136
192
  hosts: string[],
@@ -0,0 +1,94 @@
1
+ <template>
2
+ <div class="tooltip-info">
3
+ <ui-icon
4
+ :id="`${props.id}-info-trigger`"
5
+ name="info"
6
+ width="16"
7
+ height="16"
8
+ :class="['tooltip-info__icon pointer', { active: isShowInfo }]"
9
+ @click.stop="isShowInfo = !isShowInfo"
10
+ />
11
+ <ui-popup-window
12
+ v-model="isShowInfo"
13
+ top
14
+ left
15
+ width="272px"
16
+ :elem-id="`${props.id}-info-trigger`"
17
+ >
18
+ <div class="common-widget-info">
19
+ <div class="flex justify-between">
20
+ <div class="flex">
21
+ <ui-icon name="info-2" width="16px" height="16px" />
22
+ <span class="title"> {{ localization.common.information }}</span>
23
+ </div>
24
+ <ui-icon
25
+ name="close"
26
+ class="pointer hide-icon"
27
+ width="16px"
28
+ height="16px"
29
+ @click.stop="isShowInfo = false"
30
+ />
31
+ </div>
32
+
33
+ <div class="common-widget-info-description">
34
+ {{ props.description }}
35
+ </div>
36
+ </div>
37
+ </ui-popup-window>
38
+ </div>
39
+ </template>
40
+
41
+ <script lang="ts" setup>
42
+ // TODO move to global
43
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
44
+
45
+ const props = defineProps<{
46
+ id: string
47
+ description: string
48
+ }>()
49
+
50
+ const localization = computed<UI_I_Localization>(() => useLocal())
51
+
52
+ const isShowInfo = ref<boolean>(false)
53
+ </script>
54
+
55
+ <style lang="scss" scoped>
56
+ @import 'assets/scss/common/mixins.scss';
57
+ .tooltip-info {
58
+ @include flex($align: center);
59
+ &__icon {
60
+ color: var(--form-icon-color);
61
+ &:hover {
62
+ color: var(--close-icon);
63
+ }
64
+ &.active {
65
+ color: var(--btn-primary-fill-bg-color);
66
+ }
67
+ }
68
+
69
+ .common-widget-info {
70
+ padding: 16px;
71
+
72
+ .title {
73
+ font-size: 14px;
74
+ font-weight: 500;
75
+ line-height: 16px;
76
+ color: var(--zabbix-text-color);
77
+ margin-left: 8px;
78
+ }
79
+
80
+ .common-widget-info-description {
81
+ font-size: 13px;
82
+ line-height: 15.73px;
83
+ color: var(--zabbix-text-color);
84
+ margin-top: 12px;
85
+ white-space: pre-line;
86
+ }
87
+
88
+ svg {
89
+ color: var(--alert-icon);
90
+ min-width: 16px;
91
+ }
92
+ }
93
+ }
94
+ </style>
@@ -8,9 +8,9 @@
8
8
  </div>
9
9
  <div class="row__content">
10
10
  <ui-input
11
- id="device-selection-input"
11
+ id="name-selection-input"
12
12
  v-model="formModelLocal.name"
13
- test-id="device-selection-input"
13
+ test-id="name-selection-input"
14
14
  :error="nameErrorText"
15
15
  @blur="initValidation(true)"
16
16
  @input="initValidation(false)"
@@ -42,10 +42,10 @@ const initValidation = (onlyBlur: boolean): void => {
42
42
  }
43
43
  const nameErrorText = computed<string>(() => {
44
44
  if (
45
- props.messagesFields?.datastoreName?.field &&
45
+ props.messagesFields?.name?.field &&
46
46
  !formModelLocal.value.name
47
47
  ) {
48
- return props.messagesFields.datastoreName.field
48
+ return props.messagesFields.name.field
49
49
  }
50
50
 
51
51
  if (!isInitDatastoreNameValidation.value) return ''
@@ -1,24 +1,24 @@
1
1
  <template>
2
- <div class="device-selection-step">
2
+ <div class="name-selection-step">
3
3
  <atoms-alert
4
4
  v-show="props.alertMessages?.length"
5
- :test-id="errorAlertDataId"
5
+ test-id="storage-name-alert-error"
6
6
  status="alert-danger"
7
7
  :items="props.alertMessages"
8
8
  @remove="onHideAlert"
9
9
  />
10
10
 
11
11
  <div class="clr-form-control clr-row">
12
- <label for="" class="clr-control-label clr-col-md-2">
12
+ <label for="name-selection-input" class="clr-control-label clr-col-md-2">
13
13
  {{ localization.common.name }}
14
14
  </label>
15
15
 
16
16
  <div class="clr-control-container" :class="nameErrorText && 'clr-error'">
17
17
  <div class="flex-align-center">
18
18
  <input
19
- id="device-selection-input"
19
+ id="name-selection-input"
20
20
  v-model="formModelLocal.name"
21
- data-id="device-selection-input"
21
+ data-id="name-selection-input"
22
22
  type="text"
23
23
  class="clr-input"
24
24
  @blur="initValidation(true)"
@@ -42,7 +42,6 @@ import type {
42
42
  } from '~/lib/models/interfaces'
43
43
  import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
44
44
  import type { UI_I_CreateDatastoreForm } from '~/components/common/backup/storage/actions/add/lib/models/interfaces'
45
- import { validateNameAndGenerateDataId } from '~/components/common/backup/storage/actions/add/lib/utils'
46
45
  import { dynamicSteps } from '~/components/common/backup/storage/actions/add/lib/config/steps'
47
46
 
48
47
  const formModelLocal = defineModel<UI_I_CreateDatastoreForm>({ required: true })
@@ -63,10 +62,10 @@ const initValidation = (onlyBlur: boolean): void => {
63
62
 
64
63
  const nameErrorText = computed<string>(() => {
65
64
  if (
66
- props.messagesFields?.datastoreName?.field &&
65
+ props.messagesFields?.name?.field &&
67
66
  !formModelLocal.value.name
68
67
  ) {
69
- return props.messagesFields.datastoreName.field
68
+ return props.messagesFields.name.field
70
69
  }
71
70
 
72
71
  if (!isInitDatastoreNameValidation.value) return ''
@@ -75,26 +74,13 @@ const nameErrorText = computed<string>(() => {
75
74
  : ''
76
75
  })
77
76
 
78
- const defaultDataId = ref<string>('device-selection-alert-error')
79
- const errorAlertDataId = computed<string>(() => {
80
- if (!props.alertMessages?.length) return
81
-
82
- return !formModelLocal.value.dev_names.length
83
- ? `${defaultDataId.value}-not-selected-lundisk`
84
- : validateNameAndGenerateDataId(
85
- formModelLocal.value.name,
86
- props.alertMessages[0],
87
- defaultDataId.value
88
- )
89
- })
90
-
91
77
  const onHideAlert = (): void => {
92
- emits('hide-alert', dynamicSteps.nameAndDevice)
78
+ emits('hide-alert', dynamicSteps.name)
93
79
  }
94
80
  </script>
95
81
 
96
82
  <style lang="scss" scoped>
97
- .device-selection-step {
83
+ .name-selection-step {
98
84
  display: flex;
99
85
  flex-direction: column;
100
86
  height: inherit;
@@ -132,10 +118,5 @@ const onHideAlert = (): void => {
132
118
  }
133
119
  }
134
120
  }
135
- &__disk-list {
136
- display: flex;
137
- flex-direction: column;
138
- height: 100%;
139
- }
140
121
  }
141
122
  </style>
@@ -1,41 +1,41 @@
1
- <template>
2
- <common-backup-storage-actions-add-steps-name-and-configure-new
3
- v-if="isNewView"
4
- v-model="formModel"
5
- v-model:alert-info="isShowAlertInfo"
6
- :messages-fields="props.messagesFields"
7
- />
8
-
9
- <common-backup-storage-actions-add-steps-name-and-configure-old
10
- v-else
11
- v-model="formModel"
12
- v-model:alert-info="isShowAlertInfo"
13
- :alert-messages="props.alertMessages"
14
- :messages-fields="props.messagesFields"
15
- @hide-alert="(e) => emits('hide-alert', e)"
16
- />
17
- </template>
18
-
19
- <script lang="ts" setup>
20
- import type { UI_T_Project } from '~/lib/models/types'
21
- import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
22
- import type { UI_I_CreateDatastoreForm } from '~/components/common/backup/storage/actions/add/lib/models/interfaces'
23
-
24
- const formModel = defineModel<UI_I_CreateDatastoreForm>({ required: true })
25
- const props = defineProps<{
26
- project: UI_T_Project
27
- alertMessages: string[]
28
- messagesFields: UI_I_WizardStep['fields']
29
- }>()
30
- const emits = defineEmits<{
31
- (event: 'hide-alert', value: number): void
32
- }>()
33
-
34
- const { $store }: any = useNuxtApp()
35
-
36
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
37
-
38
- const isShowAlertInfo = ref<boolean>(props.project === 'procurator')
39
- </script>
40
-
41
- <style lang="scss" scoped></style>
1
+ <template>
2
+ <common-backup-storage-actions-add-steps-name-and-configure-new
3
+ v-if="isNewView"
4
+ v-model="formModel"
5
+ v-model:alert-info="isShowAlertInfo"
6
+ :messages-fields="props.messagesFields"
7
+ />
8
+
9
+ <common-backup-storage-actions-add-steps-name-and-configure-old
10
+ v-else
11
+ v-model="formModel"
12
+ v-model:alert-info="isShowAlertInfo"
13
+ :alert-messages="props.alertMessages"
14
+ :messages-fields="props.messagesFields"
15
+ @hide-alert="(e) => emits('hide-alert', e)"
16
+ />
17
+ </template>
18
+
19
+ <script lang="ts" setup>
20
+ import type { UI_T_Project } from '~/lib/models/types'
21
+ import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
22
+ import type { UI_I_CreateDatastoreForm } from '~/components/common/backup/storage/actions/add/lib/models/interfaces'
23
+
24
+ const formModel = defineModel<UI_I_CreateDatastoreForm>({ required: true })
25
+ const props = defineProps<{
26
+ project: UI_T_Project
27
+ alertMessages: string[]
28
+ messagesFields: UI_I_WizardStep['fields']
29
+ }>()
30
+ const emits = defineEmits<{
31
+ (event: 'hide-alert', value: number): void
32
+ }>()
33
+
34
+ const { $store }: any = useNuxtApp()
35
+
36
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
37
+
38
+ const isShowAlertInfo = ref<boolean>(true)
39
+ </script>
40
+
41
+ <style lang="scss" scoped></style>