From f835ecf348dd0ad9317a2584e5a2f896f548426d Mon Sep 17 00:00:00 2001 From: cubedro Date: Mon, 6 Apr 2015 14:02:52 +0300 Subject: [PATCH] improved color code --- public/js/filters.js | 7 +++++-- public/js/script.js | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/public/js/filters.js b/public/js/filters.js index 7f368fc..f361756 100644 --- a/public/js/filters.js +++ b/public/js/filters.js @@ -80,14 +80,17 @@ angular.module('netStatsApp.filters', []) if(block.number < bestBlock) return 'text-gray'; + if(block.propagation == 0) + return 'text-info'; + if(block.propagation < 1000) return 'text-success'; if(block.propagation < 3000) - return 'text-info'; + return 'text-warning'; if(block.propagation < 7000) - return 'text-warning'; + return 'text-orange'; return 'text-danger' }; diff --git a/public/js/script.js b/public/js/script.js index 90f429f..f15bde6 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -12,9 +12,10 @@ $.fn.sparkline.defaults.bar.tooltipOffsetX = 0; $.fn.sparkline.defaults.bar.tooltipFormat = $.spformat('
{{prefix}}{{value}}{{suffix}}
'); $.fn.sparkline.defaults.bar.colorMap = $.range_map({ - '1:12': '#7bcc3a', - '12:19': '#10a0de', - '20:29': '#FFD162', + '0:5': '#10a0de', + '6:12': '#7bcc3a', + '13:19': '#FFD162', + '20:29': '#ff8a00', '30:': '#F74B4B' });