rubyfox-server 2.17.3.1 → 2.19.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubyfox/server/data/config/admin/descriptors/config_room.txt +10 -1
  3. data/lib/rubyfox/server/data/config/admin/descriptors/config_server.txt +90 -20
  4. data/lib/rubyfox/server/data/config/admin/descriptors/config_zone.txt +9 -0
  5. data/lib/rubyfox/server/data/config/admin/descriptors/runtime_room.txt +11 -0
  6. data/lib/rubyfox/server/data/config/admin/descriptors/runtime_user.txt +3 -3
  7. data/lib/rubyfox/server/data/config/core.xml +4 -4
  8. data/lib/rubyfox/server/data/config/default.words.txt +11 -0
  9. data/lib/rubyfox/server/data/config/log4j.properties +1 -2
  10. data/lib/rubyfox/server/data/config/server.xml +1 -1
  11. data/lib/rubyfox/server/data/data/GeoLite2-Country.mmdb +0 -0
  12. data/lib/rubyfox/server/data/data/bannedusers/users.bin +0 -0
  13. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/bootstrap.jar +0 -0
  14. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/catalina-tasks.xml +39 -39
  15. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/catalina.sh +0 -0
  16. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/ciphers.sh +0 -0
  17. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/commons-daemon-native.tar.gz +0 -0
  18. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/commons-daemon.jar +0 -0
  19. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/configtest.sh +0 -0
  20. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/daemon.sh +0 -0
  21. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/digest.sh +0 -0
  22. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/makebase.sh +0 -0
  23. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/setclasspath.sh +0 -0
  24. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/shutdown.sh +0 -0
  25. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/startup.sh +0 -0
  26. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/tomcat-juli.jar +0 -0
  27. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/tomcat-native.tar.gz +0 -0
  28. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/tool-wrapper.sh +0 -0
  29. data/lib/rubyfox/server/data/lib/apache-tomcat/bin/version.sh +0 -0
  30. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/Catalina/localhost/rewrite.config +1 -1
  31. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/catalina.policy +263 -264
  32. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/catalina.properties +209 -207
  33. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/context.xml +31 -31
  34. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/jaspic-providers.xml +23 -23
  35. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/jaspic-providers.xsd +52 -52
  36. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/keystore.jks +0 -0
  37. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/server.xml +177 -161
  38. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/tomcat-users.xml +18 -7
  39. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/tomcat-users.xsd +59 -59
  40. data/lib/rubyfox/server/data/lib/apache-tomcat/conf/web.xml +4740 -4737
  41. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/annotations-api.jar +0 -0
  42. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-ant.jar +0 -0
  43. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-ha.jar +0 -0
  44. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-ssi.jar +0 -0
  45. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-storeconfig.jar +0 -0
  46. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-tribes.jar +0 -0
  47. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina.jar +0 -0
  48. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/el-api.jar +0 -0
  49. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/jasper-el.jar +0 -0
  50. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/jasper.jar +0 -0
  51. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/jaspic-api.jar +0 -0
  52. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/jsp-api.jar +0 -0
  53. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/servlet-api.jar +0 -0
  54. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/sfs2x-ws-helper.jar +0 -0
  55. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-api.jar +0 -0
  56. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-coyote.jar +0 -0
  57. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-dbcp.jar +0 -0
  58. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-cs.jar +0 -0
  59. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-de.jar +0 -0
  60. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-es.jar +0 -0
  61. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-fr.jar +0 -0
  62. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-ja.jar +0 -0
  63. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-ko.jar +0 -0
  64. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-pt-BR.jar +0 -0
  65. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-ru.jar +0 -0
  66. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-zh-CN.jar +0 -0
  67. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-jdbc.jar +0 -0
  68. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-jni.jar +0 -0
  69. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-util-scan.jar +0 -0
  70. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-util.jar +0 -0
  71. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-websocket.jar +0 -0
  72. data/lib/rubyfox/server/data/lib/apache-tomcat/lib/websocket-api.jar +0 -0
  73. data/lib/rubyfox/server/data/lib/javax.activation-1.2.0.jar +0 -0
  74. data/lib/rubyfox/server/data/lib/javax.mail.jar +0 -0
  75. data/lib/rubyfox/server/data/lib/js/JSApi.js +2 -1
  76. data/lib/rubyfox/server/data/lib/js/LibApi.js +181 -48
  77. data/lib/rubyfox/server/data/lib/sfs2x-admin.jar +0 -0
  78. data/lib/rubyfox/server/data/lib/sfs2x-cluster.jar +0 -0
  79. data/lib/rubyfox/server/data/lib/sfs2x-core.jar +0 -0
  80. data/lib/rubyfox/server/data/lib/sfs2x.jar +0 -0
  81. data/lib/rubyfox/server/data/sfs2x-service +26 -30
  82. data/lib/rubyfox/server/data/www/BlueBox.war +0 -0
  83. data/lib/rubyfox/server/data/www/HelloServlet/WEB-INF/web.xml +1 -3
  84. data/lib/rubyfox/server/data/www/ROOT/_css_/default.css +14 -6
  85. data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/style.css +44 -2
  86. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/application.bundle.js +98 -61
  87. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/endors~mod-0~mod-1~mod-11~mod-12~mod-17~mod-6~mod-7~mod-8~mod-9.bundle.js +17357 -0
  88. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-0.bundle.js +4 -4
  89. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-1.bundle.js +3 -3
  90. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-10.bundle.js +101 -66
  91. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-11.bundle.js +544 -8
  92. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-12.bundle.js +915 -1480
  93. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-12~module-15~module-16~module-4.bundle.js +2665 -0
  94. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-13.bundle.js +606 -3093
  95. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-13~module-16~module-17~module-4.bundle.js +2665 -0
  96. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-14.bundle.js +764 -0
  97. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-15.bundle.js +71 -0
  98. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-16.bundle.js +1787 -0
  99. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-17.bundle.js +3383 -0
  100. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-4.bundle.js +121 -1009
  101. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-5.bundle.js +1214 -1744
  102. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-6.bundle.js +398 -666
  103. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-7.bundle.js +717 -192
  104. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-8.bundle.js +2117 -665
  105. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-9.bundle.js +613 -690
  106. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~mod-0~mod-1~mod-10~mod-11~mod-16~mod-5~mod-6~mod-7~mod-8.bundle.js +17357 -0
  107. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~mod-0~mod-1~mod-11~mod-12~mod-17~mod-5~mod-6~mod-7~mod-8~mod-9.bundle.js +17357 -0
  108. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/{vendors~module-0~module-1~module-13~module-4~module-5~module-7~module-8.bundle.js → vendors~mod-0~mod-1~mod-11~mod-12~mod-17~mod-5~mod-7~mod-8~mod-9.bundle.js} +2 -2
  109. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~module-12.bundle.js +807 -0
  110. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~module-13.bundle.js +807 -0
  111. data/lib/rubyfox/server/data/www/ROOT/admin/modules/cluster-configurator.html +32 -0
  112. data/lib/rubyfox/server/data/www/ROOT/admin/modules/cluster-monitor.html +185 -0
  113. data/lib/rubyfox/server/data/www/ROOT/admin/modules/cluster-updater.html +47 -0
  114. data/lib/rubyfox/server/data/www/ROOT/admin/modules/extension-deployer.html +84 -0
  115. data/lib/rubyfox/server/data/www/ROOT/admin/modules/zone-monitor.html +15 -8
  116. data/lib/rubyfox/server/data/www/ROOT/index.html +13 -23
  117. data/lib/rubyfox/server/data/www/host-manager/META-INF/context.xml +2 -2
  118. data/lib/rubyfox/server/data/www/host-manager/WEB-INF/jsp/404.jsp +2 -2
  119. data/lib/rubyfox/server/data/www/host-manager/{manager.xml → WEB-INF/manager.xml} +5 -1
  120. data/lib/rubyfox/server/data/www/host-manager/WEB-INF/web.xml +17 -0
  121. data/lib/rubyfox/server/data/www/host-manager/css/manager.css +141 -0
  122. data/lib/rubyfox/server/data/www/host-manager/images/tomcat.svg +967 -0
  123. data/lib/rubyfox/server/data/www/manager/META-INF/context.xml +2 -0
  124. data/lib/rubyfox/server/data/www/manager/WEB-INF/jsp/connectorCerts.jsp +1 -1
  125. data/lib/rubyfox/server/data/www/manager/WEB-INF/jsp/connectorCiphers.jsp +1 -1
  126. data/lib/rubyfox/server/data/www/manager/WEB-INF/jsp/connectorTrustedCerts.jsp +1 -1
  127. data/lib/rubyfox/server/data/www/manager/WEB-INF/jsp/sessionDetail.jsp +3 -3
  128. data/lib/rubyfox/server/data/www/manager/WEB-INF/jsp/sessionsList.jsp +1 -1
  129. data/lib/rubyfox/server/data/www/manager/WEB-INF/web.xml +17 -0
  130. data/lib/rubyfox/server/data/www/manager/css/manager.css +141 -0
  131. data/lib/rubyfox/server/data/www/manager/images/tomcat.svg +967 -0
  132. data/lib/rubyfox/server/data/www/manager/xform.xsl +74 -59
  133. data/lib/rubyfox/server/version.rb +1 -1
  134. metadata +30 -31
  135. data/lib/rubyfox/server/data/config/admin/icons/Analytics.png +0 -0
  136. data/lib/rubyfox/server/data/config/admin/icons/BanManager.png +0 -0
  137. data/lib/rubyfox/server/data/config/admin/icons/BlueBoxMonitor.png +0 -0
  138. data/lib/rubyfox/server/data/config/admin/icons/Console.png +0 -0
  139. data/lib/rubyfox/server/data/config/admin/icons/Dashboard.png +0 -0
  140. data/lib/rubyfox/server/data/config/admin/icons/ExtensionManager.png +0 -0
  141. data/lib/rubyfox/server/data/config/admin/icons/LicenseManager.png +0 -0
  142. data/lib/rubyfox/server/data/config/admin/icons/LogViewer.png +0 -0
  143. data/lib/rubyfox/server/data/config/admin/icons/ServerConfigurator.png +0 -0
  144. data/lib/rubyfox/server/data/config/admin/icons/ServletManager.png +0 -0
  145. data/lib/rubyfox/server/data/config/admin/icons/ZoneConfigurator.png +0 -0
  146. data/lib/rubyfox/server/data/config/admin/icons/ZoneMonitor.png +0 -0
  147. data/lib/rubyfox/server/data/lib/BlueBox.war +0 -0
  148. data/lib/rubyfox/server/data/lib/apache-tomcat/LICENSE +0 -1061
  149. data/lib/rubyfox/server/data/lib/apache-tomcat/NOTICE +0 -68
  150. data/lib/rubyfox/server/data/lib/apache-tomcat/README.md +0 -81
  151. data/lib/rubyfox/server/data/lib/apache-tomcat/RELEASE-NOTES +0 -174
  152. data/lib/rubyfox/server/data/lib/imap.jar +0 -0
  153. data/lib/rubyfox/server/data/lib/mailapi.jar +0 -0
  154. data/lib/rubyfox/server/data/lib/pop3.jar +0 -0
  155. data/lib/rubyfox/server/data/lib/smtp.jar +0 -0
  156. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-12~module-13~module-9.bundle.js +0 -2634
  157. data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~module-9.bundle.js +0 -807
  158. data/lib/rubyfox/server/data/www/host-manager/images/tomcat.gif +0 -0
  159. data/lib/rubyfox/server/data/www/manager/images/tomcat.gif +0 -0
  160. /data/lib/rubyfox/server/data/data/buddylists/{BasicExamples/.keep → .keep} +0 -0
@@ -0,0 +1,3383 @@
1
+ /*! (c) gotoAndPlay | All rights reserved */
2
+ (window["webpackJsonpapplication"] = window["webpackJsonpapplication"] || []).push([["module-17"],{
3
+
4
+ /***/ "./node_modules/moment/locale sync recursive ^\\.\\/.*$":
5
+ /*!**************************************************!*\
6
+ !*** ./node_modules/moment/locale sync ^\.\/.*$ ***!
7
+ \**************************************************/
8
+ /*! no static exports found */
9
+ /***/ (function(module, exports, __webpack_require__) {
10
+
11
+ var map = {
12
+ "./af": "./node_modules/moment/locale/af.js",
13
+ "./af.js": "./node_modules/moment/locale/af.js",
14
+ "./ar": "./node_modules/moment/locale/ar.js",
15
+ "./ar-dz": "./node_modules/moment/locale/ar-dz.js",
16
+ "./ar-dz.js": "./node_modules/moment/locale/ar-dz.js",
17
+ "./ar-kw": "./node_modules/moment/locale/ar-kw.js",
18
+ "./ar-kw.js": "./node_modules/moment/locale/ar-kw.js",
19
+ "./ar-ly": "./node_modules/moment/locale/ar-ly.js",
20
+ "./ar-ly.js": "./node_modules/moment/locale/ar-ly.js",
21
+ "./ar-ma": "./node_modules/moment/locale/ar-ma.js",
22
+ "./ar-ma.js": "./node_modules/moment/locale/ar-ma.js",
23
+ "./ar-sa": "./node_modules/moment/locale/ar-sa.js",
24
+ "./ar-sa.js": "./node_modules/moment/locale/ar-sa.js",
25
+ "./ar-tn": "./node_modules/moment/locale/ar-tn.js",
26
+ "./ar-tn.js": "./node_modules/moment/locale/ar-tn.js",
27
+ "./ar.js": "./node_modules/moment/locale/ar.js",
28
+ "./az": "./node_modules/moment/locale/az.js",
29
+ "./az.js": "./node_modules/moment/locale/az.js",
30
+ "./be": "./node_modules/moment/locale/be.js",
31
+ "./be.js": "./node_modules/moment/locale/be.js",
32
+ "./bg": "./node_modules/moment/locale/bg.js",
33
+ "./bg.js": "./node_modules/moment/locale/bg.js",
34
+ "./bm": "./node_modules/moment/locale/bm.js",
35
+ "./bm.js": "./node_modules/moment/locale/bm.js",
36
+ "./bn": "./node_modules/moment/locale/bn.js",
37
+ "./bn.js": "./node_modules/moment/locale/bn.js",
38
+ "./bo": "./node_modules/moment/locale/bo.js",
39
+ "./bo.js": "./node_modules/moment/locale/bo.js",
40
+ "./br": "./node_modules/moment/locale/br.js",
41
+ "./br.js": "./node_modules/moment/locale/br.js",
42
+ "./bs": "./node_modules/moment/locale/bs.js",
43
+ "./bs.js": "./node_modules/moment/locale/bs.js",
44
+ "./ca": "./node_modules/moment/locale/ca.js",
45
+ "./ca.js": "./node_modules/moment/locale/ca.js",
46
+ "./cs": "./node_modules/moment/locale/cs.js",
47
+ "./cs.js": "./node_modules/moment/locale/cs.js",
48
+ "./cv": "./node_modules/moment/locale/cv.js",
49
+ "./cv.js": "./node_modules/moment/locale/cv.js",
50
+ "./cy": "./node_modules/moment/locale/cy.js",
51
+ "./cy.js": "./node_modules/moment/locale/cy.js",
52
+ "./da": "./node_modules/moment/locale/da.js",
53
+ "./da.js": "./node_modules/moment/locale/da.js",
54
+ "./de": "./node_modules/moment/locale/de.js",
55
+ "./de-at": "./node_modules/moment/locale/de-at.js",
56
+ "./de-at.js": "./node_modules/moment/locale/de-at.js",
57
+ "./de-ch": "./node_modules/moment/locale/de-ch.js",
58
+ "./de-ch.js": "./node_modules/moment/locale/de-ch.js",
59
+ "./de.js": "./node_modules/moment/locale/de.js",
60
+ "./dv": "./node_modules/moment/locale/dv.js",
61
+ "./dv.js": "./node_modules/moment/locale/dv.js",
62
+ "./el": "./node_modules/moment/locale/el.js",
63
+ "./el.js": "./node_modules/moment/locale/el.js",
64
+ "./en-SG": "./node_modules/moment/locale/en-SG.js",
65
+ "./en-SG.js": "./node_modules/moment/locale/en-SG.js",
66
+ "./en-au": "./node_modules/moment/locale/en-au.js",
67
+ "./en-au.js": "./node_modules/moment/locale/en-au.js",
68
+ "./en-ca": "./node_modules/moment/locale/en-ca.js",
69
+ "./en-ca.js": "./node_modules/moment/locale/en-ca.js",
70
+ "./en-gb": "./node_modules/moment/locale/en-gb.js",
71
+ "./en-gb.js": "./node_modules/moment/locale/en-gb.js",
72
+ "./en-ie": "./node_modules/moment/locale/en-ie.js",
73
+ "./en-ie.js": "./node_modules/moment/locale/en-ie.js",
74
+ "./en-il": "./node_modules/moment/locale/en-il.js",
75
+ "./en-il.js": "./node_modules/moment/locale/en-il.js",
76
+ "./en-nz": "./node_modules/moment/locale/en-nz.js",
77
+ "./en-nz.js": "./node_modules/moment/locale/en-nz.js",
78
+ "./eo": "./node_modules/moment/locale/eo.js",
79
+ "./eo.js": "./node_modules/moment/locale/eo.js",
80
+ "./es": "./node_modules/moment/locale/es.js",
81
+ "./es-do": "./node_modules/moment/locale/es-do.js",
82
+ "./es-do.js": "./node_modules/moment/locale/es-do.js",
83
+ "./es-us": "./node_modules/moment/locale/es-us.js",
84
+ "./es-us.js": "./node_modules/moment/locale/es-us.js",
85
+ "./es.js": "./node_modules/moment/locale/es.js",
86
+ "./et": "./node_modules/moment/locale/et.js",
87
+ "./et.js": "./node_modules/moment/locale/et.js",
88
+ "./eu": "./node_modules/moment/locale/eu.js",
89
+ "./eu.js": "./node_modules/moment/locale/eu.js",
90
+ "./fa": "./node_modules/moment/locale/fa.js",
91
+ "./fa.js": "./node_modules/moment/locale/fa.js",
92
+ "./fi": "./node_modules/moment/locale/fi.js",
93
+ "./fi.js": "./node_modules/moment/locale/fi.js",
94
+ "./fo": "./node_modules/moment/locale/fo.js",
95
+ "./fo.js": "./node_modules/moment/locale/fo.js",
96
+ "./fr": "./node_modules/moment/locale/fr.js",
97
+ "./fr-ca": "./node_modules/moment/locale/fr-ca.js",
98
+ "./fr-ca.js": "./node_modules/moment/locale/fr-ca.js",
99
+ "./fr-ch": "./node_modules/moment/locale/fr-ch.js",
100
+ "./fr-ch.js": "./node_modules/moment/locale/fr-ch.js",
101
+ "./fr.js": "./node_modules/moment/locale/fr.js",
102
+ "./fy": "./node_modules/moment/locale/fy.js",
103
+ "./fy.js": "./node_modules/moment/locale/fy.js",
104
+ "./ga": "./node_modules/moment/locale/ga.js",
105
+ "./ga.js": "./node_modules/moment/locale/ga.js",
106
+ "./gd": "./node_modules/moment/locale/gd.js",
107
+ "./gd.js": "./node_modules/moment/locale/gd.js",
108
+ "./gl": "./node_modules/moment/locale/gl.js",
109
+ "./gl.js": "./node_modules/moment/locale/gl.js",
110
+ "./gom-latn": "./node_modules/moment/locale/gom-latn.js",
111
+ "./gom-latn.js": "./node_modules/moment/locale/gom-latn.js",
112
+ "./gu": "./node_modules/moment/locale/gu.js",
113
+ "./gu.js": "./node_modules/moment/locale/gu.js",
114
+ "./he": "./node_modules/moment/locale/he.js",
115
+ "./he.js": "./node_modules/moment/locale/he.js",
116
+ "./hi": "./node_modules/moment/locale/hi.js",
117
+ "./hi.js": "./node_modules/moment/locale/hi.js",
118
+ "./hr": "./node_modules/moment/locale/hr.js",
119
+ "./hr.js": "./node_modules/moment/locale/hr.js",
120
+ "./hu": "./node_modules/moment/locale/hu.js",
121
+ "./hu.js": "./node_modules/moment/locale/hu.js",
122
+ "./hy-am": "./node_modules/moment/locale/hy-am.js",
123
+ "./hy-am.js": "./node_modules/moment/locale/hy-am.js",
124
+ "./id": "./node_modules/moment/locale/id.js",
125
+ "./id.js": "./node_modules/moment/locale/id.js",
126
+ "./is": "./node_modules/moment/locale/is.js",
127
+ "./is.js": "./node_modules/moment/locale/is.js",
128
+ "./it": "./node_modules/moment/locale/it.js",
129
+ "./it-ch": "./node_modules/moment/locale/it-ch.js",
130
+ "./it-ch.js": "./node_modules/moment/locale/it-ch.js",
131
+ "./it.js": "./node_modules/moment/locale/it.js",
132
+ "./ja": "./node_modules/moment/locale/ja.js",
133
+ "./ja.js": "./node_modules/moment/locale/ja.js",
134
+ "./jv": "./node_modules/moment/locale/jv.js",
135
+ "./jv.js": "./node_modules/moment/locale/jv.js",
136
+ "./ka": "./node_modules/moment/locale/ka.js",
137
+ "./ka.js": "./node_modules/moment/locale/ka.js",
138
+ "./kk": "./node_modules/moment/locale/kk.js",
139
+ "./kk.js": "./node_modules/moment/locale/kk.js",
140
+ "./km": "./node_modules/moment/locale/km.js",
141
+ "./km.js": "./node_modules/moment/locale/km.js",
142
+ "./kn": "./node_modules/moment/locale/kn.js",
143
+ "./kn.js": "./node_modules/moment/locale/kn.js",
144
+ "./ko": "./node_modules/moment/locale/ko.js",
145
+ "./ko.js": "./node_modules/moment/locale/ko.js",
146
+ "./ku": "./node_modules/moment/locale/ku.js",
147
+ "./ku.js": "./node_modules/moment/locale/ku.js",
148
+ "./ky": "./node_modules/moment/locale/ky.js",
149
+ "./ky.js": "./node_modules/moment/locale/ky.js",
150
+ "./lb": "./node_modules/moment/locale/lb.js",
151
+ "./lb.js": "./node_modules/moment/locale/lb.js",
152
+ "./lo": "./node_modules/moment/locale/lo.js",
153
+ "./lo.js": "./node_modules/moment/locale/lo.js",
154
+ "./lt": "./node_modules/moment/locale/lt.js",
155
+ "./lt.js": "./node_modules/moment/locale/lt.js",
156
+ "./lv": "./node_modules/moment/locale/lv.js",
157
+ "./lv.js": "./node_modules/moment/locale/lv.js",
158
+ "./me": "./node_modules/moment/locale/me.js",
159
+ "./me.js": "./node_modules/moment/locale/me.js",
160
+ "./mi": "./node_modules/moment/locale/mi.js",
161
+ "./mi.js": "./node_modules/moment/locale/mi.js",
162
+ "./mk": "./node_modules/moment/locale/mk.js",
163
+ "./mk.js": "./node_modules/moment/locale/mk.js",
164
+ "./ml": "./node_modules/moment/locale/ml.js",
165
+ "./ml.js": "./node_modules/moment/locale/ml.js",
166
+ "./mn": "./node_modules/moment/locale/mn.js",
167
+ "./mn.js": "./node_modules/moment/locale/mn.js",
168
+ "./mr": "./node_modules/moment/locale/mr.js",
169
+ "./mr.js": "./node_modules/moment/locale/mr.js",
170
+ "./ms": "./node_modules/moment/locale/ms.js",
171
+ "./ms-my": "./node_modules/moment/locale/ms-my.js",
172
+ "./ms-my.js": "./node_modules/moment/locale/ms-my.js",
173
+ "./ms.js": "./node_modules/moment/locale/ms.js",
174
+ "./mt": "./node_modules/moment/locale/mt.js",
175
+ "./mt.js": "./node_modules/moment/locale/mt.js",
176
+ "./my": "./node_modules/moment/locale/my.js",
177
+ "./my.js": "./node_modules/moment/locale/my.js",
178
+ "./nb": "./node_modules/moment/locale/nb.js",
179
+ "./nb.js": "./node_modules/moment/locale/nb.js",
180
+ "./ne": "./node_modules/moment/locale/ne.js",
181
+ "./ne.js": "./node_modules/moment/locale/ne.js",
182
+ "./nl": "./node_modules/moment/locale/nl.js",
183
+ "./nl-be": "./node_modules/moment/locale/nl-be.js",
184
+ "./nl-be.js": "./node_modules/moment/locale/nl-be.js",
185
+ "./nl.js": "./node_modules/moment/locale/nl.js",
186
+ "./nn": "./node_modules/moment/locale/nn.js",
187
+ "./nn.js": "./node_modules/moment/locale/nn.js",
188
+ "./pa-in": "./node_modules/moment/locale/pa-in.js",
189
+ "./pa-in.js": "./node_modules/moment/locale/pa-in.js",
190
+ "./pl": "./node_modules/moment/locale/pl.js",
191
+ "./pl.js": "./node_modules/moment/locale/pl.js",
192
+ "./pt": "./node_modules/moment/locale/pt.js",
193
+ "./pt-br": "./node_modules/moment/locale/pt-br.js",
194
+ "./pt-br.js": "./node_modules/moment/locale/pt-br.js",
195
+ "./pt.js": "./node_modules/moment/locale/pt.js",
196
+ "./ro": "./node_modules/moment/locale/ro.js",
197
+ "./ro.js": "./node_modules/moment/locale/ro.js",
198
+ "./ru": "./node_modules/moment/locale/ru.js",
199
+ "./ru.js": "./node_modules/moment/locale/ru.js",
200
+ "./sd": "./node_modules/moment/locale/sd.js",
201
+ "./sd.js": "./node_modules/moment/locale/sd.js",
202
+ "./se": "./node_modules/moment/locale/se.js",
203
+ "./se.js": "./node_modules/moment/locale/se.js",
204
+ "./si": "./node_modules/moment/locale/si.js",
205
+ "./si.js": "./node_modules/moment/locale/si.js",
206
+ "./sk": "./node_modules/moment/locale/sk.js",
207
+ "./sk.js": "./node_modules/moment/locale/sk.js",
208
+ "./sl": "./node_modules/moment/locale/sl.js",
209
+ "./sl.js": "./node_modules/moment/locale/sl.js",
210
+ "./sq": "./node_modules/moment/locale/sq.js",
211
+ "./sq.js": "./node_modules/moment/locale/sq.js",
212
+ "./sr": "./node_modules/moment/locale/sr.js",
213
+ "./sr-cyrl": "./node_modules/moment/locale/sr-cyrl.js",
214
+ "./sr-cyrl.js": "./node_modules/moment/locale/sr-cyrl.js",
215
+ "./sr.js": "./node_modules/moment/locale/sr.js",
216
+ "./ss": "./node_modules/moment/locale/ss.js",
217
+ "./ss.js": "./node_modules/moment/locale/ss.js",
218
+ "./sv": "./node_modules/moment/locale/sv.js",
219
+ "./sv.js": "./node_modules/moment/locale/sv.js",
220
+ "./sw": "./node_modules/moment/locale/sw.js",
221
+ "./sw.js": "./node_modules/moment/locale/sw.js",
222
+ "./ta": "./node_modules/moment/locale/ta.js",
223
+ "./ta.js": "./node_modules/moment/locale/ta.js",
224
+ "./te": "./node_modules/moment/locale/te.js",
225
+ "./te.js": "./node_modules/moment/locale/te.js",
226
+ "./tet": "./node_modules/moment/locale/tet.js",
227
+ "./tet.js": "./node_modules/moment/locale/tet.js",
228
+ "./tg": "./node_modules/moment/locale/tg.js",
229
+ "./tg.js": "./node_modules/moment/locale/tg.js",
230
+ "./th": "./node_modules/moment/locale/th.js",
231
+ "./th.js": "./node_modules/moment/locale/th.js",
232
+ "./tl-ph": "./node_modules/moment/locale/tl-ph.js",
233
+ "./tl-ph.js": "./node_modules/moment/locale/tl-ph.js",
234
+ "./tlh": "./node_modules/moment/locale/tlh.js",
235
+ "./tlh.js": "./node_modules/moment/locale/tlh.js",
236
+ "./tr": "./node_modules/moment/locale/tr.js",
237
+ "./tr.js": "./node_modules/moment/locale/tr.js",
238
+ "./tzl": "./node_modules/moment/locale/tzl.js",
239
+ "./tzl.js": "./node_modules/moment/locale/tzl.js",
240
+ "./tzm": "./node_modules/moment/locale/tzm.js",
241
+ "./tzm-latn": "./node_modules/moment/locale/tzm-latn.js",
242
+ "./tzm-latn.js": "./node_modules/moment/locale/tzm-latn.js",
243
+ "./tzm.js": "./node_modules/moment/locale/tzm.js",
244
+ "./ug-cn": "./node_modules/moment/locale/ug-cn.js",
245
+ "./ug-cn.js": "./node_modules/moment/locale/ug-cn.js",
246
+ "./uk": "./node_modules/moment/locale/uk.js",
247
+ "./uk.js": "./node_modules/moment/locale/uk.js",
248
+ "./ur": "./node_modules/moment/locale/ur.js",
249
+ "./ur.js": "./node_modules/moment/locale/ur.js",
250
+ "./uz": "./node_modules/moment/locale/uz.js",
251
+ "./uz-latn": "./node_modules/moment/locale/uz-latn.js",
252
+ "./uz-latn.js": "./node_modules/moment/locale/uz-latn.js",
253
+ "./uz.js": "./node_modules/moment/locale/uz.js",
254
+ "./vi": "./node_modules/moment/locale/vi.js",
255
+ "./vi.js": "./node_modules/moment/locale/vi.js",
256
+ "./x-pseudo": "./node_modules/moment/locale/x-pseudo.js",
257
+ "./x-pseudo.js": "./node_modules/moment/locale/x-pseudo.js",
258
+ "./yo": "./node_modules/moment/locale/yo.js",
259
+ "./yo.js": "./node_modules/moment/locale/yo.js",
260
+ "./zh-cn": "./node_modules/moment/locale/zh-cn.js",
261
+ "./zh-cn.js": "./node_modules/moment/locale/zh-cn.js",
262
+ "./zh-hk": "./node_modules/moment/locale/zh-hk.js",
263
+ "./zh-hk.js": "./node_modules/moment/locale/zh-hk.js",
264
+ "./zh-tw": "./node_modules/moment/locale/zh-tw.js",
265
+ "./zh-tw.js": "./node_modules/moment/locale/zh-tw.js"
266
+ };
267
+
268
+
269
+ function webpackContext(req) {
270
+ var id = webpackContextResolve(req);
271
+ return __webpack_require__(id);
272
+ }
273
+ function webpackContextResolve(req) {
274
+ if(!__webpack_require__.o(map, req)) {
275
+ var e = new Error("Cannot find module '" + req + "'");
276
+ e.code = 'MODULE_NOT_FOUND';
277
+ throw e;
278
+ }
279
+ return map[req];
280
+ }
281
+ webpackContext.keys = function webpackContextKeys() {
282
+ return Object.keys(map);
283
+ };
284
+ webpackContext.resolve = webpackContextResolve;
285
+ module.exports = webpackContext;
286
+ webpackContext.id = "./node_modules/moment/locale sync recursive ^\\.\\/.*$";
287
+
288
+ /***/ }),
289
+
290
+ /***/ "./src/components/charts/chart-utils.js":
291
+ /*!**********************************************!*\
292
+ !*** ./src/components/charts/chart-utils.js ***!
293
+ \**********************************************/
294
+ /*! exports provided: getFormattedDateTime, getBasicSharedTemplate, getMemorySharedTemplate, getMemoryValueAxisLabelTemplate, getNetworkSharedTemplate, getNetworkValueAxisLabelTemplate, getNetworkValueAxisLabelTemplateB, getUserCountSharedTemplate, getTimeRangeTooltipTemplate, getWRBytesLabelTemplate, getBasicTemplate, getMemoryTemplate, getNetworkTemplate */
295
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
296
+
297
+ "use strict";
298
+ __webpack_require__.r(__webpack_exports__);
299
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormattedDateTime", function() { return getFormattedDateTime; });
300
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBasicSharedTemplate", function() { return getBasicSharedTemplate; });
301
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMemorySharedTemplate", function() { return getMemorySharedTemplate; });
302
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMemoryValueAxisLabelTemplate", function() { return getMemoryValueAxisLabelTemplate; });
303
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNetworkSharedTemplate", function() { return getNetworkSharedTemplate; });
304
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNetworkValueAxisLabelTemplate", function() { return getNetworkValueAxisLabelTemplate; });
305
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNetworkValueAxisLabelTemplateB", function() { return getNetworkValueAxisLabelTemplateB; });
306
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUserCountSharedTemplate", function() { return getUserCountSharedTemplate; });
307
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTimeRangeTooltipTemplate", function() { return getTimeRangeTooltipTemplate; });
308
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWRBytesLabelTemplate", function() { return getWRBytesLabelTemplate; });
309
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBasicTemplate", function() { return getBasicTemplate; });
310
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMemoryTemplate", function() { return getMemoryTemplate; });
311
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNetworkTemplate", function() { return getNetworkTemplate; });
312
+ /* harmony import */ var _utils_utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/utilities */ "./src/utils/utilities.js");
313
+
314
+
315
+ function getFormattedDateTime(date, format = 'dd MMM HH:mm:ss')
316
+ {
317
+ return kendo.toString(date, format);
318
+ }
319
+
320
+ function getBasicSharedTemplate(valueFormat = '{0}') {
321
+ return kendo.template(`
322
+ <div class="chart-tooltip-category"><strong>#: category #</strong></div>
323
+ # for (var i = 0; i < points.length; i++) { #
324
+ <div>
325
+ <i class="fas fa-square" style="color: #: points[i].color # "></i>
326
+ #: points[i].series.name# : #: kendo.format('${valueFormat}', points[i].value) #
327
+ </div>
328
+ # } #
329
+ `);
330
+ }
331
+
332
+ function getMemorySharedTemplate() {
333
+ return function(dataItem) {
334
+ dataItem.bytesToSize = _utils_utilities__WEBPACK_IMPORTED_MODULE_0__["bytesToSize"]; // Pass bytesToSize utility function to template
335
+ return kendo.template(`
336
+ <div class="chart-tooltip-category"><strong>#: category #</strong></div>
337
+ # for (var i = 0; i < points.length; i++) { #
338
+ <div>
339
+ <i class="fas fa-square" style="color: #: points[i].color # "></i>
340
+ #: points[i].series.name# : #: bytesToSize(points[i].value) #
341
+ </div>
342
+ # } #
343
+ `)(dataItem);
344
+ };
345
+ }
346
+
347
+ function getMemoryValueAxisLabelTemplate() {
348
+ return function(dataItem) {
349
+ dataItem.bytesToSize = _utils_utilities__WEBPACK_IMPORTED_MODULE_0__["bytesToSize"]; // Pass bytesToSize utility function to template
350
+ return kendo.template(`
351
+ #: bytesToSize(value) #
352
+ `)(dataItem);
353
+ };
354
+ }
355
+
356
+ function getNetworkSharedTemplate(categoryFormat = 'dd MMM HH:mm:ss') {
357
+ return function(dataItem) {
358
+ dataItem.kBytesToSize = _utils_utilities__WEBPACK_IMPORTED_MODULE_0__["kBytesToSize"]; // Pass kBytesToSize utility function to template
359
+ return kendo.template(`
360
+ <div class="chart-tooltip-category"><strong>#: kendo.toString(category, '${categoryFormat}') #</strong></div>
361
+ # for (var i = 0; i < points.length; i++) { #
362
+ <div>
363
+ <i class="fas fa-square" style="color: #: points[i].color # "></i>
364
+ #: points[i].series.name# : #: kBytesToSize(points[i].value, 1, '', '/s') #
365
+ </div>
366
+ # } #
367
+ `)(dataItem);
368
+ };
369
+ }
370
+
371
+ function getNetworkValueAxisLabelTemplate() {
372
+ return function(dataItem) {
373
+ dataItem.kBytesToSize = _utils_utilities__WEBPACK_IMPORTED_MODULE_0__["kBytesToSize"]; // Pass kBytesToSize utility function to template
374
+ return kendo.template(`
375
+ #: kBytesToSize(value, 1, '', '/s') #
376
+ `)(dataItem);
377
+ };
378
+ }
379
+
380
+ function getNetworkValueAxisLabelTemplateB() {
381
+ return function(dataItem) {
382
+ dataItem.bytesToSize = _utils_utilities__WEBPACK_IMPORTED_MODULE_0__["bytesToSize"]; // Pass bytesToSize utility function to template
383
+ return kendo.template(`
384
+ #: bytesToSize(value, 1, '', '/s') #
385
+ `)(dataItem);
386
+ };
387
+ }
388
+
389
+ function getUserCountSharedTemplate(categoryFormat = 'dd MMM HH:mm:ss') {
390
+ return function(dataItem) {
391
+ return kendo.template(`
392
+ <div class="chart-tooltip-category"><strong>#: kendo.toString(category, '${categoryFormat}') #</strong></div>
393
+ # for (var i = 0; i < points.length; i++) { #
394
+ <div>
395
+ <i class="fas fa-square" style="color: #: points[i].color # "></i>
396
+ #: points[i].series.name# : #: points[i].value #
397
+ </div>
398
+ # } #
399
+ `)(dataItem);
400
+ };
401
+ }
402
+
403
+ function getTimeRangeTooltipTemplate() {
404
+ return function(dataItem) {
405
+ dataItem.getTooltipString = function(v1, v2) {
406
+ if (v1 == v2)
407
+ {
408
+ if (v2 == -24)
409
+ v2 = -23;
410
+
411
+ v1 = v2 - 1;
412
+ }
413
+
414
+ let start = Math.abs(v1);
415
+ let end = Math.abs(v2);
416
+
417
+ return `From ${start} hour${start != 1 ? 's' : ''} ago to ${end > 0 ? ('to ' + end + ' hour' + (end != 1 ? 's' : '') + ' ago') : 'now'}`;
418
+ }; // Pass utility function to template
419
+ return kendo.template(`
420
+ #: getTooltipString(selectionStart, selectionEnd) #
421
+ `)(dataItem);
422
+ };
423
+ }
424
+
425
+ function getWRBytesLabelTemplate() {
426
+ return function(dataItem) {
427
+ return kendo.template(`
428
+ #: value # #: dataItem.unit #
429
+ `)(dataItem);
430
+ };
431
+ }
432
+
433
+ function getBasicTemplate(valueFormat = '{0}') {
434
+ return kendo.template(`
435
+ <div>
436
+ <span class="text-nowrap">#: kendo.toString(new Date(value.x), "dd/MM/yy HH:mm") #</span>
437
+ <br>
438
+ <strong class="text-nowrap">#: series.name #: #: kendo.format('${valueFormat}', value.y) # </strong>
439
+ </div>
440
+ `);
441
+ }
442
+
443
+ function getMemoryTemplate() {
444
+ return function(dataItem) {
445
+ dataItem.bytesToSize = _utils_utilities__WEBPACK_IMPORTED_MODULE_0__["bytesToSize"]; // Pass bytesToSize utility function to template
446
+ return kendo.template(`
447
+ <div>
448
+ <span class="text-nowrap">#: kendo.toString(new Date(value.x), "dd/MM/yy HH:mm") #</span>
449
+ <br>
450
+ <strong class="text-nowrap">#: series.name #: #: bytesToSize(value.y) # </strong>
451
+ </div>
452
+ `)(dataItem);
453
+ };
454
+ }
455
+
456
+ function getNetworkTemplate() {
457
+ return function(dataItem) {
458
+ dataItem.bytesToSize = _utils_utilities__WEBPACK_IMPORTED_MODULE_0__["bytesToSize"]; // Pass bytesToSize utility function to template
459
+ return kendo.template(`
460
+ <div>
461
+ <span class="text-nowrap">#: kendo.toString(new Date(value.x), "dd/MM/yy HH:mm") #</span>
462
+ <br>
463
+ <strong class="text-nowrap">#: series.name #: #: bytesToSize(value.y, 1, '', '/s') # </strong>
464
+ </div>
465
+ `)(dataItem);
466
+ };
467
+ }
468
+
469
+
470
+ /***/ }),
471
+
472
+ /***/ "./src/components/charts/user-count-chart.js":
473
+ /*!***************************************************!*\
474
+ !*** ./src/components/charts/user-count-chart.js ***!
475
+ \***************************************************/
476
+ /*! exports provided: UserCountChart */
477
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
478
+
479
+ "use strict";
480
+ __webpack_require__.r(__webpack_exports__);
481
+ /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserCountChart", function() { return UserCountChart; });
482
+ /* harmony import */ var _chart_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chart-utils */ "./src/components/charts/chart-utils.js");
483
+ /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
484
+ /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__);
485
+
486
+
487
+
488
+ class UserCountChart extends HTMLElement
489
+ {
490
+ constructor()
491
+ {
492
+ super();
493
+
494
+ // Create chart html
495
+ let chartHtml = $('<div>');
496
+ $(this).append(chartHtml);
497
+
498
+ // Initialize chart
499
+ this._chartWidget = this._initChartWidget(chartHtml);
500
+ }
501
+
502
+ _initChartWidget(chartHtml)
503
+ {
504
+ return chartHtml.kendoChart({
505
+ transitions: false,
506
+ chartArea: {
507
+ height: 270,
508
+ background: 'transparent'
509
+ },
510
+ legend: {
511
+ visible: false
512
+ },
513
+ seriesDefaults: {
514
+ type: 'area',
515
+ labels: {
516
+ visible: false,
517
+ format: '{0}',
518
+ background: 'transparent'
519
+ },
520
+ },
521
+ series: [{
522
+ name: 'Users',
523
+ field: 'users',
524
+ categoryField: 'time',
525
+ color: '#fd7d24',
526
+ line: {
527
+ width: 2
528
+ }
529
+ }],
530
+ valueAxis: {
531
+ labels: {
532
+ format: '{0}',
533
+ },
534
+ line: {
535
+ visible: false
536
+ },
537
+ min: 0,
538
+ },
539
+ categoryAxis: {
540
+ majorGridLines: {
541
+ visible: true,
542
+ step: 60
543
+ },
544
+ majorTicks: {
545
+ visible: true,
546
+ step: 60
547
+ },
548
+ labels: {
549
+ visible: true,
550
+ step: 60
551
+ },
552
+ baseUnit: 'minutes',
553
+ type: 'date',
554
+ },
555
+ tooltip: {
556
+ shared: true,
557
+ visible: true,
558
+ sharedTemplate: Object(_chart_utils__WEBPACK_IMPORTED_MODULE_0__["getUserCountSharedTemplate"])('dd MMM HH:mm'),
559
+ background: '#e4e4e4'
560
+ }
561
+ }).data('kendoChart');
562
+ }
563
+
564
+ redraw()
565
+ {
566
+ this._chartWidget.redraw();
567
+ }
568
+
569
+ set range(values)
570
+ {
571
+ this._range = values;
572
+
573
+ this._updateXAxisLimits();
574
+ }
575
+
576
+ get range()
577
+ {
578
+ return this._range;
579
+ }
580
+
581
+ addHistoryEntries(userCountData, samplingRateSeconds)
582
+ {
583
+ let date = new Date();
584
+ let start = moment__WEBPACK_IMPORTED_MODULE_1__(date);
585
+ start.subtract((samplingRateSeconds * userCountData.length), 's')
586
+
587
+ let dataSource = new kendo.data.DataSource();
588
+
589
+ for (let i = 1; i < userCountData.length; i++)
590
+ {
591
+ let date = start.clone();
592
+ date.add(i * samplingRateSeconds, 's');
593
+
594
+ this.addEntry(userCountData[i], dataSource, date.toDate(), false);
595
+ }
596
+
597
+ // Assign datasource to chart
598
+ this._chartWidget.setDataSource(dataSource);
599
+
600
+ // Update axis
601
+ this._updateXAxisLimits();
602
+ }
603
+
604
+ addEntry(userCount, dataSource = null, date = null, updateAxis = true)
605
+ {
606
+ if (date == null)
607
+ date = new Date();
608
+
609
+ let newEntry = {
610
+ time: date,
611
+ users: userCount
612
+ };
613
+
614
+ // Add entry to data source
615
+ if (dataSource == null)
616
+ dataSource = this._dataSource;
617
+
618
+ dataSource.add(newEntry);
619
+
620
+ if (updateAxis)
621
+ this._updateXAxisLimits();
622
+ }
623
+
624
+ _updateXAxisLimits()
625
+ {
626
+ let ds = this._dataSource;
627
+
628
+ if (ds.total() > 0)
629
+ {
630
+ const chartMinimum = moment__WEBPACK_IMPORTED_MODULE_1__(this._lastDate).add(this._range[0], 'h');
631
+ const chartMaximum = moment__WEBPACK_IMPORTED_MODULE_1__(this._lastDate).add(this._range[1], 'h');
632
+
633
+ this._chartWidget.options.categoryAxis.min = chartMinimum.toDate();
634
+ this._chartWidget.options.categoryAxis.max = chartMaximum.toDate();
635
+
636
+ this._chartWidget.redraw();
637
+ }
638
+ }
639
+
640
+ get _dataSource()
641
+ {
642
+ return this._chartWidget.dataSource;
643
+ }
644
+ }
645
+
646
+ // DEFINE COMPONENT
647
+ if (!window.customElements.get('user-count-chart'))
648
+ window.customElements.define('user-count-chart', UserCountChart);
649
+
650
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "jquery")))
651
+
652
+ /***/ }),
653
+
654
+ /***/ "./src/components/module-specific/match-expression-builder.js":
655
+ /*!********************************************************************!*\
656
+ !*** ./src/components/module-specific/match-expression-builder.js ***!
657
+ \********************************************************************/
658
+ /*! exports provided: MatchExpressionBuilder */
659
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
660
+
661
+ "use strict";
662
+ __webpack_require__.r(__webpack_exports__);
663
+ /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatchExpressionBuilder", function() { return MatchExpressionBuilder; });
664
+ class MatchExpressionBuilder extends HTMLElement
665
+ {
666
+ constructor()
667
+ {
668
+ super();
669
+
670
+ this.EXPRESSION_UPDATED_EVENT = 'expressionUpdated';
671
+
672
+ this._dialog = $(`
673
+ <div class="modal" id="matchExprBuilderModal" tabindex="-1" role="dialog" aria-labelledby="matchExprBuilderModalTitle" aria-hidden="true">
674
+ <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
675
+ <div class="modal-content">
676
+ <div class="modal-header">
677
+ <h5 class="modal-title text-primary" id="matchExprBuilderModalTitle">...</h5>
678
+ </div>
679
+ <div class="modal-body p-0">
680
+ <form class="bg-color-default p-3">
681
+ <div class="d-inline-flex align-items-center radio-button-group inline-form-groups">
682
+ <div class="custom-control custom-radio custom-control-inline mr-2">
683
+ <input type="radio" id="andOperatorRB" name="operatorRBG" class="custom-control-input" value="AND" checked disabled>
684
+ <label class="custom-control-label" for="andOperatorRB">AND</label>
685
+ </div>
686
+ <div class="custom-control custom-radio custom-control-inline mr-2">
687
+ <input type="radio" id="orOperatorRB" name="operatorRBG" class="custom-control-input" value="OR" disabled>
688
+ <label class="custom-control-label" for="orOperatorRB">OR</label>
689
+ </div>
690
+ </div>
691
+ <div class="d-inline-block">
692
+ <div class="inline-form-groups my-1">
693
+ <input id="varNameCB"/>
694
+ </div>
695
+ <div class="inline-form-groups my-1">
696
+ <input id="typeDD" class="matchTypeDropdown"/>
697
+ <input id="conditionDD" class="matchConditionDropdown"/>
698
+ </div>
699
+ </div>
700
+ <div class="d-inline inline-form-groups">
701
+ <input id="valueIn" class="k-textbox mt-1" placeholder="Value"/>
702
+ <button id="matchExprAddBt" type="button" class="k-button k-secondary mt-1"><i class="fas fa-plus mr-1"></i>Add</button>
703
+ </div>
704
+ </form>
705
+
706
+ <div id="matchExprGrid" class="m-3"></div>
707
+ </div>
708
+ <div class="modal-footer d-flex">
709
+ <div class="flex-grow-1 text-left">
710
+ <button id="matchExprApplyBt" type="button" class="k-button k-primary mr-2"><i class="fas fa-check-circle mr-1"></i>Apply</button>
711
+ </div>
712
+ <div class="flex-grow-1 text-right">
713
+ <button id="matchExprRemoveBt" type="button" class="k-button k-secondary" disabled><i class="fas fa-minus-circle mr-1"></i>Remove selected</button>
714
+ <button id="matchExprClearBt" type="button" class="k-button k-secondary"><i class="fas fa-times-circle mr-1"></i>Clear all</button>
715
+ </div>
716
+ </div>
717
+ </div>
718
+ </div>
719
+ </div>
720
+ `);
721
+
722
+ $('#matchExprAddBt', this._dialog).on('click', $.proxy(this._onAddBtClick, this));
723
+ $('#matchExprApplyBt', this._dialog).on('click', $.proxy(this._onApplyBtClick, this));
724
+ $('#matchExprRemoveBt', this._dialog).on('click', $.proxy(this._onRemoveBtClick, this));
725
+ $('#matchExprClearBt', this._dialog).on('click', $.proxy(this._onClearBtClick, this));
726
+
727
+ // INITIALIZE FORM ITEMS
728
+
729
+ this._varNameCb = $('#varNameCB', this._dialog).kendoComboBox({
730
+ dataTextField: 'label',
731
+ dataValueField: 'value',
732
+ placeholder: 'Variable name',
733
+ }).data('kendoComboBox');
734
+
735
+ // Set types dropdown data source
736
+ // NOTE: in order to avoid XxxMatch objects to be wrapped by Kendo data source, we have to pass them using _ property names
737
+ let typeDS = [];
738
+
739
+ // Boolean ----------------
740
+ typeDS.push({
741
+ label: 'Boolean',
742
+ _value: SFS2X.BoolMatch.EQUALS,
743
+ conditions: [
744
+ {
745
+ label: SFS2X.BoolMatch.EQUALS.symbol,
746
+ _value: SFS2X.BoolMatch.EQUALS,
747
+ },
748
+ {
749
+ label: SFS2X.BoolMatch.NOT_EQUALS.symbol,
750
+ _value: SFS2X.BoolMatch.NOT_EQUALS,
751
+ }
752
+ ]
753
+ });
754
+
755
+ // Number ----------------
756
+ typeDS.push({
757
+ label: 'Number',
758
+ _value: SFS2X.NumberMatch.EQUALS,
759
+ conditions: [
760
+ {
761
+ label: SFS2X.NumberMatch.EQUALS.symbol,
762
+ _value: SFS2X.NumberMatch.EQUALS,
763
+ },
764
+ {
765
+ label: SFS2X.NumberMatch.NOT_EQUALS.symbol,
766
+ _value: SFS2X.NumberMatch.NOT_EQUALS,
767
+ },
768
+ {
769
+ label: SFS2X.NumberMatch.GREATER_THAN.symbol,
770
+ _value: SFS2X.NumberMatch.GREATER_THAN,
771
+ },
772
+ {
773
+ label: SFS2X.NumberMatch.LESS_THAN.symbol,
774
+ _value: SFS2X.NumberMatch.LESS_THAN,
775
+ },
776
+ {
777
+ label: SFS2X.NumberMatch.GREATER_THAN_OR_EQUAL_TO.symbol,
778
+ _value: SFS2X.NumberMatch.GREATER_THAN_OR_EQUAL_TO,
779
+ },
780
+ {
781
+ label: SFS2X.NumberMatch.LESS_THAN_OR_EQUAL_TO.symbol,
782
+ _value: SFS2X.NumberMatch.LESS_THAN_OR_EQUAL_TO,
783
+ }
784
+ ]
785
+ });
786
+
787
+ // String ----------------
788
+ typeDS.push({
789
+ label: 'String',
790
+ _value: SFS2X.StringMatch.EQUALS,
791
+ conditions: [
792
+ {
793
+ label: SFS2X.StringMatch.EQUALS.symbol,
794
+ _value: SFS2X.StringMatch.EQUALS,
795
+ },
796
+ {
797
+ label: SFS2X.StringMatch.NOT_EQUALS.symbol,
798
+ _value: SFS2X.StringMatch.NOT_EQUALS,
799
+ },
800
+ {
801
+ label: SFS2X.StringMatch.CONTAINS.symbol,
802
+ _value: SFS2X.StringMatch.CONTAINS,
803
+ },
804
+ {
805
+ label: SFS2X.StringMatch.STARTS_WITH.symbol,
806
+ _value: SFS2X.StringMatch.STARTS_WITH,
807
+ },
808
+ {
809
+ label: SFS2X.StringMatch.ENDS_WITH.symbol,
810
+ _value: SFS2X.StringMatch.ENDS_WITH,
811
+ }
812
+ ]
813
+ });
814
+
815
+ this._typeDd = $('#typeDD', this._dialog).kendoDropDownList({
816
+ dataSource: typeDS,
817
+ dataTextField: 'label',
818
+ dataValueField: '_value',
819
+ optionLabel: {
820
+ label: 'Type',
821
+ _value: ''
822
+ },
823
+ optionLabelTemplate: '<span class="text-muted">#:label#</span>',
824
+ change: $.proxy(function() {
825
+ if (this._typeDd && this._typeDd.select())
826
+ {
827
+ let selectedType = this._typeDd.dataItem(this._typeDd.select());
828
+ this._conditionDd.setDataSource(selectedType.conditions);
829
+ this._conditionDd.select(1);
830
+ }
831
+ }, this)
832
+ }).data('kendoDropDownList');
833
+
834
+ this._conditionDd = $('#conditionDD', this._dialog).kendoDropDownList({
835
+ dataTextField: 'label',
836
+ dataValueField: '_value',
837
+ optionLabel: {
838
+ label: 'Condition',
839
+ _value: ''
840
+ },
841
+ optionLabelTemplate: '<span class="text-muted">#:label#</span>',
842
+ }).data('kendoDropDownList');
843
+
844
+ this._valueIn = $('#valueIn', this._dialog);
845
+
846
+ // INITIALIZE GRID
847
+
848
+ this._grid = $('#matchExprGrid', this._dialog).kendoGrid({
849
+ dataSource: [],
850
+ resizable: true,
851
+ selectable: 'row',
852
+ change: $.proxy(this._onGridSelectionChange, this),
853
+ noRecords: {
854
+ template: 'No entries.'
855
+ },
856
+ columns: [
857
+ {
858
+ field: 'operator',
859
+ title: 'Operator',
860
+ width: 90
861
+ },
862
+ {
863
+ field: 'label',
864
+ title: 'Name',
865
+ width: 120
866
+ },
867
+ {
868
+ field: 'typeLabel',
869
+ title: 'Type',
870
+ width: 85
871
+ },
872
+ {
873
+ field: 'symbol',
874
+ title: 'Condition',
875
+ width: 95
876
+ },
877
+ {
878
+ field: 'value',
879
+ title: 'Value',
880
+ width: 200
881
+ },
882
+ ]
883
+ }).data('kendoGrid');
884
+ }
885
+
886
+ get title()
887
+ {
888
+ return $('#matchExprBuilderModalTitle', this._dialog).text();
889
+ }
890
+
891
+ set title(value)
892
+ {
893
+ $('#matchExprBuilderModalTitle', this._dialog).text(value);
894
+ }
895
+
896
+ get predefinedVarNames()
897
+ {
898
+ return this._predefinedVarNames;
899
+ }
900
+
901
+ set predefinedVarNames(value)
902
+ {
903
+ this._predefinedVarNames = value;
904
+
905
+ this._varNameCb.setDataSource(value);
906
+ }
907
+
908
+ get filterExpression()
909
+ {
910
+ return this._filterExpression;
911
+ }
912
+
913
+ show()
914
+ {
915
+ this._dialog.modal({
916
+ backdrop: 'static',
917
+ keyboard: false,
918
+ show: true
919
+ });
920
+ }
921
+
922
+ _onGridSelectionChange()
923
+ {
924
+ let selectedRows = this._grid.select();
925
+ let selectedDataItems = [];
926
+
927
+ for (let i = 0; i < selectedRows.length; i++)
928
+ {
929
+ let dataItem = this._grid.dataItem(selectedRows[i]);
930
+ selectedDataItems.push(dataItem);
931
+ }
932
+
933
+ // Enable/disable remove button
934
+ $('#matchExprRemoveBt', this._dialog).attr('disabled', selectedDataItems.length == 0);
935
+ }
936
+
937
+ _onAddBtClick()
938
+ {
939
+ if (this._varNameCb.value() != '' && this._typeDd.select())
940
+ {
941
+ // Variable name and label
942
+ let varName, varLabel;
943
+
944
+ if (this._varNameCb.select() > -1)
945
+ {
946
+ let dataItem = this._varNameCb.dataItem(this._varNameCb.select());
947
+ varName = dataItem.value;
948
+ varLabel = dataItem.label;
949
+ }
950
+ else
951
+ varName = varLabel = this._varNameCb.value();
952
+
953
+ // Variable type's label
954
+ let typeLabel = this._typeDd.dataItem(this._typeDd.select()).label;
955
+
956
+ // Match condition
957
+ let condition = this._conditionDd.dataItem(this._conditionDd.select())._value;
958
+
959
+ // Expression operator
960
+ let operator = this._grid.dataSource.total() > 0 ? $('input[name=operatorRBG]:checked', this._dialog).val() : null;
961
+
962
+ // Variable value
963
+ let val = this._valueIn.val();
964
+ let varValue;
965
+
966
+ if (condition instanceof SFS2X.BoolMatch)
967
+ varValue = (val == 'true' ? true : false);
968
+ else if (condition instanceof SFS2X.NumberMatch)
969
+ varValue = (isNaN(Number(val)) ? 0 : Number(val));
970
+ else
971
+ varValue = val;
972
+
973
+ // Add item to grid
974
+ let exprPart = this._getExpressionPart(varLabel, varName, varValue, typeLabel, condition, operator);
975
+ this._grid.dataSource.add(exprPart);
976
+
977
+ // Reset inputs
978
+ this._varNameCb.value('');
979
+ this._valueIn.val('');
980
+
981
+ // Enable operator radio buttons
982
+ this._enableOperatorRb(true);
983
+ }
984
+ }
985
+
986
+ _onApplyBtClick()
987
+ {
988
+ // Hide dialog
989
+ this._dialog.modal('hide');
990
+
991
+ // Clear grid selection
992
+ this._grid.clearSelection();
993
+
994
+ // Build final match expression
995
+ this._filterExpression = null;
996
+
997
+ if (this._grid.dataSource.total() > 0)
998
+ {
999
+ let expPart = this._grid.dataSource.at(0);
1000
+ this._filterExpression = new SFS2X.MatchExpression(expPart.name, expPart._condition, expPart.value);
1001
+
1002
+ for (let i = 1; i < this._grid.dataSource.total(); i++)
1003
+ {
1004
+ expPart = this._grid.dataSource.at(i);
1005
+
1006
+ if (expPart.operator == SFS2X.LogicOperator.AND.id)
1007
+ this._filterExpression = this._filterExpression.and(expPart.name, expPart._condition, expPart.value);
1008
+ else if (expPart.operator == SFS2X.LogicOperator.OR.id)
1009
+ this._filterExpression = this._filterExpression.or(expPart.name, expPart._condition, expPart.value);
1010
+ }
1011
+ }
1012
+
1013
+ // Fire event
1014
+ let evt = new CustomEvent(this.EXPRESSION_UPDATED_EVENT, {
1015
+ detail: null,
1016
+ bubbles: false,
1017
+ cancelable: false
1018
+ });
1019
+
1020
+ this.dispatchEvent(evt);
1021
+ }
1022
+
1023
+ _onRemoveBtClick()
1024
+ {
1025
+ let dataItem = this._grid.dataItem(this._grid.select());
1026
+ this._grid.dataSource.remove(dataItem);
1027
+
1028
+ // Clear grid selection
1029
+ this._grid.clearSelection();
1030
+
1031
+ if (this._grid.dataSource.total() == 0)
1032
+ {
1033
+ // Disable operator radio buttons
1034
+ this._enableOperatorRb(false);
1035
+ }
1036
+ else
1037
+ {
1038
+ // Reset operator on first entry
1039
+ this._grid.dataSource.at(0).operator = null;
1040
+ this._grid.refresh();
1041
+ }
1042
+ }
1043
+
1044
+ _onClearBtClick()
1045
+ {
1046
+ // Reset form
1047
+ $('#andOperatorRB', this._dialog).attr('checked', true);
1048
+ $('#orOperatorRB', this._dialog).attr('checked', false);
1049
+ this._enableOperatorRb(false);
1050
+
1051
+ this._varNameCb.value('');
1052
+ this._typeDd.select(0);
1053
+ this._conditionDd.select(0);
1054
+
1055
+ this._valueIn.val('');
1056
+
1057
+ // Clear grid selection
1058
+ this._grid.clearSelection();
1059
+
1060
+ // Clear table
1061
+ this._grid.setDataSource([]);
1062
+ }
1063
+
1064
+ _getExpressionPart(varLabel, varName, varValue, typeLabel, condition, operator)
1065
+ {
1066
+ return {
1067
+ 'label': varLabel,
1068
+ 'name': varName,
1069
+ 'value': varValue,
1070
+ 'typeLabel': typeLabel,
1071
+ 'symbol': condition.symbol,
1072
+ 'operator': operator,
1073
+ '_condition': condition,
1074
+ };
1075
+ }
1076
+
1077
+ _enableOperatorRb(enable)
1078
+ {
1079
+ $('#andOperatorRB', this._dialog).attr('disabled', !enable);
1080
+ $('#orOperatorRB', this._dialog).attr('disabled', !enable);
1081
+ }
1082
+ }
1083
+
1084
+ // DEFINE COMPONENT
1085
+ if (!window.customElements.get('match-expression-builder'))
1086
+ window.customElements.define('match-expression-builder', MatchExpressionBuilder);
1087
+
1088
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "jquery")))
1089
+
1090
+ /***/ }),
1091
+
1092
+ /***/ "./src/components/sidebar-layout.js":
1093
+ /*!******************************************!*\
1094
+ !*** ./src/components/sidebar-layout.js ***!
1095
+ \******************************************/
1096
+ /*! exports provided: SidebarLayout */
1097
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1098
+
1099
+ "use strict";
1100
+ __webpack_require__.r(__webpack_exports__);
1101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SidebarLayout", function() { return SidebarLayout; });
1102
+ class SidebarLayout extends HTMLElement
1103
+ {
1104
+ constructor()
1105
+ {
1106
+ super();
1107
+
1108
+ // Attach a shadow root
1109
+ const shadowRoot = this.attachShadow({mode: 'open'});
1110
+ shadowRoot.innerHTML = `
1111
+ <style>
1112
+ :host {
1113
+ display: flex;
1114
+ flex-direction: row;
1115
+ }
1116
+
1117
+ @media (max-width: 575.98px) {
1118
+ :host(.split-xs) ::slotted(:not([aria-selected="true"])) {
1119
+ display: none !important;
1120
+ }
1121
+
1122
+ :host(.split-xs) ::slotted([aria-selected="true"]) {
1123
+ flex-grow: 1;
1124
+ }
1125
+ }
1126
+
1127
+ @media (max-width: 767.98px) {
1128
+ :host(.split-sm) ::slotted(:not([aria-selected="true"])) {
1129
+ display: none !important;
1130
+ }
1131
+
1132
+ :host(.split-sm) ::slotted([aria-selected="true"]) {
1133
+ flex-grow: 1;
1134
+ }
1135
+ }
1136
+
1137
+ @media (max-width: 991.98px) {
1138
+ :host(.split-md) ::slotted(:not([aria-selected="true"])) {
1139
+ display: none !important;
1140
+ }
1141
+
1142
+ :host(.split-md) ::slotted([aria-selected="true"]) {
1143
+ flex-grow: 1;
1144
+ }
1145
+ }
1146
+
1147
+ @media (max-width: 1199.98px) {
1148
+ :host(.split-lg) ::slotted(:not([aria-selected="true"])) {
1149
+ display: none !important;
1150
+ }
1151
+
1152
+ :host(.split-lg) ::slotted([aria-selected="true"]) {
1153
+ flex-grow: 1;
1154
+ }
1155
+ }
1156
+
1157
+ .side-col::slotted(*) {
1158
+ }
1159
+
1160
+ .main-col::slotted(*) {
1161
+ flex-grow: 1;
1162
+ }
1163
+ </style>
1164
+
1165
+ <slot class="side-col" name="side-column"></slot>
1166
+ <slot class="main-col" name="main-column"></slot>
1167
+ `;
1168
+
1169
+ // Set initial selection
1170
+ this.selectedIndex = 0;
1171
+ }
1172
+
1173
+ get selectedPanel()
1174
+ {
1175
+ return this._selectedPanel;
1176
+ }
1177
+
1178
+ set selectedPanel(element) // 'side' or 'main'
1179
+ {
1180
+ if (element != null && element.parentNode == this)
1181
+ {
1182
+ this._selectedPanel = element;
1183
+
1184
+ for (let element of this.children)
1185
+ {
1186
+ if (element == this._selectedPanel)
1187
+ element.setAttribute('aria-selected', 'true');
1188
+ else
1189
+ element.removeAttribute('aria-selected');
1190
+ }
1191
+ }
1192
+ else
1193
+ {
1194
+ console.error('Element is not a child of SidebarLayout');
1195
+ }
1196
+ }
1197
+
1198
+ get selectedIndex()
1199
+ {
1200
+ return Array.from(this.children).indexOf(this._selectedPanel);
1201
+ }
1202
+
1203
+ set selectedIndex(index)
1204
+ {
1205
+ if (this.children.length > 0)
1206
+ {
1207
+ if (this.children[index] == null)
1208
+ {
1209
+ console.error('Invalid SidebarLayout index');
1210
+ return;
1211
+ }
1212
+
1213
+ let element = this.children[index];
1214
+ this.selectedPanel = element;
1215
+ }
1216
+ }
1217
+ }
1218
+
1219
+ // DEFINE COMPONENT
1220
+ if (!window.customElements.get('sidebar-layout'))
1221
+ window.customElements.define('sidebar-layout', SidebarLayout);
1222
+
1223
+
1224
+ /***/ }),
1225
+
1226
+ /***/ "./src/modules/zone-monitor.js":
1227
+ /*!*************************************!*\
1228
+ !*** ./src/modules/zone-monitor.js ***!
1229
+ \*************************************/
1230
+ /*! exports provided: default */
1231
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1232
+
1233
+ "use strict";
1234
+ __webpack_require__.r(__webpack_exports__);
1235
+ /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ZoneMonitor; });
1236
+ /* harmony import */ var _base_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base-module */ "./src/modules/base-module.js");
1237
+ /* harmony import */ var _components_sidebar_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/sidebar-layout */ "./src/components/sidebar-layout.js");
1238
+ /* harmony import */ var _components_module_specific_match_expression_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/module-specific/match-expression-builder */ "./src/components/module-specific/match-expression-builder.js");
1239
+ /* harmony import */ var _utils_uibuilder_config_interface_builder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/uibuilder/config-interface-builder */ "./src/utils/uibuilder/config-interface-builder.js");
1240
+ /* harmony import */ var _utils_utilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/utilities */ "./src/utils/utilities.js");
1241
+ /* harmony import */ var _utils_match_properties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/match-properties */ "./src/utils/match-properties.js");
1242
+ /* harmony import */ var _components_charts_user_count_chart__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../components/charts/user-count-chart */ "./src/components/charts/user-count-chart.js");
1243
+ /* harmony import */ var _components_charts_chart_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../components/charts/chart-utils */ "./src/components/charts/chart-utils.js");
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+ class ZoneMonitor extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModule"]
1254
+ {
1255
+ constructor()
1256
+ {
1257
+ super('zoneMonitor');
1258
+
1259
+ this.MONITORED_TYPE_ZONE = 'zone';
1260
+ this.MONITORED_TYPE_ROOM = 'room';
1261
+ this.MONITORED_TYPE_USER = 'user';
1262
+
1263
+ this.ANY_LABEL = '[any]';
1264
+ this.DEFAULT_GROUP_NAME = 'default';
1265
+ this.MAX_EXTENSION_LOG_SIZE = 300;
1266
+ this.KICK_BAN_DEFAULT_DELAY = 5;
1267
+
1268
+ // Outgoing requests
1269
+ this.REQ_GET_DATA = 'getData';
1270
+ this.REQ_SET_ZONE_SETTINGS = 'setZoneSettings';
1271
+ this.REQ_SET_ROOM_SETTINGS = 'setRoomSettings';
1272
+ this.REQ_SET_USER_SETTINGS = 'setUserSettings';
1273
+ this.REQ_RELOAD_ZONE_EXT = 'reloadZoneExt';
1274
+ this.REQ_RELOAD_WORDS = 'reloadWords';
1275
+ this.REQ_DISCONNECT_USER = 'disconnUser';
1276
+ this.REQ_KICK_USER = 'kickUser';
1277
+ this.REQ_BAN_USER = 'banUser';
1278
+ this.REQ_GET_ROOM_CONFIG = 'getRoomConfig';
1279
+ this.REQ_CREATE_ROOM = 'createRoom';
1280
+ this.REQ_REMOVE_ROOM = 'removeRoom';
1281
+ this.REQ_ADMIN_MSG = 'adminMsg';
1282
+
1283
+ // Incoming responses
1284
+ this.RESP_DATA = 'data';
1285
+ this.RESP_UNEXPECTED_ERROR = 'unexpError';
1286
+ this.RESP_UPDATE_ERROR = 'updateError';
1287
+ this.RESP_ROOM_CONFIG = 'roomConfig';
1288
+ this.RESP_ROOM_CONFIG_ERROR = 'roomConfigErr';
1289
+ this.RESP_ROOM_CREATED = 'roomCreated';
1290
+ this.RESP_ROOM_CREATION_ERROR = 'roomError';
1291
+ this.RESP_LOG_MESSAGES = 'log'; // This response doesn't have a corresponding request because it is managed by a server event listener
1292
+
1293
+ this._currentRequestId = -1;
1294
+ }
1295
+
1296
+ //------------------------------------
1297
+ // COMMON MODULE INTERFACE METHODS
1298
+ // This members are used by the main controller
1299
+ // to communicate with the module's controller.
1300
+ //------------------------------------
1301
+
1302
+ initialize(idData, shellController)
1303
+ {
1304
+ // Call super method
1305
+ super.initialize(idData, shellController);
1306
+
1307
+ // Set monitoring interface
1308
+ this._setMonitoringInterface();
1309
+
1310
+ // Initialize progress bar
1311
+ $('#znm-progressBar').kendoProgressBar({
1312
+ min: 0,
1313
+ max: 100,
1314
+ value: false,
1315
+ type: 'value',
1316
+ animation: {
1317
+ duration: 400
1318
+ }
1319
+ });
1320
+
1321
+ // LISTS
1322
+
1323
+ // Initialize interval dropdown
1324
+ this._intervalDropDown = $('#znm-intervalDD').kendoDropDownList({
1325
+ valueTemplate: '<span class="text-muted pr-1">Interval:</span><span>#:data.text#</span>',
1326
+ change: $.proxy(this._onUpdateIntervalChange, this)
1327
+ }).data('kendoDropDownList');
1328
+
1329
+ // Initialize pane bar
1330
+ this._accordion = $('#znm-panelbar').kendoPanelBar({
1331
+ expandMode: 'single',
1332
+ change: $.proxy(this._onEntitiesPanelChange, this)
1333
+ }).data('kendoPanelBar');
1334
+
1335
+ // Initialize lists
1336
+ this._zoneListBox = $("#znm-zoneList").kendoListBox({
1337
+ template: '<div>#:data.name# (#:data.users#)</div>',
1338
+ change: $.proxy(this._onZoneSelected, this)
1339
+ }).data('kendoListBox');
1340
+
1341
+ this._zoneListBox.wrapper.find('.k-list').on('dblclick', '.k-item', $.proxy(this._onMonitorSelectionBtClick, this));
1342
+
1343
+ this._roomListBox = $("#znm-roomList").kendoListBox({
1344
+ template: '<div>#:data.name# (#:data.users#)</div>',
1345
+ change: $.proxy(this._onRoomSelected, this)
1346
+ }).data('kendoListBox');
1347
+
1348
+ this._roomListBox.wrapper.find('.k-list').on('dblclick', '.k-item', $.proxy(this._onMonitorSelectionBtClick, this));
1349
+
1350
+ this._userListBox = $("#znm-userList").kendoListBox({
1351
+ template: '<div>#:data.name#</div>',
1352
+ change: $.proxy(this._onUserSelected, this)
1353
+ }).data('kendoListBox');
1354
+
1355
+ this._userListBox.wrapper.find('.k-list').on('dblclick', '.k-item', $.proxy(this._onMonitorSelectionBtClick, this));
1356
+
1357
+ // Initialize Room Groups dropdown
1358
+ this._groupsDropDown = $('#znm-roomGroupsDD').kendoDropDownList({
1359
+ dataTextField: 'label',
1360
+ dataValueField: 'name',
1361
+ change: $.proxy(this._onGroupChange, this)
1362
+ }).data('kendoDropDownList');
1363
+
1364
+ // Build initial groups list
1365
+ this._setGroupsDataProvider(null);
1366
+
1367
+ // Create interface builder instances
1368
+ this._interfaceBuilder = new _utils_uibuilder_config_interface_builder__WEBPACK_IMPORTED_MODULE_3__["ConfigInterfaceBuilder"]();
1369
+ this._roomCreationIBuilder = new _utils_uibuilder_config_interface_builder__WEBPACK_IMPORTED_MODULE_3__["ConfigInterfaceBuilder"]();
1370
+
1371
+ // Add listener to show limit warning tooltips
1372
+ $('#znm-panelbar').kendoTooltip({
1373
+ filter: 'i[title].limit-warning',
1374
+ position: 'right',
1375
+ width: '250px',
1376
+ content: function(e) {
1377
+ return `<div class="help-tooltip">${e.target.data('title')}</div>`;
1378
+ }
1379
+ });
1380
+
1381
+ // ROOM CREATION PANEL
1382
+
1383
+ // Add click listener to Create & Remove Room buttons
1384
+ $('#znm-createRoomBt').on('click', $.proxy(this._onCreateRoomBtClick, this));
1385
+ $('#znm-removeRoomBt').on('click', $.proxy(this._onRemoveRoomBtClick, this));
1386
+
1387
+ // Configure room creation panel
1388
+ $('#znm-createRoomModal').modal({
1389
+ backdrop: 'static',
1390
+ keyboard: false,
1391
+ show: false,
1392
+ });
1393
+
1394
+ // Add listener for room creation panel's create button click
1395
+ $('#znm-roomCreatorCreateBt').on('click', $.proxy(this._onRoomCreatorCreateBtClick, this));
1396
+
1397
+ // Add listener for room creation panel hide
1398
+ $('#znm-createRoomModal').on('hidden.bs.modal', $.proxy(this._onCreateRoomModalHidden, this));
1399
+
1400
+ // ROOM & USER FILTERING PANELS
1401
+
1402
+ // Setup match expression builder panel for rooms
1403
+ this._roomFilter = document.getElementById('znm-roomFilter');
1404
+ this._roomFilter.title = 'Room Filter Expression Builder';
1405
+ this._roomFilter.predefinedVarNames = _utils_match_properties__WEBPACK_IMPORTED_MODULE_5__["RoomPropertiesData"].propertiesArray;
1406
+ $(this._roomFilter).on(this._roomFilter.EXPRESSION_UPDATED_EVENT, $.proxy(this._onRoomFilterUpdated, this));
1407
+
1408
+ $('#znm-filterRoomBt').on('click', $.proxy(this._onShowRoomFilterBtClick, this));
1409
+ $('#znm-applyRoomFilterCB').on('change', $.proxy(this._onApplyBtChange, this));
1410
+
1411
+ // Setup match expression builder panel for users
1412
+ this._userFilter = document.getElementById('znm-userFilter');
1413
+ this._userFilter.title = 'User Filter Expression Builder';
1414
+ this._userFilter.predefinedVarNames = _utils_match_properties__WEBPACK_IMPORTED_MODULE_5__["UserPropertiesData"].propertiesArray;
1415
+ $(this._userFilter).on(this._userFilter.EXPRESSION_UPDATED_EVENT, $.proxy(this._onUserFilterUpdated, this));
1416
+
1417
+ $('#znm-filterUserBt').on('click', $.proxy(this._onShowUserFilterBtClick, this));
1418
+ $('#znm-applyUserFilterCB').on('change', $.proxy(this._onApplyBtChange, this));
1419
+
1420
+ // MAIN CONTROLS
1421
+
1422
+ $('#znm-monitorBt').on('click', $.proxy(this._onMonitorSelectionBtClick, this));
1423
+ $('#znm-sendMessageBt').on('click', $.proxy(this._onSendAdminMsgBtClick, this));
1424
+ $('#znm-messageIn').on('keyup', $.proxy(this._onSendAdminMsgInKeyUp, this));
1425
+
1426
+ // MONITORING CONTROLS
1427
+
1428
+ $('#znm-closeMonitorBt').on('click', $.proxy(this._onCloseMonitorBtClick, this));
1429
+ $('#znm-editBt').on('click', $.proxy(this._onEditBtClick, this));
1430
+ $('#znm-cancelBt').on('click', $.proxy(this._onCancelBtClick, this));
1431
+ $('#znm-submitBt').on('click', $.proxy(this._onSubmitBtClick, this));
1432
+
1433
+ // Hide edit controls
1434
+ $('#znm-editControls').hide();
1435
+
1436
+ // ZONE MONITOR ---------------------
1437
+
1438
+ // Set reference to user count chart
1439
+ this._userCountChart = document.getElementById('znm-userCountChart');
1440
+
1441
+ // Initialize time range slider
1442
+ this._timeSlider = $('#znm-timeSlider').kendoRangeSlider({
1443
+ min: -24,
1444
+ max: 0,
1445
+ smallStep: 1,
1446
+ largeStep: 0,
1447
+ change: $.proxy(this._onTimeRangeChange, this),
1448
+ tooltip: {
1449
+ template: Object(_components_charts_chart_utils__WEBPACK_IMPORTED_MODULE_7__["getTimeRangeTooltipTemplate"])()
1450
+ },
1451
+ leftDragHandleTitle: 'Drag',
1452
+ rightDragHandleTitle: 'Drag',
1453
+ }).data('kendoRangeSlider');
1454
+
1455
+ // Reset time range on user count chart
1456
+ this._onTimeRangeChange();
1457
+
1458
+ // Add button click listeners
1459
+ $('#znm-reloadWordsBt').on('click', $.proxy(this._onWordsReloadBtClick, this));
1460
+ $('#znm-reloadZoneExtBt').on('click', $.proxy(this._onZoneExtReloadBtClick, this));
1461
+
1462
+ // Initialize extension log grid
1463
+ this._zoneExtLogGrid = $('#znm-zoneExtLogGrid').kendoGrid({
1464
+ dataSource: [],
1465
+ resizable: true,
1466
+ selectable: false,
1467
+ noRecords: {
1468
+ template: 'No entries.'
1469
+ },
1470
+ columns: [
1471
+ {
1472
+ field: 'timestamp',
1473
+ title: 'Timestamp',
1474
+ width: 180
1475
+ },
1476
+ {
1477
+ field: 'level',
1478
+ title: 'Level',
1479
+ width: 100
1480
+ },
1481
+ {
1482
+ field: 'message',
1483
+ title: 'Message',
1484
+ width: 400
1485
+ },
1486
+ ],
1487
+ dataBound: function() {
1488
+ this.content.scrollTop(this.tbody.height()); // Scroll to bottom
1489
+ }
1490
+ }).data('kendoGrid');
1491
+
1492
+ // ROOM MONITOR ---------------------
1493
+
1494
+ // Initialize extension log grid
1495
+ this._roomExtLogGrid = $('#znm-roomExtLogGrid').kendoGrid({
1496
+ dataSource: [],
1497
+ resizable: true,
1498
+ selectable: false,
1499
+ noRecords: {
1500
+ template: 'No entries.'
1501
+ },
1502
+ columns: [
1503
+ {
1504
+ field: 'timestamp',
1505
+ title: 'Timestamp',
1506
+ width: 180
1507
+ },
1508
+ {
1509
+ field: 'level',
1510
+ title: 'Level',
1511
+ width: 100
1512
+ },
1513
+ {
1514
+ field: 'message',
1515
+ title: 'Message',
1516
+ width: 400
1517
+ },
1518
+ ],
1519
+ dataBound: function() {
1520
+ this.content.scrollTop(this.tbody.height()); // Scroll to bottom
1521
+ }
1522
+ }).data('kendoGrid');
1523
+
1524
+ // USER MONITOR ---------------------
1525
+
1526
+ this._kickDelayIn = $('#znm-kickDelayNS').kendoNumericTextBox({
1527
+ min: 0,
1528
+ step: 1,
1529
+ format: '#',
1530
+ placeholder: 'Delay (s)'
1531
+ }).data('kendoNumericTextBox');
1532
+
1533
+ this._banModeDd = $('#znm-banModeDD').kendoDropDownList({
1534
+ dataSource: ['IP', 'NAME'],
1535
+ autoWidth: true,
1536
+ optionLabel: {
1537
+ text: 'Mode'
1538
+ },
1539
+ optionLabelTemplate: '<span class="text-muted">#:text#</span>',
1540
+ }).data('kendoDropDownList');
1541
+
1542
+ this._banDurUnitDd = $('#znm-banDurationUnitDD').kendoDropDownList({
1543
+ autoWidth: true,
1544
+ }).data('kendoDropDownList');
1545
+
1546
+ this._banDurationIn = $('#znm-banDurationNS').kendoNumericTextBox({
1547
+ min: 1,
1548
+ step: 1,
1549
+ format: '#',
1550
+ placeholder: 'Duration'
1551
+ }).data('kendoNumericTextBox');
1552
+
1553
+ this._banDelayIn = $('#znm-banDelayNS').kendoNumericTextBox({
1554
+ min: 0,
1555
+ step: 1,
1556
+ format: '#',
1557
+ placeholder: 'Delay (s)'
1558
+ }).data('kendoNumericTextBox');
1559
+
1560
+ // Add button click listeners
1561
+ $('#znm-disconnectBt').on('click', $.proxy(this._onDisconnectBtClick, this));
1562
+ $('#znm-kickBt').on('click', $.proxy(this._onKickBtClick, this));
1563
+ $('#znm-banBt').on('click', $.proxy(this._onBanBtClick, this));
1564
+
1565
+ // Charts
1566
+
1567
+ this._packetQueueChart = $('#znm-packetQueueChart').kendoChart({
1568
+ transitions: false,
1569
+ chartArea: {
1570
+ height: 100
1571
+ },
1572
+ legend: {
1573
+ visible: false
1574
+ },
1575
+ seriesDefaults: {
1576
+ type: 'bar',
1577
+ labels: {
1578
+ visible: true,
1579
+ format: '{0}%',
1580
+ background: 'transparent',
1581
+ position: 'insideBase'
1582
+ },
1583
+ gap: .5,
1584
+ spacing: 0,
1585
+ overlay: {
1586
+ gradient: 'none'
1587
+ },
1588
+ border: {
1589
+ width: 0
1590
+ }
1591
+ },
1592
+ series: [
1593
+ {
1594
+ name: 'Packet queue',
1595
+ field: 'value',
1596
+ categoryField: 'category',
1597
+ color: '#FB7D33'
1598
+ }
1599
+ ],
1600
+ valueAxis: {
1601
+ labels: {
1602
+ format: '{0}%'
1603
+ },
1604
+ line: {
1605
+ visible: false
1606
+ },
1607
+ min: 0,
1608
+ max: 100
1609
+ },
1610
+ categoryAxis: {
1611
+ majorGridLines: {
1612
+ visible: false
1613
+ },
1614
+ majorTicks: {
1615
+ visible: false
1616
+ },
1617
+ labels: {
1618
+ visible: false
1619
+ }
1620
+ },
1621
+ tooltip: {
1622
+ visible: false,
1623
+ }
1624
+ }).data('kendoChart');
1625
+
1626
+ this._droppedMsgChart = $('#znm-droppedMsgChart').kendoChart({
1627
+ transitions: false,
1628
+ chartArea: {
1629
+ height: 100
1630
+ },
1631
+ legend: {
1632
+ visible: false
1633
+ },
1634
+ seriesDefaults: {
1635
+ type: 'bar',
1636
+ labels: {
1637
+ visible: true,
1638
+ format: '{0}',
1639
+ background: 'transparent',
1640
+ position: 'insideBase',
1641
+ },
1642
+ gap: .5,
1643
+ spacing: 0,
1644
+ overlay: {
1645
+ gradient: 'none'
1646
+ },
1647
+ border: {
1648
+ width: 0
1649
+ }
1650
+ },
1651
+ series: [
1652
+ {
1653
+ name: 'Dropped messages',
1654
+ field: 'value',
1655
+ categoryField: 'category',
1656
+ color: '#FB7D33'
1657
+ }
1658
+ ],
1659
+ valueAxis: {
1660
+ labels: {
1661
+ format: '{0}'
1662
+ },
1663
+ line: {
1664
+ visible: false
1665
+ },
1666
+ min: 0,
1667
+ },
1668
+ categoryAxis: {
1669
+ majorGridLines: {
1670
+ visible: false
1671
+ },
1672
+ majorTicks: {
1673
+ visible: false
1674
+ },
1675
+ labels: {
1676
+ visible: false
1677
+ }
1678
+ },
1679
+ tooltip: {
1680
+ visible: false,
1681
+ }
1682
+ }).data('kendoChart');
1683
+
1684
+ this._writtenDataChart = $('#znm-writtenDataChart').kendoChart({
1685
+ transitions: false,
1686
+ chartArea: {
1687
+ height: 100
1688
+ },
1689
+ legend: {
1690
+ visible: false
1691
+ },
1692
+ seriesDefaults: {
1693
+ type: 'bar',
1694
+ labels: {
1695
+ visible: true,
1696
+ format: '{0}',
1697
+ background: 'transparent',
1698
+ position: 'insideBase',
1699
+ template: Object(_components_charts_chart_utils__WEBPACK_IMPORTED_MODULE_7__["getWRBytesLabelTemplate"])(),
1700
+ },
1701
+ gap: .5,
1702
+ spacing: 0,
1703
+ overlay: {
1704
+ gradient: 'none'
1705
+ },
1706
+ border: {
1707
+ width: 0
1708
+ }
1709
+ },
1710
+ series: [
1711
+ {
1712
+ name: 'Written data',
1713
+ field: 'value',
1714
+ categoryField: 'category',
1715
+ color: '#FB7D33'
1716
+ }
1717
+ ],
1718
+ valueAxis: {
1719
+ labels: {
1720
+ format: '{0}'
1721
+ },
1722
+ line: {
1723
+ visible: false
1724
+ },
1725
+ min: 0,
1726
+ },
1727
+ categoryAxis: {
1728
+ majorGridLines: {
1729
+ visible: false
1730
+ },
1731
+ majorTicks: {
1732
+ visible: false
1733
+ },
1734
+ labels: {
1735
+ visible: false
1736
+ }
1737
+ },
1738
+ tooltip: {
1739
+ visible: false,
1740
+ }
1741
+ }).data('kendoChart');
1742
+
1743
+ this._readDataChart = $('#znm-readDataChart').kendoChart({
1744
+ transitions: false,
1745
+ chartArea: {
1746
+ height: 100
1747
+ },
1748
+ legend: {
1749
+ visible: false
1750
+ },
1751
+ seriesDefaults: {
1752
+ type: 'bar',
1753
+ labels: {
1754
+ visible: true,
1755
+ format: '{0}',
1756
+ background: 'transparent',
1757
+ position: 'insideBase',
1758
+ template: Object(_components_charts_chart_utils__WEBPACK_IMPORTED_MODULE_7__["getWRBytesLabelTemplate"])(),
1759
+ },
1760
+ gap: .5,
1761
+ spacing: 0,
1762
+ overlay: {
1763
+ gradient: 'none'
1764
+ },
1765
+ border: {
1766
+ width: 0
1767
+ }
1768
+ },
1769
+ series: [
1770
+ {
1771
+ name: 'Read data',
1772
+ field: 'value',
1773
+ categoryField: 'category',
1774
+ color: '#FB7D33'
1775
+ }
1776
+ ],
1777
+ valueAxis: {
1778
+ labels: {
1779
+ format: '{0}'
1780
+ },
1781
+ line: {
1782
+ visible: false
1783
+ },
1784
+ min: 0,
1785
+ },
1786
+ categoryAxis: {
1787
+ majorGridLines: {
1788
+ visible: false
1789
+ },
1790
+ majorTicks: {
1791
+ visible: false
1792
+ },
1793
+ labels: {
1794
+ visible: false
1795
+ }
1796
+ },
1797
+ tooltip: {
1798
+ visible: false,
1799
+ }
1800
+ }).data('kendoChart');
1801
+
1802
+ //-------------------------------
1803
+
1804
+ // Add listener to redraw all charts in case of window resize
1805
+ $(window).on('resize', $.proxy(this._onWindowResize, this));
1806
+ this._onWindowResize(); // Also do it immediately
1807
+
1808
+ // Request data to server
1809
+ this._requestData(true);
1810
+ }
1811
+
1812
+ destroy()
1813
+ {
1814
+ // Call super method
1815
+ super.destroy();
1816
+
1817
+ // Close monitoring
1818
+ this._onCloseMonitorBtClick();
1819
+
1820
+ // Remove doubleclick event listeners
1821
+ this._zoneListBox.wrapper.find('.k-list').off('dblclick');
1822
+ this._roomListBox.wrapper.find('.k-list').off('dblclick');
1823
+ this._userListBox.wrapper.find('.k-list').off('dblclick');
1824
+
1825
+ // Remove other event listeners
1826
+ $('#znm-createRoomBt').off('click');
1827
+ $('#znm-removeRoomBt').off('click');
1828
+ $('#znm-roomCreatorCreateBt').off('click');
1829
+ $('#znm-filterRoomBt').off('click');
1830
+ $('#znm-applyRoomFilterCB').off('change');
1831
+ $('#znm-filterUserBt').off('click');
1832
+ $('#znm-applyUserFilterCB').off('change');
1833
+ $('#znm-monitorBt').off('click');
1834
+ $('#znm-sendMessageBt').off('click');
1835
+ $('#znm-messageIn').off('keyup');
1836
+ $('#znm-closeMonitorBt').off('click');
1837
+ $('#znm-editBt').off('click');
1838
+ $('#znm-cancelBt').off('click');
1839
+ $('#znm-submitBt').off('click');
1840
+ $(window).off('resize');
1841
+ $('#znm-reloadWordsBt').off('click');
1842
+ $('#znm-reloadZoneExtBt').off('click');
1843
+ $('#znm-disconnectBt').off('click');
1844
+ $('#znm-kickBt').off('click');
1845
+ $('#znm-banBt').off('click');
1846
+
1847
+ // Clear request scheduling
1848
+ clearTimeout(this._requestTimer);
1849
+
1850
+ // Hide room creation panel
1851
+ $('#znm-createRoomModal').modal('hide');
1852
+
1853
+ // Remove room creation panel listener
1854
+ $('#znm-createRoomModal').off('hidden.bs.modal');
1855
+
1856
+ // Remove filter panels listeners
1857
+ $(this._roomFilter).off(this._roomFilter.EXPRESSION_UPDATED_EVENT);
1858
+ $(this._userFilter).off(this._userFilter.EXPRESSION_UPDATED_EVENT);
1859
+ }
1860
+
1861
+ onExtensionCommand(command, data)
1862
+ {
1863
+ // Data received
1864
+ if (command == this.RESP_DATA)
1865
+ {
1866
+ // We have to check if the response id corresponds to the current request id;
1867
+ // if not, the response is discarded as it refers to an outdatet request
1868
+ const responseId = data.getInt('id');
1869
+
1870
+ if (responseId == this._currentRequestId)
1871
+ {
1872
+ // --- ZONES LIST ---
1873
+ if (data.containsKey('zones'))
1874
+ {
1875
+ this._setZonesDataProvider(data.getSFSArray('zones'));
1876
+
1877
+ if (this._selectedZone)
1878
+ this._setScopeLabel();
1879
+ }
1880
+
1881
+ // --- ROOMS LIST ---
1882
+ if (data.containsKey('rooms'))
1883
+ {
1884
+ this._setGroupsDataProvider(data.getUtfStringArray('groups'));
1885
+
1886
+ // -------------------------------
1887
+
1888
+ // If a null rooms list is returned, the zone must have been deleted!
1889
+ if (!data.isNull('rooms'))
1890
+ {
1891
+ this._setRoomsDataProvider(data.getSFSArray('rooms'));
1892
+
1893
+ if (!this._selectedRoom)
1894
+ this._setScopeLabel();
1895
+
1896
+ // -------------------------------
1897
+
1898
+ // Show warning if the rooms list exceeds the server-side limit
1899
+ if (data.containsKey('rSize'))
1900
+ this._showLimitExceededWarning($('#znm-roomListWarning'), 'The received list is incomplete, because its size (' + data.getInt('rSize') + ' Rooms) exceeded this client\'s limit of ' + data.getInt('rLimit') + '; you should refine your search');
1901
+ else
1902
+ this._showLimitExceededWarning($('#znm-roomListWarning'), '');
1903
+ }
1904
+ else
1905
+ {
1906
+ if (this._activePanelType == 'room')
1907
+ {
1908
+ this._accordion.select('[data-item-type="zone"]');
1909
+ this._accordion.expand('[data-item-type="zone"]');
1910
+ this._onZoneSelected();
1911
+ this._onEntitiesPanelChange();
1912
+ }
1913
+ }
1914
+ }
1915
+
1916
+ // --- USERS LIST ---
1917
+ if (data.containsKey('users'))
1918
+ {
1919
+ // If a null users list is returned, the room must have been deleted!
1920
+ if (!data.isNull('users'))
1921
+ {
1922
+ this._setUsersDataProvider(data.getSFSArray('users'));
1923
+
1924
+ // Show warning if the users list exceeds the server-side limit
1925
+ if (data.containsKey('uSize'))
1926
+ this._showLimitExceededWarning($('#znm-userListWarning'), 'The received list is incomplete, because its size (' + data.getInt('uSize') + ' users) exceeds this client\'s limit of ' + data.getInt('uLimit') + '; you should refine your search');
1927
+ else
1928
+ this._showLimitExceededWarning($('#znm-userListWarning'), '');
1929
+ }
1930
+ else
1931
+ {
1932
+ if (this._activePanelType == 'user')
1933
+ {
1934
+ this._accordion.select('[data-item-type="room"]');
1935
+ this._accordion.expand('[data-item-type="room"]');
1936
+ this._onRoomSelected();
1937
+ this._onEntitiesPanelChange();
1938
+ }
1939
+ }
1940
+ }
1941
+
1942
+ // --- MONITORED DATA ---
1943
+ if (data.containsKey('monitored'))
1944
+ {
1945
+ const zone = data.getSFSObject('monitored').getUtfString('zone');
1946
+ const type = data.getSFSObject('monitored').getUtfString('type');
1947
+ const name = data.getSFSObject('monitored').getUtfString('name');
1948
+
1949
+ if (zone == this._monitoredZone && type == this._monitoredType && name == this._monitoredName)
1950
+ {
1951
+ if (!data.getSFSObject('monitored').isNull('params'))
1952
+ {
1953
+ const params = data.getSFSObject('monitored').getSFSArray('params');
1954
+
1955
+ this._setMonitoringInterface();
1956
+
1957
+ // Build interface
1958
+ if (!this._isEditing)
1959
+ {
1960
+ this._interfaceBuilder.buildInterface(params, `znm-${this._monitoredType}TabNavigator`, true);
1961
+
1962
+ if (!this._skipInitTabs)
1963
+ {
1964
+ $(`#znm-${this._monitoredType}TabNavigator #tabs`).scrollingTabs({
1965
+ bootstrapVersion: 4,
1966
+ scrollToTabEdge: true,
1967
+ enableSwiping: true,
1968
+ disableScrollArrowsOnFullyScrolled: true,
1969
+ cssClassLeftArrow: 'fa fa-chevron-left',
1970
+ cssClassRightArrow: 'fa fa-chevron-right'
1971
+ });
1972
+
1973
+ this._skipInitTabs = true;
1974
+
1975
+ // Set first tab panel as active
1976
+ this._interfaceBuilder.activateFirstTabPanel();
1977
+
1978
+ // Redraw time range slider to set its width
1979
+ this._timeSlider.resize();
1980
+
1981
+ // Add listener to redraw all charts on tab change
1982
+ // (to work around an issue with the chart resizing to default width when pane is hidden)
1983
+ $('a[data-toggle="tab"]').on('shown.bs.tab', $.proxy(this._onWindowResize, this));
1984
+ }
1985
+ }
1986
+
1987
+ // Disable categories
1988
+ let disabledCat = (data.getSFSObject('monitored').containsKey('exclude') ? data.getSFSObject('monitored').getUtfStringArray('exclude') : []);
1989
+
1990
+ for (let cat of disabledCat)
1991
+ {
1992
+ let navLink = $(`#znm-${this._monitoredType}TabNavigator #tabs #tab-${cat}`);
1993
+
1994
+ navLink.addClass('disabled');
1995
+ navLink.attr('tabindex', -1);
1996
+ navLink.attr('aria-disabled', true);
1997
+ }
1998
+
1999
+ if (this._monitoredType == this.MONITORED_TYPE_ZONE)
2000
+ this._showZoneTrafficData(data.getSFSObject('monitored').getSFSObject('traffic'));
2001
+
2002
+ if (this._monitoredType == this.MONITORED_TYPE_USER)
2003
+ {
2004
+ // Stats
2005
+ this._showUserStatsData(data.getSFSObject('monitored').getSFSObject('stats'));
2006
+
2007
+ // NPC
2008
+ const isNpc = data.getSFSObject('monitored').getBool('npc');
2009
+
2010
+ // Disable disconnect, kick and ban buttons
2011
+ $('#znm-disconnectBt').attr('disabled', isNpc);
2012
+ $('#znm-kickBt').attr('disabled', isNpc);
2013
+ $('#znm-banBt').attr('disabled', isNpc);
2014
+
2015
+ // Geo-location
2016
+ const geoLocData = data.getSFSObject('monitored').getSFSObject('geoLoc');
2017
+ this._setGeoLocationUI(geoLocData);
2018
+ }
2019
+ }
2020
+ else
2021
+ {
2022
+ // Show alert
2023
+ this.shellCtrl.showSimpleAlert(`The ${Object(_utils_utilities__WEBPACK_IMPORTED_MODULE_4__["capitalizeFirst"])(this._monitoredType)} being monitored is no more available on the server, please select another one.`, false);
2024
+
2025
+ // Cancel monitoring
2026
+ this._onCloseMonitorBtClick();
2027
+ }
2028
+ }
2029
+ }
2030
+ }
2031
+ }
2032
+
2033
+ else if (command == this.RESP_UPDATE_ERROR)
2034
+ {
2035
+ if (data.getUtfString('zone') == this._monitoredZone
2036
+ && data.getUtfString('type') == this._monitoredType
2037
+ && data.getUtfString('name') == this._monitoredName)
2038
+ {
2039
+ // Show alert
2040
+ this.shellCtrl.showSimpleAlert(`Unable to update ${Object(_utils_utilities__WEBPACK_IMPORTED_MODULE_4__["capitalizeFirst"])(this._monitoredType)} settings; the following error was reported: ${data.getUtfString('message')}.`);
2041
+ }
2042
+ }
2043
+
2044
+ else if (command == this.RESP_ROOM_CONFIG)
2045
+ {
2046
+ // Re-enable Create button
2047
+ $('#znm-createRoomBt').attr('disabled', false);
2048
+
2049
+ // Show Room creation panel
2050
+ this._showRoomCreationPanel(data.getSFSArray('settings'));
2051
+ }
2052
+
2053
+ else if (command == this.RESP_ROOM_CONFIG_ERROR)
2054
+ {
2055
+ // Re-enable Create button
2056
+ $('#znm-createRoomBt').attr('disabled', false);
2057
+
2058
+ // Show an alert
2059
+ this.shellCtrl.showSimpleAlert(data.getUtfString('error'));
2060
+ }
2061
+
2062
+ else if (command == this.RESP_ROOM_CREATED)
2063
+ {
2064
+ // Re-enable room creation panel
2065
+ this._enableCreateRoomPanel(true);
2066
+
2067
+ // Hide room creation panel
2068
+ $('#znm-createRoomModal').modal('hide');
2069
+
2070
+ // Update rooms list
2071
+ this._requestData(true);
2072
+ }
2073
+
2074
+ else if (command == this.RESP_ROOM_CREATION_ERROR)
2075
+ {
2076
+ // Display error message
2077
+ $('#znm-createRoomError').text(data.getUtfString('error'));
2078
+ $('#znm-createRoomError').show();
2079
+
2080
+ // Re-enable room creation panel
2081
+ this._enableCreateRoomPanel(true);
2082
+ }
2083
+
2084
+ // Unexpected error received
2085
+ // This error is returned in case something went wrong when retrieving the monitored entity parameters,
2086
+ // so we have to stop requesting the same entity
2087
+ else if (command == this.RESP_UNEXPECTED_ERROR)
2088
+ {
2089
+ // Cancel monitoring
2090
+ this._onCloseMonitorBtClick();
2091
+
2092
+ // Show an alert
2093
+ this.shellCtrl.showSimpleAlert(data.getUtfString('error'));
2094
+ }
2095
+
2096
+ // Extension (Zone or Room) log messages received
2097
+ else if (command == this.RESP_LOG_MESSAGES)
2098
+ {
2099
+ let logEntries = data.getSFSArray('entries');
2100
+
2101
+ for (let e = 0; e < logEntries.size(); e++)
2102
+ {
2103
+ let logEntry = logEntries.getSFSObject(e);
2104
+
2105
+ const logZone = logEntry.getUtfString('zone');
2106
+ const logRoom = logEntry.getUtfString('room');
2107
+
2108
+ // Check if the zone is currently monitored
2109
+ if (this._monitoredZone == logZone)
2110
+ {
2111
+ // console.log(logEntry.getLong('time'))
2112
+ // console.log(new Date(logEntry.getLong('time'))
2113
+
2114
+ let ele = {
2115
+ timestamp: kendo.toString(new Date(logEntry.getLong('time')), 'dd/MM/yyyy HH:mm:ss'),
2116
+ level: logEntry.getUtfString('level'),
2117
+ message: logEntry.getUtfString('msg'),
2118
+ };
2119
+
2120
+ if (this._monitoredType == this.MONITORED_TYPE_ZONE && logRoom == '')
2121
+ {
2122
+ // Add to zone extension log
2123
+ this._addLogEntryToGrid(this._zoneExtLogGrid, ele);
2124
+ }
2125
+ else
2126
+ {
2127
+ if (this._monitoredType == this.MONITORED_TYPE_ROOM && this._monitoredName == logRoom)
2128
+ {
2129
+ // Add to room extension log
2130
+ this._addLogEntryToGrid(this._roomExtLogGrid, ele);
2131
+ }
2132
+ }
2133
+ }
2134
+ }
2135
+ }
2136
+ }
2137
+
2138
+ //---------------------------------
2139
+ // UI EVENT LISTENERS
2140
+ //---------------------------------
2141
+
2142
+ _onUpdateIntervalChange()
2143
+ {
2144
+ // Request data to server
2145
+ this._requestData(false);
2146
+ }
2147
+
2148
+ _onEntitiesPanelChange()
2149
+ {
2150
+ // Set main controls state
2151
+ this._setMainControlsEnabled();
2152
+
2153
+ // Request data to server
2154
+ this._requestData(true);
2155
+ }
2156
+
2157
+ /**
2158
+ * Update the Scope label in the Rooms panel.
2159
+ */
2160
+ _onZoneSelected()
2161
+ {
2162
+ // Clear Room and User lists
2163
+ this._resetRoomList();
2164
+ this._resetUserList();
2165
+
2166
+ // Set scope label
2167
+ this._setScopeLabel();
2168
+
2169
+ // Enable/disable Room and User tools
2170
+ const disabled = this._selectedZone == undefined;
2171
+
2172
+ // (NOTE: this enables/disables whole fieldset; this doesn't affect Kendo DropDown, so we have to do it manually)
2173
+ $('#roomTools').attr('disabled', disabled);
2174
+ $('#userTools').attr('disabled', disabled);
2175
+
2176
+ this._groupsDropDown.enable(!disabled);
2177
+
2178
+ // Set main controls state
2179
+ this._setMainControlsEnabled();
2180
+ }
2181
+
2182
+ /**
2183
+ * Update the Scope label in the Users panel.
2184
+ */
2185
+ _onRoomSelected()
2186
+ {
2187
+ // Clear User list
2188
+ this._resetUserList();
2189
+
2190
+ // Set scope label
2191
+ this._setScopeLabel();
2192
+
2193
+ // Enable Remove button
2194
+ $('#znm-removeRoomBt').attr('disabled', this._selectedRoom == undefined);
2195
+
2196
+ // Set main controls state
2197
+ this._setMainControlsEnabled();
2198
+ }
2199
+
2200
+ /**
2201
+ * Update the scope label in the Users panel.
2202
+ */
2203
+ _onGroupChange()
2204
+ {
2205
+ // Clear Room and User lists
2206
+ this._resetRoomList();
2207
+ this._resetUserList();
2208
+
2209
+ // Set scope label
2210
+ this._setScopeLabel();
2211
+
2212
+ // Request data to server
2213
+ this._requestData(true);
2214
+
2215
+ // Set main controls state
2216
+ this._setMainControlsEnabled();
2217
+ }
2218
+
2219
+ _onUserSelected()
2220
+ {
2221
+ // Set main controls state
2222
+ this._setMainControlsEnabled();
2223
+ }
2224
+
2225
+ /**
2226
+ * Show room creation panel.
2227
+ */
2228
+ _onCreateRoomBtClick()
2229
+ {
2230
+ // Disable Create button
2231
+ $('#znm-createRoomBt').attr('disabled', true);
2232
+
2233
+ // Request default room settings to extension
2234
+ this.sendExtensionRequest(this.REQ_GET_ROOM_CONFIG);
2235
+ }
2236
+
2237
+ /**
2238
+ * Remove existing room.
2239
+ */
2240
+ _onRemoveRoomBtClick()
2241
+ {
2242
+ this.shellCtrl.showConfirmWarning('Are you sure you want to remove the selected Room?', $.proxy(this._onRemoveRemoveConfirm, this));
2243
+ }
2244
+
2245
+ _onRemoveRemoveConfirm()
2246
+ {
2247
+ const selectedZone = this._zoneListBox.dataItem(this._zoneListBox.select());
2248
+ let selectedRoom = this._roomListBox.dataItem(this._roomListBox.select());
2249
+
2250
+ if (selectedRoom)
2251
+ {
2252
+ // Send request to server
2253
+ let params = new SFS2X.SFSObject();
2254
+ params.putUtfString('zone', selectedZone.name);
2255
+ params.putUtfString('room', selectedRoom.name);
2256
+
2257
+ this.sendExtensionRequest(this.REQ_REMOVE_ROOM, params);
2258
+
2259
+ // Request data to server to update the rooms list
2260
+ this._requestData(true);
2261
+ }
2262
+ }
2263
+
2264
+ /**
2265
+ * Remove content of room creation panel.
2266
+ */
2267
+ _onCreateRoomModalHidden(e)
2268
+ {
2269
+ // If a nested modal is opened, its closing causes the parent modal to be closed too (Bootstrap doesn't support nested modals)
2270
+ // As a workaround, here we reset the css class 'modal-open' when the nested modal is closed and skip everything else
2271
+ // In addition we had to use a custom listener on the close/cancel buttons of the nested modal (see config-grid.js for example)
2272
+ if (e.target !== document.getElementById('znm-createRoomModal'))
2273
+ {
2274
+ $('body').addClass('modal-open')
2275
+ return;
2276
+ }
2277
+
2278
+ // Destroy scrolling tabs in room creation panel
2279
+ $('#znm-roomCreatorTabNav #tabs').scrollingTabs('destroy');
2280
+
2281
+ // Remove all tab navigator content
2282
+ this._roomCreationIBuilder.destroyInterface();
2283
+
2284
+ // Remove listener for custom actions triggered by configuration interface
2285
+ $('#znm-roomCreatorTabNav').off('value-set');
2286
+
2287
+ // Reset and hide error message
2288
+ this._resetRoomCreationError();
2289
+ }
2290
+
2291
+ _onConfigValueSet(e) // SAME METHOD DUPLICATED IN zone-configurator.js
2292
+ {
2293
+ const configParam = e.target.data;
2294
+
2295
+ // Handle extension name/type dropdowns update and update the main class dropdown datasource accordingly
2296
+ if (configParam.name == 'extension.name' || configParam.name == 'extension.type' || configParam.name == 'extension.filterClass')
2297
+ {
2298
+ // All involved ConfigFormItems must be available and initialized to proceed
2299
+ const nameFormItem = this._roomCreationIBuilder.getConfigFormItem('extension.name');
2300
+ const typeFormItem = this._roomCreationIBuilder.getConfigFormItem('extension.type');
2301
+ const classFormItem = this._roomCreationIBuilder.getConfigFormItem('extension.file');
2302
+ const filterFormItem = this._roomCreationIBuilder.getConfigFormItem('extension.filterClass');
2303
+
2304
+ if (nameFormItem != null && typeFormItem != null && classFormItem != null && filterFormItem != null)
2305
+ {
2306
+ const source = nameFormItem.data;
2307
+ let classesList = [];
2308
+
2309
+ let data = source.triggerData;
2310
+ for (let i = 0; i < data.size(); i++)
2311
+ {
2312
+ let ext = data.getSFSObject(i);
2313
+
2314
+ if (ext.getUtfString('name') == nameFormItem.data.value && ext.getUtfString('type') == typeFormItem.data.value)
2315
+ {
2316
+ let classes = ext.get('classesString').split(','); // We don't use "getUTfString" because the type is Text in case a very large list of classes is returned
2317
+
2318
+ if (filterFormItem.data.value == true)
2319
+ {
2320
+ let filteredClasses = classes.filter(_utils_utilities__WEBPACK_IMPORTED_MODULE_4__["filterClassName"]);
2321
+ classes = filteredClasses;
2322
+ }
2323
+
2324
+ classesList = classesList.concat(classes);
2325
+ }
2326
+ }
2327
+
2328
+ let currentClass = classFormItem.data.value;
2329
+
2330
+ // If the classes list doesn't contain the current value, create an empty entry and reset the value
2331
+ if (classesList.indexOf(currentClass) < 0)
2332
+ {
2333
+ if (classesList.length == 0)
2334
+ {
2335
+ classesList.push('');
2336
+ currentClass = '';
2337
+ }
2338
+ else
2339
+ currentClass = classesList[0];
2340
+ }
2341
+
2342
+ let mainClassDropDown = classFormItem._innerWidget;
2343
+ mainClassDropDown.setDataSource(classesList);
2344
+
2345
+ classFormItem.data.value = currentClass;
2346
+ classFormItem._setWidgetValue();
2347
+ }
2348
+ }
2349
+ }
2350
+
2351
+ _onRoomCreatorCreateBtClick()
2352
+ {
2353
+ // Reset and hide error message
2354
+ this._resetRoomCreationError();
2355
+
2356
+ // Check validity
2357
+ if (this._roomCreationIBuilder.checkIsValid())
2358
+ {
2359
+ let changes = this._roomCreationIBuilder.getChangedData();
2360
+
2361
+ if (changes.size() > 0)
2362
+ {
2363
+ // Check the room name against the rooms list (duplicate names not allowed!)
2364
+ if (true)//this._validateNewRoomName(changes))
2365
+ {
2366
+ // Disable room creation panel
2367
+ this._enableCreateRoomPanel(false);
2368
+
2369
+ // Send settings to server instance
2370
+ let params = new SFS2X.SFSObject();
2371
+ params.putSFSArray('settings', changes);
2372
+ params.putUtfString('zName', this._zoneListBox.dataItem(this._zoneListBox.select()).name);
2373
+ params.putBool('notify', $('#znm-notifyClientsCB').prop('checked'));
2374
+
2375
+ // Send settings to extension
2376
+ this.sendExtensionRequest(this.REQ_CREATE_ROOM, params);
2377
+ }
2378
+ else
2379
+ {}
2380
+ }
2381
+ }
2382
+ else
2383
+ {
2384
+ // Show alert
2385
+ this.shellCtrl.showSimpleAlert('Unable to submit Room configuration due to an invalid value; please verify the highlighted form fields in all tabs.', true);
2386
+ }
2387
+ }
2388
+
2389
+ _onShowRoomFilterBtClick()
2390
+ {
2391
+ this._roomFilter.show();
2392
+ }
2393
+
2394
+ _onShowUserFilterBtClick()
2395
+ {
2396
+ this._userFilter.show();
2397
+ }
2398
+
2399
+ _onApplyBtChange()
2400
+ {
2401
+ // Request data to server
2402
+ this._requestData(true);
2403
+ }
2404
+
2405
+ _onRoomFilterUpdated()
2406
+ {
2407
+ // Enable/disable "Apply" checkbox
2408
+ $('#znm-applyRoomFilterCB').attr('disabled', this._roomFilter.filterExpression == null);
2409
+
2410
+ // Request data to server
2411
+ this._requestData(true);
2412
+ }
2413
+
2414
+ _onUserFilterUpdated()
2415
+ {
2416
+ // Enable/disable "Apply" checkbox
2417
+ $('#znm-applyUserFilterCB').attr('disabled', this._userFilter.filterExpression == null);
2418
+
2419
+ // Request data to server
2420
+ this._requestData(true);
2421
+ }
2422
+
2423
+ _onMonitorSelectionBtClick()
2424
+ {
2425
+ if (this._selectedZone)
2426
+ {
2427
+ // Cancel previous monitoring
2428
+ this._onCloseMonitorBtClick();
2429
+
2430
+ let getZoneUserCountHistory = false;
2431
+
2432
+ this._monitoredZone = this._selectedZone.name;
2433
+
2434
+ // Zone must be monitored
2435
+ if (this._activePanelType == 'zone')
2436
+ {
2437
+ this._monitoredType = this.MONITORED_TYPE_ZONE;
2438
+ this._monitoredName = this._monitoredZone;
2439
+
2440
+ getZoneUserCountHistory = true;
2441
+ }
2442
+
2443
+ // Room must be monitored
2444
+ if (this._activePanelType == 'room' && this._selectedRoom != undefined)
2445
+ {
2446
+ this._monitoredType = this.MONITORED_TYPE_ROOM;
2447
+ this._monitoredName = this._selectedRoom.name;
2448
+ }
2449
+
2450
+ // User must be monitored
2451
+ if (this._activePanelType == 'user' && this._selectedUser != undefined)
2452
+ {
2453
+ this._monitoredType = this.MONITORED_TYPE_USER;
2454
+ this._monitoredName = this._selectedUser.name;
2455
+ }
2456
+
2457
+ // Show loading bar
2458
+ this._switchView('znm-loading');
2459
+
2460
+ // Request data to server
2461
+ this._requestData(true, getZoneUserCountHistory);
2462
+ }
2463
+ }
2464
+
2465
+ _onSendAdminMsgInKeyUp(event)
2466
+ {
2467
+ if (event.key !== 'Enter')
2468
+ return;
2469
+
2470
+ event.preventDefault();
2471
+ this._onSendAdminMsgBtClick();
2472
+ }
2473
+
2474
+ _onSendAdminMsgBtClick()
2475
+ {
2476
+ if (this._selectedZone && $('#znm-messageIn').val() != '')
2477
+ {
2478
+ // Build request parameters
2479
+ let params = new SFS2X.SFSObject();
2480
+
2481
+ // Always include zone
2482
+ params.putUtfString('zone', this._selectedZone.name);
2483
+
2484
+ // Send message to room?
2485
+ if (this._activePanelType == 'room' && this._selectedRoom != undefined)
2486
+ params.putUtfString('room', this._selectedRoom.name);
2487
+
2488
+ // Send message to user?
2489
+ if (this._activePanelType == 'user' && this._selectedUser != undefined)
2490
+ params.putUtfString('user', this._selectedUser.name);
2491
+
2492
+ // Add message
2493
+ params.putUtfString('msg', $('#znm-messageIn').val());
2494
+
2495
+ // Send request to extension
2496
+ this.sendExtensionRequest(this.REQ_ADMIN_MSG, params);
2497
+
2498
+ // Clear text input
2499
+ $('#znm-messageIn').val('');
2500
+ }
2501
+ }
2502
+
2503
+ _onCloseMonitorBtClick()
2504
+ {
2505
+ // Save ref. for later usage
2506
+ const monitoredType = this._monitoredType;
2507
+
2508
+ this._monitoredZone = null;
2509
+ this._monitoredType = null;
2510
+ this._monitoredName = null;
2511
+
2512
+ // Clear geolocation UI
2513
+ this._clearGeoLocationUI();
2514
+
2515
+ // Clear log datagrids dataproviders
2516
+ // NOTE: a try-catch is used here because, for an unknown reason, Kendo is throwing an error when resetting the data sources when the module is destroyed
2517
+ try
2518
+ {
2519
+ this._zoneExtLogGrid.setDataSource([]);
2520
+ this._roomExtLogGrid.setDataSource([]);
2521
+ }
2522
+ catch (e) { /* Ignore */ }
2523
+
2524
+ // Leave edit mode
2525
+ this._onCancelBtClick();
2526
+
2527
+ // Rearrange monitoring interface
2528
+ this._setMonitoringInterface();
2529
+
2530
+ // Clear tab navigator
2531
+ this._clearTabs(monitoredType);
2532
+ }
2533
+
2534
+ _onEditBtClick()
2535
+ {
2536
+ if (!this._isEditing)
2537
+ {
2538
+ // Show edit controls
2539
+ $('#znm-editControls').show();
2540
+
2541
+ // Hide edit button
2542
+ $('#znm-editBt').hide();
2543
+
2544
+ // Enable editable fields
2545
+ this._interfaceBuilder.disableInterface(false);
2546
+
2547
+ this._isEditMode = true;
2548
+ }
2549
+ }
2550
+
2551
+ _onCancelBtClick()
2552
+ {
2553
+ if (this._isEditing)
2554
+ {
2555
+ // Hide edit controls
2556
+ $('#znm-editControls').hide();
2557
+
2558
+ // Show edit button
2559
+ $('#znm-editBt').show();
2560
+
2561
+ // Disable editable fields
2562
+ this._interfaceBuilder.disableInterface(true);
2563
+
2564
+ this._isEditMode = false;
2565
+
2566
+ // Hide validation messages
2567
+ this._interfaceBuilder.resetValidation();
2568
+
2569
+ // Request data to update interface (updating suspended in edit mode)
2570
+ this._requestData(true);
2571
+ }
2572
+ }
2573
+
2574
+ _onSubmitBtClick()
2575
+ {
2576
+ if (this._isEditing)
2577
+ {
2578
+ // Check validity
2579
+ if (this._interfaceBuilder.checkIsValid())
2580
+ {
2581
+ let changes = this._interfaceBuilder.getChangedData();
2582
+
2583
+ if (changes.size() > 0)
2584
+ {
2585
+ //console.log(changes.getDump())
2586
+
2587
+ // Send settings to server instance
2588
+ let params = new SFS2X.SFSObject();
2589
+ params.putSFSArray('settings', changes);
2590
+ params.putUtfString('zone', this._monitoredZone);
2591
+
2592
+ if (this._monitoredType == this.MONITORED_TYPE_ROOM)
2593
+ {
2594
+ // Submit room settings
2595
+ params.putUtfString('room', this._monitoredName);
2596
+ this.sendExtensionRequest(this.REQ_SET_ROOM_SETTINGS, params);
2597
+ }
2598
+ else if (this._monitoredType == this.MONITORED_TYPE_USER)
2599
+ {
2600
+ // Submit user settings
2601
+ params.putUtfString('user', this._monitoredName);
2602
+ this.sendExtensionRequest(this.REQ_SET_USER_SETTINGS, params);
2603
+ }
2604
+ else
2605
+ {
2606
+ // Submit zone settings
2607
+ this.sendExtensionRequest(this.REQ_SET_ZONE_SETTINGS, params);
2608
+ }
2609
+
2610
+ // Leave edit mode
2611
+ this._onCancelBtClick();
2612
+ }
2613
+ }
2614
+ else
2615
+ {
2616
+ // Show alert
2617
+ this.shellCtrl.showSimpleAlert('Unable to submit changes due to an invalid value; please verify the highlighted form fields in all tabs.', true);
2618
+ }
2619
+ }
2620
+ }
2621
+
2622
+ _onTimeRangeChange()
2623
+ {
2624
+ let values = this._timeSlider.value();
2625
+
2626
+ if (values[0] == values[1])
2627
+ {
2628
+ if (values[1] == -24)
2629
+ values[1] = -23;
2630
+
2631
+ values[0] = values[1] - 1;
2632
+
2633
+ // Reset the time range slider value (we need to use setTimeout
2634
+ // bacause doing it in the change event listener doesn't redraw the slider)
2635
+ setTimeout($.proxy( function(values) { this._timeSlider.value(values); }, this), 10, values);
2636
+ }
2637
+
2638
+ this._userCountChart.range = values;
2639
+ }
2640
+
2641
+ _onWindowResize()
2642
+ {
2643
+ // Redraw charts
2644
+ this._userCountChart.redraw();
2645
+ this._packetQueueChart.redraw();
2646
+ this._droppedMsgChart.redraw();
2647
+ this._writtenDataChart.redraw();
2648
+ this._readDataChart.redraw();
2649
+
2650
+ // Redraw time range slider
2651
+ this._timeSlider.resize();
2652
+ }
2653
+
2654
+ _onWordsReloadBtClick()
2655
+ {
2656
+ if (this._monitoredType == this.MONITORED_TYPE_ZONE)
2657
+ {
2658
+ // Send request to extension
2659
+ let params = new SFS2X.SFSObject();
2660
+ params.putUtfString('zone', this._monitoredName);
2661
+
2662
+ this.sendExtensionRequest(this.REQ_RELOAD_WORDS, params);
2663
+ }
2664
+ }
2665
+
2666
+ _onZoneExtReloadBtClick()
2667
+ {
2668
+ if (this._monitoredType == this.MONITORED_TYPE_ZONE)
2669
+ {
2670
+ // Send request to extension
2671
+ let params = new SFS2X.SFSObject();
2672
+ params.putUtfString('zone', this._monitoredName);
2673
+
2674
+ this.sendExtensionRequest(this.REQ_RELOAD_ZONE_EXT, params);
2675
+ }
2676
+ }
2677
+
2678
+ _onDisconnectBtClick()
2679
+ {
2680
+ if (this._monitoredType == this.MONITORED_TYPE_USER)
2681
+ {
2682
+ // Send request to extension
2683
+ let params = new SFS2X.SFSObject();
2684
+ params.putUtfString('zone', this._monitoredZone);
2685
+ params.putUtfString('user', this._monitoredName);
2686
+
2687
+ this.sendExtensionRequest(this.REQ_DISCONNECT_USER, params);
2688
+ }
2689
+ }
2690
+
2691
+ _onKickBtClick()
2692
+ {
2693
+ if (this._monitoredType == this.MONITORED_TYPE_USER)
2694
+ {
2695
+ // Send request to extension
2696
+ let params = new SFS2X.SFSObject();
2697
+ params.putUtfString('zone', this._monitoredZone);
2698
+ params.putUtfString('user', this._monitoredName);
2699
+ params.putUtfString('msg', $('#znm-kickMsgIn').val());
2700
+ params.putInt('delay', (this._kickDelayIn.value() != null ? Number(this._kickDelayIn.value()) : this.KICK_BAN_DEFAULT_DELAY));
2701
+
2702
+ this.sendExtensionRequest(this.REQ_KICK_USER, params);
2703
+
2704
+ // Reset message
2705
+ $('#znm-kickMsgIn').val('');
2706
+ }
2707
+ }
2708
+
2709
+ _onBanBtClick()
2710
+ {
2711
+ if (this._monitoredType == this.MONITORED_TYPE_USER)
2712
+ {
2713
+ // Send request to extension
2714
+ let params = new SFS2X.SFSObject();
2715
+ params.putUtfString('zone', this._monitoredZone);
2716
+ params.putUtfString('user', this._monitoredName);
2717
+ params.putUtfString('msg', $('#znm-banMsgIn').val());
2718
+ params.putUtfString('rsn', $('#znm-banRsnIn').val());
2719
+ params.putUtfString('mode', this._banModeDd.select() > 0 ? this._banModeDd.value() : 'NAME');
2720
+ params.putInt('delay', (this._banDelayIn.value() != null ? Number(this._banDelayIn.value()) : this.KICK_BAN_DEFAULT_DELAY));
2721
+
2722
+ let duration = this._banDurationIn.value() != null ? Number(this._banDurationIn.value()) : 1;
2723
+
2724
+ if (this._banDurUnitDd.value() == 'hours')
2725
+ duration = duration * 60;
2726
+ else if (this._banDurUnitDd.value() == 'days')
2727
+ duration = duration * 60 * 24;
2728
+
2729
+ params.putInt('duration', duration);
2730
+
2731
+ this.sendExtensionRequest(this.REQ_BAN_USER, params);
2732
+
2733
+ // Reset message and reason
2734
+ $('#znm-banMsgIn').val('');
2735
+ $('#znm-banRsnIn').val('');
2736
+ }
2737
+ }
2738
+
2739
+ //------------------------------------
2740
+ // PRIVATE METHODS
2741
+ //------------------------------------
2742
+
2743
+ _setMonitoringInterface()
2744
+ {
2745
+ const enabled = (this._monitoredType != null && this._monitoredName != null);
2746
+
2747
+ // Show/hide header and footer
2748
+ if (enabled)
2749
+ {
2750
+ this._switchView(`znm-${this._monitoredType}Monitor`);
2751
+
2752
+ // Header title
2753
+ let title = 'Now monitoring ';
2754
+
2755
+ if (this._monitoredType == this.MONITORED_TYPE_USER)
2756
+ title += `User: <strong>${this._monitoredName}</strong> (Zone: ${this._monitoredZone})`;
2757
+ else if (this._monitoredType == this.MONITORED_TYPE_ROOM)
2758
+ title += `Room: <strong>${this._monitoredName}</strong> (Zone: ${this._monitoredZone})`;
2759
+ else
2760
+ title += `Zone: <strong>${this._monitoredZone}</strong>`;
2761
+
2762
+ $('#znm-monitoredHeader').html(title);
2763
+ $('#znm-monitoredFooter').show();
2764
+
2765
+ // Show panel
2766
+ this._switchPanel('znm-mainPanel');
2767
+ }
2768
+ else
2769
+ {
2770
+ this._switchView('znm-select');
2771
+
2772
+ $('#znm-monitoredHeader').html('');
2773
+ $('#znm-monitoredFooter').hide();
2774
+
2775
+ // Show panel
2776
+ this._switchPanel('znm-sidebarPanel');
2777
+ }
2778
+ }
2779
+
2780
+ _switchView(viewId)
2781
+ {
2782
+ document.getElementById('znm-viewstack').selectedElement = document.getElementById(viewId);
2783
+ }
2784
+
2785
+ _switchPanel(panelId)
2786
+ {
2787
+ document.getElementById('znm-view').selectedPanel = document.getElementById(panelId);
2788
+ }
2789
+
2790
+ /**
2791
+ * Build the polling request to be sent to the server, based on the selections and other settings in the accordion.
2792
+ */
2793
+ _requestData(newId = false, getZoneUserCountHistory = false)
2794
+ {
2795
+ // Clear previous request scheduling
2796
+ clearTimeout(this._requestTimer);
2797
+
2798
+ // Check if connection is still available
2799
+ if (this.smartFox.isConnected)
2800
+ {
2801
+ if (newId)
2802
+ this._currentRequestId++;
2803
+
2804
+ // Build request parameters
2805
+ let params = new SFS2X.SFSObject();
2806
+
2807
+ // The updated zones/rooms/users lists are requested if the corresponding panel is displayed only
2808
+ const getZones = (this._activePanelType == 'zone');
2809
+ const getRooms = (this._activePanelType == 'room' && this._selectedZone != undefined);
2810
+ const getUsers = (this._activePanelType == 'user' && this._selectedZone != undefined);
2811
+
2812
+ // --- ZONES ---
2813
+ params.putBool('zones', getZones);
2814
+
2815
+ // ROOMS & USERS
2816
+ if (getRooms || getUsers)
2817
+ {
2818
+ // Common filtering params:
2819
+
2820
+ // a) zone name
2821
+ params.putUtfString('zone', this._selectedZone.name);
2822
+
2823
+ // b) group name
2824
+ params.putUtfString('group', this._selectedGroup.name);
2825
+ }
2826
+
2827
+ // ROOMS
2828
+ params.putBool('rooms', getRooms);
2829
+ if (getRooms)
2830
+ {
2831
+ // Filtering params:
2832
+
2833
+ // c) advanced filtering params
2834
+ if ($('#znm-applyRoomFilterCB').prop('checked') && this._roomFilter.filterExpression != null)
2835
+ params.putSFSArray('rFilter', this._roomFilter.filterExpression.toSFSArray());
2836
+ }
2837
+
2838
+ // USERS
2839
+ params.putBool('users', getUsers);
2840
+ if (getUsers)
2841
+ {
2842
+ // Filtering params:
2843
+
2844
+ // c) room name
2845
+ if (this._selectedRoom)
2846
+ params.putUtfString('room', this._selectedRoom.name);
2847
+
2848
+ // d) advanced filtering params
2849
+ if ($('#znm-applyUserFilterCB').prop('checked') && this._userFilter.filterExpression != null)
2850
+ params.putSFSArray('uFilter', this._userFilter.filterExpression.toSFSArray());
2851
+ }
2852
+
2853
+ // --- CURRENTLY MONITORED DATA ---
2854
+ if (this._monitoredType != null && this._monitoredName != null)
2855
+ {
2856
+ let monitoredObj = this._getBasicMonitoredObject();
2857
+
2858
+ if (this._monitoredType == this.MONITORED_TYPE_ZONE)
2859
+ monitoredObj.putBool('uc', getZoneUserCountHistory);
2860
+
2861
+ params.putSFSObject('monitored', monitoredObj);
2862
+ }
2863
+
2864
+ // Set request id; when a response is received, we check its id matches the current request id: if not, the response is discarded
2865
+ params.putInt('id', this._currentRequestId);
2866
+
2867
+ // Send request to extension
2868
+ this.sendExtensionRequest(this.REQ_GET_DATA, params);
2869
+
2870
+ // Schedule next request
2871
+ this._requestTimer = setTimeout($.proxy(this._requestData, this), Number(this._intervalDropDown.value()) * 1000);
2872
+ }
2873
+ }
2874
+
2875
+ _getBasicMonitoredObject()
2876
+ {
2877
+ let monitoredObj = new SFS2X.SFSObject();
2878
+
2879
+ monitoredObj.putUtfString('zone', this._monitoredZone);
2880
+ monitoredObj.putUtfString('type', this._monitoredType);
2881
+ monitoredObj.putUtfString('name', this._monitoredName);
2882
+
2883
+ return monitoredObj;
2884
+ }
2885
+
2886
+ _setZonesDataProvider(zonesData)
2887
+ {
2888
+ this._setListDataProvider(this._zoneListBox, zonesData, true);
2889
+ }
2890
+
2891
+ _setRoomsDataProvider(roomsData)
2892
+ {
2893
+ this._setListDataProvider(this._roomListBox, roomsData, true);
2894
+
2895
+ // Set Remove button state
2896
+ $('#znm-removeRoomBt').attr('disabled', this._selectedRoom == undefined);
2897
+ }
2898
+
2899
+ _setUsersDataProvider(usersData)
2900
+ {
2901
+ this._setListDataProvider(this._userListBox, usersData);
2902
+ }
2903
+
2904
+ _setListDataProvider(listWidget, listData, countUsers = false)
2905
+ {
2906
+ // Save reference to selected item name
2907
+ // NOTE: as we are substituting the whole data source, we need it to re-select the same item after update
2908
+ let selectedDataItem = listWidget.dataItem(listWidget.select());
2909
+ let selectedDataItemName = selectedDataItem ? selectedDataItem.name : null;
2910
+
2911
+ let dataArray = [];
2912
+
2913
+ // Convert data coming from server
2914
+ for (let i = 0; i < listData.size(); i++)
2915
+ {
2916
+ let itemData = listData.getSFSObject(i);
2917
+
2918
+ let item = {};
2919
+ item.name = itemData.getUtfString('name');
2920
+
2921
+ if (countUsers)
2922
+ item.users = itemData.getInt('users');
2923
+
2924
+ dataArray.push(item);
2925
+ }
2926
+
2927
+ // Create new data source
2928
+ let listDS = new kendo.data.DataSource({
2929
+ data: dataArray,
2930
+ schema: {
2931
+ model: {
2932
+ id: 'name'
2933
+ }
2934
+ },
2935
+ sort: {
2936
+ field: 'name',
2937
+ dir: 'asc'
2938
+ }
2939
+ });
2940
+
2941
+ // Assign data source to list
2942
+ listWidget.setDataSource(listDS);
2943
+
2944
+ // Select again previously selected item
2945
+ if (selectedDataItemName != null)
2946
+ {
2947
+ selectedDataItem = listDS.get(selectedDataItemName);
2948
+
2949
+ if (selectedDataItem)
2950
+ {
2951
+ let selectedElement = listWidget.wrapper.find('[data-uid="' + selectedDataItem.uid + '"]');
2952
+ listWidget.select(selectedElement);
2953
+ }
2954
+ }
2955
+
2956
+ // Reset main control state
2957
+ this._setMainControlsEnabled();
2958
+ }
2959
+
2960
+ _setGroupsDataProvider(groupsData)
2961
+ {
2962
+ // Create Groups array, adding common entries
2963
+ let groupsArray = [
2964
+ this._getGroupObj('', this.ANY_LABEL),
2965
+ this._getGroupObj(this.DEFAULT_GROUP_NAME)
2966
+ ];
2967
+
2968
+ // Save reference to selected group name
2969
+ // NOTE: as we are substituting the whole data source, we need it to re-select the same item after update
2970
+ let selectedDataItem = this._selectedGroup;
2971
+ let selectedDataItemName = selectedDataItem ? selectedDataItem.name : null;
2972
+
2973
+ if (groupsData != null)
2974
+ {
2975
+ for (let i = 0; i < groupsData.length; i++)
2976
+ {
2977
+ if (groupsData[i] != this.DEFAULT_GROUP_NAME) // Default group was added before
2978
+ groupsArray.push(this._getGroupObj(groupsData[i]));
2979
+ }
2980
+ }
2981
+
2982
+ // Create new data source
2983
+ let groupDS = new kendo.data.DataSource({
2984
+ data: groupsArray,
2985
+ schema: {
2986
+ model: {
2987
+ id: 'name'
2988
+ }
2989
+ }
2990
+ });
2991
+
2992
+ // Assign data source to dropdown
2993
+ this._groupsDropDown.setDataSource(groupDS);
2994
+
2995
+ //--------------------------------
2996
+
2997
+ // Select previously selected item
2998
+ selectedDataItem = groupDS.get(selectedDataItemName);
2999
+
3000
+ // If group is not found, select the default one
3001
+ if (selectedDataItem == undefined)
3002
+ selectedDataItem = groupDS.get(this.DEFAULT_GROUP_NAME);
3003
+
3004
+ this._groupsDropDown.select(function(dataItem) {
3005
+ return dataItem.name === selectedDataItem.name;
3006
+ });
3007
+ }
3008
+
3009
+ _getGroupObj(name, label = null)
3010
+ {
3011
+ return {
3012
+ name: name,
3013
+ label: (label != null ? label : name)
3014
+ }
3015
+ }
3016
+
3017
+ /**
3018
+ * Update the Scope label in the Rooms panel and in the Users panel.
3019
+ */
3020
+ _setScopeLabel()
3021
+ {
3022
+ let roomScope = '';
3023
+ let userScope = '';
3024
+
3025
+ if (this._selectedZone)
3026
+ {
3027
+ let zoneName = this._selectedZone.name;
3028
+ roomScope = this._getScopeLabelPart('Zone:', zoneName);
3029
+
3030
+ let selectedGroup = this._selectedGroup;
3031
+ let groupName = (selectedGroup && selectedGroup.name != '') ? selectedGroup.name : this.ANY_LABEL;
3032
+ let roomName = (this._selectedRoom) ? this._selectedRoom.name : this.ANY_LABEL;
3033
+
3034
+ userScope = this._getScopeLabelPart('Zone:', zoneName) + '<br>' + this._getScopeLabelPart('Group:', groupName) + '<br>' + this._getScopeLabelPart('Room:', roomName);
3035
+ }
3036
+
3037
+ $('#znm-roomScopeLb').html(roomScope);
3038
+ $('#znm-userScopeLb').html(userScope);
3039
+ }
3040
+
3041
+ _getScopeLabelPart(label, text)
3042
+ {
3043
+ return `<span class="text-muted">${label}</span> <span>${text}</span>`;
3044
+ }
3045
+
3046
+ _resetRoomList()
3047
+ {
3048
+ this._roomListBox.setDataSource([]);
3049
+
3050
+ // Also disable Remove button
3051
+ $('#znm-removeRoomBt').attr('disabled', true);
3052
+ }
3053
+
3054
+ _resetUserList()
3055
+ {
3056
+ this._userListBox.setDataSource([]);
3057
+ }
3058
+
3059
+ _setMainControlsEnabled()
3060
+ {
3061
+ let enabled = (this._activePanelType == 'zone' && this._selectedZone != undefined)
3062
+ || (this._activePanelType == 'room' && this._selectedRoom != undefined)
3063
+ || (this._activePanelType == 'user' && this._selectedUser != undefined);
3064
+
3065
+ $('#znm-mainControls').attr('disabled', !enabled);
3066
+
3067
+ $('#znm-monitorTargetLb').text(enabled ? Object(_utils_utilities__WEBPACK_IMPORTED_MODULE_4__["capitalizeFirst"])(this._activePanelType) : 'selection');
3068
+ $('#znm-messageIn').attr('placeholder', 'Message to ' + (enabled ? Object(_utils_utilities__WEBPACK_IMPORTED_MODULE_4__["capitalizeFirst"])(this._activePanelType) : 'selection'));
3069
+ }
3070
+
3071
+ _showLimitExceededWarning(icon, title)
3072
+ {
3073
+ icon.attr('title', title);
3074
+
3075
+ if (title != '')
3076
+ icon.removeClass('hidden');
3077
+ else
3078
+ icon.addClass('hidden');
3079
+ }
3080
+
3081
+ _showRoomCreationPanel(roomSettings)
3082
+ {
3083
+ // Build user interface based on passed data
3084
+ this._roomCreationIBuilder.buildInterface(roomSettings, 'znm-roomCreatorTabNav', false, 'rc');
3085
+
3086
+ // Enable scrolling tabs
3087
+ $('#znm-roomCreatorTabNav > #tabs').scrollingTabs({
3088
+ bootstrapVersion: 4,
3089
+ scrollToTabEdge: true,
3090
+ enableSwiping: true,
3091
+ disableScrollArrowsOnFullyScrolled: true,
3092
+ cssClassLeftArrow: 'fa fa-chevron-left',
3093
+ cssClassRightArrow: 'fa fa-chevron-right'
3094
+ });
3095
+
3096
+ // Reset Notify clients checkbox
3097
+ $('#znm-notifyClientsCB').prop('checked', true);
3098
+
3099
+ // Set listener for custom actions triggered by configuration interface
3100
+ $('#znm-roomCreatorTabNav').on('value-set', $.proxy(this._onConfigValueSet, this));
3101
+
3102
+ // Display panel
3103
+ $('#znm-createRoomModal').modal('show');
3104
+
3105
+ // Reset and hide error message
3106
+ this._resetRoomCreationError();
3107
+ }
3108
+
3109
+ _resetRoomCreationError()
3110
+ {
3111
+ // Reset and hide error message
3112
+ $('#znm-createRoomError').text('');
3113
+ $('#znm-createRoomError').hide();
3114
+ }
3115
+
3116
+ _validateNewRoomName(changes)
3117
+ {
3118
+ for (let i = 0; i < changes.size(); i++)
3119
+ {
3120
+ const setting = changes.getSFSObject(i);
3121
+
3122
+ if (setting.containsKey('name') && setting.getUtfString('name') == 'name')
3123
+ {
3124
+ // Get name value
3125
+ const name = setting.getText('value');
3126
+
3127
+ // Get data source
3128
+ const ds = this._roomListBox.dataSource.data();
3129
+
3130
+ // Check if name exists in data source
3131
+ for (let j = 0; j < ds.length; j++)
3132
+ {
3133
+ if (ds[j].name == name)
3134
+ return false;
3135
+ }
3136
+
3137
+ break;
3138
+ }
3139
+ }
3140
+
3141
+ return true;
3142
+ }
3143
+
3144
+ _enableCreateRoomPanel(enable)
3145
+ {
3146
+ let modalElement = $('#znm-createRoomModal');
3147
+
3148
+ // Enable modal close buttons
3149
+ $('button[data-dismiss="modal"]', modalElement).attr('disabled', !enable);
3150
+
3151
+ // Enable create button
3152
+ $('#znm-roomCreatorCreateBt', modalElement).attr('disabled', !enable);
3153
+
3154
+ // Enable checkbox
3155
+ $('#znm-notifyClientsCB', modalElement).attr('disabled', !enable);
3156
+
3157
+ // Enable configuration interface
3158
+ this._roomCreationIBuilder.disableInterface(!enable);
3159
+ }
3160
+
3161
+ _clearTabs(monitoredType)
3162
+ {
3163
+ // Destroy scrolling tabs
3164
+ $(`#znm-${monitoredType}TabNavigator #tabs`).scrollingTabs('destroy');
3165
+
3166
+ // Remove all tab navigator content
3167
+ this._interfaceBuilder.destroyInterface();
3168
+
3169
+ // Set all tab panels as inactive
3170
+ $(`#znm-${monitoredType}TabNavigator #tabPanels .tab-pane`).removeClass('show active');
3171
+
3172
+ // Remove tab change event listener
3173
+ $('a[data-toggle="tab"]').off('shown.bs.tab');
3174
+
3175
+ this._skipInitTabs = false;
3176
+ }
3177
+
3178
+ _showZoneTrafficData(data)
3179
+ {
3180
+ // Build user count monitor history
3181
+ if (data.containsKey('history'))
3182
+ {
3183
+ let userCountData = data.getIntArray('history');
3184
+ let samplingRateMins = data.getInt('rate');
3185
+
3186
+ this._userCountChart.addHistoryEntries(userCountData, samplingRateMins * 60);
3187
+ }
3188
+
3189
+ // Add last user count value
3190
+ this._userCountChart.addEntry(data.getInt('current'));
3191
+ }
3192
+
3193
+ _addLogEntryToGrid(grid, item)
3194
+ {
3195
+ let ds = grid.dataSource;
3196
+
3197
+ // Check items limit
3198
+ if (ds.total() == this.MAX_EXTENSION_LOG_SIZE)
3199
+ ds.remove(ds.at(0));
3200
+
3201
+ ds.add(item);
3202
+ }
3203
+
3204
+ _showUserStatsData(data)
3205
+ {
3206
+ // Packet queue filling %
3207
+ let packetQueue = Object(_utils_utilities__WEBPACK_IMPORTED_MODULE_4__["roundToDecimals"])(data.getFloat('packet'), 2);
3208
+ this._packetQueueChart.setDataSource([{category: 'Queue', value: packetQueue}]);
3209
+
3210
+ // Dropped messages
3211
+ let droppedMsg = data.getInt('dropped');
3212
+ this._droppedMsgChart.setDataSource([{category: 'Dropped', value: droppedMsg}]);
3213
+
3214
+ // Written data amount
3215
+ let writtenDataObj = Object(_utils_utilities__WEBPACK_IMPORTED_MODULE_4__["scaleBytes"])(data.getLong('wBytes'), 2);
3216
+ this._writtenDataChart.setDataSource([{category: 'Written', value: writtenDataObj.value, unit: writtenDataObj.unit}]);
3217
+
3218
+ // Read data amount
3219
+ let readDataObj = Object(_utils_utilities__WEBPACK_IMPORTED_MODULE_4__["scaleBytes"])(data.getLong('rBytes'), 2);
3220
+ this._readDataChart.setDataSource([{category: 'Read', value: readDataObj.value, unit: readDataObj.unit}]);
3221
+ }
3222
+
3223
+ _setGeoLocationUI(geoLocData)
3224
+ {
3225
+ const location = geoLocData.getUtfString('location');
3226
+ const error = geoLocData.getUtfString('error');
3227
+ const latitude = geoLocData.getUtfString('latitude');
3228
+ const longitude = geoLocData.getUtfString('longitude');
3229
+
3230
+ // Show location
3231
+ $('#znm-geoLocationLb').text(location);
3232
+
3233
+ // Log error
3234
+ if (error != '')
3235
+ this.shellCtrl.logMessage(error, 'warn');
3236
+
3237
+ // Enable/disable Show map button
3238
+ if (latitude != '' && longitude != '')
3239
+ {
3240
+ $('#znm-showMapBt').attr('disabled', false);
3241
+
3242
+ const url = `https://www.google.com/maps/search/?api=1&query=${Number(latitude) + ',' + Number(longitude)}`;
3243
+ $('#znm-showMapBt').attr('href', url);
3244
+ }
3245
+ }
3246
+
3247
+ _clearGeoLocationUI()
3248
+ {
3249
+ $('#znm-geoLocationLb').text('');
3250
+ $('#znm-showMapBt').attr('disabled', true);
3251
+ $('#znm-showMapBt').attr('href', '#');
3252
+ }
3253
+
3254
+ //---------------------------------
3255
+ // PRIVATE GETTERS
3256
+ //---------------------------------
3257
+
3258
+ get _activePanelType()
3259
+ {
3260
+ return this._accordion.select().data('itemType');
3261
+ }
3262
+
3263
+ get _selectedZone()
3264
+ {
3265
+ return this._zoneListBox.dataItem(this._zoneListBox.select());
3266
+ }
3267
+
3268
+ get _selectedGroup()
3269
+ {
3270
+ return this._groupsDropDown.dataItem(this._groupsDropDown.select());
3271
+ }
3272
+
3273
+ get _selectedRoom()
3274
+ {
3275
+ return this._roomListBox.dataItem(this._roomListBox.select());
3276
+ }
3277
+
3278
+ get _selectedUser()
3279
+ {
3280
+ return this._userListBox.dataItem(this._userListBox.select());
3281
+ }
3282
+
3283
+ get _isEditing()
3284
+ {
3285
+ return (this._monitoredType != null && this._monitoredName != null && this._isEditMode);
3286
+ }
3287
+ }
3288
+
3289
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "jquery")))
3290
+
3291
+ /***/ }),
3292
+
3293
+ /***/ "./src/utils/match-properties.js":
3294
+ /*!***************************************!*\
3295
+ !*** ./src/utils/match-properties.js ***!
3296
+ \***************************************/
3297
+ /*! exports provided: RoomPropertiesData, UserPropertiesData */
3298
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3299
+
3300
+ "use strict";
3301
+ __webpack_require__.r(__webpack_exports__);
3302
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RoomPropertiesData", function() { return RoomPropertiesData; });
3303
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserPropertiesData", function() { return UserPropertiesData; });
3304
+ class RoomPropertiesData
3305
+ {
3306
+ static get LABELS() {
3307
+ let map = new Map();
3308
+
3309
+ map.set(SFS2X.RoomProperties.NAME, 'name');
3310
+ map.set(SFS2X.RoomProperties.GROUP_ID, 'groupId');
3311
+ map.set(SFS2X.RoomProperties.MAX_USERS, 'maxUsers');
3312
+ map.set(SFS2X.RoomProperties.MAX_SPECTATORS, 'maxSpectators');
3313
+ map.set(SFS2X.RoomProperties.USER_COUNT, 'userCount');
3314
+ map.set(SFS2X.RoomProperties.SPECTATOR_COUNT, 'spectatorCount');
3315
+ map.set(SFS2X.RoomProperties.IS_GAME, 'isGame');
3316
+ map.set(SFS2X.RoomProperties.IS_PRIVATE, 'isPrivate');
3317
+ map.set(SFS2X.RoomProperties.HAS_FREE_PLAYER_SLOTS, 'hasFreePlayerSlots');
3318
+ map.set(SFS2X.RoomProperties.IS_TYPE_SFSGAME, 'isSFSGameType');
3319
+
3320
+ return map;
3321
+ }
3322
+
3323
+ static getLabel(propName)
3324
+ {
3325
+ return 'Room.' + RoomPropertiesData.LABELS.get(propName);
3326
+ }
3327
+
3328
+ static get propertiesArray()
3329
+ {
3330
+ const arr = [];
3331
+
3332
+ for (const [key, value] of RoomPropertiesData.LABELS.entries())
3333
+ {
3334
+ arr.push({
3335
+ label: RoomPropertiesData.getLabel(key),
3336
+ value: key
3337
+ });
3338
+ }
3339
+
3340
+ return arr;
3341
+ }
3342
+ }
3343
+
3344
+ class UserPropertiesData
3345
+ {
3346
+ static get LABELS() {
3347
+ let map = new Map();
3348
+
3349
+ map.set(SFS2X.UserProperties.NAME, 'name');
3350
+ map.set(SFS2X.UserProperties.IS_PLAYER, 'isPlayer');
3351
+ map.set(SFS2X.UserProperties.IS_SPECTATOR, 'isSpectator');
3352
+ map.set(SFS2X.UserProperties.IS_NPC, 'isNPC');
3353
+ map.set(SFS2X.UserProperties.PRIVILEGE_ID, 'privilegeId');
3354
+
3355
+ return map;
3356
+ }
3357
+
3358
+ static getLabel(propName)
3359
+ {
3360
+ return 'User.' + UserPropertiesData.LABELS.get(propName);
3361
+ }
3362
+
3363
+ static get propertiesArray()
3364
+ {
3365
+ const arr = [];
3366
+
3367
+ for (const [key, value] of UserPropertiesData.LABELS.entries())
3368
+ {
3369
+ arr.push({
3370
+ label: UserPropertiesData.getLabel(key),
3371
+ value: key
3372
+ });
3373
+ }
3374
+
3375
+ return arr;
3376
+ }
3377
+ }
3378
+
3379
+
3380
+ /***/ })
3381
+
3382
+ }]);
3383
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2NvcmUvbW9kdWxlcy9tb2R1bGUtMTcuYnVuZGxlLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vYXBwbGljYXRpb24vLi9zcmMvY29tcG9uZW50cy9jaGFydHMvY2hhcnQtdXRpbHMuanMiLCJ3ZWJwYWNrOi8vYXBwbGljYXRpb24vLi9zcmMvY29tcG9uZW50cy9jaGFydHMvdXNlci1jb3VudC1jaGFydC5qcyIsIndlYnBhY2s6Ly9hcHBsaWNhdGlvbi8uL3NyYy9jb21wb25lbnRzL21vZHVsZS1zcGVjaWZpYy9tYXRjaC1leHByZXNzaW9uLWJ1aWxkZXIuanMiLCJ3ZWJwYWNrOi8vYXBwbGljYXRpb24vLi9zcmMvY29tcG9uZW50cy9zaWRlYmFyLWxheW91dC5qcyIsIndlYnBhY2s6Ly9hcHBsaWNhdGlvbi8uL3NyYy9tb2R1bGVzL3pvbmUtbW9uaXRvci5qcyIsIndlYnBhY2s6Ly9hcHBsaWNhdGlvbi8uL3NyYy91dGlscy9tYXRjaC1wcm9wZXJ0aWVzLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7Ynl0ZXNUb1NpemUsIGtCeXRlc1RvU2l6ZX0gZnJvbSAnLi4vLi4vdXRpbHMvdXRpbGl0aWVzJztcblxuZXhwb3J0IGZ1bmN0aW9uIGdldEZvcm1hdHRlZERhdGVUaW1lKGR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cdFx0XHR0cmFuc2l0aW9uczogZmFsc2UsXG5cdFx0XHRjaGFydEFyZWE6IHtcblx0XHRcdFx0aGVpZ2h0OiAyNzAsXG5cdFx0XHRcdGJhY2tncm91bmQ6ICd0cmFuc3BhcmVudCdcblx0XHRcdH0sXG5cdCAgICAgICAgbGVnZW5kOiB7XG5cdCAgICAgICAgICAgIHZpc2libGU6IGZhbHNlXG5cdCAgICAgICAgfSxcblx0ICAgICAgICBzZXJpZXNEZWZhdWx0czoge1xuXHQgICAgICAgICAgICB0eXBlOiAnYXJlYScsXG5cdCAgICAgICAgICAgIGxhYmVsczoge1xuXHQgICAgICAgICAgICAgICAgdmlzaWJsZTogZmFsc2UsXG5cdCAgICAgICAgICAgICAgICBmb3JtYXQ6ICd7MH0nLFxuXHQgICAgICAgICAgICAgICAgYmFja2dyb3VuZDogJ3RyYW5zcGFyZW50J1xuXHQgICAgICAgICAgICB9LFxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2VyaWVzOiBbe1xuXHRcdFx0XHRuYW1lOiAnVXNlcnMnLFxuXHQgICAgICAgICAgICBmaWVsZDogJ3VzZXJzJyxcblx0ICAgICAgICAgICAgY2F0ZWdvcnlGaWVsZDogJ3RpbWUnLFxuXHRcdFx0XHRjb2xvcjogJyNmZDdkMjQnLFxuXHRcdFx0XHRsaW5lOiB7XG5cdFx0XHRcdFx0d2lkdGg6IDJcblx0XHRcdFx0fVxuXHQgICAgICAgIH1dLFxuXHQgICAgICAgIHZhbHVlQXhpczoge1xuXHQgICAgICAgICAgICBsYWJlbHM6IHtcblx0ICAgICAgICAgICAgICAgIGZvcm1hdDogJ3swfScsXG5cdCAgICAgICAgICAgIH0sXG5cdCAgICAgICAgICAgIGxpbmU6IHtcblx0ICAgICAgICAgICAgICAgIHZpc2libGU6IGZhbHNlXG5cdCAgICAgICAgICAgIH0sXG5cdFx0XHRcdG1pbjogMCxcblx0ICAgICAgICB9LFxuXHQgICAgICAgIGNhdGVnb3J5QXhpczoge1xu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