@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.
Files changed (75) 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-VisualizationLog-client.bld +36 -0
  7. package/project/client/_build/Client-CompLayer-VisualizationLog-client-jsx.bld +10 -0
  8. package/project/client/_build/Client-CompLayer-VisualizationLog-client.bld +10 -0
  9. package/project/client/_build/Client-css-CompLayer-VisualizationLog-bundle.bld +9 -0
  10. package/project/client/_build/z-abs-complayer-visualizationlog-client.prj +36 -0
  11. package/project/client/css/log-column.css +124 -0
  12. package/project/client/css/log-heading.css +54 -0
  13. package/project/client/css/log-inner.css +56 -0
  14. package/project/client/css/log-row.css +19 -0
  15. package/project/client/css/log-scroll.css +0 -0
  16. package/project/client/css/log-start-end.css +38 -0
  17. package/project/client/css/log-type-browser-err.css +21 -0
  18. package/project/client/css/log-type-browser-log.css +21 -0
  19. package/project/client/css/log-type-debug.css +21 -0
  20. package/project/client/css/log-type-engine.css +21 -0
  21. package/project/client/css/log-type-error.css +21 -0
  22. package/project/client/css/log-type-gui.css +21 -0
  23. package/project/client/css/log-type-ip.css +21 -0
  24. package/project/client/css/log-type-test-data.css +21 -0
  25. package/project/client/css/log-type-verify-failure.css +21 -0
  26. package/project/client/css/log-type-verify-succes.css +21 -0
  27. package/project/client/css/log-type-warning.css +21 -0
  28. package/project/client/css/log.css +118 -0
  29. package/project/client/data/data-log-end-result.js +32 -0
  30. package/project/client/data/data-log-end.js +52 -0
  31. package/project/client/data/data-log-log-result.js +76 -0
  32. package/project/client/data/data-log-log.js +157 -0
  33. package/project/client/data/data-log-start-result.js +36 -0
  34. package/project/client/data/data-log-start.js +56 -0
  35. package/project/client/logic/cache.js +185 -0
  36. package/project/client/logic/const.js +26 -0
  37. package/project/client/logic/log-filter.js +122 -0
  38. package/project/client/react-component/log.jsx +296 -0
  39. package/project/client/templates/template-icons/svgs/template-arrow-head.js +35 -0
  40. package/project/client/templates/template-icons/svgs/template-arrow-line.js +34 -0
  41. package/project/client/templates/template-icons/svgs/template-background.js +28 -0
  42. package/project/client/templates/template-icons/svgs/template-circle-big.js +27 -0
  43. package/project/client/templates/template-icons/svgs/template-circle-small.js +27 -0
  44. package/project/client/templates/template-icons/svgs/template-envelope.js +46 -0
  45. package/project/client/templates/template-icons/svgs/template-hex-big.js +38 -0
  46. package/project/client/templates/template-icons/svgs/template-hex-small.js +38 -0
  47. package/project/client/templates/template-icons/svgs/template-square-big.js +28 -0
  48. package/project/client/templates/template-icons/svgs/template-square-small.js +28 -0
  49. package/project/client/templates/template-icons/svgs/template-triangle-big.js +31 -0
  50. package/project/client/templates/template-icons/svgs/template-triangle-small.js +31 -0
  51. package/project/client/templates/template-icons/svgs/template-x-big.js +39 -0
  52. package/project/client/templates/template-icons/svgs/template-x-small.js +39 -0
  53. package/project/client/templates/template-icons/template-icon-accepted.js +32 -0
  54. package/project/client/templates/template-icons/template-icon-accepting.js +32 -0
  55. package/project/client/templates/template-icons/template-icon-attached.js +68 -0
  56. package/project/client/templates/template-icons/template-icon-closed.js +44 -0
  57. package/project/client/templates/template-icons/template-icon-closing.js +44 -0
  58. package/project/client/templates/template-icons/template-icon-connected.js +32 -0
  59. package/project/client/templates/template-icons/template-icon-connecting.js +32 -0
  60. package/project/client/templates/template-icons/template-icon-detached.js +61 -0
  61. package/project/client/templates/template-icons/template-icon-not-connected.js +37 -0
  62. package/project/client/templates/template-icons/template-icon-not-started.js +67 -0
  63. package/project/client/templates/template-icons/template-icon-receive.js +37 -0
  64. package/project/client/templates/template-icons/template-icon-send.js +37 -0
  65. package/project/client/templates/template-icons/template-icon-stack.js +110 -0
  66. package/project/client/templates/template-icons/template-icon-started.js +32 -0
  67. package/project/client/templates/template-icons/template-icon-starting.js +32 -0
  68. package/project/client/templates/template-icons/template-icon-stopped.js +34 -0
  69. package/project/client/templates/template-icons/template-icon-stopping.js +34 -0
  70. package/project/client/templates/template-icons/template-icon-unknown.js +26 -0
  71. package/project/client/templates/template-icons/template-icon.js +76 -0
  72. package/project/client/templates/template-log-end.js +68 -0
  73. package/project/client/templates/template-log-log.js +652 -0
  74. package/project/client/templates/template-log-start.js +67 -0
  75. package/project/z-abs-complayer-visualizationlog-client.tree +78 -0
