Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kylmp committed Mar 25, 2018
1 parent fbd9038 commit 5c0e969
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion nanoRepStatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def load_page():

@app.route(root+"info")
def get_info():
version = (rpc.version()["node_vendor"])
version = rpc.version()["node_vendor"].split()[1]
acc_info = rpc.account_info(acc, True, True, True)
peers = len(rpc.peers())
blocks = rpc.block_count()
Expand Down
6 changes: 4 additions & 2 deletions static/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ $( document ).ready(function() {
});

function updateInfo(data) {
var weight = Math.round(data.weight/1000000000000000000000000000000);
var balance = Math.round(data.balance/1000000000000000000000000000000);
$('#account').html(data.account);
$('#representative').html(data.representative);
$('#balance').html(data.balance);
$('#weight').html(data.weight);
$('#balance').html(balance);
$('#weight').html(weight);
$('#peers').html(data.peers);
$('#blocks').html(data.blocks);
$('#unchecked').html(data.unchecked);
Expand Down
5 changes: 5 additions & 0 deletions static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ hr {
padding-bottom: 5px;
}

.prevent-overflow {
text-overflow: ellipsis;
overflow: hidden;
}

@media (max-width: 768px) {
.status {
text-align: left;
Expand Down
16 changes: 8 additions & 8 deletions templates/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@ <h4>Node Information:</h4>
<div class="table-container">
<div class="row">
<div class="col-6">Version</div>
<div id="version" class="col-6 pull-right">...</div>
<div id="version" class="col-6 pull-right prevent-overflow">...</div>
</div>
<hr>
<div class="row">
<div class="col-6">Blocks</div>
<div id="blocks" class="col-6 pull-right">...</div>
<div id="blocks" class="col-6 pull-right prevent-overflow">...</div>
</div>
<hr>
<div class="row">
<div class="col-6">Unchecked</div>
<div id="unchecked" class="col-6 pull-right">...</div>
<div id="unchecked" class="col-6 pull-right prevent-overflow">...</div>
</div>
<hr>
<div class="row last-item">
<div class="col-6">Peers</div>
<div id="peers" class="col-6 pull-right">...</div>
<div id="peers" class="col-6 pull-right prevent-overflow">...</div>
</div>
</div>
</div>
Expand All @@ -97,22 +97,22 @@ <h4>Account Information:</h4>
<div class="table-container">
<div class="row">
<div class="col-6">Account</div>
<div id="account" class="col-6 pull-right">...</div>
<div id="account" class="col-6 pull-right prevent-overflow">...</div>
</div>
<hr>
<div class="row">
<div class="col-6">Representative</div>
<div id="representative" class="col-6 pull-right">...</div>
<div id="representative" class="col-6 pull-right prevent-overflow">...</div>
</div>
<hr>
<div class="row">
<div class="col-6">Balance</div>
<div id="balance" class="col-6 pull-right">...</div>
<div id="balance" class="col-6 pull-right prevent-overflow">...</div>
</div>
<hr>
<div class="row last-item">
<div class="col-6">Vote Weight</div>
<div id="weight" class="col-6 pull-right">...</div>
<div id="weight" class="col-6 pull-right prevent-overflow">...</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 5c0e969

Please sign in to comment.