Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mesacarlos/WebConsole
Browse files Browse the repository at this point in the history
  • Loading branch information
mesacarlos committed Feb 14, 2020
2 parents caff280 + d6c0ad9 commit 8aaa0f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# WebConsole

![Jenkins](https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins.mesacarlos.es%2Fjob%2FWebConsole%2F)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/mesacarlos/WebConsole)](https://github.com/mesacarlos/WebConsole/releases/latest)
![GitHub All Releases](https://img.shields.io/github/downloads/mesacarlos/WebConsole/total?label=total%20downloads)

Expand Down
6 changes: 3 additions & 3 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ <h5 class="modal-title" id="addServerModalLongTitle">Add a new server</h5>
<form>
<div class="form-group">
<label for="server-name" class="col-form-label" id="addServerModalSvName">Server name:</label>
<input type="text" class="form-control" id="server-name">
<input type="text" class="form-control" id="server-name" required>
</div>
<div class="form-group">
<label for="server-ip" class="col-form-label" id="addServerModalSvIp">Server IP:</label>
<input type="text" class="form-control" id="server-ip" placeholder="localhost">
<input type="text" class="form-control" id="server-ip" placeholder="localhost" required>
</div>
<div class="form-group">
<label for="server-port" class="col-form-label" id="addServerModalSvPort">Server port:</label>
<input type="number" class="form-control" id="server-port" placeholder="8080">
<input type="number" class="form-control" id="server-port" placeholder="8080" required>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="server-ssl">
Expand Down
2 changes: 1 addition & 1 deletion client/scripts/WebConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function closedConnection(serverName){
//Inform user
$('#disconnectionModal').modal('show');
}
//connectionManager.deleteConnection(serverName); #Commented because if activeConnection is null then servers cannot be deleted when disconnected
connectionManager.deleteConnection(serverName, true);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions client/scripts/WebConsoleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class WebConsoleManager {
* Deletes connection (for example, if a connection was closed by server).
* Called by WebConsole.js
*/
deleteConnection(serverName){
deleteConnection(serverName, deleteFromArrayOnly){
//Delete from active connection (if it is the active one)
if(this.activeConnection.serverName == serverName){
if(!deleteFromArrayOnly && this.activeConnection.serverName == serverName){
this.activeConnection = null;
}

Expand Down

0 comments on commit 8aaa0f9

Please sign in to comment.