bfg-common 1.0.97 → 1.0.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/atoms/alert/Notification.vue +167 -167
- package/components/atoms/autocomplete/Autocomplete.vue +236 -236
- package/components/atoms/datepicker/Datepicker.vue +612 -612
- package/components/atoms/list/SelectList.vue +62 -62
- package/components/atoms/nav/NavBar.vue +116 -116
- package/components/atoms/nav/VerticalNavBar.vue +89 -89
- package/components/atoms/notificationBar/NotificationBar.vue +174 -174
- package/components/atoms/perPage/PerPage.vue +52 -52
- package/components/atoms/popup/SimplePopup.vue +90 -90
- package/components/atoms/step/VerticalStep.vue +104 -104
- package/components/atoms/switch/Switch.vue +107 -107
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -204
- package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
- package/components/atoms/tabs/Tabs.vue +189 -189
- package/components/atoms/tooltip/Signpost.vue +224 -224
- package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
- package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
- package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
- package/components/common/browse/Browse.vue +182 -182
- package/components/common/browse/blocks/Title.vue +66 -66
- package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
- package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
- package/components/common/diagramMain/network/Contents.vue +238 -238
- package/components/common/feedback/Buttons.vue +232 -232
- package/components/common/feedback/Message.vue +468 -468
- package/components/common/feedback/VisitPortal.vue +54 -54
- package/components/common/{content → help}/navbar/left/Left.vue +139 -139
- package/components/common/{content → help}/navbar/left/utils/constructAccordion.ts +27 -27
- package/components/common/{content → help}/navbar/right/Right.vue +1 -1
- package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
- package/components/common/modals/Rename.vue +165 -165
- package/components/common/perPage/PerPage.vue +51 -51
- package/components/common/recursionTree/RecursionTree.vue +201 -201
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
- package/components/content/Hint.vue +24 -0
- package/models/store/storage/interfaces.ts +32 -32
- package/modules/fixContentBuild/index.ts +84 -117
- package/modules/fixContentBuild/utils/methods.ts +36 -9
- package/package.json +1 -1
- package/public/spice-console/application/codec.js +257 -257
- package/public/spice-console/lib/rasterEngine.js +907 -907
- package/public/spice-console/network/spicechannel.js +369 -369
- package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
- package/public/spice-console-minify/lib/jgestures.min.js +24 -24
- package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
- package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
- package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
- package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
- package/utils/contentBuild.ts +34 -0
- package/components/common/home/Card.vue +0 -63
- package/components/common/home/ResourceBlock.vue +0 -117
- package/components/common/home/StatusContent.vue +0 -47
- package/components/common/home/alertsTable/AlertsTable.vue +0 -105
- package/components/common/home/alertsTable/config/config.ts +0 -61
- package/components/common/home/alertsTable/models/enums.ts +0 -11
- package/components/common/home/alertsTable/models/interfaces.ts +0 -19
- package/components/common/home/alertsTable/models/types.ts +0 -17
- package/components/common/home/config/configResourceMeterBlock.ts +0 -25
- package/components/common/home/models/interfaces.ts +0 -59
- package/components/common/home/models/types.ts +0 -18
- package/components/common/home/servicesTable/ServicesTable.vue +0 -79
- package/components/common/home/servicesTable/config/config.ts +0 -62
- /package/components/common/{content → help}/navbar/left/models/interfaces.ts +0 -0
- /package/components/common/{content → help}/navbar/right/models/interfaces.ts +0 -0
|
@@ -1,117 +1,84 @@
|
|
|
1
|
-
import { defineNuxtModule } from '@nuxt/kit'
|
|
2
|
-
const fs = require('fs')
|
|
3
|
-
const path = require('path')
|
|
4
|
-
import {
|
|
5
|
-
replaceFileContent,
|
|
6
|
-
removeNonImageFiles,
|
|
7
|
-
removeImagesFromContent,
|
|
8
|
-
updateImagesPath,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
'query.mjs'
|
|
86
|
-
)
|
|
87
|
-
const searchString = '/query/${hash(params)}'
|
|
88
|
-
const replacementString = 'cache'
|
|
89
|
-
replaceFileContent(filePath, searchString, replacementString)
|
|
90
|
-
// End block
|
|
91
|
-
|
|
92
|
-
// Переносим весь контент и удаляем все файлы кроме картинок
|
|
93
|
-
const contentPath = path.join(
|
|
94
|
-
__dirname.replace('/modules/fixContentBuild', ''),
|
|
95
|
-
'content',
|
|
96
|
-
'help'
|
|
97
|
-
)
|
|
98
|
-
if (!fs.existsSync(contentPath)) return;
|
|
99
|
-
|
|
100
|
-
const publicPath = path.join(
|
|
101
|
-
__dirname.replace('/modules/fixContentBuild', ''),
|
|
102
|
-
'public',
|
|
103
|
-
'help',
|
|
104
|
-
'images'
|
|
105
|
-
)
|
|
106
|
-
fs.cp(contentPath, publicPath, { recursive: true }, () => {
|
|
107
|
-
// Удаляем все файлы кроме картинок
|
|
108
|
-
removeNonImageFiles(publicPath)
|
|
109
|
-
|
|
110
|
-
// Удаляем картинки из папки content
|
|
111
|
-
removeImagesFromContent(contentPath)
|
|
112
|
-
})
|
|
113
|
-
// End block
|
|
114
|
-
|
|
115
|
-
// Правим путь к картинкам
|
|
116
|
-
updateImagesPath(contentPath)
|
|
117
|
-
})
|
|
1
|
+
import { defineNuxtModule } from '@nuxt/kit'
|
|
2
|
+
const fs = require('fs')
|
|
3
|
+
const path = require('path')
|
|
4
|
+
import {
|
|
5
|
+
replaceFileContent,
|
|
6
|
+
removeNonImageFiles,
|
|
7
|
+
removeImagesFromContent,
|
|
8
|
+
updateImagesPath,
|
|
9
|
+
updateCustomComponents,
|
|
10
|
+
} from './utils/methods'
|
|
11
|
+
|
|
12
|
+
const npmDev = (): void => {
|
|
13
|
+
const contentPath = path.join(
|
|
14
|
+
__dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
|
|
15
|
+
'content',
|
|
16
|
+
'help'
|
|
17
|
+
)
|
|
18
|
+
// Заменяем кастомные тэги
|
|
19
|
+
updateCustomComponents(contentPath)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const npmGenerate = (): void => {
|
|
23
|
+
// Правим путь к файлу
|
|
24
|
+
const filePath = path.join(
|
|
25
|
+
__dirname.replace('/bfg-common/modules/fixContentBuild', ''),
|
|
26
|
+
'@nuxt',
|
|
27
|
+
'content',
|
|
28
|
+
'dist',
|
|
29
|
+
'runtime',
|
|
30
|
+
'legacy',
|
|
31
|
+
'composables',
|
|
32
|
+
'query.mjs'
|
|
33
|
+
)
|
|
34
|
+
const searchString = '/query/${hash(params)}'
|
|
35
|
+
const replacementString = 'cache'
|
|
36
|
+
replaceFileContent(filePath, searchString, replacementString)
|
|
37
|
+
// End block
|
|
38
|
+
|
|
39
|
+
// Переносим весь контент и удаляем все файлы кроме картинок
|
|
40
|
+
const contentPath = path.join(
|
|
41
|
+
__dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
|
|
42
|
+
'content',
|
|
43
|
+
'help'
|
|
44
|
+
)
|
|
45
|
+
if (!fs.existsSync(contentPath)) return
|
|
46
|
+
|
|
47
|
+
const publicPath = path.join(
|
|
48
|
+
__dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
|
|
49
|
+
'public',
|
|
50
|
+
'help',
|
|
51
|
+
'images'
|
|
52
|
+
)
|
|
53
|
+
fs.cp(contentPath, publicPath, { recursive: true }, () => {
|
|
54
|
+
// Удаляем все файлы кроме картинок
|
|
55
|
+
removeNonImageFiles(publicPath)
|
|
56
|
+
|
|
57
|
+
// Удаляем картинки из папки content
|
|
58
|
+
removeImagesFromContent(contentPath)
|
|
59
|
+
})
|
|
60
|
+
// End block
|
|
61
|
+
|
|
62
|
+
// Правим путь к картинкам
|
|
63
|
+
updateImagesPath(contentPath)
|
|
64
|
+
|
|
65
|
+
// Заменяем кастомные тэги
|
|
66
|
+
updateCustomComponents(contentPath)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default defineNuxtModule({
|
|
70
|
+
meta: {
|
|
71
|
+
name: 'fix-content-build',
|
|
72
|
+
configKey: 'fixContentBuild',
|
|
73
|
+
},
|
|
74
|
+
setup() {
|
|
75
|
+
switch (process.env.npm_command) {
|
|
76
|
+
case 'run-script':
|
|
77
|
+
npmDev()
|
|
78
|
+
break
|
|
79
|
+
case 'exec':
|
|
80
|
+
npmGenerate()
|
|
81
|
+
break
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import path from 'path'
|
|
2
|
-
import fs from 'fs'
|
|
1
|
+
import path from 'path'
|
|
2
|
+
import fs from 'fs'
|
|
3
3
|
|
|
4
4
|
const isImage = (fileName: string) => {
|
|
5
5
|
const imageExtensions = ['.png', '.jpeg', '.jpg']
|
|
@@ -41,9 +41,9 @@ export const removeImagesFromContent = (dirPath: string) => {
|
|
|
41
41
|
const filePathWidthOutPrefix = filePath.replace('_index.md', 'index.md')
|
|
42
42
|
fs.rename(filePath, filePathWidthOutPrefix, (err: any) => {
|
|
43
43
|
if (err) {
|
|
44
|
-
console.error(`Error renaming file: ${err}`)
|
|
44
|
+
console.error(`Error renaming file: ${err}`)
|
|
45
45
|
}
|
|
46
|
-
})
|
|
46
|
+
})
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
})
|
|
@@ -59,10 +59,36 @@ export const updateImagesPath = (dirPath: string) => {
|
|
|
59
59
|
} else {
|
|
60
60
|
if (isMdFile(file)) {
|
|
61
61
|
// @ts-ignore
|
|
62
|
-
const imagePath = filePath
|
|
62
|
+
const imagePath = filePath
|
|
63
|
+
.replaceAll('\\', '/')
|
|
63
64
|
.match(/\/content.+\//)[0]
|
|
64
|
-
.replace('
|
|
65
|
-
replaceFileContent(
|
|
65
|
+
.replace('/content/help', '/help/images')
|
|
66
|
+
replaceFileContent(
|
|
67
|
+
filePath,
|
|
68
|
+
/!\[(.*)\]\((.*?)\)/g,
|
|
69
|
+
``
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const updateCustomComponents = (dirPath: string) => {
|
|
77
|
+
fs.readdirSync(dirPath).forEach((file: string) => {
|
|
78
|
+
const filePath = path.join(dirPath, file)
|
|
79
|
+
const isDir = fs.lstatSync(filePath).isDirectory()
|
|
80
|
+
|
|
81
|
+
if (isDir) {
|
|
82
|
+
updateCustomComponents(filePath)
|
|
83
|
+
} else {
|
|
84
|
+
if (isMdFile(file)) {
|
|
85
|
+
replaceFileContent(
|
|
86
|
+
filePath,
|
|
87
|
+
/{{ *< *hint *(info) *> *}}|{{ *< *\/hint *> *}}/g,
|
|
88
|
+
(_match: any, hintInfo: string) => {
|
|
89
|
+
return hintInfo ? '::hint' : '::'
|
|
90
|
+
}
|
|
91
|
+
)
|
|
66
92
|
}
|
|
67
93
|
}
|
|
68
94
|
})
|
|
@@ -71,14 +97,15 @@ export const updateImagesPath = (dirPath: string) => {
|
|
|
71
97
|
export const replaceFileContent = (
|
|
72
98
|
filePath: string,
|
|
73
99
|
searchString: string | RegExp,
|
|
74
|
-
replacementString:
|
|
100
|
+
replacementString: any
|
|
75
101
|
) => {
|
|
76
102
|
fs.readFile(filePath, 'utf8', (err: any, data: string) => {
|
|
77
103
|
if (err) {
|
|
78
104
|
return console.log(err)
|
|
79
105
|
}
|
|
80
106
|
|
|
81
|
-
if (data.match(replacementString))
|
|
107
|
+
if (typeof replacementString === 'string' && data.match(replacementString))
|
|
108
|
+
return
|
|
82
109
|
|
|
83
110
|
const updatedContent = data.replace(searchString, replacementString)
|
|
84
111
|
|