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
@@ -1,536 +1,333 @@
1
1
  /*! (c) gotoAndPlay | All rights reserved */
2
2
  (window["webpackJsonpapplication"] = window["webpackJsonpapplication"] || []).push([["module-9"],{
3
3
 
4
- /***/ "./src/components/module-specific/ssl-certificate-manager.js":
5
- /*!*******************************************************************!*\
6
- !*** ./src/components/module-specific/ssl-certificate-manager.js ***!
7
- \*******************************************************************/
8
- /*! exports provided: SslCertificateManager */
9
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
10
-
11
- "use strict";
12
- __webpack_require__.r(__webpack_exports__);
13
- /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SslCertificateManager", function() { return SslCertificateManager; });
14
- /* harmony import */ var _utils_utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/utilities */ "./src/utils/utilities.js");
15
- /* harmony import */ var aes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! aes-js */ "./node_modules/aes-js/index.js");
16
- /* harmony import */ var aes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aes_js__WEBPACK_IMPORTED_MODULE_1__);
17
-
18
-
19
-
20
- class SslCertificateManager extends HTMLElement
21
- {
22
- constructor()
23
- {
24
- super();
25
-
26
- this._modalHtml = `
27
- <div class="modal" id="uploadModal" tabindex="-1" role="dialog" aria-labelledby="uploadModalTitle" aria-hidden="true">
28
- <div class="modal-dialog modal-dialog-centered" role="document">
29
- <div class="modal-content">
30
- <div class="modal-header">
31
- <h5 class="modal-title text-primary" id="uploadModalTitle">SSL Certificate Manager</h5>
32
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
33
- <span aria-hidden="true">&times;</span>
34
- </button>
35
- </div>
36
- <div class="modal-body in-flow-invalid-msg">
37
- <fieldset id="uploadFieldset">
38
- <div id="uploaderSubform">
39
- <div class="form-group">
40
- <div class="col-form-label form-label-container">
41
- <label for="uploader" class="form-label">Certificate keystore (jks) <i class="fas fa-question-circle text-muted help" title="SSL certificate's protected keystore file to be uploaded to the server, in jks format"></i></label>
42
- </div>
43
- <div class="inner-widget">
44
- <input type="file" id="uploader" name="uploader" accept=".jks" data-upload-msg="Select a file">
45
- <span class="k-invalid-msg position-static" data-for="uploader"></span>
46
- </div>
47
- </div>
48
- </div>
49
- <div id="passwordsSubform">
50
- <div class="form-row">
51
- <div class="form-group col">
52
- <div class="col-form-label form-label-container">
53
- <label for="ksPassword" class="form-label">Keystore password <i class="fas fa-question-circle text-muted help" title="Password used to protect the certificate keystore"></i></label>
54
- </div>
55
- <div class="inner-widget">
56
- <input type="password" id="ksPassword" name="ksPassword" class="form-control k-textbox" autocomplete="off" required data-required-msg="Required" />
57
- <span class="k-invalid-msg position-static" data-for="ksPassword"></span>
58
- </div>
59
- </div>
60
-
61
- <div class="form-group col">
62
- <div class="col-form-label form-label-container">
63
- <label for="confirmKsPassword" class="form-label">Confirm password <i class="fas fa-question-circle text-muted help" title="Keystore password confirmation"></i></label>
64
- </div>
65
- <div class="inner-widget">
66
- <input type="password" id="confirmKsPassword" name="confirmKsPassword" class="form-control k-textbox" autocomplete="off" required data-required-msg="Required" />
67
- <span class="k-invalid-msg position-static" data-for="confirmKsPassword"></span>
68
- </div>
69
- </div>
70
- </div>
71
-
72
- <p><em>For additional security, enter again and confirm your SFS2X administration password.</em></p>
73
-
74
- <div class="form-row">
75
- <div class="form-group col">
76
- <div class="col-form-label form-label-container">
77
- <label for="adminPassword" class="form-label">Admin password <i class="fas fa-question-circle text-muted help" title="SmartFoxServer 2X remote administration password"></i></label>
78
- </div>
79
- <div class="inner-widget">
80
- <input type="password" id="adminPassword" name="adminPassword" class="form-control k-textbox" autocomplete="off" required data-required-msg="Required" />
81
- <span class="k-invalid-msg position-static" data-for="adminPassword"></span>
82
- </div>
83
- </div>
84
-
85
- <div class="form-group col">
86
- <div class="col-form-label form-label-container">
87
- <label for="confirmAdminPassword" class="form-label">Confirm password <i class="fas fa-question-circle text-muted help" title="SmartFoxServer 2X remote administration password confirmation"></i></label>
88
- </div>
89
- <div class="inner-widget">
90
- <input type="password" id="confirmAdminPassword" name="confirmAdminPassword" class="form-control k-textbox" autocomplete="off" required data-required-msg="Required" />
91
- <span class="k-invalid-msg position-static" data-for="confirmAdminPassword"></span>
92
- </div>
93
- </div>
94
- </div>
95
- </div>
96
- </fieldset>
97
- </div>
98
- <div class="modal-footer flex-column">
99
- <div class="d-flex w-100">
100
- <div class="flex-grow-1 text-left">
101
- <button id="uploadSslButton" type="button" class="k-button k-primary"><i class="fas fa-upload mr-1"></i>Upload certificate</button>
102
- <i id="uploadSpinner" class="fas fa-circle-notch fa-spin text-primary align-middle ml-1"></i>
103
- </div>
104
- <div class="flex-grow-1 text-right">
105
- <button type="button" class="k-button k-secondary" data-dismiss="modal">Cancel</button>
106
- </div>
107
- </div>
108
- <div id="uploadErrorMsg" class="text-danger mt-3"></div>
109
- </div>
110
- </div>
111
- </div>
112
- </div>
113
- `;
114
-
115
- //-------------------------------------------
116
-
117
- $(this).append(`
118
- <div class="col-sm-5 col-lg-4 col-form-label form-label-container">
119
- <label class="form-label">Upload certificate <i class="fas fa-question-circle text-muted help" title="Upload an SSL certificate's protected keystore to the server"></i></label>
120
- </div>
121
- <div class="inner-widget align-self-center align-self-sm-start col-auto">
122
- <button id="manageSslButton" type="button" class="k-button k-primary" disabled><i class="fas fa-cog mr-1"></i>Manage</button>
123
- </div>
124
- `);
125
-
126
- // Add listeners to Manage button click
127
- $('#manageSslButton', $(this)).on('click', $.proxy(this._onManageSslClick, this));
128
- }
129
-
130
- destroy()
131
- {
132
- // Remove event listener
133
- $('#manageSslButton', $(this)).off('click');
134
-
135
- // Hide modal (which in turn destroys it)
136
- let modalElement = $('#uploadModal', $(this));
137
-
138
- if (modalElement)
139
- modalElement.modal('hide');
140
- }
141
-
142
- get enabled()
143
- {
144
- return this._isEnabled;
145
- }
146
-
147
- set enabled(value)
148
- {
149
- this._isEnabled = value;
150
-
151
- // Enable/disable Manage button
152
- $('#manageSslButton', $(this)).attr('disabled', !value);
153
-
154
- // Enable/disable modal
155
- let modalElement = $('#uploadModal', $(this));
156
-
157
- if (modalElement)
158
- {
159
- // Disable modal close buttons
160
- $('button[data-dismiss="modal"]', modalElement).attr('disabled', !value);
161
-
162
- // Disable upload button
163
- $('#uploadSslButton', modalElement).attr('disabled', !value);
164
-
165
- // Disable fieldset
166
- $('#uploadFieldset', modalElement).attr('disabled', !value);
167
- }
168
- }
169
-
170
- get uploadTargetConfig()
171
- {
172
- return this._uploadTargetConfig;
173
- }
174
-
175
- set uploadTargetConfig(data)
176
- {
177
- this._uploadTargetConfig = data;
178
- }
179
-
180
- _onManageSslClick()
181
- {
182
- // Initialize and show modal
183
- this._showModal();
184
- }
185
-
186
- _onUploadSslClick()
187
- {
188
- if (this._validate())
189
- this._startSslCertUpload();
190
- }
191
-
192
- _showModal()
193
- {
194
- // Append modal html
195
- $(this).append(this._modalHtml);
196
-
197
- let modalElement = $('#uploadModal', $(this));
198
-
199
- // Hide SSL certificate upload spinner and error message container
200
- $('#uploadSpinner', modalElement).hide();
201
- $('#uploadErrorMsg', modalElement).hide();
202
- $('#uploadErrorMsg', modalElement).text('');
203
-
204
- // Add listener to Upload button click
205
- $('#uploadSslButton', modalElement).on('click', $.proxy(this._onUploadSslClick, this));
206
-
207
- // Add listener to modal hide event
208
- modalElement.on('hidden.bs.modal', $.proxy(this._destroyModal, this));
209
-
210
- // Initialize kendo uploader
211
- this._uploadWidget = modalElement.find('#uploader').kendoUpload({
212
- allowedExtensions: ['.jks'],
213
- multiple: false,
214
- template: function(dataItem) {
215
- dataItem.bytesToSize = _utils_utilities__WEBPACK_IMPORTED_MODULE_0__["bytesToSize"]; // Pass bytesToSize utility function to template
216
- return kendo.template(`
217
- <span class='k-progress w-100'></span>
218
- <span class="">
219
- <span class="k-file-name" title="#=name#">#=name#</span>
220
- <span class="k-file-size">Size: #=bytesToSize(size, 1, 'Bytes')#</span>
221
- </span>
222
- `)(dataItem);
223
- },
224
- localization: {
225
- select: 'Select file...'
226
- }
227
- }).data('kendoUpload');
228
-
229
- // Initialize kendo validation on uploader subform
230
- // NOTE: we use separate validators to be able to disable 'validateOnBlur' on the uploader,
231
- // because it causes the error message to appear as soon as the "Select file" button is clicked
232
- this._validator1 = modalElement.find('#uploaderSubform').kendoValidator({
233
- validateOnBlur: false,
234
- rules: {
235
- upload: function(input) {
236
- let valid = false;
237
- if (input.is('[type=file]'))
238
- valid = input.closest('.k-upload').find('.k-file').length > 0;
239
-
240
- return valid;
241
- }
242
- }
243
- }).data('kendoValidator');
244
-
245
- // Initialize kendo validation on passwords subform
246
- this._validator2 = modalElement.find('#passwordsSubform').kendoValidator({
247
- validateOnBlur: true,
248
- rules: {
249
- verifyKsPassword: $.proxy(function(input) {
250
- let valid = true;
251
- if (input.is('[name=confirmKsPassword]'))
252
- valid = input.val() === $(this).find('#ksPassword').val();
253
- return valid;
254
- }, this),
255
- verifyAdmPassword: $.proxy(function(input) {
256
- let valid = true;
257
- if (input.is('[name=confirmAdminPassword]'))
258
- valid = input.val() === $(this).find('#adminPassword').val();
259
- return valid;
260
- }, this)
261
- },
262
- messages: {
263
- verifyKsPassword: 'Password not matching',
264
- verifyAdmPassword: 'Password not matching',
265
- }
266
- }).data('kendoValidator');
267
-
268
- // Initialize bootstrap modal
269
- modalElement.modal({
270
- backdrop: 'static',
271
- keyboard: false,
272
- });
273
- }
274
-
275
- _destroyModal()
276
- {
277
- let modalElement = $('#uploadModal', $(this));
278
-
279
- if (modalElement)
280
- {
281
- // Remove listeners
282
- $('#uploadSslButton', modalElement).off('click');
283
- modalElement.off('hidden.bs.modal');
284
-
285
- // Destroy everything Kendo
286
- kendo.destroy(modalElement);
287
-
288
- // Dispose modal
289
- modalElement.modal('dispose');
290
-
291
- // Remove html
292
- modalElement.remove();
293
- modalElement = null;
294
- }
295
- }
296
-
297
- _validate()
298
- {
299
- let val1 = this._validator1.validate();
300
- let val2 = this._validator2.validate();
301
-
302
- return val1 && val2;
303
- }
304
-
305
- _startSslCertUpload()
306
- {
307
- if (!this._uploadTargetConfig)
308
- throw new Error('Upload target configuration not set');
309
-
310
- let modalElement = $('#uploadModal', $(this));
311
-
312
- if (modalElement)
313
- {
314
- let certData = {};
315
- certData.file = this._uploadWidget.getFiles()[0];
316
- certData.ksPassword = $('#ksPassword', modalElement).val();
317
- certData.adminPassword = $('#adminPassword', modalElement).val();
318
-
319
- // Disable modal
320
- this.enabled = false;
321
-
322
- // Hide previous error and show spinner
323
- $('#uploadSpinner', modalElement).show();
324
- $('#uploadErrorMsg', modalElement).hide();
325
- $('#uploadErrorMsg', modalElement).text('');
326
-
327
- //=================================================================
328
-
329
- // Generate Init Vector
330
- let rngValues = [];
331
- for (let i = 0; i < 16; i++)
332
- rngValues.push(Math.floor(Math.random() * 256));
333
-
334
- let iv = new Uint8Array(rngValues);
335
-
336
- // Generate secret key by MD5-encoding admin password + session token
337
- let md5Pass = this._binaryMD5(certData.adminPassword + this._uploadTargetConfig.sessionToken);
338
-
339
- // Encrypt keystore password via AES (128bit)
340
- let encryptedPwd = this._aesEncrypt(certData.ksPassword, md5Pass, iv);
341
-
342
- // Encode IV using Base64
343
- let encodedIv = this._b64Encode(iv);
344
-
345
- // Encode encrypted password using Base64
346
- let encodedPwd = this._b64Encode(encryptedPwd);
347
-
348
- //=================================================================
349
-
350
- // Set parameters to be sent with the certificate keystore file
351
- const params = new FormData();
352
- params.append('files[]', certData.file.rawFile);
353
- params.append('__iv', encodedIv);
354
- params.append('__password', encodedPwd);
355
- params.append('__module', this._uploadTargetConfig.moduleId);
356
-
357
- // Set destination url
358
- const url = this._uploadTargetConfig.protocol + '://' + this._uploadTargetConfig.host + ':' + this._uploadTargetConfig.port + '/BlueBox/SFS2XFileUpload?sessHashId=' + this._uploadTargetConfig.sessionToken;
359
-
360
- // Start upload
361
- fetch(url, {
362
- method: 'POST',
363
- body: params,
364
- mode: 'no-cors'
365
- }).then($.proxy(this._onSslCertUploadEnd, this));
366
- }
367
- }
368
-
369
- _onSslCertUploadEnd(response)
370
- {
371
- // Nothing to do: we have to wait the upload process completion to be signaled by the server through the dedicated Extension response
372
-
373
- //=================================================================
374
-
375
- // TODO Should we handle this response in some way? For some unknown reason we always get ok=false and status=0
376
- //console.log(response)
377
- //console.log(response.ok)
378
- //console.log(response.status)
379
- }
380
-
381
- /**
382
- * Method called by parent when upload failed.
383
- */
384
- onSslCertUploadError(error)
385
- {
386
- let modalElement = $('#uploadModal', $(this));
387
-
388
- if (modalElement)
389
- {
390
- // Enable modal
391
- this.enabled = true;
392
-
393
- // Show upload error
394
- $('#uploadErrorMsg', modalElement).show();
395
- $('#uploadErrorMsg', modalElement).text(error + '.');
396
-
397
- // Hide spinner
398
- $('#uploadSpinner', modalElement).hide();
399
- }
400
- }
401
-
402
- /**
403
- * Method called by parent when upload is completed successfully.
404
- */
405
- onSslCertUploadSuccess()
406
- {
407
- let modalElement = $('#uploadModal', $(this));
408
-
409
- if (modalElement)
410
- {
411
- // Enable modal
412
- this.enabled = true;
413
-
414
- // Hide spinner
415
- $('#uploadSpinner', modalElement).hide();
416
-
417
- // Hide modal
418
- modalElement.modal('hide');
419
- }
420
- }
421
-
422
- // *****************************************************************
423
-
424
- /*
425
- * Takes a string and returns the MD5 as Uint8Array
426
- */
427
- _binaryMD5(str)
428
- {
429
- let MD5 = new SFS2X.MD5();
430
- let hexStr = MD5.hex_md5(str);
431
-
432
- return this._hexByteStringToByteArray(hexStr);
433
- }
434
-
435
- /*
436
- * Hex bytes ---> Actual byte[] as Uint8Array
437
- */
438
- _hexByteStringToByteArray(hexByteString)
439
- {
440
- let bytes = new Uint8Array(16); // MD5 fixed output size
441
-
442
- for (let i = 0; i < hexByteString.length;)
443
- {
444
- let hexByte = hexByteString[i++] + hexByteString[i++];
445
- let byte = parseInt(hexByte, 16);
446
-
447
- bytes[i / 2 - 1] = byte;
448
- }
449
-
450
- return bytes;
451
- }
452
-
453
- /*
454
- * Encrypt using AES, mode CBC, PKCS#7 padding
455
- *
456
- * text -> the text we want to encode
457
- * key -> the AES key
458
- * iv -> the AES/CBC init vector
459
- *
460
- * Returns -> Uint8Array
461
- */
462
- _aesEncrypt(text, key, iv)
463
- {
464
- let textBytes = aes_js__WEBPACK_IMPORTED_MODULE_1___default.a.utils.utf8.toBytes(text); // Get UTF-8 bytes
465
- let aesCBC = new aes_js__WEBPACK_IMPORTED_MODULE_1___default.a.ModeOfOperation.cbc(key, iv); // Init CBC mode
466
- textBytes = aes_js__WEBPACK_IMPORTED_MODULE_1___default.a.padding.pkcs7.pad(textBytes); // PKCS#7 padding
467
-
468
- // Encrypt
469
- return aesCBC.encrypt(textBytes);
470
- }
471
-
472
- /*
473
- * Encode passed byte array --> Base64 representation
474
- * Returns --> string
475
- */
476
- _b64Encode(barray)
477
- {
478
- return btoa(String.fromCharCode.apply(null, barray));
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;
479
278
  }
279
+ return map[req];
480
280
  }
