bfg-common 1.3.373 → 1.3.374

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 (58) hide show
  1. package/components/atoms/loader/Loader.vue +30 -30
  2. package/components/atoms/loader/PreLoader.vue +38 -38
  3. package/components/atoms/switch/Switch.vue +111 -111
  4. package/components/atoms/table/compact/Compact.vue +526 -526
  5. package/components/common/adapterManager/ui/table/Header.vue +93 -93
  6. package/components/common/adapterManager/ui/table/Table.vue +162 -162
  7. package/components/common/context/Context.vue +99 -99
  8. package/components/common/lib/config/states.ts +126 -126
  9. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  10. package/components/common/shortcuts/lib/models/interfaces.ts +1 -1
  11. package/components/common/vm/actions/add/Add.vue +602 -602
  12. package/components/common/vm/actions/clone/Clone.vue +518 -518
  13. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +273 -273
  14. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +697 -697
  15. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +256 -256
  16. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +458 -458
  17. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +304 -304
  18. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +167 -167
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +82 -82
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +32 -32
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +182 -182
  22. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +164 -164
  23. package/components/common/vm/actions/common/select/name/Name.vue +235 -235
  24. package/components/common/vm/actions/common/select/storage/Storage.vue +198 -198
  25. package/components/common/vm/actions/editSettings/EditSettings.vue +316 -316
  26. package/components/common/weekSelect/lib/config/options.ts +10 -10
  27. package/components/common/wizards/datastore/add/Add.vue +436 -436
  28. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +191 -191
  29. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -38
  30. package/components/common/wizards/datastore/add/lib/utils.ts +70 -70
  31. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +160 -160
  32. package/components/common/wizards/datastore/add/nfs/Nfs.vue +112 -112
  33. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +104 -104
  34. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -62
  35. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -53
  36. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +86 -86
  37. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +184 -184
  38. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +459 -459
  39. package/components/common/wizards/datastore/add/types/Types.vue +80 -80
  40. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +49 -49
  41. package/composables/useAppVersion.ts +21 -21
  42. package/composables/useEnvLanguage.ts +20 -20
  43. package/lib/utils/sendTask.ts +72 -72
  44. package/minify.js +146 -146
  45. package/package.json +1 -1
  46. package/plugins/spice-console/spice.console.ts +147 -18
  47. package/public/spice-console/application/codec.js +257 -257
  48. package/public/spice-console/application/inputmanager.js +1 -1
  49. package/public/spice-console/lib/rasterEngine.js +907 -907
  50. package/public/spice-console/network/spicechannel.js +375 -369
  51. package/public/spice-console/process/mainprocess.js +2 -2
  52. package/public/spice-console-minify/run.min.js +1 -1
  53. package/store/main/lib/interfaces.ts +9 -9
  54. package/store/tasks/actions.ts +133 -133
  55. package/store/tasks/getters.ts +25 -25
  56. package/store/tasks/lib/models/interfaces.ts +18 -18
  57. package/store/tasks/mutations.ts +58 -58
  58. package/store/tasks/state.ts +16 -16