@@ -0,0 +1,32 @@
1
+
2
+ 'use strict';
3
+
4
+ import TemplateBackground from './svgs/template-background';
5
+ import TemplateCircleSmall from './svgs/template-circle-small';
6
+
7
+
8
+ class TemplateIconConnecting {
9
+ static template = [];
10
+
11
+ static exit() {
12
+ TemplateIconConnecting.template = [];
13
+ }
14
+
15
+ static init(stackStyles) {
16
+ stackStyles.forEach((stackStyle, key) => {
17
+ const template = TemplateBackground.create();
18
+ const connectingTemplate = template.appendChild(TemplateCircleSmall.create());
19
+ connectingTemplate.setAttribute('fill', stackStyle.protocolColor);
20
+ TemplateIconConnecting.template[stackStyle.index] = template;
21
+ });
22
+ return TemplateIconConnecting.create;
23
+ }
24
+
25
+ static create(protocolIndex, type) {
26
+ const template = TemplateIconConnecting.template[protocolIndex].cloneNode(true);
27
+ return template;
28
+ }
29
+ }
30
+
31
+
32
+ module.exports = TemplateIconConnecting;
@@ -0,0 +1,61 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateBackground from './svgs/template-background';
6
+ import TemplateTriangleBig from './svgs/template-triangle-big';
7
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
8
+
9
+
10
+ class TemplateIconDetached {
11
+ static template = [];
12
+
13
+ static exit() {
14
+ TemplateIconDetached.template = [];
15
+ }
16
+
17
+ static init(stackStyles) {
18
+ stackStyles.forEach((stackStyle, key) => {
19
+ const template = TemplateBackground.create();
20
+ const startedTemplate = template.appendChild(TemplateTriangleBig.create());
21
+ startedTemplate.setAttribute('fill', stackStyle.protocolColor);
22
+ const hex = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'polygon'));
23
+ const arrowWidth = 4;
24
+ const cx = Const.ICON_X - 8;
25
+ const cy = Const.ICON_Y;
26
+ const r = arrowWidth;
27
+ const sqrt3 = Math.sqrt(3);
28
+ const hexPoints = [
29
+ `${cx + r},${cy}`,
30
+ `${cx + (r >> 1)},${cy + (sqrt3 * r >> 1)}`,
31
+ `${cx - (r >> 1)},${cy + (sqrt3 * r >> 1)}`,
32
+ `${cx - r},${cy}`,
33
+ `${cx - (r >> 1)},${cy - (sqrt3 * r >> 1)}`,
34
+ `${cx + (r >> 1)},${cy - (sqrt3 * r >> 1)}`
35
+ ].join(' ');
36
+ hex.setAttribute('points', hexPoints);
37
+ hex.setAttribute('stroke', 'black');
38
+ hex.setAttribute('stroke-width', 1);
39
+ hex.setAttribute('fill', stackStyle.protocolColor);
40
+
41
+ const lineHorizontal = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
42
+ lineHorizontal.setAttribute('y1', Const.ICON_Y);
43
+ lineHorizontal.setAttribute('y2', Const.ICON_Y);
44
+ lineHorizontal.setAttribute('x1', Const.ICON_X - 6.5);
45
+ lineHorizontal.setAttribute('x2', Const.ICON_X - 9.5);
46
+ lineHorizontal.setAttribute('stroke', 'black');
47
+ lineHorizontal.setAttribute('stroke-width', 0.5);
48
+
49
+ TemplateIconDetached.template[stackStyle.index] = template;
50
+ });
51
+ return TemplateIconDetached.create;
52
+ }
53
+
54
+ static create(protocolIndex, type) {
55
+ const template = TemplateIconDetached.template[protocolIndex].cloneNode(true);
56
+ return template;
57
+ }
58
+ }
59
+
60
+
61
+ module.exports = TemplateIconDetached;
@@ -0,0 +1,37 @@
1
+
2
+ 'use strict';
3
+
4
+ import TemplateBackground from './svgs/template-background';
5
+ import TemplateCircleBig from './svgs/template-circle-big';
6
+ import TemplateCirclesmall from './svgs/template-circle-small';
7
+
8
+
9
+ class TemplateIconNotConnected {
10
+ static template = [];
11
+
12
+ static exit() {
13
+ TemplateIconNotConnected.template = [];
14
+ }
15
+
16
+ static init(stackStyles) {
17
+ stackStyles.forEach((stackStyle, key) => {
18
+ const template = TemplateBackground.create();
19
+ const connectedTemplate = template.appendChild(TemplateCircleBig.create());
20
+ connectedTemplate.setAttribute('fill', 'red');
21
+ connectedTemplate.setAttribute('stroke-width', 0.5);
22
+ const smallCircle = template.appendChild(TemplateCirclesmall.create());
23
+ smallCircle.setAttribute('fill', stackStyle.protocolColor);
24
+ smallCircle.setAttribute('stroke', 'white');
25
+ TemplateIconNotConnected.template[stackStyle.index] = template;
26
+ });
27
+ return TemplateIconNotConnected.create;
28
+ }
29
+
30
+ static create(protocolIndex, type) {
31
+ const template = TemplateIconNotConnected.template[protocolIndex].cloneNode(true);
32
+ return template;
33
+ }
34
+ }
35
+
36
+
37
+ module.exports = TemplateIconNotConnected;
@@ -0,0 +1,67 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateBackground from './svgs/template-background';
6
+ import TemplateTriangleBig from './svgs/template-triangle-big';
7
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
8
+
9
+
10
+ class TemplateIconNotStarted {
11
+ static template = [];
12
+
13
+ static exit() {
14
+ TemplateIconNotStarted.template = [];
15
+ }
16
+
17
+ static init(stackStyles) {
18
+ stackStyles.forEach((stackStyle, key) => {
19
+ const template = TemplateBackground.create();
20
+
21
+ const length = 4.5;
22
+ const closingLine1 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
23
+ closingLine1.setAttribute('y1', Const.ICON_Y - length);
24
+ closingLine1.setAttribute('y2', Const.ICON_Y + length);
25
+ closingLine1.setAttribute('x1', Const.ICON_X - length - 3);
26
+ closingLine1.setAttribute('x2', Const.ICON_X + length);
27
+ closingLine1.setAttribute('stroke', 'black');
28
+ closingLine1.setAttribute('stroke-width', 1.5);
29
+
30
+ const closingLine2 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
31
+ closingLine2.setAttribute('y1', Const.ICON_Y + length);
32
+ closingLine2.setAttribute('y2', Const.ICON_Y - length);
33
+ closingLine2.setAttribute('x1', Const.ICON_X - length - 3);
34
+ closingLine2.setAttribute('x2', Const.ICON_X + length);
35
+ closingLine2.setAttribute('stroke', 'black');
36
+ closingLine2.setAttribute('stroke-width', 1.5);
37
+
38
+ const startedTemplate = template.appendChild(TemplateTriangleBig.create());
39
+ startedTemplate.setAttribute('fill', 'red');
40
+ startedTemplate.setAttribute('stroke-width', 0.5);
41
+
42
+ const startArrowInner = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'polygon'));
43
+ startArrowInner.classList.add('seq_dia_arrow');
44
+ const arrowInnerWidth = 2.6;
45
+ const startArrowInnerX1 = Const.ICON_X - arrowInnerWidth - 0.5;
46
+ const startArrowInnerX2 = Const.ICON_X + arrowInnerWidth - 1.1;
47
+ const startArrowInnerY1 = Const.ICON_Y - arrowInnerWidth + 0.2;
48
+ const startArrowInnerY2 = Const.ICON_Y;
49
+ const startArrowInnerY3 = Const.ICON_Y + arrowInnerWidth - 0.2;
50
+ startArrowInner.setAttribute('points', `${startArrowInnerX1},${startArrowInnerY1} ${startArrowInnerX1},${startArrowInnerY3} ${startArrowInnerX2},${startArrowInnerY2}`);
51
+ startArrowInner.setAttribute('stroke', stackStyle.protocolColor);
52
+ startArrowInner.setAttribute('stroke-width', 0.5);
53
+ startArrowInner.setAttribute('fill', stackStyle.protocolColor);
54
+
55
+ TemplateIconNotStarted.template[stackStyle.index] = template;
56
+ });
57
+ return TemplateIconNotStarted.create;
58
+ }
59
+
60
+ static create(protocolIndex, type) {
61
+ const template = TemplateIconNotStarted.template[protocolIndex].cloneNode(true);
62
+ return template;
63
+ }
64
+ }
65
+
66
+
67
+ module.exports = TemplateIconNotStarted;
@@ -0,0 +1,37 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateArrowHead from './svgs/template-arrow-head';
6
+ import TemplateArrowLine from './svgs/template-arrow-line';
7
+ import TemplateBackground from './svgs/template-background';
8
+ import TemplateEnvelope from './svgs/template-envelope';
9
+
10
+
11
+ class TemplateIconReceive {
12
+ static template = [];
13
+
14
+ static exit() {
15
+ TemplateIconReceive.template = [];
16
+ }
17
+
18
+ static init(stackStyles) {
19
+ stackStyles.forEach((stackStyle, key) => {
20
+ const template = TemplateBackground.create();
21
+ const arrowLine = template.appendChild(TemplateArrowLine.create(Const.RECEIVE));
22
+ arrowLine.setAttribute('stroke', stackStyle.protocolColor);
23
+ template.appendChild(TemplateArrowHead.create(Const.RECEIVE));
24
+ template.appendChild(TemplateEnvelope.create());
25
+ TemplateIconReceive.template[stackStyle.index] = template;
26
+ });
27
+ return TemplateIconReceive.create;
28
+ }
29
+
30
+ static create(protocolIndex, type) {
31
+ const template = TemplateIconReceive.template[protocolIndex].cloneNode(true);
32
+ return template;
33
+ }
34
+ }
35
+
36
+
37
+ module.exports = TemplateIconReceive;
@@ -0,0 +1,37 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateArrowHead from './svgs/template-arrow-head';
6
+ import TemplateArrowLine from './svgs/template-arrow-line';
7
+ import TemplateBackground from './svgs/template-background';
8
+ import TemplateEnvelope from './svgs/template-envelope';
9
+
10
+
11
+ class TemplateIconSend {
12
+ static template = [];
13
+
14
+ static exit() {
15
+ TemplateIconSend.template = [];
16
+ }
17
+
18
+ static init(stackStyles) {
19
+ stackStyles.forEach((stackStyle, key) => {
20
+ const template = TemplateBackground.create();
21
+ const arrowLine = template.appendChild(TemplateArrowLine.create(Const.SEND));
22
+ arrowLine.setAttribute('stroke', stackStyle.protocolColor);
23
+ template.appendChild(TemplateArrowHead.create(Const.SEND));
24
+ template.appendChild(TemplateEnvelope.create());
25
+ TemplateIconSend.template[stackStyle.index] = template;
26
+ });
27
+ return TemplateIconSend.create;
28
+ }
29
+
30
+ static create(protocolIndex, type) {
31
+ const template = TemplateIconSend.template[protocolIndex].cloneNode(true);
32
+ return template;
33
+ }
34
+ }
35
+
36
+
37
+ module.exports = TemplateIconSend;
@@ -0,0 +1,110 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateBackground from './svgs/template-background';
6
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
7
+ import LogDataStackType from 'z-abs-funclayer-engine-cs/clientServer/log/log-data-stack-type';
8
+
9
+
10
+ class TemplateIconStack {
11
+ static template = [[], [], [], [], []];
12
+
13
+ static exit() {
14
+ TemplateIconStack.template = [[], [], [], [], []];
15
+ }
16
+
17
+ static init(stackStyles) {
18
+ stackStyles.forEach((stackStyle, key) => {
19
+ const template = TemplateBackground.create();
20
+
21
+ const newStackTemplate = template.cloneNode(true);
22
+ TemplateIconStack._line(newStackTemplate);
23
+ TemplateIconStack._rect(newStackTemplate, key, -4.5);
24
+
25
+ const sharedStackTemplate = template.cloneNode(true);
26
+ TemplateIconStack._line(sharedStackTemplate);
27
+ TemplateIconStack._rect(sharedStackTemplate, key, -4.5);
28
+ TemplateIconStack._circles(sharedStackTemplate, key, 2.5);
29
+
30
+ const useStackTemplates = template.cloneNode(true);
31
+
32
+ const storeStackTemplated = template.cloneNode(true);
33
+
34
+ const delStackTemplated = template.cloneNode(true);
35
+ TemplateIconStack._line(delStackTemplated);
36
+ TemplateIconStack._cross(delStackTemplated, key, -4.5);
37
+ TemplateIconStack._cross(delStackTemplated, key, 4.5);
38
+
39
+ TemplateIconStack.template[LogDataStackType.NEW][stackStyle.index] = newStackTemplate;
40
+ TemplateIconStack.template[LogDataStackType.SHARED][stackStyle.index] = sharedStackTemplate;
41
+ TemplateIconStack.template[LogDataStackType.USE][stackStyle.index] = useStackTemplates;
42
+ TemplateIconStack.template[LogDataStackType.STORE][stackStyle.index] = storeStackTemplated;
43
+ TemplateIconStack.template[LogDataStackType.DEL][stackStyle.index] = delStackTemplated;
44
+ });
45
+ return TemplateIconStack.create;
46
+ }
47
+
48
+ static create(protocolIndex, type) {
49
+ const template = TemplateIconStack.template[type][protocolIndex].cloneNode(true);
50
+ return template;
51
+ }
52
+
53
+ static _line(template) {
54
+ const connLine = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
55
+ connLine.setAttribute('x1', Const.ICON_X - 3.5);
56
+ connLine.setAttribute('x2', Const.ICON_X + 3.5);
57
+ connLine.setAttribute('y1', Const.ICON_Y);
58
+ connLine.setAttribute('y2', Const.ICON_Y);
59
+ connLine.setAttribute('stroke', 'black');
60
+ connLine.setAttribute('stroke-width', 1);
61
+ }
62
+
63
+ static _rect(template, protocolKey, x) {
64
+ const connLeftRect = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'rect'));
65
+ connLeftRect.classList.add('stack_seq_dia_conn', `seq_dia_protocol_${protocolKey}_small`);
66
+ connLeftRect.setAttribute('x', Const.ICON_X + x);
67
+ connLeftRect.setAttribute('width', 4);
68
+ connLeftRect.setAttribute('y', Const.ICON_Y - 2);
69
+ connLeftRect.setAttribute('height', 4);
70
+ }
71
+
72
+ static _cross(template, protocolKey, x) {
73
+ const connLine1 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
74
+ connLine1.classList.add('stack_seq_dia_conn');
75
+ connLine1.setAttribute('x1', Const.ICON_X + x - 2.5);
76
+ connLine1.setAttribute('x2', Const.ICON_X + x + 2.5);
77
+ connLine1.setAttribute('y1', Const.ICON_Y - 2.5);
78
+ connLine1.setAttribute('y2', Const.ICON_Y + 2.5);
79
+
80
+ const connLine2 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
81
+ connLine2.classList.add('stack_seq_dia_conn');
82
+ connLine2.setAttribute('x1', Const.ICON_X + x - 2.5);
83
+ connLine2.setAttribute('x2', Const.ICON_X + x + 2.5);
84
+ connLine2.setAttribute('y1', Const.ICON_Y + 2.5);
85
+ connLine2.setAttribute('y2', Const.ICON_Y - 2.5);
86
+
87
+ const circle1 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'circle'));
88
+ circle1.classList.add('stack_seq_dia_conn', `seq_dia_protocol_${protocolKey}_small`);
89
+ circle1.setAttribute('cx', Const.ICON_X + x);
90
+ circle1.setAttribute('cy', Const.ICON_Y);
91
+ circle1.setAttribute('r', 1);
92
+ }
93
+
94
+ static _circles(template, protocolKey, x) {
95
+ const circle1 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'circle'));
96
+ circle1.classList.add(`seq_dia_protocol_${protocolKey}_small`);
97
+ circle1.setAttribute('cx', Const.ICON_X + x);
98
+ circle1.setAttribute('cy', Const.ICON_Y - 3);
99
+ circle1.setAttribute('r', 1.5);
100
+
101
+ const circle2 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'circle'));
102
+ circle2.classList.add(`seq_dia_protocol_${protocolKey}_small`);
103
+ circle2.setAttribute('cx', Const.ICON_X + x);
104
+ circle2.setAttribute('cy', Const.ICON_Y + 3);
105
+ circle2.setAttribute('r', 1.5);
106
+ }
107
+ }
108
+
109
+
110
+ module.exports = TemplateIconStack;
@@ -0,0 +1,32 @@
1
+
2
+ 'use strict';
3
+
4
+ import TemplateBackground from './svgs/template-background';
5
+ import TemplateTriangleBig from './svgs/template-triangle-big';
6
+
7
+
8
+ class TemplateIconStarted {
9
+ static template = [];
10
+
11
+ static exit() {
12
+ TemplateIconStarted.template = [];
13
+ }
14
+
15
+ static init(stackStyles) {
16
+ stackStyles.forEach((stackStyle, key) => {
17
+ const template = TemplateBackground.create();
18
+ const startedTemplate = template.appendChild(TemplateTriangleBig.create());
19
+ startedTemplate.setAttribute('fill', stackStyle.protocolColor);
20
+ TemplateIconStarted.template[stackStyle.index] = template;
21
+ });
22
+ return TemplateIconStarted.create;
23
+ }
24
+
25
+ static create(protocolIndex, type) {
26
+ const template = TemplateIconStarted.template[protocolIndex].cloneNode(true);
27
+ return template;
28
+ }
29
+ }
30
+
31
+
32
+ module.exports = TemplateIconStarted;
@@ -0,0 +1,32 @@
1
+
2
+ 'use strict';
3
+
4
+ import TemplateBackground from './svgs/template-background';
5
+ import TemplateTriangleSmall from './svgs/template-triangle-small';
6
+
7
+
8
+ class TemplateIconStarting {
9
+ static template = [];
10
+
11
+ static exit() {
12
+ TemplateIconStarting.template = [];
13
+ }
14
+
15
+ static init(stackStyles) {
16
+ stackStyles.forEach((stackStyle, key) => {
17
+ const template = TemplateBackground.create();
18
+ const startingTemplate = template.appendChild(TemplateTriangleSmall.create());
19
+ startingTemplate.setAttribute('fill', stackStyle.protocolColor);
20
+ TemplateIconStarting.template[stackStyle.index] = template;
21
+ });
22
+ return TemplateIconStarting.create;
23
+ }
24
+
25
+ static create(protocolIndex, type) {
26
+ const template = TemplateIconStarting.template[protocolIndex].cloneNode(true);
27
+ return template;
28
+ }
29
+ }
30
+
31
+
32
+ module.exports = TemplateIconStarting;
@@ -0,0 +1,34 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateBackground from './svgs/template-background';
6
+ import TemplateSquareBig from './svgs/template-square-big';
7
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
8
+
9
+
10
+ class TemplateIconStopped {
11
+ static template = [];
12
+
13
+ static exit() {
14
+ TemplateIconStopped.template = [];
15
+ }
16
+
17
+ static init(stackStyles) {
18
+ stackStyles.forEach((stackStyle, key) => {
19
+ const template = TemplateBackground.create();
20
+ const stoppedTemplate = template.appendChild(TemplateSquareBig.create());
21
+ stoppedTemplate.setAttribute('fill', stackStyle.protocolColor);
22
+ TemplateIconStopped.template[stackStyle.index] = template;
23
+ });
24
+ return TemplateIconStopped.create;
25
+ }
26
+
27
+ static create(protocolIndex, type) {
28
+ const template = TemplateIconStopped.template[protocolIndex].cloneNode(true);
29
+ return template;
30
+ }
31
+ }
32
+
33
+
34
+ module.exports = TemplateIconStopped;
@@ -0,0 +1,34 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateBackground from './svgs/template-background';
6
+ import TemplateSquareSmall from './svgs/template-square-small';
7
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
8
+
9
+
10
+ class TemplateIconStopping {
11
+ static template = [];
12
+
13
+ static exit() {
14
+ TemplateIconStopping.template = [];
15
+ }
16
+
17
+ static init(stackStyles) {
18
+ stackStyles.forEach((stackStyle, key) => {
19
+ const template = TemplateBackground.create();
20
+ const stoppingTemplate = template.appendChild(TemplateSquareSmall.create());
21
+ stoppingTemplate.setAttribute('fill', stackStyle.protocolColor);
22
+ TemplateIconStopping.template[stackStyle.index] = template;
23
+ });
24
+ return TemplateIconStopping.create;
25
+ }
26
+
27
+ static create(protocolIndex, type) {
28
+ const template = TemplateIconStopping.template[protocolIndex].cloneNode(true);
29
+ return template;
30
+ }
31
+ }
32
+
33
+
34
+ module.exports = TemplateIconStopping;
@@ -0,0 +1,26 @@
1
+
2
+ 'use strict';
3
+
4
+ import TemplateBackground from './svgs/template-background';
5
+
6
+
7
+ class TemplateIconUnknown {
8
+ static template = null;
9
+
10
+ static exit() {
11
+ TemplateIconUnknown.template = null;
12
+ }
13
+
14
+ static init(stackStyles) {
15
+ const template = TemplateBackground.create();
16
+ TemplateIconUnknown.template = template;
17
+ return TemplateIconUnknown.create;
18
+ }
19
+
20
+ static create(protocolIndex, type) {
21
+ return TemplateIconUnknown.template.cloneNode(true);
22
+ }
23
+ }
24
+
25
+
26
+ module.exports = TemplateIconUnknown;
@@ -0,0 +1,76 @@
1
+
2
+ 'use strict';
3
+
4
+ import TemplateIconAccepted from './template-icon-accepted';
5
+ import TemplateIconAccepting from './template-icon-accepting';
6
+ import TemplateIconAttached from './template-icon-attached';
7
+ import TemplateIconClosed from './template-icon-closed';
8
+ import TemplateIconClosing from './template-icon-closing';
9
+ import TemplateIconConnected from './template-icon-connected';
10
+ import TemplateIconConnecting from './template-icon-connecting';
11
+ import TemplateIconDetached from './template-icon-detached';
12
+ import TemplateIconNotConnected from './template-icon-not-connected';
13
+ import TemplateIconNotStarted from './template-icon-not-started';
14
+ import TemplateIconReceive from './template-icon-receive';
15
+ import TemplateIconStack from './template-icon-stack';
16
+ import TemplateIconStarting from './template-icon-starting';
17
+ import TemplateIconStarted from './template-icon-started';
18
+ import TemplateIconSend from './template-icon-send';
19
+ import TemplateIconStopping from './template-icon-stopping';
20
+ import TemplateIconStopped from './template-icon-stopped';
21
+ import TemplateIconUnknown from './template-icon-unknown';
22
+ import LogDataAction from 'z-abs-funclayer-engine-cs/clientServer/log/log-data-action';
23
+
24
+
25
+ class TemplateIcon {
26
+ static lookup = null;
27
+ static protocolGradient = null;
28
+
29
+ static exit() {
30
+ TemplateIcon.lookup = null;
31
+ }
32
+
33
+ static init(stackStyles) {
34
+ TemplateIcon.lookup = new Array(LogDataAction.length);
35
+ TemplateIcon.lookup[LogDataAction.STARTING] = TemplateIconStarting.init(stackStyles);
36
+ TemplateIcon.lookup[LogDataAction.STARTED] = TemplateIconStarted.init(stackStyles);
37
+ TemplateIcon.lookup[LogDataAction.ATTACHED] = TemplateIconAttached.init(stackStyles);
38
+ TemplateIcon.lookup[LogDataAction.STOPPING] = TemplateIconStopping.init(stackStyles);
39
+ TemplateIcon.lookup[LogDataAction.STOPPED] = TemplateIconStopped.init(stackStyles);
40
+ TemplateIcon.lookup[LogDataAction.DETACHED] = TemplateIconDetached.init(stackStyles);
41
+ TemplateIcon.lookup[LogDataAction.NOT_STARTED] = TemplateIconNotStarted.init(stackStyles);
42
+ TemplateIcon.lookup[LogDataAction.NOT_ATTACHED] = TemplateIconUnknown.init(stackStyles); // NOT_ATTACHED
43
+ TemplateIcon.lookup[LogDataAction.SEND] = TemplateIconSend.init(stackStyles);
44
+ TemplateIcon.lookup[LogDataAction.RECEIVE] = TemplateIconReceive.init(stackStyles);
45
+ TemplateIcon.lookup[LogDataAction.CONNECTING] = TemplateIconConnecting.init(stackStyles);
46
+ TemplateIcon.lookup[LogDataAction.CONNECTED] = TemplateIconConnected.init(stackStyles);
47
+ TemplateIcon.lookup[LogDataAction.DNS_FAILURE] = TemplateIconUnknown.init(stackStyles);// DNS_FAILURE
48
+ TemplateIcon.lookup[LogDataAction.NOT_CONNECTED] = TemplateIconNotConnected.init(stackStyles);// NOT_CONNECTED
49
+ TemplateIcon.lookup[LogDataAction.UPGRADING] = TemplateIconUnknown.init(stackStyles);// UPGRADING
50
+ TemplateIcon.lookup[LogDataAction.UPGRADED] = TemplateIconUnknown.init(stackStyles);// UPGRADED
51
+ TemplateIcon.lookup[LogDataAction.NOT_UPGRADED] = TemplateIconUnknown.init(stackStyles);// NOT_UPGRADED
52
+ TemplateIcon.lookup[LogDataAction.ACCEPTING] = TemplateIconAccepting.init(stackStyles);
53
+ TemplateIcon.lookup[LogDataAction.ACCEPTED] = TemplateIconAccepted.init(stackStyles);
54
+ TemplateIcon.lookup[LogDataAction.HALF_CLOSING] = TemplateIconAccepting.init(stackStyles);// HALF_CLOSING
55
+ TemplateIcon.lookup[LogDataAction.HALF_CLOSED] = TemplateIconUnknown.init(stackStyles);// HALF_CLOSED
56
+ TemplateIcon.lookup[LogDataAction.CLOSED] = TemplateIconClosed.init(stackStyles);
57
+ TemplateIcon.lookup[LogDataAction.CLOSING] = TemplateIconClosing.init(stackStyles);
58
+ TemplateIcon.lookup[LogDataAction.GUI] = TemplateIconUnknown.init(stackStyles);// GUI
59
+ TemplateIcon.lookup[LogDataAction.STACK] = TemplateIconStack.init(stackStyles);
60
+ }
61
+
62
+ static create(data) {
63
+ const protocolIndex = data.extraData.protocolIndex;
64
+ const type = data.extraData.type;
65
+ const factory = TemplateIcon.lookup[data.dataId];
66
+ if(protocolIndex && factory) {
67
+ return factory(protocolIndex, type);
68
+ }
69
+ else {
70
+ return TemplateIconConnected.create(0, 0);
71
+ }
72
+ }
73
+ }
74
+
75
+
76
+ module.exports = TemplateIcon;