@aj-shadow/z-abs-complayer-visualizationlog-client 0.0.0-aj-beta.221
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/.gitattributes +26 -0
- package/LICENSE.txt +96 -0
- package/README.md +5 -0
- package/npm-shrinkwrap.json +13 -0
- package/package.json +10 -0
- package/project/client/_build/Bundle-CompLayer-VisualizationLog-client.bld +36 -0
- package/project/client/_build/Client-CompLayer-VisualizationLog-client-jsx.bld +10 -0
- package/project/client/_build/Client-CompLayer-VisualizationLog-client.bld +10 -0
- package/project/client/_build/Client-css-CompLayer-VisualizationLog-bundle.bld +9 -0
- package/project/client/_build/z-abs-complayer-visualizationlog-client.prj +36 -0
- package/project/client/css/log-column.css +124 -0
- package/project/client/css/log-heading.css +54 -0
- package/project/client/css/log-inner.css +56 -0
- package/project/client/css/log-row.css +19 -0
- package/project/client/css/log-scroll.css +0 -0
- package/project/client/css/log-start-end.css +38 -0
- package/project/client/css/log-type-browser-err.css +21 -0
- package/project/client/css/log-type-browser-log.css +21 -0
- package/project/client/css/log-type-debug.css +21 -0
- package/project/client/css/log-type-engine.css +21 -0
- package/project/client/css/log-type-error.css +21 -0
- package/project/client/css/log-type-gui.css +21 -0
- package/project/client/css/log-type-ip.css +21 -0
- package/project/client/css/log-type-test-data.css +21 -0
- package/project/client/css/log-type-verify-failure.css +21 -0
- package/project/client/css/log-type-verify-succes.css +21 -0
- package/project/client/css/log-type-warning.css +21 -0
- package/project/client/css/log.css +118 -0
- package/project/client/data/data-log-end-result.js +32 -0
- package/project/client/data/data-log-end.js +52 -0
- package/project/client/data/data-log-log-result.js +76 -0
- package/project/client/data/data-log-log.js +157 -0
- package/project/client/data/data-log-start-result.js +36 -0
- package/project/client/data/data-log-start.js +56 -0
- package/project/client/logic/cache.js +185 -0
- package/project/client/logic/const.js +26 -0
- package/project/client/logic/log-filter.js +122 -0
- package/project/client/react-component/log.jsx +296 -0
- package/project/client/templates/template-icons/svgs/template-arrow-head.js +35 -0
- package/project/client/templates/template-icons/svgs/template-arrow-line.js +34 -0
- package/project/client/templates/template-icons/svgs/template-background.js +28 -0
- package/project/client/templates/template-icons/svgs/template-circle-big.js +27 -0
- package/project/client/templates/template-icons/svgs/template-circle-small.js +27 -0
- package/project/client/templates/template-icons/svgs/template-envelope.js +46 -0
- package/project/client/templates/template-icons/svgs/template-hex-big.js +38 -0
- package/project/client/templates/template-icons/svgs/template-hex-small.js +38 -0
- package/project/client/templates/template-icons/svgs/template-square-big.js +28 -0
- package/project/client/templates/template-icons/svgs/template-square-small.js +28 -0
- package/project/client/templates/template-icons/svgs/template-triangle-big.js +31 -0
- package/project/client/templates/template-icons/svgs/template-triangle-small.js +31 -0
- package/project/client/templates/template-icons/svgs/template-x-big.js +39 -0
- package/project/client/templates/template-icons/svgs/template-x-small.js +39 -0
- package/project/client/templates/template-icons/template-icon-accepted.js +32 -0
- package/project/client/templates/template-icons/template-icon-accepting.js +32 -0
- package/project/client/templates/template-icons/template-icon-attached.js +68 -0
- package/project/client/templates/template-icons/template-icon-closed.js +44 -0
- package/project/client/templates/template-icons/template-icon-closing.js +44 -0
- package/project/client/templates/template-icons/template-icon-connected.js +32 -0
- package/project/client/templates/template-icons/template-icon-connecting.js +32 -0
- package/project/client/templates/template-icons/template-icon-detached.js +61 -0
- package/project/client/templates/template-icons/template-icon-not-connected.js +37 -0
- package/project/client/templates/template-icons/template-icon-not-started.js +67 -0
- package/project/client/templates/template-icons/template-icon-receive.js +37 -0
- package/project/client/templates/template-icons/template-icon-send.js +37 -0
- package/project/client/templates/template-icons/template-icon-stack.js +110 -0
- package/project/client/templates/template-icons/template-icon-started.js +32 -0
- package/project/client/templates/template-icons/template-icon-starting.js +32 -0
- package/project/client/templates/template-icons/template-icon-stopped.js +34 -0
- package/project/client/templates/template-icons/template-icon-stopping.js +34 -0
- package/project/client/templates/template-icons/template-icon-unknown.js +26 -0
- package/project/client/templates/template-icons/template-icon.js +76 -0
- package/project/client/templates/template-log-end.js +68 -0
- package/project/client/templates/template-log-log.js +652 -0
- package/project/client/templates/template-log-start.js +67 -0
- package/project/z-abs-complayer-visualizationlog-client.tree +78 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
div.comp_layer_log_gui{
|
|
3
|
+
color:Navy;
|
|
4
|
+
background-color:Turquoise;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
div.log_gui{
|
|
8
|
+
background-color:Turquoise;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/*button.log_gui{
|
|
12
|
+
background-color:Turquoise !important;
|
|
13
|
+
}*/
|
|
14
|
+
|
|
15
|
+
rect.icon_log_gui{
|
|
16
|
+
stroke:Navy;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
polyline.icon_log_gui{
|
|
20
|
+
stroke:Navy;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
div.comp_layer_log_ip{
|
|
3
|
+
color:#0000ff;
|
|
4
|
+
background-color:#DDDDFF;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
div.log_ip{
|
|
8
|
+
background-color:#DDDDFF;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/*button.log_ip{
|
|
12
|
+
background-color:#DDDDFF !important;
|
|
13
|
+
}*/
|
|
14
|
+
|
|
15
|
+
rect.icon_log_ip{
|
|
16
|
+
stroke:#0000ff;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
polyline.icon_log_ip{
|
|
20
|
+
stroke:#0000ff;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
div.comp_layer_log_test_data{
|
|
3
|
+
color:DodgerBlue;
|
|
4
|
+
background-color:PaleTurquoise;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
div.log_test_data{
|
|
8
|
+
background-color:PaleTurquoise;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/*button.log_test_data{
|
|
12
|
+
background-color:PaleTurquoise !important;
|
|
13
|
+
}*/
|
|
14
|
+
|
|
15
|
+
rect.icon_log_test_data{
|
|
16
|
+
stroke:DodgerBlue;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
polyline.icon_log_test_data{
|
|
20
|
+
stroke:DodgerBlue;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
div.comp_layer_log_verify_failure{
|
|
3
|
+
color:red;
|
|
4
|
+
background-color:#FFDDDD;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
div.log_verify_failure{
|
|
8
|
+
background-color:#FFDDDD;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/*button.log_verify_failure{
|
|
12
|
+
background-color:#FFDDDD !important;
|
|
13
|
+
}*/
|
|
14
|
+
|
|
15
|
+
rect.icon_log_verify_failure{
|
|
16
|
+
stroke:red;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
polyline.icon_log_verify_failure{
|
|
20
|
+
stroke:red;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
div.comp_layer_log_verify_success{
|
|
3
|
+
color:green;
|
|
4
|
+
background-color:#D0E9C6;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
div.log_verify_success{
|
|
8
|
+
background-color:#D0E9C6;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/*button.log_verify_success{
|
|
12
|
+
background-color:#D0E9C6 !important;
|
|
13
|
+
}*/
|
|
14
|
+
|
|
15
|
+
rect.icon_log_verify_success{
|
|
16
|
+
stroke:green;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
polyline.icon_log_verify_success{
|
|
20
|
+
stroke:green;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
div.comp_layer_log_warning{
|
|
3
|
+
color:DarkOrange;
|
|
4
|
+
background-color:#FFDD88;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
div.log_warning{
|
|
8
|
+
background-color:#FFDD88;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/*button.log_warning{
|
|
12
|
+
background-color:#FFDD88 !important;
|
|
13
|
+
}*/
|
|
14
|
+
|
|
15
|
+
rect.icon_log_warning{
|
|
16
|
+
stroke:DarkOrange;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
polyline.icon_log_warning{
|
|
20
|
+
stroke:DarkOrange;
|
|
21
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
|
|
2
|
+
tr.log{
|
|
3
|
+
color:DimGray;
|
|
4
|
+
background-color:WhiteSmoke;
|
|
5
|
+
height:30px;
|
|
6
|
+
white-space:nowrap;
|
|
7
|
+
border-left:1px solid #337ab7;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
div.test_case_table_heading {
|
|
11
|
+
color:#DDFFFF;
|
|
12
|
+
background-color:#596ACF;
|
|
13
|
+
padding:0px 5px;
|
|
14
|
+
font-size:16px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
div.test_case_breadcrump {
|
|
18
|
+
position:relative;
|
|
19
|
+
top:8px;
|
|
20
|
+
width:1000%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
div.test_case_log_body_table {
|
|
24
|
+
position:absolute;
|
|
25
|
+
overflow:auto;
|
|
26
|
+
top:48px;
|
|
27
|
+
right:0px;
|
|
28
|
+
bottom:0px;
|
|
29
|
+
left:0px;
|
|
30
|
+
z-index:1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
div.test_case_log_head_table{
|
|
34
|
+
position:relative;
|
|
35
|
+
overflow:hidden;
|
|
36
|
+
top:0px;
|
|
37
|
+
right:0px;
|
|
38
|
+
bottom:0px;
|
|
39
|
+
left:0px;
|
|
40
|
+
margin-top:-1px;
|
|
41
|
+
z-index:2;
|
|
42
|
+
background-color:transparent;
|
|
43
|
+
border-bottom:1px solid #337ab7;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
table.test_case_log_head_table thead th,
|
|
47
|
+
table.test_case_log_body_table tbody td {
|
|
48
|
+
padding:0px 4px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
table.test_case_log_head_table thead th.log_row_filter{
|
|
52
|
+
padding:3px 2px;
|
|
53
|
+
background-color:#F8F8F8;;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
table.test_case_log_head_table{
|
|
57
|
+
background-color:white;
|
|
58
|
+
min-width:100%;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
table.test_case_log_body_table{
|
|
62
|
+
min-width:100%;
|
|
63
|
+
content-visibility:auto;
|
|
64
|
+
contain-intrinsic-size:300px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
table.test_case_log_head_table thead tr th {
|
|
68
|
+
height:20px;
|
|
69
|
+
border-right:1px solid #337ab7;
|
|
70
|
+
color:#337ab7;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
table.test_case_log_body_table tbody tr td {
|
|
74
|
+
border-top:1px solid #337ab7;
|
|
75
|
+
border-right:1px solid #337ab7;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
table.test_case_log_head_table thead tr th:last-child,
|
|
79
|
+
table.test_case_log_body_table tbody tr td:last-child {
|
|
80
|
+
border-right:none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
tr.log_row_nowrap{
|
|
84
|
+
white-space:nowrap;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
tr.log_row_heading{
|
|
88
|
+
border-top:1px solid #337ab7;
|
|
89
|
+
white-space:nowrap;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
th.log_column_nbr,
|
|
93
|
+
td.log_column_nbr{
|
|
94
|
+
width:48px;
|
|
95
|
+
min-width:48px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
th.log_column_type,
|
|
99
|
+
td.log_column_type{
|
|
100
|
+
width:68px;
|
|
101
|
+
min-width:68px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
th.log_column_date,
|
|
105
|
+
td.log_column_date {
|
|
106
|
+
width:284px;
|
|
107
|
+
min-width:284px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
svg.log_arrow{
|
|
111
|
+
position:absolute;
|
|
112
|
+
right:6px;
|
|
113
|
+
top:4px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
svg.log_arrow:hover{
|
|
117
|
+
cursor:pointer;
|
|
118
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import Const from '../logic/const';
|
|
5
|
+
import MemoryCacheObject from 'z-abs-corelayer-cs/clientServer/memory/memory-cache-object';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DataLogEndResult {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.dataType = Const.DATA_LOG_END;
|
|
11
|
+
this.testCaseId = 0;
|
|
12
|
+
this.resultId = 0;
|
|
13
|
+
this.duration = null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static memoryCacheObject = new MemoryCacheObject();
|
|
17
|
+
|
|
18
|
+
static create(testCaseId, resultId, duration) {
|
|
19
|
+
const result = DataLogEndResult.memoryCacheObject.create(DataLogEndResult);
|
|
20
|
+
result.testCaseId = testCaseId;
|
|
21
|
+
result.resultId = resultId;
|
|
22
|
+
result.duration = duration;
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
destroy() {
|
|
27
|
+
DataLogEndResult.memoryCacheObject.destroy(this);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
module.exports = DataLogEndResult;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import DataLogEndResult from './data-log-end-result';
|
|
5
|
+
import DataScrollListNode from 'z-abs-complayer-visualizationinner-client/client/data/data-scroll-list-node';
|
|
6
|
+
import Decoder from 'z-abs-corelayer-client/client/communication/core-protocol/pooled-decoder';
|
|
7
|
+
import Encoder from 'z-abs-corelayer-client/client/communication/core-protocol/pooled-encoder';
|
|
8
|
+
import StoreBaseRealtime from 'z-abs-corelayer-client/client/store/store-base-realtime';
|
|
9
|
+
import HighResolutionDuration from 'z-abs-corelayer-cs/clientServer/time/high-resolution-duration';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DataLogEnd {
|
|
13
|
+
// Index ResultId Duration
|
|
14
|
+
static size = DataScrollListNode.renderDataSize + Encoder.Uint32Size + Encoder.Uint8Size + Encoder.Uint64Size;
|
|
15
|
+
static encoder = null;
|
|
16
|
+
static decoder = null;
|
|
17
|
+
|
|
18
|
+
static init(pooledBuffers) {
|
|
19
|
+
DataLogEnd.encoder = new Encoder(StoreBaseRealtime.textCache);
|
|
20
|
+
DataLogEnd.decoder = new Decoder(StoreBaseRealtime.textCache);
|
|
21
|
+
DataLogEnd.encoder.init(pooledBuffers);
|
|
22
|
+
DataLogEnd.decoder.init(pooledBuffers);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static exit() {
|
|
26
|
+
DataLogEnd.encoder = null;
|
|
27
|
+
DataLogEnd.decoder = null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static store(msg) {
|
|
31
|
+
const encoder = DataLogEnd.encoder;
|
|
32
|
+
const bufferData = encoder.createBuffer(DataLogEnd.size, DataScrollListNode.renderDataSize);
|
|
33
|
+
encoder.setUint32(msg.index + 1);
|
|
34
|
+
encoder.setUint8(msg.resultId);
|
|
35
|
+
encoder.setBigUint64(msg.duration);
|
|
36
|
+
encoder.release();
|
|
37
|
+
return bufferData;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static restore(bufferData) {
|
|
41
|
+
const decoder = DataLogEnd.decoder;
|
|
42
|
+
decoder.attach(bufferData, DataScrollListNode.renderDataSize);
|
|
43
|
+
const testCaseId = decoder.getUint32();
|
|
44
|
+
const resultId = decoder.getUint8();
|
|
45
|
+
const duration = new HighResolutionDuration(decoder.getBigUint64()).getDuration();
|
|
46
|
+
decoder.detach();
|
|
47
|
+
return DataLogEndResult.create(testCaseId, resultId, duration);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
module.exports = DataLogEnd;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import Const from '../logic/const';
|
|
5
|
+
import MemoryCacheObject from 'z-abs-corelayer-cs/clientServer/memory/memory-cache-object';
|
|
6
|
+
|
|
7
|
+
function potocolIndexObject() {
|
|
8
|
+
this.innersData = null;
|
|
9
|
+
this.protocolIndex = 0;
|
|
10
|
+
this.transportType = 0;
|
|
11
|
+
this.type = 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function innersObject() {
|
|
15
|
+
this.innersData = null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class DataLogLogResult {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.dataType = Const.DATA_LOG_LOG;
|
|
21
|
+
this.logId = 0;
|
|
22
|
+
this.type = 0;
|
|
23
|
+
this.dataId = 0;
|
|
24
|
+
this.date = null;
|
|
25
|
+
this.actor = '';
|
|
26
|
+
this.actorPath = '';
|
|
27
|
+
this.fileName = '';
|
|
28
|
+
this.codePath = '';
|
|
29
|
+
this.log = '';
|
|
30
|
+
this.hasProtocolIndex = true;
|
|
31
|
+
this.extraData = null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static memoryCacheObject = new MemoryCacheObject();
|
|
35
|
+
static memoryCacheObjectProtocolIndex = new MemoryCacheObject();
|
|
36
|
+
static memoryCacheObjectInnersObject = new MemoryCacheObject();
|
|
37
|
+
|
|
38
|
+
static create(logId, type, dataId, date, actor, actorPath, fileName, codePath, log, hasProtocolIndex, innersData, protocolIndex, transportType, extraDataType) {
|
|
39
|
+
const result = DataLogLogResult.memoryCacheObject.create(DataLogLogResult);
|
|
40
|
+
result.logId = logId;
|
|
41
|
+
result.type = type;
|
|
42
|
+
result.dataId = dataId;
|
|
43
|
+
result.date = date;
|
|
44
|
+
result.actor = actor;
|
|
45
|
+
result.actorPath = actorPath;
|
|
46
|
+
result.fileName = fileName;
|
|
47
|
+
result.codePath = codePath;
|
|
48
|
+
result.log = log;
|
|
49
|
+
this.hasProtocolIndex = hasProtocolIndex;
|
|
50
|
+
if(hasProtocolIndex) {
|
|
51
|
+
result.extraData = DataLogLogResult.memoryCacheObjectProtocolIndex.create(potocolIndexObject);
|
|
52
|
+
result.extraData.innersData = innersData;
|
|
53
|
+
result.extraData.protocolIndex = protocolIndex;
|
|
54
|
+
result.extraData.transportType = transportType;
|
|
55
|
+
result.extraData.type = extraDataType;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
result.extraData = DataLogLogResult.memoryCacheObjectInnersObject.create(innersObject);
|
|
59
|
+
result.extraData.innersData = innersData;
|
|
60
|
+
}
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
destroy() {
|
|
65
|
+
if(this.hasProtocolIndex) {
|
|
66
|
+
DataLogLogResult.memoryCacheObjectProtocolIndex.destroy(this.extraData);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
DataLogLogResult.memoryCacheObjectInnersObject.create(this.extraData);
|
|
70
|
+
}
|
|
71
|
+
DataLogLogResult.memoryCacheObject.destroy(this);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
module.exports = DataLogLogResult;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import Const from '../logic/const';
|
|
5
|
+
import DataLogLogResult from './data-log-log-result';
|
|
6
|
+
import DataLogDynamicBuffer from 'z-abs-complayer-visualizationinner-client/client/data/data-log-dynamic-buffer';
|
|
7
|
+
import DataScrollListNode from 'z-abs-complayer-visualizationinner-client/client/data/data-scroll-list-node';
|
|
8
|
+
import Decoder from 'z-abs-corelayer-client/client/communication/core-protocol/pooled-decoder';
|
|
9
|
+
import Encoder from 'z-abs-corelayer-client/client/communication/core-protocol/pooled-encoder';
|
|
10
|
+
import StoreBaseRealtime from 'z-abs-corelayer-client/client/store/store-base-realtime';
|
|
11
|
+
import HighResolutionDate from 'z-abs-corelayer-cs/clientServer/time/high-resolution-date';
|
|
12
|
+
import LogDataAction from 'z-abs-funclayer-engine-cs/clientServer/log/log-data-action';
|
|
13
|
+
import LogSourceType from 'z-abs-funclayer-engine-cs/clientServer/log/log-source-type';
|
|
14
|
+
import LogType from 'z-abs-funclayer-engine-cs/clientServer/log/log-type';
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class DataLogLog {
|
|
18
|
+
// Type LogId DataId Date ActorName ActorPath FileName SourceType LineNumber
|
|
19
|
+
static size = DataScrollListNode.renderDataSize + Encoder.Uint8Size + Encoder.Uint32Size + Encoder.Uint8Size + Encoder.Uint64Size + Encoder.CtSize + Encoder.CtSize + Encoder.CtSize + Encoder.Uint8Size + Encoder.Uint32Size;
|
|
20
|
+
static encoder = null;
|
|
21
|
+
static decoder = null;
|
|
22
|
+
static pooledBuffers = null;
|
|
23
|
+
static stackStyles = null;
|
|
24
|
+
|
|
25
|
+
static init(pooledBuffers, stackStyles) {
|
|
26
|
+
DataLogLog.pooledBuffers = pooledBuffers;
|
|
27
|
+
DataLogLog.stackStyles = stackStyles;
|
|
28
|
+
DataLogLog.encoder = new Encoder(StoreBaseRealtime.textCache);
|
|
29
|
+
DataLogLog.decoder = new Decoder(StoreBaseRealtime.textCache);
|
|
30
|
+
DataLogLog.encoder.init(pooledBuffers);
|
|
31
|
+
DataLogLog.decoder.init(pooledBuffers);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static exit() {
|
|
35
|
+
DataLogLog.encoder = null;
|
|
36
|
+
DataLogLog.decoder = null;
|
|
37
|
+
DataLogLog.pooledBuffers = null;
|
|
38
|
+
DataLogLog.stackStyles = null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static store(msg, logId) {
|
|
42
|
+
const encoder = DataLogLog.encoder;
|
|
43
|
+
let protocolIndexSize = 0;
|
|
44
|
+
let protocolIndex = -1;
|
|
45
|
+
let transportType = -1;
|
|
46
|
+
let type = -1;
|
|
47
|
+
let localType = Const.LOCAL_TYPE_IS_UNKNOWN;
|
|
48
|
+
if(LogType.IP === msg.type) {
|
|
49
|
+
if(msg.data) {
|
|
50
|
+
protocolIndexSize = Encoder.Uint16Size + Encoder.Uint8Size;
|
|
51
|
+
const stackStyle = DataLogLog.stackStyles.get(msg.data.stack);
|
|
52
|
+
protocolIndex = stackStyle.index;
|
|
53
|
+
if(msg.data.local) {
|
|
54
|
+
transportType = msg.data.local.transportLayer.transportType;
|
|
55
|
+
localType = "client" === msg.data.local.type ? Const.LOCAL_TYPE_IS_CLIENT : Const.LOCAL_TYPE_IS_SERVER;
|
|
56
|
+
}
|
|
57
|
+
else if(LogDataAction.STACK === msg.data.actionId) {
|
|
58
|
+
type = msg.data.type;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const logLength = encoder.getStringBytes(msg.log);
|
|
63
|
+
const hasInners = null !== msg.inners;
|
|
64
|
+
const bufferData = encoder.createBuffer(DataLogLog.size + logLength + protocolIndexSize, DataScrollListNode.renderDataSize);
|
|
65
|
+
encoder.setUint8(msg.type);
|
|
66
|
+
encoder.setUint4_0(msg.sourceType, false);
|
|
67
|
+
encoder.setUint1_4(hasInners, false);
|
|
68
|
+
encoder.setUint1_5(protocolIndexSize ? 1 : 0, false);
|
|
69
|
+
encoder.setUint2_3(localType, true);
|
|
70
|
+
if(0 !== protocolIndexSize) {
|
|
71
|
+
encoder.setUint16(protocolIndex);
|
|
72
|
+
encoder.setUint8(-1 !== transportType ? transportType : type);
|
|
73
|
+
}
|
|
74
|
+
encoder.setUint32(logId);
|
|
75
|
+
encoder.setUint8(msg.data ? msg.data.actionId : 0);
|
|
76
|
+
encoder.setBigUint64(msg.date);
|
|
77
|
+
encoder.setCtStringInternal(msg.actor);
|
|
78
|
+
encoder.setCtStringInternal(msg.actorPath);
|
|
79
|
+
encoder.setCtStringInternal(msg.fileName);
|
|
80
|
+
encoder.setUint32(msg.lineNumber);
|
|
81
|
+
encoder.setString(msg.log);
|
|
82
|
+
encoder.release();
|
|
83
|
+
if(hasInners) {
|
|
84
|
+
DataLogDynamicBuffer.store(bufferData, msg.inners, null, false, 0, msg.type);
|
|
85
|
+
}
|
|
86
|
+
return bufferData;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
static restore(bufferData) {
|
|
90
|
+
const decoder = DataLogLog.decoder;
|
|
91
|
+
decoder.attach(bufferData, DataScrollListNode.renderDataSize);
|
|
92
|
+
let protocolIndex = 0;
|
|
93
|
+
let typeChoise = 0;
|
|
94
|
+
const type = decoder.getUint8();
|
|
95
|
+
const sourceType = decoder.getUint4_0(false);
|
|
96
|
+
const hasInners = !!decoder.getUint1_4(false);
|
|
97
|
+
const hasProtocolIndex = !!decoder.getUint1_5(false);
|
|
98
|
+
const localType = decoder.getUint2_3(true);
|
|
99
|
+
if(hasProtocolIndex) {
|
|
100
|
+
protocolIndex = decoder.getUint16();
|
|
101
|
+
typeChoise = decoder.getUint8();
|
|
102
|
+
}
|
|
103
|
+
const logId = decoder.getUint32();
|
|
104
|
+
const dataId = decoder.getUint8();
|
|
105
|
+
const timestamp = decoder.getBigUint64();
|
|
106
|
+
const actor = decoder.getCtString();
|
|
107
|
+
const actorPath = decoder.getCtString();
|
|
108
|
+
const fileName = decoder.getCtString();
|
|
109
|
+
const lineNumber = decoder.getUint32();
|
|
110
|
+
const log = decoder.getString();
|
|
111
|
+
const date = new HighResolutionDate(timestamp).getDateMilliSeconds();
|
|
112
|
+
let codePath = null;
|
|
113
|
+
if(LogSourceType.SERVER === sourceType) {
|
|
114
|
+
codePath = `/code-editor?file=/${fileName}&files=0;/${fileName};${lineNumber};${type}`;
|
|
115
|
+
}
|
|
116
|
+
else if(LogSourceType.ACTOR === sourceType) {
|
|
117
|
+
codePath = `/actor-editor/${fileName}?line=${lineNumber}&type=${type}`;
|
|
118
|
+
}
|
|
119
|
+
else if(LogSourceType.STACK === sourceType) {
|
|
120
|
+
codePath = `/stack-editor/${fileName}?line=${lineNumber}&type=${type}`;
|
|
121
|
+
}
|
|
122
|
+
decoder.detach();
|
|
123
|
+
let innersData = null;
|
|
124
|
+
if(hasInners) {
|
|
125
|
+
innersData = DataLogDynamicBuffer.restore(bufferData);
|
|
126
|
+
}
|
|
127
|
+
let transportType = null;
|
|
128
|
+
let stackStackType = null;
|
|
129
|
+
if(LogDataAction.STACK === dataId) {
|
|
130
|
+
stackStackType = typeChoise;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
transportType = typeChoise;
|
|
134
|
+
}
|
|
135
|
+
const extraDataType = hasProtocolIndex ? (LogDataAction.STACK === dataId ? typeChoise : localType) : 0;
|
|
136
|
+
return DataLogLogResult.create(logId, type, dataId, date, actor, `/actor-editor/${actorPath}`, `${fileName}:${lineNumber}`, codePath, log, hasProtocolIndex, innersData, protocolIndex, transportType, extraDataType);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static restoreHeightData(bufferData) {
|
|
140
|
+
const decoder = DataLogLog.decoder;
|
|
141
|
+
decoder.attach(bufferData, DataScrollListNode.renderDataSize);
|
|
142
|
+
const type = decoder.getUint8();
|
|
143
|
+
const hasInners = !!decoder.getUint1_4(true);
|
|
144
|
+
decoder.detach();
|
|
145
|
+
let innersData = null;
|
|
146
|
+
if(hasInners) {
|
|
147
|
+
innersData = DataLogDynamicBuffer.restore(bufferData);
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
type,
|
|
151
|
+
innersData
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
module.exports = DataLogLog;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import Const from '../logic/const';
|
|
5
|
+
import MemoryCacheObject from 'z-abs-corelayer-cs/clientServer/memory/memory-cache-object';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DataLogStartResult {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.dataType = Const.DATA_LOG_START;
|
|
11
|
+
this.testCaseId = 0;
|
|
12
|
+
this.testSuiteIteration = 0;
|
|
13
|
+
this.testCaseIteration = 0;
|
|
14
|
+
this.name = '';
|
|
15
|
+
this.date = null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static memoryCacheObject = new MemoryCacheObject();
|
|
19
|
+
|
|
20
|
+
static create(testCaseId, testSuiteIteration, testCaseIteration, name, date) {
|
|
21
|
+
const result = DataLogStartResult.memoryCacheObject.create(DataLogStartResult);
|
|
22
|
+
result.testCaseId = testCaseId;
|
|
23
|
+
result.testSuiteIteration = testSuiteIteration;
|
|
24
|
+
result.testCaseIteration = testCaseIteration;
|
|
25
|
+
result.name = name;
|
|
26
|
+
result.date = date;
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
destroy() {
|
|
31
|
+
DataLogStartResult.memoryCacheObject.destroy(this);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
module.exports = DataLogStartResult;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import DataLogStartResult from './data-log-start-result';
|
|
5
|
+
import DataScrollListNode from 'z-abs-complayer-visualizationinner-client/client/data/data-scroll-list-node';
|
|
6
|
+
import Decoder from 'z-abs-corelayer-client/client/communication/core-protocol/pooled-decoder';
|
|
7
|
+
import Encoder from 'z-abs-corelayer-client/client/communication/core-protocol/pooled-encoder';
|
|
8
|
+
import StoreBaseRealtime from 'z-abs-corelayer-client/client/store/store-base-realtime';
|
|
9
|
+
import HighResolutionDate from 'z-abs-corelayer-cs/clientServer/time/high-resolution-date';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DataLogStart {
|
|
13
|
+
// Index TS-Iteration TC-Iteration Name Timestamp
|
|
14
|
+
static size = DataScrollListNode.renderDataSize + Encoder.Uint32Size + Encoder.Uint16Size + Encoder.Uint16Size + Encoder.CtSize + Encoder.Uint64Size;
|
|
15
|
+
static encoder = null;
|
|
16
|
+
static decoder = null;
|
|
17
|
+
|
|
18
|
+
static init(pooledBuffers) {
|
|
19
|
+
DataLogStart.encoder = new Encoder(StoreBaseRealtime.textCache);
|
|
20
|
+
DataLogStart.decoder = new Decoder(StoreBaseRealtime.textCache);
|
|
21
|
+
DataLogStart.encoder.init(pooledBuffers);
|
|
22
|
+
DataLogStart.decoder.init(pooledBuffers);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static exit() {
|
|
26
|
+
DataLogStart.encoder = null;
|
|
27
|
+
DataLogStart.decoder = null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static store(msg, testCaseIteration, testSuiteIteration, guid) {
|
|
31
|
+
const encoder = DataLogStart.encoder;
|
|
32
|
+
const bufferData = encoder.createBuffer(DataLogStart.size, DataScrollListNode.renderDataSize);
|
|
33
|
+
encoder.setUint32(msg.index + 1);
|
|
34
|
+
encoder.setUint16(testSuiteIteration);
|
|
35
|
+
encoder.setUint16(testCaseIteration);
|
|
36
|
+
encoder.setCtStringInternal(msg.name);
|
|
37
|
+
encoder.setBigUint64(msg.timestamp);
|
|
38
|
+
encoder.release();
|
|
39
|
+
return bufferData;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static restore(bufferData) {
|
|
43
|
+
const decoder = DataLogStart.decoder;
|
|
44
|
+
decoder.attach(bufferData, DataScrollListNode.renderDataSize);
|
|
45
|
+
const testCaseId = decoder.getUint32();
|
|
46
|
+
const testSuiteIteration = decoder.getUint16();
|
|
47
|
+
const testCaseIteration = decoder.getUint16();
|
|
48
|
+
const name = decoder.getCtString();
|
|
49
|
+
const date = new HighResolutionDate(decoder.getBigUint64()).getDateMilliSeconds();
|
|
50
|
+
decoder.detach();
|
|
51
|
+
return DataLogStartResult.create(testCaseId, testSuiteIteration, testCaseIteration, name, date);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
module.exports = DataLogStart;
|