mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-22 20:55:50 +00:00
[FEATURE] rippled apitool - better reporting of connection status
This commit is contained in:
@@ -61,7 +61,13 @@ var urlParams;
|
|||||||
});
|
});
|
||||||
|
|
||||||
remote.on('connect', function() {
|
remote.on('connect', function() {
|
||||||
set_online_state('connected');
|
var msg = "connected";
|
||||||
|
if (remote._servers.length === 1) {
|
||||||
|
msg = "connected to "+remote._servers[0].getHostID();
|
||||||
|
} else if (remote._servers.length > 1) {
|
||||||
|
msg = "connected to "+remote._servers.length+" servers";
|
||||||
|
}
|
||||||
|
set_online_state(msg);
|
||||||
});
|
});
|
||||||
|
|
||||||
/* ---- ---- ---- ---- ---- */
|
/* ---- ---- ---- ---- ---- */
|
||||||
@@ -699,11 +705,7 @@ var urlParams;
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
remote.connect(init);
|
remote.connect(init);
|
||||||
} catch {
|
|
||||||
alert("Can't connect. Maybe blocked by cross-origin-scripting protections?");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window.location.hash) {
|
if (window.location.hash) {
|
||||||
var cmd = window.location.hash.slice(1).toLowerCase();
|
var cmd = window.location.hash.slice(1).toLowerCase();
|
||||||
|
|||||||
Reference in New Issue
Block a user