Fixed ram usage being incorrect

This commit is contained in:
Carlos 2020-11-28 19:31:58 +01:00
parent 7c4286f7df
commit 27f769f6ac
2 changed files with 10 additions and 13 deletions

View File

@ -153,9 +153,6 @@
<div class="form-group"> <div class="form-group">
<label for="server-name" class="col-form-label" id="addServerModalSvName">Server name:</label> <label for="server-name" class="col-form-label" id="addServerModalSvName">Server name:</label>
<input type="text" class="form-control" id="server-name" required> <input type="text" class="form-control" id="server-name" required>
<div class="invalid-feedback" id="serverNameInvalidFeedback">
Please provide a valid servername.
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="server-ip" class="col-form-label" id="addServerModalSvIp">Server IP:</label> <label for="server-ip" class="col-form-label" id="addServerModalSvIp">Server IP:</label>
@ -267,7 +264,7 @@
<!-- Webpage footer --> <!-- Webpage footer -->
<footer class="footer mt-auto py-3"> <footer class="footer mt-auto py-3">
<div class="container"> <div class="container">
<span class="text-muted">WebConsole v2.0 (rev. 2) - <a href="https://github.com/mesacarlos/WebConsole">GitHub</a></span> <span class="text-muted">WebConsole v2.0 (rev. 3) - <a href="https://github.com/mesacarlos/WebConsole">GitHub</a></span>
</div> </div>
</footer> </footer>
@ -277,15 +274,15 @@
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<!-- WebConsole JS Objects --> <!-- WebConsole JS Objects -->
<script src="scripts/object/Setting.js?v=2.2"></script> <script src="scripts/object/Setting.js?v=2.0.3"></script>
<script src="scripts/object/WSServer.js?v=2.2"></script> <script src="scripts/object/WSServer.js?v=2.0.3"></script>
<!-- WebConsole JS Scripts --> <!-- WebConsole JS Scripts -->
<script src="scripts/WebConsoleLanguage.js?v=2.2"></script> <script src="scripts/WebConsoleLanguage.js?v=2.0.3"></script>
<script src="scripts/WebConsoleConnector.js?v=2.2"></script> <script src="scripts/WebConsoleConnector.js?v=2.0.3"></script>
<script src="scripts/WebConsoleManager.js?v=2.2"></script> <script src="scripts/WebConsoleManager.js?v=2.0.3"></script>
<script src="scripts/WebConsolePersistenceManager.js?v=2.2"></script> <script src="scripts/WebConsolePersistenceManager.js?v=2.0.3"></script>
<script src="scripts/WebConsole.js?v=2.2"></script> <script src="scripts/WebConsole.js?v=2.0.3"></script>
<script src="scripts/WebConsoleJqueryHandler.js?v=2.2"></script> <script src="scripts/WebConsoleJqueryHandler.js?v=2.0.3"></script>
</body> </body>
</html> </html>

View File

@ -14,7 +14,7 @@ public class RamUsageCommand implements WSCommand {
long free = r.freeMemory() / 1024 / 1024; long free = r.freeMemory() / 1024 / 1024;
long max = r.maxMemory() / 1024 / 1024; long max = r.maxMemory() / 1024 / 1024;
long used = max - free; long used = r.totalMemory() / 1024 / 1024 - free;
wsServer.sendToClient(conn, wsServer.sendToClient(conn,
new RamUsage( new RamUsage(