bfg-common 1.1.105 → 1.2.0
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/table/info/models/interfaces.ts +3 -0
- package/components/common/monitor/advanced/Advanced.vue +2 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts +4 -4
- package/components/common/monitor/models/interfaces.ts +1 -0
- package/components/common/monitor/overview/Overview.vue +70 -29
- package/components/common/monitor/overview/filters/Filters.vue +0 -1
- package/components/common/monitor/overview/filters/config/filterOptions.ts +7 -5
- package/minify.js +126 -51
- package/package.json +4 -2
- package/plugins/spice-console/spice.console.ts +3 -113
- package/public/spice-console-minify/run.min.js +68 -96
- package/public/spice-console-minify/application/WorkerProcess.min.js +0 -1
- package/public/spice-console-minify/application/WorkerProcess_back.min.js +0 -1
- package/public/spice-console-minify/application/WorkerProcess_meta.min.js +0 -1
- package/public/spice-console-minify/application/WorkerProcess_reverse.min.js +0 -1
- package/public/spice-console-minify/application/agent.min.js +0 -1
- package/public/spice-console-minify/application/application.min.js +0 -1
- package/public/spice-console-minify/application/checkActivity.min.js +0 -1
- package/public/spice-console-minify/application/clientgui.min.js +0 -1
- package/public/spice-console-minify/application/clipboard/clipboarddataparser.min.js +0 -1
- package/public/spice-console-minify/application/clipboard/local/localClipboard.min.js +0 -1
- package/public/spice-console-minify/application/clipboard.min.js +0 -1
- package/public/spice-console-minify/application/codec.min.js +0 -1
- package/public/spice-console-minify/application/imagecache.min.js +0 -1
- package/public/spice-console-minify/application/inputmanager.min.js +0 -1
- package/public/spice-console-minify/application/packetfactory.min.js +0 -1
- package/public/spice-console-minify/application/packetfilter.min.js +0 -1
- package/public/spice-console-minify/application/packetprocess.min.js +0 -1
- package/public/spice-console-minify/application/rasteroperation.min.js +0 -1
- package/public/spice-console-minify/application/spiceconnection.min.js +0 -1
- package/public/spice-console-minify/application/stream.min.js +0 -1
- package/public/spice-console-minify/application/virtualmouse.min.js +0 -1
- package/public/spice-console-minify/keymaps/keyevent.min.js +0 -1
- package/public/spice-console-minify/keymaps/keymap.min.js +0 -1
- package/public/spice-console-minify/keymaps/keymapes.min.js +0 -1
- package/public/spice-console-minify/keymaps/keymapesObj.min.js +0 -1
- package/public/spice-console-minify/keymaps/keymapus.min.js +0 -1
- package/public/spice-console-minify/keymaps/scanCodeObjModifier.min.js +0 -1
- package/public/spice-console-minify/keymaps/scanCodeObjProvider.min.js +0 -1
- package/public/spice-console-minify/lib/AsyncConsumer.min.js +0 -1
- package/public/spice-console-minify/lib/AsyncWorker.min.js +0 -1
- package/public/spice-console-minify/lib/CollisionDetector.min.js +0 -1
- package/public/spice-console-minify/lib/DataLogger.min.js +0 -1
- package/public/spice-console-minify/lib/GenericObjectPool.min.js +0 -1
- package/public/spice-console-minify/lib/GlobalPool.min.js +0 -1
- package/public/spice-console-minify/lib/ImageUncompressor.min.js +0 -1
- package/public/spice-console-minify/lib/IntegrationBenchmark.min.js +0 -1
- package/public/spice-console-minify/lib/PacketWorkerIdentifier.min.js +0 -1
- package/public/spice-console-minify/lib/SyncAsyncHandler.min.js +0 -1
- package/public/spice-console-minify/lib/base64.min.js +0 -1
- package/public/spice-console-minify/lib/biginteger.min.js +0 -1
- package/public/spice-console-minify/lib/bowser.min.js +0 -1
- package/public/spice-console-minify/lib/decoder/dixie.min.js +0 -5
- package/public/spice-console-minify/lib/decoder/jmuxer.min.js +0 -1
- package/public/spice-console-minify/lib/displayRouter.min.js +0 -1
- package/public/spice-console-minify/lib/encrypt.min.js +0 -1
- package/public/spice-console-minify/lib/flipper.min.js +0 -1
- package/public/spice-console-minify/lib/graphic.min.js +0 -1
- package/public/spice-console-minify/lib/graphicdebug.min.js +0 -1
- package/public/spice-console-minify/lib/images/bitmap.min.js +0 -1
- package/public/spice-console-minify/lib/images/jsquic_family.min.js +0 -1
- package/public/spice-console-minify/lib/images/jsquic_rgba.min.js +0 -1
- package/public/spice-console-minify/lib/images/jsquic_uncompress.min.js +0 -1
- package/public/spice-console-minify/lib/images/lz.min.js +0 -1
- package/public/spice-console-minify/lib/images/png.min.js +0 -1
- package/public/spice-console-minify/lib/jgestures.min.js +0 -25
- package/public/spice-console-minify/lib/jquery-2.0.3.min.js +0 -25
- package/public/spice-console-minify/lib/jquery-mousewheel.min.js +0 -12
- package/public/spice-console-minify/lib/jquery-visibility.min.js +0 -2
- package/public/spice-console-minify/lib/jsbn.min.js +0 -1
- package/public/spice-console-minify/lib/jsbn2.min.js +0 -1
- package/public/spice-console-minify/lib/lodash.4.0.0.min.js +0 -6
- package/public/spice-console-minify/lib/modernizr.min.js +0 -1
- package/public/spice-console-minify/lib/pixastic.min.js +0 -1
- package/public/spice-console-minify/lib/prettyprint.min.js +0 -1
- package/public/spice-console-minify/lib/prng4.min.js +0 -1
- package/public/spice-console-minify/lib/queue.min.js +0 -1
- package/public/spice-console-minify/lib/rasterEngine.min.js +0 -1
- package/public/spice-console-minify/lib/rng.min.js +0 -1
- package/public/spice-console-minify/lib/runqueue.min.js +0 -1
- package/public/spice-console-minify/lib/sha1.min.js +0 -1
- package/public/spice-console-minify/lib/stuckkeyshandler.min.js +0 -1
- package/public/spice-console-minify/lib/timelapsedetector.min.js +0 -1
- package/public/spice-console-minify/lib/utils.min.js +0 -1
- package/public/spice-console-minify/lib/virtualjoystick.min.js +0 -1
- package/public/spice-console-minify/network/busconnection.min.js +0 -1
- package/public/spice-console-minify/network/clusternodechooser.min.js +0 -1
- package/public/spice-console-minify/network/connectioncontrol.min.js +0 -1
- package/public/spice-console-minify/network/packetcontroller.min.js +0 -1
- package/public/spice-console-minify/network/packetextractor.min.js +0 -1
- package/public/spice-console-minify/network/packetlinkfactory.min.js +0 -1
- package/public/spice-console-minify/network/packetreassembler.min.js +0 -1
- package/public/spice-console-minify/network/reassemblerfactory.min.js +0 -1
- package/public/spice-console-minify/network/sizedefiner.min.js +0 -1
- package/public/spice-console-minify/network/socket.min.js +0 -1
- package/public/spice-console-minify/network/socketqueue.min.js +0 -1
- package/public/spice-console-minify/network/spicechannel.min.js +0 -1
- package/public/spice-console-minify/network/websocketwrapper.min.js +0 -1
- package/public/spice-console-minify/process/busprocess.min.js +0 -1
- package/public/spice-console-minify/process/cursorprocess.min.js +0 -1
- package/public/spice-console-minify/process/displaypreprocess.min.js +0 -1
- package/public/spice-console-minify/process/displayprocess.min.js +0 -1
- package/public/spice-console-minify/process/inputprocess.min.js +0 -1
- package/public/spice-console-minify/process/mainprocess.min.js +0 -1
- package/public/spice-console-minify/process/playbackprocess.min.js +0 -1
- package/public/spice-console-minify/spiceobjects/generated/protocol.min.js +0 -1
- package/public/spice-console-minify/spiceobjects/spiceobjects.min.js +0 -1
- package/public/spice-console-minify/swcanvas/swcanvas.min.js +0 -1
|
@@ -103,6 +103,7 @@ const props = defineProps<{
|
|
|
103
103
|
type: UI_T_AdvancedType
|
|
104
104
|
advancedLoading: boolean
|
|
105
105
|
data: I_SeriesLine | null
|
|
106
|
+
cpuCoresDataData: I_SeriesLine | null
|
|
106
107
|
tableData: UI_I_PerformanceItem[] | []
|
|
107
108
|
language: string
|
|
108
109
|
darkMode: boolean
|
|
@@ -160,7 +161,7 @@ const localSelectedTimespanType = computed<string>({
|
|
|
160
161
|
const totalCores = ref<number>(0)
|
|
161
162
|
let isFirstUpdate = true
|
|
162
163
|
watch(
|
|
163
|
-
() => props.
|
|
164
|
+
() => props.cpuCoresDataData,
|
|
164
165
|
(newValue) => {
|
|
165
166
|
if (!newValue || !isFirstUpdate) return
|
|
166
167
|
|
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts
CHANGED
|
@@ -633,11 +633,11 @@ export const countersItemsFunc = (
|
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
export const getDefaultMetricName = (type: string, view: string): string => {
|
|
636
|
+
const someNames = ['memory', 'disk', 'network']
|
|
637
|
+
|
|
636
638
|
if (type === 'datacenter') return 'cpu'
|
|
637
|
-
else if (
|
|
638
|
-
|
|
639
|
-
return view
|
|
640
|
-
}
|
|
639
|
+
else if (view === 'cpuUsageInPercent') return 'cpu'
|
|
640
|
+
else if (someNames.includes(view)) return view
|
|
641
641
|
|
|
642
642
|
return ''
|
|
643
643
|
}
|
|
@@ -2,6 +2,7 @@ import { I_SeriesLine } from 'bfg-nuxt-3-graph/graph/models/interfaces'
|
|
|
2
2
|
import { UI_T_OverviewRequestType } from '~/components/common/monitor/overview/filters/models/types'
|
|
3
3
|
|
|
4
4
|
export interface UI_I_GraphDataSettingItem {
|
|
5
|
+
place: string
|
|
5
6
|
title: string
|
|
6
7
|
loader: boolean
|
|
7
8
|
data: I_SeriesLine | null
|
|
@@ -104,6 +104,7 @@ const props = defineProps<{
|
|
|
104
104
|
themeMode?: 'string'
|
|
105
105
|
formatDate?: 'string'
|
|
106
106
|
formatTime?: 'string'
|
|
107
|
+
graphType: 'string'
|
|
107
108
|
}>()
|
|
108
109
|
|
|
109
110
|
const { $formattedDatetime } = useNuxtApp()
|
|
@@ -129,11 +130,20 @@ const chartFour = ref<any>(null)
|
|
|
129
130
|
const currentChartName = ref<string>('')
|
|
130
131
|
|
|
131
132
|
const getCurrentChart = (chart: any): any => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
switch (currentChartName.value) {
|
|
134
|
+
case 'one':
|
|
135
|
+
chartOne.value = chart
|
|
136
|
+
break
|
|
137
|
+
case 'two':
|
|
138
|
+
chartTwo.value = chart
|
|
139
|
+
break
|
|
140
|
+
case 'three':
|
|
141
|
+
chartThree.value = chart
|
|
142
|
+
break
|
|
143
|
+
case 'four':
|
|
144
|
+
chartFour.value = chart
|
|
145
|
+
break
|
|
146
|
+
}
|
|
137
147
|
}
|
|
138
148
|
|
|
139
149
|
const oneSettingsLocal = ref<UI_I_GraphDataSettingItem | null>(null)
|
|
@@ -164,7 +174,7 @@ const setCurrentGraphData = (
|
|
|
164
174
|
false,
|
|
165
175
|
true,
|
|
166
176
|
true,
|
|
167
|
-
|
|
177
|
+
props.graphType,
|
|
168
178
|
'',
|
|
169
179
|
width,
|
|
170
180
|
getCurrentChart,
|
|
@@ -173,10 +183,21 @@ const setCurrentGraphData = (
|
|
|
173
183
|
props.formatDate,
|
|
174
184
|
props.formatTime
|
|
175
185
|
)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
|
|
187
|
+
switch (name) {
|
|
188
|
+
case 'one':
|
|
189
|
+
oneGraphData.value = graphData
|
|
190
|
+
break
|
|
191
|
+
case 'two':
|
|
192
|
+
twoGraphData.value = graphData
|
|
193
|
+
break
|
|
194
|
+
case 'three':
|
|
195
|
+
threeGraphData.value = graphData
|
|
196
|
+
break
|
|
197
|
+
case 'four':
|
|
198
|
+
fourGraphData.value = graphData
|
|
199
|
+
break
|
|
200
|
+
}
|
|
180
201
|
}
|
|
181
202
|
|
|
182
203
|
const outputSize = (): void => {
|
|
@@ -197,7 +218,7 @@ const outputSize = (): void => {
|
|
|
197
218
|
}, 1000)
|
|
198
219
|
}
|
|
199
220
|
const updateGraph = (
|
|
200
|
-
graphSetting: UI_I_GraphDataSettingItem,
|
|
221
|
+
graphSetting: UI_I_GraphDataSettingItem | null,
|
|
201
222
|
name: string
|
|
202
223
|
): void => {
|
|
203
224
|
outputSize()
|
|
@@ -205,10 +226,26 @@ const updateGraph = (
|
|
|
205
226
|
}
|
|
206
227
|
|
|
207
228
|
const updateGraphsData = (
|
|
208
|
-
data: UI_I_GraphDataSettingItem,
|
|
229
|
+
data: UI_I_GraphDataSettingItem | null,
|
|
209
230
|
name: string
|
|
210
231
|
): void => {
|
|
211
|
-
if (!data
|
|
232
|
+
if (!data?.data) {
|
|
233
|
+
switch (name) {
|
|
234
|
+
case 'one':
|
|
235
|
+
oneGraphData.value = null
|
|
236
|
+
break
|
|
237
|
+
case 'two':
|
|
238
|
+
twoGraphData.value = null
|
|
239
|
+
break
|
|
240
|
+
case 'three':
|
|
241
|
+
threeGraphData.value = null
|
|
242
|
+
break
|
|
243
|
+
case 'four':
|
|
244
|
+
fourGraphData.value = null
|
|
245
|
+
break
|
|
246
|
+
}
|
|
247
|
+
return
|
|
248
|
+
}
|
|
212
249
|
|
|
213
250
|
const themeMode = useLocalStorage('themeMode') || props.themeMode
|
|
214
251
|
const isDarkMode = themeMode === 'dark-theme'
|
|
@@ -233,11 +270,12 @@ const checkIsMountedError = (): void => {
|
|
|
233
270
|
|
|
234
271
|
watch(
|
|
235
272
|
() => props.oneChart,
|
|
236
|
-
(
|
|
237
|
-
if (
|
|
273
|
+
(newValue) => {
|
|
274
|
+
if (newValue === undefined) return
|
|
275
|
+
|
|
276
|
+
oneSettingsLocal.value = newValue
|
|
238
277
|
|
|
239
|
-
oneSettingsLocal.value
|
|
240
|
-
updateGraph(oneSettingsLocal.value, value.title)
|
|
278
|
+
if (newValue) updateGraph(oneSettingsLocal.value, newValue.place)
|
|
241
279
|
|
|
242
280
|
isMountedLoader.value && checkIsMountedError()
|
|
243
281
|
},
|
|
@@ -246,11 +284,12 @@ watch(
|
|
|
246
284
|
|
|
247
285
|
watch(
|
|
248
286
|
() => props.twoChart,
|
|
249
|
-
(
|
|
250
|
-
if (
|
|
287
|
+
(newValue) => {
|
|
288
|
+
if (newValue === undefined) return
|
|
289
|
+
|
|
290
|
+
twoSettingsLocal.value = newValue
|
|
251
291
|
|
|
252
|
-
twoSettingsLocal.value
|
|
253
|
-
updateGraph(twoSettingsLocal.value, value.title)
|
|
292
|
+
if (newValue) updateGraph(twoSettingsLocal.value, newValue.place)
|
|
254
293
|
|
|
255
294
|
isMountedLoader.value && checkIsMountedError()
|
|
256
295
|
},
|
|
@@ -259,11 +298,12 @@ watch(
|
|
|
259
298
|
|
|
260
299
|
watch(
|
|
261
300
|
() => props.threeChart,
|
|
262
|
-
(
|
|
263
|
-
if (
|
|
301
|
+
(newValue) => {
|
|
302
|
+
if (newValue === undefined) return
|
|
264
303
|
|
|
265
|
-
threeSettingsLocal.value =
|
|
266
|
-
|
|
304
|
+
threeSettingsLocal.value = newValue
|
|
305
|
+
|
|
306
|
+
if (newValue) updateGraph(threeSettingsLocal.value, newValue.place)
|
|
267
307
|
|
|
268
308
|
isMountedLoader.value && checkIsMountedError()
|
|
269
309
|
},
|
|
@@ -290,11 +330,12 @@ watch(chartThree, (newValue) => {
|
|
|
290
330
|
|
|
291
331
|
watch(
|
|
292
332
|
() => props.fourChart,
|
|
293
|
-
(
|
|
294
|
-
if (
|
|
333
|
+
(newValue) => {
|
|
334
|
+
if (newValue === undefined) return
|
|
335
|
+
|
|
336
|
+
fourSettingsLocal.value = newValue
|
|
295
337
|
|
|
296
|
-
fourSettingsLocal.value
|
|
297
|
-
updateGraph(fourSettingsLocal.value, value.title)
|
|
338
|
+
if (newValue) updateGraph(fourSettingsLocal.value, newValue.place)
|
|
298
339
|
|
|
299
340
|
isMountedLoader.value && checkIsMountedError()
|
|
300
341
|
},
|
|
@@ -53,15 +53,17 @@ export const viewFunc = (
|
|
|
53
53
|
],
|
|
54
54
|
host: [
|
|
55
55
|
{ text: localization.overview, value: 'overview' },
|
|
56
|
-
{ text: localization.
|
|
56
|
+
{ text: localization.memory, value: 'memory' },
|
|
57
|
+
// { text: localization.overview, value: 'overview' },
|
|
58
|
+
{ text: localization.network, value: 'network' },
|
|
57
59
|
{ text: localization.disks, value: 'disks' },
|
|
58
|
-
{ text: localization.virtual_machines, value: 'virtual_machines' },
|
|
60
|
+
// { text: localization.virtual_machines, value: 'virtual_machines' },
|
|
59
61
|
],
|
|
60
62
|
vm: [
|
|
61
63
|
{ text: localization.overview, value: 'overview' },
|
|
62
|
-
{ text: localization.space, value: 'space' },
|
|
63
|
-
{ text: localization.spaceUtilization, value: 'space_utilization' },
|
|
64
|
-
{ text: localization.
|
|
64
|
+
// { text: localization.space, value: 'space' },
|
|
65
|
+
// { text: localization.spaceUtilization, value: 'space_utilization' },
|
|
66
|
+
{ text: localization.network, value: 'network' },
|
|
65
67
|
{ text: localization.disks, value: 'disks' },
|
|
66
68
|
],
|
|
67
69
|
}
|
package/minify.js
CHANGED
|
@@ -1,51 +1,126 @@
|
|
|
1
|
-
const fs = require('fs')
|
|
2
|
-
const terser = require('terser')
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const terser = require('terser')
|
|
3
|
+
|
|
4
|
+
// Файлы которые нужно минимизировать
|
|
5
|
+
const filesByOrder = [
|
|
6
|
+
'public/spice-console/lib/decoder/jmuxer.js',
|
|
7
|
+
'public/spice-console/lib/decoder/dixie.js',
|
|
8
|
+
'public/spice-console/lib/jquery-2.0.3.js',
|
|
9
|
+
'public/spice-console/lib/utils.js',
|
|
10
|
+
'public/spice-console/lib/modernizr.js',
|
|
11
|
+
'public/spice-console/lib/jquery-mousewheel.js',
|
|
12
|
+
'public/spice-console/lib/jquery-visibility.min.js',
|
|
13
|
+
'public/spice-console/lib/lodash.4.0.0.min.js',
|
|
14
|
+
'public/spice-console/lib/jgestures.min.js',
|
|
15
|
+
'public/spice-console/lib/pixastic.js',
|
|
16
|
+
'public/spice-console/lib/base64.js',
|
|
17
|
+
'public/spice-console/lib/biginteger.js',
|
|
18
|
+
'public/spice-console/lib/virtualjoystick.js',
|
|
19
|
+
'public/spice-console/lib/prettyprint.js',
|
|
20
|
+
'public/spice-console/lib/jsbn.js',
|
|
21
|
+
'public/spice-console/lib/jsbn2.js',
|
|
22
|
+
'public/spice-console/lib/prng4.js',
|
|
23
|
+
'public/spice-console/lib/rng.js',
|
|
24
|
+
'public/spice-console/lib/sha1.js',
|
|
25
|
+
'public/spice-console/lib/encrypt.js',
|
|
26
|
+
'public/spice-console/swcanvas/swcanvas.js',
|
|
27
|
+
'public/spice-console/lib/bowser.js',
|
|
28
|
+
'public/spice-console/lib/flipper.js',
|
|
29
|
+
'public/spice-console/lib/CollisionDetector.js',
|
|
30
|
+
'public/spice-console/lib/GlobalPool.js',
|
|
31
|
+
'public/spice-console/lib/GenericObjectPool.js',
|
|
32
|
+
'public/spice-console/lib/AsyncConsumer.js',
|
|
33
|
+
'public/spice-console/lib/AsyncWorker.js',
|
|
34
|
+
'public/spice-console/lib/PacketWorkerIdentifier.js',
|
|
35
|
+
'public/spice-console/spiceobjects/spiceobjects.js',
|
|
36
|
+
'public/spice-console/spiceobjects/generated/protocol.js',
|
|
37
|
+
'public/spice-console/lib/graphicdebug.js',
|
|
38
|
+
'public/spice-console/lib/images/lz.js',
|
|
39
|
+
'public/spice-console/lib/images/bitmap.js',
|
|
40
|
+
'public/spice-console/lib/images/png.js',
|
|
41
|
+
'public/spice-console/lib/runqueue.js',
|
|
42
|
+
'public/spice-console/lib/graphic.js',
|
|
43
|
+
'public/spice-console/lib/queue.js',
|
|
44
|
+
'public/spice-console/lib/ImageUncompressor.js',
|
|
45
|
+
'public/spice-console/lib/SyncAsyncHandler.js',
|
|
46
|
+
'public/spice-console/lib/IntegrationBenchmark.js',
|
|
47
|
+
'public/spice-console/lib/stuckkeyshandler.js',
|
|
48
|
+
'public/spice-console/lib/timelapsedetector.js',
|
|
49
|
+
'public/spice-console/lib/displayRouter.js',
|
|
50
|
+
'public/spice-console/lib/rasterEngine.js',
|
|
51
|
+
'public/spice-console/lib/DataLogger.js',
|
|
52
|
+
'public/spice-console/network/socket.js',
|
|
53
|
+
'public/spice-console/network/clusternodechooser.js',
|
|
54
|
+
'public/spice-console/network/socketqueue.js',
|
|
55
|
+
'public/spice-console/network/packetcontroller.js',
|
|
56
|
+
'public/spice-console/network/packetextractor.js',
|
|
57
|
+
'public/spice-console/network/packetreassembler.js',
|
|
58
|
+
'public/spice-console/network/reassemblerfactory.js',
|
|
59
|
+
'public/spice-console/network/sizedefiner.js',
|
|
60
|
+
'public/spice-console/network/packetlinkfactory.js',
|
|
61
|
+
'public/spice-console/network/spicechannel.js',
|
|
62
|
+
'public/spice-console/network/busconnection.js',
|
|
63
|
+
'public/spice-console/network/websocketwrapper.js',
|
|
64
|
+
'public/spice-console/network/connectioncontrol.js',
|
|
65
|
+
'public/spice-console/application/checkActivity.js',
|
|
66
|
+
'public/spice-console/application/agent.js',
|
|
67
|
+
'public/spice-console/application/codec.js',
|
|
68
|
+
'public/spice-console/application/clipboard.js',
|
|
69
|
+
'public/spice-console/application/clipboard/clipboarddataparser.js',
|
|
70
|
+
'public/spice-console/application/clipboard/local/localClipboard.js',
|
|
71
|
+
'public/spice-console/application/spiceconnection.js',
|
|
72
|
+
'public/spice-console/application/clientgui.js',
|
|
73
|
+
'public/spice-console/application/packetprocess.js',
|
|
74
|
+
'public/spice-console/application/packetfilter.js',
|
|
75
|
+
'public/spice-console/application/packetfactory.js',
|
|
76
|
+
'public/spice-console/application/application.js',
|
|
77
|
+
'public/spice-console/application/virtualmouse.js',
|
|
78
|
+
'public/spice-console/application/imagecache.js',
|
|
79
|
+
'public/spice-console/application/rasteroperation.js',
|
|
80
|
+
'public/spice-console/application/stream.js',
|
|
81
|
+
'public/spice-console/application/inputmanager.js',
|
|
82
|
+
'public/spice-console/process/busprocess.js',
|
|
83
|
+
'public/spice-console/process/displayprocess.js',
|
|
84
|
+
'public/spice-console/process/displaypreprocess.js',
|
|
85
|
+
'public/spice-console/process/inputprocess.js',
|
|
86
|
+
'public/spice-console/process/cursorprocess.js',
|
|
87
|
+
'public/spice-console/process/playbackprocess.js',
|
|
88
|
+
'public/spice-console/process/mainprocess.js',
|
|
89
|
+
'public/spice-console/keymaps/keyevent.js',
|
|
90
|
+
'public/spice-console/keymaps/keymapes.js',
|
|
91
|
+
'public/spice-console/keymaps/scanCodeObjProvider.js',
|
|
92
|
+
'public/spice-console/keymaps/scanCodeObjModifier.js',
|
|
93
|
+
'public/spice-console/keymaps/keymapesObj.js',
|
|
94
|
+
'public/spice-console/keymaps/keymapus.js',
|
|
95
|
+
'public/spice-console/keymaps/keymap.js',
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
// Папка и файл в которую вы хотите сохранить минифицированные файлы
|
|
99
|
+
const outputFolder = 'public/spice-console-minify'
|
|
100
|
+
const outputFile = `${outputFolder}/run.min.js`
|
|
101
|
+
|
|
102
|
+
// Создайте папку назначения, если она не существует
|
|
103
|
+
if (!fs.existsSync(outputFolder)) {
|
|
104
|
+
fs.mkdirSync(outputFolder, { recursive: true })
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
let index = 0
|
|
108
|
+
let runMinJsContent = ''
|
|
109
|
+
filesByOrder.forEach((filePath) => {
|
|
110
|
+
// Минифицируем
|
|
111
|
+
const fileContent = fs.readFileSync(filePath, 'utf8')
|
|
112
|
+
terser.minify(fileContent).then((minified) => {
|
|
113
|
+
if (minified.error) {
|
|
114
|
+
console.error(
|
|
115
|
+
`Ошибка при минификации файла ${filePath}: ${minified.error.message}`
|
|
116
|
+
)
|
|
117
|
+
} else {
|
|
118
|
+
runMinJsContent += minified.code
|
|
119
|
+
index++
|
|
120
|
+
|
|
121
|
+
// Если последний файл то все помещаем в run.min.js
|
|
122
|
+
if (filesByOrder.length - 1 === index)
|
|
123
|
+
fs.writeFileSync(outputFile, runMinJsContent)
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
})
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
8
8
|
"generate": "nuxt generate",
|
|
9
9
|
"preview": "nuxt preview",
|
|
10
|
-
"postinstall": "nuxt prepare"
|
|
10
|
+
"postinstall": "nuxt prepare",
|
|
11
|
+
"minify": "node minify.js",
|
|
12
|
+
"prepublishOnly": "npm run minify"
|
|
11
13
|
},
|
|
12
14
|
"devDependencies": {
|
|
13
15
|
"@novnc/novnc": "^1.4.0",
|
|
@@ -1,127 +1,17 @@
|
|
|
1
|
-
const loadSpiceScripts = (src: string
|
|
1
|
+
const loadSpiceScripts = (src: string) => {
|
|
2
2
|
const script = document.createElement('script')
|
|
3
3
|
script.src = src
|
|
4
|
-
script.onload = callback
|
|
5
4
|
|
|
6
5
|
document.head.appendChild(script)
|
|
7
6
|
}
|
|
8
7
|
// @ts-ignore
|
|
9
8
|
window.config = useRuntimeConfig()
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
const isMinify = true
|
|
13
|
-
const rootFolderName = isMinify ? 'spice-console-minify' : 'spice-console'
|
|
14
|
-
const fileType = isMinify ? '.min.js' : '.js'
|
|
15
|
-
const libsSrc: string[] = [
|
|
16
|
-
// `/${rootFolderName}/lib/decoder/jmuxer${fileType}`,
|
|
17
|
-
// `/${rootFolderName}/lib/decoder/dixie${fileType}`,
|
|
18
|
-
// `/${rootFolderName}/lib/jquery-2.0.3${fileType}`,
|
|
19
|
-
// `/${rootFolderName}/lib/utils${fileType}`,
|
|
20
|
-
// `/${rootFolderName}/lib/modernizr${fileType}`,
|
|
21
|
-
// `/${rootFolderName}/lib/jquery-mousewheel${fileType}`,
|
|
22
|
-
// `/${rootFolderName}/lib/jquery-visibility.min.js`,
|
|
23
|
-
// `/${rootFolderName}/lib/lodash.4.0.0.min.js`,
|
|
24
|
-
// `/${rootFolderName}/lib/jgestures.min.js`,
|
|
25
|
-
// `/${rootFolderName}/lib/pixastic${fileType}`,
|
|
26
|
-
// `/${rootFolderName}/lib/base64${fileType}`,
|
|
27
|
-
// `/${rootFolderName}/lib/biginteger${fileType}`,
|
|
28
|
-
// `/${rootFolderName}/lib/virtualjoystick${fileType}`,
|
|
29
|
-
// `/${rootFolderName}/lib/prettyprint${fileType}`,
|
|
30
|
-
// `/${rootFolderName}/lib/jsbn${fileType}`,
|
|
31
|
-
// `/${rootFolderName}/lib/jsbn2${fileType}`,
|
|
32
|
-
// `/${rootFolderName}/lib/prng4${fileType}`,
|
|
33
|
-
// `/${rootFolderName}/lib/rng${fileType}`,
|
|
34
|
-
// `/${rootFolderName}/lib/sha1${fileType}`,
|
|
35
|
-
// `/${rootFolderName}/lib/encrypt${fileType}`,
|
|
36
|
-
// `/${rootFolderName}/swcanvas/swcanvas${fileType}`,
|
|
37
|
-
// `/${rootFolderName}/lib/bowser${fileType}`,
|
|
38
|
-
// `/${rootFolderName}/lib/flipper${fileType}`,
|
|
39
|
-
// `/${rootFolderName}/lib/CollisionDetector${fileType}`,
|
|
40
|
-
// `/${rootFolderName}/lib/GlobalPool${fileType}`,
|
|
41
|
-
// `/${rootFolderName}/lib/GenericObjectPool${fileType}`,
|
|
42
|
-
// `/${rootFolderName}/lib/AsyncConsumer${fileType}`,
|
|
43
|
-
// `/${rootFolderName}/lib/AsyncWorker${fileType}`,
|
|
44
|
-
// `/${rootFolderName}/lib/PacketWorkerIdentifier${fileType}`,
|
|
45
|
-
// `/${rootFolderName}/spiceobjects/spiceobjects${fileType}`,
|
|
46
|
-
// `/${rootFolderName}/spiceobjects/generated/protocol${fileType}`,
|
|
47
|
-
// `/${rootFolderName}/lib/graphicdebug${fileType}`,
|
|
48
|
-
// `/${rootFolderName}/lib/images/lz${fileType}`,
|
|
49
|
-
// `/${rootFolderName}/lib/images/bitmap${fileType}`,
|
|
50
|
-
// `/${rootFolderName}/lib/images/png${fileType}`,
|
|
51
|
-
// `/${rootFolderName}/lib/runqueue${fileType}`,
|
|
52
|
-
// `/${rootFolderName}/lib/graphic${fileType}`,
|
|
53
|
-
// `/${rootFolderName}/lib/queue${fileType}`,
|
|
54
|
-
// `/${rootFolderName}/lib/ImageUncompressor${fileType}`,
|
|
55
|
-
// `/${rootFolderName}/lib/SyncAsyncHandler${fileType}`,
|
|
56
|
-
// `/${rootFolderName}/lib/IntegrationBenchmark${fileType}`,
|
|
57
|
-
// `/${rootFolderName}/lib/stuckkeyshandler${fileType}`,
|
|
58
|
-
// `/${rootFolderName}/lib/timelapsedetector${fileType}`,
|
|
59
|
-
// `/${rootFolderName}/lib/displayRouter${fileType}`,
|
|
60
|
-
// `/${rootFolderName}/lib/rasterEngine${fileType}`,
|
|
61
|
-
// `/${rootFolderName}/lib/DataLogger${fileType}`,
|
|
62
|
-
// `/${rootFolderName}/network/socket${fileType}`,
|
|
63
|
-
// `/${rootFolderName}/network/clusternodechooser${fileType}`,
|
|
64
|
-
// `/${rootFolderName}/network/socketqueue${fileType}`,
|
|
65
|
-
// `/${rootFolderName}/network/packetcontroller${fileType}`,
|
|
66
|
-
// `/${rootFolderName}/network/packetextractor${fileType}`,
|
|
67
|
-
// `/${rootFolderName}/network/packetreassembler${fileType}`,
|
|
68
|
-
// `/${rootFolderName}/network/reassemblerfactory${fileType}`,
|
|
69
|
-
// `/${rootFolderName}/network/sizedefiner${fileType}`,
|
|
70
|
-
// `/${rootFolderName}/network/packetlinkfactory${fileType}`,
|
|
71
|
-
// `/${rootFolderName}/network/spicechannel${fileType}`,
|
|
72
|
-
// `/${rootFolderName}/network/busconnection${fileType}`,
|
|
73
|
-
// `/${rootFolderName}/network/websocketwrapper${fileType}`,
|
|
74
|
-
// `/${rootFolderName}/network/connectioncontrol${fileType}`,
|
|
75
|
-
// `/${rootFolderName}/application/checkActivity${fileType}`,
|
|
76
|
-
// `/${rootFolderName}/application/agent${fileType}`,
|
|
77
|
-
// `/${rootFolderName}/application/codec${fileType}`,
|
|
78
|
-
// `/${rootFolderName}/application/clipboard${fileType}`,
|
|
79
|
-
// `/${rootFolderName}/application/clipboard/clipboarddataparser${fileType}`,
|
|
80
|
-
// `/${rootFolderName}/application/clipboard/local/localClipboard${fileType}`,
|
|
81
|
-
// `/${rootFolderName}/application/spiceconnection${fileType}`,
|
|
82
|
-
// `/${rootFolderName}/application/clientgui${fileType}`,
|
|
83
|
-
// `/${rootFolderName}/application/packetprocess${fileType}`,
|
|
84
|
-
// `/${rootFolderName}/application/packetfilter${fileType}`,
|
|
85
|
-
// `/${rootFolderName}/application/packetfactory${fileType}`,
|
|
86
|
-
// `/${rootFolderName}/application/application${fileType}`,
|
|
87
|
-
// `/${rootFolderName}/application/virtualmouse${fileType}`,
|
|
88
|
-
// `/${rootFolderName}/application/imagecache${fileType}`,
|
|
89
|
-
// `/${rootFolderName}/application/rasteroperation${fileType}`,
|
|
90
|
-
// `/${rootFolderName}/application/stream${fileType}`,
|
|
91
|
-
// `/${rootFolderName}/application/inputmanager${fileType}`,
|
|
92
|
-
// `/${rootFolderName}/process/busprocess${fileType}`,
|
|
93
|
-
// `/${rootFolderName}/process/displayprocess${fileType}`,
|
|
94
|
-
// `/${rootFolderName}/process/displaypreprocess${fileType}`,
|
|
95
|
-
// `/${rootFolderName}/process/inputprocess${fileType}`,
|
|
96
|
-
// `/${rootFolderName}/process/cursorprocess${fileType}`,
|
|
97
|
-
// `/${rootFolderName}/process/playbackprocess${fileType}`,
|
|
98
|
-
// `/${rootFolderName}/process/mainprocess${fileType}`,
|
|
99
|
-
// `/${rootFolderName}/keymaps/keyevent${fileType}`,
|
|
100
|
-
// `/${rootFolderName}/keymaps/keymapes${fileType}`,
|
|
101
|
-
// `/${rootFolderName}/keymaps/scanCodeObjProvider${fileType}`,
|
|
102
|
-
// `/${rootFolderName}/keymaps/scanCodeObjModifier${fileType}`,
|
|
103
|
-
// `/${rootFolderName}/keymaps/keymapesObj${fileType}`,
|
|
104
|
-
// `/${rootFolderName}/keymaps/keymapus${fileType}`,
|
|
105
|
-
// `/${rootFolderName}/keymaps/keymap${fileType}`,
|
|
106
|
-
`/${rootFolderName}/run${fileType}`,
|
|
107
|
-
]
|
|
108
|
-
const isJqueryLoaded = ref<boolean>(false)
|
|
109
|
-
|
|
110
|
-
const loadSpiceScriptsRecursion = (index: number) => {
|
|
111
|
-
const src = libsSrc[index]
|
|
112
|
-
if (!src) return
|
|
113
|
-
|
|
114
|
-
loadSpiceScripts(src, () => {
|
|
115
|
-
isJqueryLoaded.value = true
|
|
116
|
-
loadSpiceScriptsRecursion(index + 1)
|
|
117
|
-
})
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
const init = (wsUrl) => {
|
|
10
|
+
const init = (wsUrl: string) => {
|
|
121
11
|
window.CONSOLE = {
|
|
122
12
|
wsUrl
|
|
123
13
|
}
|
|
124
|
-
|
|
14
|
+
loadSpiceScripts('/spice-console-minify/run.min.js')
|
|
125
15
|
}
|
|
126
16
|
export default {
|
|
127
17
|
init
|