@@ -1,191 +1,191 @@
1
- import type { UI_I_VerticalStepItem } from '~/components/atoms/lib/models/interfaces'
2
- import type { UI_I_Localization } from '~/lib/models/interfaces'
3
- import type {
4
- UI_T_WizardDatastoreMode,
5
- UI_T_DatastoreType,
6
- UI_T_NfsType,
7
- } from '~/components/common/wizards/datastore/add/lib/models/types'
8
-
9
- const stepFromSharedStorm = (
10
- localization: UI_I_Localization,
11
- mode: UI_T_WizardDatastoreMode
12
- ): UI_I_VerticalStepItem[] => {
13
- const steps = [
14
- { text: localization.type, disabled: false, complete: false },
15
- {
16
- text: localization.nameAndDeviceSelection,
17
- disabled: true,
18
- complete: false,
19
- },
20
- // {
21
- // text: localization.vmfsVersion,
22
- // disabled: true,
23
- // complete: false,
24
- // }, <!-- TODO в shared-storm пока верси не будет -->
25
- // {
26
- // text: localization.partitionConfiguration,
27
- // disabled: true,
28
- // complete: false,
29
- // },
30
- ]
31
- // TODO refactoring
32
- if (mode === 'procurator') {
33
- steps.push({
34
- text: localization.partitionConfiguration,
35
- disabled: true,
36
- complete: false,
37
- })
38
- }
39
- steps.push({
40
- text: localization.readyComplete,
41
- disabled: true,
42
- complete: false,
43
- })
44
- return steps
45
- }
46
-
47
- const stepFromNfs = (
48
- localization: UI_I_Localization,
49
- mode: UI_T_WizardDatastoreMode
50
- ): UI_I_VerticalStepItem[] => {
51
- const steps = [
52
- { text: localization.type, disabled: false, complete: false },
53
- { text: localization.nfsVersion, disabled: true, complete: false },
54
- {
55
- text: localization.nameAndConfiguration,
56
- disabled: true,
57
- complete: false,
58
- },
59
- // {
60
- // text: localization.kerberosAuthentication,
61
- // disabled: true,
62
- // complete: false,
63
- // permissions: ['nfs-4.1'],
64
- // },// TODO Пока что не будет чут попоже
65
- // { text: localization.hostsAccessibility, disabled: true, complete: false }, // Он будет когда будем делать групповое
66
- // { text: localization.readyComplete, disabled: true, complete: false },
67
- ]
68
-
69
- if (mode === 'sphere') {
70
- steps.push({
71
- text: localization.hostsAccessibility,
72
- disabled: true,
73
- complete: false,
74
- })
75
- }
76
-
77
- steps.push({
78
- text: localization.readyComplete,
79
- disabled: true,
80
- complete: false,
81
- })
82
-
83
- return steps
84
-
85
- // console.log(position, 'position')
86
-
87
- // nfsItems = nfsItems.filter((item) => {
88
- // // return item.permissions
89
- // // ? type !== null
90
- // // ? item.permissions.includes(type)
91
- // // : true
92
- // // : false
93
- // return item.permissions ? item.permissions.includes(type) : true
94
- // })
95
- // nfsItems.forEach((x, key) => {
96
- // if (key <= position) {
97
- // // console.log(key, 'key')
98
- // x.complete = true
99
- // x.disabled = false
100
- // }
101
- // })
102
-
103
- // console.log(type, 'typeeeeee')
104
- }
105
-
106
- // const stemFromVvol = (localization: UI_I_Localization): UI_I_VerticalStepItem[] => {
107
- // return [
108
- // { text: localization.type, disabled: false, complete: false },
109
- // {
110
- // text: localization.nameAndContainerSelection,
111
- // disabled: true,
112
- // complete: false,
113
- // },
114
- // { text: localization.hostsAccessibility, disabled: true, complete: false },
115
- // { text: localization.readyComplete, disabled: true, complete: false },
116
- // ]
117
- // }
118
- const stemFromLocal = (
119
- localization: UI_I_Localization,
120
- mode: UI_T_WizardDatastoreMode
121
- ): UI_I_VerticalStepItem[] => {
122
- const isModeProcurator = mode === 'procurator'
123
- return [
124
- { text: localization.type, disabled: false, complete: false },
125
- {
126
- text: localization[
127
- isModeProcurator ? 'selectDatastoreName' : 'nameAndDeviceSelection'
128
- ],
129
- disabled: true,
130
- complete: false,
131
- },
132
- { text: localization.readyComplete, disabled: true, complete: false },
133
- ]
134
- }
135
-
136
- export const stepItemsFunc = (
137
- localization: UI_I_Localization,
138
- type: UI_T_DatastoreType,
139
- mode: UI_T_WizardDatastoreMode
140
- ): UI_I_VerticalStepItem[] => {
141
- const handlers = {
142
- 'shared-storm': stepFromSharedStorm,
143
- nfs: stepFromNfs,
144
- local: stemFromLocal,
145
- }
146
-
147
- return handlers[type](localization, mode)
148
- }
149
-
150
- interface SubTitles {
151
- 'shared-storm': string[]
152
- nfs: string[]
153
- local: string[]
154
- }
155
-
156
- export const subTitleFunc = (
157
- localization: UI_I_Localization,
158
- type: UI_T_DatastoreType,
159
- position: number,
160
- version?: UI_T_NfsType
161
- ): string => {
162
- position = position - 1
163
-
164
- if (type === 'nfs' && version === 'nfs-3' && position === 2) {
165
- position = position + 1
166
- }
167
-
168
- const description: string[] = [
169
- localization.selectNfsVersion,
170
- localization.nameAndConfigurationDesc,
171
- // localization.kerberosAuthenticationDesc.replace(
172
- // '{0}',
173
- // version?.toUpperCase() || ''
174
- // ),
175
- // localization.hostsAccessibilityDesc,
176
- ]
177
-
178
- const sharedStormDesc: string[] = [
179
- localization.nameAndDeviceSelectionDesc,
180
- // localization.vmfsVersionDesc,
181
- localization.partitionConfigurationDesc,
182
- ]
183
-
184
- const subTitles: SubTitles = {
185
- nfs: description,
186
- 'shared-storm': sharedStormDesc,
187
- local: [],
188
- }
189
-
190
- return subTitles[type][position]
191
- }
1
+ import type { UI_I_VerticalStepItem } from '~/components/atoms/lib/models/interfaces'
2
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
3
+ import type {
4
+ UI_T_WizardDatastoreMode,
5
+ UI_T_DatastoreType,
6
+ UI_T_NfsType,
7
+ } from '~/components/common/wizards/datastore/add/lib/models/types'
8
+
9
+ const stepFromSharedStorm = (
10
+ localization: UI_I_Localization,
11
+ mode: UI_T_WizardDatastoreMode
12
+ ): UI_I_VerticalStepItem[] => {
13
+ const steps = [
14
+ { text: localization.type, disabled: false, complete: false },
15
+ {
16
+ text: localization.nameAndDeviceSelection,
17
+ disabled: true,
18
+ complete: false,
19
+ },
20
+ // {
21
+ // text: localization.vmfsVersion,
22
+ // disabled: true,
23
+ // complete: false,
24
+ // }, <!-- TODO в shared-storm пока верси не будет -->
25
+ // {
26
+ // text: localization.partitionConfiguration,
27
+ // disabled: true,
28
+ // complete: false,
29
+ // },
30
+ ]
31
+ // TODO refactoring
32
+ if (mode === 'procurator') {
33
+ steps.push({
34
+ text: localization.partitionConfiguration,
35
+ disabled: true,
36
+ complete: false,
37
+ })
38
+ }
39
+ steps.push({
40
+ text: localization.readyComplete,
41
+ disabled: true,
42
+ complete: false,
43
+ })
44
+ return steps
45
+ }
46
+
47
+ const stepFromNfs = (
48
+ localization: UI_I_Localization,
49
+ mode: UI_T_WizardDatastoreMode
50
+ ): UI_I_VerticalStepItem[] => {
51
+ const steps = [
52
+ { text: localization.type, disabled: false, complete: false },
53
+ { text: localization.nfsVersion, disabled: true, complete: false },
54
+ {
55
+ text: localization.nameAndConfiguration,
56
+ disabled: true,
57
+ complete: false,
58
+ },
59
+ // {
60
+ // text: localization.kerberosAuthentication,
61
+ // disabled: true,
62
+ // complete: false,
63
+ // permissions: ['nfs-4.1'],
64
+ // },// TODO Пока что не будет чут попоже
65
+ // { text: localization.hostsAccessibility, disabled: true, complete: false }, // Он будет когда будем делать групповое
66
+ // { text: localization.readyComplete, disabled: true, complete: false },
67
+ ]
68
+
69
+ if (mode === 'sphere') {
70
+ steps.push({
71
+ text: localization.hostsAccessibility,
72
+ disabled: true,
73
+ complete: false,
74
+ })
75
+ }
76
+
77
+ steps.push({
78
+ text: localization.readyComplete,
79
+ disabled: true,
80
+ complete: false,
81
+ })
82
+
83
+ return steps
84
+
85
+ // console.log(position, 'position')
86
+
87
+ // nfsItems = nfsItems.filter((item) => {
88
+ // // return item.permissions
89
+ // // ? type !== null
90
+ // // ? item.permissions.includes(type)
91
+ // // : true
92
+ // // : false
93
+ // return item.permissions ? item.permissions.includes(type) : true
94
+ // })
95
+ // nfsItems.forEach((x, key) => {
96
+ // if (key <= position) {
97
+ // // console.log(key, 'key')
98
+ // x.complete = true
99
+ // x.disabled = false
100
+ // }
101
+ // })
102
+
103
+ // console.log(type, 'typeeeeee')
104
+ }
105
+
106
+ // const stemFromVvol = (localization: UI_I_Localization): UI_I_VerticalStepItem[] => {
107
+ // return [
108
+ // { text: localization.type, disabled: false, complete: false },
109
+ // {
110
+ // text: localization.nameAndContainerSelection,
111
+ // disabled: true,
112
+ // complete: false,
113
+ // },
114
+ // { text: localization.hostsAccessibility, disabled: true, complete: false },
115
+ // { text: localization.readyComplete, disabled: true, complete: false },
116
+ // ]
117
+ // }
118
+ const stemFromLocal = (
119
+ localization: UI_I_Localization,
120
+ mode: UI_T_WizardDatastoreMode
121
+ ): UI_I_VerticalStepItem[] => {
122
+ const isModeProcurator = mode === 'procurator'
123
+ return [
124
+ { text: localization.type, disabled: false, complete: false },
125
+ {
126
+ text: localization[
127
+ isModeProcurator ? 'selectDatastoreName' : 'nameAndDeviceSelection'
128
+ ],
129
+ disabled: true,
130
+ complete: false,
131
+ },
132
+ { text: localization.readyComplete, disabled: true, complete: false },
133
+ ]
134
+ }
135
+
136
+ export const stepItemsFunc = (
137
+ localization: UI_I_Localization,
138
+ type: UI_T_DatastoreType,
139
+ mode: UI_T_WizardDatastoreMode
140
+ ): UI_I_VerticalStepItem[] => {
141
+ const handlers = {
142
+ 'shared-storm': stepFromSharedStorm,
143
+ nfs: stepFromNfs,
144
+ local: stemFromLocal,
145
+ }
146
+
147
+ return handlers[type](localization, mode)
148
+ }
149
+
150
+ interface SubTitles {
151
+ 'shared-storm': string[]
152
+ nfs: string[]
153
+ local: string[]
154
+ }
155
+
156
+ export const subTitleFunc = (
157
+ localization: UI_I_Localization,
158
+ type: UI_T_DatastoreType,
159
+ position: number,
160
+ version?: UI_T_NfsType
161
+ ): string => {
162
+ position = position - 1
163
+
164
+ if (type === 'nfs' && version === 'nfs-3' && position === 2) {
165
+ position = position + 1
166
+ }
167
+
168
+ const description: string[] = [
169
+ localization.selectNfsVersion,
170
+ localization.nameAndConfigurationDesc,
171
+ // localization.kerberosAuthenticationDesc.replace(
172
+ // '{0}',
173
+ // version?.toUpperCase() || ''
174
+ // ),
175
+ // localization.hostsAccessibilityDesc,
176
+ ]
177
+
178
+ const sharedStormDesc: string[] = [
179
+ localization.nameAndDeviceSelectionDesc,
180
+ // localization.vmfsVersionDesc,
181
+ localization.partitionConfigurationDesc,
182
+ ]
183
+
184
+ const subTitles: SubTitles = {
185
+ nfs: description,
186
+ 'shared-storm': sharedStormDesc,
187
+ local: [],
188
+ }
189
+
190
+ return subTitles[type][position]
191
+ }
@@ -1,38 +1,38 @@
1
- import { UI_T_NfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
2
-
3
- // TODO refactoring
4
- export interface UI_I_NfsPoolNameForm<T = number> {
5
- server: string
6
- folder: string
7
- version: T
8
- readonly: boolean
9
- hosts: string[]
10
- }
11
- export interface UI_I_CreateDatastoreBodyRequest {
12
- name: string
13
- pool_name: string
14
- type_code: number
15
- }
16
- interface I_NfsForm extends UI_I_NfsPoolNameForm<UI_T_NfsType> {
17
- name: string
18
- type_code: number
19
- }
20
- interface I_SharedStorm extends UI_I_CreateDatastoreBodyRequest {
21
- dev_names: string[]
22
- hosts: string[]
23
- }
24
-
25
- export interface UI_I_CreateDatastoreForm {
26
- local: {
27
- name: string
28
- hosts: string[]
29
- type_code: number
30
- }
31
- sharedStorm: I_SharedStorm
32
- nfs: I_NfsForm
33
- }
34
-
35
- export interface UI_I_CreateStorageUuid {
36
- code: number
37
- pool_name: string
38
- }
1
+ import { UI_T_NfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
2
+
3
+ // TODO refactoring
4
+ export interface UI_I_NfsPoolNameForm<T = number> {
5
+ server: string
6
+ folder: string
7
+ version: T
8
+ readonly: boolean
9
+ hosts: string[]
10
+ }
11
+ export interface UI_I_CreateDatastoreBodyRequest {
12
+ name: string
13
+ pool_name: string
14
+ type_code: number
15
+ }
16
+ interface I_NfsForm extends UI_I_NfsPoolNameForm<UI_T_NfsType> {
17
+ name: string
18
+ type_code: number
19
+ }
20
+ interface I_SharedStorm extends UI_I_CreateDatastoreBodyRequest {
21
+ dev_names: string[]
22
+ hosts: string[]
23
+ }
24
+
25
+ export interface UI_I_CreateDatastoreForm {
26
+ local: {
27
+ name: string
28
+ hosts: string[]
29
+ type_code: number
30
+ }
31
+ sharedStorm: I_SharedStorm
32
+ nfs: I_NfsForm
33
+ }
34
+
35
+ export interface UI_I_CreateStorageUuid {
36
+ code: number
37
+ pool_name: string
38
+ }
@@ -1,70 +1,70 @@
1
- import { API_UI_I_Error } from '~/lib/models/store/interfaces'
2
- import {
3
- UI_I_DatastoreValidityName,
4
- UI_T_WizardDatastoreMode,
5
- } from '~/components/common/wizards/datastore/add/lib/models/types'
6
- // import {
7
- // UI_I_CreateDatastoreBodyRequest,
8
- // I_CreateStorageUuid,
9
- // } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
10
-
11
- // type T_StoragePoolNameResult = {
12
- // data: I_CreateStorageUuid
13
- // msg: API_UI_I_Error
14
- // }
15
-
16
- // type T_NullableStoragePoolNameResult = {
17
- // [K in keyof T_StoragePoolNameResult]: T_StoragePoolNameResult[K] | null
18
- // }
19
-
20
- export const checkValidityName = async (
21
- name: string,
22
- mode: UI_T_WizardDatastoreMode = 'procurator'
23
- ): Promise<UI_I_DatastoreValidityName> => {
24
- // TODO move to projects!!!
25
-
26
- const kind = 10 // TODO move in global space
27
- const url =
28
- mode === 'procurator'
29
- ? `/ui/ds/validate?name=${name}`
30
- : `/ui/object/validate_name?name=${name}&kind=${kind}`
31
- // @ts-ignore
32
- const { error } = await useMyFetch<null, API_UI_I_Error>(url, {
33
- method: 'GET',
34
- })
35
-
36
- if (error.value && error.value.data.error_code !== 0) {
37
- const existError = error.value.data?.error_message || error.value.data
38
-
39
- return { valid: false, msg: existError }
40
- }
41
-
42
- return { valid: true, msg: null }
43
- }
44
-
45
- // export const getStoragePoolName = async <T>(
46
- // url: string,
47
- // params: T
48
- // ): Promise<T_NullableStoragePoolNameResult> => {
49
- // const { data, error } = await useMyFetch<I_CreateStorageUuid, API_UI_I_Error>(
50
- // url,
51
- // {
52
- // method: 'POST',
53
- // body: params,
54
- // }
55
- // )
56
- //
57
- // if (error.value) return { data: null, msg: error.value }
58
- //
59
- // return { data: data.value, msg: null }
60
- // }
61
-
62
- // export const createDatastore = async <T = UI_I_CreateDatastoreBodyRequest>(
63
- // params: T
64
- // ): Promise<API_UI_I_Error> => {
65
- // const { error } = await useMyFetch<any, API_UI_I_Error>('/api/v1/pn/ds', {
66
- // method: 'POST',
67
- // body: params,
68
- // })
69
- // return error.value
70
- // }
1
+ import { API_UI_I_Error } from '~/lib/models/store/interfaces'
2
+ import {
3
+ UI_I_DatastoreValidityName,
4
+ UI_T_WizardDatastoreMode,
5
+ } from '~/components/common/wizards/datastore/add/lib/models/types'
6
+ // import {
7
+ // UI_I_CreateDatastoreBodyRequest,
8
+ // I_CreateStorageUuid,
9
+ // } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
10
+
11
+ // type T_StoragePoolNameResult = {
12
+ // data: I_CreateStorageUuid
13
+ // msg: API_UI_I_Error
14
+ // }
15
+
16
+ // type T_NullableStoragePoolNameResult = {
17
+ // [K in keyof T_StoragePoolNameResult]: T_StoragePoolNameResult[K] | null
18
+ // }
19
+
20
+ export const checkValidityName = async (
21
+ name: string,
22
+ mode: UI_T_WizardDatastoreMode = 'procurator'
23
+ ): Promise<UI_I_DatastoreValidityName> => {
24
+ // TODO move to projects!!!
25
+
26
+ const kind = 10 // TODO move in global space
27
+ const url =
28
+ mode === 'procurator'
29
+ ? `/ui/ds/validate?name=${name}`
30
+ : `/ui/object/validate_name?name=${name}&kind=${kind}`
31
+ // @ts-ignore
32
+ const { error } = await useMyFetch<null, API_UI_I_Error>(url, {
33
+ method: 'GET',
34
+ })
35
+
36
+ if (error.value && error.value.data.error_code !== 0) {
37
+ const existError = error.value.data?.error_message || error.value.data
38
+
39
+ return { valid: false, msg: existError }
40
+ }
41
+
42
+ return { valid: true, msg: null }
43
+ }
44
+
45
+ // export const getStoragePoolName = async <T>(
46
+ // url: string,
47
+ // params: T
48
+ // ): Promise<T_NullableStoragePoolNameResult> => {
49
+ // const { data, error } = await useMyFetch<I_CreateStorageUuid, API_UI_I_Error>(
50
+ // url,
51
+ // {
52
+ // method: 'POST',
53
+ // body: params,
54
+ // }
55
+ // )
56
+ //
57
+ // if (error.value) return { data: null, msg: error.value }
58
+ //
59
+ // return { data: data.value, msg: null }
60
+ // }
61
+
62
+ // export const createDatastore = async <T = UI_I_CreateDatastoreBodyRequest>(
63
+ // params: T
64
+ // ): Promise<API_UI_I_Error> => {
65
+ // const { error } = await useMyFetch<any, API_UI_I_Error>('/api/v1/pn/ds', {
66
+ // method: 'POST',
67
+ // body: params,
68
+ // })
69
+ // return error.value
70
+ // }