added angular filters for classes

This commit is contained in:
Marian Oancea
2015-01-29 18:50:16 +02:00
parent 5114d05c32
commit 3dd2e34371
5 changed files with 43 additions and 60 deletions

View File

@@ -52,8 +52,7 @@ block content
div.clearfix
div.col-sm-12
h1= title
p Welcome to #{title}
h1 Nodes in detail
table.table.table-striped
thead
@@ -77,55 +76,11 @@ block content
tr(ng-repeat='node in nodes', class="{{ node.stats.active ? 'text-success' : 'text-danger' }}")
td(rel="{{node.id}}") {{node.name}}
td {{node.type}}
td {{node.stats.peers}}
td(class="{{(node.stats.mining === false) ? 'text-danger' : 'text-success'}}")
i(class="{{(node.stats.mining === false) ? 'icon-cancel' : 'icon-check'}}")
td {{'#' + node.stats.block.height}}
td.hidden-sm.hidden-xs
td(class="{{ node.stats.peers | peerClass }}") {{node.stats.peers}}
td(class="{{ node.stats.mining | miningClass }}")
i(class="{{ node.stats.mining | miningIconClass }}")
td(class="{{ node.stats.block.height | blockClass : bestBlock }}") {{'#' + node.stats.block.height}}
td(class="{{ node.stats.block.height | blockClass : bestBlock }}").hidden-sm.hidden-xs
span.small {{node.stats.block.hash}}
td(am-time-ago="node.stats.block.timestamp", am-preprocess="unix")
td 100%
//- tr.text-success
//- td poc-7.ethdev.com
//- td C++
//- td 7
//- td
//- i.icon-check
//- td #8196
//- td.hidden-sm.hidden-xs
//- span.small 06d1a2c709f23678e716ae8bea400161815a37a16aeced3a4ffed79b96f63566
//- td 16 sec
//- td 98.3%
//- tr.text-warning
//- td poc-6.ethdev.com
//- td C++
//- td 4
//- td
//- i.icon-warning-o
//- td #8186
//- td.hidden-sm.hidden-xs
//- span.small 1545f88598e54e56ec5570b08c592f8c8403e3e1c9ec0eec2f9ba619729ec85e
//- td 3 min
//- td 94.1%
//- tr.text-danger
//- td poc-5.ethdev.com
//- td C++
//- td 0
//- td
//- i.icon-cancel
//- td #3196
//- td.hidden-sm.hidden-xs
//- span.small 45f4e588bf9a03ba0d7146dd83a6a8faf00df471d7484b92d904b77014d10e01
//- td 2 days
//- td 79.4%
//- tr.text-danger
//- td poc-4.ethdev.com
//- td C++
//- td 0
//- td
//- i.icon-cancel
//- td #1196
//- td.hidden-sm.hidden-xs
//- span.small 36d6fe290d52da4518f9017fa7b5dd407007053e345463e7a6fdc905b8d9b2a3
//- td 1 mon
//- td 21.8%
td {{ node.stats.active ? '100%' : '0%' }}