@aj-shadow/z-abs-complayer-visualizationsequencediagram-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.
Files changed (167) hide show
  1. package/.gitattributes +26 -0
  2. package/LICENSE.txt +96 -0
  3. package/README.md +5 -0
  4. package/npm-shrinkwrap.json +13 -0
  5. package/package.json +10 -0
  6. package/project/client/_build/Bundle-CompLayer-VisualizationSequenceDiagram-client.bld +36 -0
  7. package/project/client/_build/Client-CompLayer-VisualizationSequenceDiagram-client-jsx.bld +10 -0
  8. package/project/client/_build/Client-CompLayer-VisualizationSequenceDiagram-client.bld +10 -0
  9. package/project/client/_build/Client-css-CompLayer-VisualizationSequenceDiagram-bundle.bld +9 -0
  10. package/project/client/_build/z-abs-complayer-visualizationsequencediagram-client.prj +36 -0
  11. package/project/client/content-decoders/content-decoder.js +22 -0
  12. package/project/client/content-decoders/image-decoder.js +98 -0
  13. package/project/client/content-decoders/text-decoder.js +65 -0
  14. package/project/client/css/seq-dia-buttons.css +40 -0
  15. package/project/client/css/seq-dia-connection-closed.css +11 -0
  16. package/project/client/css/seq-dia-connection-closing.css +11 -0
  17. package/project/client/css/seq-dia-connection-connected-not.css +16 -0
  18. package/project/client/css/seq-dia-connection-connected.css +5 -0
  19. package/project/client/css/seq-dia-connection-connecting.css +5 -0
  20. package/project/client/css/seq-dia-connection-half-closed.css +11 -0
  21. package/project/client/css/seq-dia-connection-half-closing.css +11 -0
  22. package/project/client/css/seq-dia-connection-upgrading.css +5 -0
  23. package/project/client/css/seq-dia-connection.css +27 -0
  24. package/project/client/css/seq-dia-event-gui.css +86 -0
  25. package/project/client/css/seq-dia-event-state.css +13 -0
  26. package/project/client/css/seq-dia-event.css +55 -0
  27. package/project/client/css/seq-dia-inner.css +246 -0
  28. package/project/client/css/seq-dia-ip-address-name.css +14 -0
  29. package/project/client/css/seq-dia-phase.css +90 -0
  30. package/project/client/css/seq-dia-protocol.css +119 -0
  31. package/project/client/css/seq-dia-receive.css +5 -0
  32. package/project/client/css/seq-dia-send.css +5 -0
  33. package/project/client/css/seq-dia-sequence-diagram.css +10 -0
  34. package/project/client/css/seq-dia-server-accepted.css +5 -0
  35. package/project/client/css/seq-dia-server-accepting.css +5 -0
  36. package/project/client/css/seq-dia-server-attached.css +5 -0
  37. package/project/client/css/seq-dia-server-detached.css +5 -0
  38. package/project/client/css/seq-dia-server-not-started.css +5 -0
  39. package/project/client/css/seq-dia-server-started.css +5 -0
  40. package/project/client/css/seq-dia-server-starting.css +5 -0
  41. package/project/client/css/seq-dia-server-stopped.css +5 -0
  42. package/project/client/css/seq-dia-server-stopping.css +5 -0
  43. package/project/client/css/seq-dia-stack.css +51 -0
  44. package/project/client/css/seq-dia-state.css +188 -0
  45. package/project/client/css/seq-dia-template-msg.css +0 -0
  46. package/project/client/css/seq-dia-test-case-end.css +45 -0
  47. package/project/client/css/seq-dia-test-case-header.css +20 -0
  48. package/project/client/css/seq-dia-test-case-start.css +17 -0
  49. package/project/client/data/data-seq-dia-client-connected-not.js +69 -0
  50. package/project/client/data/data-seq-dia-client-connected.js +78 -0
  51. package/project/client/data/data-seq-dia-client-connecting.js +84 -0
  52. package/project/client/data/data-seq-dia-client-dns-failure.js +29 -0
  53. package/project/client/data/data-seq-dia-connection-closed.js +73 -0
  54. package/project/client/data/data-seq-dia-connection-closing.js +71 -0
  55. package/project/client/data/data-seq-dia-connection-half-closed.js +73 -0
  56. package/project/client/data/data-seq-dia-connection-half-closing.js +71 -0
  57. package/project/client/data/data-seq-dia-connection-upgrading.js +32 -0
  58. package/project/client/data/data-seq-dia-gui-result.js +48 -0
  59. package/project/client/data/data-seq-dia-gui.js +78 -0
  60. package/project/client/data/data-seq-dia-phase-end-result.js +31 -0
  61. package/project/client/data/data-seq-dia-phase-end.js +57 -0
  62. package/project/client/data/data-seq-dia-phase-start-result.js +30 -0
  63. package/project/client/data/data-seq-dia-phase-start.js +57 -0
  64. package/project/client/data/data-seq-dia-protocol-single-node-result.js +61 -0
  65. package/project/client/data/data-seq-dia-protocol-single-node.js +81 -0
  66. package/project/client/data/data-seq-dia-protocol-two-nodes-result.js +91 -0
  67. package/project/client/data/data-seq-dia-protocol-two-nodes.js +64 -0
  68. package/project/client/data/data-seq-dia-receive.js +90 -0
  69. package/project/client/data/data-seq-dia-send.js +90 -0
  70. package/project/client/data/data-seq-dia-server-accepted.js +70 -0
  71. package/project/client/data/data-seq-dia-server-accepting.js +61 -0
  72. package/project/client/data/data-seq-dia-server-attached.js +61 -0
  73. package/project/client/data/data-seq-dia-server-detached.js +61 -0
  74. package/project/client/data/data-seq-dia-server-not-started.js +61 -0
  75. package/project/client/data/data-seq-dia-server-started.js +61 -0
  76. package/project/client/data/data-seq-dia-server-starting.js +61 -0
  77. package/project/client/data/data-seq-dia-server-stopped.js +61 -0
  78. package/project/client/data/data-seq-dia-server-stopping.js +61 -0
  79. package/project/client/data/data-seq-dia-stack-result.js +40 -0
  80. package/project/client/data/data-seq-dia-stack.js +73 -0
  81. package/project/client/data/data-seq-dia-state-result.js +38 -0
  82. package/project/client/data/data-seq-dia-state.js +70 -0
  83. package/project/client/data/data-seq-dia-test-case-end-result.js +30 -0
  84. package/project/client/data/data-seq-dia-test-case-end.js +49 -0
  85. package/project/client/data/data-seq-dia-test-case-header-result.js +30 -0
  86. package/project/client/data/data-seq-dia-test-case-header.js +49 -0
  87. package/project/client/data/data-seq-dia-test-case-start-result.js +30 -0
  88. package/project/client/data/data-seq-dia-test-case-start.js +50 -0
  89. package/project/client/logic/analyze.js +41 -0
  90. package/project/client/logic/cache-array.js +45 -0
  91. package/project/client/logic/cache-map-double.js +64 -0
  92. package/project/client/logic/cache-map-shared.js +73 -0
  93. package/project/client/logic/cache-map.js +48 -0
  94. package/project/client/logic/cache-type-connection-closed.js +56 -0
  95. package/project/client/logic/cache-type-connection-closing.js +56 -0
  96. package/project/client/logic/cache-type-connection-connected.js +58 -0
  97. package/project/client/logic/cache-type-connection-connecting.js +58 -0
  98. package/project/client/logic/cache-type-connection-half-closed.js +56 -0
  99. package/project/client/logic/cache-type-connection-half-closing.js +56 -0
  100. package/project/client/logic/cache-type-connection-not-connected.js +58 -0
  101. package/project/client/logic/cache-type-phase-end.js +49 -0
  102. package/project/client/logic/cache-type-phase-start.js +49 -0
  103. package/project/client/logic/cache-type-receive.js +58 -0
  104. package/project/client/logic/cache-type-send.js +58 -0
  105. package/project/client/logic/cache-type-server-accepted.js +36 -0
  106. package/project/client/logic/cache-type-server-accepting.js +64 -0
  107. package/project/client/logic/cache-type-server-attached.js +64 -0
  108. package/project/client/logic/cache-type-server-detached.js +55 -0
  109. package/project/client/logic/cache-type-server-not-started.js +64 -0
  110. package/project/client/logic/cache-type-server-started.js +66 -0
  111. package/project/client/logic/cache-type-server-starting.js +53 -0
  112. package/project/client/logic/cache-type-server-stopped.js +64 -0
  113. package/project/client/logic/cache-type-server-stopping.js +64 -0
  114. package/project/client/logic/cache-type-stack.js +64 -0
  115. package/project/client/logic/cache-type-state.js +53 -0
  116. package/project/client/logic/cache-type-test-case-end.js +30 -0
  117. package/project/client/logic/cache-type-test-case-header.js +30 -0
  118. package/project/client/logic/cache-type-test-case-start.js +30 -0
  119. package/project/client/logic/cache.js +202 -0
  120. package/project/client/logic/connection-data.js +60 -0
  121. package/project/client/logic/const.js +207 -0
  122. package/project/client/logic/content-cache.js +23 -0
  123. package/project/client/logic/data-log-row.js +24 -0
  124. package/project/client/logic/filter-size.js +81 -0
  125. package/project/client/logic/seq-dia-filter.js +496 -0
  126. package/project/client/logic/shared-template-data.js +62 -0
  127. package/project/client/react-component/sequence-diagram.jsx +387 -0
  128. package/project/client/templates/components/component-seq-dia-arrow.js +26 -0
  129. package/project/client/templates/components/component-seq-dia-caption.js +44 -0
  130. package/project/client/templates/components/component-seq-dia-envelope.js +188 -0
  131. package/project/client/templates/components/component-seq-dia-event-info.js +108 -0
  132. package/project/client/templates/components/component-seq-dia-event-row.js +147 -0
  133. package/project/client/templates/components/component-seq-dia-protocol.js +314 -0
  134. package/project/client/templates/components/component-seq-dia-shared.js +58 -0
  135. package/project/client/templates/template-seq-dia-client-connected-not.js +67 -0
  136. package/project/client/templates/template-seq-dia-client-connected.js +67 -0
  137. package/project/client/templates/template-seq-dia-client-connecting.js +71 -0
  138. package/project/client/templates/template-seq-dia-client-dns-failure.js +82 -0
  139. package/project/client/templates/template-seq-dia-connection-closed.js +70 -0
  140. package/project/client/templates/template-seq-dia-connection-closing.js +72 -0
  141. package/project/client/templates/template-seq-dia-connection-half-closed.js +70 -0
  142. package/project/client/templates/template-seq-dia-connection-half-closing.js +80 -0
  143. package/project/client/templates/template-seq-dia-connection-upgraded-not.js +82 -0
  144. package/project/client/templates/template-seq-dia-connection-upgraded.js +57 -0
  145. package/project/client/templates/template-seq-dia-connection-upgrading.js +57 -0
  146. package/project/client/templates/template-seq-dia-gui.js +250 -0
  147. package/project/client/templates/template-seq-dia-msg.js +500 -0
  148. package/project/client/templates/template-seq-dia-phase-end.js +59 -0
  149. package/project/client/templates/template-seq-dia-phase-start.js +59 -0
  150. package/project/client/templates/template-seq-dia-protocol-base.js +107 -0
  151. package/project/client/templates/template-seq-dia-receive.js +119 -0
  152. package/project/client/templates/template-seq-dia-send.js +121 -0
  153. package/project/client/templates/template-seq-dia-server-accepted.js +61 -0
  154. package/project/client/templates/template-seq-dia-server-accepting.js +45 -0
  155. package/project/client/templates/template-seq-dia-server-attached.js +72 -0
  156. package/project/client/templates/template-seq-dia-server-detached.js +60 -0
  157. package/project/client/templates/template-seq-dia-server-not-started.js +77 -0
  158. package/project/client/templates/template-seq-dia-server-started.js +49 -0
  159. package/project/client/templates/template-seq-dia-server-starting.js +49 -0
  160. package/project/client/templates/template-seq-dia-server-stopped.js +45 -0
  161. package/project/client/templates/template-seq-dia-server-stopping.js +45 -0
  162. package/project/client/templates/template-seq-dia-stack.js +195 -0
  163. package/project/client/templates/template-seq-dia-state.js +118 -0
  164. package/project/client/templates/template-seq-dia-test-case-end.js +73 -0
  165. package/project/client/templates/template-seq-dia-test-case-header.js +70 -0
  166. package/project/client/templates/template-seq-dia-test-case-start.js +68 -0
  167. package/project/z-abs-complayer-visualizationsequencediagram-client.tree +171 -0
