From d6c0ad99da6d4daf93788d600a1dcdbf804695ed Mon Sep 17 00:00:00 2001 From: Carlos <28845529+mesacarlos@users.noreply.github.com> Date: Sat, 8 Feb 2020 18:55:26 +0100 Subject: [PATCH] Adding Jenkins badge --- README.md | 1 + client/index.html | 6 +++--- client/scripts/WebConsole.js | 2 +- client/scripts/WebConsoleManager.js | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6a977f5..6c31082 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/client/index.html b/client/index.html index ad61912..9b873b5 100644 --- a/client/index.html +++ b/client/index.html @@ -136,15 +136,15 @@
- +
- +
- +
diff --git a/client/scripts/WebConsole.js b/client/scripts/WebConsole.js index 813d5b2..7cd6d1b 100644 --- a/client/scripts/WebConsole.js +++ b/client/scripts/WebConsole.js @@ -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); } /** diff --git a/client/scripts/WebConsoleManager.js b/client/scripts/WebConsoleManager.js index 64c01a9..86b746e 100644 --- a/client/scripts/WebConsoleManager.js +++ b/client/scripts/WebConsoleManager.js @@ -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; }