Adding Jenkins badge

This commit is contained in:
Carlos 2020-02-08 18:55:26 +01:00
parent ed2cd71a61
commit d6c0ad99da
4 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,6 @@
# WebConsole # 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 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) ![GitHub All Releases](https://img.shields.io/github/downloads/mesacarlos/WebConsole/total?label=total%20downloads)

View File

@ -136,15 +136,15 @@
<form> <form>
<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"> <input type="text" class="form-control" id="server-name" required>
</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>
<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>
<div class="form-group"> <div class="form-group">
<label for="server-port" class="col-form-label" id="addServerModalSvPort">Server port:</label> <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>
<div class="form-check"> <div class="form-check">
<input class="form-check-input" type="checkbox" id="server-ssl"> <input class="form-check-input" type="checkbox" id="server-ssl">

View File

@ -208,7 +208,7 @@ function closedConnection(serverName){
//Inform user //Inform user
$('#disconnectionModal').modal('show'); $('#disconnectionModal').modal('show');
} }
//connectionManager.deleteConnection(serverName); #Commented because if activeConnection is null then servers cannot be deleted when disconnected connectionManager.deleteConnection(serverName, true);
} }
/** /**

View File

@ -41,9 +41,9 @@ class WebConsoleManager {
* Deletes connection (for example, if a connection was closed by server). * Deletes connection (for example, if a connection was closed by server).
* Called by WebConsole.js * Called by WebConsole.js
*/ */
deleteConnection(serverName){ deleteConnection(serverName, deleteFromArrayOnly){
//Delete from active connection (if it is the active one) //Delete from active connection (if it is the active one)
if(this.activeConnection.serverName == serverName){ if(!deleteFromArrayOnly && this.activeConnection.serverName == serverName){
this.activeConnection = null; this.activeConnection = null;
} }