From 42e81fb145ee9b8c120b6f1edb07f466e242c36f Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 4 Mar 2024 09:24:18 +0200 Subject: Following the changes to the API --- src/index.html | 8 ++++---- src/js/arching-kaos-stellar-network.js | 6 +++--- src/js/arching-kaos-tools.js | 18 +++++++++--------- src/js/arching-kaos-web-ui-settings.js | 2 +- src/js/environment-setup.js | 4 ++-- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/index.html b/src/index.html index 2bf3302..9b6c264 100644 --- a/src/index.html +++ b/src/index.html @@ -54,7 +54,7 @@ - + @@ -108,9 +108,9 @@

Data

No data found (yet?)! -
-

AKID

- No data found (yet?)! +
+

Node Info

+ No data found (yet?)!

Stellar dashboard

diff --git a/src/js/arching-kaos-stellar-network.js b/src/js/arching-kaos-stellar-network.js index 77d1477..6d71a0d 100644 --- a/src/js/arching-kaos-stellar-network.js +++ b/src/js/arching-kaos-stellar-network.js @@ -116,7 +116,7 @@ function putit(i){ } } -async function fetchAKIDFromClientWallet(stellarAddress){ +async function fetchNodeInfoFromClientWallet(stellarAddress){ archingKaosLog("Loading your profile..."); fetch(getStellarConfigurationVariableURL(stellarAddress), { method:'GET', @@ -150,7 +150,7 @@ function putKeyToField(k){ // if (stellar_connection_status === 1 ){ // document.querySelector("#stellar-balances-link").hidden=false; // document.querySelector("#stellar-data-config-link").hidden=false; -// document.querySelector("#arching-kaos-id-link").hidden=false; +// document.querySelector("#arching-kaos-node-info-link").hidden=false; // document.querySelector("#mypage-section-link").hidden=false; // } //} @@ -163,7 +163,7 @@ function putKeyToField(k){ //function hideStellar(){ // document.querySelector("#stellar-balances-link").hidden=true; // document.querySelector("#stellar-data-config-link").hidden=true; -// document.querySelector("#arching-kaos-id-link").hidden=true; +// document.querySelector("#arching-kaos-node-info-link").hidden=true; // document.querySelector("#mypage-section-link").hidden=true; //} // diff --git a/src/js/arching-kaos-tools.js b/src/js/arching-kaos-tools.js index fc1fe23..904f21f 100644 --- a/src/js/arching-kaos-tools.js +++ b/src/js/arching-kaos-tools.js @@ -18,7 +18,7 @@ function renderStellarAddressPlaceholder(stellarAddress){ return divs; } -function akidRender(json, stellarAddress){ +function nodeInfoRender(json, stellarAddress){ var divs = renderStellarAddressPlaceholder(stellarAddress); for( key in Object.keys(json) ){ if ( typeof(json[Object.keys(json)[key]]) === "string" ) { @@ -30,13 +30,13 @@ function akidRender(json, stellarAddress){ } } else if ( typeof(json[Object.keys(json)[key]]) === "Object"||"Array" ) { - akidRender(json[Object.keys(json)[key]], stellarAddress); + nodeInfoRender(json[Object.keys(json)[key]], stellarAddress); } } } -function akidRenderAndProceed(json, stellarAddress){ - akidRender(json, stellarAddress); +function nodeInfoRenderAndProceed(json, stellarAddress){ + nodeInfoRender(json, stellarAddress); participants[stellarAddress]=json; if ( stellarParticipantsScanned === 0 ) { archingKaosLog('END'); @@ -147,10 +147,10 @@ function getNicknameAssossiatedWithGPG(gpgIPFSHash){ } } -function getConfiguration(akidIPNSLink,stellarAddress){ +function getConfiguration(nodeInfoIPNSLink,stellarAddress){ progressPlaceholder.max++; archingKaosLog("Parsing the configuration...") - archingKaosFetchJSON(getIPNSURL(akidIPNSLink), akidRenderAndProceed, stellarAddress) + archingKaosFetchJSON(getIPNSURL(nodeInfoIPNSLink), nodeInfoRenderAndProceed, stellarAddress) } function zseek(zchainIPNSLink,stellarAddress,j){ @@ -255,10 +255,10 @@ function getNicknameAssossiatedWithGPG(gpgIPFSHash){ return gpgIPFSHash; } -function getConfiguration(akidIPNSLink,stellarAddress){ +function getConfiguration(nodeInfoIPNSLink,stellarAddress){ progressPlaceholder.max++; archingKaosLog("Parsing the configuration...") - archingKaosFetchJSON(getIPNSURL(akidIPNSLink), akidRenderAndProceed, stellarAddress) + archingKaosFetchJSON(getIPNSURL(nodeInfoIPNSLink), nodeInfoRenderAndProceed, stellarAddress) } function zseek(zchainIPNSLink,stellarAddress,j){ @@ -496,7 +496,7 @@ function checkIfChainAndProceed(json){ async function ringlocalbell(){ archingKaosLog("Ringing local bell..."); - var url=activeSettings.localAPI+'/v0/akid'; + var url=activeSettings.localAPI+'/v0/node_info'; archingKaosFetchJSON(url, checkIfChainAndProceed); archingKaosLog("Ringing local bell... Done!"); } diff --git a/src/js/arching-kaos-web-ui-settings.js b/src/js/arching-kaos-web-ui-settings.js index c7bb26f..601c176 100644 --- a/src/js/arching-kaos-web-ui-settings.js +++ b/src/js/arching-kaos-web-ui-settings.js @@ -8,7 +8,7 @@ * - ipfs gateway to use for retrieving ipfs parts (can change targeted swarm) * - ring to local node (must running API locally see ../arching-kaos-tools * repo) - * - have a follow akid/zchain list and load these + * - have a follow nodeInfo/zchain list and load these * - depth of retrieving at once (per zchain) (ak-enter -l X -n ) * * TODO: Make up a configuration item as well but there we could store locally diff --git a/src/js/environment-setup.js b/src/js/environment-setup.js index 3b9733c..cd698d4 100644 --- a/src/js/environment-setup.js +++ b/src/js/environment-setup.js @@ -13,7 +13,7 @@ var references = []; var zblocks = new Array; var blocks = new Array; var data = new Array; -var akid = new Array; +var nodeInfo = new Array; var body = document.querySelector('body'); var pageLayout = document.querySelector('.page-layout'); var mainContainer = document.querySelector('.main'); @@ -37,7 +37,7 @@ var menuids = [ '#mypage-section', '#stellar-balances', '#stellar-data-config', - '#arching-kaos-id', + '#arching-kaos-node-info', '#files-section', '#settings-section', '#stellar-section', -- cgit v1.2.3