481
-
482
- // DEFINE COMPONENT
483
- if (!window.customElements.get('ssl-certificate-manager'))
484
- window.customElements.define('ssl-certificate-manager', SslCertificateManager);
485
-
486
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "jquery")))
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 ^\\.\\/.*$";
487
287
 
488
288
  /***/ }),
489
289
 
490
- /***/ "./src/modules/server-configurator.js":
491
- /*!********************************************!*\
492
- !*** ./src/modules/server-configurator.js ***!
493
- \********************************************/
290
+ /***/ "./src/modules/extension-deployer.js":
291
+ /*!*******************************************!*\
292
+ !*** ./src/modules/extension-deployer.js ***!
293
+ \*******************************************/
494
294
  /*! exports provided: default */
495
295
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
496
296
 
497
297
  "use strict";
498
298
  __webpack_require__.r(__webpack_exports__);
499
- /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ServerConfigurator; });
299
+ /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ExtensionDeployer; });
500
300
  /* harmony import */ var _base_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base-module */ "./src/modules/base-module.js");
501
- /* harmony import */ var _utils_uibuilder_config_interface_builder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/uibuilder/config-interface-builder */ "./src/utils/uibuilder/config-interface-builder.js");
502
- /* harmony import */ var _components_module_specific_ssl_certificate_manager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/module-specific/ssl-certificate-manager */ "./src/components/module-specific/ssl-certificate-manager.js");
503
-
301
+ /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
302
+ /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__);
504
303
 
505
304
 
506
305
 
507
- class ServerConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModule"]
306
+ class ExtensionDeployer extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModule"]
508
307
  {
509
308
  constructor()
510
309
  {
511
- super('serverConfig');
310
+ super('extDeployer');
512
311
 
513
312
  // Outgoing requests
514
313
  this.REQ_INIT = 'init';
515
- this.REQ_GET_CONFIG = 'getConfig';
516
- this.REQ_UPDATE_CONFIG = 'updConfig';
517
- this.REQ_UPDATE_GEO_DB = 'updGeoDb';
314
+ this.REQ_GET_NODES = 'getNodes';
518
315
 
519
316
  // Incoming responses
317
+ this.RESP_LOCKED = 'lock';
520
318
  this.RESP_INIT = 'init';
521
- this.RESP_CONFIG = 'config';
522
- this.RESP_CONFIG_UPDATE_CONFIRM = 'configUpdate';
523
- this.RESP_CONFIG_CHANGED_ALERT = 'configAlert';
524
- this.RESP_SSL_UPLOAD_ERROR = 'sslUploadError';
525
- this.RESP_SSL_UPLOAD_CONFIRM = 'sslUpload';
526
- this.RESP_UPDATE_GEO_DB = 'geoDbUpdate';
319
+ this.RESP_NODES = 'nodes';
320
+ this.RESP_SUCCESS = 'success';
321
+ this.RESP_WARN = 'warn';
322
+ this.RESP_ERROR = 'error';
323
+
324
+ this._selectedNodes = [];
527
325
  }
528
326
 
529
327
  //------------------------------------
530
328
  // COMMON MODULE INTERFACE METHODS
531
329
  // This members are used by the main controller
532
330
  // to communicate with the module's controller.
533
- // This methods override those in BaseModule class.
534
331
  //------------------------------------
535
332
 
536
333
  initialize(idData, shellController)
@@ -538,8 +335,8 @@ class ServerConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["Base
538
335
  // Call super method
539
336
  super.initialize(idData, shellController);
540
337
 
541
- // Initialize progress bar
542
- $('#src-progressBar').kendoProgressBar({
338
+ // Initialize progress bars
339
+ $('.exd-progressBar').kendoProgressBar({
543
340
  min: 0,
544
341
  max: 100,
545
342
  value: false,
@@ -549,20 +346,103 @@ class ServerConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["Base
549
346
  }
550
347
  });
551
348
 
552
- // Create interface builder instance
553
- this._interfaceBuilder = new _utils_uibuilder_config_interface_builder__WEBPACK_IMPORTED_MODULE_1__["ConfigInterfaceBuilder"]();
349
+ // Add listeners to buttons
350
+ $('#exd-retryBt').on('click', $.proxy(this._onRetryClick, this));
351
+ $('#exd-refreshBt').on('click', $.proxy(this._requestNodesList, this));
352
+ $('#exd-deployBt').on('click', $.proxy(this._onDeployClick, this));
353
+ $('.exd-statusCloseBt').on('click', $.proxy(this._onCloseStatusClick, this));
354
+
355
+ // Initialize kendo switch
356
+ this._modeSwitch = $('#exd-modeCb').kendoSwitch().data('kendoSwitch');
357
+
358
+ // Initialize grid
359
+ this._grid = $('#exd-nodesList').kendoGrid({
360
+ scrollable: true,
361
+ sortable: true,
362
+ //resizable: true,
363
+ selectable: false,
364
+ columns: [
365
+ {
366
+ selectable: true,
367
+ width: 41
368
+ },
369
+ {
370
+ field: 'name',
371
+ width: 500,
372
+ title: 'Node',
373
+ template: function(dataItem) {
374
+ if (dataItem['alias'])
375
+ return '<div class="name-cell"><span>' + dataItem['alias'] + '</span><br><small class="text-muted">' + dataItem['name'] + '<small></div>';
376
+ else
377
+ return '<div class="name-cell"><span>' + dataItem['name'] + '</span></div>';
378
+ }
379
+ },
380
+ {
381
+ field: 'health',
382
+ width: 75,
383
+ title: 'Health',
384
+ sortable: false,
385
+ template: $.proxy(this._getHealthTemplate, this)
386
+ },
387
+ ],
388
+ noRecords: {
389
+ template: 'No game nodes in the cluster.'
390
+ },
391
+ dataSource: {
392
+ schema: {
393
+ model: {
394
+ id: 'id',
395
+ // fields: {
396
+ // id: { type: 'string' },
397
+ // active: { type: 'boolean' }
398
+ // }
399
+ }
400
+ },
401
+ group: {
402
+ field: 'active',
403
+ dir: 'desc',
404
+ }
405
+ },
406
+ change: $.proxy(this._onNodesGridChange, this),
407
+ dataBound: $.proxy(this._onNodesGridDataBound, this),
408
+ }).data('kendoGrid');
409
+
410
+ // Initialize kendo uploader
411
+ this._uploader = $('#exd-uploader').kendoUpload({
412
+ multiple: false,
413
+ async: {
414
+ saveUrl: 'http://localhost', // This will be changed later in _onUploadStart method
415
+ autoUpload: false,
416
+ },
417
+ directoryDrop: true,
418
+ upload: $.proxy(this._onUploadStart, this),
419
+ complete: $.proxy(this._onUploadEnd, this),
420
+ localization: {
421
+ select: 'Select zip file...'
422
+ }
423
+ }).data('kendoUpload');
554
424
 
555
- // Add listener to GeoLite2 database update button
556
- $('#src-updateGeolocDbButton').on('click', $.proxy(this._onUpdateGeolocDbClick, this));
425
+ // Initialize "deployment status" modal
426
+ this._deployStatusModal = $('#exd-deployStatusModal');
427
+ this._deployStatusModal.modal({
428
+ backdrop: 'static',
429
+ keyboard: false,
430
+ show: false
431
+ });
557
432
 
558
- // Add listener to interface buttons
559
- $('#src-reloadButton').on('click', $.proxy(this._onReloadClick, this));
560
- $('#src-submitButton').on('click', $.proxy(this._onSubmitClick, this));
433
+ // Initialize help tooltips
434
+ $(this).kendoTooltip({
435
+ filter: 'i[title].help',
436
+ position: 'right',
437
+ content: function(e) {
438
+ return `<div class="help-tooltip">${e.target.data('title')}</div>`;
439
+ }
440
+ });
561
441
 
562
- // Save ref to SSL Manager
563
- this._sslCertManager = document.getElementById('src-sslCertManager');
442
+ // Set upload form disabled
443
+ this._enableDeployForm(false);
564
444
 
565
- //-----------------------------------*/
445
+ //-------------------------------------------
566
446
 
567
447
  // Send initialization request
568
448
  this.sendExtensionRequest(this.REQ_INIT);
@@ -573,28 +453,38 @@ class ServerConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["Base
573
453
  // Call super method
574
454
  super.destroy();
575
455
 
576
- // Destroy SSL Certificate Manager
577
- this._sslCertManager.destroy();
456
+ // Remove click listeners
457
+ $('#exd-retryBt').off('click');
458
+ $('#exd-refreshBt').off('click');
459
+ $('#exd-deployBt').off('click');
460
+ $('.exd-statusCloseBt').off('click');
578
461
 
579
- // Remove interface buttons click listeners
580
- $('#src-updateGeolocDbButton').off('click');
581
- $('#src-reloadButton').off('click');
582
- $('#src-submitButton').off('click');
583
-
584
- // Clear tabs container
585
- this._clearTabs();
462
+ // Clear nodes request scheduling
463
+ clearTimeout(this._requestNodesTimer);
586
464
  }
587
465
 
588
466
  onExtensionCommand(command, data)
589
467
  {
590
- // Initialization data received
591
- if (command == this.RESP_INIT)
468
+ /*
469
+ * This response is returned if the file UploadsLock.txt exists in the /config folder of the server.
470
+ * This is an additional security measure to avoid unwanted files to be uploaded by malicius users accessing the server
471
+ * with the default credentials, in case they have not been changed by the administrator after the installation.
472
+ * The file must be removed manually before accessing the Extension Deployer module for the first time
473
+ */
474
+ if (command == this.RESP_LOCKED)
475
+ {
476
+ // Show warning
477
+ this._switchMainView('exd-locked');
478
+ }
479
+
480
+ // Module can be enabled (no locking file exists)
481
+ else if (command == this.RESP_INIT)
592
482
  {
593
483
  // Retrieve module id sent by the server (required because multiple modules use file uploading service)
594
484
  const uploadModuleId = data.getUtfString('modId');
595
485
 
596
- // Set SSL upload manager target configuration
597
- this._sslCertManager.uploadTargetConfig = {
486
+ // Set file uploading target configuration
487
+ this._uploadTargetConfig = {
598
488
  sessionToken: this.smartFox.sessionToken,
599
489
  host: this.smartFox.config.host,
600
490
  port: this.smartFox.config.port,
@@ -602,239 +492,272 @@ class ServerConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["Base
602
492
  protocol: this.smartFox.config.useSSL ? 'https' : 'http'
603
493
  };
604
494
 
605
- // Server sends a flag indicating if file uploads are locked
606
- // We use it to enable the "Manage SSL certificate" button
607
- this._sslLocked = data.getBool('lock');
608
-
609
- if (!this._sslLocked)
610
- $('#src-manageSslWarn').hide();
495
+ // Show module's main view
496
+ this._switchMainView('exd-main');
611
497
 
612
- // Request configuration data to server instance
613
- this.sendExtensionRequest(this.REQ_GET_CONFIG);
498
+ // Request nodes list to server
499
+ this._requestNodesList();
614
500
  }
615
501
 
616
- // Server configuration data received
617
- else if (command == this.RESP_CONFIG)
502
+ else if (command == this.RESP_NODES)
618
503
  {
619
- // Build user interface based on received data
620
- this._interfaceBuilder.buildInterface(data.getSFSArray('settings'), 'src-tabNavigator', false);
504
+ let nodesObj = data.getSFSArray('nodes');
621
505
 
622
- // Enable buttons
623
- this._enableButtons(true);
506
+ let nodes = [];
507
+ let nodesIds = [];
624
508
 
625
- // Initialize TabNavigator-ralated widgets
626
- if (!this._tabNavInitialized)
509
+ for (let i = 0; i < nodesObj.size(); i++)
627
510
  {
628
- // Enable scrolling tabs
629
- $('#src-tabNavigator > #tabs').scrollingTabs({
630
- bootstrapVersion: 4,
631
- scrollToTabEdge: true,
632
- enableSwiping: true,
633
- disableScrollArrowsOnFullyScrolled: true,
634
- cssClassLeftArrow: 'fa fa-chevron-left',
635
- cssClassRightArrow: 'fa fa-chevron-right'
636
- });
511
+ let node = nodesObj.getSFSArray(i);
512
+
513
+ nodesIds.push(node.getUtfString(0));
637
514
 
638
- this._tabNavInitialized = true;
515
+ nodes.push({
516
+ 'id': node.getUtfString(0),
517
+ 'alias': node.getUtfString(1),
518
+ 'name': node.getUtfString(2),
519
+ 'health': node.getBool(3),
520
+ 'active': node.getBool(4), // Used for grouping
521
+ });
639
522
  }
640
523
 
641
- // Run validation (to remove validation messages if data was reloaded)
642
- this._interfaceBuilder.checkIsValid();
524
+ // Get nodes grid datasource
525
+ let ds = this._grid.dataSource;
643
526
 
644
- this._switchView('src-main');
645
- }
527
+ // --- REMOVE NODES ---
646
528
 
647
- // Server configuration update confirmation
648
- else if (command == this.RESP_CONFIG_UPDATE_CONFIRM)
649
- {
650
- // Enable buttons
651
- this._enableButtons(true);
529
+ let self = this;
530
+ $.map(ds.data(), function (dataItem, index) {
531
+ if (dataItem && !nodesIds.includes(dataItem['id']))
532
+ {
533
+ // Remove node from datastore
534
+ ds.remove(dataItem);
652
535
 
653
- // Enable form items
654
- this._interfaceBuilder.disableInterface(false);
536
+ // Remove node from list of selected nodes (if selected)
537
+ self._selectedNodes = self._selectedNodes.filter(x => x !== dataItem['id']);
538
+ }
539
+ });
655
540
 
656
- // If the current user is the updater, show a notification
657
- // Otherwise, show a dialog box suggesting to reload
658
- let updater = data.getUtfString('user');
541
+ // --- ADD/UPDATE NODES ---
659
542
 
660
- if (updater == this.smartFox.mySelf.name)
543
+ for (let node of nodes)
661
544
  {
662
- // Reset the 'modified' flag
663
- this._interfaceBuilder.resetIsModified();
545
+ var dataItem = ds.get(node.id);
664
546
 
665
- // Display notification
666
- this.shellCtrl.showNotification('Server settings updated', 'Changes will be applied on next server restart');
667
- }
668
- else
669
- {
670
- // Show alert
671
- this.shellCtrl.showSimpleAlert(`Administrator ${updater} has modified the server settings; please reload to update your view.`);
547
+ // Update node
548
+ if (dataItem)
549
+ {
550
+ dataItem.set('health', node.health);
551
+ dataItem.set('active', node.active);
552
+
553
+ dataItem.dirty = false; // Hides "dirty" indicator in grid
554
+ }
672
555
 
673
- // Disable submit button
674
- $('#src-submitButton').attr('disabled', true);
556
+ // Add node
557
+ else
558
+ ds.add(node);
675
559
  }
560
+
561
+ // Refresh grid
562
+ this._grid.refresh();
676
563
  }
677
564
 
678
- // Server configuration xml saved by an external process
679
- else if (command == this.RESP_CONFIG_CHANGED_ALERT)
565
+ else if (command == this.RESP_ERROR)
680
566
  {
681
- // Show alert
682
- this.shellCtrl.showSimpleAlert(`The system has modified the server settings automatically; please reload to update your view.`);
567
+ // Display error message
568
+ $('#exd-statusErrorText').html(data.getUtfString('msg'));
683
569
 
684
- // Disable submit button
685
- $('#src-submitButton').attr('disabled', true);
570
+ // Switch to view
571
+ this._switchStatusView('exd-statusError');
686
572
  }
687
573
 
688
- // SSL certificate upload error
689
- else if (command == this.RESP_SSL_UPLOAD_ERROR)
574
+ else if (command == this.RESP_WARN)
690
575
  {
691
- const error = data.getUtfString('error');
692
-
693
- // Log warning
694
- this.shellCtrl.logMessage(error, 'error');
576
+ // Display error message
577
+ $('#exd-statusWarningText').html(data.getUtfString('msg').replace(/(?:\r\n|\r|\n)/g, '<br>'));
695
578
 
696
- // Show error in manager window
697
- this._sslCertManager.onSslCertUploadError(error);
579
+ // Switch to view
580
+ this._switchStatusView('exd-statusWarning');
698
581
  }
699
582
 
700
- // SSL certificate upload confirmed
701
- else if (command == this.RESP_SSL_UPLOAD_CONFIRM)
583
+ else if (command == this.RESP_SUCCESS)
702
584
  {
703
- // Closw manager window
704
- this._sslCertManager.onSslCertUploadSuccess();
705
-
706
- let updater = data.getUtfString('user');
707
-
708
- // Display notification
709
- if (updater == this.smartFox.mySelf.name)
710
- this.shellCtrl.showNotification('SSL certificate', 'SSL certificate keystore was uploaded successfully');
711
- else
712
- this.shellCtrl.showNotification('SSL certificate', `Administrator ${updater} has uploaded a new SSL certificate keystore`);
713
-
714
- // When a certificate is uploaded, HTTPS is also enabled automatically:
715
- // we have to update the interface accordingly
716
- this._updateConfigFormItemDisplayedValue('webServer.enableHttps', true);
585
+ this._switchStatusView('exd-statusSuccess');
717
586
  }
587
+ }
718
588
 
719
- // Geolocation database update confirmation
720
- else if (command == this.RESP_UPDATE_GEO_DB)
721
- {
722
- // Enable button
723
- $('#src-updateGeolocDbButton').attr('disabled', false);
589
+ //---------------------------------
590
+ // UI EVENT LISTENERS
591
+ //---------------------------------
724
592
 
725
- // Check success
726
- if (data.getBool('success'))
727
- {
728
- // Update displayed date
729
- this._updateConfigFormItemDisplayedValue('adminHelper.geoDbReleaseDate', data.getUtfString('newRelDate'));
593
+ _enableDeployForm(enabled)
594
+ {
595
+ $('#exd-uploadFileForm').prop('disabled', !enabled);
596
+ this._modeSwitch.enable(enabled);
597
+ }
730
598
 
731
- // If the current user is the updater, also show a notification
732
- let updater = data.getUtfString('user');
599
+ _onRetryClick()
600
+ {
601
+ this._switchMainView('exd-init');
733
602
 
734
- if (updater == this.smartFox.mySelf.name)
735
- this.shellCtrl.showNotification('Geolocation database updated', 'Latest release of the GeoLite2 Country database has been installed successfully');
736
- }
737
- else
738
- {
739
- // Show alert
740
- this.shellCtrl.showSimpleAlert(data.getUtfString('error'));
741
- }
742
- }
603
+ // Re-send initialization request
604
+ this.sendExtensionRequest(this.REQ_INIT);
743
605
  }
744
606
 
745
- //------------------------------------
746
- // PRIVATE METHODS
747
- //------------------------------------
607
+ _onCloseStatusClick()
608
+ {
609
+ this._deployStatusModal.hide();
610
+
611
+ // Clear uploader
612
+ this._uploader.clearAllFiles();
613
+ }
748
614
 
749
- _enableButtons(enabled)
615
+ _onNodesGridChange(e, args)
750
616
  {
751
- $('#src-reloadButton').attr('disabled', !enabled);
752
- $('#src-submitButton').attr('disabled', !enabled);
753
- $('#src-backupCheck').attr('disabled', !enabled);
617
+ let grid = e.sender;
618
+ let items = grid.items();
754
619
 
755
- $('#src-updateGeolocDbButton').attr('disabled', !enabled);
620
+ this._selectedNodes = [];
621
+
622
+ for (let i of grid.select())
623
+ {
624
+ let dataItem = grid.dataItem(i);
625
+ this._selectedNodes.push(dataItem['id']);
626
+ }
756
627
 
757
- if (!this._sslLocked)
758
- this._sslCertManager.enabled = enabled;
628
+ // Enable upload button
629
+ this._enableDeployForm(this._selectedNodes.length > 0);
759
630
  }
760
631
 
761
- _switchView(viewId)
632
+ _onNodesGridDataBound(e)
762
633
  {
763
- document.getElementById('src-viewstack').selectedElement = document.getElementById(viewId);
634
+ let grid = e.sender;
635
+ let items = grid.items();
636
+ let itemsToSelect = [];
637
+ let self = this;
638
+
639
+ items.each(function (idx, row) {
640
+ let dataItem = grid.dataItem(row);
641
+ if (self._selectedNodes.includes(dataItem['id'])) {
642
+ itemsToSelect.push(row);
643
+ }
644
+ });
645
+
646
+ // Re-select previously selected nodes
647
+ grid.select(itemsToSelect);
648
+
649
+ // Disable upload button
650
+ if (itemsToSelect.length == 0)
651
+ this._enableDeployForm(false);
652
+
653
+ //==================================================
654
+
655
+ // Hide group column and collapse icon
656
+ $('#exd-nodesList .k-group-col, #exd-nodesList .k-group-cell').remove();
657
+ let spanCells = $('#exd-nodesList .k-grouping-row').children('td');
658
+ spanCells.attr('colspan', spanCells.attr('colspan') - 1);
659
+ $('#exd-nodesList .k-icon.k-i-collapse').hide();
660
+
661
+ // Modify group label
662
+ $('#exd-nodesList .k-grouping-row td p.k-reset').each(function( index ) {
663
+ if ($(this).text() == 'active: true')
664
+ $(this).text('Active nodes');
665
+ else
666
+ $(this).text('Inactive nodes');
667
+ });
764
668
  }
765
669
 
766
- _clearTabs()
670
+ _requestNodesList()
767
671
  {
768
- // Destroy scrolling tabs
769
- $('#src-tabNavigator #tabs').scrollingTabs('destroy');
672
+ // Clear previous request scheduling
673
+ clearTimeout(this._requestNodesTimer);
674
+
675
+ // Check if connection is still available
676
+ if (this.smartFox.isConnected)
677
+ {
678
+ // Send request to extension
679
+ this.sendExtensionRequest(this.REQ_GET_NODES);
770
680
 
771
- // Remove all tab navigator content
772
- this._interfaceBuilder.destroyInterface();
681
+ // Schedule next request
682
+ this._requestNodesTimer = setTimeout($.proxy(this._requestNodesList, this), 5000); // Every 5 seconds
683
+ }
773
684
  }
774
685
 
775
- _onUpdateGeolocDbClick()
686
+ _onDeployClick()
776
687
  {
777
- // Disable button
778
- $('#src-updateGeolocDbButton').attr('disabled', true);
779
-
780
- // Send request to server
781
- this.sendExtensionRequest(this.REQ_UPDATE_GEO_DB);
688
+ // Trigger click on Upload widget
689
+ $('button.k-upload-selected').click();
782
690
  }
783
691
 
784
- _onReloadClick()
692
+ _onUploadStart(e)
785
693
  {
786
- // Disable buttons
787
- this._enableButtons(false);
694
+ // Display status modal
695
+ this._switchStatusView('exd-statusProgress');
696
+ this._deployStatusModal.show();
697
+
698
+ // Set destination url
699
+ const url = this._uploadTargetConfig.protocol + '://' + this._uploadTargetConfig.host + ':' + this._uploadTargetConfig.port + '/BlueBox/SFS2XFileUpload?sessHashId=' + this._uploadTargetConfig.sessionToken;
700
+
701
+ e.sender.options.async.saveUrl = url;
788
702
 
789
- // Switch to loading view
790
- this._switchView('src-loading');
703
+ // Set payload
704
+ const params = new FormData();
705
+ params.append('__module', this._uploadTargetConfig.moduleId);
706
+ params.append('__nodes', JSON.stringify(this._selectedNodes));
707
+ params.append('__noDestroy', this._modeSwitch.check());
791
708
 
792
- // Hide validation messages
793
- this._interfaceBuilder.resetValidation();
709
+ for (let f = 0; f < e.files.length; f++)
710
+ params.append('files[]', e.files[f].rawFile);
794
711
 
795
- // Request configuration data to server instance
796
- this.sendExtensionRequest(this.REQ_GET_CONFIG);
712
+ e.formData = params;
797
713
  }
798
714
 
799
- _onSubmitClick()
715
+ _onUploadEnd(e)
800
716
  {
801
- // Check validity
802
- if (this._interfaceBuilder.checkIsValid())
803
- {
804
- let changes = this._interfaceBuilder.getChangedData();
717
+ // Nothign to do
718
+ }
805
719
 
806
- if (changes.size() > 0)
807
- {
808
- // Disable buttons
809
- this._enableButtons(false);
720
+ _onFilesUploadEnd(response)
721
+ {
722
+ // Nothing to do: we have to wait the upload process completion to be signaled by the server through the dedicated Extension response
810
723
 
811
- // Disable form items
812
- this._interfaceBuilder.disableInterface(true);
724
+ //=================================================================
813
725
 
814
- // Send updated settings to server instance
815
- let params = new SFS2X.SFSObject();
816
- params.putSFSArray('settings', changes);
817
- params.putBool('backup', $('#src-backupCheck').prop('checked'));
726
+ // TODO Should we handle this response in some way? For some unknown reason we always get ok=false and status=0
727
+ // console.log(response)
728
+ // console.log(response.ok)
729
+ // console.log(response.status)
730
+ }
818
731
 
819
- this.sendExtensionRequest(this.REQ_UPDATE_CONFIG, params);
820
- }
821
- }
822
- else
823
- this.shellCtrl.showSimpleAlert('Unable to submit configuration changes due to an invalid value; please verify the highlighted form fields in all tabs.', true);
732
+ //------------------------------------
733
+ // PRIVATE METHODS
734
+ //------------------------------------
735
+
736
+ _switchMainView(viewId)
737
+ {
738
+ document.getElementById('exd-viewstack').selectedElement = document.getElementById(viewId);
739
+ }
740
+
741
+ _switchStatusView(viewId)
742
+ {
743
+ document.getElementById('exd-deployStatus').selectedElement = document.getElementById(viewId);
824
744
  }
825
745
 
826
- _updateConfigFormItemDisplayedValue(configParamName, newValue)
746
+ _getHealthTemplate(dataItem)
827
747
  {
828
- // Get the relevant Configuration Form Item
829
- const configFormItem = this._interfaceBuilder.getConfigFormItem(configParamName);
748
+ let style = 'text-success';
830
749
 
831
- // Update Configuration Parameter associated with the Configuration Form Item
832
- configFormItem.data.value = newValue;
833
- configFormItem.data.resetIsModified(); // This is needed to avoid the Configuration Parameter to flagged as 'changed'
750
+ if (!dataItem['health'])
751
+ style = 'text-danger';
834
752
 
835
- // Display the new value of the Configuration Form Item
836
- configFormItem._setWidgetValue(); // Display the new value in the config form item
753
+ return `<span class="${style}"><i class="fas fa-circle"></i></span>`;
837
754
  }
755
+
756
+ //---------------------------------
757
+ // PRIVATE GETTERS
758
+ //---------------------------------
759
+
760
+
838
761
  }
839
762
 
840
763
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "jquery")))
@@ -842,4 +765,4 @@ class ServerConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["Base
842
765
  /***/ })
843
766
 
844
767
  }]);
845
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2NvcmUvbW9kdWxlcy9tb2R1bGUtOS5idW5kbGUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9hcHBsaWNhdGlvbi8uL3NyYy9jb21wb25lbnRzL21vZHVsZS1zcGVjaWZpYy9zc2wtY2VydGlmaWNhdGUtbWFuYWdlci5qcyIsIndlYnBhY2s6Ly9hcHBsaWNhdGlvbi8uL3NyYy9tb2R1bGVzL3NlcnZlci1jb25maWd1cmF0b3IuanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtieXRlc1RvU2l6ZX0gZnJvbSAnLi4vLi4vdXRpbHMvdXRpbGl0aWVzJztcbmltcG9ydCBhZXNqcyBmcm9tICdhZXMtanMnO1xuXG5leHBvcnQgY2xhc3MgU3NsQ2VydGlmaWNhdGVNYW5hZ2VyIGV4dGVuZHMgSFRNTEVsZW1lbnRcbntcblx0Y29uc3RydWN0b3IoKVxuXHR7XG5cdCAgICBzdXBlcigpO1xuXG5cdFx0dGhpcy5fbW9kYWxIdG1sID0gYFxuXHRcdFx0PGRpdiBjbGFzcz1cIm1vZGFsXCIgaWQ9XCJ1cGxvYWRNb2RhbFwiIHRhYmluZGV4PVwiLTFcIiByb2xlPVwiZGlhbG9nXCIgYXJpYS1sYWJlbGxlZGJ5PVwidXBsb2FkTW9kYWxUaXRsZVwiIGFyaWEtaGlkZGVuPVwidHJ1ZVwiPlxuXHRcdFx0XHQ8ZGl2IGNsYXNzPVwibW9kYWwtZGlhbG9nIG1vZGFsLWRpYWxvZy1jZW50ZXJlZFwiIHJvbGU9XCJkb2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