Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ebed3095f | ||
|
|
5b2ef4ab31 | ||
|
|
629e6b6cff | ||
|
|
2f7b1bcb4b | ||
|
|
ca39237d97 | ||
|
|
947a74d07e | ||
|
|
ed903a2f99 | ||
|
|
a2ae601e2e | ||
|
|
9a9ea8e338 | ||
|
|
4f1c4f179f | ||
|
|
2fc59ea595 | ||
|
|
8037ccf3c0 | ||
|
|
79d7ebad58 | ||
|
|
cd5e89bedc | ||
|
|
c4f5db9bb1 | ||
|
|
e89d345e85 | ||
|
|
f9de125bfd | ||
|
|
5001fbc474 | ||
|
|
cc75c7d630 | ||
|
|
93dee2d28c | ||
|
|
65d535ef2d | ||
|
|
b782cf277d | ||
|
|
0ebf4a7dbd | ||
|
|
316dd6da66 | ||
|
|
1104a07808 | ||
|
|
b68454a392 | ||
|
|
8adee4168c | ||
|
|
99cf71878e | ||
|
|
a0bc67c316 | ||
|
|
ebbe3d78de | ||
|
|
97d9753621 | ||
|
|
11ee1f585e | ||
|
|
4a29bcc10d | ||
|
|
c14ce4f5f5 | ||
|
|
baa71182ee | ||
|
|
3ebcbfea24 | ||
|
|
8e34abfadc | ||
|
|
ea4d9eba29 | ||
|
|
5ee9a9858a | ||
|
|
ed2c96e039 | ||
|
|
4cb5d8b3bd | ||
|
|
73c5ffb99b | ||
|
|
2f8f1451c6 | ||
|
|
d2bdea6f0c | ||
|
|
0d157bb98e | ||
|
|
275af0cf0c | ||
|
|
59306ebb87 | ||
|
|
38c1d5c0fc | ||
|
|
8ce9b412f1 | ||
|
|
e9289a6b95 | ||
|
|
c37469f75b | ||
|
|
877432808b | ||
|
|
060770a409 | ||
|
|
272c3cf04b | ||
|
|
ada83e4c2c | ||
|
|
2547cab9fb | ||
|
|
e172dbf4f4 | ||
|
|
d03c4f00d2 | ||
|
|
2bd15150e3 | ||
|
|
2023fdd03a | ||
|
|
7b91d9d22c | ||
|
|
83141a61b3 | ||
|
|
52706719e6 | ||
|
|
e1c7ae5394 | ||
|
|
136c0a4deb | ||
|
|
14f386cf86 | ||
|
|
7c13b51b7f | ||
|
|
c7e457e357 | ||
|
|
92c5a7e7e9 | ||
|
|
0a9b1c9d48 | ||
|
|
c47033adc5 | ||
|
|
35c54b0186 | ||
|
|
0fe01e6371 | ||
|
|
6f40d41db9 | ||
|
|
85a218936f | ||
|
|
df79a409eb | ||
|
|
b07f3b8566 | ||
|
|
97ff78d359 | ||
|
|
21d59c2395 | ||
|
|
21c95922e0 | ||
|
|
97ceb9f785 | ||
|
|
5a390a3c03 | ||
|
|
ea78609f7c | ||
|
|
7e7849fd24 | ||
|
|
c3715d7126 | ||
|
|
71946bc5d5 | ||
|
|
15ede2f4f4 | ||
|
|
14ccd705c4 | ||
|
|
0fefcabb17 | ||
|
|
516535b8e4 | ||
|
|
b6a92cda57 | ||
|
|
68be25a50f | ||
|
|
4e7d6f5203 | ||
|
|
20f90952a3 | ||
|
|
0fc0ec71dc | ||
|
|
e6b4445fef | ||
|
|
dfc045f2cf | ||
|
|
fcc5a8b39f | ||
|
|
884ff3cbbb | ||
|
|
c007d3f7ae | ||
|
|
a8fde78b50 | ||
|
|
51ad32b29a | ||
|
|
f04d9c5c5f | ||
|
|
c42ee1e41e | ||
|
|
1a48645f68 | ||
|
|
06edcd1e91 | ||
|
|
bad1f28883 | ||
|
|
36e78ad75c | ||
|
|
1706874099 | ||
|
|
c0c03753a8 | ||
|
|
53948cddb5 | ||
|
|
41d42e07a0 | ||
|
|
ae6030e9a3 | ||
|
|
c03dba4e02 | ||
|
|
2a81376c19 | ||
|
|
ac182bfe3d | ||
|
|
d07b836ffa | ||
|
|
7467ce8ee9 | ||
|
|
889a796798 | ||
|
|
daeb3920ac | ||
|
|
35df064af9 | ||
|
|
f3ede68928 | ||
|
|
58d88ac334 | ||
|
|
9f6663b1df | ||
|
|
614c093a54 | ||
|
|
1658b3ed82 | ||
|
|
0561d75b9b | ||
|
|
0887739d86 | ||
|
|
62f43dcf16 | ||
|
|
b1684361ff | ||
|
|
15727ff6d1 | ||
|
|
7baee2c619 | ||
|
|
e79d26d0c1 | ||
|
|
8031da44be | ||
|
|
fb08ae6349 | ||
|
|
cc2c16ba09 | ||
|
|
2c98c8538d | ||
|
|
664af207a1 | ||
|
|
bc7a931bd0 | ||
|
|
bb2055dcf4 | ||
|
|
ebcd818219 | ||
|
|
26cc412855 | ||
|
|
e969cb0047 | ||
|
|
91075420d7 | ||
|
|
3fe8a46a3b | ||
|
|
774eb62910 | ||
|
|
b92545269c | ||
|
|
10c98dcfe8 | ||
|
|
2ff3559baf | ||
|
|
42877ad754 | ||
|
|
8ac96096ac | ||
|
|
f10f7166cf | ||
|
|
04daf0ff69 | ||
|
|
3442442017 | ||
|
|
32dd328112 | ||
|
|
61ec81e092 | ||
|
|
55f49ff6ca | ||
|
|
fa4ff8efa7 | ||
|
|
9f1b16e89b | ||
|
|
32b3763f9b | ||
|
|
0ca0d721c2 | ||
|
|
9da15a66bf | ||
|
|
a1ee5a2478 | ||
|
|
0d4dfbd20d | ||
|
|
23ca4b5c1e | ||
|
|
777f5e8309 | ||
|
|
cee247e02e | ||
|
|
5c08e5b0e9 | ||
|
|
b81f39edc3 | ||
|
|
1669e7950e | ||
|
|
13abba6213 | ||
|
|
e8694bdf98 | ||
|
|
e4ae20e1be | ||
|
|
c1729dbdac | ||
|
|
a17a0ed878 | ||
|
|
928e611b85 | ||
|
|
b97db15d8f | ||
|
|
7632d6dc3f | ||
|
|
9bdea96052 | ||
|
|
2a49b03d70 | ||
|
|
ae479e3853 | ||
|
|
9cac93eb63 | ||
|
|
c3a8040402 | ||
|
|
c54a50b834 | ||
|
|
05fd1554c5 | ||
|
|
9826831dfc | ||
|
|
345482b55e | ||
|
|
6d01f36594 | ||
|
|
ad66b76795 | ||
|
|
d8ac177e84 | ||
|
|
4b39bc5ce2 | ||
|
|
07212fa93d | ||
|
|
4b81270699 | ||
|
|
f56005ba70 | ||
|
|
cd77780f28 | ||
|
|
a7529a6dbc | ||
|
|
91debac36f | ||
|
|
ed98835903 | ||
|
|
523c95ee21 | ||
|
|
4e4d6b8fc4 | ||
|
|
438cff2028 | ||
|
|
85d8991bc2 | ||
|
|
f640cdcc12 | ||
|
|
1b4a0d0ab1 | ||
|
|
5cfac99354 | ||
|
|
6870bbb18f | ||
|
|
21112e05e9 | ||
|
|
f3cff4a4de | ||
|
|
f0fd1f4ee7 | ||
|
|
70c72ad7dc | ||
|
|
a47de0fd1e | ||
|
|
75700877a6 | ||
|
|
434db6a138 | ||
|
|
15d06e05df | ||
|
|
f619641f26 | ||
|
|
d2f4eb9cb6 | ||
|
|
ef8e78d9bc | ||
|
|
b2c6a23f55 | ||
|
|
e0a8ae40de | ||
|
|
dde97cadc8 | ||
|
|
63ae6492eb | ||
|
|
9162840a25 | ||
|
|
6d40654523 | ||
|
|
970407eab9 | ||
|
|
0535413490 | ||
|
|
e62f2c97d6 | ||
|
|
8ee75a9e6d | ||
|
|
a0950d418c | ||
|
|
8d8caca23c | ||
|
|
a5b2d4d32e | ||
|
|
8f363f2e95 | ||
|
|
ddb19c73c6 | ||
|
|
8fc3a26b78 | ||
|
|
b20c664f81 | ||
|
|
5e80ab63b0 | ||
|
|
e3d4aa7006 | ||
|
|
1913cafacc | ||
|
|
f8e7dc75ad | ||
|
|
4c346aabd9 | ||
|
|
173b4d78f3 | ||
|
|
a8d06a46e1 | ||
|
|
efcdb11fc1 | ||
|
|
9d113e9376 | ||
|
|
1593871b51 | ||
|
|
c4ba03dd47 | ||
|
|
826f4d3fd8 | ||
|
|
883e566cd2 | ||
|
|
0ccd5114f0 | ||
|
|
777f6607ea | ||
|
|
00c20fc389 | ||
|
|
47e87b269e | ||
|
|
6aae1d54bc | ||
|
|
42fe051bad | ||
|
|
6a92615bb1 | ||
|
|
b15abee11b | ||
|
|
664db48914 | ||
|
|
7fa0ac699d | ||
|
|
501449f98a | ||
|
|
82e0999a9f | ||
|
|
998e3765d2 | ||
|
|
fc5f1b11e8 | ||
|
|
8abcf97f1e | ||
|
|
5d1ba51a71 | ||
|
|
4ced38eee1 | ||
|
|
d93c433fdf | ||
|
|
e9af465e1c | ||
|
|
bec0bb880a | ||
|
|
e4ca90db04 | ||
|
|
833db3c168 | ||
|
|
bff781f1db | ||
|
|
39573ec1ce | ||
|
|
9a645294ee | ||
|
|
97d397c2b1 | ||
|
|
5ea6b82d8d | ||
|
|
9ddee3a3f8 | ||
|
|
e66a88def3 | ||
|
|
cc965c66fb | ||
|
|
5560354ffd | ||
|
|
f27ab683d6 | ||
|
|
9ef2138f0c | ||
|
|
a887d5b997 | ||
|
|
134c3c8119 | ||
|
|
300a5b4f64 | ||
|
|
61fdd5307b | ||
|
|
c2ac8cc7d4 | ||
|
|
cc95a1f36e | ||
|
|
945d566e43 | ||
|
|
186746041b | ||
|
|
936b6f4f34 | ||
|
|
d6e65c36c3 | ||
|
|
559053b169 | ||
|
|
25796587fb | ||
|
|
3da75053aa | ||
|
|
2f11880055 | ||
|
|
f4ac7fad14 | ||
|
|
5835257d1e | ||
|
|
11597254ea | ||
|
|
bf17265ac0 | ||
|
|
f2bb032e17 | ||
|
|
59435e4bc3 | ||
|
|
b7c1510a5d | ||
|
|
5ba393a09b | ||
|
|
408911bddd | ||
|
|
87d4e6f516 | ||
|
|
42a2b935cb | ||
|
|
1db4bda0bc | ||
|
|
00c05e673e | ||
|
|
f55d9d8a7a | ||
|
|
fe264a58ce | ||
|
|
4aa51ec00d | ||
|
|
ac25f962de | ||
|
|
f95a7e1450 | ||
|
|
dc0ad2647f | ||
|
|
524df27792 | ||
|
|
957e62c5f9 | ||
|
|
e9c2e773f4 | ||
|
|
15fd95bb19 | ||
|
|
9ff3b57f4e | ||
|
|
8790d7ea37 | ||
|
|
c7881176c1 | ||
|
|
516365b2af | ||
|
|
b5d7b2d2f8 | ||
|
|
a8e4b71efa | ||
|
|
5e5207f508 | ||
|
|
8597332738 | ||
|
|
927f3016c9 | ||
|
|
1edb6c878e | ||
|
|
ac29807afd | ||
|
|
6c2a8abf93 | ||
|
|
f827356158 | ||
|
|
3b569e509a | ||
|
|
7cdb4ffaf3 | ||
|
|
f7496db953 | ||
|
|
fc5b97caf8 | ||
|
|
b8873cd4f3 | ||
|
|
505722047c | ||
|
|
06a336742c | ||
|
|
041d2f0b38 | ||
|
|
be09981ef5 | ||
|
|
7c851c26d7 | ||
|
|
b89d904d72 | ||
|
|
0b464f3628 | ||
|
|
33035603ad | ||
|
|
7924ac4162 | ||
|
|
4b963a8dc3 | ||
|
|
f5704eea8a | ||
|
|
5bf5aa5600 | ||
|
|
523490d7e5 | ||
|
|
ae1ed6e3ff | ||
|
|
4425d456d6 | ||
|
|
eac46b3393 | ||
|
|
c35e556cf9 | ||
|
|
83e5f8f3bc | ||
|
|
7459dfd074 | ||
|
|
a492ebf4e1 | ||
|
|
8db9598060 | ||
|
|
ced2bba300 | ||
|
|
d7a5953f7f | ||
|
|
8b7c3b2bc8 | ||
|
|
67d2f4b443 | ||
|
|
57c4f80eb0 | ||
|
|
9badedfbdb | ||
|
|
eb68e0181a | ||
|
|
a2480f2d21 | ||
|
|
328a82914f | ||
|
|
9a4d6ccf38 | ||
|
|
d6c739b1c5 | ||
|
|
0ee6fd05ba | ||
|
|
edb2f91006 | ||
|
|
99cb765424 | ||
|
|
1088eeaf43 | ||
|
|
ad97c8a9f1 | ||
|
|
1bf1960cde | ||
|
|
c8fbd3bcdc | ||
|
|
727be74343 | ||
|
|
2a373a243f | ||
|
|
594262930d | ||
|
|
ea52a6e0a6 | ||
|
|
64bb598d0e | ||
|
|
2ceedd593c | ||
|
|
ce336a3f8d | ||
|
|
2bd4127135 | ||
|
|
325163e5fa | ||
|
|
cf2d083905 | ||
|
|
edc3f86ad8 | ||
|
|
eea1faef81 | ||
|
|
dcaffe7aee | ||
|
|
ed273f5750 | ||
|
|
b298a69c5f | ||
|
|
d4c9d647d8 | ||
|
|
18a0a47136 | ||
|
|
65f9165b58 | ||
|
|
525822b3d3 | ||
|
|
15891ff890 | ||
|
|
488261dbd4 | ||
|
|
c2fcf04369 | ||
|
|
8a70df1ffa | ||
|
|
a4239311bb | ||
|
|
850bcf8d7f | ||
|
|
60b46413c7 | ||
|
|
c8fab584f0 | ||
|
|
64a35b2798 | ||
|
|
dda0883461 | ||
|
|
82e36eee7a | ||
|
|
87514fed5f | ||
|
|
f25d7d754d | ||
|
|
392322a432 | ||
|
|
79a03df2fb | ||
|
|
3612143d68 | ||
|
|
9d04974902 | ||
|
|
0443fd2ea2 | ||
|
|
5c3bfb1182 | ||
|
|
99ce5971dc | ||
|
|
82fc956181 | ||
|
|
440321ee21 | ||
|
|
0df88066cc | ||
|
|
0e73d7c7f4 | ||
|
|
b1f0658cc5 | ||
|
|
587f97e3b5 | ||
|
|
5ae366665b | ||
|
|
2ad273a8bb | ||
|
|
fa7f16360e | ||
|
|
e38b6bc952 | ||
|
|
e3f8d25328 | ||
|
|
f9ac2761d2 | ||
|
|
553669f460 | ||
|
|
63eb662290 | ||
|
|
533cae9c2e | ||
|
|
3d23408823 | ||
|
|
e1836ec8b4 | ||
|
|
d4f5200d3c | ||
|
|
0ee33ae86f | ||
|
|
6d22b0d6b7 | ||
|
|
be9e77f685 | ||
|
|
78693c3be9 | ||
|
|
a64163a332 | ||
|
|
fff993929f | ||
|
|
20a63bb614 | ||
|
|
71d0d1b9a5 | ||
|
|
2571590dfb | ||
|
|
5d84c6af81 | ||
|
|
f0dc0e1046 | ||
|
|
5370d814fb | ||
|
|
218282a2a0 | ||
|
|
b04916fdbf | ||
|
|
ec01ed4345 | ||
|
|
8d2295d74f | ||
|
|
eda995e011 | ||
|
|
010b5e2597 | ||
|
|
12c27519b7 | ||
|
|
ac0b03fd5f | ||
|
|
3e4814add9 | ||
|
|
1090e64fa3 | ||
|
|
7dfe5c2397 | ||
|
|
b5dcf93c1f | ||
|
|
e5a11328ee | ||
|
|
751cd0acfb | ||
|
|
a520501258 | ||
|
|
d750a4be81 | ||
|
|
7c1bd26491 | ||
|
|
7931dab53e | ||
|
|
94e5e301c4 | ||
|
|
dc6e1bdb1c | ||
|
|
ee29bbcb11 | ||
|
|
d22287dd0e | ||
|
|
3821164970 | ||
|
|
29e89ef824 | ||
|
|
41f7aa7a20 | ||
|
|
06385eb3bf | ||
|
|
caa339d786 | ||
|
|
a29ca106b1 | ||
|
|
dd3b682af3 | ||
|
|
44bfdd4a8f | ||
|
|
79f0438079 | ||
|
|
e043fd613d | ||
|
|
cf40373829 | ||
|
|
183e848937 | ||
|
|
6675fb7d47 | ||
|
|
b6c2554f86 | ||
|
|
42b2166824 | ||
|
|
976b15d484 | ||
|
|
1f19b961db | ||
|
|
bf6bb3559d | ||
|
|
6fc2f223ad | ||
|
|
29e9ba2b1c | ||
|
|
e5f83eeccb | ||
|
|
b49237b25f | ||
|
|
8757d26487 | ||
|
|
760c8d9196 | ||
|
|
e914250f5d | ||
|
|
2949307bb3 | ||
|
|
a995068978 | ||
|
|
71de99b11b | ||
|
|
a0dc92a115 | ||
|
|
447830f4a2 | ||
|
|
5d2f74c8de | ||
|
|
d2f815d256 | ||
|
|
b1f5d42a25 | ||
|
|
b40417943a | ||
|
|
a88c860989 | ||
|
|
4d6352e089 | ||
|
|
9379d2b8c2 | ||
|
|
4b1ed89dde | ||
|
|
5e60605b58 | ||
|
|
f68ddda386 | ||
|
|
45a57d9f27 | ||
|
|
05101d8d8e | ||
|
|
c1ea907ba7 | ||
|
|
734dcfd45b | ||
|
|
862e9995cc | ||
|
|
44033decc6 | ||
|
|
40566f6059 | ||
|
|
2e977822b1 | ||
|
|
e351fe271f | ||
|
|
e6893d1db5 | ||
|
|
ee8403e39b | ||
|
|
888c1ae3e6 | ||
|
|
2584d6aeb0 | ||
|
|
959e75b256 | ||
|
|
f990734a87 | ||
|
|
2ec676defb | ||
|
|
d2811cc422 | ||
|
|
61dbbf4e53 | ||
|
|
fea83fbf87 | ||
|
|
5218b27402 | ||
|
|
2eb6f2c9c2 | ||
|
|
90e7e4c32e | ||
|
|
9eebd3e9dd | ||
|
|
a7f31eb918 | ||
|
|
84af4d9ebf | ||
|
|
8e5745bf0e | ||
|
|
dbd32e208f | ||
|
|
73e426ddad | ||
|
|
0b1eeafb36 | ||
|
|
4e73c75b8b | ||
|
|
e9418127ee | ||
|
|
6d9dddcb84 | ||
|
|
38bf0759c2 | ||
|
|
884de45ae7 | ||
|
|
bd9dd06f89 | ||
|
|
a12b89dab3 | ||
|
|
f7f5a5859c | ||
|
|
29601079c8 | ||
|
|
9d24120b9b | ||
|
|
bf854b4419 | ||
|
|
341334939f | ||
|
|
e30addb819 | ||
|
|
ecb9f0013f | ||
|
|
3530f125d3 | ||
|
|
d641a7e3b4 | ||
|
|
7388ebc629 | ||
|
|
82e54dc8f5 | ||
|
|
354a8b1126 | ||
|
|
2683476fe4 | ||
|
|
fcdc0c75b3 | ||
|
|
a7287c5261 | ||
|
|
a752730d9d | ||
|
|
a93925e520 | ||
|
|
ec582c45bc | ||
|
|
e59eb365bb | ||
|
|
2662571357 | ||
|
|
3e98e21b43 | ||
|
|
a4671b2ceb | ||
|
|
6b392e8a54 | ||
|
|
edf824b77d | ||
|
|
c7e5e48282 | ||
|
|
87765207c0 | ||
|
|
e32f5244f0 | ||
|
|
243fa7a870 | ||
|
|
05cd46bb01 | ||
|
|
0a8fcc2a03 | ||
|
|
782cdb6046 | ||
|
|
a687e50d5b | ||
|
|
12730be0d4 | ||
|
|
ed7a19eed3 | ||
|
|
3b4d9853aa | ||
|
|
ef07234b26 | ||
|
|
dbb03c4aee | ||
|
|
f9a9d02308 | ||
|
|
7e0a6c7197 | ||
|
|
55ff37c296 | ||
|
|
f77aa3d1c5 | ||
|
|
2b92426d9c | ||
|
|
2a6515b2af | ||
|
|
0609479caf | ||
|
|
9b1a54999a | ||
|
|
fe64297e55 | ||
|
|
ea7e27ad6f | ||
|
|
3d0db423ed | ||
|
|
5276fb8728 | ||
|
|
7280704a33 | ||
|
|
fd1fec92ac | ||
|
|
ee92708d40 | ||
|
|
335e32613a | ||
|
|
2018cbdc6f | ||
|
|
7852c26286 | ||
|
|
15712a67e1 | ||
|
|
be44746f79 | ||
|
|
cbfbb6e5f6 | ||
|
|
938852779b | ||
|
|
7db4fbf424 | ||
|
|
e06416ba82 | ||
|
|
aae8229048 | ||
|
|
b04812762d | ||
|
|
f3a146d25f | ||
|
|
986172f616 | ||
|
|
e4f11d5341 | ||
|
|
db348b3f51 | ||
|
|
2f4aa33cfe | ||
|
|
e7a44b7760 | ||
|
|
091a8a3c6d | ||
|
|
8d79c9255d | ||
|
|
061e513601 | ||
|
|
9b9dc4d645 | ||
|
|
c5a83c2889 | ||
|
|
726c012b2f | ||
|
|
6f67aa8382 | ||
|
|
274d8e24fa | ||
|
|
481b8fb2d8 | ||
|
|
f58dcd7e33 | ||
|
|
cdd5cebfc5 | ||
|
|
6968489d8b | ||
|
|
4125d54016 | ||
|
|
663a847351 | ||
|
|
9c1baaf306 | ||
|
|
7b3aa8da85 | ||
|
|
c18e1a776d | ||
|
|
652610bb5d | ||
|
|
73134a4f45 | ||
|
|
1758d8704c | ||
|
|
d76c79b9ab | ||
|
|
303c8a9920 | ||
|
|
bdf54265ce | ||
|
|
c24381f820 | ||
|
|
176a2a8d08 | ||
|
|
47acdceaad | ||
|
|
a9cf324199 | ||
|
|
f3a7460985 | ||
|
|
44332a13de | ||
|
|
c01c9bbca6 | ||
|
|
b81ac5fcf7 | ||
|
|
6af7fe09eb | ||
|
|
020e01237a | ||
|
|
e9ea832281 | ||
|
|
6f8d223142 | ||
|
|
591053ef40 | ||
|
|
7f0bb521d4 | ||
|
|
cff738248b | ||
|
|
4e92ff1740 | ||
|
|
65549d136c | ||
|
|
511adfd6d8 | ||
|
|
03a6e458cb | ||
|
|
bac140cf92 | ||
|
|
4623ef28a3 | ||
|
|
979b95dab9 | ||
|
|
373f0307d8 | ||
|
|
8e17897597 | ||
|
|
f5d6154be4 | ||
|
|
4e0ac054ec | ||
|
|
c1951921c0 | ||
|
|
501b447ca1 | ||
|
|
0d7db51cf8 | ||
|
|
ecc7b7d7b6 | ||
|
|
debd68e950 | ||
|
|
748ffca1e4 | ||
|
|
474a9238ec | ||
|
|
0ff2809f0d | ||
|
|
585bb001ba | ||
|
|
66e3e205ef | ||
|
|
178b33545f | ||
|
|
433a779d95 | ||
|
|
a517b99294 | ||
|
|
1fcb7095dd |
No files matched your search
@@ -5,11 +5,14 @@ debug.log
|
||||
|
||||
*.db
|
||||
|
||||
.git*
|
||||
.vscode
|
||||
README.md
|
||||
LICENSE
|
||||
CONTRIBUITING.md
|
||||
CONTRIBUTING.md
|
||||
CODE_OF_CONDUCT.md
|
||||
./**/.vscode
|
||||
Dockerfile
|
||||
.git*
|
||||
.docker*
|
||||
**/.vscode
|
||||
**/Dockerfile*
|
||||
**/docker-compose.yml
|
||||
**/node_modules
|
||||
**/.env*
|
||||
@@ -1,6 +1,9 @@
|
||||
Data-Storage
|
||||
Log-Files
|
||||
My-Workspaces
|
||||
My-Social-Trading-Data
|
||||
My-Network-Nodes-Data
|
||||
My-Secrets
|
||||
debug.log
|
||||
.DS_Store
|
||||
*.db
|
||||
@@ -12,4 +15,5 @@ Projects/Foundations/Icons/Thumbs.db
|
||||
*.exe
|
||||
node_modules
|
||||
launch.json
|
||||
package-lock.json
|
||||
.idea
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "C:\\Superalgos\\Platform"
|
||||
},
|
||||
{
|
||||
"path": "C:\\Superalgos\\Projects"
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "C:\\Superalgos\\TaskServer"
|
||||
},
|
||||
{
|
||||
"path": "C:\\Superalgos\\Projects"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"search.maintainFileSearchCache": true
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,16 @@
|
||||
"**/Documentation": true,
|
||||
"**/Log-Files": true,
|
||||
"**/node_modules": true,
|
||||
"**/Deprecated-Code": true
|
||||
"**/Deprecated-Code": true,
|
||||
"**/My-Social-Trading-Data": true,
|
||||
},
|
||||
"search.exclude": {
|
||||
"**/Data-Storage": true,
|
||||
"**/Documentation": true,
|
||||
"**/Log-Files": true,
|
||||
"**/node_modules": true,
|
||||
"**/Deprecated-Code": true
|
||||
"**/Deprecated-Code": true,
|
||||
"**/My-Social-Trading-Data": true
|
||||
},
|
||||
"search.maintainFileSearchCache": true
|
||||
}
|
||||
@@ -8,33 +8,36 @@ exports.newDesktopApp = function newDesktopApp() {
|
||||
|
||||
async function run() {
|
||||
/*
|
||||
let socialGraphService = NT.projects.network.modules.socialGraph.newSocialGraph()
|
||||
await socialGraphService.initialize()
|
||||
Heree we will store our running objects:
|
||||
*/
|
||||
DK.running = {}
|
||||
|
||||
/*
|
||||
This is the Web Sockets client that interacts with the Superalgos Network.
|
||||
*/
|
||||
//DK.webSocketsClient = SA.projects.network.modules.webSocketsClient.newNetworkModulesWebSocketsClient()
|
||||
//await DK.webSocketsClient.initialize()
|
||||
|
||||
/* These are the Network Interfaces by which the UI interacts with the Desktop App.*/
|
||||
//let WEB_SOCKETS_INTERFACE = require('./webSocketsInterface.js')
|
||||
let HTTP_INTERFACE = require('./httpInterface.js')
|
||||
DK.running.socialGraph = DK.projects.socialTrading.modules.socialGraph.newSocialTradingModulesSocialGraph()
|
||||
await DK.running.socialGraph.initialize()
|
||||
|
||||
/*
|
||||
WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface()
|
||||
WEB_SOCKETS_INTERFACE.initialize()
|
||||
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
|
||||
This is the Web Sockets client that interacts with the Superalgos Network.
|
||||
*/
|
||||
DK.running.webSocketsClient = SA.projects.network.modules.webSocketsClient.newNetworkModulesWebSocketsClient()
|
||||
await DK.running.webSocketsClient.initialize()
|
||||
console.log('Desktop Client Connected to Network Node via Web Sockets ................... Connected to port ' + global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT)
|
||||
|
||||
HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface()
|
||||
HTTP_INTERFACE.initialize()
|
||||
console.log('Http Interface .............................................. Listening at port ' + global.env.DESKTOP_HTTP_INTERFACE_PORT)
|
||||
/* These are the Network Interfaces by which the UI interacts with the Desktop App.*/
|
||||
|
||||
DK.running.webSocketsInterface = DK.projects.socialTrading.modules.webSocketsInterface.newDesktopModulesWebSocketsInterface()
|
||||
DK.running.webSocketsInterface.initialize()
|
||||
console.log('Desktop Client Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
|
||||
|
||||
|
||||
DK.running.httpInterface = DK.projects.socialTrading.modules.httpInterface.newDesktopModulesHttpInterface()
|
||||
DK.running.httpInterface.initialize()
|
||||
console.log('Desktop Client Http Interface .............................................. Listening at port ' + global.env.DESKTOP_HTTP_INTERFACE_PORT)
|
||||
|
||||
return
|
||||
|
||||
|
||||
let queryMessage
|
||||
let query
|
||||
/*
|
||||
@@ -42,7 +45,7 @@ exports.newDesktopApp = function newDesktopApp() {
|
||||
*/
|
||||
queryMessage = {
|
||||
queryType: SA.projects.socialTrading.globals.queryTypes.USER_PROFILES,
|
||||
emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID,
|
||||
emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId,
|
||||
initialIndex: 'Last',
|
||||
amountRequested: 10,
|
||||
direction: 'Past'
|
||||
@@ -71,7 +74,7 @@ exports.newDesktopApp = function newDesktopApp() {
|
||||
let eventMessage = {
|
||||
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
|
||||
eventType: SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE,
|
||||
emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID,
|
||||
emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId,
|
||||
targetUserProfileId: profile.userProfileId
|
||||
}
|
||||
|
||||
@@ -96,8 +99,8 @@ exports.newDesktopApp = function newDesktopApp() {
|
||||
*/
|
||||
queryMessage = {
|
||||
queryType: SA.projects.socialTrading.globals.queryTypes.USER_PROFILE_STATS,
|
||||
emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID,
|
||||
targetUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID
|
||||
emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId,
|
||||
targetUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId
|
||||
}
|
||||
|
||||
query = {
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
let postLoader
|
||||
|
||||
function newAppLoader() {
|
||||
const MODULE_NAME = 'App Loader'
|
||||
const INFO_LOG = false
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
|
||||
|
||||
let thisObject = {
|
||||
loadModules: loadModules
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
async function loadModules() {
|
||||
try {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> Entering function.') }
|
||||
|
||||
let plotters
|
||||
let modulesArray = []
|
||||
|
||||
plotters = defaultPlotters()
|
||||
|
||||
modulesArray = modulesArray.concat([
|
||||
|
||||
'Globals.js',
|
||||
'Workspace.js',
|
||||
|
||||
'Files/SingleFile.js',
|
||||
'Files/FileCloud.js',
|
||||
'Files/MarketFiles.js',
|
||||
'Files/DailyFiles.js',
|
||||
'Files/FileCursor.js',
|
||||
'Files/FileSequence.js',
|
||||
'Files/FileStorage.js',
|
||||
|
||||
'EventsServerClient.js',
|
||||
|
||||
'LegacyPlotter.js',
|
||||
'PlotterPanel.js',
|
||||
|
||||
'VideoRecorder.js',
|
||||
'ProductStorage.js',
|
||||
'Canvas.js',
|
||||
'EventHandler.js',
|
||||
'Frame.js',
|
||||
'Animation.js',
|
||||
'Container.js',
|
||||
'Utilities.js',
|
||||
'AppPostLoader.js'
|
||||
])
|
||||
|
||||
modulesArray = modulesArray.concat(plotters)
|
||||
|
||||
functionLibraries()
|
||||
|
||||
function functionLibraries() {
|
||||
let url = 'ListFunctionLibraries'
|
||||
httpRequest(undefined, url, onResponse)
|
||||
|
||||
function onResponse(err, fileList) {
|
||||
let urlArray = []
|
||||
let fileArray = JSON.parse(fileList)
|
||||
for (let i = 0; i < fileArray.length; i++) {
|
||||
let item = fileArray[i]
|
||||
|
||||
project = item[0]
|
||||
fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Function-Libraries' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
utilities()
|
||||
}
|
||||
}
|
||||
|
||||
function utilities() {
|
||||
let url = 'ListUtilitiesFiles'
|
||||
httpRequest(undefined, url, onResponse)
|
||||
|
||||
function onResponse(err, fileList) {
|
||||
let urlArray = []
|
||||
let fileArray = JSON.parse(fileList)
|
||||
for (let i = 0; i < fileArray.length; i++) {
|
||||
let item = fileArray[i]
|
||||
|
||||
project = item[0]
|
||||
fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Utilities' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
globals()
|
||||
}
|
||||
}
|
||||
|
||||
function globals() {
|
||||
let url = 'ListGlobalFiles'
|
||||
httpRequest(undefined, url, onResponse)
|
||||
|
||||
function onResponse(err, fileList) {
|
||||
let urlArray = []
|
||||
let fileArray = JSON.parse(fileList)
|
||||
for (let i = 0; i < fileArray.length; i++) {
|
||||
let item = fileArray[i]
|
||||
|
||||
project = item[0]
|
||||
fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Globals' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
spaces()
|
||||
}
|
||||
}
|
||||
|
||||
function spaces() {
|
||||
let url = 'ListSpaceFiles'
|
||||
httpRequest(undefined, url, onResponse)
|
||||
|
||||
function onResponse(err, fileList) {
|
||||
let urlArray = []
|
||||
let fileArray = JSON.parse(fileList)
|
||||
for (let i = 0; i < fileArray.length; i++) {
|
||||
let path = fileArray[i]
|
||||
urlArray.push('Projects' + '/' + path)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
downloadIncludedFiles()
|
||||
}
|
||||
}
|
||||
|
||||
function downloadIncludedFiles() {
|
||||
|
||||
let downloadedCounter = 0
|
||||
|
||||
for (let i = 0; i < modulesArray.length; i++) {
|
||||
let path = modulesArray[i]
|
||||
|
||||
REQUIREJS([path], onRequired)
|
||||
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> Module Requested.') }
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> path = ' + path) }
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> total requested = ' + (i + 1)) }
|
||||
|
||||
function onRequired(pModule) {
|
||||
try {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> Entering function.') }
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> Module Downloaded.') }
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> path = ' + path) }
|
||||
|
||||
downloadedCounter++
|
||||
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> downloadedCounter = ' + downloadedCounter) }
|
||||
|
||||
if (downloadedCounter === modulesArray.length) {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> Starting Advanced Algos Platform.') }
|
||||
setTimeout(() => {
|
||||
postLoader = newAppPostLoader()
|
||||
postLoader.start()
|
||||
}, 500)
|
||||
|
||||
}
|
||||
} catch (err) {
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] loadModules -> onRequired -> err = ' + err.stack) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] loadModules -> err = ' + err.stack) }
|
||||
}
|
||||
}
|
||||
|
||||
function defaultPlotters() {
|
||||
return [
|
||||
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/Candles.js',
|
||||
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/CandlePanel.js',
|
||||
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/Volumes.js',
|
||||
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/VolumePanel.js',
|
||||
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/BollingerBands.js',
|
||||
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/BollingerBandsPanel.js',
|
||||
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/PercentageBandwidth.js'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
/* Root objects*/
|
||||
let UI = {
|
||||
projects: {},
|
||||
schemas: { projectSchema: undefined },
|
||||
environment: undefined,
|
||||
running: {}
|
||||
}
|
||||
|
||||
let SA = { projects: {} }
|
||||
/*
|
||||
We will use this to load functions originally intended for Nodejs
|
||||
*/
|
||||
let exports = {}
|
||||
|
||||
@@ -0,0 +1,409 @@
|
||||
function newWebApp() {
|
||||
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
|
||||
async function initialize() {
|
||||
try {
|
||||
setupRootObject(UI, 'UI')
|
||||
setupRootObject(SA, 'SA')
|
||||
await UI.projects.socialTrading.modules.webSocketsClient.initialize()
|
||||
loadWUserProfileTimeline()
|
||||
loadWhoToFollow()
|
||||
setupEventHandlers()
|
||||
} catch (err) {
|
||||
console.log('[ERROR] initialize -> err.stack = ' + err.stack)
|
||||
}
|
||||
}
|
||||
|
||||
function setupRootObject(rootObject, rootObjectName) {
|
||||
/*
|
||||
Here we will setup the UI object, with all the
|
||||
projects and spaces.
|
||||
*/
|
||||
for (let i = 0; i < UI.schemas.projectSchema.length; i++) {
|
||||
let projectDefinition = UI.schemas.projectSchema[i]
|
||||
rootObject.projects[projectDefinition.propertyName] = {}
|
||||
let projectInstance = rootObject.projects[projectDefinition.propertyName]
|
||||
|
||||
projectInstance.utilities = {}
|
||||
projectInstance.globals = {}
|
||||
projectInstance.functionLibraries = {}
|
||||
projectInstance.modules = {}
|
||||
|
||||
if (projectDefinition[rootObjectName] === undefined) { continue }
|
||||
|
||||
/* Set up Globals of this Project */
|
||||
if (projectDefinition[rootObjectName].globals !== undefined) {
|
||||
for (let j = 0; j < projectDefinition[rootObjectName].globals.length; j++) {
|
||||
let globalDefinition = projectDefinition[rootObjectName].globals[j]
|
||||
|
||||
if (exports[globalDefinition.functionName] === undefined) {
|
||||
projectInstance.globals[globalDefinition.propertyName] = eval(globalDefinition.functionName + '()')
|
||||
} else {
|
||||
projectInstance.globals[globalDefinition.propertyName] = eval('exports.' + globalDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up Utilities of this Project */
|
||||
if (projectDefinition[rootObjectName].utilities !== undefined) {
|
||||
for (let j = 0; j < projectDefinition[rootObjectName].utilities.length; j++) {
|
||||
let utilityDefinition = projectDefinition[rootObjectName].utilities[j]
|
||||
|
||||
if (exports[utilityDefinition.functionName] === undefined) {
|
||||
projectInstance.utilities[utilityDefinition.propertyName] = eval(utilityDefinition.functionName + '()')
|
||||
} else {
|
||||
projectInstance.utilities[utilityDefinition.propertyName] = eval('exports.' + utilityDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up Function Libraries of this Project */
|
||||
if (projectDefinition[rootObjectName].functionLibraries !== undefined) {
|
||||
for (let j = 0; j < projectDefinition[rootObjectName].functionLibraries.length; j++) {
|
||||
let functionLibraryDefinition = projectDefinition[rootObjectName].functionLibraries[j]
|
||||
|
||||
if (exports[functionLibraryDefinition.functionName] === undefined) {
|
||||
projectInstance.functionLibraries[functionLibraryDefinition.propertyName] = eval(functionLibraryDefinition.functionName + '()')
|
||||
} else {
|
||||
projectInstance.functionLibraries[functionLibraryDefinition.propertyName] = eval('exports.' + functionLibraryDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up Modules of this Project */
|
||||
if (projectDefinition[rootObjectName].modules !== undefined) {
|
||||
for (let j = 0; j < projectDefinition[rootObjectName].modules.length; j++) {
|
||||
let functionLibraryDefinition = projectDefinition[rootObjectName].modules[j]
|
||||
|
||||
if (exports[functionLibraryDefinition.functionName] === undefined) {
|
||||
projectInstance.modules[functionLibraryDefinition.propertyName] = eval(functionLibraryDefinition.functionName + '()')
|
||||
} else {
|
||||
projectInstance.modules[functionLibraryDefinition.propertyName] = eval('exports.' + functionLibraryDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function loadWUserProfileTimeline() {
|
||||
let queryMessage = {
|
||||
queryType: SA.projects.socialTrading.globals.queryTypes.EVENTS,
|
||||
emitterUserProfileId: undefined,
|
||||
initialIndex: SA.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_LAST,
|
||||
amountRequested: 100,
|
||||
direction: SA.projects.socialTrading.globals.queryConstants.DIRECTION_PAST
|
||||
}
|
||||
|
||||
let query = {
|
||||
requestType: 'Query',
|
||||
queryMessage: JSON.stringify(queryMessage)
|
||||
}
|
||||
|
||||
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
|
||||
JSON.stringify(query)
|
||||
)
|
||||
.then(addToContentDiv)
|
||||
.catch(onError)
|
||||
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Query not executed. ' + errorMessage)
|
||||
console.log('[ERROR] query = ' + JSON.stringify(query))
|
||||
}
|
||||
|
||||
function addToContentDiv(events) {
|
||||
try {
|
||||
let contentDiv = document.getElementById('content-div')
|
||||
|
||||
/*
|
||||
Delete al current content.
|
||||
*/
|
||||
while (contentDiv.childNodes.length > 4) {
|
||||
let childToRemove = contentDiv.childNodes[contentDiv.childNodes.length - 1]
|
||||
contentDiv.removeChild(childToRemove)
|
||||
}
|
||||
/*
|
||||
Render the timeline.
|
||||
*/
|
||||
for (let i = 0; i < events.length; i++) {
|
||||
let event = events[i]
|
||||
|
||||
let postDiv = document.createElement("div")
|
||||
postDiv.setAttribute("class", "post-div")
|
||||
let textNode
|
||||
|
||||
switch (event.eventType) {
|
||||
case SA.projects.socialTrading.globals.eventTypes.NEW_USER_POST: {
|
||||
textNode = document.createTextNode(event.emitterUserProfile.userProfileHandle + " POSTED " + event.postText)
|
||||
break
|
||||
}
|
||||
case SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE: {
|
||||
textNode = document.createTextNode(event.emitterUserProfile.userProfileHandle + " FOLLOWED " + event.targetUserProfile.userProfileHandle)
|
||||
break
|
||||
}
|
||||
case SA.projects.socialTrading.globals.eventTypes.UNFOLLOW_USER_PROFILE: {
|
||||
textNode = document.createTextNode(event.emitterUserProfile.userProfileHandle + " UNFOLLOWED " + event.targetUserProfile.userProfileHandle)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
postDiv.appendChild(textNode)
|
||||
contentDiv.appendChild(postDiv)
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log('[ERROR] err.stack = ' + err.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function loadWhoToFollow() {
|
||||
let queryMessage = {
|
||||
queryType: SA.projects.socialTrading.globals.queryTypes.UNFOLLOWED_USER_PROFILES,
|
||||
emitterUserProfileId: undefined,
|
||||
initialIndex: SA.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_FIRST,
|
||||
amountRequested: 3,
|
||||
direction: SA.projects.socialTrading.globals.queryConstants.DIRECTION_UP
|
||||
}
|
||||
|
||||
let query = {
|
||||
requestType: 'Query',
|
||||
queryMessage: JSON.stringify(queryMessage)
|
||||
}
|
||||
|
||||
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
|
||||
JSON.stringify(query)
|
||||
)
|
||||
.then(addWhoToFollowTable)
|
||||
.catch(onError)
|
||||
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Query not executed. ' + errorMessage)
|
||||
console.log('[ERROR] query = ' + JSON.stringify(query))
|
||||
}
|
||||
|
||||
function addWhoToFollowTable(profiles) {
|
||||
|
||||
let contextCell = document.getElementById('who-to-follow-cell')
|
||||
let table = document.createElement("table")
|
||||
let tblBody = document.createElement("tbody")
|
||||
|
||||
for (let i = 0; i < profiles.length; i++) {
|
||||
let profile = profiles[i]
|
||||
let row = document.createElement("tr")
|
||||
|
||||
let cell = document.createElement("td")
|
||||
addProfileToFollowTable(cell, profile)
|
||||
row.appendChild(cell)
|
||||
|
||||
tblBody.appendChild(row)
|
||||
}
|
||||
|
||||
table.appendChild(tblBody)
|
||||
contextCell.appendChild(table)
|
||||
table.setAttribute("class", "who-to-follow-table")
|
||||
|
||||
function addProfileToFollowTable(htmlElement, profile) {
|
||||
let table = document.createElement("table")
|
||||
let tblBody = document.createElement("tbody")
|
||||
|
||||
let row = document.createElement("tr")
|
||||
|
||||
{
|
||||
let cell = document.createElement("td")
|
||||
let textNode = document.createTextNode('Profile Picture')
|
||||
cell.appendChild(textNode)
|
||||
row.appendChild(cell)
|
||||
}
|
||||
{
|
||||
let cell = document.createElement("td")
|
||||
let textNode = document.createTextNode(profile.userProfileHandle)
|
||||
cell.appendChild(textNode)
|
||||
row.appendChild(cell)
|
||||
}
|
||||
{
|
||||
let cell = document.createElement("td")
|
||||
let span = document.createElement("span")
|
||||
let button = document.createElement("button")
|
||||
let text = document.createTextNode('Follow')
|
||||
|
||||
span.setAttribute("id", "profile-to-follow-span-" + profile.userProfileId)
|
||||
button.setAttribute("id", "profile-to-follow-button-" + profile.userProfileId)
|
||||
button.name = 'Follow Profile'
|
||||
button.userProfileId = profile.userProfileId
|
||||
|
||||
span.setAttribute("class", "profile-to-follow-span")
|
||||
button.setAttribute("class", "profile-to-follow-button")
|
||||
|
||||
button.appendChild(text)
|
||||
span.appendChild(button)
|
||||
cell.appendChild(span)
|
||||
row.appendChild(cell)
|
||||
}
|
||||
|
||||
tblBody.appendChild(row)
|
||||
|
||||
table.appendChild(tblBody)
|
||||
htmlElement.appendChild(table)
|
||||
table.setAttribute("class", "profile-to-follow-table")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setupEventHandlers() {
|
||||
/*
|
||||
Add events to process button clicks , and mouseWheel.
|
||||
*/
|
||||
document.addEventListener("click", onClick)
|
||||
document.addEventListener('mousewheel', onMouseWheel, false)
|
||||
|
||||
async function onClick(event) {
|
||||
|
||||
if (event.target && event.target.nodeName === "BUTTON") {
|
||||
switch (event.target.name) {
|
||||
case 'New Post': {
|
||||
let textArea = document.getElementById("new-post-text-area")
|
||||
await sendNewPostEvent(
|
||||
textArea.value
|
||||
)
|
||||
.then(updateTextArea)
|
||||
.catch(onError)
|
||||
|
||||
function updateTextArea() {
|
||||
textArea.value = ""
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'Follow Profile': {
|
||||
await sendTargetUserProfileEvent(
|
||||
event.target.userProfileId,
|
||||
SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE
|
||||
)
|
||||
.then(updateButton)
|
||||
.catch(onError)
|
||||
|
||||
function updateButton() {
|
||||
let span = document.getElementById('profile-to-follow-span-' + event.target.userProfileId)
|
||||
let button = document.getElementById('profile-to-follow-button-' + event.target.userProfileId)
|
||||
span.setAttribute("class", "profile-to-unfollow-span")
|
||||
button.setAttribute("class", "profile-to-unfollow-button")
|
||||
button.name = 'Unfollow Profile'
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'Unfollow Profile': {
|
||||
await sendTargetUserProfileEvent(
|
||||
event.target.userProfileId,
|
||||
SA.projects.socialTrading.globals.eventTypes.UNFOLLOW_USER_PROFILE
|
||||
)
|
||||
.then(updateButton)
|
||||
.catch(onError)
|
||||
|
||||
function updateButton() {
|
||||
let span = document.getElementById('profile-to-follow-span-' + event.target.userProfileId)
|
||||
let button = document.getElementById('profile-to-follow-button-' + event.target.userProfileId)
|
||||
span.setAttribute("class", "profile-to-follow-span")
|
||||
button.setAttribute("class", "profile-to-follow-button")
|
||||
button.name = 'Follow Profile'
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Error Handling
|
||||
*/
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Click event failed. ' + errorMessage)
|
||||
}
|
||||
}
|
||||
|
||||
function onMouseWheel(event) {
|
||||
let scrollDiv = document.getElementById("scroll-div")
|
||||
scrollDiv.scrollTop = scrollDiv.scrollTop + event.deltaY
|
||||
}
|
||||
}
|
||||
|
||||
async function sendTargetUserProfileEvent(
|
||||
userProfileId,
|
||||
eventType
|
||||
) {
|
||||
|
||||
return new Promise((resolve, reject) => { asyncCall(resolve, reject) })
|
||||
|
||||
async function asyncCall(resolve, reject) {
|
||||
let eventMessage
|
||||
let event
|
||||
|
||||
eventMessage = {
|
||||
eventType: eventType,
|
||||
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
|
||||
targetUserProfileId: userProfileId,
|
||||
timestamp: (new Date()).valueOf()
|
||||
}
|
||||
|
||||
event = {
|
||||
requestType: 'Event',
|
||||
eventMessage: JSON.stringify(eventMessage)
|
||||
}
|
||||
|
||||
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
|
||||
JSON.stringify(event)
|
||||
)
|
||||
.then(resolve)
|
||||
.catch(onError)
|
||||
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Event not executed. ' + errorMessage)
|
||||
console.log('[ERROR] event = ' + JSON.stringify(event))
|
||||
reject(errorMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function sendNewPostEvent(
|
||||
postText
|
||||
) {
|
||||
|
||||
return new Promise((resolve, reject) => { asyncCall(resolve, reject) })
|
||||
|
||||
async function asyncCall(resolve, reject) {
|
||||
let eventMessage
|
||||
let event
|
||||
|
||||
eventMessage = {
|
||||
eventType: SA.projects.socialTrading.globals.eventTypes.NEW_USER_POST,
|
||||
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
|
||||
postText: postText,
|
||||
timestamp: (new Date()).valueOf()
|
||||
}
|
||||
|
||||
event = {
|
||||
requestType: 'Event',
|
||||
eventMessage: JSON.stringify(eventMessage)
|
||||
}
|
||||
|
||||
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
|
||||
JSON.stringify(event)
|
||||
)
|
||||
.then(resolve)
|
||||
.catch(onError)
|
||||
|
||||
function onError(errorMessage) {
|
||||
console.log('[ERROR] Event not executed. ' + errorMessage)
|
||||
console.log('[ERROR] event = ' + JSON.stringify(event))
|
||||
reject(errorMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
|
||||
function newWebAppLoader() {
|
||||
|
||||
let thisObject = {
|
||||
loadModules: loadModules
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
async function loadModules() {
|
||||
try {
|
||||
let modulesArray = [
|
||||
'WebDebugLog.js',
|
||||
'WebApp.js'
|
||||
]
|
||||
|
||||
for (let i = 0; i < UI.schemas.projectSchema.length; i++) {
|
||||
let project = UI.schemas.projectSchema[i]
|
||||
|
||||
if (project.UI !== undefined) {
|
||||
if (project.UI.functionLibraries !== undefined) {
|
||||
for (let j = 0; j < project.UI.functionLibraries.length; j++) {
|
||||
let fileName = project.UI.functionLibraries[j].fileName
|
||||
if (fileName === undefined) {fileName = project.UI.functionLibraries[j].name.replaceAll(' ', '') + '.js'}
|
||||
modulesArray.push('Projects' + '/' + project.name + '/' + 'UI' + '/' + 'Function-Libraries' + '/' + fileName)
|
||||
}
|
||||
}
|
||||
if (project.UI.utilities !== undefined) {
|
||||
for (let j = 0; j < project.UI.utilities.length; j++) {
|
||||
let fileName = project.UI.utilities[j].fileName
|
||||
if (fileName === undefined) {fileName = project.UI.utilities[j].name.replaceAll(' ', '') + '.js'}
|
||||
modulesArray.push('Projects' + '/' + project.name + '/' + 'UI' + '/' + 'Utilities' + '/' + fileName)
|
||||
}
|
||||
}
|
||||
if (project.UI.globals !== undefined) {
|
||||
for (let j = 0; j < project.UI.globals.length; j++) {
|
||||
let fileName = project.UI.globals[j].fileName
|
||||
if (fileName === undefined) {fileName = project.UI.globals[j].name.replaceAll(' ', '') + '.js'}
|
||||
modulesArray.push('Projects' + '/' + project.name + '/' + 'UI' + '/' + 'Globals' + '/' + fileName)
|
||||
}
|
||||
}
|
||||
if (project.UI.modules !== undefined) {
|
||||
for (let j = 0; j < project.UI.modules.length; j++) {
|
||||
let fileName = project.UI.modules[j].fileName
|
||||
if (fileName === undefined) {fileName = project.UI.modules[j].name.replaceAll(' ', '') + '.js'}
|
||||
modulesArray.push('Projects' + '/' + project.name + '/' + 'UI' + '/' + 'Modules' + '/' + fileName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.SA !== undefined) {
|
||||
if (project.SA.functionLibraries !== undefined) {
|
||||
for (let j = 0; j < project.SA.functionLibraries.length; j++) {
|
||||
let fileName = project.SA.functionLibraries[j].fileName
|
||||
if (fileName === undefined) {fileName = project.SA.functionLibraries[j].name.replaceAll(' ', '') + '.js'}
|
||||
modulesArray.push('Projects' + '/' + project.name + '/' + 'SA' + '/' + 'Function-Libraries' + '/' + fileName)
|
||||
}
|
||||
}
|
||||
if (project.SA.utilities !== undefined) {
|
||||
for (let j = 0; j < project.SA.utilities.length; j++) {
|
||||
let fileName = project.SA.utilities[j].fileName
|
||||
if (fileName === undefined) {fileName = project.SA.utilities[j].name.replaceAll(' ', '') + '.js'}
|
||||
modulesArray.push('Projects' + '/' + project.name + '/' + 'SA' + '/' + 'Utilities' + '/' + fileName)
|
||||
}
|
||||
}
|
||||
if (project.SA.globals !== undefined) {
|
||||
for (let j = 0; j < project.SA.globals.length; j++) {
|
||||
let fileName = project.SA.globals[j].fileName
|
||||
if (fileName === undefined) {fileName = project.SA.globals[j].name.replaceAll(' ', '') + '.js'}
|
||||
modulesArray.push('Projects' + '/' + project.name + '/' + 'SA' + '/' + 'Globals' + '/' + fileName)
|
||||
}
|
||||
}
|
||||
if (project.SA.modules !== undefined) {
|
||||
for (let j = 0; j < project.SA.modules.length; j++) {
|
||||
let fileName = project.SA.modules[j].fileName
|
||||
if (fileName === undefined) {fileName = project.SA.modules[j].name.replaceAll(' ', '') + '.js'}
|
||||
modulesArray.push('Projects' + '/' + project.name + '/' + 'SA' + '/' + 'Modules' + '/' + fileName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
downloadIncludedFiles()
|
||||
|
||||
function downloadIncludedFiles() {
|
||||
|
||||
let downloadedCounter = 0
|
||||
|
||||
for (let i = 0; i < modulesArray.length; i++) {
|
||||
let path = modulesArray[i]
|
||||
|
||||
REQUIREJS([path], onRequired)
|
||||
|
||||
function onRequired(pModule) {
|
||||
try {
|
||||
|
||||
downloadedCounter++
|
||||
|
||||
if (downloadedCounter === modulesArray.length) {
|
||||
setTimeout(() => {
|
||||
UI.running.webApp = newWebApp()
|
||||
UI.running.webApp.initialize()
|
||||
}, 500)
|
||||
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('[ERROR] loadModules -> onRequired -> err = ' + err.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
console.log('[ERROR] loadModules -> err = ' + err.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
|
||||
function loadSuperalgos() {
|
||||
|
||||
let browser = checkBrowserVersion()
|
||||
if ((browser.name !== "Chrome" && browser.name !== "Safari") || (browser.name === "Chrome" && parseInt(browser.version) < 85) || (browser.name === "Safari" && parseInt(browser.version) < 13)) {
|
||||
alert("Superalgos is officially supported on Google Chrome 85 or Safari 13.1 and above. Your browser version has been detected as potentially beneath this. If you continue you may experience some functionaility issues.\n\nDetected Browser: " + browser.name + "\nVersion: " + browser.version)
|
||||
}
|
||||
|
||||
loadGlobals()
|
||||
|
||||
function loadGlobals() {
|
||||
let path = "Globals.js"
|
||||
REQUIREJS([path], onRequired)
|
||||
|
||||
function onRequired(pModule) {
|
||||
setupEnvironment()
|
||||
}
|
||||
}
|
||||
|
||||
function setupEnvironment() {
|
||||
httpRequest(undefined, 'Environment', onResponse)
|
||||
|
||||
function onResponse(err, file) {
|
||||
UI.environment = JSON.parse(file)
|
||||
setupProjectsSchema()
|
||||
}
|
||||
}
|
||||
|
||||
function setupProjectsSchema() {
|
||||
httpRequest(undefined, 'ProjectsSchema', onResponse)
|
||||
|
||||
function onResponse(err, file) {
|
||||
UI.schemas.projectSchema = JSON.parse(file)
|
||||
loadModules()
|
||||
}
|
||||
}
|
||||
|
||||
function loadModules() {
|
||||
let path = "WebAppLoader.js"
|
||||
REQUIREJS([path], onRequired)
|
||||
|
||||
function onRequired(pModule) {
|
||||
let APP_LOADER_MODULE = newWebAppLoader()
|
||||
APP_LOADER_MODULE.loadModules()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function httpRequest(pContentToSend, pPath, callBackFunction) {
|
||||
let xmlHttpRequest = new XMLHttpRequest()
|
||||
xmlHttpRequest.onreadystatechange = function () {
|
||||
if (this.readyState === 4 && this.status === 200) {
|
||||
try {
|
||||
callBackFunction(undefined, xmlHttpRequest.responseText)
|
||||
} catch (err) {
|
||||
console.log('[ERROR] httpRequest -> httpRequest -> err.stack = ' + err.stack)
|
||||
console.log('[ERROR] httpRequest -> httpRequest -> pContentToSend = ' + pContentToSend)
|
||||
console.log('[ERROR] httpRequest -> httpRequest -> pPath = ' + pPath)
|
||||
console.log('[ERROR] httpRequest -> httpRequest -> xmlHttpRequest.responseText = ' + xmlHttpRequest.responseText)
|
||||
console.log('[ERROR] httpRequest -> httpRequest -> callBackFunction = ' + callBackFunction)
|
||||
|
||||
}
|
||||
return
|
||||
} else if (this.readyState === 4 && this.status === 404) {
|
||||
callBackFunction({ result: "Fail", message: xmlHttpRequest.responseText.trim(), code: xmlHttpRequest.responseText.trim() })
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (pContentToSend === undefined) {
|
||||
xmlHttpRequest.open("GET", pPath, true)
|
||||
xmlHttpRequest.send()
|
||||
} else {
|
||||
try {
|
||||
let blob = new Blob([pContentToSend], { type: 'text/plain' })
|
||||
xmlHttpRequest.open("POST", pPath, true)
|
||||
xmlHttpRequest.send(blob)
|
||||
} catch (err) {
|
||||
if (ERROR_LOG === true) { console.log("[ERROR] callServer -> err.message = " + err.message) }
|
||||
callBackFunction({ result: "Fail", message: err.message })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkBrowserVersion() {
|
||||
|
||||
let ua = navigator.userAgent, tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []
|
||||
if (/trident/i.test(M[1])) {
|
||||
tem = /\brv[ :]+(\d+)/g.exec(ua) || []
|
||||
return { name: 'IE', version: (tem[1] || '') }
|
||||
}
|
||||
if (M[1] === 'Chrome') {
|
||||
tem = ua.match(/\bOPR|Edge\/(\d+)/)
|
||||
if (tem != null) { return { name: 'Opera', version: tem[1] } }
|
||||
}
|
||||
M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?']
|
||||
if ((tem = ua.match(/version\/(\d+)/i)) != null) { M.splice(1, 1, tem[1]) }
|
||||
return {
|
||||
name: M[0],
|
||||
version: M[1]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
function newWebDebugLog() {
|
||||
try {
|
||||
let thisObject = {
|
||||
write: write,
|
||||
fileName: 'undefined'
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function write(pText) {
|
||||
console.log(spacePad(thisObject.fileName, 50) + ' : ' + pText)
|
||||
|
||||
function spacePad(str, max) {
|
||||
str = str.toString()
|
||||
return str.length < max ? spacePad(' ' + str, max) : str
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(spacePad(MODULE_NAME, 50) + ' : ' + '[ERROR] WebDebugLog --> err = ' + err.stack)
|
||||
}
|
||||
}
|
||||
@@ -22,13 +22,288 @@
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 2px 8px;
|
||||
font-size: 125%;
|
||||
font-weight: 500;
|
||||
.body{
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.scroll-div {
|
||||
position:absolute;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
top:0px;
|
||||
left:0px;
|
||||
vertical-align: top;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
background-color: #bcd643;
|
||||
border-radius: 5px;
|
||||
border-style: outset;
|
||||
border-color: blue;
|
||||
background-color: transparent;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.static-div {
|
||||
position: fixed;
|
||||
top:0px;
|
||||
left:18%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
background:transparent;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.content-div {
|
||||
position:relative;
|
||||
vertical-align: top;
|
||||
height: 100%;
|
||||
width: 30%;
|
||||
left: 31.2%;
|
||||
color: #000;
|
||||
border-color: blue;
|
||||
background-color:transparent;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.post-placeholder {
|
||||
vertical-align: top;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
border-color: blue;
|
||||
background-color: transparent;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.post-div {
|
||||
vertical-align: top;
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
border-color: blue;
|
||||
background-color: transparent;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.new-post-div {
|
||||
vertical-align: top;
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
border-color: blue;
|
||||
background-color: transparent;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.page-table {
|
||||
top:0px;
|
||||
left:18%;
|
||||
width: 64%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
background:transparent;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.left-column {
|
||||
position:relative;
|
||||
top:0px;
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.middle-column {
|
||||
position:relative;
|
||||
top:0px;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.right-column {
|
||||
position:relative;
|
||||
top:0px;
|
||||
left:0px;
|
||||
width: 30%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.left-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.logo-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.menu-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.profile-cell {
|
||||
vertical-align: bottom;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.middle-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.content-title-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.content-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.right-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.search-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.context-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
background:transparent;
|
||||
}
|
||||
|
||||
.menu-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 65%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.menu-item-cell {
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.who-to-follow-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.profile-to-follow-table {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
border-width: 0px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.profile-to-follow-span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.profile-to-follow-button {
|
||||
float: right;
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.profile-to-unfollow-span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.profile-to-unfollow-button {
|
||||
float: right;
|
||||
background-color: red;
|
||||
}
|
||||
@@ -6,8 +6,8 @@
|
||||
<meta name="description" content="Free and Open Source Crypto Social Trading">
|
||||
<link rel="stylesheet" href="main.css" type="text/css" charset="utf-8" />
|
||||
<link rel="shortcut icon" type="image/png/ico" href="Images/favicon.ico" />
|
||||
<script type="text/javascript" src="WebServer/require.js"></script>
|
||||
<script type="text/javascript" src="AppPreLoader.js"></script>
|
||||
<script type="text/javascript" src="Require.js"></script>
|
||||
<script type="text/javascript" src="WebAppPreLoader.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function loadApp() {
|
||||
@@ -28,25 +28,137 @@
|
||||
}
|
||||
|
||||
function onResize() {
|
||||
try {
|
||||
if (page === undefined) { return }
|
||||
if (page.eventHandler === undefined) { return }
|
||||
if (DISABLE_BROWSER_RESIZE_EVENT === true) { return }
|
||||
page.eventHandler.raiseEvent('Browser Resized')
|
||||
} catch (err) {
|
||||
console.log('Error Resizing. ' + err.stack)
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body id="body" onload="loadApp()"
|
||||
onresize="onResize()">
|
||||
Hello World!
|
||||
<div id="masterApp"></div>
|
||||
<div id="canvasApp"></div>
|
||||
|
||||
<body id="body" onload="loadApp()" onresize="onResize()" class="body">
|
||||
|
||||
<div id="scroll-div" class="scroll-div">
|
||||
<div id="static-div" class="static-div">
|
||||
<table id="page-table" class="page-table">
|
||||
<tr>
|
||||
<td class="left-column">
|
||||
<table class="left-table">
|
||||
<tr>
|
||||
<td class="logo-cell">LOGO</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-cell">
|
||||
<table class="menu-table">
|
||||
<tr>
|
||||
<td class="menu-item-cell">Home</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">Explore</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">Notifications</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">Messages</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">Bookmarks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">Lists</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">Profile</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">More</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">Post</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="profile-cell">PROFILE</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="middle-column">
|
||||
<table class="middle-table">
|
||||
<tr>
|
||||
<td class="content-title-cell">CONTENT TITLE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-cell">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="right-column">
|
||||
<table class="right-table">
|
||||
<tr>
|
||||
<td class="search-cell">SEARCH</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="context-cell">
|
||||
<table class="context-table">
|
||||
<tr>
|
||||
<td>Who to follow</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="who-to-follow-cell">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Show more</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>>
|
||||
<div id="content-div" class="content-div">
|
||||
<div id="post-placeholder" class="post-placeholder">
|
||||
Placeholder
|
||||
</div>
|
||||
<div id="new-post-div" class="new-post-div">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Profile Pic</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea id="new-post-text-area">Type your post here...</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Permissions</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tool Bar <button name="New Post">POST</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="post-div">
|
||||
POST 2
|
||||
</div>
|
||||
<div class="post-div">
|
||||
POST 3
|
||||
</div>
|
||||
<div class="post-div">
|
||||
POST 4
|
||||
</div>
|
||||
<div class="post-div">
|
||||
POST 5
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,68 +0,0 @@
|
||||
exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
/*
|
||||
This module represent the HTTP API of the
|
||||
Desktop App. All HTTP request are processed
|
||||
by this module.
|
||||
*/
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
/*
|
||||
We will create an HTTP Server and leave it running forever.
|
||||
*/
|
||||
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.DESKTOP_HTTP_INTERFACE_PORT)
|
||||
/* Starting the browser now is optional */
|
||||
if (process.argv.includes("noBrowser")) {
|
||||
//Running Client only with no UI.
|
||||
} else {
|
||||
SA.nodeModules.open('http://localhost:' + global.env.DESKTOP_HTTP_INTERFACE_PORT)
|
||||
}
|
||||
}
|
||||
|
||||
function onHttpRequest(httpRequest, httpResponse) {
|
||||
try {
|
||||
let requestPathAndParameters = httpRequest.url.split('?') // Remove version information
|
||||
let requestPath = requestPathAndParameters[0].split('/')
|
||||
let endpointOrFile = requestPath[1]
|
||||
|
||||
switch (endpointOrFile) {
|
||||
case 'Images': // This means the Images folder.
|
||||
{
|
||||
let path = global.env.PATH_TO_CLIENT + '/WebServer/Images/' + requestPath[2]
|
||||
|
||||
if (requestPath[3] !== undefined) {
|
||||
path = path + '/' + requestPath[3]
|
||||
}
|
||||
|
||||
if (requestPath[4] !== undefined) {
|
||||
path = path + '/' + requestPath[4]
|
||||
}
|
||||
|
||||
if (requestPath[5] !== undefined) {
|
||||
path = path + '/' + requestPath[5]
|
||||
}
|
||||
|
||||
path = unescape(path)
|
||||
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse)
|
||||
}
|
||||
break
|
||||
default:
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_DESKTOP)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
exports.newDesktopRoot = function newDesktopRoot() {
|
||||
/*
|
||||
This module represents the execution root of the Desktop App.
|
||||
We use this module that is outside the Desktop folder to
|
||||
load all node dependencies and get them ready to the actual App.
|
||||
*/
|
||||
let thisObject = {
|
||||
run: run
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
async function run() {
|
||||
/*
|
||||
The DK object is accesible everywhere at the Superalgos Desktop App.
|
||||
It provides access to all modules built for this App.
|
||||
*/
|
||||
global.DK = {}
|
||||
/*
|
||||
The SA object is accesible everywhere at the Superalgos Desktop App.
|
||||
It provides access to all modules built for Superalgos in general.
|
||||
*/
|
||||
global.SA = {}
|
||||
/* Load Environment Variables */
|
||||
let ENVIRONMENT = require('./EnvironmentForDebug.js');
|
||||
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
|
||||
global.env = ENVIRONMENT_MODULE
|
||||
/*
|
||||
First thing is to load the project schema file.
|
||||
*/
|
||||
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
|
||||
/*
|
||||
Setting up the modules that will be available, defined at the Project Schema file.
|
||||
*/
|
||||
let MULTI_PROJECT = require('./MultiProject.js');
|
||||
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
|
||||
MULTI_PROJECT_MODULE.initialize(DK, 'DK')
|
||||
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
|
||||
/*
|
||||
Setting up external dependencies.
|
||||
*/
|
||||
SA.nodeModules = {
|
||||
fs: require('fs'),
|
||||
util: require('util'),
|
||||
path: require('path'),
|
||||
web3: require('web3'),
|
||||
ws: require('ws'),
|
||||
open: require('open'),
|
||||
http: require('http'),
|
||||
octokit: require("@octokit/rest"),
|
||||
simpleGit: require('simple-git'),
|
||||
nodeFetch: require('node-fetch')
|
||||
}
|
||||
|
||||
/*
|
||||
Setting up Secrets.
|
||||
*/
|
||||
SA.secrets = {
|
||||
array: require('./My-Secrets/Secrets.json'),
|
||||
map: new Map()
|
||||
}
|
||||
for (let i = 0; i < SA.secrets.array.length; i++) {
|
||||
let secret = SA.secrets.array[i]
|
||||
SA.secrets.map.set (secret.codeName, secret)
|
||||
}
|
||||
|
||||
run()
|
||||
|
||||
async function run() {
|
||||
DK.app = require('./Desktop/DesktopApp.js').newDesktopApp()
|
||||
await DK.app.run()
|
||||
console.log('Superalgos Desktop App is Running!')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,16 @@
|
||||
FROM python:3-slim
|
||||
ENV NODE_VERSION=node_16.x
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y curl gnupg lsb-release build-essential \
|
||||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
|
||||
&& DISTRO="$(lsb_release -s -c)" \
|
||||
&& echo "deb https://deb.nodesource.com/$NODE_VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list \
|
||||
&& echo "deb-src https://deb.nodesource.com/$NODE_VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y nodejs \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
FROM node:16-alpine
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN mkdir -p Data-Storage Log-Files My-Workspaces \
|
||||
&& groupadd superalgos \
|
||||
&& useradd --no-log-init -m -g superalgos superalgos \
|
||||
&& chown -R superalgos:superalgos /app
|
||||
RUN apk add --no-cache --virtual .build-deps make g++ \
|
||||
&& apk add --no-cache python3 \
|
||||
&& if [ "$(uname -m)" = "x86_64" ]; then node setup noShortcuts tensorflow; else node setup noShortcuts; fi \
|
||||
&& mkdir -p Data-Storage Log-Files My-Workspaces \
|
||||
&& addgroup superalgos \
|
||||
&& adduser --disabled-password --no-create-home --ingroup superalgos superalgos \
|
||||
&& chown -R superalgos:superalgos /app \
|
||||
&& apk del .build-deps
|
||||
USER superalgos
|
||||
RUN node setup noShortcuts
|
||||
EXPOSE 34248
|
||||
EXPOSE 18041
|
||||
VOLUME ["/app/Data-Storage", "/app/Log-Files", "/app/My-Workspaces"]
|
||||
ENTRYPOINT ["node", "run", "noBrowser"]
|
||||
ENTRYPOINT ["node", "platform", "noBrowser"]
|
||||
@@ -4,12 +4,11 @@ exports.newEnvironment = function () {
|
||||
WEB_SERVER_URL: 'localhost',
|
||||
CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041,
|
||||
CLIENT_HTTP_INTERFACE_PORT: 34248,
|
||||
PATH_TO_TASK_SERVER: './TaskServer',
|
||||
PATH_TO_DATA_STORAGE: './Data-Storage',
|
||||
PATH_TO_PROJECTS: './Projects',
|
||||
PATH_TO_LOG_FILES: './Log-Files',
|
||||
PATH_TO_PROJECTS_REQUIRED: './Projects',
|
||||
PATH_TO_PROJECT_SCHEMA: '../Projects/ProjectsSchema.json',
|
||||
PATH_TO_PROJECT_SCHEMA: './Projects/ProjectsSchema.json',
|
||||
PATH_TO_CLIENT: './Platform',
|
||||
PATH_TO_DEFAULT_WORKSPACE: './Projects/Foundations/Plugins/Workspaces',
|
||||
PATH_TO_MY_WORKSPACES: './My-Workspaces',
|
||||
|
||||
@@ -4,9 +4,10 @@ exports.newEnvironment = function () {
|
||||
WEB_SERVER_URL: 'localhost',
|
||||
CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041,
|
||||
NETWORK_WEB_SOCKETS_INTERFACE_PORT: 18042,
|
||||
DESKTOP_WEB_SOCKETS_INTERFACE_PORT: 18043,
|
||||
DESKTOP_WEB_SOCKETS_INTERFACE_HOST: 'localhost',
|
||||
CLIENT_HTTP_INTERFACE_PORT: 34248,
|
||||
DESKTOP_HTTP_INTERFACE_PORT: 34249,
|
||||
PATH_TO_TASK_SERVER: './TaskServer',
|
||||
PATH_TO_DATA_STORAGE: './Data-Storage',
|
||||
PATH_TO_PROJECTS: './Projects',
|
||||
PATH_TO_LOG_FILES: './Log-Files',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
cd ..
|
||||
node run
|
||||
node platform
|
||||
"$SHELL"
|
||||
@@ -1,3 +1,3 @@
|
||||
cd /d %~dp0
|
||||
cd ..
|
||||
cmd /k "node run"
|
||||
cmd /k "node platform"
|
||||
@@ -65,7 +65,7 @@ exports.newMultiProject = function () {
|
||||
}
|
||||
|
||||
/*
|
||||
From here we will require and get the modules, but without instantiation thisObject.
|
||||
From here we will require and get the modules, but without instantiating thisObject.
|
||||
*/
|
||||
|
||||
/* Set up Modules for this Project */
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
exports.newNetworkNode = function newNetworkNode() {
|
||||
|
||||
let thisObject = {
|
||||
socialGraphService: undefined,
|
||||
storage: undefined,
|
||||
run: run
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function run() {
|
||||
async function run() {
|
||||
/*
|
||||
Let's start the Network Interfaces
|
||||
*/
|
||||
NT.webSocketsInterface = NT.projects.network.modules.webSocketsInterface.newNetworkModulesWebSocketsInterface()
|
||||
NT.webSocketsInterface.initialize()
|
||||
|
||||
start()
|
||||
|
||||
async function start() {
|
||||
let socialGraphService = NT.projects.socialTrading.modules.socialGraph.newSocialGraph()
|
||||
await socialGraphService.initialize()
|
||||
}
|
||||
thisObject.socialGraphService = NT.projects.socialTrading.modules.socialGraph.newNetworkModulesSocialGraph()
|
||||
await thisObject.socialGraphService.initialize()
|
||||
|
||||
thisObject.storage = NT.projects.socialTrading.modules.storage.newSocialTradingModulesStorage()
|
||||
thisObject.storage.initialize()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
exports.newNetworkRoot = function newNetworkRoot() {
|
||||
/*
|
||||
This module represents the execution root of the Network Node.
|
||||
We use this module that is outside the Network folder to
|
||||
load all node dependencies and get them ready to the actual node.
|
||||
*/
|
||||
let thisObject = {
|
||||
run: run
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
async function run() {
|
||||
/*
|
||||
The NT object is accesible everywhere at the Superalgos Network.
|
||||
It provides access to all modules built for this Network.
|
||||
*/
|
||||
global.NT = {}
|
||||
/*
|
||||
The SA object is accesible everywhere at the Superalgos Network.
|
||||
It provides access to all modules built for Superalgos in general.
|
||||
*/
|
||||
global.SA = {}
|
||||
/* Load Environment Variables */
|
||||
let ENVIRONMENT = require('./EnvironmentForDebug.js');
|
||||
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
|
||||
global.env = ENVIRONMENT_MODULE
|
||||
/*
|
||||
First thing is to load the project schema file.
|
||||
*/
|
||||
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
|
||||
/*
|
||||
Setting up the modules that will be available, defined at the Project Schema file.
|
||||
*/
|
||||
let MULTI_PROJECT = require('./MultiProject.js');
|
||||
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
|
||||
MULTI_PROJECT_MODULE.initialize(NT, 'NT')
|
||||
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
|
||||
/*
|
||||
Setting up external dependencies.
|
||||
*/
|
||||
SA.nodeModules = {
|
||||
fs: require('fs'),
|
||||
path: require('path'),
|
||||
util: require('util'),
|
||||
nodeFetch: require('node-fetch'),
|
||||
web3: require('web3'),
|
||||
ws: require('ws'),
|
||||
simpleGit: require('simple-git')
|
||||
}
|
||||
/*
|
||||
Setting up Secrets.
|
||||
*/
|
||||
SA.secrets = {
|
||||
array: require('./My-Secrets/Secrets.json'),
|
||||
map: new Map()
|
||||
}
|
||||
for (let i = 0; i < SA.secrets.array.length; i++) {
|
||||
let secret = SA.secrets.array[i]
|
||||
SA.secrets.map.set(secret.codeName, secret)
|
||||
}
|
||||
|
||||
NT.app = require('./Network/NetwokNode.js').newNetworkNode()
|
||||
NT.app.run()
|
||||
|
||||
console.log('Superalgos Network is Running.')
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
|
||||
async function doGithub() {
|
||||
|
||||
const { Octokit } = require("@octokit/rest")
|
||||
const { Octokit } = SA.nodeModules.octokit
|
||||
|
||||
const octokit = new Octokit({
|
||||
auth: token,
|
||||
@@ -93,7 +93,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
while (lastPage === false) {
|
||||
try {
|
||||
page++
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
let listResponse = await octokit[endpoint][method]({
|
||||
owner,
|
||||
repo,
|
||||
@@ -204,7 +204,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
try {
|
||||
const repo = repository
|
||||
const owner = 'Superalgos'
|
||||
const { Octokit } = require("@octokit/rest")
|
||||
const { Octokit } = SA.nodeModules.octokit
|
||||
const octokit = new Octokit({
|
||||
auth: token,
|
||||
userAgent: 'Superalgos Beta 11'
|
||||
@@ -223,7 +223,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
try {
|
||||
page++
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
|
||||
let listResponse = await octokit.rest.pulls.list({
|
||||
owner: owner,
|
||||
@@ -284,7 +284,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
/*
|
||||
Lets get the files changed at this Pull Request.
|
||||
*/
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
let listResponse = await octokit.rest.pulls.listFiles({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -301,15 +301,17 @@ exports.newGithubServer = function newGithubServer() {
|
||||
if (await validateFileNameEqualsGithubUsername() === false) { continue }
|
||||
if (await validateFileChangedIsUserProfile() === false) { continue }
|
||||
if (await validateMessageSignedIsGithubUsername() === false) { continue }
|
||||
if (await validateMessageSignedHashIsSignatureHash() === false) { continue }
|
||||
if (await validateUserProfileNodeNameEqualsGithubUsername() === false) { continue }
|
||||
if (await validateUserProfileIdDoesNotBelongtoAnotherUserProfile() === false) { continue }
|
||||
if (await validateUserProfileBlockchainAccountDoesNotBelongtoAnotherUserProfile() === false) { continue }
|
||||
if (await validateUserProfileSigningAccountsDoesNotBelongtoAnotherUserProfile() === false) { continue }
|
||||
|
||||
if (await mergePullRequest() === false) {
|
||||
console.log('[WARN] Github Server -> mergeGithubPullRequests -> Merge Failed -> Pull Request "' + pullRequest.title + '" not merged because Github could not merge it. -> mergeResponse.message = ' + mergeResponse.data.message)
|
||||
} else {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Merge Succed -> Pull Request "' + pullRequest.title + '" successfully merged. -> mergeResponse.message = ' + mergeResponse.data.message)
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -333,7 +335,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
let pullRequestFile = filesChanged[j]
|
||||
let fileContentUrl = pullRequestFile.raw_url
|
||||
if (fileContentUrl.indexOf('Governance/Plugins/User-Profiles') >= 0) {
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -341,7 +343,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that a User Profile file... \n\n' + fileContentUrl + '\n\n...was submitted together with ' + (filesChanged.length - 1) + ' other file/s. User Profiles files as per the Governance System rules, must be the only file present at a Pull Request in order to pass all the validations and be automatically merged.'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -379,7 +381,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
if (githubUsername !== fileName) {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the File Name. -> Github Username = ' + githubUsername + '-> fileName = ' + fileName)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -387,7 +389,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the name of the User Profile Plugin File.\n\n File Name = "' + fileName + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -402,8 +404,8 @@ exports.newGithubServer = function newGithubServer() {
|
||||
/*
|
||||
Validation #3: The file changed at the PR is a User Profile.
|
||||
*/
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
fileContent = await CL.projects.foundations.utilities.webAccess.fetchAPIDataFile(fileContentUrl)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
fileContent = await PL.projects.foundations.utilities.webAccess.fetchAPIDataFile(fileContentUrl)
|
||||
userProfile = JSON.parse(fileContent)
|
||||
|
||||
if (userProfile.type !== 'User Profile') {
|
||||
@@ -421,7 +423,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
if (messageSigned !== githubUsername) {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #4 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the Message Signed at the User Profile. -> Github Username = ' + githubUsername + '-> messageSigned = ' + messageSigned)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -429,7 +431,41 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the Message Signed at the User Profile.\n\n Message Signed = "' + messageSigned + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
pull_number: pullRequest.number,
|
||||
state: 'closed'
|
||||
});
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
async function validateMessageSignedHashIsSignatureHash() {
|
||||
/*
|
||||
Validation #5: The message signed has is equal to the signature messageHash.
|
||||
*/
|
||||
let config = JSON.parse(userProfile.config)
|
||||
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.hashData(
|
||||
config.signature.message
|
||||
)
|
||||
let messageSignedHash = serverResponse.hash
|
||||
let signatureHash = config.signature.messageHash
|
||||
|
||||
if (messageSignedHash !== signatureHash) {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #5 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Message Signed Hash is not equal to the the Signature Hash. -> messageSignedHash = ' + messageSignedHash + '-> signatureHash = ' + signatureHash)
|
||||
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
issue_number: pullRequest.number,
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Message Signed Hash is not equal to the the Signature Hash.\n\n messageSignedHash = "' + messageSignedHash + '"\n\n signatureHash = "' + signatureHash + '"'
|
||||
});
|
||||
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -442,12 +478,12 @@ exports.newGithubServer = function newGithubServer() {
|
||||
|
||||
async function validateUserProfileNodeNameEqualsGithubUsername() {
|
||||
/*
|
||||
Validation #5: The name of the User Profile node is not the Github Username.
|
||||
Validation #6: The name of the User Profile node is not the Github Username.
|
||||
*/
|
||||
if (userProfile.name !== githubUsername) {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #5 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the User Profile node\'s name. -> Github Username = ' + githubUsername + '-> userProfile.name = ' + userProfile.name)
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #6 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the User Profile node\'s name. -> Github Username = ' + githubUsername + '-> userProfile.name = ' + userProfile.name)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -455,7 +491,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the User Profile node\'s name.\n\n User Profile Name = "' + userProfile.name + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -468,7 +504,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
|
||||
async function validateUserProfileIdDoesNotBelongtoAnotherUserProfile() {
|
||||
/*
|
||||
Validation #6: The id of the User Profile can not be the id of an already existing User Profile
|
||||
Validation #7: The id of the User Profile can not be the id of an already existing User Profile
|
||||
unless the existing one belongs to the same Github username.
|
||||
*/
|
||||
let userProfileIdMap = new Map()
|
||||
@@ -493,9 +529,9 @@ exports.newGithubServer = function newGithubServer() {
|
||||
if (testUserProfile === undefined) { return true }
|
||||
if (testUserProfile !== userProfile.name) {
|
||||
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #6 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Id already exists and belongs to another User Profile on record. -> Profile Id = ' + userProfile.id + '-> User Profile with the same Id = ' + testUserProfile)
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #7 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Id already exists and belongs to another User Profile on record. -> Profile Id = ' + userProfile.id + '-> User Profile with the same Id = ' + testUserProfile)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -503,7 +539,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the User Profile Id already exists and belongs to another User Profile on record. \n\nUser Profile Id = "' + userProfile.id + '" \n\n User Profile with the same Id = "' + testUserProfile + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -517,7 +553,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
async function validateUserProfileBlockchainAccountDoesNotBelongtoAnotherUserProfile() {
|
||||
try {
|
||||
/*
|
||||
Validation #7 The blockchain account of the User Profile can not be the
|
||||
Validation #8 The blockchain account of the User Profile can not be the
|
||||
blockchain account of an already existing User Profile
|
||||
unless the existing one belongs to the same Github username.
|
||||
*/
|
||||
@@ -538,7 +574,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
|
||||
let config = JSON.parse(otherUserProfile.config)
|
||||
let messageSigned = JSON.stringify(config.signature)
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.recoverAddress(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress(
|
||||
messageSigned
|
||||
)
|
||||
userProfileIdMap.set(serverResponse.address, otherUserProfile.name)
|
||||
@@ -546,7 +582,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
|
||||
let config = JSON.parse(userProfile.config)
|
||||
let messageSigned = JSON.stringify(config.signature)
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.recoverAddress(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress(
|
||||
messageSigned
|
||||
)
|
||||
|
||||
@@ -554,9 +590,9 @@ exports.newGithubServer = function newGithubServer() {
|
||||
if (testUserProfile === undefined) { return true }
|
||||
if (testUserProfile !== userProfile.name) {
|
||||
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #7 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Blockchain Account already exists and belongs to another User Profile on record. -> Profile Blockchain Account = ' + serverResponse.address + '-> User Profile with the same Blockchain Account = ' + testUserProfile)
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #8 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Blockchain Account already exists and belongs to another User Profile on record. -> Profile Blockchain Account = ' + serverResponse.address + '-> User Profile with the same Blockchain Account = ' + testUserProfile)
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -564,7 +600,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the User Profile Blockchain Account already exists and belongs to another User Profile on record. \n\nUser Profile Blockchain Account = "' + serverResponse.address + '" \n\n User Profile with the same Blockchain Account = "' + testUserProfile + '"'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -578,11 +614,82 @@ exports.newGithubServer = function newGithubServer() {
|
||||
}
|
||||
}
|
||||
|
||||
async function validateUserProfileSigningAccountsDoesNotBelongtoAnotherUserProfile() {
|
||||
try {
|
||||
|
||||
if (userProfile.signingAccounts === undefined) { return true }
|
||||
|
||||
for (let i = 0; i < userProfile.signingAccounts.signingAccounts.length; i++) {
|
||||
let signingAccount = userProfile.signingAccounts.signingAccounts[i]
|
||||
let config = JSON.parse(signingAccount.config)
|
||||
/*
|
||||
Validation #9 Signing accounts of the User Profile
|
||||
must have a signature of the same Github username of the User Profile.
|
||||
*/
|
||||
let messageSigned = config.signature.message
|
||||
|
||||
if (messageSigned !== githubUsername) {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #9 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> messageSigned = ' + messageSigned + '-> githubUsername = ' + githubUsername)
|
||||
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
issue_number: pullRequest.number,
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Signing Account "' + signingAccount.name + '" has not signed the current Github User Account, but something else. \n\n messageSigned = "' + messageSigned + '" \n\n githubUsername = "' + githubUsername + '"'
|
||||
});
|
||||
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
pull_number: pullRequest.number,
|
||||
state: 'closed'
|
||||
});
|
||||
return false
|
||||
}
|
||||
/*
|
||||
Validation #10: The message signed has is equal to the signature messageHash.
|
||||
*/
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.hashData(
|
||||
config.signature.message
|
||||
)
|
||||
let messageSignedHash = serverResponse.hash
|
||||
let signatureHash = config.signature.messageHash
|
||||
|
||||
if (messageSignedHash !== signatureHash) {
|
||||
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #10 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Message Signed Hash is not equal to the the Signature Hash. -> messageSignedHash = ' + messageSignedHash + '-> signatureHash = ' + signatureHash)
|
||||
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
issue_number: pullRequest.number,
|
||||
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Message Signed Hash is not equal to the the Signature Hash.\n\n messageSignedHash = "' + messageSignedHash + '"\n\n signatureHash = "' + signatureHash + '"'
|
||||
});
|
||||
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
pull_number: pullRequest.number,
|
||||
state: 'closed'
|
||||
});
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
} catch (err) {
|
||||
console.log(err.stack)
|
||||
}
|
||||
}
|
||||
|
||||
async function mergePullRequest() {
|
||||
/*
|
||||
All validations passed, we will proceed an merge this Pull Request.
|
||||
*/
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
mergeResponse = await octokit.rest.pulls.merge({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -603,7 +710,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
try {
|
||||
page++
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
|
||||
let listResponse = await octokit.rest.pulls.list({
|
||||
owner: owner,
|
||||
@@ -631,7 +738,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
for (let i = 0; i < githubPrListMaster.length; i++) {
|
||||
let pullRequest = githubPrListMaster[i]
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.issues.createComment({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
@@ -639,7 +746,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
body: 'Hi, this is the Superalgos Governance System taking notice that you have submitted a pull request directly to the master branch.\n\nThanks for submitting a PR to the Superalgos Project. We value every contribution and everyone is welcome to send PRs. Unfortunatelly we are not merging pull requests directly into the master branch. Consider resubmitting to the develop branch intstead. For your convinienve, you can swithch branches from within the app, at the footer of the Docs tab. \n\n I will close this pull request now and look forward for your next contribution either to the develop branch or any other branch available for this purpose.'
|
||||
});
|
||||
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
|
||||
await octokit.rest.pulls.update({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
|
||||
@@ -24,13 +24,13 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
/*
|
||||
We will create an HTTP Server and leave it running forever.
|
||||
*/
|
||||
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
/* Starting the browser now is optional */
|
||||
if (process.argv.includes("noBrowser")) {
|
||||
//Running Client only with no UI.
|
||||
} else {
|
||||
SA.nodeModules.open('http://localhost:' + global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
}
|
||||
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
/* Starting the browser now is optional */
|
||||
if (process.argv.includes("noBrowser")) {
|
||||
//Running Client only with no UI.
|
||||
} else {
|
||||
SA.nodeModules.open('http://localhost:' + global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
}
|
||||
}
|
||||
|
||||
function onHttpRequest(httpRequest, httpResponse) {
|
||||
@@ -43,16 +43,17 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
case 'WEB3':
|
||||
{
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
let params = JSON.parse(body)
|
||||
|
||||
switch (params.method) {
|
||||
case 'getNetworkClientStatus': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.getNetworkClientStatus(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.getNetworkClientStatus(
|
||||
params.host,
|
||||
params.port,
|
||||
params.interface
|
||||
@@ -63,7 +64,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'createWalletAccount': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.createWalletAccount(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.createWalletAccount(
|
||||
params.entropy
|
||||
)
|
||||
|
||||
@@ -72,7 +73,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'getWalletBalances': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.getWalletBalances(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.getWalletBalances(
|
||||
params.host,
|
||||
params.port,
|
||||
params.interface,
|
||||
@@ -84,7 +85,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'signData': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.signData(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.signData(
|
||||
params.privateKey,
|
||||
params.data
|
||||
)
|
||||
@@ -92,9 +93,18 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse)
|
||||
return
|
||||
}
|
||||
case 'hashData': {
|
||||
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.hashData(
|
||||
params.data
|
||||
)
|
||||
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse)
|
||||
return
|
||||
}
|
||||
case 'recoverAddress': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.recoverAddress(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress(
|
||||
params.signature
|
||||
)
|
||||
|
||||
@@ -103,7 +113,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'mnemonicToPrivateKey': {
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.mnemonicToPrivateKey(
|
||||
let serverResponse = await PL.servers.WEB3_SERVER.mnemonicToPrivateKey(
|
||||
params.mnemonic
|
||||
)
|
||||
|
||||
@@ -131,10 +141,11 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
case 'CCXT':
|
||||
{
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
let params = JSON.parse(body)
|
||||
|
||||
switch (params.method) {
|
||||
@@ -242,9 +253,11 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
}
|
||||
case 'New-Message': {
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
function processRequest(messageReceived) {
|
||||
if (messageReceived === undefined) { return }
|
||||
|
||||
let timestamp = (new Date()).valueOf()
|
||||
let source = requestPath[3]
|
||||
let exchange = requestPath[4]
|
||||
@@ -291,10 +304,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
{
|
||||
switch (requestPath[2]) { // switch by command
|
||||
case 'Save-Node-Schema': {
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Nodes'
|
||||
@@ -322,10 +337,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
case 'Save-Concept-Schema': {
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Concepts'
|
||||
@@ -353,10 +370,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
case 'Save-Topic-Schema': {
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Topics'
|
||||
@@ -384,10 +403,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
case 'Save-Tutorial-Schema': {
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Tutorials'
|
||||
@@ -415,10 +436,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
case 'Save-Review-Schema': {
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Reviews'
|
||||
@@ -446,10 +469,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
case 'Save-Book-Schema': {
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Books'
|
||||
@@ -625,8 +650,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
contribute()
|
||||
|
||||
async function contribute() {
|
||||
const { lookpath } = require('lookpath');
|
||||
const gitpath = await lookpath('git');
|
||||
const { lookpath } = SA.nodeModules.lookpath
|
||||
const gitpath = await lookpath('git')
|
||||
if (gitpath === undefined) {
|
||||
console.log('[ERROR] `git` not installed.')
|
||||
} else {
|
||||
@@ -665,7 +690,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
async function doGit() {
|
||||
const simpleGit = require('simple-git');
|
||||
const simpleGit = SA.nodeModules.simpleGit
|
||||
const options = {
|
||||
baseDir: process.cwd(),
|
||||
binary: 'git',
|
||||
@@ -696,7 +721,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function doGithub() {
|
||||
|
||||
const { Octokit } = require("@octokit/rest")
|
||||
const { Octokit } = SA.nodeModules.octokit
|
||||
|
||||
const octokit = new Octokit({
|
||||
auth: token,
|
||||
@@ -760,7 +785,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
update()
|
||||
|
||||
async function update() {
|
||||
const { lookpath } = require('lookpath');
|
||||
const { lookpath } = SA.nodeModules.lookpath
|
||||
const gitpath = await lookpath('git');
|
||||
if (gitpath === undefined) {
|
||||
console.log('[ERROR] `git` not installed.')
|
||||
@@ -790,7 +815,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
async function doGit() {
|
||||
const simpleGit = require('simple-git');
|
||||
const simpleGit = SA.nodeModules.simpleGit
|
||||
const options = {
|
||||
baseDir: process.cwd(),
|
||||
binary: 'git',
|
||||
@@ -831,7 +856,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
checkout()
|
||||
|
||||
async function checkout() {
|
||||
const { lookpath } = require('lookpath');
|
||||
const { lookpath } = SA.nodeModules.lookpath
|
||||
const gitpath = await lookpath('git');
|
||||
if (gitpath === undefined) {
|
||||
console.log('[ERROR] `git` not installed.')
|
||||
@@ -855,7 +880,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
async function doGit() {
|
||||
const simpleGit = require('simple-git');
|
||||
const simpleGit = SA.nodeModules.simpleGit
|
||||
const options = {
|
||||
baseDir: process.cwd(),
|
||||
binary: 'git',
|
||||
@@ -890,7 +915,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
branch()
|
||||
|
||||
async function branch() {
|
||||
const { lookpath } = require('lookpath');
|
||||
const { lookpath } = SA.nodeModules.lookpath
|
||||
const gitpath = await lookpath('git');
|
||||
if (gitpath === undefined) {
|
||||
console.log('[ERROR] `git` not installed.')
|
||||
@@ -918,7 +943,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
|
||||
async function doGit() {
|
||||
const simpleGit = require('simple-git');
|
||||
const simpleGit = SA.nodeModules.simpleGit
|
||||
const options = {
|
||||
baseDir: process.cwd(),
|
||||
binary: 'git',
|
||||
@@ -991,16 +1016,18 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
related to the Governance System are implemented here and routed
|
||||
to the backend Servers that can process them.
|
||||
*/
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let params = JSON.parse(body)
|
||||
|
||||
switch (params.method) {
|
||||
case 'getGithubStars': {
|
||||
|
||||
let serverResponse = await CL.servers.GITHUB_SERVER.getGithubStars(
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.getGithubStars(
|
||||
params.repository,
|
||||
params.username,
|
||||
params.token
|
||||
@@ -1011,7 +1038,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'getGithubWatchers': {
|
||||
|
||||
let serverResponse = await CL.servers.GITHUB_SERVER.getGithubWatchers(
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.getGithubWatchers(
|
||||
params.repository,
|
||||
params.username,
|
||||
params.token
|
||||
@@ -1022,7 +1049,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'getGithubForks': {
|
||||
|
||||
let serverResponse = await CL.servers.GITHUB_SERVER.getGithubForks(
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.getGithubForks(
|
||||
params.repository,
|
||||
params.username,
|
||||
params.token
|
||||
@@ -1033,25 +1060,39 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
}
|
||||
case 'mergePullRequests': {
|
||||
|
||||
let serverResponse = await CL.servers.GITHUB_SERVER.mergePullRequests(
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.mergePullRequests(
|
||||
params.commitMessage,
|
||||
params.username,
|
||||
params.token
|
||||
)
|
||||
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse)
|
||||
|
||||
setInterval(
|
||||
PL.servers.GITHUB_SERVER.mergePullRequests,
|
||||
60000,
|
||||
params.commitMessage,
|
||||
params.username,
|
||||
params.token
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
case 'payContributors': {
|
||||
console.log('----------------------------------------------------------------------------------------------')
|
||||
console.log('DISTRIBUTION PROCESS STARTED')
|
||||
console.log('----------------------------------------------------------------------------------------------')
|
||||
|
||||
let serverResponse = await CL.servers.WEB3_SERVER.payContributors(
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
|
||||
|
||||
|
||||
await PL.servers.WEB3_SERVER.payContributors(
|
||||
params.contractAddress,
|
||||
params.contractAbi,
|
||||
params.paymentsArray,
|
||||
params.mnemonic
|
||||
)
|
||||
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse)
|
||||
return
|
||||
}
|
||||
default: {
|
||||
@@ -1068,7 +1109,11 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
message: err.message,
|
||||
stack: err.stack
|
||||
}
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(error), httpResponse)
|
||||
try {
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(error), httpResponse)
|
||||
} catch (err) {
|
||||
// we just try to reponnd to the web app, but maybe the response has already been sent.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1375,6 +1420,11 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
let folder = unescape(requestPath[3])
|
||||
let fileName = unescape(requestPath[4])
|
||||
|
||||
/*Beta 12 Refactoring Code: Remove this before realeasing beta 12.*/
|
||||
if (fileName === 'Superalgos-CL.json') {
|
||||
fileName = 'Superalgos-PL.json'
|
||||
}
|
||||
|
||||
let response = await SA.projects.foundations.utilities.plugins.getPluginFileContent(
|
||||
project,
|
||||
folder,
|
||||
@@ -1407,10 +1457,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
case 'SavePlugin':
|
||||
{
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let plugin = JSON.parse(body)
|
||||
let project = requestPath[2]
|
||||
let folder = requestPath[3]
|
||||
@@ -1541,10 +1593,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
case 'SaveWorkspace':
|
||||
{
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
async function processRequest(body) {
|
||||
|
||||
if (body === undefined) { return }
|
||||
|
||||
let fileContent = body
|
||||
let fileName = unescape(requestPath[2])
|
||||
let filePath = global.env.PATH_TO_MY_WORKSPACES + '/' + fileName + '.json'
|
||||
@@ -1693,11 +1747,16 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
default:
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_CLIENT)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_CLIENT)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.stack)
|
||||
if (err.stack !== undefined) {
|
||||
console.log(err.stack)
|
||||
}
|
||||
if (err.message !== undefined) {
|
||||
console.log('[ERROR] onHttpRequest -> err.message = ' + err.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@
|
||||
//console.log('[INFO] Client -> Task Manager Server -> runTask -> Task Name = ' + message.event.taskName)
|
||||
//console.log('[INFO] Client -> Task Manager Server -> runTask -> Task Id = ' + message.event.taskId)
|
||||
|
||||
let path = global.env.PATH_TO_TASK_SERVER + '/Task.js'
|
||||
let path = './TaskServerRoot.js'
|
||||
|
||||
/* Workarround to avoid having the same debug port at the forked process which makes it crash. */
|
||||
for (let i = 0; i < process.execArgv.length; i++) {
|
||||
@@ -263,7 +263,7 @@
|
||||
responseWaiters.set(command.callerId, responseCallBack)
|
||||
}
|
||||
|
||||
CL.servers.EVENT_SERVER.onMessage(JSON.stringify(command), thisObject.onMessage)
|
||||
PL.servers.EVENT_SERVER.onMessage(JSON.stringify(command), thisObject.onMessage)
|
||||
} catch (err) {
|
||||
console.log('[ERROR] Client -> Task Manager Server -> sendCommand -> Error Sending Command to Events Server -> command = ' + JSON.stringify(command))
|
||||
console.log('[ERROR] Client -> Task Manager Server -> sendCommand -> Error Sending Command to Events Server -> error = ' + err.stack)
|
||||
|
||||
@@ -7,6 +7,7 @@ exports.newWeb3Server = function newWeb3Server() {
|
||||
createWalletAccount: createWalletAccount,
|
||||
getWalletBalances: getWalletBalances,
|
||||
signData: signData,
|
||||
hashData: hashData,
|
||||
recoverAddress: recoverAddress,
|
||||
mnemonicToPrivateKey: mnemonicToPrivateKey,
|
||||
payContributors: payContributors,
|
||||
@@ -15,7 +16,7 @@ exports.newWeb3Server = function newWeb3Server() {
|
||||
run: run
|
||||
}
|
||||
|
||||
const Web3 = require('web3');
|
||||
const Web3 = SA.nodeModules.web3
|
||||
let web3Map = new Map()
|
||||
|
||||
return thisObject
|
||||
@@ -223,6 +224,22 @@ exports.newWeb3Server = function newWeb3Server() {
|
||||
}
|
||||
}
|
||||
|
||||
async function hashData(data) {
|
||||
try {
|
||||
|
||||
let web3 = new Web3()
|
||||
let hash = web3.eth.accounts.hashMessage(data)
|
||||
|
||||
return {
|
||||
hash: hash,
|
||||
result: 'Ok'
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
return { error: 'Could not hash the data. ' + err.stack }
|
||||
}
|
||||
}
|
||||
|
||||
async function recoverAddress(signature) {
|
||||
try {
|
||||
let signatureObject = JSON.parse(signature)
|
||||
@@ -241,7 +258,7 @@ exports.newWeb3Server = function newWeb3Server() {
|
||||
|
||||
async function mnemonicToPrivateKey(mnemonic) {
|
||||
try {
|
||||
const ethers = require('ethers')
|
||||
const ethers = SA.nodeModules.ethers
|
||||
let wallet = ethers.Wallet.fromMnemonic(mnemonic)
|
||||
|
||||
if (wallet.privateKey !== undefined) {
|
||||
@@ -268,10 +285,14 @@ exports.newWeb3Server = function newWeb3Server() {
|
||||
let response = await mnemonicToPrivateKey(mnemonic)
|
||||
let privateKey = response.privateKey
|
||||
|
||||
console.log('----------------------------------------------------------------------------------------------')
|
||||
console.log('PAYING CONTRIBUTORS')
|
||||
console.log('----------------------------------------------------------------------------------------------')
|
||||
|
||||
for (let i = 0; i < paymentsArray.length; i++) {
|
||||
await CL.projects.foundations.utilities.asyncFunctions.sleep(10000)
|
||||
await PL.projects.foundations.utilities.asyncFunctions.sleep(10000)
|
||||
let payment = paymentsArray[i]
|
||||
sendTokens(
|
||||
await sendTokens(
|
||||
i + 1,
|
||||
payment.userProfile,
|
||||
payment.from,
|
||||
@@ -282,20 +303,36 @@ exports.newWeb3Server = function newWeb3Server() {
|
||||
|
||||
async function sendTokens(number, userProfile, fromAddress, toAddress, tokenAmount) {
|
||||
try {
|
||||
|
||||
tokenAmount = Math.trunc(tokenAmount / 1000000000000000000)
|
||||
|
||||
console.log('')
|
||||
console.log('---------------------------------------------------------------------------------------------------------------------------------------------------')
|
||||
console.log(' Payment # ' + number + ' - User Profile: ' + userProfile + ' - SA Tokens Amount: ' + tokenAmount / 1000000000000000000 + ' - Address: ' + toAddress)
|
||||
console.log(' Payment # ' + number + ' - User Profile: ' + userProfile + ' - SA Tokens Amount: ' + parseFloat(tokenAmount).toLocaleString('en') + ' - Address: ' + toAddress)
|
||||
console.log('---------------------------------------------------------------------------------------------------------------------------------------------------')
|
||||
console.log('')
|
||||
|
||||
const Tx = require('ethereumjs-tx').Transaction;
|
||||
if (tokenAmount === 0) {
|
||||
console.log('No need to send a transaction in this case.')
|
||||
return
|
||||
}
|
||||
|
||||
const Tx = SA.nodeModules.ethereumjsTx.Transaction;
|
||||
const web3 = new Web3(new Web3.providers.HttpProvider('https://bsc-dataseed.binance.org/'))
|
||||
const amount = web3.utils.toHex(tokenAmount)
|
||||
/*
|
||||
Token Amount
|
||||
*/
|
||||
|
||||
tokenAmount = web3.utils.toWei(tokenAmount.toString(), 'ether')
|
||||
var amountBigNumber = web3.utils.toBN(tokenAmount)
|
||||
|
||||
//const amount = web3.utils.toHex(tokenAmount)
|
||||
if (privateKey === undefined) { privateKey = 'No Privete Key - Just Testing' }
|
||||
privateKey = privateKey.replace('0x', '')
|
||||
const privateKeyBuffer = Buffer.from(privateKey, 'hex')
|
||||
const contractAbiObject = JSON.parse(contractAbi)
|
||||
const contract = new web3.eth.Contract(contractAbiObject, contractAddress, { from: fromAddress })
|
||||
const Common = require('ethereumjs-common').default
|
||||
const Common = SA.nodeModules.ethereumjsCommon.default
|
||||
const BSC_FORK = Common.forCustomChain(
|
||||
'mainnet',
|
||||
{
|
||||
@@ -308,13 +345,14 @@ exports.newWeb3Server = function newWeb3Server() {
|
||||
);
|
||||
|
||||
const nonce = await web3.eth.getTransactionCount(fromAddress);
|
||||
console.log('Nonce:', nonce)
|
||||
|
||||
const rawTransaction = {
|
||||
"from": fromAddress,
|
||||
"gasPrice": web3.utils.toHex(5000000000),
|
||||
"gasLimit": web3.utils.toHex(210000),
|
||||
"to": contractAddress, "value": "0x0",
|
||||
"data": contract.methods.transfer(toAddress, amount).encodeABI(),
|
||||
"data": contract.methods.transfer(toAddress, amountBigNumber).encodeABI(),
|
||||
"nonce": web3.utils.toHex(nonce)
|
||||
};
|
||||
|
||||
@@ -323,6 +361,10 @@ exports.newWeb3Server = function newWeb3Server() {
|
||||
|
||||
console.log('Transaction:', rawTransaction)
|
||||
const result = await web3.eth.sendSignedTransaction('0x' + transaction.serialize().toString('hex'))
|
||||
.catch(err => {
|
||||
console.log('[ERROR] sendSignedTransaction -> err =' + JSON.stringify(err))
|
||||
})
|
||||
|
||||
console.log('Result:', result)
|
||||
return result
|
||||
} catch (err) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
const WEB_SOCKET = require('ws')
|
||||
const WEB_SOCKET = SA.nodeModules.ws
|
||||
let socketServer
|
||||
let port = global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
}
|
||||
|
||||
|
||||
CL.servers.EVENT_SERVER.onMessage(messageToEventServer, onResponse)
|
||||
PL.servers.EVENT_SERVER.onMessage(messageToEventServer, onResponse)
|
||||
|
||||
function onResponse(message) {
|
||||
socket.send(message)
|
||||
@@ -97,7 +97,8 @@
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('[ERROR] Client -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.message = ' + err.message.substring(0, 1000))
|
||||
console.log('[ERROR] Client -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.message = ' + err.message)
|
||||
console.log('[ERROR] Client -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.message = ' + err.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,194 +1,166 @@
|
||||
exports.newPlatformApp = function newPlatformApp() {
|
||||
|
||||
/* Load Environment Variables */
|
||||
let ENVIRONMENT = require('../Environment.js');
|
||||
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
|
||||
global.env = ENVIRONMENT_MODULE
|
||||
|
||||
process.on('uncaughtException', function (err) {
|
||||
if (err.message && err.message.indexOf("EADDRINUSE") > 0) {
|
||||
console.log("The Superalgos Platform Client cannot be started. Reason: the port configured migth be being used by another application, or Superalgos Platform Client might be already running.")
|
||||
return
|
||||
}
|
||||
console.log('[ERROR] Platform App -> uncaughtException -> err.message = ' + err.message)
|
||||
console.log('[ERROR] Platform App -> uncaughtException -> err.stack = ' + err.stack)
|
||||
console.log('[ERROR] Platform App -> uncaughtException -> err = ' + err)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
// Signal user that a necissary node module is missing
|
||||
if (reason.code == 'MODULE_NOT_FOUND') {
|
||||
console.log("[ERROR] Dependency library not found. Please try running the 'node setup' command and then restart the Superalgos Platform Client.")
|
||||
console.log('[ERROR] Platform App -> reason = ' + JSON.stringify(reason))
|
||||
process.exit(1)
|
||||
}
|
||||
console.log('[ERROR] Platform App -> unhandledRejection -> reason = ' + JSON.stringify(reason))
|
||||
console.log('[ERROR] Platform App -> unhandledRejection -> p = ' + JSON.stringify(p))
|
||||
process.exit(1)
|
||||
})
|
||||
try {
|
||||
/* Callbacks default responses. */
|
||||
|
||||
global.DEFAULT_OK_RESPONSE = {
|
||||
result: "Ok",
|
||||
message: "Operation Succeeded"
|
||||
};
|
||||
|
||||
global.DEFAULT_FAIL_RESPONSE = {
|
||||
result: "Fail",
|
||||
message: "Operation Failed"
|
||||
};
|
||||
|
||||
global.DEFAULT_RETRY_RESPONSE = {
|
||||
result: 'Retry',
|
||||
message: 'Retry Later'
|
||||
let thisObject = {
|
||||
run: run
|
||||
}
|
||||
|
||||
global.CUSTOM_OK_RESPONSE = {
|
||||
result: 'Ok, but check Message',
|
||||
message: 'Custom Message'
|
||||
return thisObject
|
||||
|
||||
async function run() {
|
||||
|
||||
process.on('uncaughtException', function (err) {
|
||||
if (err.message && err.message.indexOf("EADDRINUSE") > 0) {
|
||||
console.log("The Superalgos Platform Client cannot be started. Reason: the port configured migth be being used by another application, or Superalgos Platform Client might be already running.")
|
||||
return
|
||||
}
|
||||
console.log('[ERROR] Platform App -> uncaughtException -> err.message = ' + err.message)
|
||||
console.log('[ERROR] Platform App -> uncaughtException -> err.stack = ' + err.stack)
|
||||
console.log('[ERROR] Platform App -> uncaughtException -> err = ' + err)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
// Signal user that a necissary node module is missing
|
||||
if (reason.code == 'MODULE_NOT_FOUND') {
|
||||
console.log("[ERROR] Dependency library not found. Please try running the 'node setup' command and then restart the Superalgos Platform Client.")
|
||||
console.log('[ERROR] Platform App -> reason = ' + JSON.stringify(reason))
|
||||
process.exit(1)
|
||||
}
|
||||
console.log('[ERROR] Platform App -> unhandledRejection -> reason = ' + JSON.stringify(reason))
|
||||
console.log('[ERROR] Platform App -> unhandledRejection -> p = ' + JSON.stringify(p))
|
||||
process.exit(1)
|
||||
})
|
||||
try {
|
||||
/* Callbacks default responses. */
|
||||
|
||||
global.DEFAULT_OK_RESPONSE = {
|
||||
result: "Ok",
|
||||
message: "Operation Succeeded"
|
||||
};
|
||||
|
||||
global.DEFAULT_FAIL_RESPONSE = {
|
||||
result: "Fail",
|
||||
message: "Operation Failed"
|
||||
};
|
||||
|
||||
global.DEFAULT_RETRY_RESPONSE = {
|
||||
result: 'Retry',
|
||||
message: 'Retry Later'
|
||||
}
|
||||
|
||||
global.CUSTOM_OK_RESPONSE = {
|
||||
result: 'Ok, but check Message',
|
||||
message: 'Custom Message'
|
||||
}
|
||||
|
||||
global.CUSTOM_FAIL_RESPONSE = {
|
||||
result: 'Fail Because',
|
||||
message: 'Custom Message'
|
||||
}
|
||||
|
||||
/* Servers */
|
||||
let WEB_SERVER = require('./Client/webServer.js')
|
||||
let DATA_FILE_SERVER = require('./Client/dataFileServer.js')
|
||||
let PROJECT_FILE_SERVER = require('./Client/projectFileServer.js')
|
||||
let UI_FILE_SERVER = require('./Client/uiFileServer.js')
|
||||
let PLUGIN_SERVER = require('./Client/pluginServer.js')
|
||||
let EVENT_SERVER = require('./Client/eventServer.js')
|
||||
let TASK_MANAGER_SERVER = require('./Client/taskManagerServer.js')
|
||||
let CCXT_SERVER = require('./Client/ccxtServer.js')
|
||||
let WEB3_SERVER = require('./Client/web3Server.js')
|
||||
let GITHUB_SERVER = require('./Client/githubServer.js')
|
||||
|
||||
/* Network Interfaces */
|
||||
let WEB_SOCKETS_INTERFACE = require('./Client/webSocketsInterface.js')
|
||||
let HTTP_INTERFACE = require('./Client/httpInterface.js')
|
||||
/*
|
||||
Setting up servers running inside this Client.
|
||||
*/
|
||||
PL.servers = {}
|
||||
console.log('SUPERALGOS PLATFORM CLIENT SERVERS:')
|
||||
console.log('')
|
||||
|
||||
PL.servers.WEB_SERVER = WEB_SERVER.newWebServer()
|
||||
PL.servers.WEB_SERVER.initialize()
|
||||
PL.servers.WEB_SERVER.run()
|
||||
console.log('Web Server .................................................. Started')
|
||||
|
||||
PL.servers.UI_FILE_SERVER = UI_FILE_SERVER.newUIFileServer()
|
||||
PL.servers.UI_FILE_SERVER.initialize()
|
||||
PL.servers.UI_FILE_SERVER.run()
|
||||
console.log('UI File Server .............................................. Started')
|
||||
|
||||
PL.servers.PROJECT_FILE_SERVER = PROJECT_FILE_SERVER.newProjectFileServer()
|
||||
PL.servers.PROJECT_FILE_SERVER.initialize()
|
||||
PL.servers.PROJECT_FILE_SERVER.run()
|
||||
console.log('Project File Server ......................................... Started')
|
||||
|
||||
PL.servers.PLUGIN_SERVER = PLUGIN_SERVER.newPluginServer()
|
||||
PL.servers.PLUGIN_SERVER.initialize()
|
||||
PL.servers.PLUGIN_SERVER.run()
|
||||
console.log('Plugin Server ............................................... Started')
|
||||
|
||||
PL.servers.DATA_FILE_SERVER = DATA_FILE_SERVER.newDataFileServer()
|
||||
PL.servers.DATA_FILE_SERVER.initialize()
|
||||
PL.servers.DATA_FILE_SERVER.run()
|
||||
console.log('Data File Server ............................................ Started')
|
||||
|
||||
PL.servers.EVENT_SERVER = EVENT_SERVER.newEventServer()
|
||||
PL.servers.EVENT_SERVER.initialize()
|
||||
PL.servers.EVENT_SERVER.run()
|
||||
console.log('Events Server ............................................... Started')
|
||||
|
||||
TASK_MANAGER_SERVER = TASK_MANAGER_SERVER.newTaskManagerServer()
|
||||
TASK_MANAGER_SERVER.initialize()
|
||||
TASK_MANAGER_SERVER.run()
|
||||
console.log('Task Manager Server ......................................... Started')
|
||||
|
||||
PL.servers.CCXT_SERVER = CCXT_SERVER.newCCXTServer()
|
||||
PL.servers.CCXT_SERVER.initialize()
|
||||
PL.servers.CCXT_SERVER.run()
|
||||
console.log('CCXT Server ................................................. Started')
|
||||
|
||||
PL.servers.WEB3_SERVER = WEB3_SERVER.newWeb3Server()
|
||||
PL.servers.WEB3_SERVER.initialize()
|
||||
PL.servers.WEB3_SERVER.run()
|
||||
console.log('WEB3 Server ................................................. Started')
|
||||
|
||||
PL.servers.GITHUB_SERVER = GITHUB_SERVER.newGithubServer()
|
||||
PL.servers.GITHUB_SERVER.initialize()
|
||||
PL.servers.GITHUB_SERVER.run()
|
||||
console.log('Github Server ............................................... Started')
|
||||
|
||||
console.log('')
|
||||
console.log('SUPERALGOS PLATFORM CLIENT INTERFACES:')
|
||||
console.log('')
|
||||
|
||||
WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface()
|
||||
WEB_SOCKETS_INTERFACE.initialize()
|
||||
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
|
||||
|
||||
HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface()
|
||||
HTTP_INTERFACE.initialize()
|
||||
console.log('Http Interface .............................................. Listening at port ' + global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
|
||||
console.log('')
|
||||
console.log("You are running Superalgos Beta 11")
|
||||
console.log('')
|
||||
console.log("What's new? These are the main new features in this version:")
|
||||
console.log('')
|
||||
console.log('Governance System ........................................... Automates the distribution of SA Tokens and allow users to vote on the direction of the project.')
|
||||
console.log('TensorFlow Integration ...................................... Allows creating and training ML models and use them in trading strategies.')
|
||||
console.log('')
|
||||
console.log("What's next? This is the current development pipeline:")
|
||||
console.log('')
|
||||
console.log('Superalgos P2P Network ...................................... Will allow algo-traders to share trading signals with Superalgos users consuming these signals via a mobile app.')
|
||||
console.log('Real-time Trading Signals ................................... Will allow users to emit trading signals and be rewarded with SA Tokens.')
|
||||
console.log('Superalgos Mobile ........................................... Will allow users to consume trading signals for free and autonomously execute trades from their mobile phones.')
|
||||
console.log('Ethereum Integration ........................................ Will allow mining data from an Ethereum network node, and bring it into the Superalgos workflow. [Looking for an Ethereum dev that would like to continue this line of development.]')
|
||||
|
||||
console.log('')
|
||||
|
||||
} catch (err) {
|
||||
console.log('[ERROR] Platform App -> Error = ' + err.stack)
|
||||
}
|
||||
}
|
||||
|
||||
global.CUSTOM_FAIL_RESPONSE = {
|
||||
result: 'Fail Because',
|
||||
message: 'Custom Message'
|
||||
}
|
||||
|
||||
/* Servers */
|
||||
let WEB_SERVER = require('./Client/webServer.js')
|
||||
let DATA_FILE_SERVER = require('./Client/dataFileServer.js')
|
||||
let PROJECT_FILE_SERVER = require('./Client/projectFileServer.js')
|
||||
let UI_FILE_SERVER = require('./Client/uiFileServer.js')
|
||||
let PLUGIN_SERVER = require('./Client/pluginServer.js')
|
||||
let EVENT_SERVER = require('./Client/eventServer.js')
|
||||
let TASK_MANAGER_SERVER = require('./Client/taskManagerServer.js')
|
||||
let CCXT_SERVER = require('./Client/ccxtServer.js')
|
||||
let WEB3_SERVER = require('./Client/web3Server.js')
|
||||
let GITHUB_SERVER = require('./Client/githubServer.js')
|
||||
|
||||
/* Network Interfaces */
|
||||
let WEB_SOCKETS_INTERFACE = require('./Client/webSocketsInterface.js')
|
||||
let HTTP_INTERFACE = require('./Client/httpInterface.js')
|
||||
|
||||
|
||||
/*
|
||||
The CL object is accesible everywhere at the Superalgos Client.
|
||||
It provides access to all modules built for this Client.
|
||||
*/
|
||||
global.CL = {}
|
||||
/*
|
||||
The SA object is accesible everywhere at the Superalgos Client.
|
||||
It provides access to all modules built for Superalgos in general.
|
||||
*/
|
||||
global.SA = {}
|
||||
/*
|
||||
First thing is to load the project schema file.
|
||||
*/
|
||||
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
|
||||
/*
|
||||
Setting up the modules that will be available for the Servers Running inside this Client
|
||||
*/
|
||||
let MULTI_PROJECT = require('../MultiProject.js');
|
||||
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
|
||||
MULTI_PROJECT_MODULE.initialize(CL, 'CL')
|
||||
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
|
||||
/*
|
||||
Setting up external dependencies.
|
||||
*/
|
||||
SA.nodeModules = {
|
||||
fs: require('fs'),
|
||||
nodeFetch: require('node-fetch'),
|
||||
open: require('open'),
|
||||
http: require('http'),
|
||||
ccxt: require('ccxt')
|
||||
}
|
||||
/*
|
||||
Setting up servers running inside this Client.
|
||||
*/
|
||||
CL.servers = {}
|
||||
console.log('SUPERALGOS PLATFORM CLIENT SERVERS:')
|
||||
console.log('')
|
||||
|
||||
CL.servers.WEB_SERVER = WEB_SERVER.newWebServer()
|
||||
CL.servers.WEB_SERVER.initialize()
|
||||
CL.servers.WEB_SERVER.run()
|
||||
console.log('Web Server .................................................. Started')
|
||||
|
||||
CL.servers.UI_FILE_SERVER = UI_FILE_SERVER.newUIFileServer()
|
||||
CL.servers.UI_FILE_SERVER.initialize()
|
||||
CL.servers.UI_FILE_SERVER.run()
|
||||
console.log('UI File Server .............................................. Started')
|
||||
|
||||
CL.servers.PROJECT_FILE_SERVER = PROJECT_FILE_SERVER.newProjectFileServer()
|
||||
CL.servers.PROJECT_FILE_SERVER.initialize()
|
||||
CL.servers.PROJECT_FILE_SERVER.run()
|
||||
console.log('Project File Server ......................................... Started')
|
||||
|
||||
CL.servers.PLUGIN_SERVER = PLUGIN_SERVER.newPluginServer()
|
||||
CL.servers.PLUGIN_SERVER.initialize()
|
||||
CL.servers.PLUGIN_SERVER.run()
|
||||
console.log('Plugin Server ............................................... Started')
|
||||
|
||||
CL.servers.DATA_FILE_SERVER = DATA_FILE_SERVER.newDataFileServer()
|
||||
CL.servers.DATA_FILE_SERVER.initialize()
|
||||
CL.servers.DATA_FILE_SERVER.run()
|
||||
console.log('Data File Server ............................................ Started')
|
||||
|
||||
CL.servers.EVENT_SERVER = EVENT_SERVER.newEventServer()
|
||||
CL.servers.EVENT_SERVER.initialize()
|
||||
CL.servers.EVENT_SERVER.run()
|
||||
console.log('Events Server ............................................... Started')
|
||||
|
||||
TASK_MANAGER_SERVER = TASK_MANAGER_SERVER.newTaskManagerServer()
|
||||
TASK_MANAGER_SERVER.initialize()
|
||||
TASK_MANAGER_SERVER.run()
|
||||
console.log('Task Manager Server ......................................... Started')
|
||||
|
||||
CL.servers.CCXT_SERVER = CCXT_SERVER.newCCXTServer()
|
||||
CL.servers.CCXT_SERVER.initialize()
|
||||
CL.servers.CCXT_SERVER.run()
|
||||
console.log('CCXT Server ................................................. Started')
|
||||
|
||||
CL.servers.WEB3_SERVER = WEB3_SERVER.newWeb3Server()
|
||||
CL.servers.WEB3_SERVER.initialize()
|
||||
CL.servers.WEB3_SERVER.run()
|
||||
console.log('WEB3 Server ................................................. Started')
|
||||
|
||||
CL.servers.GITHUB_SERVER = GITHUB_SERVER.newGithubServer()
|
||||
CL.servers.GITHUB_SERVER.initialize()
|
||||
CL.servers.GITHUB_SERVER.run()
|
||||
console.log('Github Server ............................................... Started')
|
||||
|
||||
console.log('')
|
||||
console.log('SUPERALGOS PLATFORM CLIENT INTERFACES:')
|
||||
console.log('')
|
||||
|
||||
WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface()
|
||||
WEB_SOCKETS_INTERFACE.initialize()
|
||||
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
|
||||
|
||||
HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface()
|
||||
HTTP_INTERFACE.initialize()
|
||||
console.log('Http Interface .............................................. Listening at port ' + global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
|
||||
console.log('')
|
||||
console.log("You are running Superalgos Beta 11")
|
||||
console.log('')
|
||||
console.log("What's new? These are the main new features in this version:")
|
||||
console.log('')
|
||||
console.log('Governance System ........................................... Automates the distribution of SA Tokens and allow users to vote on the direction of the project.')
|
||||
console.log('TensorFlow Integration ...................................... Allows creating and training ML models and use them in trading strategies.')
|
||||
console.log('')
|
||||
console.log("What's next? This is the current development pipeline:")
|
||||
console.log('')
|
||||
console.log('Superalgos P2P Network ...................................... Will allow algo-traders to share trading signals with Superalgos users consuming these signals via a mobile app.')
|
||||
console.log('Real-time Trading Signals ................................... Will allow users to emit trading signals and be rewarded with SA Tokens.')
|
||||
console.log('Superalgos Mobile ........................................... Will allow users to consume trading signals for free and autonomously execute trades from their mobile phones.')
|
||||
console.log('Ethereum Integration ........................................ Will allow mining data from an Ethereum network node, and bring it into the Superalgos workflow.')
|
||||
|
||||
console.log('')
|
||||
|
||||
} catch (err) {
|
||||
console.log('[ERROR] Platform App -> Error = ' + err.stack)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
let postLoader
|
||||
|
||||
function newAppLoader() {
|
||||
const MODULE_NAME = 'App Loader'
|
||||
const INFO_LOG = false
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
|
||||
|
||||
|
||||
let thisObject = {
|
||||
loadModules: loadModules
|
||||
@@ -64,16 +63,16 @@ function newAppLoader() {
|
||||
let fileArray = JSON.parse(fileList)
|
||||
for (let i = 0; i < fileArray.length; i++) {
|
||||
let item = fileArray[i]
|
||||
|
||||
project = item[0]
|
||||
fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Function-Libraries' + '/' + fileName)
|
||||
|
||||
let project = item[0]
|
||||
let fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Function-Libraries' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
utilities()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function utilities() {
|
||||
let url = 'ListUtilitiesFiles'
|
||||
@@ -84,16 +83,16 @@ function newAppLoader() {
|
||||
let fileArray = JSON.parse(fileList)
|
||||
for (let i = 0; i < fileArray.length; i++) {
|
||||
let item = fileArray[i]
|
||||
|
||||
project = item[0]
|
||||
fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Utilities' + '/' + fileName)
|
||||
|
||||
let project = item[0]
|
||||
let fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Utilities' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
globals()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function globals() {
|
||||
let url = 'ListGlobalFiles'
|
||||
@@ -104,16 +103,16 @@ function newAppLoader() {
|
||||
let fileArray = JSON.parse(fileList)
|
||||
for (let i = 0; i < fileArray.length; i++) {
|
||||
let item = fileArray[i]
|
||||
|
||||
project = item[0]
|
||||
fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Globals' + '/' + fileName)
|
||||
|
||||
let project = item[0]
|
||||
let fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Globals' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
spaces()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function spaces() {
|
||||
let url = 'ListSpaceFiles'
|
||||
@@ -138,7 +137,7 @@ function newAppLoader() {
|
||||
|
||||
for (let i = 0; i < modulesArray.length; i++) {
|
||||
let path = modulesArray[i]
|
||||
|
||||
|
||||
REQUIREJS([path], onRequired)
|
||||
|
||||
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> Module Requested.') }
|
||||
|
||||
@@ -459,6 +459,32 @@ function newCanvas() {
|
||||
return
|
||||
}
|
||||
|
||||
if (
|
||||
event.shiftKey === true &&
|
||||
(event.ctrlKey === true || event.metaKey === true) &&
|
||||
(event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.saveFloatingObjectToBeMoved || event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.saveFloatingObjectToBeMoved.toLowerCase())
|
||||
|
||||
) {
|
||||
UI.projects.foundations.spaces.floatingSpace.saveFloatingObjectToBeMoved()
|
||||
if (event.preventDefault !== undefined) {
|
||||
event.preventDefault()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if (
|
||||
event.shiftKey === true &&
|
||||
(event.ctrlKey === true || event.metaKey === true) &&
|
||||
(event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.moveSavedFloatingObjectToMouse || event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.moveSavedFloatingObjectToMouse.toLowerCase())
|
||||
|
||||
) {
|
||||
UI.projects.foundations.spaces.floatingSpace.moveSavedFloatingObjectToMouse(thisObject.mouse.position)
|
||||
if (event.preventDefault !== undefined) {
|
||||
event.preventDefault()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
let nodeOnFocus = await UI.projects.foundations.spaces.designSpace.workspace.getNodeThatIsOnFocus()
|
||||
if (nodeOnFocus !== undefined) {
|
||||
if (nodeOnFocus.payload.uiObject.codeEditor !== undefined) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
function newEventsServerClient(networkNode) {
|
||||
function newEventsServerClient(lanNetworkNode) {
|
||||
/* Web Sockets Connection */
|
||||
|
||||
const MODULE_NAME = 'System Event Handler'
|
||||
@@ -192,19 +192,19 @@ function newEventsServerClient(networkNode) {
|
||||
|
||||
if (thisObject.isConnected() !== true) {
|
||||
if (lastTryToReconnectDatetime !== undefined) {
|
||||
if (networkNode !== undefined) {
|
||||
if (networkNode.payload !== undefined) {
|
||||
if (networkNode.payload.uiObject !== undefined) {
|
||||
networkNode.payload.uiObject.setErrorMessage('Failed to Connect to Superalgos Client via WebSockets. Retrying in 1 minute. Check at this node config if the host property has the IP address of the computer running Superalgos Client.')
|
||||
if (lanNetworkNode !== undefined) {
|
||||
if (lanNetworkNode.payload !== undefined) {
|
||||
if (lanNetworkNode.payload.uiObject !== undefined) {
|
||||
lanNetworkNode.payload.uiObject.setErrorMessage('Failed to Connect to Superalgos Platform Client via WebSockets. Retrying in 1 minute. Check at this node config if the host property has the IP address of the computer running Superalgos Platform Client.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (networkNode !== undefined) {
|
||||
if (networkNode.payload !== undefined) {
|
||||
if (networkNode.payload.uiObject !== undefined) {
|
||||
networkNode.payload.uiObject.setStatus('Connected to Superalgos Client via WebSockets.')
|
||||
if (lanNetworkNode !== undefined) {
|
||||
if (lanNetworkNode.payload !== undefined) {
|
||||
if (lanNetworkNode.payload.uiObject !== undefined) {
|
||||
lanNetworkNode.payload.uiObject.setStatus('Connected to Superalgos Platform Client via WebSockets.')
|
||||
retryCommandsPhysics()
|
||||
}
|
||||
}
|
||||
@@ -220,14 +220,14 @@ function newEventsServerClient(networkNode) {
|
||||
let port
|
||||
/* At this point the node does not have the payload property yet, that is why we have to do this manually */
|
||||
try {
|
||||
let config = JSON.parse(networkNode.config)
|
||||
let config = JSON.parse(lanNetworkNode.config)
|
||||
host = config.host
|
||||
port = config.webSocketsPort
|
||||
|
||||
/* Check if we really have to stablish the connection. */
|
||||
if (config.autoConnect === false) { return }
|
||||
} catch (err) {
|
||||
networkNode.payload.uiObject.setErrorMessage(
|
||||
lanNetworkNode.payload.uiObject.setErrorMessage(
|
||||
'Bad configuration. Invalid JSON Format.',
|
||||
undefined,
|
||||
{
|
||||
@@ -241,7 +241,7 @@ function newEventsServerClient(networkNode) {
|
||||
}
|
||||
|
||||
if (host === undefined) {
|
||||
networkNode.payload.uiObject.setErrorMessage(
|
||||
lanNetworkNode.payload.uiObject.setErrorMessage(
|
||||
'Bad configuration. Host Property Not Found.',
|
||||
undefined,
|
||||
{
|
||||
@@ -255,7 +255,7 @@ function newEventsServerClient(networkNode) {
|
||||
}
|
||||
|
||||
if (port === undefined) {
|
||||
networkNode.payload.uiObject.setErrorMessage(
|
||||
lanNetworkNode.payload.uiObject.setErrorMessage(
|
||||
'Bad configuration. WebSocketsPort Property Not Found.',
|
||||
undefined,
|
||||
{
|
||||
|
||||
@@ -98,6 +98,9 @@ function newUniqueId () {
|
||||
|
||||
function splitTextIntoPhrases (text, wordsPerLine) {
|
||||
try {
|
||||
if (text.split === undefined) {
|
||||
return []
|
||||
}
|
||||
let splittedLabel = text.split(' ')
|
||||
let phrases = []
|
||||
let phrase = ''
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"splashTextLine3Html": ''
|
||||
},
|
||||
{
|
||||
"splashTextLine1Html": '<span class="credits-red">Superalgos is a community of algo traders, sharing knowleadge, experience, and tools.</span>'
|
||||
"splashTextLine1Html": '<span class="credits-red">Superalgos is a community of algo traders, sharing knowledge, experience, and tools.</span>'
|
||||
,
|
||||
"splashTextLine2Html": 'We negotiate with exchanges and pass on benefits to all members. Become part of the Superalgos Community by making a small contribution to the open-source project!'
|
||||
,
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "Superalgos-Plarform",
|
||||
"version": "0.0.11",
|
||||
"description": "Superalgos Plarform",
|
||||
"main": "PlatformApp.js",
|
||||
"author": {
|
||||
"name": "Luis-Fernando-Molina"
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/rest": "^18.9.0",
|
||||
"ccxt": "^1.51.98",
|
||||
"child_process": "^1.0.2",
|
||||
"ethereumjs-common": "^1.5.2",
|
||||
"ethereumjs-tx": "^2.1.2",
|
||||
"ethers": "^5.4.4",
|
||||
"lookpath": "^1.2.2",
|
||||
"node-fetch": "^2.6.1",
|
||||
"open": "^8.2.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"simple-git": "^2.42.0",
|
||||
"web3": "^1.5.2",
|
||||
"ws": "^8.2.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
/*
|
||||
This module represents the execution root of the Platform App.
|
||||
We use this module that is outside the Platform folder to
|
||||
load all node dependencies and get them ready to the actual App.
|
||||
*/
|
||||
|
||||
/*
|
||||
The PL object is accesible everywhere at the Superalgos Platform Client.
|
||||
It provides access to all modules built for this Client.
|
||||
*/
|
||||
global.PL = {}
|
||||
/*
|
||||
The SA object is accesible everywhere at the Superalgos Desktop App.
|
||||
It provides access to all modules built for Superalgos in general.
|
||||
*/
|
||||
global.SA = {}
|
||||
/* Load Environment Variables */
|
||||
let ENVIRONMENT = require('./Environment.js');
|
||||
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
|
||||
global.env = ENVIRONMENT_MODULE
|
||||
/*
|
||||
First thing is to load the project schema file.
|
||||
*/
|
||||
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
|
||||
/*
|
||||
Setting up the modules that will be available, defined at the Project Schema file.
|
||||
*/
|
||||
let MULTI_PROJECT = require('./MultiProject.js');
|
||||
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
|
||||
MULTI_PROJECT_MODULE.initialize(PL, 'PL')
|
||||
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
|
||||
/*
|
||||
Setting up external dependencies.
|
||||
*/
|
||||
SA.nodeModules = {
|
||||
fs: require('fs'),
|
||||
util: require('util'),
|
||||
path: require('path'),
|
||||
ws: require('ws'),
|
||||
web3: require('web3'),
|
||||
ethers: require('ethers'),
|
||||
ethereumjsTx: require('ethereumjs-tx'),
|
||||
ethereumjsCommon: require('ethereumjs-common'),
|
||||
nodeFetch: require('node-fetch'),
|
||||
open: require('open'),
|
||||
http: require('http'),
|
||||
ccxt: require('ccxt'),
|
||||
octokit: require("@octokit/rest"),
|
||||
simpleGit: require('simple-git'),
|
||||
lookpath: require('lookpath')
|
||||
}
|
||||
|
||||
run()
|
||||
|
||||
async function run() {
|
||||
PL.app = require('./Platform/PlatformApp.js').newPlatformApp()
|
||||
await PL.app.run()
|
||||
console.log('Superalgos Platform App is Running!')
|
||||
}
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"type": "Docs Space Settings",
|
||||
"level": 4,
|
||||
"propertyNameAtParent": "docsSpaceSettings",
|
||||
"attachingRules": {
|
||||
"compatibleTypes": "Docs Space->"
|
||||
},
|
||||
"editors": {
|
||||
"config": true
|
||||
},
|
||||
"initialValues": {
|
||||
"config": "{\"indexContent\": true \n }"
|
||||
},
|
||||
"menuItems": [
|
||||
{
|
||||
"action": "Configure",
|
||||
"actionFunction": "uiObject.configEditor.activate",
|
||||
"label": "Configure",
|
||||
"iconPathOn": "configuration",
|
||||
"iconPathOff": "configuration"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"actionProject": "Foundations",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Delete",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"label": "Delete",
|
||||
"iconPathOn": "delete-entity",
|
||||
"iconPathOff": "delete-entity"
|
||||
}
|
||||
],
|
||||
"addLeftIcons": true
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"type": "Docs Space Style",
|
||||
"level": 4,
|
||||
"propertyNameAtParent": "docsSpaceStyle",
|
||||
"attachingRules": {
|
||||
"compatibleTypes": "Docs Space->"
|
||||
},
|
||||
"editors": {
|
||||
"config": true
|
||||
},
|
||||
"initialValues": {
|
||||
"config": "{\"backgroundColor\":\"UI_COLOR.BLACK\",\"node\":{\"fontSize\":16,\"imageSize\":60,\"type\":{\"fontColor\":\"UI_COLOR.WHITE\"},\"name\":{\"fontColor\":\"UI_COLOR.WHITE\"},\"menuItem\":{\"backgroundColor\":\"UI_COLOR.BLACK\",\"fontColor\":\"UI_COLOR.WHITE\",\"fontSize\":14,\"imageSize\":14}}}"
|
||||
},
|
||||
"menuItems": [
|
||||
{
|
||||
"action": "Configure",
|
||||
"actionFunction": "uiObject.configEditor.activate",
|
||||
"label": "Configure",
|
||||
"iconPathOn": "configuration",
|
||||
"iconPathOff": "configuration"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"actionProject": "Foundations",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Delete",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"label": "Delete",
|
||||
"iconPathOn": "delete-entity",
|
||||
"iconPathOff": "delete-entity"
|
||||
}
|
||||
],
|
||||
"addLeftIcons": true
|
||||
}
|
||||
@@ -3,22 +3,25 @@
|
||||
"menuItems": [
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"actionProject": "Foundations",
|
||||
"disableIfPropertyIsDefined": true,
|
||||
"propertyToCheckFor": "spaceStyle",
|
||||
"label": "Add Space Style",
|
||||
"relatedUiObject": "Space Style",
|
||||
"propertyToCheckFor": "docsSpaceStyle",
|
||||
"label": "Add Docs Space Style",
|
||||
"relatedUiObject": "Docs Space Style",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"actionProject": "Foundations",
|
||||
"disableIfPropertyIsDefined": true,
|
||||
"propertyToCheckFor": "spaceSettings",
|
||||
"label": "Add Space Settings",
|
||||
"relatedUiObject": "Space Settings",
|
||||
"propertyToCheckFor": "docsSpaceSettings",
|
||||
"label": "Add Docs Space Settings",
|
||||
"relatedUiObject": "Docs Space Settings",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"actionProject": "Foundations",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Delete",
|
||||
"actionFunction": "payload.executeAction",
|
||||
@@ -32,15 +35,15 @@
|
||||
"level": 0,
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "spaceStyle",
|
||||
"name": "docsSpaceStyle",
|
||||
"type": "node",
|
||||
"childType": "Space Style",
|
||||
"childType": "Docs Space Style",
|
||||
"autoAdd": true
|
||||
},
|
||||
{
|
||||
"name": "spaceSettings",
|
||||
"name": "docsSpaceSettings",
|
||||
"type": "node",
|
||||
"childType": "Space Settings",
|
||||
"childType": "Docs Space Settings",
|
||||
"autoAdd": true
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"type": "Education Project",
|
||||
"menuItems": [
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"actionProject": "Foundations",
|
||||
"label": "Add Tutorial",
|
||||
"iconProject": "Education",
|
||||
"relatedUiObject": "Tutorial",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"actionProject": "Foundations",
|
||||
"label": "Add Docs Space",
|
||||
"relatedUiObject": "Docs Space",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"actionProject": "Foundations",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Delete",
|
||||
"actionFunction": "payload.executeAction",
|
||||
"label": "Delete",
|
||||
"iconPathOn": "delete-entity",
|
||||
"iconPathOff": "delete-entity"
|
||||
}
|
||||
],
|
||||
"isProjectHead": true,
|
||||
"isTitleAllwaysVisible": false,
|
||||
"addLeftIcons": true,
|
||||
"isPinned": true,
|
||||
"positionLocked": true,
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "projectDefinition",
|
||||
"type": "node",
|
||||
"childType": "Project Definition",
|
||||
"project": "Foundations",
|
||||
"autoAdd": true
|
||||
}
|
||||
],
|
||||
"icon": "education"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "Docs Space Settings",
|
||||
"definition": {
|
||||
"text": "This node allows the user to determine how the docs space will be loaded by the current workspace.",
|
||||
"updated": 1631587592724
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Subtitle",
|
||||
"text": "Properties",
|
||||
"updated": 1631587516173
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "indexContent defines whether the contents of the docs space will be indexed for searching upon loading the workspace. If false docs space will be disabled allowing faster load times for development."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "Docs Space Style",
|
||||
"definition": {
|
||||
"text": "This node is currently a place holder that will eventually allow users to adjust the visual apperance of the docs space.",
|
||||
"updated": 1631589004055
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Right click and select the pencil button to enter edit mode."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -23,8 +23,8 @@ function newFoundationsDocsSearchEngine() {
|
||||
*/
|
||||
let docsSpaceNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Docs Space')
|
||||
if (docsSpaceNode !== undefined) {
|
||||
if (docsSpaceNode.spaceSettings !== undefined) {
|
||||
let indexContent = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(docsSpaceNode.spaceSettings.payload, 'indexContent')
|
||||
if (docsSpaceNode.docsSpaceSettings !== undefined) {
|
||||
let indexContent = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(docsSpaceNode.docsSpaceSettings.payload, 'indexContent')
|
||||
if (indexContent === false) {
|
||||
callbackFunction()
|
||||
return
|
||||
|
||||
@@ -12,6 +12,7 @@ function newEducationTutorialSpace() {
|
||||
playTutorialStep: playTutorialStep,
|
||||
resumeTutorialStep: resumeTutorialStep,
|
||||
resetTutorialProgress: resetTutorialProgress,
|
||||
sidePanelTab: undefined,
|
||||
container: undefined,
|
||||
physics: physics,
|
||||
draw: draw,
|
||||
@@ -37,6 +38,8 @@ function newEducationTutorialSpace() {
|
||||
resize()
|
||||
|
||||
let browserResizedEventSubscriptionId
|
||||
let openingEventSubscriptionId
|
||||
let closingEventSubscriptionId
|
||||
|
||||
let tutorialRootNode
|
||||
let currentNode
|
||||
@@ -47,6 +50,7 @@ function newEducationTutorialSpace() {
|
||||
let tutorialFormDiv = document.getElementById('tutorialFormDiv')
|
||||
let htmlGif = document.createElement("IMG")
|
||||
let htmlImage = document.createElement("IMG")
|
||||
//let htmlVid = document.createElement("iframe")
|
||||
|
||||
let currentGifName
|
||||
let newGifName
|
||||
@@ -104,6 +108,8 @@ function newEducationTutorialSpace() {
|
||||
batchConfigChangesCounter = 0
|
||||
workspacesCounter = 0
|
||||
|
||||
setupSidePanelTab()
|
||||
|
||||
browserResizedEventSubscriptionId = canvas.eventHandler.listenToEvent('Browser Resized', resize)
|
||||
let workspace = UI.projects.foundations.spaces.designSpace.workspace
|
||||
workspace.executeAction({ name: 'Play Tutorials', project: 'Foundations' })
|
||||
@@ -112,6 +118,8 @@ function newEducationTutorialSpace() {
|
||||
|
||||
function finalize() {
|
||||
canvas.eventHandler.stopListening(browserResizedEventSubscriptionId)
|
||||
thisObject.sidePanelTab.container.eventHandler.stopListening(openingEventSubscriptionId)
|
||||
thisObject.sidePanelTab.container.eventHandler.stopListening(closingEventSubscriptionId)
|
||||
|
||||
tutorialRootNode = undefined
|
||||
currentNode = undefined
|
||||
@@ -130,8 +138,14 @@ function newEducationTutorialSpace() {
|
||||
}
|
||||
|
||||
function getContainer(point, purpose) {
|
||||
|
||||
if (thisObject.sidePanelTab === undefined) { return }
|
||||
|
||||
let container
|
||||
|
||||
container = thisObject.sidePanelTab.getContainer(point, purpose)
|
||||
if (container !== undefined) { return container }
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
|
||||
return thisObject.container
|
||||
} else {
|
||||
@@ -145,11 +159,13 @@ function newEducationTutorialSpace() {
|
||||
switch (currentStatus) {
|
||||
case 'Stopped': {
|
||||
makeInvisible()
|
||||
thisObject.sidePanelTab.close()
|
||||
currentNode = undefined
|
||||
break
|
||||
}
|
||||
case 'Playing Tutorial': {
|
||||
makeVsible()
|
||||
thisObject.sidePanelTab.open()
|
||||
break
|
||||
}
|
||||
case 'Playing Topic': {
|
||||
@@ -167,6 +183,7 @@ function newEducationTutorialSpace() {
|
||||
checkPressButton()
|
||||
checkGif()
|
||||
checkImage()
|
||||
//checkVid()
|
||||
checkDocumentation()
|
||||
checkWorkspaces()
|
||||
checkSlider()
|
||||
@@ -287,18 +304,39 @@ function newEducationTutorialSpace() {
|
||||
|
||||
function checkImage() {
|
||||
let tutorialImageDiv = document.getElementById('tutorialImageDiv')
|
||||
if (tutorialImageDiv !== null && tutorialImageDiv !== undefined) {
|
||||
if (tutorialImageDiv !== null && tutorialImageDiv !== undefined) {
|
||||
tutorialImageDiv.appendChild(htmlImage)
|
||||
}
|
||||
|
||||
if (newImageName === undefined) { return }
|
||||
if (currentImageName === newImageName) { return }
|
||||
currentImageName = newImageName
|
||||
let webParam = 'Icons/' + newImageProject + '/' + newImageName + '.png'
|
||||
|
||||
// If gathering Icon by Project and Name get it now
|
||||
let icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(newImageProject, newImageName)
|
||||
if (icon !== undefined) {
|
||||
htmlImage.src = icon.src
|
||||
htmlImage.width = "100"
|
||||
htmlImage.height = "100"
|
||||
} else if (icon === undefined) {
|
||||
// Legacy Code to handle icons being fetched by literal path
|
||||
// Note: This if statment should be removed once all tutoials have been refactored
|
||||
let webParam = 'Icons/' + newImageProject + '/' + newImageName + '.png'
|
||||
htmlImage.src = webParam
|
||||
htmlImage.width = "100"
|
||||
htmlImage.height = "100"
|
||||
}
|
||||
}
|
||||
|
||||
htmlImage.src = webParam
|
||||
htmlImage.width = "100"
|
||||
htmlImage.height = "100"
|
||||
function checkVid() {
|
||||
let tutorialGifDiv = document.getElementById('tutorialGifDiv')
|
||||
if (tutorialGifDiv !== null && tutorialGifDiv !== undefined) {
|
||||
tutorialGifDiv.appendChild(htmlGif)
|
||||
}
|
||||
|
||||
if (currentGifName === newGifName) { return }
|
||||
currentGifName = newGifName
|
||||
htmlVid.src = currentGifName
|
||||
}
|
||||
|
||||
function checkDocumentation() {
|
||||
@@ -968,7 +1006,7 @@ function newEducationTutorialSpace() {
|
||||
|
||||
function resumeTutorial(node) {
|
||||
if (UI.projects.foundations.spaces.designSpace.workspace.isInitialized !== true) { return }
|
||||
|
||||
//Testing if removing the navigationStack reset here fixes the tutorial resume issues
|
||||
navigationStack = []
|
||||
node.payload.uiObject.isPlaying = true
|
||||
tutorialRootNode = node
|
||||
@@ -990,6 +1028,7 @@ function newEducationTutorialSpace() {
|
||||
}
|
||||
|
||||
function resumeTutorialTopic(node) {
|
||||
//Testing if removing the navigationStack reset here fixes the tutorial resume issues
|
||||
navigationStack = []
|
||||
currentTopicNode = node
|
||||
currentNode = node
|
||||
@@ -1010,6 +1049,7 @@ function newEducationTutorialSpace() {
|
||||
}
|
||||
|
||||
function resumeTutorialStep(node) {
|
||||
//Testing if removing the navigationStack reset here fixes the tutorial resume issues
|
||||
navigationStack = []
|
||||
currentStepNode = node
|
||||
currentNode = node
|
||||
@@ -1405,6 +1445,13 @@ function newEducationTutorialSpace() {
|
||||
newGifName = text
|
||||
break
|
||||
}
|
||||
case 'Youtube': {
|
||||
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
|
||||
let src = UI.projects.education.utilities.docs.parseYoutube(text)
|
||||
console.log('text', src)
|
||||
html = html + '<iframe width="400" height="215" src="https://www.youtube.com/embed/' + text + '" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
|
||||
break
|
||||
}
|
||||
case 'Text': {
|
||||
let text = UI.projects.education.utilities.docs.getTextBasedOnLanguage(paragraph)
|
||||
text = UI.projects.education.utilities.docs.addKeyboard(text)
|
||||
@@ -1499,4 +1546,37 @@ function newEducationTutorialSpace() {
|
||||
function draw() {
|
||||
if (isInitialized === false) { return }
|
||||
}
|
||||
|
||||
function setupSidePanelTab() {
|
||||
thisObject.sidePanelTab = UI.projects.foundations.spaces.sideSpace.createSidePanelTab(thisObject.container, 'Education', 'tutorial', 'Tutorial', 'left')
|
||||
|
||||
openingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('opening', onOpening)
|
||||
closingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('closing', onClosing)
|
||||
}
|
||||
|
||||
function onOpening() {
|
||||
//console.log('onOpening');
|
||||
if (currentStatus !== "Stopped"){return}
|
||||
|
||||
let nodeResume = navigationStack.pop()
|
||||
switch (nodeResume.type) {
|
||||
case 'Tutorial': {
|
||||
resumeTutorial(nodeResume)
|
||||
break
|
||||
}
|
||||
case 'Tutorial Topic': {
|
||||
resumeTutorialTopic(nodeResume)
|
||||
break
|
||||
}
|
||||
case 'Tutorial Step': {
|
||||
resumeTutorialStep(nodeResume)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onClosing() {
|
||||
//console.log('onClosing');
|
||||
stop()
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
],
|
||||
"referencingRules": {
|
||||
"compatibleTypes": "->Network Node->"
|
||||
"compatibleTypes": "->LAN Network Node->"
|
||||
},
|
||||
"editors": {
|
||||
"config": true
|
||||
|
||||
@@ -42,8 +42,8 @@ function newEthereumUtilitiesRouteToClient() {
|
||||
return
|
||||
}
|
||||
|
||||
let networkNodeConfig = JSON.parse(networkClient.payload.referenceParent.config)
|
||||
let url = 'http://' + networkNodeConfig.host + ':' + networkNodeConfig.webPort + '/' + 'WEB3'
|
||||
let lanNetworkNodeConfig = JSON.parse(networkClient.payload.referenceParent.config)
|
||||
let url = 'http://' + lanNetworkNodeConfig.host + ':' + lanNetworkNodeConfig.webPort + '/' + 'WEB3'
|
||||
|
||||
return {
|
||||
params: params,
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="350" height="350" viewBox="0 0 350 350" xml:space="preserve">
|
||||
<desc>Created with Fabric.js 1.7.22</desc>
|
||||
<defs>
|
||||
</defs>
|
||||
<g id="icon" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;" transform="translate(-1.9444444444444287 -1.9444444444444287) scale(3.89 3.89)" >
|
||||
<path d="M 45 0 C 25.463 0 9.625 15.838 9.625 35.375 c 0 8.722 3.171 16.693 8.404 22.861 L 45 90 l 26.97 -31.765 c 5.233 -6.167 8.404 -14.139 8.404 -22.861 C 80.375 15.838 64.537 0 45 0 z M 45 48.705 c -8.035 0 -14.548 -6.513 -14.548 -14.548 c 0 -8.035 6.513 -14.548 14.548 -14.548 s 14.548 6.513 14.548 14.548 C 59.548 42.192 53.035 48.705 45 48.705 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(204,88,53); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="350" height="350" viewBox="0 0 350 350" xml:space="preserve">
|
||||
<desc>Created with Fabric.js 1.7.22</desc>
|
||||
<defs>
|
||||
</defs>
|
||||
<g id="icon" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;" transform="translate(-1.9444444444444287 -1.9444444444444287) scale(3.89 3.89)" >
|
||||
<path d="M 77.127 81.457 h -0.373 v -2 h 0.373 c 1.239 0 2.432 -0.371 3.446 -1.072 l 1.137 1.645 C 80.36 80.964 78.775 81.457 77.127 81.457 z M 72.11 81.457 h -4.645 v -2 h 4.645 V 81.457 z M 62.822 81.457 h -4.645 v -2 h 4.645 V 81.457 z M 53.534 81.457 H 48.89 v -2 h 4.645 V 81.457 z M 44.246 81.457 h -4.644 v -2 h 4.644 V 81.457 z M 34.958 81.457 h -4.644 v -2 h 4.644 V 81.457 z M 84.813 75.85 l -1.904 -0.609 c 0.19 -0.596 0.287 -1.218 0.287 -1.852 c 0 -0.708 -0.121 -1.403 -0.36 -2.064 l 1.881 -0.68 c 0.318 0.88 0.479 1.804 0.479 2.744 C 85.195 74.229 85.066 75.058 84.813 75.85 z M 80.386 68.269 c -0.972 -0.62 -2.099 -0.948 -3.259 -0.948 h -0.634 v -2 h 0.634 c 1.542 0 3.041 0.437 4.335 1.263 L 80.386 68.269 z M 71.849 67.32 h -4.644 v -2 h 4.644 V 67.32 z M 62.561 67.32 h -4.408 c -0.092 0 -0.183 -0.001 -0.272 -0.005 l 0.074 -1.998 l 0.198 0.003 h 4.408 V 67.32 z M 53.016 65.474 c -1.37 -1.132 -2.34 -2.705 -2.732 -4.43 l 1.951 -0.443 c 0.294 1.296 1.024 2.479 2.055 3.332 L 53.016 65.474 z M 52.642 56.707 l -1.814 -0.84 c 0.744 -1.607 2.02 -2.945 3.59 -3.768 l 0.928 1.771 C 54.162 54.49 53.202 55.497 52.642 56.707 z M 64.038 53.184 h -4.645 v -2 h 4.645 V 53.184 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(240,162,2); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
|
||||
<path d="M 21.094 27.868 C 9.444 27.868 0 37.311 0 48.961 c 0 5.201 1.891 9.954 5.011 13.632 l 16.082 18.941 l 16.082 -18.941 c 3.12 -3.678 5.011 -8.431 5.011 -13.632 C 42.187 37.311 32.743 27.868 21.094 27.868 z M 21.094 56.91 c -4.791 0 -8.675 -3.884 -8.675 -8.675 c 0 -4.791 3.884 -8.675 8.675 -8.675 s 8.675 3.884 8.675 8.675 C 29.768 53.026 25.885 56.91 21.094 56.91 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(240,162,2); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
|
||||
<path d="M 73.577 11.624 c -9.015 0 -16.323 7.308 -16.323 16.323 c 0 4.025 1.463 7.703 3.878 10.549 l 12.445 14.657 l 12.445 -14.657 c 2.415 -2.846 3.878 -6.524 3.878 -10.549 C 89.9 18.932 82.592 11.624 73.577 11.624 z M 73.577 34.098 c -3.707 0 -6.713 -3.006 -6.713 -6.713 c 0 -3.707 3.005 -6.713 6.713 -6.713 c 3.707 0 6.713 3.006 6.713 6.713 C 80.29 31.093 77.285 34.098 73.577 34.098 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(240,162,2); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,195 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="-49 141 512 512"
|
||||
style="enable-background:new -49 141 512 512;"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="missing-image.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
inkscape:export-filename="E:\Superalgos\Projects\Foundations\Icons-SVG-Sources\nodes\missing-image.png"
|
||||
inkscape:export-xdpi="100"
|
||||
inkscape:export-ydpi="100"><metadata
|
||||
id="metadata130"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs128"><rect
|
||||
x="-9.8146379"
|
||||
y="258.55609"
|
||||
width="412.29816"
|
||||
height="253.853"
|
||||
id="rect1079" /></defs><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview126"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.58695388"
|
||||
inkscape:cx="-286.47672"
|
||||
inkscape:cy="111.9244"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1"
|
||||
inkscape:document-rotation="0" />
|
||||
<style
|
||||
type="text/css"
|
||||
id="style2">
|
||||
.st0{display:none;fill:#020202;}
|
||||
.st1{fill:#F0353D;}
|
||||
.st2{fill:#FD6A33;}
|
||||
.st3{fill:#FF8C29;}
|
||||
.st4{fill:#FFD1A9;}
|
||||
.st5{fill:#365558;}
|
||||
.st6{fill:#0295AA;}
|
||||
.st7{fill:#4ACFD9;}
|
||||
.st8{fill:#9BAAAB;}
|
||||
.st9{fill:#CDD4D5;}
|
||||
.st10{fill:#E6EAEA;}
|
||||
.st11{fill:#FFFFFF;}
|
||||
.st12{fill:#BCD643;}
|
||||
</style>
|
||||
<rect
|
||||
x="47"
|
||||
y="152"
|
||||
class="st0"
|
||||
width="512"
|
||||
height="512"
|
||||
id="rect4" />
|
||||
<rect
|
||||
x="-585.36237"
|
||||
y="142.38"
|
||||
class="st1"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect6" />
|
||||
<rect
|
||||
x="-457.36237"
|
||||
y="142.38"
|
||||
class="st2"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect8" />
|
||||
<rect
|
||||
x="-329.36237"
|
||||
y="142.38"
|
||||
class="st3"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect10" />
|
||||
<rect
|
||||
x="-201.36235"
|
||||
y="142.38"
|
||||
class="st4"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect12" />
|
||||
<rect
|
||||
x="-585.36237"
|
||||
y="270.38"
|
||||
class="st5"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect14" />
|
||||
<rect
|
||||
x="-457.36237"
|
||||
y="270.38"
|
||||
class="st6"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect16" />
|
||||
<rect
|
||||
x="-329.36237"
|
||||
y="270.38"
|
||||
class="st7"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect18" />
|
||||
<rect
|
||||
x="-585.36237"
|
||||
y="398.38"
|
||||
class="st8"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect20" />
|
||||
<rect
|
||||
x="-457.36237"
|
||||
y="398.38"
|
||||
class="st9"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect22" />
|
||||
<rect
|
||||
x="-329.36237"
|
||||
y="398.38"
|
||||
class="st10"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect24" />
|
||||
<rect
|
||||
x="-201.36235"
|
||||
y="398.38"
|
||||
class="st11"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect26" />
|
||||
<rect
|
||||
x="-585.36237"
|
||||
y="526.38"
|
||||
class="st12"
|
||||
width="128"
|
||||
height="128"
|
||||
id="rect28" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<path
|
||||
id="rect975"
|
||||
style="fill:#365558;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M -10.666492,204.5 H 424.66649 C 445.90326,204.5 463,221.59674 463,242.83351 V 428.499 L 301.147,589.5 H -10.666492 C -31.903256,589.5 -49,572.40326 -49,551.16649 V 242.83351 C -49,221.59674 -31.903256,204.5 -10.666492,204.5 Z"
|
||||
sodipodi:nodetypes="sssccssss" /><path
|
||||
id="rect975-1"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.30288;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 16.859659,230.65329 H 397.48111 c 18.35622,0 32.81143,14.78059 33.13395,33.13395 L 433.68174,438.29753 305.4807,564.19857 16.859659,563.43189 c -18.356145,-0.0488 -33.133952,-14.77775 -33.133952,-33.13395 v -266.5107 c 0,-18.3562 14.7777422,-33.13395 33.133952,-33.13395 z"
|
||||
sodipodi:nodetypes="sssccssss" /><path
|
||||
style="fill:#cdd4d5;fill-opacity:1;stroke:none;stroke-width:1.10951px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 24.688673,440.64407 90.854217,-107.12477 114.95005,136.33611 76.18783,-76.18782 64.15816,69.50468 -76.18783,64.15817 H 273.26505 L 25.98877,525.99381 Z"
|
||||
id="path1075" /><path
|
||||
id="rect856-1"
|
||||
style="fill:#f0353d;fill-opacity:1;stroke-width:13.0704;stroke-linejoin:round"
|
||||
d="m 332.97398,522.97441 c -8.54567,8.54568 -25.18374,5.66705 -37.30508,-6.45433 L 87.480331,308.33111 c -12.121353,-12.12139 -14.99998,-28.75947 -6.45431,-37.30516 8.545655,-8.54568 25.183729,-5.66705 37.305079,6.45431 l 208.18857,208.189 c 12.12135,12.12136 14.99998,28.75946 6.45431,37.30515 z m 0,-251.94846 c 8.54567,8.54569 5.66704,25.18379 -6.45431,37.30516 L 118.33111,516.52008 c -12.12136,12.12138 -28.759434,15.00001 -37.305089,6.45433 -8.54567,-8.54569 -5.667043,-25.18379 6.45431,-37.30515 L 295.6689,277.48028 c 12.12134,-12.12138 28.75941,-15.00001 37.30508,-6.45433 z" /><path
|
||||
id="rect1026"
|
||||
style="fill:#365558;fill-opacity:1;stroke:none;stroke-width:8.63636;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
d="M 339.48089,427.64743 463,428.499 v 13.398 L 313.91876,589.5 H 301.147 V 465.98092 c 0,-21.23675 17.09764,-38.47995 38.33389,-38.33349 z"
|
||||
sodipodi:nodetypes="sccccss" /><path
|
||||
id="rect1026-5"
|
||||
style="fill:#e6eaea;fill-opacity:1;stroke:none;stroke-width:5.19181;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
d="m 344.01559,449.07687 74.25451,0.51209 -97.29926,96.7869 v -74.25451 c 0,-6.33166 2.52818,-12.0728 6.63416,-16.24104 4.173,-4.23625 9.97574,-6.84782 16.41059,-6.80344 z"
|
||||
sodipodi:nodetypes="sccsss" /></svg>
|
||||
|
After Width: | Height: | Size: 6.0 KiB |
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 248 204" style="enable-background:new 0 0 248 204;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#1D9BF0;}
|
||||
</style>
|
||||
<g id="Logo_1_">
|
||||
<path id="white_background" class="st0" d="M221.95,51.29c0.15,2.17,0.15,4.34,0.15,6.53c0,66.73-50.8,143.69-143.69,143.69v-0.04
|
||||
C50.97,201.51,24.1,193.65,1,178.83c3.99,0.48,8,0.72,12.02,0.73c22.74,0.02,44.83-7.61,62.72-21.66
|
||||
c-21.61-0.41-40.56-14.5-47.18-35.07c7.57,1.46,15.37,1.16,22.8-0.87C27.8,117.2,10.85,96.5,10.85,72.46c0-0.22,0-0.43,0-0.64
|
||||
c7.02,3.91,14.88,6.08,22.92,6.32C11.58,63.31,4.74,33.79,18.14,10.71c25.64,31.55,63.47,50.73,104.08,52.76
|
||||
c-4.07-17.54,1.49-35.92,14.61-48.25c20.34-19.12,52.33-18.14,71.45,2.19c11.31-2.23,22.15-6.38,32.07-12.26
|
||||
c-3.77,11.69-11.66,21.62-22.2,27.93c10.01-1.18,19.79-3.86,29-7.95C240.37,35.29,231.83,44.14,221.95,51.29z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 17 KiB |
@@ -19330,7 +19330,7 @@
|
||||
},
|
||||
{
|
||||
"type": "Indicator Bot",
|
||||
"name": "Relative Strenght Index (RSI)",
|
||||
"name": "Relative Strength Index (RSI)",
|
||||
"config": "{\n\"codeName\": \"RSI\"\n}",
|
||||
"project": "Foundations",
|
||||
"processes": [
|
||||
@@ -19383,7 +19383,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Indicator Bot",
|
||||
"Foundations",
|
||||
"b2fc1830-30e3-407a-9cd2-ab93a9e36cc7"
|
||||
@@ -19535,7 +19535,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Indicator Bot",
|
||||
"Foundations",
|
||||
"b2fc1830-30e3-407a-9cd2-ab93a9e36cc7"
|
||||
@@ -19829,7 +19829,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Indicator Bot",
|
||||
"Foundations",
|
||||
"b2fc1830-30e3-407a-9cd2-ab93a9e36cc7"
|
||||
@@ -19920,7 +19920,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Indicator Bot",
|
||||
"Foundations",
|
||||
"b2fc1830-30e3-407a-9cd2-ab93a9e36cc7"
|
||||
@@ -20717,7 +20717,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -38266,7 +38266,7 @@
|
||||
},
|
||||
{
|
||||
"type": "Plotter",
|
||||
"name": "Relative Strenght Index (RSI)",
|
||||
"name": "Relative Strength Index (RSI)",
|
||||
"config": "{\n\"codeName\": \"Plotter RSI\"\n}",
|
||||
"project": "Foundations",
|
||||
"modules": [
|
||||
@@ -39291,7 +39291,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -39363,7 +39363,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -39435,7 +39435,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -39507,7 +39507,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -39664,7 +39664,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -39736,7 +39736,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -39808,7 +39808,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -39880,7 +39880,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40037,7 +40037,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40109,7 +40109,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40181,7 +40181,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40253,7 +40253,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40410,7 +40410,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40482,7 +40482,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40554,7 +40554,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40626,7 +40626,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40783,7 +40783,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -40855,7 +40855,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -41012,7 +41012,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -41084,7 +41084,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -41241,7 +41241,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -41313,7 +41313,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -41470,7 +41470,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -41542,7 +41542,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -41699,7 +41699,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -41771,7 +41771,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -41985,7 +41985,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -42057,7 +42057,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -42214,7 +42214,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -42286,7 +42286,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -42358,7 +42358,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
@@ -42430,7 +42430,7 @@
|
||||
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
|
||||
],
|
||||
[
|
||||
"Relative Strenght Index (RSI)",
|
||||
"Relative Strength Index (RSI)",
|
||||
"Plotter",
|
||||
"Foundations",
|
||||
"d87c1a49-c376-404b-98ff-62feac714c64"
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
|
||||
"rootNodes": [
|
||||
{
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"project": "Foundations",
|
||||
"networkNodes": [
|
||||
"lanNetworkNodes": [
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"config": "{\n \"host\": \"localhost\",\n \"webPort\": \"34248\",\n \"webSocketsPort\": \"18041\"\n}",
|
||||
"project": "Foundations",
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
|
||||
"rootNodes": [
|
||||
{
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"project": "Foundations",
|
||||
"networkNodes": [
|
||||
"lanNetworkNodes": [
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
|
||||
"project": "Foundations",
|
||||
@@ -166,11 +166,11 @@
|
||||
},
|
||||
{
|
||||
"type": "Task",
|
||||
"name": "Relative Strenght Index (RSI)",
|
||||
"name": "Relative Strength Index (RSI)",
|
||||
"project": "Foundations",
|
||||
"bot": {
|
||||
"type": "Indicator Bot Instance",
|
||||
"name": "Relative Strenght Index (RSI)",
|
||||
"name": "Relative Strength Index (RSI)",
|
||||
"config": "{ \n\"parameter1\": \"Value for parameter1 defined at the Product Definition\"\n}",
|
||||
"project": "Foundations",
|
||||
"processes": [
|
||||
@@ -2736,7 +2736,7 @@
|
||||
},
|
||||
{
|
||||
"type": "Bot Products",
|
||||
"name": "Relative Strenght Index (RSI)",
|
||||
"name": "Relative Strength Index (RSI)",
|
||||
"project": "Foundations",
|
||||
"dataProducts": [
|
||||
{
|
||||
@@ -21362,7 +21362,7 @@
|
||||
},
|
||||
{
|
||||
"type": "Bot Layers",
|
||||
"name": "Relative Strenght Index (RSI)",
|
||||
"name": "Relative Strength Index (RSI)",
|
||||
"project": "Foundations",
|
||||
"layers": [
|
||||
{
|
||||
@@ -31933,7 +31933,7 @@
|
||||
},
|
||||
{
|
||||
"type": "Bot Layers",
|
||||
"name": "Relative Strenght Index (RSI)",
|
||||
"name": "Relative Strength Index (RSI)",
|
||||
"project": "Foundations",
|
||||
"layers": [
|
||||
{
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
|
||||
"rootNodes": [
|
||||
{
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"project": "Foundations",
|
||||
"networkNodes": [
|
||||
"lanNetworkNodes": [
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
|
||||
"project": "Foundations",
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
|
||||
"rootNodes": [
|
||||
{
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"project": "Foundations",
|
||||
"networkNodes": [
|
||||
"lanNetworkNodes": [
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
|
||||
"project": "Foundations",
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
|
||||
"rootNodes": [
|
||||
{
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"project": "Foundations",
|
||||
"networkNodes": [
|
||||
"lanNetworkNodes": [
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
|
||||
"project": "Foundations",
|
||||
@@ -140433,8 +140433,8 @@
|
||||
"status": "Done"
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"id": "3c165071-7558-4708-9999-8ffe71d346b1"
|
||||
}
|
||||
}
|
||||
@@ -141009,8 +141009,8 @@
|
||||
"status": "Done"
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"id": "3c165071-7558-4708-9999-8ffe71d346b1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
|
||||
"rootNodes": [
|
||||
{
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"project": "Foundations",
|
||||
"networkNodes": [
|
||||
"lanNetworkNodes": [
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
|
||||
"project": "Foundations",
|
||||
@@ -7994,7 +7994,7 @@
|
||||
"status": "Done"
|
||||
},
|
||||
"referenceParent": {
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"id": "e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
|
||||
"rootNodes": [
|
||||
{
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"project": "Foundations",
|
||||
"networkNodes": [
|
||||
"lanNetworkNodes": [
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
|
||||
"project": "Foundations",
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
|
||||
"rootNodes": [
|
||||
{
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"project": "Foundations",
|
||||
"networkNodes": [
|
||||
"lanNetworkNodes": [
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
|
||||
"project": "Foundations",
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
|
||||
"rootNodes": [
|
||||
{
|
||||
"type": "Network",
|
||||
"name": "My Network",
|
||||
"type": "LAN Network",
|
||||
"name": "My LAN Network",
|
||||
"project": "Foundations",
|
||||
"networkNodes": [
|
||||
"lanNetworkNodes": [
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"name": "My Computer",
|
||||
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
|
||||
"project": "Foundations",
|
||||
|
||||
@@ -2,7 +2,10 @@ exports.newFoundationsUtilitiesFilesAndDirectories = function () {
|
||||
|
||||
let thisObject = {
|
||||
getDirectories: getDirectories,
|
||||
getAllFilesInDirectoryAndSubdirectories: getAllFilesInDirectoryAndSubdirectories
|
||||
getAllFilesInDirectoryAndSubdirectories: getAllFilesInDirectoryAndSubdirectories,
|
||||
pathFromDate: pathFromDate,
|
||||
pathFromDatetime: pathFromDatetime,
|
||||
mkDirByPathSync: mkDirByPathSync
|
||||
}
|
||||
|
||||
return thisObject
|
||||
@@ -19,8 +22,8 @@ exports.newFoundationsUtilitiesFilesAndDirectories = function () {
|
||||
}
|
||||
|
||||
function getAllFilesInDirectoryAndSubdirectories(dir, callback) {
|
||||
const { promisify } = require('util');
|
||||
const { resolve } = require('path');
|
||||
const { promisify } = SA.nodeModules.util
|
||||
const { resolve } = SA.nodeModules.path;
|
||||
const fs = SA.nodeModules.fs;
|
||||
const readdir = promisify(fs.readdir);
|
||||
const stat = promisify(fs.stat);
|
||||
@@ -51,4 +54,69 @@ exports.newFoundationsUtilitiesFilesAndDirectories = function () {
|
||||
return files.reduce((a, f) => a.concat(f), []);
|
||||
}
|
||||
}
|
||||
|
||||
function pathFromDate(timestamp) {
|
||||
|
||||
let file = { date: new Date(timestamp) }
|
||||
|
||||
file.year = file.date.getUTCFullYear()
|
||||
file.month = file.date.getUTCMonth() + 1
|
||||
file.day = file.date.getUTCDate()
|
||||
|
||||
return file.year + '/' +
|
||||
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.month, 2) + '/' +
|
||||
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.day, 2)
|
||||
}
|
||||
|
||||
function pathFromDatetime(timestamp) {
|
||||
|
||||
let file = { date: new Date(timestamp) }
|
||||
|
||||
file.year = file.date.getUTCFullYear()
|
||||
file.month = file.date.getUTCMonth() + 1
|
||||
file.day = file.date.getUTCDate()
|
||||
file.hour = file.date.getUTCHours()
|
||||
file.minute = file.date.getMinutes()
|
||||
|
||||
return file.year + '/' +
|
||||
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.month, 2) + '/' +
|
||||
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.day, 2) + '/' +
|
||||
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.hour, 2) + '/' +
|
||||
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.minute, 2)
|
||||
}
|
||||
|
||||
/* Function to create folders of missing folders at any path. */
|
||||
function mkDirByPathSync(targetDir, { isRelativeToScript = false } = {}) {
|
||||
const path = SA.nodeModules.path
|
||||
|
||||
targetDir = targetDir.substring(0, targetDir.lastIndexOf('/') + 1);
|
||||
|
||||
const sep = '/';
|
||||
const initDir = path.isAbsolute(targetDir) ? sep : '';
|
||||
const baseDir = isRelativeToScript ? __dirname : '.';
|
||||
|
||||
return targetDir.split(sep).reduce((parentDir, childDir) => {
|
||||
const curDir = path.resolve(baseDir, parentDir, childDir);
|
||||
try {
|
||||
const fs = SA.nodeModules.fs
|
||||
fs.mkdirSync(curDir);
|
||||
} catch (err) {
|
||||
if (err.code === 'EEXIST') { // curDir already exists!
|
||||
return curDir;
|
||||
}
|
||||
|
||||
// To avoid `EISDIR` error on Mac and `EACCES`-->`ENOENT` and `EPERM` on Windows.
|
||||
if (err.code === 'ENOENT') { // Throw the original parentDir error on curDir `ENOENT` failure.
|
||||
throw new Error(`EACCES: permission denied, mkdir '${parentDir}'`);
|
||||
}
|
||||
|
||||
const caughtErr = ['EACCES', 'EPERM', 'EISDIR'].indexOf(err.code) > -1;
|
||||
if (!caughtErr || caughtErr && curDir === path.resolve(targetDir)) {
|
||||
throw err; // Throw if it's just the last created dir.
|
||||
}
|
||||
}
|
||||
|
||||
return curDir;
|
||||
}, initDir);
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ exports.newFoundationsUtilitiesHttpRequests = function () {
|
||||
|
||||
return thisObject
|
||||
|
||||
function getRequestBody(httpRequest, callback) { // Gets the de body from a POST httpRequest to the web server
|
||||
function getRequestBody(httpRequest, httpResponse, callback) { // Gets the de body from a POST httpRequest to the web server
|
||||
try {
|
||||
|
||||
let body = ''
|
||||
@@ -26,10 +26,12 @@ exports.newFoundationsUtilitiesHttpRequests = function () {
|
||||
httpRequest.on('error', function (err) {
|
||||
console.log('[ERROR] getBody -> err.stack = ' + err.stack)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_FAIL_RESPONSE), httpResponse)
|
||||
callback()
|
||||
})
|
||||
} catch (err) {
|
||||
console.log('[ERROR] getBody -> err.stack = ' + err.stack)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_FAIL_RESPONSE), httpResponse)
|
||||
callback()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
exports.newFoundationsUtilitiesMiscellaneousFunctions = function () {
|
||||
|
||||
let thisObject = {
|
||||
genereteUniqueId: genereteUniqueId
|
||||
genereteUniqueId: genereteUniqueId,
|
||||
pad: pad
|
||||
}
|
||||
|
||||
return thisObject
|
||||
@@ -12,4 +13,9 @@ exports.newFoundationsUtilitiesMiscellaneousFunctions = function () {
|
||||
return v.toString(16)
|
||||
})
|
||||
}
|
||||
|
||||
function pad(str, max) {
|
||||
str = str.toString();
|
||||
return str.length < max ? pad("0" + str, max) : str;
|
||||
}
|
||||
}
|
||||
@@ -33,32 +33,48 @@
|
||||
"propertyNameAtParent": "assets",
|
||||
"alternativeIcons": [
|
||||
{
|
||||
"codeName": "XMR",
|
||||
"iconName": "monero"
|
||||
"codeName": "ADA",
|
||||
"iconName": "cardano"
|
||||
},
|
||||
{
|
||||
"codeName": "USDT",
|
||||
"iconName": "tether"
|
||||
"codeName": "BCH",
|
||||
"iconName": "bitcoin-cash"
|
||||
},
|
||||
{
|
||||
"codeName": "TRX",
|
||||
"iconName": "tron"
|
||||
"codeName": "BNB",
|
||||
"iconName": "binance-coin"
|
||||
},
|
||||
{
|
||||
"codeName": "XLM",
|
||||
"iconName": "stellar"
|
||||
"codeName": "BTC",
|
||||
"iconName": "bitcoin"
|
||||
},
|
||||
{
|
||||
"codeName": "QTUM",
|
||||
"iconName": "qtum"
|
||||
"codeName": "BUSD",
|
||||
"iconName": "binance-usd"
|
||||
},
|
||||
{
|
||||
"codeName": "NEO",
|
||||
"iconName": "neo"
|
||||
"codeName": "CAKE",
|
||||
"iconName": "cake"
|
||||
},
|
||||
{
|
||||
"codeName": "LTC",
|
||||
"iconName": "litecoin"
|
||||
"codeName": "DAI",
|
||||
"iconName": "dai"
|
||||
},
|
||||
{
|
||||
"codeName": "DASH",
|
||||
"iconName": "dash"
|
||||
},
|
||||
{
|
||||
"codeName": "DOGE",
|
||||
"iconName": "dogecoin"
|
||||
},
|
||||
{
|
||||
"codeName": "DOT",
|
||||
"iconName": "polkadot"
|
||||
},
|
||||
{
|
||||
"codeName": "EOS",
|
||||
"iconName": "eos"
|
||||
},
|
||||
{
|
||||
"codeName": "ETC",
|
||||
@@ -69,72 +85,76 @@
|
||||
"iconName": "ethereum"
|
||||
},
|
||||
{
|
||||
"codeName": "EOS",
|
||||
"iconName": "eos"
|
||||
},
|
||||
{
|
||||
"codeName": "DASH",
|
||||
"iconName": "dash"
|
||||
},
|
||||
{
|
||||
"codeName": "ADA",
|
||||
"iconName": "cardano"
|
||||
},
|
||||
{
|
||||
"codeName": "BCH",
|
||||
"iconName": "bitcoin-cash"
|
||||
},
|
||||
{
|
||||
"codeName": "BTC",
|
||||
"iconName": "bitcoin"
|
||||
},
|
||||
{
|
||||
"codeName": "BNB",
|
||||
"iconName": "binance-coin"
|
||||
},
|
||||
{
|
||||
"codeName": "USD",
|
||||
"iconName": "us-dollar"
|
||||
},
|
||||
{
|
||||
"codeName": "ZAR",
|
||||
"iconName": "zar"
|
||||
},
|
||||
{
|
||||
"codeName": "XRP",
|
||||
"iconName": "xrp"
|
||||
},
|
||||
{
|
||||
"codeName": "DOGE",
|
||||
"iconName": "dogecoin"
|
||||
},
|
||||
{
|
||||
"codeName": "SOL",
|
||||
"iconName": "solana"
|
||||
},
|
||||
{
|
||||
"codeName": "DOT",
|
||||
"iconName": "polkadot"
|
||||
},
|
||||
{
|
||||
"codeName": "UNI",
|
||||
"iconName": "uniswap"
|
||||
},
|
||||
{
|
||||
"codeName": "BUSD",
|
||||
"iconName": "binance-usd"
|
||||
},
|
||||
{
|
||||
"codeName": "SXP",
|
||||
"iconName": "swipe"
|
||||
"codeName": "EUR",
|
||||
"iconName": "euro"
|
||||
},
|
||||
{
|
||||
"codeName": "LINK",
|
||||
"iconName": "chainlink"
|
||||
},
|
||||
{
|
||||
"codeName": "EUR",
|
||||
"iconName": "euro"
|
||||
"codeName": "LTC",
|
||||
"iconName": "litecoin"
|
||||
},
|
||||
{
|
||||
"codeName": "NANO",
|
||||
"iconName": "nano"
|
||||
},
|
||||
{
|
||||
"codeName": "NEO",
|
||||
"iconName": "neo"
|
||||
},
|
||||
{
|
||||
"codeName": "QTUM",
|
||||
"iconName": "qtum"
|
||||
},
|
||||
{
|
||||
"codeName": "SOL",
|
||||
"iconName": "solana"
|
||||
},
|
||||
{
|
||||
"codeName": "SXP",
|
||||
"iconName": "swipe"
|
||||
},
|
||||
{
|
||||
"codeName": "TRX",
|
||||
"iconName": "tron"
|
||||
},
|
||||
{
|
||||
"codeName": "XMR",
|
||||
"iconName": "monero"
|
||||
},
|
||||
{
|
||||
"codeName": "UNI",
|
||||
"iconName": "uniswap"
|
||||
},
|
||||
{
|
||||
"codeName": "USD",
|
||||
"iconName": "us-dollar"
|
||||
},
|
||||
{
|
||||
"codeName": "USDC",
|
||||
"iconName": "usdc"
|
||||
},
|
||||
{
|
||||
"codeName": "USDT",
|
||||
"iconName": "tether"
|
||||
},
|
||||
{
|
||||
"codeName": "VET",
|
||||
"iconName": "vechain"
|
||||
},
|
||||
{
|
||||
"codeName": "XLM",
|
||||
"iconName": "stellar"
|
||||
},
|
||||
{
|
||||
"codeName": "XRP",
|
||||
"iconName": "xrp"
|
||||
},
|
||||
{
|
||||
"codeName": "ZAR",
|
||||
"iconName": "zar"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -41,6 +41,12 @@
|
||||
"dontShowAtFullscreen": true,
|
||||
"actionFunction": "uiObject.configEditor.activate"
|
||||
},
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Social Bots",
|
||||
"relatedUiObject": "Social Bots",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Add Missing Children",
|
||||
"label": "Add Missing Children",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"addLeftIcons": true,
|
||||
"level": 2,
|
||||
"attachingRules": {
|
||||
"compatibleTypes": "->Network Node->"
|
||||
"compatibleTypes": "->LAN Network Node->"
|
||||
},
|
||||
"propertyNameAtParent": "dataStorage",
|
||||
"childrenNodesProperties": [
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"addLeftIcons": true,
|
||||
"level": 2,
|
||||
"attachingRules": {
|
||||
"compatibleTypes": "->Network Node->"
|
||||
"compatibleTypes": "->LAN Network Node->"
|
||||
},
|
||||
"propertyNameAtParent": "dataTasks",
|
||||
"childrenNodesProperties": [
|
||||
|
||||
@@ -41,6 +41,12 @@
|
||||
"dontShowAtFullscreen": true,
|
||||
"actionFunction": "uiObject.configEditor.activate"
|
||||
},
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Social Bots",
|
||||
"relatedUiObject": "Social Bots",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Add Missing Children",
|
||||
"label": "Add Missing Children",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "Network Node",
|
||||
"type": "LAN Network Node",
|
||||
"menuItems": [
|
||||
{
|
||||
"action": "Configure",
|
||||
@@ -69,7 +69,7 @@
|
||||
"addLeftIcons": true,
|
||||
"level": 1,
|
||||
"attachingRules": {
|
||||
"compatibleTypes": "->Network->"
|
||||
"compatibleTypes": "->LAN Network->"
|
||||
},
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
@@ -103,5 +103,5 @@
|
||||
"autoAdd": true
|
||||
}
|
||||
],
|
||||
"propertyNameAtParent": "networkNodes"
|
||||
"propertyNameAtParent": "lanNetworkNodes"
|
||||
}
|
||||