typos
This commit is contained in:
parent
9a1a609fcd
commit
1926c3bcd6
File diff suppressed because one or more lines are too long
|
@ -104,20 +104,20 @@ select.interface {
|
|||
<script type="text/javascript">
|
||||
last_change="";
|
||||
$(function() {
|
||||
ajax("ajax", {"action":"get-remotes"} );
|
||||
ajax({"action":"get-remotes"} );
|
||||
});
|
||||
|
||||
function ajax(server, action){
|
||||
function ajax(action){
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: 'http://'+server+'/ajax',
|
||||
url: '/ajax',
|
||||
data: JSON.stringify(action),
|
||||
error:function(msg){
|
||||
console.log( 'Error !: (' + msg.responseText + ')' );
|
||||
},
|
||||
success:function(data){
|
||||
if (action["action"] == "get-remotes") {
|
||||
refresh(server, data);
|
||||
refresh(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -125,28 +125,28 @@ select.interface {
|
|||
|
||||
function vpn_restart(pid) {
|
||||
if(confirm("are you sure you want to restart this session ?")) {
|
||||
ajax(server, {action: 'restart', params: {session: pid}});
|
||||
ajax({action: 'restart', params: {session: pid}});
|
||||
}
|
||||
}
|
||||
|
||||
function vpn_kill(pid) {
|
||||
if(confirm("are you sure you want to kill this openvpn client ?")) {
|
||||
ajax(server, {action: 'kill', params: {session: pid}});
|
||||
ajax({action: 'kill', params: {session: pid}});
|
||||
}
|
||||
}
|
||||
|
||||
function server_change(pid) {
|
||||
ajax(server, {action: 'set-remote', params: {server: $('#server_'+pid).val() , session: pid}});
|
||||
ajax({action: 'set-remote', params: {server: $('#server_'+pid).val() , session: pid}});
|
||||
}
|
||||
|
||||
function auth(pid) {
|
||||
ajax(server, {action: "auth-user-pass", params:{session: pid,
|
||||
ajax({action: "auth-user-pass", params:{session: pid,
|
||||
user:$('#auth_'+pid+'>input.user').val(),
|
||||
password:$('#auth_'+pid+'>input.pass').val()}});
|
||||
}
|
||||
|
||||
function refresh(server, data) {
|
||||
setTimeout(function(){ ajax(server, {"action":"get-remotes"} )}, 3000);
|
||||
function refresh(data) {
|
||||
setTimeout(function(){ ajax({"action":"get-remotes"} )}, 3000);
|
||||
if (data["last_change"] == last_change) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue