mirror of https://github.com/lukechilds/Agama.git
3 changed files with 70 additions and 2 deletions
@ -0,0 +1,68 @@ |
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
|||
<html> |
|||
<head> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
|||
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script> |
|||
<script type="text/javascript" src="EasyDEX-GUI/assets/global/vendor/jquery/jquery.min.js"></script> |
|||
<script>if (window.module) module = window.module;</script> |
|||
</head> |
|||
<body> |
|||
<script type"text/javascript"> |
|||
function Iguana_activehandle() { |
|||
var result = []; |
|||
//comment |
|||
var ajax_data = {"agent":"SuperNET","method":"activehandle"}; |
|||
//console.log(ajax_data); |
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:7778', |
|||
//dataType: 'text', |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
//console.log('== ActiveHandle Data OutPut =='); |
|||
//console.log(AjaxOutputData); |
|||
result.push(AjaxOutputData); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
//Iguana_ServiceUnavailable(); |
|||
result.push('error') |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
//return 'Executed Iguana_activehandle. Check Iguana_activehandle_output var value.'; |
|||
return result; |
|||
} |
|||
$(document).ready( function() { |
|||
//var check = Iguana_activehandle(); |
|||
//console.log(check[0]) // here I invoke the checking function |
|||
const remote = require('electron').remote; |
|||
var window = remote.getCurrentWindow(); |
|||
|
|||
var portcheck; |
|||
function sartcheck() { |
|||
portcheck = setTimeout(function(){ |
|||
var check = Iguana_activehandle(); |
|||
console.log(check[0]) |
|||
if (check[0] !== 'error') { |
|||
stopcheck(); |
|||
window.close(); |
|||
} |
|||
},2000); |
|||
} |
|||
|
|||
function stopcheck() { |
|||
clearTimeout(portcheck); |
|||
} |
|||
sartcheck(); |
|||
//setTimeout(function(){ window.close(); }, 15000); |
|||
}); |
|||
</script> |
|||
<div style="text-align: center;"><img src="loading.gif"></div> |
|||
</body> |
|||
</html> |
After Width: | Height: | Size: 54 KiB |
Loading…
Reference in new issue