@@ -0,0 +1,49 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../logic/const';
5
+ import DataSeqDiaServerStarted from '../data/data-seq-dia-server-started';
6
+ import FilterSize from '../logic/filter-size';
7
+ import TemplateSeqDiaProtocolBase from './template-seq-dia-protocol-base';
8
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
9
+
10
+
11
+ class TemplateSeqDiaServerStarted extends TemplateSeqDiaProtocolBase {
12
+ constructor() {
13
+ super(DataSeqDiaServerStarted, 'seq_dia_server_started', Const.STATE_EVENT_HEIGHT);
14
+ this.fragment = null;
15
+ }
16
+
17
+ onExit() {
18
+ this.fragment = null;
19
+ }
20
+
21
+ onInit(filter, pooledBuffers, stackStyles) {
22
+ const startArrow = document.createElementNS(InnerConst.SVG_NS, 'polygon');
23
+ startArrow.classList.add('seq_dia_arrow');
24
+ const arrowWidth = 4;
25
+ const startArrowX1 = FilterSize.eventWidthHalf - arrowWidth;
26
+ const startArrowX2 = FilterSize.eventWidthHalf + arrowWidth;
27
+ const startArrowY1 = Const.STATE_EVENT_HALF_HEIGHT - arrowWidth;
28
+ const startArrowY2 = Const.STATE_EVENT_HALF_HEIGHT;
29
+ const startArrowY3 = Const.STATE_EVENT_HALF_HEIGHT + arrowWidth;
30
+ startArrow.setAttribute('points', `${startArrowX1},${startArrowY1} ${startArrowX1},${startArrowY3} ${startArrowX2},${startArrowY2}`);
31
+
32
+ this.fragment = document.createElementNS(InnerConst.SVG_NS, 'g');
33
+ this.fragment.appendChild(startArrow);
34
+ }
35
+
36
+ onInitSvgFragment(protocolKey) {
37
+ const fragment = this.fragment.cloneNode(true);
38
+ fragment.lastChild.classList.add(`seq_dia_protocol_${protocolKey}_small`);
39
+ return [null, null, fragment, null, null];
40
+ }
41
+
42
+ calculateHeight(bufferData) {
43
+ const phaseId = DataSeqDiaServerStarted.restoreHeightData(bufferData);
44
+ return this.filter.getServerEvents(phaseId) ? this.height : 0;
45
+ }
46
+ }
47
+
48
+
49
+ module.exports = TemplateSeqDiaServerStarted;
@@ -0,0 +1,49 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../logic/const';
5
+ import DataSeqDiaServerStarting from '../data/data-seq-dia-server-starting';
6
+ import FilterSize from '../logic/filter-size';
7
+ import TemplateSeqDiaProtocolBase from './template-seq-dia-protocol-base';
8
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
9
+
10
+
11
+ class TemplateSeqDiaServerStarting extends TemplateSeqDiaProtocolBase {
12
+ constructor() {
13
+ super(DataSeqDiaServerStarting, 'seq_dia_server_starting', Const.STATE_EVENT_HEIGHT);
14
+ this.fragment = null;
15
+ }
16
+
17
+ onExit() {
18
+ this.fragment = null;
19
+ }
20
+
21
+ onInit(filter, pooledBuffers, stackStyles) {
22
+ const startArrow = document.createElementNS(InnerConst.SVG_NS, 'polygon');
23
+ startArrow.classList.add('seq_dia_arrow');
24
+ const arrowWidth = 3;
25
+ const startArrowX1 = FilterSize.eventWidthHalf - arrowWidth;
26
+ const startArrowX2 = FilterSize.eventWidthHalf + arrowWidth;
27
+ const startArrowY1 = Const.STATE_EVENT_HALF_HEIGHT - arrowWidth;
28
+ const startArrowY2 = Const.STATE_EVENT_HALF_HEIGHT;
29
+ const startArrowY3 = Const.STATE_EVENT_HALF_HEIGHT + arrowWidth;
30
+ startArrow.setAttribute('points', `${startArrowX1},${startArrowY1} ${startArrowX1},${startArrowY3} ${startArrowX2},${startArrowY2}`);
31
+
32
+ this.fragment = document.createElementNS(InnerConst.SVG_NS, 'g');
33
+ this.fragment.appendChild(startArrow);
34
+ }
35
+
36
+ onInitSvgFragment(protocolKey) {
37
+ const fragment = this.fragment.cloneNode(true);
38
+ fragment.lastChild.classList.add(`seq_dia_protocol_${protocolKey}_small`);
39
+ return [null, null, fragment, null, null];
40
+ }
41
+
42
+ calculateHeight(bufferData) {
43
+ const phaseId = DataSeqDiaServerStarting.restoreHeightData(bufferData);
44
+ return this.filter.getServerEvents(phaseId) ? this.height : 0;
45
+ }
46
+ }
47
+
48
+
49
+ module.exports = TemplateSeqDiaServerStarting;
@@ -0,0 +1,45 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../logic/const';
5
+ import DataSeqDiaServerStopped from '../data/data-seq-dia-server-stopped';
6
+ import FilterSize from '../logic/filter-size';
7
+ import TemplateSeqDiaProtocolBase from './template-seq-dia-protocol-base';
8
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
9
+
10
+
11
+ class TemplateSeqDiaServerStopped extends TemplateSeqDiaProtocolBase {
12
+ constructor() {
13
+ super(DataSeqDiaServerStopped, 'seq_dia_server_stopped', Const.STATE_EVENT_HEIGHT);
14
+ this.fragment = null;
15
+ }
16
+
17
+ onExit() {
18
+ this.fragment = null;
19
+ }
20
+
21
+ onInit(filter, pooledBuffers, stackStyles) {
22
+ const startRect = document.createElementNS(InnerConst.SVG_NS, 'rect');
23
+ startRect.setAttribute('y', Const.STATE_EVENT_HALF_HEIGHT - 4);
24
+ startRect.setAttribute('height', 8);
25
+ startRect.setAttribute('x', FilterSize.eventWidthHalf - 4);
26
+ startRect.setAttribute('width', 8);
27
+
28
+ this.fragment = document.createElementNS(InnerConst.SVG_NS, 'g');
29
+ this.fragment.appendChild(startRect);
30
+ }
31
+
32
+ onInitSvgFragment(protocolKey) {
33
+ const fragment = this.fragment.cloneNode(true);
34
+ fragment.lastChild.classList.add(`seq_dia_protocol_${protocolKey}_small`);
35
+ return [null, null, fragment, null, null];
36
+ }
37
+
38
+ calculateHeight(bufferData) {
39
+ const phaseId = DataSeqDiaServerStopped.restoreHeightData(bufferData);
40
+ return this.filter.getServerEvents(phaseId) ? this.height : 0;
41
+ }
42
+ }
43
+
44
+
45
+ module.exports = TemplateSeqDiaServerStopped;
@@ -0,0 +1,45 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../logic/const';
5
+ import DataSeqDiaServerStopping from '../data/data-seq-dia-server-stopping';
6
+ import FilterSize from '../logic/filter-size';
7
+ import TemplateSeqDiaProtocolBase from './template-seq-dia-protocol-base';
8
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
9
+
10
+
11
+ class TemplateSeqDiaServerStopping extends TemplateSeqDiaProtocolBase {
12
+ constructor() {
13
+ super(DataSeqDiaServerStopping, 'seq_dia_server_stopping', Const.STATE_EVENT_HEIGHT);
14
+ this.fragment = null;
15
+ }
16
+
17
+ onExit() {
18
+ this.fragment = null;
19
+ }
20
+
21
+ onInit(filter, pooledBuffers, stackStyles) {
22
+ const startRect = document.createElementNS(InnerConst.SVG_NS, 'rect');
23
+ startRect.setAttribute('y', Const.STATE_EVENT_HALF_HEIGHT - 3);
24
+ startRect.setAttribute('height', 6);
25
+ startRect.setAttribute('x', FilterSize.eventWidthHalf - 3);
26
+ startRect.setAttribute('width', 6);
27
+
28
+ this.fragment = document.createElementNS(InnerConst.SVG_NS, 'g');
29
+ this.fragment.appendChild(startRect);
30
+ }
31
+
32
+ onInitSvgFragment(protocolKey) {
33
+ const fragment = this.fragment.cloneNode(true);
34
+ fragment.lastChild.classList.add(`seq_dia_protocol_${protocolKey}_small`);
35
+ return [null, null, fragment, null, null];
36
+ }
37
+
38
+ calculateHeight(bufferData) {
39
+ const phaseId = DataSeqDiaServerStopping.restoreHeightData(bufferData);
40
+ return this.filter.getServerEvents(phaseId) ? this.height : 0;
41
+ }
42
+ }
43
+
44
+
45
+ module.exports = TemplateSeqDiaServerStopping;
@@ -0,0 +1,195 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../logic/const';
5
+ import ComponentSeqDiaEventInfo from './components/component-seq-dia-event-info';
6
+ import ComponentSeqDiaEventRow from './components/component-seq-dia-event-row';
7
+ import DataSeqDiaStack from '../data/data-seq-dia-stack';
8
+ import FilterSize from '../logic/filter-size';
9
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
10
+ import LogDataStackType from 'z-abs-funclayer-engine-cs/clientServer/log/log-data-stack-type';
11
+
12
+
13
+ class TemplateSeqDiaStack {
14
+ constructor() {
15
+ this.filter = null;
16
+ this.stackTemplates = null;
17
+ this.eventInfoIds = null;
18
+ this.componentSeqDiaEventInfo = new ComponentSeqDiaEventInfo();
19
+ }
20
+
21
+ exit() {
22
+ DataSeqDiaStack.exit();
23
+ this.filter = null;
24
+ this.stackTemplates = null;
25
+ this.eventInfoIds = null;
26
+ this.componentSeqDiaEventInfo.exit();
27
+ }
28
+
29
+ init(filter, pooledBuffers, stackStyles) {
30
+ this.componentSeqDiaEventInfo.init(stackStyles);
31
+ this.filter = filter;
32
+ DataSeqDiaStack.init(pooledBuffers);
33
+
34
+ this.stackTemplates = new Array(5);
35
+ for(let i = 0; i < 5; ++i) {
36
+ this.stackTemplates[i] = new Array(stackStyles.size);
37
+ }
38
+ stackStyles.forEach((protocol, protocolKey) => {
39
+ this.stackTemplates[0][protocol.index] = this._new(protocolKey);
40
+ this.stackTemplates[1][protocol.index] = this._shared(protocolKey);
41
+ this.stackTemplates[2][protocol.index] = this._use(protocolKey);
42
+ this.stackTemplates[3][protocol.index] = this._store(protocolKey);
43
+ this.stackTemplates[4][protocol.index] = this._del(protocolKey);
44
+ });
45
+ this.eventInfoIds = new Array(LogDataStackType.results.length);
46
+ LogDataStackType.results.forEach((result, index) => {
47
+ const leftRow = this.componentSeqDiaEventInfo.createLeftRowDiv('seq_dia__data_stack');
48
+ this.componentSeqDiaEventInfo.createLeftInfoDiv(leftRow, 'instance', 'seq_dia__data_stack_instance', false);
49
+ this.componentSeqDiaEventInfo.createLeftInfoDiv(leftRow, '${prot}', 'seq_dia__data_stack_protocol', true);
50
+ const rightRow = this.componentSeqDiaEventInfo.createRightRowDiv('seq_dia__data_stack');
51
+ this.componentSeqDiaEventInfo.createRightInfoDiv(rightRow, 'instance', 'seq_dia__data_stack_instance', false);
52
+ this.componentSeqDiaEventInfo.createRightInfoDiv(rightRow, '${prot}', 'seq_dia__data_stack_protocol', true);
53
+ this.eventInfoIds[index] = this.componentSeqDiaEventInfo.createTemplate(leftRow, rightRow);
54
+ });
55
+ }
56
+
57
+ calculateHeight(bufferData) {
58
+ const phaseId = DataSeqDiaStack.restoreHeightData(bufferData);
59
+ return this.filter.getStackEvents(phaseId) ? Const.STATE_EVENT_HEIGHT : 0;
60
+ }
61
+
62
+ store(msg, sharedTemplateData) {
63
+ return DataSeqDiaStack.store(msg, sharedTemplateData);
64
+ }
65
+
66
+ restore(bufferData) {
67
+ return DataSeqDiaStack.restore(bufferData);
68
+ }
69
+
70
+ createElement(data) {
71
+ const node = ComponentSeqDiaEventRow.cloneRow('seq_dia_stack');
72
+ node.firstChild.appendChild(ComponentSeqDiaEventRow.cloneColumnLeft(data.phaseId));
73
+ for(let i = 0; i < data.nbrOfActors; ++i) {
74
+ const divNodeMiddle = node.firstChild.appendChild(ComponentSeqDiaEventRow.cloneColumnMiddle(i, data.phaseId));
75
+ if(data.actorIndex === i) {
76
+ const svg = divNodeMiddle.appendChild(ComponentSeqDiaEventRow.cloneSvg(Const.STATE_EVENT_HEIGHT, Const.RENDER_POSITION_NORMAL));
77
+ svg.appendChild(this.stackTemplates[data.type][data.protocolIndex].cloneNode(true));
78
+ if(data.actorIndex <= data.firstSutIndex) {
79
+ divNodeMiddle.appendChild(this.componentSeqDiaEventInfo.clone(this.eventInfoIds[data.type], Const.PART_LEFT, data.protocolIndex, data.renderPosition));
80
+ }
81
+ else {
82
+ divNodeMiddle.appendChild(this.componentSeqDiaEventInfo.clone(this.eventInfoIds[data.type], Const.PART_RIGHT, data.protocolIndex, data.renderPosition));
83
+ }
84
+ }
85
+ }
86
+ node.firstChild.appendChild(ComponentSeqDiaEventRow.cloneColumnRight(data.nbrOfActors, data.phaseId));
87
+ return node;
88
+ }
89
+
90
+ setElementData(data, node) {
91
+ node.firstChild.childNodes[data.actorIndex + 1].lastChild.firstChild.firstChild.firstChild.nodeValue = data.stackData;
92
+ }
93
+
94
+ removeElement(data, node) {}
95
+
96
+ _rectBackground() {
97
+ const bgRect = document.createElementNS(InnerConst.SVG_NS, 'rect');
98
+ bgRect.classList.add('stack_seq_dia_bg');
99
+ bgRect.setAttribute('x', FilterSize.eventWidthHalf - 6);
100
+ bgRect.setAttribute('width', 12);
101
+ bgRect.setAttribute('y', 1);
102
+ bgRect.setAttribute('height', 8);
103
+ return bgRect;
104
+ }
105
+
106
+ _rect(g, protocolKey, x) {
107
+ const connLeftRect = g.appendChild(document.createElementNS(InnerConst.SVG_NS, 'rect'));
108
+ connLeftRect.classList.add('stack_seq_dia_conn', `seq_dia_protocol_${protocolKey}_small`);
109
+ connLeftRect.setAttribute('x', FilterSize.eventWidthHalf + x);
110
+ connLeftRect.setAttribute('width', 3);
111
+ connLeftRect.setAttribute('y', 3.5);
112
+ connLeftRect.setAttribute('height', 3);
113
+ }
114
+
115
+ _cross(g, protocolKey, x) {
116
+ const connLine1 = g.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
117
+ connLine1.classList.add('stack_seq_dia_conn');
118
+ connLine1.setAttribute('x1', FilterSize.eventWidthHalf + x);
119
+ connLine1.setAttribute('x2', FilterSize.eventWidthHalf + x + 3);
120
+ connLine1.setAttribute('y1', 3.5);
121
+ connLine1.setAttribute('y2', 6.5);
122
+
123
+ const connLine2 = g.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
124
+ connLine2.classList.add('stack_seq_dia_conn');
125
+ connLine2.setAttribute('x1', FilterSize.eventWidthHalf + x);
126
+ connLine2.setAttribute('x2', FilterSize.eventWidthHalf + x + 3);
127
+ connLine2.setAttribute('y1', 6.5);
128
+ connLine2.setAttribute('y2', 3.5);
129
+
130
+ const circle1 = g.appendChild(document.createElementNS(InnerConst.SVG_NS, 'circle'));
131
+ circle1.classList.add('stack_seq_dia_conn', `seq_dia_protocol_${protocolKey}_small`);
132
+ circle1.setAttribute('cx', FilterSize.eventWidthHalf + x + 1.5);
133
+ circle1.setAttribute('cy', 5);
134
+ circle1.setAttribute('r', 0.5);
135
+ }
136
+
137
+ _new(protocolKey) {
138
+ const g = document.createElementNS(InnerConst.SVG_NS, 'g');
139
+ g.appendChild(this._rectBackground());
140
+ const connLine = g.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
141
+ connLine.classList.add('stack_seq_dia_conn');
142
+ connLine.setAttribute('x1', FilterSize.eventWidthHalf - 3.5);
143
+ connLine.setAttribute('x2', FilterSize.eventWidthHalf + 1);
144
+ connLine.setAttribute('y1', 5);
145
+ connLine.setAttribute('y2', 5);
146
+ this._rect(g, protocolKey, -4.5);
147
+ return g;
148
+ }
149
+
150
+ _shared(protocolKey) {
151
+ const g = document.createElementNS(InnerConst.SVG_NS, 'g');
152
+ g.appendChild(this._rectBackground());
153
+ const connLine = g.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
154
+ connLine.classList.add('stack_seq_dia_conn');
155
+ connLine.setAttribute('x1', FilterSize.eventWidthHalf - 3.5);
156
+ connLine.setAttribute('x2', FilterSize.eventWidthHalf + 1);
157
+ connLine.setAttribute('y1', 5);
158
+ connLine.setAttribute('y2', 5);
159
+ this._rect(g, protocolKey, -4.5);
160
+ return g;
161
+ }
162
+
163
+ _use(gTop, protocolKey) {
164
+ const g = document.createElementNS(InnerConst.SVG_NS, 'g');
165
+ g.appendChild(this._rectBackground());
166
+ this._rect(g, protocolKey, -4.5);
167
+ this._rect(g, protocolKey, 1.5);
168
+ return g;
169
+ }
170
+
171
+ _store(protocolKey) {
172
+ const g = document.createElementNS(InnerConst.SVG_NS, 'g');
173
+ g.appendChild(this._rectBackground());
174
+ this._rect(g, protocolKey, -3.5);
175
+ this._rect(g, protocolKey, 0.5);
176
+ return g;
177
+ }
178
+
179
+ _del(protocolKey) {
180
+ const g = document.createElementNS(InnerConst.SVG_NS, 'g');
181
+ g.appendChild(this._rectBackground());
182
+ const connLine = g.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
183
+ connLine.classList.add('stack_seq_dia_conn');
184
+ connLine.setAttribute('x1', FilterSize.eventWidthHalf - 3.5);
185
+ connLine.setAttribute('x2', FilterSize.eventWidthHalf + 3.5);
186
+ connLine.setAttribute('y1', 5);
187
+ connLine.setAttribute('y2', 5);
188
+ this._cross(g, protocolKey, -4.5);
189
+ this._cross(g, protocolKey, 1.5);
190
+ return g;
191
+ }
192
+ }
193
+
194
+
195
+ module.exports = TemplateSeqDiaStack;
@@ -0,0 +1,118 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../logic/const';
5
+ import ComponentSeqDiaEventRow from './components/component-seq-dia-event-row';
6
+ import DataSeqDiaState from '../data/data-seq-dia-state';
7
+ import FilterSize from '../logic/filter-size';
8
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
9
+ import ActorResultConst from 'z-abs-funclayer-engine-cs/clientServer/execution/actor-result-const';
10
+ import ActorStateConst from 'z-abs-funclayer-engine-cs/clientServer/execution/actor-state-const';
11
+
12
+
13
+ class TemplateDiaState {
14
+ constructor() {
15
+ this.filter = null;
16
+ this.middleTemplates = null;
17
+ }
18
+
19
+ exit() {
20
+ DataSeqDiaState.exit();
21
+ this.filter = null;
22
+ this.middleTemplates = null;
23
+ }
24
+
25
+ init(filter, pooledBuffers) {
26
+ this.filter = filter;
27
+ DataSeqDiaState.init(pooledBuffers);
28
+
29
+ const stateLineTemplate = document.createElementNS(InnerConst.SVG_NS, 'line');
30
+ stateLineTemplate.setAttribute('x1', FilterSize.eventWidthHalf + 1.5);
31
+ stateLineTemplate.setAttribute('x2', FilterSize.eventWidthHalf + 8);
32
+ stateLineTemplate.setAttribute('y1', Const.STATE_EVENT_HALF_HEIGHT);
33
+ stateLineTemplate.setAttribute('y2', Const.STATE_EVENT_HALF_HEIGHT);
34
+
35
+ const circleSmallTemplate = document.createElementNS(InnerConst.SVG_NS, 'circle');
36
+ circleSmallTemplate.setAttribute('cx', FilterSize.eventWidthHalf);
37
+ circleSmallTemplate.setAttribute('cy', Const.STATE_EVENT_HALF_HEIGHT);
38
+ circleSmallTemplate.setAttribute('r', 3);
39
+
40
+ const stateTextTemplate = document.createElementNS(InnerConst.SVG_NS, 'text');
41
+ stateTextTemplate.classList.add('seq_dia_state_event_state_text');
42
+ stateTextTemplate.setAttribute('x', FilterSize.eventWidthHalf - 9);
43
+ stateTextTemplate.setAttribute('y', Const.STATE_EVENT_HALF_HEIGHT + 3.5);
44
+ stateTextTemplate.appendChild(document.createTextNode('[state]'));
45
+
46
+ const resultRectNodeTemplate = document.createElementNS(InnerConst.SVG_NS, 'rect');
47
+ resultRectNodeTemplate.setAttribute('x', FilterSize.eventWidthHalf + 8);
48
+ resultRectNodeTemplate.setAttribute('width', 40);
49
+ resultRectNodeTemplate.setAttribute('rx', 2);
50
+ resultRectNodeTemplate.setAttribute('y', 0.5);
51
+ resultRectNodeTemplate.setAttribute('height', 9);
52
+ resultRectNodeTemplate.setAttribute('ry', 2);
53
+
54
+ const resultTextNodeTemplate = document.createElementNS(InnerConst.SVG_NS, 'text');
55
+ resultTextNodeTemplate.classList.add('seq_dia_state_event_result_text');
56
+ resultTextNodeTemplate.setAttribute('x', FilterSize.eventWidthHalf + 9);
57
+ resultTextNodeTemplate.setAttribute('y', Const.STATE_EVENT_HALF_HEIGHT + 3.5);
58
+ resultTextNodeTemplate.appendChild(document.createTextNode('[result]'));
59
+
60
+ this.middleTemplates = new Array(ActorResultConst.results.length);
61
+ ActorResultConst.results.forEach((result, index) => {
62
+ const fragment = document.createDocumentFragment();
63
+ const stateLine = fragment.appendChild(stateLineTemplate.cloneNode(true));
64
+ stateLine.classList.add(ActorResultConst.resultClasses[index]);
65
+ const circleSmall = fragment.appendChild(circleSmallTemplate.cloneNode(true));
66
+ circleSmall.classList.add(ActorResultConst.resultClasses[index]);
67
+ const stateText = fragment.appendChild(stateTextTemplate.cloneNode(true));
68
+ const resultRectNode = fragment.appendChild(resultRectNodeTemplate.cloneNode(true));
69
+ resultRectNode.classList.add(ActorResultConst.resultClasses[index]);
70
+ resultRectNode.setAttribute('width', ActorResultConst.templateWidths[index]);
71
+ const resultTextNode = fragment.appendChild(resultTextNodeTemplate.cloneNode(true));
72
+ resultTextNode.classList.add(ActorResultConst.resultClasses[index]);
73
+ resultTextNode.firstChild.nodeValue = result;
74
+ this.middleTemplates[index] = fragment;
75
+ });
76
+ }
77
+
78
+ calculateHeight(bufferData) {
79
+ const data = DataSeqDiaState.restoreHeightData(bufferData);
80
+ if(ActorResultConst.TYPE_NOT_EXECUTED === data.stateType) {
81
+ return this.filter.getNotExecutedStateEvents(data.phaseId) ? Const.STATE_EVENT_HEIGHT : 0
82
+ }
83
+ else {
84
+ return this.filter.getStateExecutedEvents(data.phaseId) ? Const.STATE_EVENT_HEIGHT : 0
85
+ }
86
+ }
87
+
88
+ store(msg, sharedTemplateData) {
89
+ const stateType = ActorResultConst.TYPES[msg.stateResultIndex];
90
+ return DataSeqDiaState.store(msg, sharedTemplateData, stateType);
91
+ }
92
+
93
+ restore(bufferData) {
94
+ return DataSeqDiaState.restore(bufferData);
95
+ }
96
+
97
+ createElement(data) {
98
+ const node = ComponentSeqDiaEventRow.cloneRow('seq_dia_state');
99
+ const divNodeLeft = node.firstChild.appendChild(ComponentSeqDiaEventRow.cloneColumnLeft(data.phaseId));
100
+ for(let i = 0; i < data.nbrOfActors; ++i) {
101
+ const divNodeMiddle = node.firstChild.appendChild(ComponentSeqDiaEventRow.cloneColumnMiddle(i, data.phaseId));
102
+ if(data.actorIndex === i) {
103
+ const svg = divNodeMiddle.appendChild(ComponentSeqDiaEventRow.cloneSvg(Const.STATE_EVENT_HEIGHT, Const.RENDER_POSITION_NORMAL));
104
+ svg.appendChild(this.middleTemplates[data.stateResultIndex].cloneNode(true));
105
+ svg.childNodes[2].firstChild.nodeValue = ActorStateConst.actorStateNames[data.stateIndex];
106
+ }
107
+ }
108
+ const divNodeRight = node.firstChild.appendChild(ComponentSeqDiaEventRow.cloneColumnRight(data.nbrOfActors, data.phaseId));
109
+ return node;
110
+ }
111
+
112
+ setElementData(data, node) {}
113
+
114
+ removeElement(data, node) {}
115
+ }
116
+
117
+
118
+ module.exports = TemplateDiaState;
@@ -0,0 +1,73 @@
1
+
2
+ 'use strict';
3
+
4
+ import DataSeqDiaTestCaseEnd from '../data/data-seq-dia-test-case-end';
5
+ import Const from '../logic/const';
6
+ import ActorResultConst from 'z-abs-funclayer-engine-cs/clientServer/execution/actor-result-const';
7
+
8
+
9
+ class TemplateSeqDiaTestCaseEnd {
10
+ constructor() {
11
+ this.filter = null;
12
+ this.testCaseEndNodes = [];
13
+ }
14
+
15
+ exit() {
16
+ DataSeqDiaTestCaseEnd.exit();
17
+ this.filter = null;
18
+ this.testCaseEndNodes = [];
19
+ }
20
+
21
+ init(filter, pooledBuffers) {
22
+ this.filter = filter;
23
+ DataSeqDiaTestCaseEnd.init(pooledBuffers);
24
+
25
+ const testCaseEndNode = document.createElement('div');
26
+ testCaseEndNode.classList.add('seq_dia_test_case_end');
27
+ const textPNode = testCaseEndNode.appendChild(document.createElement('p'));
28
+ textPNode.classList.add('seq_dia_test_case_end_text');
29
+ textPNode.appendChild(document.createTextNode('TEST CASE END'));
30
+
31
+ const resultNode = testCaseEndNode.appendChild(document.createElement('div'));
32
+ resultNode.classList.add('seq_dia_test_case_end_result');
33
+ const resultPNode = resultNode.appendChild(document.createElement('p'));
34
+ resultPNode.classList.add('seq_dia_test_case_end_result');
35
+ resultPNode.appendChild(document.createTextNode('[result]'));
36
+
37
+ const durationPNode = testCaseEndNode.appendChild(document.createElement('p'));
38
+ durationPNode.classList.add('seq_dia_test_case_end_duration');
39
+ durationPNode.appendChild(document.createTextNode('[TC DATE]'));
40
+
41
+ ActorResultConst.results.forEach((result, index) => {
42
+ const node = testCaseEndNode.cloneNode(true);
43
+ node.childNodes[1].firstChild.firstChild.nodeValue = result;
44
+ node.childNodes[1].classList.add(ActorResultConst.classes[index]);
45
+ this.testCaseEndNodes.push(node);
46
+ });
47
+ }
48
+
49
+ calculateHeight(bufferData) {
50
+ return 20;
51
+ }
52
+
53
+ store(msg, sharedTemplateData) {
54
+ return DataSeqDiaTestCaseEnd.store(msg, sharedTemplateData);
55
+ }
56
+
57
+ restore(bufferData) {
58
+ return DataSeqDiaTestCaseEnd.restore(bufferData);
59
+ }
60
+
61
+ createElement(data) {
62
+ return this.testCaseEndNodes[data.resultId].cloneNode(true);
63
+ }
64
+
65
+ setElementData(data, node) {
66
+ node.childNodes[2].firstChild.nodeValue = data.duration;
67
+ }
68
+
69
+ removeElement(data, node) {}
70
+ }
71
+
72
+
73
+ module.exports = TemplateSeqDiaTestCaseEnd;
@@ -0,0 +1,70 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../logic/const';
5
+ import ComponentSeqDiaEventRow from './components/component-seq-dia-event-row';
6
+ import DataSeqDiaTestCaseHeader from '../data/data-seq-dia-test-case-header';
7
+ import FilterSize from '../logic/filter-size';
8
+
9
+
10
+ class TemplateSeqDiaTestCaseHeader {
11
+ constructor() {
12
+ this.filter = null;
13
+ this.divTemplate = null;
14
+ }
15
+
16
+ exit() {
17
+ DataSeqDiaTestCaseHeader.exit();
18
+ this.filter = null;
19
+ this.divTemplate = null;
20
+ }
21
+
22
+ init(filter, pooledBuffers) {
23
+ this.filter = filter;
24
+ DataSeqDiaTestCaseHeader.init(pooledBuffers);
25
+
26
+ this.divTemplate = document.createDocumentFragment();
27
+ const divText = this.divTemplate.appendChild(document.createElement('div'));
28
+ divText.classList.add('test_case_header_text');
29
+ divText.appendChild(document.createTextNode('[actor]'));
30
+
31
+ const divActorLine = this.divTemplate.appendChild(document.createElement('div'));
32
+ divActorLine.classList.add('test_case_header_line');
33
+ }
34
+
35
+ calculateHeight(bufferData) {
36
+ return Const.HEADER_Y_HEIGHT;
37
+ }
38
+
39
+ store(msg, sharedTemplateData) {
40
+ return DataSeqDiaTestCaseHeader.store(msg, sharedTemplateData);
41
+ }
42
+
43
+ restore(bufferData) {
44
+ return DataSeqDiaTestCaseHeader.restore(bufferData);
45
+ }
46
+
47
+ createElement(data) {
48
+ const nbrOfActors = data.nbrOfActors;
49
+ const actorNames = data.actorNames;
50
+ const node = ComponentSeqDiaEventRow.cloneRowHeader('seq_dia_test_case_header');
51
+ node.firstChild.appendChild(ComponentSeqDiaEventRow.cloneColumnHeaderLeft());
52
+ for(let i = 0; i < nbrOfActors; ++i) {
53
+ const innerDivNode = node.firstChild.appendChild(ComponentSeqDiaEventRow.cloneColumnHeader(i));
54
+ innerDivNode.appendChild(this.divTemplate.cloneNode(true));
55
+ }
56
+ node.firstChild.appendChild(ComponentSeqDiaEventRow.cloneColumnHeaderRight(nbrOfActors));
57
+ return node;
58
+ }
59
+
60
+ setElementData(data, node) {
61
+ for(let i = 0; i < data.nbrOfActors; ++i) {
62
+ node.firstChild.childNodes[i + 1].firstChild.firstChild.nodeValue = data.actorNames[i];
63
+ }
64
+ }
65
+
66
+ removeElement(data, node) {}
67
+ }
68
+
69
+
70
+ module.exports = TemplateSeqDiaTestCaseHeader;