Skip to content
Snippets Groups Projects
Unverified Commit 12f3390c authored by fireice-uk's avatar fireice-uk Committed by GitHub
Browse files

Merge pull request #2166 from Spudz76/dev-web-rigid

(web) Add Rig ID to connection status web (and cli)
parents 13b38b8c 5452725f
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,7 @@ extern const char sHtmlHashrateBodyLow [] =
extern const char sHtmlConnectionBodyHigh [] =
"<div class='data'>"
"<table>"
"<tr><th>Rig ID</th><td>%s</td></tr>"
"<tr><th>Pool address</th><td>%s</td></tr>"
"<tr><th>Connected since</th><td>%s</td></tr>"
"<tr><th>Pool ping time</th><td>%u ms</td></tr>"
......
......@@ -945,6 +945,7 @@ void executor::connection_report(std::string& out)
pool = pick_pool_by_id(last_usr_pool_id);
out.append("CONNECTION REPORT\n");
out.append("Rig ID : ").append(pool != nullptr ? pool->get_rigid() : "").append(1, '\n');
out.append("Pool address : ").append(pool != nullptr ? pool->get_pool_addr() : "<not connected>").append(1, '\n');
if(pool != nullptr && pool->is_running() && pool->is_logged_in())
out.append("Connected since : ").append(time_format(date, sizeof(date), tPoolConnTime)).append(1, '\n');
......@@ -1163,6 +1164,7 @@ void executor::http_connection_report(std::string& out)
}
snprintf(buffer, sizeof(buffer), sHtmlConnectionBodyHigh,
pool != nullptr ? pool->get_rigid() : "",
pool != nullptr ? pool->get_pool_addr() : "not connected",
cdate, ping_time);
out.append(buffer);
......
......@@ -58,6 +58,7 @@ public:
inline bool get_disconnects(size_t& att, size_t& time) { att = connect_attempts; time = disconnect_time != 0 ? get_timestamp() - disconnect_time + 1 : 0; return pool && usr_login[0]; }
inline const char* get_pool_addr() { return net_addr.c_str(); }
inline const char* get_tls_fp() { return tls_fp.c_str(); }
inline const char* get_rigid() { return usr_rigid.c_str(); }
inline bool is_nicehash() { return nicehash; }
bool get_pool_motd(std::string& strin);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment