make Prettier
This commit is contained in:
parent
ef34fefc39
commit
880da4d685
|
@ -0,0 +1,18 @@
|
||||||
|
{ "node": true
|
||||||
|
, "browser": true
|
||||||
|
, "jquery": true
|
||||||
|
, "globals": { "angular": true, "Promise": true }
|
||||||
|
|
||||||
|
, "indent": 2
|
||||||
|
, "onevar": true
|
||||||
|
, "laxcomma": true
|
||||||
|
, "laxbreak": true
|
||||||
|
, "curly": true
|
||||||
|
, "nonbsp": true
|
||||||
|
|
||||||
|
, "eqeqeq": true
|
||||||
|
, "immed": true
|
||||||
|
, "undef": true
|
||||||
|
, "unused": true
|
||||||
|
, "latedef": true
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"printWidth": 120,
|
||||||
|
"tabWidth": 4,
|
||||||
|
"trailingComma": "none",
|
||||||
|
"useTabs": false
|
||||||
|
}
|
192
dump/admin.html
192
dump/admin.html
|
@ -1,110 +1,124 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Websock VPN Instrumentation</title>
|
<title>Websock VPN Instrumentation</title>
|
||||||
</head>
|
</head>
|
||||||
<body ng-app="vpnAdmin" ng-controller="vpnInstrumentationController">
|
<body ng-app="vpnAdmin" ng-controller="vpnInstrumentationController">
|
||||||
|
<div class="panel panel-default panel-primary">
|
||||||
<div class="panel panel-default panel-primary">
|
<div class="panel-heading">VPN Instrumentation</div>
|
||||||
<div class="panel-heading">VPN Instrumentation</div>
|
<div class="panel-body">
|
||||||
<div class="panel-body">
|
<div class="panel panel-default panel-info">
|
||||||
<div class="panel panel-default panel-info">
|
<div class="panel-heading">Control Plane</div>
|
||||||
<div class="panel-heading ">Control Plane</div>
|
<div class="panel-body">
|
||||||
<div class="panel-body">
|
<div class="row">
|
||||||
|
<!-- Auth -->
|
||||||
<div class="row"> <!-- Auth -->
|
<div class="col-lg-6">
|
||||||
<div class="col-lg-6">
|
<div class="input-group">
|
||||||
<div class="input-group">
|
<span class="input-group-btn">
|
||||||
<span class="input-group-btn">
|
<button class="btn btn-default" type="button" ng-click="startWebSocket()">
|
||||||
<button class="btn btn-default" type="button" ng-click="startWebSocket()">Start WebSocket</button>
|
Start WebSocket
|
||||||
</span>
|
</button>
|
||||||
<button class="btn btn-default" type="button" ng-class="conn == false && 'btn-danger' || 'btn-success'">
|
</span>
|
||||||
{[{ conn == false && 'False' || 'True' }]}
|
<button
|
||||||
</button>
|
class="btn btn-default"
|
||||||
|
type="button"
|
||||||
|
ng-class="conn == false && 'btn-danger' || 'btn-success'"
|
||||||
|
>
|
||||||
|
{[{ conn == false && 'False' || 'True' }]}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
<br />
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default" type="button">Auth</button>
|
<button class="btn btn-default" type="button">Auth</button>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" class="form-control" placeholder="Enter auth data here">
|
<input type="text" class="form-control" placeholder="Enter auth data here" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="panel panel-default panel-info">
|
||||||
<div class="panel panel-default panel-info">
|
<div class="panel-heading">Data</div>
|
||||||
<div class="panel-heading">Data</div>
|
<div class="panel-body">
|
||||||
<div class="panel-body">
|
<p ng-repeat="text in log_elements">{[{text}]}</p>
|
||||||
<p ng-repeat="text in log_elements">{[{text}]}</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</body>
|
||||||
</body>
|
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
<link
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
rel="stylesheet"
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
|
||||||
|
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
|
||||||
|
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
|
||||||
|
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
console.log("startup");
|
console.log("startup");
|
||||||
|
|
||||||
var vpnAdmin = angular.module('vpnAdmin',[]);
|
var vpnAdmin = angular.module("vpnAdmin", []);
|
||||||
vpnAdmin.config(function($interpolateProvider) {
|
vpnAdmin.config(function ($interpolateProvider) {
|
||||||
console.log("vpnTest Config");
|
console.log("vpnTest Config");
|
||||||
$interpolateProvider.startSymbol('{[{');
|
$interpolateProvider.startSymbol("{[{");
|
||||||
$interpolateProvider.endSymbol('}]}');
|
$interpolateProvider.endSymbol("}]}");
|
||||||
});
|
});
|
||||||
vpnAdmin.controller('vpnInstrumentationController', function ($scope) {
|
vpnAdmin.controller("vpnInstrumentationController", function ($scope) {
|
||||||
console.log("vpnInstrumentationController startup");
|
console.log("vpnInstrumentationController startup");
|
||||||
|
|
||||||
$scope.log_elements = [];
|
$scope.log_elements = [];
|
||||||
$scope.auth_key = "";
|
$scope.auth_key = "";
|
||||||
$scope.conn = false;
|
$scope.conn = false;
|
||||||
|
|
||||||
$scope.webSocketStatus = function() {
|
$scope.webSocketStatus = function () {
|
||||||
if ($scope.conn == false) {
|
if ($scope.conn == false) {
|
||||||
return ""
|
return "";
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
$scope.startWebSocket = function() {
|
$scope.startWebSocket = function () {
|
||||||
console.log("Start webSocket {{$}}");
|
console.log("Start webSocket {{$}}");
|
||||||
if (window["WebSocket"]) {
|
if (window["WebSocket"]) {
|
||||||
$scope.conn = new WebSocket("wss://{{$}}/ws/admin");
|
$scope.conn = new WebSocket("wss://{{$}}/ws/admin");
|
||||||
$scope.append_log("Websocket opened");
|
$scope.append_log("Websocket opened");
|
||||||
$scope.conn.onclose = function (evt) {
|
$scope.conn.onclose = function (evt) {
|
||||||
$scope.append_log("Connection closed.");
|
$scope.append_log("Connection closed.");
|
||||||
}
|
};
|
||||||
$scope.conn.onmessage = function (evt) {
|
$scope.conn.onmessage = function (evt) {
|
||||||
$scope.append_log(evt.data)
|
$scope.append_log(evt.data);
|
||||||
}
|
};
|
||||||
}
|
} else {
|
||||||
else {
|
appendLog($("<div><b>Your browser does not support WebSockets.</b></div>"));
|
||||||
appendLog($("<div><b>Your browser does not support WebSockets.</b></div>"))
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
|
|
||||||
$scope.auth_click = function() {
|
$scope.auth_click = function () {
|
||||||
$scope.append_log($scope.auth_key)
|
$scope.append_log($scope.auth_key);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.append_log = function(txt) {
|
$scope.append_log = function (txt) {
|
||||||
$scope.log_elements.push(txt)
|
$scope.log_elements.push(txt);
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
241
dump/client.html
241
dump/client.html
|
@ -1,132 +1,151 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Websock VPN Test Client</title>
|
<title>Websock VPN Test Client</title>
|
||||||
</head>
|
</head>
|
||||||
<body ng-app="vpnTest" ng-controller="vpnTestController">
|
<body ng-app="vpnTest" ng-controller="vpnTestController">
|
||||||
|
<div class="panel panel-default panel-primary">
|
||||||
|
<div class="panel-heading">WebSocket Client Test</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="panel panel-default panel-info">
|
||||||
|
<div class="panel-heading">Control Plane</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="row">
|
||||||
|
<!-- Auth -->
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button class="btn btn-default" type="button" ng-click="startWebSocket()">
|
||||||
|
Start WebSocket
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
<button
|
||||||
|
class="btn btn-default"
|
||||||
|
type="button"
|
||||||
|
ng-class="conn == false && 'btn-danger' || 'btn-success'"
|
||||||
|
>
|
||||||
|
{[{ conn == false && 'False' || 'True' }]}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="panel panel-default panel-primary">
|
<br />
|
||||||
<div class="panel-heading">WebSocket Client Test</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<div class="panel panel-default panel-info">
|
|
||||||
<div class="panel-heading ">Control Plane</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
|
|
||||||
<div class="row"> <!-- Auth -->
|
<div class="row">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default" type="button" ng-click="startWebSocket()">Start WebSocket</button>
|
<button class="btn btn-default" type="button">Auth</button>
|
||||||
</span>
|
</span>
|
||||||
<button class="btn btn-default" type="button" ng-class="conn == false && 'btn-danger' || 'btn-success'">
|
<input type="text" class="form-control" placeholder="Enter auth data here" />
|
||||||
{[{ conn == false && 'False' || 'True' }]}
|
</div>
|
||||||
</button>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button class="btn btn-default" ng-click="send_click()" type="button">
|
||||||
|
Send
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
<input
|
||||||
|
ng-model="send_data"
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
placeholder="Enter send data here"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="input-group">
|
|
||||||
<span class="input-group-btn">
|
|
||||||
<button class="btn btn-default" type="button">Auth</button>
|
|
||||||
</span>
|
|
||||||
<input type="text" class="form-control" placeholder="Enter auth data here">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="input-group">
|
|
||||||
<span class="input-group-btn">
|
|
||||||
<button class="btn btn-default" ng-click="send_click()" type="button">Send</button>
|
|
||||||
</span>
|
|
||||||
<input ng-model="send_data" type="text" class="form-control" placeholder="Enter send data here">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="panel panel-default panel-danger">
|
||||||
<div class="panel panel-default panel-danger">
|
<div class="panel-heading">Messages</div>
|
||||||
<div class="panel-heading">Messages</div>
|
<div class="panel-body">
|
||||||
<div class="panel-body">
|
<p ng-repeat="text in log_elements">{[{text}]}</p>
|
||||||
<p ng-repeat="text in log_elements">{[{text}]}</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</body>
|
||||||
</body>
|
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
<link
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
rel="stylesheet"
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
|
||||||
|
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
|
||||||
|
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
|
||||||
|
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
console.log("startup");
|
console.log("startup");
|
||||||
|
|
||||||
var vpnTest = angular.module('vpnTest',[]);
|
var vpnTest = angular.module("vpnTest", []);
|
||||||
vpnTest.config(function($interpolateProvider) {
|
vpnTest.config(function ($interpolateProvider) {
|
||||||
console.log("vpnTest Config");
|
console.log("vpnTest Config");
|
||||||
$interpolateProvider.startSymbol('{[{');
|
$interpolateProvider.startSymbol("{[{");
|
||||||
$interpolateProvider.endSymbol('}]}');
|
$interpolateProvider.endSymbol("}]}");
|
||||||
});
|
});
|
||||||
vpnTest.controller('vpnTestController', function ($scope) {
|
vpnTest.controller("vpnTestController", function ($scope) {
|
||||||
console.log("vpnTestController startup");
|
console.log("vpnTestController startup");
|
||||||
|
|
||||||
$scope.log_elements = [];
|
$scope.log_elements = [];
|
||||||
$scope.auth_key = "";
|
$scope.auth_key = "";
|
||||||
$scope.conn = false;
|
$scope.conn = false;
|
||||||
$scope.send_data = ""
|
$scope.send_data = "";
|
||||||
|
|
||||||
$scope.webSocketStatus = function() {
|
$scope.webSocketStatus = function () {
|
||||||
if ($scope.conn == false) {
|
if ($scope.conn == false) {
|
||||||
return ""
|
return "";
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
$scope.startWebSocket = function() {
|
$scope.startWebSocket = function () {
|
||||||
console.log("Start webSocket {{$}}");
|
console.log("Start webSocket {{$}}");
|
||||||
if (window["WebSocket"]) {
|
if (window["WebSocket"]) {
|
||||||
$scope.conn = new WebSocket("wss://{{$}}/ws/client");
|
$scope.conn = new WebSocket("wss://{{$}}/ws/client");
|
||||||
$scope.append_log("Websocket opened");
|
$scope.append_log("Websocket opened");
|
||||||
$scope.conn.onclose = function (evt) {
|
$scope.conn.onclose = function (evt) {
|
||||||
$scope.append_log("Connection closed.");
|
$scope.append_log("Connection closed.");
|
||||||
}
|
};
|
||||||
$scope.conn.onmessage = function (evt) {
|
$scope.conn.onmessage = function (evt) {
|
||||||
console.log(evt.data)
|
console.log(evt.data);
|
||||||
$scope.append_log(evt.data)
|
$scope.append_log(evt.data);
|
||||||
}
|
};
|
||||||
}
|
} else {
|
||||||
else {
|
appendLog($("<div><b>Your browser does not support WebSockets.</b></div>"));
|
||||||
appendLog($("<div><b>Your browser does not support WebSockets.</b></div>"))
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
|
|
||||||
$scope.auth_click = function() {
|
$scope.auth_click = function () {
|
||||||
$scope.append_log($scope.auth_key)
|
$scope.append_log($scope.auth_key);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.send_click = function() {
|
$scope.send_click = function () {
|
||||||
console.log("send_click")
|
console.log("send_click");
|
||||||
$scope.conn.send($scope.send_data)
|
$scope.conn.send($scope.send_data);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.append_log = function(txt) {
|
|
||||||
$scope.log_elements.push(txt)
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
$scope.append_log = function (txt) {
|
||||||
|
$scope.log_elements.push(txt);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,60 +1,57 @@
|
||||||
<!doctype html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<title>Page Not Found</title>
|
<title>Page Not Found</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<style>
|
<style>
|
||||||
|
* {
|
||||||
|
line-height: 1.2;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
* {
|
html {
|
||||||
line-height: 1.2;
|
color: #888;
|
||||||
margin: 0;
|
display: table;
|
||||||
}
|
font-family: sans-serif;
|
||||||
|
height: 100%;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
html {
|
body {
|
||||||
color: #888;
|
display: table-cell;
|
||||||
display: table;
|
vertical-align: middle;
|
||||||
font-family: sans-serif;
|
margin: 2em auto;
|
||||||
height: 100%;
|
|
||||||
text-align: center;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: middle;
|
|
||||||
margin: 2em auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
color: #555;
|
|
||||||
font-size: 2em;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 280px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 280px) {
|
|
||||||
|
|
||||||
body, p {
|
|
||||||
width: 95%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 1.5em;
|
color: #555;
|
||||||
margin: 0 0 0.3em;
|
font-size: 2em;
|
||||||
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
p {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 280px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
@media only screen and (max-width: 280px) {
|
||||||
</head>
|
body,
|
||||||
<body>
|
p {
|
||||||
<h1>Page Not Found</h1>
|
width: 95%;
|
||||||
<p>Sorry, but the page you were trying to view does not exist.</p>
|
}
|
||||||
</body>
|
|
||||||
|
h1 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
margin: 0 0 0.3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Page Not Found</h1>
|
||||||
|
<p>Sorry, but the page you were trying to view does not exist.</p>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<!-- IE needs 512+ bytes: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx -->
|
<!-- IE needs 512+ bytes: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx -->
|
||||||
|
|
|
@ -95,22 +95,6 @@ textarea {
|
||||||
Author's custom styles
|
Author's custom styles
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ==========================================================================
|
/* ==========================================================================
|
||||||
Helper classes
|
Helper classes
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
@ -195,10 +179,7 @@ textarea {
|
||||||
/* Style adjustments for viewports that meet the condition */
|
/* Style adjustments for viewports that meet the condition */
|
||||||
}
|
}
|
||||||
|
|
||||||
@media print,
|
@media print, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 1.25dppx), (min-resolution: 120dpi) {
|
||||||
(-webkit-min-device-pixel-ratio: 1.25),
|
|
||||||
(min-resolution: 1.25dppx),
|
|
||||||
(min-resolution: 120dpi) {
|
|
||||||
/* Style adjustments for high resolution devices */
|
/* Style adjustments for high resolution devices */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
html {
|
html {
|
||||||
font-family: sans-serif; /* 1 */
|
font-family: sans-serif; /* 1 */
|
||||||
-ms-text-size-adjust: 100%; /* 2 */
|
-ms-text-size-adjust: 100%; /* 2 */
|
||||||
-webkit-text-size-adjust: 100%; /* 2 */
|
-webkit-text-size-adjust: 100%; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +17,7 @@ html {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* HTML5 display definitions
|
/* HTML5 display definitions
|
||||||
|
@ -43,7 +43,7 @@ menu,
|
||||||
nav,
|
nav,
|
||||||
section,
|
section,
|
||||||
summary {
|
summary {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,8 +55,8 @@ audio,
|
||||||
canvas,
|
canvas,
|
||||||
progress,
|
progress,
|
||||||
video {
|
video {
|
||||||
display: inline-block; /* 1 */
|
display: inline-block; /* 1 */
|
||||||
vertical-align: baseline; /* 2 */
|
vertical-align: baseline; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -65,8 +65,8 @@ video {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
audio:not([controls]) {
|
audio:not([controls]) {
|
||||||
display: none;
|
display: none;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,7 +76,7 @@ audio:not([controls]) {
|
||||||
|
|
||||||
[hidden],
|
[hidden],
|
||||||
template {
|
template {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Links
|
/* Links
|
||||||
|
@ -87,7 +87,7 @@ template {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
a {
|
a {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -97,7 +97,7 @@ a {
|
||||||
|
|
||||||
a:active,
|
a:active,
|
||||||
a:hover {
|
a:hover {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Text-level semantics
|
/* Text-level semantics
|
||||||
|
@ -108,7 +108,7 @@ a:hover {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
abbr[title] {
|
abbr[title] {
|
||||||
border-bottom: 1px dotted;
|
border-bottom: 1px dotted;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,7 +117,7 @@ abbr[title] {
|
||||||
|
|
||||||
b,
|
b,
|
||||||
strong {
|
strong {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -125,7 +125,7 @@ strong {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dfn {
|
dfn {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -134,8 +134,8 @@ dfn {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
margin: 0.67em 0;
|
margin: 0.67em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -143,8 +143,8 @@ h1 {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mark {
|
mark {
|
||||||
background: #ff0;
|
background: #ff0;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -152,7 +152,7 @@ mark {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
small {
|
small {
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -161,18 +161,18 @@ small {
|
||||||
|
|
||||||
sub,
|
sub,
|
||||||
sup {
|
sup {
|
||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
sup {
|
sup {
|
||||||
top: -0.5em;
|
top: -0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub {
|
sub {
|
||||||
bottom: -0.25em;
|
bottom: -0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Embedded content
|
/* Embedded content
|
||||||
|
@ -183,7 +183,7 @@ sub {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
img {
|
img {
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -191,7 +191,7 @@ img {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
svg:not(:root) {
|
svg:not(:root) {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Grouping content
|
/* Grouping content
|
||||||
|
@ -202,7 +202,7 @@ svg:not(:root) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
margin: 1em 40px;
|
margin: 1em 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -210,8 +210,8 @@ figure {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -219,7 +219,7 @@ hr {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -230,8 +230,8 @@ code,
|
||||||
kbd,
|
kbd,
|
||||||
pre,
|
pre,
|
||||||
samp {
|
samp {
|
||||||
font-family: monospace, monospace;
|
font-family: monospace, monospace;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Forms
|
/* Forms
|
||||||
|
@ -254,9 +254,9 @@ input,
|
||||||
optgroup,
|
optgroup,
|
||||||
select,
|
select,
|
||||||
textarea {
|
textarea {
|
||||||
color: inherit; /* 1 */
|
color: inherit; /* 1 */
|
||||||
font: inherit; /* 2 */
|
font: inherit; /* 2 */
|
||||||
margin: 0; /* 3 */
|
margin: 0; /* 3 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -264,7 +264,7 @@ textarea {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
button {
|
button {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -276,7 +276,7 @@ button {
|
||||||
|
|
||||||
button,
|
button,
|
||||||
select {
|
select {
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -291,8 +291,8 @@ button,
|
||||||
html input[type="button"], /* 1 */
|
html input[type="button"], /* 1 */
|
||||||
input[type="reset"],
|
input[type="reset"],
|
||||||
input[type="submit"] {
|
input[type="submit"] {
|
||||||
-webkit-appearance: button; /* 2 */
|
-webkit-appearance: button; /* 2 */
|
||||||
cursor: pointer; /* 3 */
|
cursor: pointer; /* 3 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -301,7 +301,7 @@ input[type="submit"] {
|
||||||
|
|
||||||
button[disabled],
|
button[disabled],
|
||||||
html input[disabled] {
|
html input[disabled] {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -310,8 +310,8 @@ html input[disabled] {
|
||||||
|
|
||||||
button::-moz-focus-inner,
|
button::-moz-focus-inner,
|
||||||
input::-moz-focus-inner {
|
input::-moz-focus-inner {
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -320,7 +320,7 @@ input::-moz-focus-inner {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
input {
|
input {
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -333,8 +333,8 @@ input {
|
||||||
|
|
||||||
input[type="checkbox"],
|
input[type="checkbox"],
|
||||||
input[type="radio"] {
|
input[type="radio"] {
|
||||||
box-sizing: border-box; /* 1 */
|
box-sizing: border-box; /* 1 */
|
||||||
padding: 0; /* 2 */
|
padding: 0; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -345,7 +345,7 @@ input[type="radio"] {
|
||||||
|
|
||||||
input[type="number"]::-webkit-inner-spin-button,
|
input[type="number"]::-webkit-inner-spin-button,
|
||||||
input[type="number"]::-webkit-outer-spin-button {
|
input[type="number"]::-webkit-outer-spin-button {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -354,8 +354,8 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
input[type="search"] {
|
input[type="search"] {
|
||||||
-webkit-appearance: textfield; /* 1 */
|
-webkit-appearance: textfield; /* 1 */
|
||||||
box-sizing: content-box; /* 2 */
|
box-sizing: content-box; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -366,7 +366,7 @@ input[type="search"] {
|
||||||
|
|
||||||
input[type="search"]::-webkit-search-cancel-button,
|
input[type="search"]::-webkit-search-cancel-button,
|
||||||
input[type="search"]::-webkit-search-decoration {
|
input[type="search"]::-webkit-search-decoration {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -374,9 +374,9 @@ input[type="search"]::-webkit-search-decoration {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fieldset {
|
fieldset {
|
||||||
border: 1px solid #c0c0c0;
|
border: 1px solid #c0c0c0;
|
||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
padding: 0.35em 0.625em 0.75em;
|
padding: 0.35em 0.625em 0.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -385,8 +385,8 @@ fieldset {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
legend {
|
legend {
|
||||||
border: 0; /* 1 */
|
border: 0; /* 1 */
|
||||||
padding: 0; /* 2 */
|
padding: 0; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -394,7 +394,7 @@ legend {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -403,7 +403,7 @@ textarea {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
optgroup {
|
optgroup {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tables
|
/* Tables
|
||||||
|
@ -414,11 +414,11 @@ optgroup {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
td,
|
td,
|
||||||
th {
|
th {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,76 +1,97 @@
|
||||||
<!doctype html>
|
<!DOCTYPE html>
|
||||||
<html class="no-js" lang="">
|
<html class="no-js" lang="">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
||||||
<title></title>
|
<title></title>
|
||||||
<meta name="description" content="">
|
<meta name="description" content="" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
|
||||||
<!-- Place favicon.ico in the root directory -->
|
<!-- Place favicon.ico in the root directory -->
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/normalize.css">
|
<link rel="stylesheet" href="css/normalize.css" />
|
||||||
<link rel="stylesheet" href="css/main.css">
|
<link rel="stylesheet" href="css/main.css" />
|
||||||
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
|
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
|
||||||
<base href="/">
|
<base href="/" />
|
||||||
</head>
|
</head>
|
||||||
<body ng-app="rvpnApp">
|
<body ng-app="rvpnApp">
|
||||||
<!--[if lt IE 8]>
|
<!--[if lt IE 8]>
|
||||||
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
<p class="browserupgrade">
|
||||||
|
You are using an <strong>outdated</strong> browser. Please
|
||||||
|
<a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.
|
||||||
|
</p>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<!-- Admin GUI Begins Here -->
|
<!-- Admin GUI Begins Here -->
|
||||||
<header class="bs-docs-nav navbar navbar-static-top" id="top">
|
<header class="bs-docs-nav navbar navbar-static-top" id="top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<a href="/admin/index.html" target="_parent" class="navbar-brand">RVPN Admin</a>
|
<a href="/admin/index.html" target="_parent" class="navbar-brand">RVPN Admin</a>
|
||||||
</div>
|
</div>
|
||||||
<nav class="collapse navbar-collapse" id="bs-navbar">
|
<nav class="collapse navbar-collapse" id="bs-navbar">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li> <a href="/admin/status">Status</a> </li>
|
<li><a href="/admin/status">Status</a></li>
|
||||||
<li> <a href="/admin/servers">Servers</a> </li>
|
<li><a href="/admin/servers">Servers</a></li>
|
||||||
<li> <a href="/admin/#domains">Domains</a> </li>
|
<li><a href="/admin/#domains">Domains</a></li>
|
||||||
<li> <a href="/admin/#connections">Connections</a> </li>
|
<li><a href="/admin/#connections">Connections</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li><a href="#">Help</a></li>
|
<li><a href="#">Help</a></li>
|
||||||
<li><a href="#">Login</a></li>
|
<li><a href="#">Login</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div ng-view> </div>
|
<div ng-view></div>
|
||||||
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
|
||||||
<script>window.jQuery || document.write('<script src="admin/js/vendor/jquery-1.12.0.min.js"><\/script>')</script>
|
<script>
|
||||||
|
window.jQuery || document.write('<script src="admin/js/vendor/jquery-1.12.0.min.js"><\/script>');
|
||||||
|
</script>
|
||||||
<script src="admin/js/plugins.js"></script>
|
<script src="admin/js/plugins.js"></script>
|
||||||
<script src="admin/js/main.js"></script>
|
<script src="admin/js/main.js"></script>
|
||||||
|
|
||||||
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
|
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
|
||||||
<script>
|
<script>
|
||||||
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
|
(function (b, o, i, l, e, r) {
|
||||||
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
|
b.GoogleAnalyticsObject = l;
|
||||||
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
|
b[l] ||
|
||||||
e.src='https://www.google-analytics.com/analytics.js';
|
(b[l] = function () {
|
||||||
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
|
(b[l].q = b[l].q || []).push(arguments);
|
||||||
ga('create','UA-XXXXX-X','auto');ga('send','pageview');
|
});
|
||||||
|
b[l].l = +new Date();
|
||||||
|
e = o.createElement(i);
|
||||||
|
r = o.getElementsByTagName(i)[0];
|
||||||
|
e.src = "https://www.google-analytics.com/analytics.js";
|
||||||
|
r.parentNode.insertBefore(e, r);
|
||||||
|
})(window, document, "script", "ga");
|
||||||
|
ga("create", "UA-XXXXX-X", "auto");
|
||||||
|
ga("send", "pageview");
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.js"></script>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular-route.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular-route.js"></script>
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
<link
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
rel="stylesheet"
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
|
||||||
|
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
|
||||||
|
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
|
||||||
|
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
></script>
|
||||||
<script src="/admin/js/vendor/filter.js"></script>
|
<script src="/admin/js/vendor/filter.js"></script>
|
||||||
<script src="/admin/js/app.js"></script>
|
<script src="/admin/js/app.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,132 +1,129 @@
|
||||||
console.log("app.sh startup")
|
console.log("app.sh startup");
|
||||||
|
|
||||||
var app = angular.module("rvpnApp", ["ngRoute", "angular-duration-format"]);
|
var app = angular.module("rvpnApp", ["ngRoute", "angular-duration-format"]);
|
||||||
|
|
||||||
app.config(function($routeProvider, $locationProvider) {
|
app.config(function ($routeProvider, $locationProvider) {
|
||||||
$routeProvider
|
$routeProvider
|
||||||
|
|
||||||
.when("/admin/status/", {
|
.when("/admin/status/", {
|
||||||
templateUrl : "admin/partials/status.html"
|
templateUrl: "admin/partials/status.html"
|
||||||
})
|
})
|
||||||
|
|
||||||
.when("/admin/index.html", {
|
.when("/admin/index.html", {
|
||||||
templateUrl : "admin/partials/servers.html"
|
templateUrl: "admin/partials/servers.html"
|
||||||
})
|
})
|
||||||
|
|
||||||
.when("/admin/servers/", {
|
.when("/admin/servers/", {
|
||||||
templateUrl : "admin/partials/servers.html"
|
templateUrl: "admin/partials/servers.html"
|
||||||
})
|
})
|
||||||
|
|
||||||
.when("/admin/#domains", {
|
.when("/admin/#domains", {
|
||||||
templateUrl : "green.htm"
|
templateUrl: "green.htm"
|
||||||
})
|
})
|
||||||
|
|
||||||
.when("/blue", {
|
.when("/blue", {
|
||||||
templateUrl : "blue.htm"
|
templateUrl: "blue.htm"
|
||||||
});
|
});
|
||||||
$locationProvider.html5Mode(true);
|
$locationProvider.html5Mode(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.filter('bytes', function() {
|
app.filter("bytes", function () {
|
||||||
return function(bytes, precision) {
|
return function (bytes, precision) {
|
||||||
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-';
|
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return "-";
|
||||||
if (typeof precision === 'undefined') precision = 1;
|
if (typeof precision === "undefined") precision = 1;
|
||||||
var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'],
|
var units = ["bytes", "kB", "MB", "GB", "TB", "PB"],
|
||||||
number = Math.floor(Math.log(bytes) / Math.log(1024));
|
number = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||||
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number];
|
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + " " + units[number];
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
app.filter('hfcduration', function() {
|
app.filter("hfcduration", function () {
|
||||||
return function(duration, precision) {
|
return function (duration, precision) {
|
||||||
remain = duration
|
remain = duration;
|
||||||
duration_day = 24*60*60
|
duration_day = 24 * 60 * 60;
|
||||||
duration_hour = 60*60
|
duration_hour = 60 * 60;
|
||||||
duration_minute = 60
|
duration_minute = 60;
|
||||||
duration_str = ""
|
duration_str = "";
|
||||||
|
|
||||||
days = Math.floor(remain / duration_day)
|
days = Math.floor(remain / duration_day);
|
||||||
if (days > 0) {
|
if (days > 0) {
|
||||||
remain = remain - (days * duration_day)
|
remain = remain - days * duration_day;
|
||||||
duration_str = duration_str + days + 'd'
|
duration_str = duration_str + days + "d";
|
||||||
}
|
}
|
||||||
|
|
||||||
hours = Math.floor(remain / duration_hour)
|
hours = Math.floor(remain / duration_hour);
|
||||||
if (hours > 0) {
|
if (hours > 0) {
|
||||||
remain = remain - (hours * duration_hour)
|
remain = remain - hours * duration_hour;
|
||||||
duration_str = duration_str + hours + 'h'
|
duration_str = duration_str + hours + "h";
|
||||||
}
|
}
|
||||||
|
|
||||||
mins = Math.floor(remain / duration_minute)
|
mins = Math.floor(remain / duration_minute);
|
||||||
if (mins > 0) {
|
if (mins > 0) {
|
||||||
remain = remain - (mins * duration_minute)
|
remain = remain - mins * duration_minute;
|
||||||
duration_str = duration_str + mins + 'm'
|
duration_str = duration_str + mins + "m";
|
||||||
}
|
}
|
||||||
|
|
||||||
secs = Math.floor(remain)
|
secs = Math.floor(remain);
|
||||||
duration_str = duration_str + secs + 's'
|
duration_str = duration_str + secs + "s";
|
||||||
|
|
||||||
return (duration_str);
|
return duration_str;
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
app.controller('statusController', function ($scope, $http) {
|
app.controller("statusController", function ($scope, $http) {
|
||||||
console.log("statusController");
|
console.log("statusController");
|
||||||
$scope.status_search = "";
|
$scope.status_search = "";
|
||||||
|
|
||||||
var api = '/api/org.rootprojects.tunnel/status'
|
var api = "/api/org.rootprojects.tunnel/status";
|
||||||
|
|
||||||
$scope.updateView = function() {
|
$scope.updateView = function () {
|
||||||
$http.get(api).then(function(response) {
|
$http.get(api).then(function (response) {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
data = response.data;
|
data = response.data;
|
||||||
if (data.error == 'ok' ){
|
if (data.error == "ok") {
|
||||||
$scope.status = data.result;
|
$scope.status = data.result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
$scope.updateView()
|
|
||||||
|
|
||||||
|
$scope.updateView();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.controller('serverController', function ($scope, $http) {
|
app.controller("serverController", function ($scope, $http) {
|
||||||
$scope.servers = [];
|
$scope.servers = [];
|
||||||
$scope.servers_search = "";
|
$scope.servers_search = "";
|
||||||
$scope.servers_trigger_details = [];
|
$scope.servers_trigger_details = [];
|
||||||
$scope.filtered
|
$scope.filtered;
|
||||||
|
|
||||||
var api = '/api/org.rootprojects.tunnel/servers'
|
var api = "/api/org.rootprojects.tunnel/servers";
|
||||||
|
|
||||||
$scope.updateView = function() {
|
$scope.updateView = function () {
|
||||||
$http.get(api).then(function(response) {
|
$http.get(api).then(function (response) {
|
||||||
//console.log(response);
|
//console.log(response);
|
||||||
data = response.data;
|
data = response.data;
|
||||||
if (data.error == 'ok' ){
|
if (data.error == "ok") {
|
||||||
$scope.servers = data.result.servers;
|
$scope.servers = data.result.servers;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
$scope.triggerDetail = function(id) {
|
$scope.triggerDetail = function (id) {
|
||||||
//console.log("triggerDetail ", id, $scope.servers_trigger_details[id])
|
//console.log("triggerDetail ", id, $scope.servers_trigger_details[id])
|
||||||
if ($scope.servers_trigger_details[id] == true) {
|
if ($scope.servers_trigger_details[id] == true) {
|
||||||
$scope.servers_trigger_details[id] = false;
|
$scope.servers_trigger_details[id] = false;
|
||||||
} else {
|
} else {
|
||||||
$scope.servers_trigger_details[id] = true
|
$scope.servers_trigger_details[id] = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.checkDetail = function(id) {
|
$scope.checkDetail = function (id) {
|
||||||
//console.log("checkDetail ", id, $scope.servers_trigger_details[id])
|
//console.log("checkDetail ", id, $scope.servers_trigger_details[id])
|
||||||
if ($scope.servers_trigger_details[id] == true) {
|
if ($scope.servers_trigger_details[id] == true) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.updateView()
|
$scope.updateView();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,32 @@
|
||||||
// Avoid `console` errors in browsers that lack a console.
|
// Avoid `console` errors in browsers that lack a console.
|
||||||
(function() {
|
(function () {
|
||||||
var method;
|
var method;
|
||||||
var noop = function () {};
|
var noop = function () {};
|
||||||
var methods = [
|
var methods = [
|
||||||
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
|
"assert",
|
||||||
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
|
"clear",
|
||||||
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
|
"count",
|
||||||
'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn'
|
"debug",
|
||||||
|
"dir",
|
||||||
|
"dirxml",
|
||||||
|
"error",
|
||||||
|
"exception",
|
||||||
|
"group",
|
||||||
|
"groupCollapsed",
|
||||||
|
"groupEnd",
|
||||||
|
"info",
|
||||||
|
"log",
|
||||||
|
"markTimeline",
|
||||||
|
"profile",
|
||||||
|
"profileEnd",
|
||||||
|
"table",
|
||||||
|
"time",
|
||||||
|
"timeEnd",
|
||||||
|
"timeline",
|
||||||
|
"timelineEnd",
|
||||||
|
"timeStamp",
|
||||||
|
"trace",
|
||||||
|
"warn"
|
||||||
];
|
];
|
||||||
var length = methods.length;
|
var length = methods.length;
|
||||||
var console = (window.console = window.console || {});
|
var console = (window.console = window.console || {});
|
||||||
|
@ -19,6 +39,6 @@
|
||||||
console[method] = noop;
|
console[method] = noop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}());
|
})();
|
||||||
|
|
||||||
// Place any jQuery/helper plugins in here.
|
// Place any jQuery/helper plugins in here.
|
||||||
|
|
|
@ -1,148 +1,165 @@
|
||||||
// ### filter.js >>
|
// ### filter.js >>
|
||||||
|
|
||||||
angular
|
angular.module("angular-duration-format.filter", []).filter("duration", function () {
|
||||||
.module('angular-duration-format.filter', [ ])
|
|
||||||
.filter('duration', function() {
|
|
||||||
var DURATION_FORMATS_SPLIT = /((?:[^ydhms']+)|(?:'(?:[^']|'')*')|(?:y+|d+|h+|m+|s+))(.*)/;
|
var DURATION_FORMATS_SPLIT = /((?:[^ydhms']+)|(?:'(?:[^']|'')*')|(?:y+|d+|h+|m+|s+))(.*)/;
|
||||||
var DURATION_FORMATS = {
|
var DURATION_FORMATS = {
|
||||||
y: { // years
|
y: {
|
||||||
// "longer" years are not supported
|
// years
|
||||||
value: 365 * 24 * 60 * 60 * 1000,
|
// "longer" years are not supported
|
||||||
},
|
value: 365 * 24 * 60 * 60 * 1000
|
||||||
yy: {
|
},
|
||||||
value: 'y',
|
yy: {
|
||||||
pad: 2,
|
value: "y",
|
||||||
},
|
pad: 2
|
||||||
d: { // days
|
},
|
||||||
value: 24 * 60 * 60 * 1000,
|
d: {
|
||||||
},
|
// days
|
||||||
dd: {
|
value: 24 * 60 * 60 * 1000
|
||||||
value: 'd',
|
},
|
||||||
pad: 2,
|
dd: {
|
||||||
},
|
value: "d",
|
||||||
h: { // hours
|
pad: 2
|
||||||
value: 60 * 60 * 1000,
|
},
|
||||||
},
|
h: {
|
||||||
hh: { // padded hours
|
// hours
|
||||||
value: 'h',
|
value: 60 * 60 * 1000
|
||||||
pad: 2,
|
},
|
||||||
},
|
hh: {
|
||||||
m: { // minutes
|
// padded hours
|
||||||
value: 60 * 1000,
|
value: "h",
|
||||||
},
|
pad: 2
|
||||||
mm: { // padded minutes
|
},
|
||||||
value: 'm',
|
m: {
|
||||||
pad: 2,
|
// minutes
|
||||||
},
|
value: 60 * 1000
|
||||||
s: { // seconds
|
},
|
||||||
value: 1000,
|
mm: {
|
||||||
},
|
// padded minutes
|
||||||
ss: { // padded seconds
|
value: "m",
|
||||||
value: 's',
|
pad: 2
|
||||||
pad: 2,
|
},
|
||||||
},
|
s: {
|
||||||
sss: { // milliseconds
|
// seconds
|
||||||
value: 1,
|
value: 1000
|
||||||
},
|
},
|
||||||
ssss: { // padded milliseconds
|
ss: {
|
||||||
value: 'sss',
|
// padded seconds
|
||||||
pad: 4,
|
value: "s",
|
||||||
},
|
pad: 2
|
||||||
|
},
|
||||||
|
sss: {
|
||||||
|
// milliseconds
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
|
ssss: {
|
||||||
|
// padded milliseconds
|
||||||
|
value: "sss",
|
||||||
|
pad: 4
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function _parseFormat(string) {
|
function _parseFormat(string) {
|
||||||
// @inspiration AngularJS date filter
|
// @inspiration AngularJS date filter
|
||||||
var parts = [];
|
var parts = [];
|
||||||
var format = string ? string.toString() : '';
|
var format = string ? string.toString() : "";
|
||||||
|
|
||||||
while (format) {
|
while (format) {
|
||||||
var match = DURATION_FORMATS_SPLIT.exec(format);
|
var match = DURATION_FORMATS_SPLIT.exec(format);
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
parts = parts.concat(match.slice(1));
|
parts = parts.concat(match.slice(1));
|
||||||
|
|
||||||
format = parts.pop();
|
format = parts.pop();
|
||||||
} else {
|
} else {
|
||||||
parts.push(format);
|
parts.push(format);
|
||||||
|
|
||||||
format = null;
|
format = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return parts;
|
return parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function _formatDuration(timestamp, format) {
|
function _formatDuration(timestamp, format) {
|
||||||
var text = '';
|
var text = "";
|
||||||
var values = { };
|
var values = {};
|
||||||
|
|
||||||
format.filter(function(format) { // filter only value parts of format
|
format
|
||||||
return DURATION_FORMATS.hasOwnProperty(format);
|
.filter(function (format) {
|
||||||
}).map(function(format) { // get formats with values only
|
// filter only value parts of format
|
||||||
var config = DURATION_FORMATS[format];
|
return DURATION_FORMATS.hasOwnProperty(format);
|
||||||
|
})
|
||||||
|
.map(function (format) {
|
||||||
|
// get formats with values only
|
||||||
|
var config = DURATION_FORMATS[format];
|
||||||
|
|
||||||
if (config.hasOwnProperty('pad')) {
|
if (config.hasOwnProperty("pad")) {
|
||||||
return config.value;
|
return config.value;
|
||||||
} else {
|
} else {
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
}).filter(function(format, index, arr) { // remove duplicates
|
})
|
||||||
return (arr.indexOf(format) === index);
|
.filter(function (format, index, arr) {
|
||||||
}).map(function(format) { // get format configurations with values
|
// remove duplicates
|
||||||
return angular.extend({
|
return arr.indexOf(format) === index;
|
||||||
name: format,
|
})
|
||||||
}, DURATION_FORMATS[format]);
|
.map(function (format) {
|
||||||
}).sort(function(a, b) { // sort formats descending by value
|
// get format configurations with values
|
||||||
return b.value - a.value;
|
return angular.extend(
|
||||||
}).forEach(function(format) { // create values for format parts
|
{
|
||||||
var value = values[format.name] = Math.floor(timestamp / format.value);
|
name: format
|
||||||
|
},
|
||||||
|
DURATION_FORMATS[format]
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.sort(function (a, b) {
|
||||||
|
// sort formats descending by value
|
||||||
|
return b.value - a.value;
|
||||||
|
})
|
||||||
|
.forEach(function (format) {
|
||||||
|
// create values for format parts
|
||||||
|
var value = (values[format.name] = Math.floor(timestamp / format.value));
|
||||||
|
|
||||||
timestamp = timestamp - (value * format.value);
|
timestamp = timestamp - value * format.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
format.forEach(function(part) {
|
format.forEach(function (part) {
|
||||||
var format = DURATION_FORMATS[part];
|
var format = DURATION_FORMATS[part];
|
||||||
|
|
||||||
if (format) {
|
if (format) {
|
||||||
var value = values[format.value];
|
var value = values[format.value];
|
||||||
|
|
||||||
text += (format.hasOwnProperty('pad') ? _padNumber(value, Math.max(format.pad, value.toString().length)) : values[part]);
|
text += format.hasOwnProperty("pad")
|
||||||
} else {
|
? _padNumber(value, Math.max(format.pad, value.toString().length))
|
||||||
text += part.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
|
: values[part];
|
||||||
}
|
} else {
|
||||||
});
|
text += part.replace(/(^'|'$)/g, "").replace(/''/g, "'");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function _padNumber(number, len) {
|
function _padNumber(number, len) {
|
||||||
return ((new Array(len + 1)).join('0') + number).slice(-len);
|
return (new Array(len + 1).join("0") + number).slice(-len);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function(value, format) {
|
return function (value, format) {
|
||||||
var parsedValue = parseFloat(value, 10);
|
var parsedValue = parseFloat(value, 10);
|
||||||
var parsedFormat = _parseFormat(format);
|
var parsedFormat = _parseFormat(format);
|
||||||
|
|
||||||
if (isNaN(parsedValue) || (parsedFormat.length === 0)) {
|
if (isNaN(parsedValue) || parsedFormat.length === 0) {
|
||||||
return value;
|
return value;
|
||||||
} else {
|
} else {
|
||||||
return _formatDuration(parsedValue, parsedFormat);
|
return _formatDuration(parsedValue, parsedFormat);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// ### << filter.js
|
// ### << filter.js
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ### main.js >>
|
// ### main.js >>
|
||||||
|
|
||||||
angular
|
angular.module("angular-duration-format", ["angular-duration-format.filter"]);
|
||||||
.module('angular-duration-format', [
|
|
||||||
'angular-duration-format.filter',
|
|
||||||
]);
|
|
||||||
|
|
||||||
|
|
||||||
// ### << main.js
|
// ### << main.js
|
||||||
|
|
||||||
|
|
|
@ -1,89 +1,98 @@
|
||||||
<div class="panel panel-default" data-ng-controller="serverController">
|
<div class="panel panel-default" data-ng-controller="serverController">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<div class="panel-title">
|
<div class="panel-title">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
Servers
|
Servers
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<form class="form-inline pull-right">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="search">Search:</label>
|
||||||
|
<input type="text" class="form-control" id="search" data-ng-model="servers_search" />
|
||||||
|
</div>
|
||||||
|
<button type="button" title="Refresh" class="btn btn-default" aria-label="Refresh">
|
||||||
|
<span
|
||||||
|
class="glyphicon glyphicon-refresh"
|
||||||
|
title="Refresh"
|
||||||
|
aria-hidden="false"
|
||||||
|
ng-click="updateView()"
|
||||||
|
></span>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
</div>
|
||||||
<form class="form-inline pull-right">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="search">Search:</label>
|
|
||||||
<input type="text" class="form-control" id="search" data-ng-model="servers_search">
|
|
||||||
</div>
|
|
||||||
<button type="button" title="Refresh" class="btn btn-default" aria-label="Refresh">
|
|
||||||
<span class="glyphicon glyphicon-refresh" title="Refresh" aria-hidden="false" ng-click="updateView()"></span>
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<table class="table table-striped table-bordered">
|
<table class="table table-striped table-bordered">
|
||||||
<th width="3%">ID</th>
|
<th width="3%">ID</th>
|
||||||
<th width="10%">Name</th>
|
<th width="10%">Name</th>
|
||||||
<th width="10%">Address</th>
|
<th width="10%">Address</th>
|
||||||
<th width="10%">Xfer (in/out)</th>
|
<th width="10%">Xfer (in/out)</th>
|
||||||
<th width="10%">Req/Resp</th>
|
<th width="10%">Req/Resp</th>
|
||||||
<th width="5%">Duration</th>
|
<th width="5%">Duration</th>
|
||||||
<th width="5%">State</th>
|
<th width="5%">State</th>
|
||||||
<th width="5%">Idle</th>
|
<th width="5%">Idle</th>
|
||||||
<th width="1%"><center><span class="glyphicon glyphicon-option-vertical" aria-hidden="true"></span></center></th>
|
<th width="1%">
|
||||||
|
<center><span class="glyphicon glyphicon-option-vertical" aria-hidden="true"></span></center>
|
||||||
|
</th>
|
||||||
|
|
||||||
<tr ng-repeat="s in servers | filter:servers_search | orderBy:'server_id'">
|
<tr ng-repeat="s in servers | filter:servers_search | orderBy:'server_id'">
|
||||||
<td>{{ s.server_id }}</td>
|
<td>{{ s.server_id }}</td>
|
||||||
<td>{{ s.server_name }}</td>
|
<td>{{ s.server_name }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ s.source_address }}
|
{{ s.source_address }}
|
||||||
<div ng-hide="checkDetail(s.server_id)">
|
<div ng-hide="checkDetail(s.server_id)">
|
||||||
domains({{ s.domains.length}})
|
domains({{ s.domains.length}})
|
||||||
<div ng-repeat="d in s.domains | orderBy:'domain_name'">
|
<div ng-repeat="d in s.domains | orderBy:'domain_name'">
|
||||||
   {{ d.domain_name }}
|
   {{ d.domain_name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ s.bytes_in | bytes }}/{{ s.bytes_out | bytes }}
|
{{ s.bytes_in | bytes }}/{{ s.bytes_out | bytes }}
|
||||||
<div ng-hide="checkDetail(s.server_id)">
|
<div ng-hide="checkDetail(s.server_id)">
|
||||||
 
|
 
|
||||||
<div ng-repeat="d in s.domains | orderBy:'domain_name'">
|
<div ng-repeat="d in s.domains | orderBy:'domain_name'">
|
||||||
   {{ d.bytes_in | bytes }}/{{ d.bytes_out | bytes }}
|
   {{ d.bytes_in | bytes }}/{{ d.bytes_out | bytes }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ s.requests }}/{{ s.responses }}
|
{{ s.requests }}/{{ s.responses }}
|
||||||
<div ng-hide="checkDetail(s.server_id)">
|
<div ng-hide="checkDetail(s.server_id)">
|
||||||
 
|
 
|
||||||
<div ng-repeat="d in s.domains | orderBy:'domain_name'">
|
<div ng-repeat="d in s.domains | orderBy:'domain_name'">
|
||||||
   {{ d.requests }}/{{ d.responses }}
|
   {{ d.requests }}/{{ d.responses }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>{{ s.duration | hfcduration }}</td>
|
<td>{{ s.duration | hfcduration }}</td>
|
||||||
<td>{{ s.server_state }}</td>
|
<td>{{ s.server_state }}</td>
|
||||||
<td>{{ s.idle | hfcduration }}</td>
|
<td>{{ s.idle | hfcduration }}</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="glyphicon glyphicon-zoom-in" title="Detail" aria-hidden="false" ng-click="triggerDetail(s.server_id)"></span>
|
<span
|
||||||
<div ng-hide="checkDetail(s.server_id)">
|
class="glyphicon glyphicon-zoom-in"
|
||||||
 
|
title="Detail"
|
||||||
<div ng-repeat="d in s.domains | orderBy:'domain_name'">
|
aria-hidden="false"
|
||||||
<span class="glyphicon glyphicon-zoom-in" title="Detail" aria-hidden="false" ng-click="triggerDetail(s.server_id+d.domain_name)"></span>
|
ng-click="triggerDetail(s.server_id)"
|
||||||
</div>
|
></span>
|
||||||
</div>
|
<div ng-hide="checkDetail(s.server_id)">
|
||||||
|
 
|
||||||
|
<div ng-repeat="d in s.domains | orderBy:'domain_name'">
|
||||||
</td>
|
<span
|
||||||
</tr>
|
class="glyphicon glyphicon-zoom-in"
|
||||||
|
title="Detail"
|
||||||
</table>
|
aria-hidden="false"
|
||||||
|
ng-click="triggerDetail(s.server_id+d.domain_name)"
|
||||||
|
></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,46 +1,52 @@
|
||||||
<div class="panel panel-default" data-ng-controller="statusController">
|
<div class="panel panel-default" data-ng-controller="statusController">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<div class="panel-title">
|
<div class="panel-title">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
Status
|
Status
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<form class="form-inline pull-right">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="search">Search:</label>
|
||||||
|
<input type="text" class="form-control" id="search" data-ng-model="servers_search" />
|
||||||
|
</div>
|
||||||
|
<button type="button" title="Refresh" class="btn btn-default" aria-label="Refresh">
|
||||||
|
<span
|
||||||
|
class="glyphicon glyphicon-refresh"
|
||||||
|
title="Refresh"
|
||||||
|
aria-hidden="false"
|
||||||
|
ng-click="updateView()"
|
||||||
|
></span>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
</div>
|
||||||
<form class="form-inline pull-right">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="search">Search:</label>
|
|
||||||
<input type="text" class="form-control" id="search" data-ng-model="servers_search">
|
|
||||||
</div>
|
|
||||||
<button type="button" title="Refresh" class="btn btn-default" aria-label="Refresh">
|
|
||||||
<span class="glyphicon glyphicon-refresh" title="Refresh" aria-hidden="false" ng-click="updateView()"></span>
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4"> </div>
|
<div class="col-md-4"></div>
|
||||||
<div class="col-md-8">Server Name: {{ status.name }} (Uptime: {{ status.uptime | hfcduration }}</div>
|
<div class="col-md-8">Server Name: {{ status.name }} (Uptime: {{ status.uptime | hfcduration }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4"> </div>
|
<div class="col-md-4"></div>
|
||||||
<div class="col-md-8">Administrative Domain: {{ status.admin_domain }} </div>
|
<div class="col-md-8">Administrative Domain: {{ status.admin_domain }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4"> </div>
|
<div class="col-md-4"></div>
|
||||||
<div class="col-md-8">Server Domain: {{ status.wss_domain }} </div>
|
<div class="col-md-8">Server Domain: {{ status.wss_domain }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4"> </div>
|
<div class="col-md-4"></div>
|
||||||
<div class="col-md-8">Default LB Method: {{ status.loadbalance_default_method }} </div>
|
<div class="col-md-8">Default LB Method: {{ status.loadbalance_default_method }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4"> </div>
|
<div class="col-md-4"></div>
|
||||||
<div class="col-md-8">Deadtime: dwell:{{ status.dead_time.dwell}} idle:{{ status.dead_time.idle}} cancel:{{ status.dead_time.cancel_check}}</div>
|
<div class="col-md-8">
|
||||||
|
Deadtime: dwell:{{ status.dead_time.dwell}} idle:{{ status.dead_time.idle}} cancel:{{
|
||||||
|
status.dead_time.cancel_check}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Docker Deployment for RVPN
|
# Docker Deployment for RVPN
|
||||||
|
|
||||||
- install docker 1.13, or the latest stable CE release (Testing on MAC using 17.03.0-ce-mac1 (15583))
|
- install docker 1.13, or the latest stable CE release (Testing on MAC using 17.03.0-ce-mac1 (15583))
|
||||||
- validate installation
|
- validate installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
hcamacho@Hanks-MBP:rvpn-docker $ docker-compose --version
|
hcamacho@Hanks-MBP:rvpn-docker $ docker-compose --version
|
||||||
|
@ -10,7 +10,8 @@ docker-compose version 1.11.2, build dfed245
|
||||||
hcamacho@Hanks-MBP:rvpn-docker $ docker --version
|
hcamacho@Hanks-MBP:rvpn-docker $ docker --version
|
||||||
Docker version 17.03.0-ce, build 60ccb22
|
Docker version 17.03.0-ce, build 60ccb22
|
||||||
```
|
```
|
||||||
- checkout code into gopath
|
|
||||||
|
- checkout code into gopath
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd $GOPATH/src/git.coolaj86.com/coolaj86
|
cd $GOPATH/src/git.coolaj86.com/coolaj86
|
||||||
|
@ -23,7 +24,7 @@ go get
|
||||||
|
|
||||||
## Execute Container Deployment
|
## Execute Container Deployment
|
||||||
|
|
||||||
- prep
|
- prep
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd rvpn-docker
|
cd rvpn-docker
|
||||||
|
@ -42,7 +43,7 @@ Successfully built 182aa9c814f2
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- execute container
|
- execute container
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
hcamacho@Hanks-MBP:rvpn-docker $ docker-compose up
|
hcamacho@Hanks-MBP:rvpn-docker $ docker-compose up
|
||||||
|
@ -87,6 +88,3 @@ rvpn_1 | INFO: genericlistener: 2017/03/04 18:13:02.270281 connection.go:242: W
|
||||||
```
|
```
|
||||||
|
|
||||||
The line "Connection Registration Accepted indicates a client WSS registered, was authenticated and registered its domains with the RVPN
|
The line "Connection Registration Accepted indicates a client WSS registered, was authenticated and registered its domains with the RVPN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue