magnax 1.0.0__py3-none-any.whl

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 (87) hide show
  1. magnax/__init__.py +3 -0
  2. magnax/__main__.py +25 -0
  3. magnax/debug.py +65 -0
  4. magnax/public/__init__.py +1 -0
  5. magnax/public/adb/linux/adb +0 -0
  6. magnax/public/adb/linux_arm/adb +0 -0
  7. magnax/public/adb/mac/adb +0 -0
  8. magnax/public/adb/windows/AdbWinApi.dll +0 -0
  9. magnax/public/adb/windows/AdbWinUsbApi.dll +0 -0
  10. magnax/public/adb/windows/adb.exe +0 -0
  11. magnax/public/adb.py +96 -0
  12. magnax/public/android_fps.py +750 -0
  13. magnax/public/apm.py +1306 -0
  14. magnax/public/apm_pk.py +184 -0
  15. magnax/public/common.py +1598 -0
  16. magnax/public/config.json +1 -0
  17. magnax/public/ios_perf_adapter.py +790 -0
  18. magnax/public/report_template/android.html +526 -0
  19. magnax/public/report_template/ios.html +482 -0
  20. magnax/public/scrcpy/scrcpy-win32-v2.4/AdbWinApi.dll +0 -0
  21. magnax/public/scrcpy/scrcpy-win32-v2.4/AdbWinUsbApi.dll +0 -0
  22. magnax/public/scrcpy/scrcpy-win32-v2.4/SDL2.dll +0 -0
  23. magnax/public/scrcpy/scrcpy-win32-v2.4/adb.exe +0 -0
  24. magnax/public/scrcpy/scrcpy-win32-v2.4/avcodec-60.dll +0 -0
  25. magnax/public/scrcpy/scrcpy-win32-v2.4/avformat-60.dll +0 -0
  26. magnax/public/scrcpy/scrcpy-win32-v2.4/avutil-58.dll +0 -0
  27. magnax/public/scrcpy/scrcpy-win32-v2.4/icon.png +0 -0
  28. magnax/public/scrcpy/scrcpy-win32-v2.4/libusb-1.0.dll +0 -0
  29. magnax/public/scrcpy/scrcpy-win32-v2.4/open_a_terminal_here.bat +1 -0
  30. magnax/public/scrcpy/scrcpy-win32-v2.4/scrcpy-console.bat +2 -0
  31. magnax/public/scrcpy/scrcpy-win32-v2.4/scrcpy-noconsole.vbs +7 -0
  32. magnax/public/scrcpy/scrcpy-win32-v2.4/scrcpy-server +0 -0
  33. magnax/public/scrcpy/scrcpy-win32-v2.4/scrcpy.exe +0 -0
  34. magnax/public/scrcpy/scrcpy-win32-v2.4/swresample-4.dll +0 -0
  35. magnax/public/scrcpy/scrcpy-win64-v2.4/AdbWinApi.dll +0 -0
  36. magnax/public/scrcpy/scrcpy-win64-v2.4/AdbWinUsbApi.dll +0 -0
  37. magnax/public/scrcpy/scrcpy-win64-v2.4/SDL2.dll +0 -0
  38. magnax/public/scrcpy/scrcpy-win64-v2.4/avformat-60.dll +0 -0
  39. magnax/public/scrcpy/scrcpy-win64-v2.4/avutil-58.dll +0 -0
  40. magnax/public/scrcpy/scrcpy-win64-v2.4/open_a_terminal_here.bat +1 -0
  41. magnax/public/scrcpy/scrcpy-win64-v2.4/scrcpy-noconsole.vbs +7 -0
  42. magnax/public/scrcpy/scrcpy-win64-v2.4/scrcpy-server +0 -0
  43. magnax/public/scrcpy/scrcpy-win64-v2.4/scrcpy.exe +0 -0
  44. magnax/public/scrcpy/scrcpy-win64-v2.4/swresample-4.dll +0 -0
  45. magnax/static/css/highlight.min.css +9 -0
  46. magnax/static/css/magnax-dark-theme.css +1237 -0
  47. magnax/static/css/select2-bootstrap-5-theme.min.css +3 -0
  48. magnax/static/css/select2-bootstrap-5-theme.rtl.min.css +3 -0
  49. magnax/static/css/select2.min.css +1 -0
  50. magnax/static/css/sweetalert2.min.css +1 -0
  51. magnax/static/css/tabler.demo.min.css +9 -0
  52. magnax/static/css/tabler.min.css +14 -0
  53. magnax/static/image/500.png +0 -0
  54. magnax/static/image/avatar.png +0 -0
  55. magnax/static/image/empty.png +0 -0
  56. magnax/static/image/readme/home.png +0 -0
  57. magnax/static/image/readme/pk.png +0 -0
  58. magnax/static/js/apexcharts.js +14 -0
  59. magnax/static/js/gray.js +16 -0
  60. magnax/static/js/highlight.min.js +1173 -0
  61. magnax/static/js/highstock.js +803 -0
  62. magnax/static/js/html2canvas.min.js +20 -0
  63. magnax/static/js/jquery.min.js +2 -0
  64. magnax/static/js/magnax-chart-theme.js +492 -0
  65. magnax/static/js/select2.min.js +2 -0
  66. magnax/static/js/sweetalert2.min.js +1 -0
  67. magnax/static/js/tabler.demo.min.js +9 -0
  68. magnax/static/js/tabler.min.js +9 -0
  69. magnax/static/logo/logo.png +0 -0
  70. magnax/templates/404.html +30 -0
  71. magnax/templates/analysis.html +1375 -0
  72. magnax/templates/analysis_compare.html +600 -0
  73. magnax/templates/analysis_pk.html +680 -0
  74. magnax/templates/base.html +365 -0
  75. magnax/templates/index.html +2471 -0
  76. magnax/templates/pk.html +743 -0
  77. magnax/templates/report.html +416 -0
  78. magnax/view/__init__.py +1 -0
  79. magnax/view/apis.py +952 -0
  80. magnax/view/pages.py +146 -0
  81. magnax/web.py +345 -0
  82. magnax-1.0.0.dist-info/METADATA +242 -0
  83. magnax-1.0.0.dist-info/RECORD +87 -0
  84. magnax-1.0.0.dist-info/WHEEL +5 -0
  85. magnax-1.0.0.dist-info/entry_points.txt +2 -0
  86. magnax-1.0.0.dist-info/licenses/LICENSE +21 -0
  87. magnax-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,492 @@
