improved color code

This commit is contained in:
cubedro 2015-04-06 14:02:52 +03:00
parent 3c5bc2f239
commit f835ecf348
2 changed files with 9 additions and 5 deletions

View File

@ -80,14 +80,17 @@ angular.module('netStatsApp.filters', [])
if(block.number < bestBlock) if(block.number < bestBlock)
return 'text-gray'; return 'text-gray';
if(block.propagation == 0)
return 'text-info';
if(block.propagation < 1000) if(block.propagation < 1000)
return 'text-success'; return 'text-success';
if(block.propagation < 3000) if(block.propagation < 3000)
return 'text-info'; return 'text-warning';
if(block.propagation < 7000) if(block.propagation < 7000)
return 'text-warning'; return 'text-orange';
return 'text-danger' return 'text-danger'
}; };

View File

@ -12,9 +12,10 @@
$.fn.sparkline.defaults.bar.tooltipOffsetX = 0; $.fn.sparkline.defaults.bar.tooltipOffsetX = 0;
$.fn.sparkline.defaults.bar.tooltipFormat = $.spformat('<div class="tooltip-arrow" style="left: 50%;"></div><div class="tooltip-inner">{{prefix}}{{value}}{{suffix}}</div>'); $.fn.sparkline.defaults.bar.tooltipFormat = $.spformat('<div class="tooltip-arrow" style="left: 50%;"></div><div class="tooltip-inner">{{prefix}}{{value}}{{suffix}}</div>');
$.fn.sparkline.defaults.bar.colorMap = $.range_map({ $.fn.sparkline.defaults.bar.colorMap = $.range_map({
'1:12': '#7bcc3a', '0:5': '#10a0de',
'12:19': '#10a0de', '6:12': '#7bcc3a',
'20:29': '#FFD162', '13:19': '#FFD162',
'20:29': '#ff8a00',
'30:': '#F74B4B' '30:': '#F74B4B'
}); });