From 049e4ddab6f6d44e3d1c9395affcdecb03e32c26 Mon Sep 17 00:00:00 2001 From: Block Tester Date: Wed, 15 Jan 2014 23:22:27 +0000 Subject: [PATCH 1/4] Added mining hashrate and difficulty to status to the UI --- network.html | 16 ++++++++++++++++ twister_network.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/network.html b/network.html index 82053eb..d567910 100644 --- a/network.html +++ b/network.html @@ -154,6 +154,22 @@ +

Block generation status

+ +
+

General information

+ +
+ diff --git a/twister_network.js b/twister_network.js index 5fb144e..826d5a6 100644 --- a/twister_network.js +++ b/twister_network.js @@ -137,6 +137,32 @@ function networkUpdate(cbFunc, cbArg) { }); } +function getMiningInfo(cbFunc, cbArg) { + twisterRpc("getmininginfo", [], + function(args, ret) { + miningDifficulty = ret.difficulty; + miningHashRate = ret.hashespersec; + + $(".mining-difficulty").text(miningDifficulty); + $(".mining-hashrate").text(miningHashRate); +/* + if( !twisterdConnections ) { + $.MAL.setNetworkStatusMsg("Connection lost.", false); + twisterdConnectedAndUptodate = false; + } +*/ + if( args.cbFunc ) + args.cbFunc(args.cbArg); + }, {cbFunc:cbFunc, cbArg:cbArg}, + function(args, ret) { + console.log("Error connecting to local twister daemon."); + }, {}); +} + +function miningUpdate(cbFunc, cbArg) { + getMiningInfo(cbFunc, cbArg); +} + function getGenerate() { twisterRpc("getgenerate", [], function(args, ret) { @@ -216,6 +242,10 @@ function initInterfaceNetwork() { }); networkUpdate(); setInterval("networkUpdate()", 2000); + + miningUpdate(); + setInterval("miningUpdate()", 2000); + getGenerate(); interfaceNetworkHandlers(); From 85a8241d7911b6e1074fcf94c3e1c850188cce0d Mon Sep 17 00:00:00 2001 From: Block Tester Date: Wed, 15 Jan 2014 23:24:41 +0000 Subject: [PATCH 2/4] Moved generation status on the network page --- network.html | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/network.html b/network.html index d567910..38aae13 100644 --- a/network.html +++ b/network.html @@ -119,6 +119,18 @@ Fri Nov 08 2013 08:32:48 + +

Block generation status

+

Configure block generation

@@ -154,22 +166,6 @@ -

Block generation status

- -
-

General information

-
    -
  • - - 0.0 -
  • -
  • - - 0 -
  • -
-
- From 3136367fb2468ced205a8d7f622bdae9dbbf3ed3 Mon Sep 17 00:00:00 2001 From: Block Tester Date: Wed, 15 Jan 2014 23:28:47 +0000 Subject: [PATCH 3/4] Moved generation status on the network page again --- network.html | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/network.html b/network.html index 38aae13..a245426 100644 --- a/network.html +++ b/network.html @@ -118,19 +118,12 @@ Fri Nov 08 2013 08:32:48 - - -

Block generation status

-
  • - 0.0 -
  • -
  • - - 0 + 0.0
+

Configure block generation

@@ -164,6 +157,14 @@ + +

Block generation status

+
    +
  • + + 0 +
  • +
From fe5ad2177e5abfe250c7c1c386a9322ecb44da27 Mon Sep 17 00:00:00 2001 From: Block Tester Date: Thu, 16 Jan 2014 02:21:49 +0000 Subject: [PATCH 4/4] Fixed clicking on followed by @user link in suggestions. --- css/style.css | 3 ++- home.html | 4 +++- twister_following.js | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/css/style.css b/css/style.css index d32ff8f..bb8ec7e 100644 --- a/css/style.css +++ b/css/style.css @@ -624,7 +624,8 @@ button.disabled:hover font-size: 13px; cursor: pointer; } -.twister-user-name +.twister-user-name, +.twister-by-user-name { font-weight: bold; font-size: 14px; diff --git a/home.html b/home.html index 8f99a94..a24302e 100644 --- a/home.html +++ b/home.html @@ -174,7 +174,9 @@
Followed by - + + +
× diff --git a/twister_following.js b/twister_following.js index 5e3c98c..0192366 100644 --- a/twister_following.js +++ b/twister_following.js @@ -332,6 +332,7 @@ function processSuggestion(arg, suggestion, followedBy) { item.find(".twister-user-info").attr("data-screen-name", suggestion); item.find(".twister-user-name").attr("href", $.MAL.userUrl(suggestion)); + item.find(".twister-by-user-name").attr("href", $.MAL.userUrl(followedBy)); item.find(".twister-user-tag").text("@" + suggestion); getAvatar(suggestion,item.find(".twister-user-photo"));