From e4be1756ece009e25c893d5aeeb6062d14d914c7 Mon Sep 17 00:00:00 2001 From: Petr Balashov Date: Fri, 10 Feb 2017 13:47:01 +0100 Subject: [PATCH] config api update --- gui/index.html | 11 +++++------ gui/loading.js | 11 ++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gui/index.html b/gui/index.html index d49283e..9fb7eee 100644 --- a/gui/index.html +++ b/gui/index.html @@ -28,7 +28,7 @@ }); const remote = require('electron').remote; var window = remote.getCurrentWindow(); - $('#loading_status_text').text('Starting Iguana daemon...') + $('#loading_status_text').text('Starting Iguana daemon...'); var appConf = GetAppConf(); if (appConf && !appConf.manualIguanaStart) { @@ -43,9 +43,9 @@ console.log(result) if (result !== 'error') { stopcheck(); - $('#loading_status_text').text('Connecting to Basilisk Network...') - EDEX_DEXgetinfoAll() - //window.close(); + $('#loading_status_text').text('Connecting to Basilisk Network...'); + EDEX_DEXgetinfoAll(); + window.close(); } }) //var check = Iguana_activehandle(); @@ -59,8 +59,7 @@ sartcheck(); //setTimeout(function(){ window.close(); }, 15000); } else { - $('#loading_status_text').text(appConf) - //window.close(); + window.close(); } }); diff --git a/gui/loading.js b/gui/loading.js index 9c8a360..c7de516 100644 --- a/gui/loading.js +++ b/gui/loading.js @@ -65,15 +65,16 @@ function StartIguana() { function GetAppConf() { // get iguana app conf var ajax_data = {"herd":"iguana"}; + var data = false; console.log(ajax_data); $.ajax({ async: false, type: 'GET', url: 'http://127.0.0.1:17777/shepherd/appconf' - }).done(function(data) { + }).done(function(_data) { console.log('== App Conf Data OutPut =='); - console.log(data); - return data; + console.log(_data); + data = _data; }).fail(function(xhr, textStatus, error) { // handle request failures console.log(xhr.statusText); @@ -81,9 +82,9 @@ function GetAppConf() { // get iguana app conf } console.log(textStatus); console.log(error); - - return false; }); + + return data; } function EDEX_DEXnotarychains() {