1
+ /**
2
+ * MagnaX Highcharts Dark Theme - Grafana Style
3
+ * A professional dark theme for Highcharts/Highstock charts
4
+ */
5
+
6
+ (function() {
7
+ 'use strict';
8
+
9
+ // Define color palette - Enhanced brightness for better visibility
10
+ var colors = {
11
+ // Background colors
12
+ canvasBg: '#111217',
13
+ mainBg: '#181b1f',
14
+ cardBg: '#1e2128',
15
+ inputBg: '#2a2e37',
16
+
17
+ // Border colors
18
+ borderWeak: '#2a2e37',
19
+ borderMedium: '#3d4453',
20
+
21
+ // Text colors
22
+ textPrimary: '#e8e9ea',
23
+ textSecondary: '#adb5c1',
24
+ textDisabled: '#6e7681',
25
+
26
+ // Accent colors - Brighter for dark background
27
+ accentGreen: '#8dd17a',
28
+ accentBlue: '#5c9cf5',
29
+ accentOrange: '#ffab4a',
30
+ accentRed: '#ff6b7a',
31
+ accentPurple: '#c99ae8',
32
+ accentYellow: '#ffeb5c',
33
+ accentCyan: '#33e8d8',
34
+ accentGold: '#ffc933',
35
+
36
+ // Chart series colors - Enhanced brightness and saturation
37
+ cpu: '#8dd17a', // Bright green
38
+ memory: '#6ba8ff', // Bright blue
39
+ networkTx: '#ffab4a', // Bright orange
40
+ networkRx: '#c99ae8', // Bright purple
41
+ fps: '#ffeb5c', // Bright yellow
42
+ gpu: '#33e8d8', // Bright cyan
43
+ battery: '#ffc933' // Bright gold
44
+ };
45
+
46
+ // Series colors for charts
47
+ var seriesColors = [
48
+ colors.cpu, // Green - CPU
49
+ colors.memory, // Blue - Memory
50
+ colors.networkTx, // Orange - Network TX
51
+ colors.networkRx, // Purple - Network RX
52
+ colors.fps, // Yellow - FPS
53
+ colors.gpu, // Cyan - GPU
54
+ colors.battery, // Gold - Battery
55
+ colors.accentRed // Red - Errors/Warnings
56
+ ];
57
+
58
+ // MagnaX Dark Theme for Highcharts
59
+ var magnaxDarkTheme = {
60
+ colors: seriesColors,
61
+
62
+ chart: {
63
+ backgroundColor: colors.cardBg,
64
+ borderColor: colors.borderWeak,
65
+ borderWidth: 0,
66
+ borderRadius: 4,
67
+ plotBackgroundColor: colors.cardBg,
68
+ plotBorderColor: colors.borderWeak,
69
+ plotBorderWidth: 0,
70
+ style: {
71
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'
72
+ },
73
+ resetZoomButton: {
74
+ theme: {
75
+ fill: colors.inputBg,
76
+ stroke: colors.borderMedium,
77
+ r: 4,
78
+ style: {
79
+ color: colors.textPrimary,
80
+ fontWeight: '500',
81
+ fontSize: '12px'
82
+ },
83
+ states: {
84
+ hover: {
85
+ fill: colors.accentBlue,
86
+ stroke: colors.accentBlue,
87
+ style: {
88
+ color: '#ffffff'
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ },
95
+
96
+ title: {
97
+ style: {
98
+ color: colors.textPrimary,
99
+ fontSize: '15px',
100
+ fontWeight: '600'
101
+ }
102
+ },
103
+
104
+ subtitle: {
105
+ style: {
106
+ color: colors.textSecondary,
107
+ fontSize: '12px'
108
+ }
109
+ },
110
+
111
+ xAxis: {
112
+ gridLineColor: 'rgba(255, 255, 255, 0.1)',
113
+ gridLineWidth: 0,
114
+ lineColor: '#999',
115
+ tickColor: '#999',
116
+ labels: {
117
+ style: {
118
+ color: '#FFF',
119
+ fontWeight: 'bold'
120
+ }
121
+ },
122
+ title: {
123
+ style: {
124
+ color: '#FFF',
125
+ font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
126
+ }
127
+ },
128
+ crosshair: {
129
+ color: colors.borderMedium,
130
+ width: 1
131
+ }
132
+ },
133
+
134
+ yAxis: {
135
+ gridLineColor: 'rgba(255, 255, 255, 0.1)',
136
+ gridLineWidth: 1,
137
+ lineColor: '#999',
138
+ tickColor: '#999',
139
+ lineWidth: 0,
140
+ tickWidth: 0,
141
+ labels: {
142
+ style: {
143
+ color: '#FFF',
144
+ fontWeight: 'bold'
145
+ }
146
+ },
147
+ title: {
148
+ style: {
149
+ color: '#FFF',
150
+ font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
151
+ }
152
+ },
153
+ alternateGridColor: null,
154
+ minorGridLineColor: 'rgba(255,255,255,0.07)'
155
+ },
156
+
157
+ tooltip: {
158
+ backgroundColor: '#1e2128',
159
+ borderColor: '#3d4453',
160
+ borderRadius: 6,
161
+ borderWidth: 1,
162
+ shadow: {
163
+ color: 'rgba(0, 0, 0, 0.5)',
164
+ offsetX: 2,
165
+ offsetY: 3,
166
+ width: 6
167
+ },
168
+ style: {
169
+ color: '#ffffff',
170
+ fontSize: '13px',
171
+ fontWeight: '500'
172
+ },
173
+ headerFormat: '<span style="font-size: 12px; color: #ffffff; font-weight: 600;">{point.key}</span><br/>',
174
+ pointFormat: '<span style="color:{series.color}; font-size: 14px;">\u25CF</span> <span style="color: #cccccc">{series.name}:</span> <b style="color: #ffffff">{point.y}</b><br/>'
175
+ },
176
+
177
+ legend: {
178
+ backgroundColor: 'transparent',
179
+ borderColor: 'transparent',
180
+ borderWidth: 0,
181
+ itemStyle: {
182
+ color: colors.textPrimary,
183
+ fontSize: '12px',
184
+ fontWeight: '500'
185
+ },
186
+ itemHoverStyle: {
187
+ color: colors.accentGreen
188
+ },
189
+ itemHiddenStyle: {
190
+ color: colors.textDisabled
191
+ },
192
+ title: {
193
+ style: {
194
+ color: colors.textPrimary,
195
+ fontWeight: '600'
196
+ }
197
+ }
198
+ },
199
+
200
+ plotOptions: {
201
+ series: {
202
+ lineWidth: 2.5,
203
+ animation: false,
204
+ dataLabels: {
205
+ style: {
206
+ color: colors.textPrimary,
207
+ textOutline: 'none'
208
+ }
209
+ },
210
+ marker: {
211
+ enabled: false,
212
+ lineColor: colors.cardBg,
213
+ radius: 3,
214
+ states: {
215
+ hover: {
216
+ enabled: true,
217
+ radius: 5
218
+ }
219
+ }
220
+ },
221
+ states: {
222
+ hover: {
223
+ lineWidth: 3.5
224
+ }
225
+ }
226
+ },
227
+ line: {
228
+ lineWidth: 2.5,
229
+ states: {
230
+ hover: {
231
+ lineWidth: 3.5
232
+ }
233
+ }
234
+ },
235
+ spline: {
236
+ lineWidth: 2.5,
237
+ states: {
238
+ hover: {
239
+ lineWidth: 3.5
240
+ }
241
+ }
242
+ },
243
+ area: {
244
+ fillOpacity: 0.25,
245
+ lineWidth: 2.5
246
+ },
247
+ areaspline: {
248
+ fillOpacity: 0.25,
249
+ lineWidth: 2.5
250
+ },
251
+ column: {
252
+ borderWidth: 0,
253
+ borderRadius: 2
254
+ },
255
+ bar: {
256
+ borderWidth: 0,
257
+ borderRadius: 2
258
+ },
259
+ pie: {
260
+ borderWidth: 0,
261
+ dataLabels: {
262
+ color: colors.textPrimary
263
+ }
264
+ },
265
+ boxplot: {
266
+ fillColor: colors.inputBg
267
+ },
268
+ candlestick: {
269
+ lineColor: colors.textPrimary
270
+ },
271
+ errorbar: {
272
+ color: colors.textSecondary
273
+ }
274
+ },
275
+
276
+ credits: {
277
+ enabled: false
278
+ },
279
+
280
+ loading: {
281
+ labelStyle: {
282
+ color: colors.textPrimary
283
+ },
284
+ style: {
285
+ backgroundColor: colors.cardBg
286
+ }
287
+ },
288
+
289
+ drilldown: {
290
+ activeAxisLabelStyle: {
291
+ color: colors.textSecondary
292
+ },
293
+ activeDataLabelStyle: {
294
+ color: colors.textPrimary
295
+ }
296
+ },
297
+
298
+ // Navigator (for stock charts)
299
+ navigator: {
300
+ enabled: true,
301
+ handles: {
302
+ backgroundColor: colors.inputBg,
303
+ borderColor: colors.borderMedium
304
+ },
305
+ outlineColor: colors.borderWeak,
306
+ outlineWidth: 1,
307
+ maskFill: 'rgba(50, 116, 217, 0.1)',
308
+ series: {
309
+ color: colors.accentBlue,
310
+ fillOpacity: 0.2,
311
+ lineColor: colors.accentBlue,
312
+ lineWidth: 1
313
+ },
314
+ xAxis: {
315
+ gridLineColor: colors.borderWeak,
316
+ labels: {
317
+ style: {
318
+ color: colors.textDisabled
319
+ }
320
+ }
321
+ }
322
+ },
323
+
324
+ // Scrollbar
325
+ scrollbar: {
326
+ enabled: true,
327
+ barBackgroundColor: colors.inputBg,
328
+ barBorderColor: colors.borderWeak,
329
+ barBorderWidth: 1,
330
+ barBorderRadius: 3,
331
+ buttonBackgroundColor: colors.inputBg,
332
+ buttonBorderColor: colors.borderWeak,
333
+ buttonBorderWidth: 1,
334
+ buttonBorderRadius: 3,
335
+ buttonArrowColor: colors.textSecondary,
336
+ rifleColor: colors.textDisabled,
337
+ trackBackgroundColor: colors.mainBg,
338
+ trackBorderColor: colors.borderWeak,
339
+ trackBorderWidth: 1,
340
+ trackBorderRadius: 3
341
+ },
342
+
343
+ // Range selector (for stock charts)
344
+ rangeSelector: {
345
+ buttonTheme: {
346
+ fill: colors.inputBg,
347
+ stroke: colors.borderMedium,
348
+ strokeWidth: 1,
349
+ r: 4,
350
+ style: {
351
+ color: colors.textPrimary,
352
+ fontWeight: '500',
353
+ fontSize: '12px'
354
+ },
355
+ states: {
356
+ hover: {
357
+ fill: colors.borderMedium,
358
+ stroke: colors.accentBlue,
359
+ style: {
360
+ color: colors.textPrimary
361
+ }
362
+ },
363
+ select: {
364
+ fill: colors.accentBlue,
365
+ stroke: colors.accentBlue,
366
+ style: {
367
+ color: '#ffffff',
368
+ fontWeight: '600'
369
+ }
370
+ },
371
+ disabled: {
372
+ fill: colors.mainBg,
373
+ stroke: colors.borderWeak,
374
+ style: {
375
+ color: colors.textDisabled
376
+ }
377
+ }
378
+ }
379
+ },
380
+ inputBoxBorderColor: colors.borderMedium,
381
+ inputBoxWidth: 100,
382
+ inputStyle: {
383
+ backgroundColor: colors.inputBg,
384
+ color: colors.textPrimary,
385
+ fontWeight: '500'
386
+ },
387
+ labelStyle: {
388
+ color: colors.textPrimary,
389
+ fontWeight: '500'
390
+ }
391
+ },
392
+
393
+ // Exporting
394
+ exporting: {
395
+ buttons: {
396
+ contextButton: {
397
+ symbolFill: colors.textPrimary,
398
+ symbolStroke: colors.textPrimary,
399
+ symbolStrokeWidth: 2,
400
+ theme: {
401
+ fill: colors.inputBg,
402
+ stroke: colors.borderMedium,
403
+ r: 4,
404
+ states: {
405
+ hover: {
406
+ fill: colors.borderMedium,
407
+ stroke: colors.accentBlue
408
+ },
409
+ select: {
410
+ fill: colors.accentBlue,
411
+ stroke: colors.accentBlue
412
+ }
413
+ }
414
+ }
415
+ }
416
+ },
417
+ menuStyle: {
418
+ background: colors.cardBg,
419
+ border: '1px solid ' + colors.borderMedium,
420
+ boxShadow: '0 4px 12px rgba(0, 0, 0, 0.4)'
421
+ },
422
+ menuItemStyle: {
423
+ color: colors.textPrimary,
424
+ fontWeight: '500',
425
+ fontSize: '13px',
426
+ padding: '8px 16px'
427
+ },
428
+ menuItemHoverStyle: {
429
+ background: colors.inputBg,
430
+ color: colors.accentGreen
431
+ }
432
+ },
433
+
434
+ // Navigation (for annotations)
435
+ navigation: {
436
+ menuItemStyle: {
437
+ color: colors.textPrimary
438
+ },
439
+ menuItemHoverStyle: {
440
+ background: colors.inputBg
441
+ }
442
+ },
443
+
444
+ // Labels (for annotations)
445
+ labels: {
446
+ style: {
447
+ color: colors.textPrimary
448
+ }
449
+ }
450
+ };
451
+
452
+ // Apply theme
453
+ Highcharts.setOptions(magnaxDarkTheme);
454
+
455
+ // Export color constants for external use
456
+ window.MagnaxChartColors = colors;
457
+
458
+ // Helper function to get chart color by metric type
459
+ window.getMagnaxChartColor = function(metricType) {
460
+ var colorMap = {
461
+ 'cpu': colors.cpu,
462
+ 'memory': colors.memory,
463
+ 'mem': colors.memory,
464
+ 'network': colors.networkTx,
465
+ 'network_tx': colors.networkTx,
466
+ 'network_rx': colors.networkRx,
467
+ 'upload': colors.networkTx,
468
+ 'download': colors.networkRx,
469
+ 'fps': colors.fps,
470
+ 'gpu': colors.gpu,
471
+ 'battery': colors.battery,
472
+ 'temperature': colors.accentRed,
473
+ 'temp': colors.accentRed
474
+ };
475
+ return colorMap[metricType.toLowerCase()] || colors.accentBlue;
476
+ };
477
+
478
+ // Helper function to create gradient fill for area charts
479
+ window.createMagnaxGradient = function(color, opacity) {
480
+ opacity = opacity || 0.2;
481
+ return {
482
+ linearGradient: { x1: 0, x2: 0, y1: 0, y2: 1 },
483
+ stops: [
484
+ [0, Highcharts.color(color).setOpacity(opacity).get('rgba')],
485
+ [1, Highcharts.color(color).setOpacity(0).get('rgba')]
486
+ ]
487
+ };
488
+ };
489
+
490
+ console.log('MagnaX Highcharts Dark Theme loaded successfully');
491
+
492
+ })();