Work-in-progress Web Interface

This commit is contained in:
Carlos
2019-08-12 02:53:46 +02:00
parent 5d1a193a39
commit 49674f7ffe
6 changed files with 338 additions and 0 deletions

View File

@ -0,0 +1,30 @@
/**
WebConsole Manager for WebConsole v1.0.0
Used to manage active connections
https://github.com/mesacarlos
2019 Carlos Mesa under MIT License.
*/
class WebConsoleManager {
constructor(){
this.activeConnections = [];
}
/**
* Adds connection to list
*/
addConnection(connection){
this.activeConnections.push(connection);
}
/**
* Retrieve server by name
*/
getConnection(serverName){
for (i = 0; i < this.activeConnections.length; i++) {
if(this.activeConnections[i].serverName == serverName){
return this.activeConnections[i];
}
}
}
}