bfg-common 1.5.746 → 1.5.748
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/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/localization/local_be.json +16 -10
- package/assets/localization/local_en.json +16 -10
- package/assets/localization/local_hy.json +16 -10
- package/assets/localization/local_kk.json +16 -10
- package/assets/localization/local_ru.json +16 -10
- package/assets/localization/local_zh.json +16 -10
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/nav/NavBar.vue +1 -0
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/graph/graphNew/EmptyBlock.vue +2 -1
- package/components/common/layout/console/Console.vue +70 -70
- package/components/common/layout/theHeader/feedback/new/email/Email.vue +2 -2
- package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils.ts +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
- package/components/common/monitor/overview/OverviewNew.vue +1 -1
- package/components/common/pages/backups/DetailView.vue +52 -52
- package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
- package/components/common/pages/backups/modals/Modals.vue +243 -243
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
- package/components/common/pages/backups/modals/lib/config/restore.ts +116 -116
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +187 -187
- package/components/common/pages/backups/modals/restore/Restore.vue +302 -302
- package/components/common/pages/backups/modals/restore/disks/Disks.vue +50 -50
- package/components/common/pages/backups/modals/restore/lib/config/readyToCompleteOptions.ts +94 -94
- package/components/common/pages/backups/modals/restore/lib/config/steps.ts +130 -130
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/backups/modals/restore/types/New.vue +95 -95
- package/components/common/pages/backups/modals/restore/types/Old.vue +62 -62
- package/components/common/pages/backups/modals/restore/types/Types.vue +31 -31
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/pages/tasks/Tasks.vue +125 -125
- package/components/common/pages/tasks/table/Table.vue +373 -373
- package/components/common/pages/tasks/table/lib/config/config.ts +279 -279
- package/components/common/pages/tasks/table/lib/models/interfaces.ts +9 -9
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/spiceConsole/Drawer.vue +420 -420
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/clone/lib/config/steps.ts +295 -295
- package/components/common/vm/actions/clone/new/New.vue +438 -438
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/options/New.vue +264 -264
- package/components/common/vm/actions/common/select/options/Options.vue +58 -58
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/vm/snapshots/modals/confirm/New.vue +9 -8
- package/components/common/vm/snapshots/modals/takeOrEdit/new/New.vue +1 -1
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +227 -227
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/network/add/Add.vue +870 -870
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +11 -1
- package/composables/useAppVersion.ts +21 -21
- package/composables/useBrowse.ts +24 -24
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/lib/config/regExp.ts +1 -1
- package/lib/models/types.ts +59 -59
- package/package.json +1 -1
- package/plugins/console.ts +21 -21
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/plugins/time.ts +58 -58
- package/plugins/validation.ts +6 -6
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +128 -128
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +212 -212
- package/public/spice-console/run.js +210 -210
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/mappers/recentTasks.ts +123 -123
- package/store/tasks/mutations.ts +82 -82
|
@@ -84,57 +84,67 @@ export const bodyItems = (
|
|
|
84
84
|
key: 'col0',
|
|
85
85
|
text: disk[vmMigrateDiskTableItemKeys[0]],
|
|
86
86
|
id: key,
|
|
87
|
+
testId: `disk-table-${key}`,
|
|
87
88
|
},
|
|
88
89
|
{
|
|
89
90
|
key: 'col1',
|
|
90
91
|
text: disk[vmMigrateDiskTableItemKeys[1]],
|
|
91
92
|
id: key,
|
|
93
|
+
testId: `disk-table-${key}`,
|
|
92
94
|
},
|
|
93
95
|
{
|
|
94
96
|
key: 'col2',
|
|
95
97
|
text: file,
|
|
96
98
|
id: key,
|
|
99
|
+
testId: `disk-table-${key}`,
|
|
97
100
|
},
|
|
98
101
|
{
|
|
99
102
|
key: 'col3',
|
|
100
103
|
text: disk[vmMigrateDiskTableItemKeys[3]],
|
|
101
104
|
id: key,
|
|
105
|
+
testId: `disk-table-${key}`,
|
|
102
106
|
},
|
|
103
107
|
{
|
|
104
108
|
key: 'col4',
|
|
105
109
|
text: diskFormat,
|
|
106
110
|
id: key,
|
|
111
|
+
testId: `disk-table-${key}`,
|
|
107
112
|
},
|
|
108
113
|
{
|
|
109
114
|
key: 'col5',
|
|
110
115
|
text: disk.extra[vmMigrateDiskTableItemKeys[5]],
|
|
111
116
|
id: key,
|
|
117
|
+
testId: `disk-table-${key}`,
|
|
112
118
|
},
|
|
113
|
-
|
|
114
119
|
{
|
|
115
120
|
key: 'col6',
|
|
116
121
|
text: disk.extra[vmMigrateDiskTableItemKeys[6]],
|
|
117
122
|
id: key,
|
|
123
|
+
testId: `disk-table-${key}`,
|
|
118
124
|
},
|
|
119
125
|
{
|
|
120
126
|
key: 'col7',
|
|
121
127
|
text: disk.extra[vmMigrateDiskTableItemKeys[7]],
|
|
122
128
|
id: key,
|
|
129
|
+
testId: `disk-table-${key}`,
|
|
123
130
|
},
|
|
124
131
|
{
|
|
125
132
|
key: 'col8',
|
|
126
133
|
text: disk.extra[vmMigrateDiskTableItemKeys[8]],
|
|
127
134
|
id: key,
|
|
135
|
+
testId: `disk-table-${key}`,
|
|
128
136
|
},
|
|
129
137
|
{
|
|
130
138
|
key: 'col9',
|
|
131
139
|
text: disk.extra[vmMigrateDiskTableItemKeys[9]],
|
|
132
140
|
id: key,
|
|
141
|
+
testId: `disk-table-${key}`,
|
|
133
142
|
},
|
|
134
143
|
{
|
|
135
144
|
key: 'col10',
|
|
136
145
|
text: disk.extra[vmMigrateDiskTableItemKeys[10]],
|
|
137
146
|
id: key,
|
|
147
|
+
testId: `disk-table-${key}`,
|
|
138
148
|
},
|
|
139
149
|
])
|
|
140
150
|
})
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
|
|
2
|
-
|
|
3
|
-
export function useAppVersion(): UI_I_UseAppVersionReturnType {
|
|
4
|
-
const config = useRuntimeConfig()
|
|
5
|
-
const version = config.public.APP_VERSION as string
|
|
6
|
-
|
|
7
|
-
// const regexHasDot = /\./
|
|
8
|
-
// const regexHasDotAndB = /\.\d*b$/
|
|
9
|
-
// const regexHasDotAndD = /\..*d/
|
|
10
|
-
|
|
11
|
-
// const isBeta = regexHasDotAndB.test(version)
|
|
12
|
-
// const isDev =
|
|
13
|
-
// regexHasDotAndD.test(version) ||
|
|
14
|
-
// (!regexHasDot.test(version) && version.length < 8)
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
version,
|
|
18
|
-
// isBeta,
|
|
19
|
-
// isDev,
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
|
|
2
|
+
|
|
3
|
+
export function useAppVersion(): UI_I_UseAppVersionReturnType {
|
|
4
|
+
const config = useRuntimeConfig()
|
|
5
|
+
const version = config.public.APP_VERSION as string
|
|
6
|
+
|
|
7
|
+
// const regexHasDot = /\./
|
|
8
|
+
// const regexHasDotAndB = /\.\d*b$/
|
|
9
|
+
// const regexHasDotAndD = /\..*d/
|
|
10
|
+
|
|
11
|
+
// const isBeta = regexHasDotAndB.test(version)
|
|
12
|
+
// const isDev =
|
|
13
|
+
// regexHasDotAndD.test(version) ||
|
|
14
|
+
// (!regexHasDot.test(version) && version.length < 8)
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
version,
|
|
18
|
+
// isBeta,
|
|
19
|
+
// isDev,
|
|
20
|
+
}
|
|
21
|
+
}
|
package/composables/useBrowse.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import type { UI_I_Browse } from '~/lib/models/composables/useBrowse/interfaces'
|
|
2
|
-
|
|
3
|
-
export const useBrowse = (): UI_I_Browse => {
|
|
4
|
-
const browseInfo: UI_I_Browse = {
|
|
5
|
-
version: '',
|
|
6
|
-
type: '',
|
|
7
|
-
}
|
|
8
|
-
const userAgent = navigator.userAgent
|
|
9
|
-
if (userAgent.match(/edg/i)) {
|
|
10
|
-
browseInfo.version = userAgent.match(/Edg\/(\d+)/)?.[1] || ''
|
|
11
|
-
browseInfo.type = 'edg'
|
|
12
|
-
} else if (userAgent.match(/firefox|fxios/i)) {
|
|
13
|
-
browseInfo.version = userAgent.match(/Firefox\/(\d+)/)?.[1] || ''
|
|
14
|
-
browseInfo.type = 'firefox'
|
|
15
|
-
} else if (userAgent.match(/chrome|chromium|crios/i)) {
|
|
16
|
-
browseInfo.version = userAgent.match(/Chrome\/(\d+)/)?.[1] || ''
|
|
17
|
-
browseInfo.type = 'chrome'
|
|
18
|
-
} else if (userAgent.match(/safari/i)) {
|
|
19
|
-
browseInfo.version = userAgent.match(/Safari\/(\d+)/)?.[1] || ''
|
|
20
|
-
browseInfo.type = 'safari'
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return browseInfo
|
|
24
|
-
}
|
|
1
|
+
import type { UI_I_Browse } from '~/lib/models/composables/useBrowse/interfaces'
|
|
2
|
+
|
|
3
|
+
export const useBrowse = (): UI_I_Browse => {
|
|
4
|
+
const browseInfo: UI_I_Browse = {
|
|
5
|
+
version: '',
|
|
6
|
+
type: '',
|
|
7
|
+
}
|
|
8
|
+
const userAgent = navigator.userAgent
|
|
9
|
+
if (userAgent.match(/edg/i)) {
|
|
10
|
+
browseInfo.version = userAgent.match(/Edg\/(\d+)/)?.[1] || ''
|
|
11
|
+
browseInfo.type = 'edg'
|
|
12
|
+
} else if (userAgent.match(/firefox|fxios/i)) {
|
|
13
|
+
browseInfo.version = userAgent.match(/Firefox\/(\d+)/)?.[1] || ''
|
|
14
|
+
browseInfo.type = 'firefox'
|
|
15
|
+
} else if (userAgent.match(/chrome|chromium|crios/i)) {
|
|
16
|
+
browseInfo.version = userAgent.match(/Chrome\/(\d+)/)?.[1] || ''
|
|
17
|
+
browseInfo.type = 'chrome'
|
|
18
|
+
} else if (userAgent.match(/safari/i)) {
|
|
19
|
+
browseInfo.version = userAgent.match(/Safari\/(\d+)/)?.[1] || ''
|
|
20
|
+
browseInfo.type = 'safari'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return browseInfo
|
|
24
|
+
}
|
package/composables/useLocal.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import { useLocalCommon } from '~/composables/useLocalCommon'
|
|
3
|
-
|
|
4
|
-
export const useLocal = (): UI_I_Localization => {
|
|
5
|
-
return useLocalCommon()
|
|
6
|
-
}
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import { useLocalCommon } from '~/composables/useLocalCommon'
|
|
3
|
+
|
|
4
|
+
export const useLocal = (): UI_I_Localization => {
|
|
5
|
+
return useLocalCommon()
|
|
6
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import localAr from '~/assets/scss/clarity/local_ar.json'
|
|
3
|
-
import localRu from '~/assets/localization/local_ru.json'
|
|
4
|
-
import localEn from '~/assets/localization/local_en.json'
|
|
5
|
-
import localHy from '~/assets/localization/local_hy.json'
|
|
6
|
-
import localZh from '~/assets/localization/local_zh.json'
|
|
7
|
-
import localKk from '~/assets/localization/local_kk.json'
|
|
8
|
-
import localBe from '~/assets/localization/local_be.json'
|
|
9
|
-
import { productNameLocal } from '~/lib/utils/localizationMapper'
|
|
10
|
-
|
|
11
|
-
const rawLocals: Record<string, any> = {
|
|
12
|
-
ar: localAr,
|
|
13
|
-
ru: localRu,
|
|
14
|
-
en: localEn,
|
|
15
|
-
hy: localHy,
|
|
16
|
-
zh: localZh,
|
|
17
|
-
kk: localKk,
|
|
18
|
-
be: localBe,
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Кешируем уже обработанные локали
|
|
22
|
-
const processedCache: Record<string, UI_I_Localization | undefined> = {}
|
|
23
|
-
|
|
24
|
-
export const useLocalCommon = (): UI_I_Localization => {
|
|
25
|
-
const config = useRuntimeConfig()
|
|
26
|
-
let code = String(config?.public?.LOCALIZATION_CODE || 'ru').toLowerCase()
|
|
27
|
-
|
|
28
|
-
if (code === 'ar' && !useLocalStorage('rtl')) code = 'ru'
|
|
29
|
-
|
|
30
|
-
if (typeof document !== 'undefined') document.documentElement.lang = code
|
|
31
|
-
|
|
32
|
-
// если в кеше нет — создаём и сохраняем
|
|
33
|
-
if (!processedCache[code]) {
|
|
34
|
-
const raw = rawLocals[code] || rawLocals['ru']
|
|
35
|
-
processedCache[code] = productNameLocal(raw)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return processedCache[code] as UI_I_Localization
|
|
39
|
-
}
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import localAr from '~/assets/scss/clarity/local_ar.json'
|
|
3
|
+
import localRu from '~/assets/localization/local_ru.json'
|
|
4
|
+
import localEn from '~/assets/localization/local_en.json'
|
|
5
|
+
import localHy from '~/assets/localization/local_hy.json'
|
|
6
|
+
import localZh from '~/assets/localization/local_zh.json'
|
|
7
|
+
import localKk from '~/assets/localization/local_kk.json'
|
|
8
|
+
import localBe from '~/assets/localization/local_be.json'
|
|
9
|
+
import { productNameLocal } from '~/lib/utils/localizationMapper'
|
|
10
|
+
|
|
11
|
+
const rawLocals: Record<string, any> = {
|
|
12
|
+
ar: localAr,
|
|
13
|
+
ru: localRu,
|
|
14
|
+
en: localEn,
|
|
15
|
+
hy: localHy,
|
|
16
|
+
zh: localZh,
|
|
17
|
+
kk: localKk,
|
|
18
|
+
be: localBe,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Кешируем уже обработанные локали
|
|
22
|
+
const processedCache: Record<string, UI_I_Localization | undefined> = {}
|
|
23
|
+
|
|
24
|
+
export const useLocalCommon = (): UI_I_Localization => {
|
|
25
|
+
const config = useRuntimeConfig()
|
|
26
|
+
let code = String(config?.public?.LOCALIZATION_CODE || 'ru').toLowerCase()
|
|
27
|
+
|
|
28
|
+
if (code === 'ar' && !useLocalStorage('rtl')) code = 'ru'
|
|
29
|
+
|
|
30
|
+
if (typeof document !== 'undefined') document.documentElement.lang = code
|
|
31
|
+
|
|
32
|
+
// если в кеше нет — создаём и сохраняем
|
|
33
|
+
if (!processedCache[code]) {
|
|
34
|
+
const raw = rawLocals[code] || rawLocals['ru']
|
|
35
|
+
processedCache[code] = productNameLocal(raw)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return processedCache[code] as UI_I_Localization
|
|
39
|
+
}
|
package/lib/config/regExp.ts
CHANGED
|
@@ -8,7 +8,7 @@ const url = /https?:\/\/([a-zA-Zа-яА-Я0-9.-]+\.[a-zA-Zа-яА-Я]{2,6})\b/
|
|
|
8
8
|
const specialChar = /[!@#$%^&*(),.?":{}|<>]/
|
|
9
9
|
const specialCharWidthSpace = /[!@#$%^&*(),?":{}|<>]|(\s)|\.$/
|
|
10
10
|
const cron = /^(\*|([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])|\*\/([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])) (\*|([0-9]|1[0-9]|2[0-3])|\*\/([0-9]|1[0-9]|2[0-3])) (\*|([1-9]|1[0-9]|2[0-9]|3[0-1])|\*\/([1-9]|1[0-9]|2[0-9]|3[0-1])) (\*|([1-9]|1[0-2])|\*\/([1-9]|1[0-2])) (\*|([0-6])|\*\/([0-6]))$/
|
|
11
|
-
export const
|
|
11
|
+
export const allRegExp = {
|
|
12
12
|
ip,
|
|
13
13
|
email,
|
|
14
14
|
password,
|
package/lib/models/types.ts
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
export type UI_T_Project = 'sphere' | 'procurator'
|
|
2
|
-
|
|
3
|
-
export type UI_T_Lang = 'ru' | 'en' | 'be' | 'hy' | 'kk' | 'zh'
|
|
4
|
-
|
|
5
|
-
export type UI_T_NavNodes =
|
|
6
|
-
// для Сферы
|
|
7
|
-
| 'h'
|
|
8
|
-
// для Прокуратора и Сферы
|
|
9
|
-
| 'v'
|
|
10
|
-
| 's'
|
|
11
|
-
| 'n'
|
|
12
|
-
| 'b'
|
|
13
|
-
|
|
14
|
-
export type UI_T_Binary = 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB'
|
|
15
|
-
export type UI_T_BinaryLower =
|
|
16
|
-
| 'kb'
|
|
17
|
-
| 'mb'
|
|
18
|
-
| 'gb'
|
|
19
|
-
| 'tb'
|
|
20
|
-
| 'pb'
|
|
21
|
-
| 'eb'
|
|
22
|
-
| 'zb'
|
|
23
|
-
| 'yb'
|
|
24
|
-
|
|
25
|
-
export type UI_T_LangValue =
|
|
26
|
-
| 'en_US'
|
|
27
|
-
| 'ru_RU'
|
|
28
|
-
| 'hy_AM'
|
|
29
|
-
| 'zh_CHS'
|
|
30
|
-
| 'kk_KZ'
|
|
31
|
-
| 'be_BY'
|
|
32
|
-
| 'BROWSER'
|
|
33
|
-
|
|
34
|
-
export type UI_T_ProcuratorTypeNodes =
|
|
35
|
-
| 'host'
|
|
36
|
-
| 'vm'
|
|
37
|
-
| 'datastore'
|
|
38
|
-
| 'network'
|
|
39
|
-
| 'folder'
|
|
40
|
-
| 'file'
|
|
41
|
-
|
|
42
|
-
export type UI_T_SphereTypeNodes =
|
|
43
|
-
| UI_T_ProcuratorTypeNodes
|
|
44
|
-
| 'zone'
|
|
45
|
-
| 'datacenter'
|
|
46
|
-
| 'cluster'
|
|
47
|
-
| 'zone_dir'
|
|
48
|
-
| 'dc_hc_dir'
|
|
49
|
-
| 'dc_net_dir'
|
|
50
|
-
| 'dc_ds_dir'
|
|
51
|
-
| 'dc_vmt_dir'
|
|
52
|
-
| 'dc_backup_dir'
|
|
53
|
-
| 'IdentityProviders'
|
|
54
|
-
| 'networks' // может быть это не нужный тип так как есть 'network' в UI_T_ProcuratorTypeNodes
|
|
55
|
-
| 'backup_storage'
|
|
56
|
-
| 'bucket'
|
|
57
|
-
| 'vmtemplate' // TODO думаю нужно добавить в UI_T_ProcuratorTypeNodes
|
|
58
|
-
|
|
59
|
-
export type UI_T_AllTypeNodes = UI_T_SphereTypeNodes
|
|
1
|
+
export type UI_T_Project = 'sphere' | 'procurator'
|
|
2
|
+
|
|
3
|
+
export type UI_T_Lang = 'ru' | 'en' | 'be' | 'hy' | 'kk' | 'zh'
|
|
4
|
+
|
|
5
|
+
export type UI_T_NavNodes =
|
|
6
|
+
// для Сферы
|
|
7
|
+
| 'h'
|
|
8
|
+
// для Прокуратора и Сферы
|
|
9
|
+
| 'v'
|
|
10
|
+
| 's'
|
|
11
|
+
| 'n'
|
|
12
|
+
| 'b'
|
|
13
|
+
|
|
14
|
+
export type UI_T_Binary = 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB'
|
|
15
|
+
export type UI_T_BinaryLower =
|
|
16
|
+
| 'kb'
|
|
17
|
+
| 'mb'
|
|
18
|
+
| 'gb'
|
|
19
|
+
| 'tb'
|
|
20
|
+
| 'pb'
|
|
21
|
+
| 'eb'
|
|
22
|
+
| 'zb'
|
|
23
|
+
| 'yb'
|
|
24
|
+
|
|
25
|
+
export type UI_T_LangValue =
|
|
26
|
+
| 'en_US'
|
|
27
|
+
| 'ru_RU'
|
|
28
|
+
| 'hy_AM'
|
|
29
|
+
| 'zh_CHS'
|
|
30
|
+
| 'kk_KZ'
|
|
31
|
+
| 'be_BY'
|
|
32
|
+
| 'BROWSER'
|
|
33
|
+
|
|
34
|
+
export type UI_T_ProcuratorTypeNodes =
|
|
35
|
+
| 'host'
|
|
36
|
+
| 'vm'
|
|
37
|
+
| 'datastore'
|
|
38
|
+
| 'network'
|
|
39
|
+
| 'folder'
|
|
40
|
+
| 'file'
|
|
41
|
+
|
|
42
|
+
export type UI_T_SphereTypeNodes =
|
|
43
|
+
| UI_T_ProcuratorTypeNodes
|
|
44
|
+
| 'zone'
|
|
45
|
+
| 'datacenter'
|
|
46
|
+
| 'cluster'
|
|
47
|
+
| 'zone_dir'
|
|
48
|
+
| 'dc_hc_dir'
|
|
49
|
+
| 'dc_net_dir'
|
|
50
|
+
| 'dc_ds_dir'
|
|
51
|
+
| 'dc_vmt_dir'
|
|
52
|
+
| 'dc_backup_dir'
|
|
53
|
+
| 'IdentityProviders'
|
|
54
|
+
| 'networks' // может быть это не нужный тип так как есть 'network' в UI_T_ProcuratorTypeNodes
|
|
55
|
+
| 'backup_storage'
|
|
56
|
+
| 'bucket'
|
|
57
|
+
| 'vmtemplate' // TODO думаю нужно добавить в UI_T_ProcuratorTypeNodes
|
|
58
|
+
|
|
59
|
+
export type UI_T_AllTypeNodes = UI_T_SphereTypeNodes
|
package/package.json
CHANGED
package/plugins/console.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
import type { UI_T_CODEC } from '~/components/common/spiceConsole/lib/models/types'
|
|
3
|
-
|
|
4
|
-
export default defineNuxtPlugin(() => {
|
|
5
|
-
const console = function (): any {
|
|
6
|
-
const self: any = {
|
|
7
|
-
codec: ref<UI_T_CODEC>(1),
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
self.changeCodec = (codec: UI_T_CODEC): void => {
|
|
11
|
-
self.codec.value = codec
|
|
12
|
-
}
|
|
13
|
-
return self
|
|
14
|
-
}.call({})
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
provide: {
|
|
18
|
-
console,
|
|
19
|
-
},
|
|
20
|
-
}
|
|
21
|
-
})
|
|
1
|
+
import { defineNuxtPlugin } from '#app'
|
|
2
|
+
import type { UI_T_CODEC } from '~/components/common/spiceConsole/lib/models/types'
|
|
3
|
+
|
|
4
|
+
export default defineNuxtPlugin(() => {
|
|
5
|
+
const console = function (): any {
|
|
6
|
+
const self: any = {
|
|
7
|
+
codec: ref<UI_T_CODEC>(1),
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
self.changeCodec = (codec: UI_T_CODEC): void => {
|
|
11
|
+
self.codec.value = codec
|
|
12
|
+
}
|
|
13
|
+
return self
|
|
14
|
+
}.call({})
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
provide: {
|
|
18
|
+
console,
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
})
|
package/plugins/mouse.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
import type { UI_T_MouseMode } from '~/components/common/spiceConsole/lib/models/types'
|
|
3
|
-
|
|
4
|
-
export default defineNuxtPlugin(() => {
|
|
5
|
-
const mouse = function (): any {
|
|
6
|
-
const self: any = {
|
|
7
|
-
mode: ref<UI_T_MouseMode>(1),
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
self.changeMode = (mode: UI_T_MouseMode): void => {
|
|
11
|
-
self.mode.value = mode
|
|
12
|
-
}
|
|
13
|
-
return self
|
|
14
|
-
}.call({})
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
provide: {
|
|
18
|
-
mouse,
|
|
19
|
-
},
|
|
20
|
-
}
|
|
21
|
-
})
|
|
1
|
+
import { defineNuxtPlugin } from '#app'
|
|
2
|
+
import type { UI_T_MouseMode } from '~/components/common/spiceConsole/lib/models/types'
|
|
3
|
+
|
|
4
|
+
export default defineNuxtPlugin(() => {
|
|
5
|
+
const mouse = function (): any {
|
|
6
|
+
const self: any = {
|
|
7
|
+
mode: ref<UI_T_MouseMode>(1),
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
self.changeMode = (mode: UI_T_MouseMode): void => {
|
|
11
|
+
self.mode.value = mode
|
|
12
|
+
}
|
|
13
|
+
return self
|
|
14
|
+
}.call({})
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
provide: {
|
|
18
|
+
mouse,
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
})
|
package/plugins/panelStates.ts
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
import type { UI_I_PanelOptions } from '~/lib/models/plugins/panelStates/interfaces'
|
|
3
|
-
|
|
4
|
-
export default defineNuxtPlugin(() => {
|
|
5
|
-
const panelStates = function (): any {
|
|
6
|
-
const self: any = {}
|
|
7
|
-
let options: UI_I_PanelOptions = {
|
|
8
|
-
leftPanelWidth: 20,
|
|
9
|
-
topPanelHeight: 80,
|
|
10
|
-
isBottomPanelCollapsed: false,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
self.setLeftPanelWidth = function (width: number): void {
|
|
14
|
-
options.leftPanelWidth = width
|
|
15
|
-
|
|
16
|
-
self.setPanelStatesInStorage()
|
|
17
|
-
}
|
|
18
|
-
self.setTopPanelHeight = function (height: number): void {
|
|
19
|
-
options.topPanelHeight = height
|
|
20
|
-
|
|
21
|
-
self.setPanelStatesInStorage()
|
|
22
|
-
}
|
|
23
|
-
self.bottomPanelCollapse = function (collapse: boolean): void {
|
|
24
|
-
options.isBottomPanelCollapsed = collapse
|
|
25
|
-
|
|
26
|
-
self.setPanelStatesInStorage()
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
self.setPanelStatesInStorage = function (): void {
|
|
30
|
-
useLocalStorage('panelStates', options)
|
|
31
|
-
self.emitChanges()
|
|
32
|
-
}
|
|
33
|
-
self.getPanelStatesOfStorage = function (): UI_I_PanelOptions {
|
|
34
|
-
let panelStates = useLocalStorage('panelStates')
|
|
35
|
-
|
|
36
|
-
if (!panelStates) {
|
|
37
|
-
// const parent = document.getElementById('default-layout-outer')
|
|
38
|
-
const parent = document.body
|
|
39
|
-
const parentHeight = parent?.clientHeight || 0
|
|
40
|
-
const onePercent = parentHeight / 100
|
|
41
|
-
const defaultRecentTasksHeight = 250
|
|
42
|
-
|
|
43
|
-
options.topPanelHeight =
|
|
44
|
-
(parentHeight - defaultRecentTasksHeight - 1.5) / onePercent
|
|
45
|
-
|
|
46
|
-
panelStates = options
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
options = panelStates
|
|
50
|
-
|
|
51
|
-
return panelStates
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
self.cb = (): void => {}
|
|
55
|
-
self.on = function (cb: () => any | void): void {
|
|
56
|
-
self.cb = cb
|
|
57
|
-
}
|
|
58
|
-
self.emitChanges = function (): void {
|
|
59
|
-
self.cb(options)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return self
|
|
63
|
-
}.call({})
|
|
64
|
-
|
|
65
|
-
return {
|
|
66
|
-
provide: {
|
|
67
|
-
panelStates,
|
|
68
|
-
},
|
|
69
|
-
}
|
|
70
|
-
})
|
|
1
|
+
import { defineNuxtPlugin } from '#app'
|
|
2
|
+
import type { UI_I_PanelOptions } from '~/lib/models/plugins/panelStates/interfaces'
|
|
3
|
+
|
|
4
|
+
export default defineNuxtPlugin(() => {
|
|
5
|
+
const panelStates = function (): any {
|
|
6
|
+
const self: any = {}
|
|
7
|
+
let options: UI_I_PanelOptions = {
|
|
8
|
+
leftPanelWidth: 20,
|
|
9
|
+
topPanelHeight: 80,
|
|
10
|
+
isBottomPanelCollapsed: false,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
self.setLeftPanelWidth = function (width: number): void {
|
|
14
|
+
options.leftPanelWidth = width
|
|
15
|
+
|
|
16
|
+
self.setPanelStatesInStorage()
|
|
17
|
+
}
|
|
18
|
+
self.setTopPanelHeight = function (height: number): void {
|
|
19
|
+
options.topPanelHeight = height
|
|
20
|
+
|
|
21
|
+
self.setPanelStatesInStorage()
|
|
22
|
+
}
|
|
23
|
+
self.bottomPanelCollapse = function (collapse: boolean): void {
|
|
24
|
+
options.isBottomPanelCollapsed = collapse
|
|
25
|
+
|
|
26
|
+
self.setPanelStatesInStorage()
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
self.setPanelStatesInStorage = function (): void {
|
|
30
|
+
useLocalStorage('panelStates', options)
|
|
31
|
+
self.emitChanges()
|
|
32
|
+
}
|
|
33
|
+
self.getPanelStatesOfStorage = function (): UI_I_PanelOptions {
|
|
34
|
+
let panelStates = useLocalStorage('panelStates')
|
|
35
|
+
|
|
36
|
+
if (!panelStates) {
|
|
37
|
+
// const parent = document.getElementById('default-layout-outer')
|
|
38
|
+
const parent = document.body
|
|
39
|
+
const parentHeight = parent?.clientHeight || 0
|
|
40
|
+
const onePercent = parentHeight / 100
|
|
41
|
+
const defaultRecentTasksHeight = 250
|
|
42
|
+
|
|
43
|
+
options.topPanelHeight =
|
|
44
|
+
(parentHeight - defaultRecentTasksHeight - 1.5) / onePercent
|
|
45
|
+
|
|
46
|
+
panelStates = options
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
options = panelStates
|
|
50
|
+
|
|
51
|
+
return panelStates
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
self.cb = (): void => {}
|
|
55
|
+
self.on = function (cb: () => any | void): void {
|
|
56
|
+
self.cb = cb
|
|
57
|
+
}
|
|
58
|
+
self.emitChanges = function (): void {
|
|
59
|
+
self.cb(options)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return self
|
|
63
|
+
}.call({})
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
provide: {
|
|
67
|
+
panelStates,
|
|
68
|
+
},
|
|
69
|
+
}
|
|
70
|
+
})
|