diff --git a/src/sunstone/etc/sunstone-server.conf b/src/sunstone/etc/sunstone-server.conf index 53ce93ec2e..17a84e1f79 100644 --- a/src/sunstone/etc/sunstone-server.conf +++ b/src/sunstone/etc/sunstone-server.conf @@ -244,4 +244,9 @@ color: "#e1ef08" warning: time: "-86400" - color: "#ef2808" \ No newline at end of file + color: "#ef2808" + +# This change the thresholds of dashboard resource usage +:threshold_min: 0 +:threshold_low: 33 +:threshold_high: 66 \ No newline at end of file diff --git a/src/sunstone/public/app/sunstone-config.js b/src/sunstone/public/app/sunstone-config.js index dd0a3dc4c9..62f31fd3f5 100644 --- a/src/sunstone/public/app/sunstone-config.js +++ b/src/sunstone/public/app/sunstone-config.js @@ -176,6 +176,11 @@ define(function(require) { "allTabs": function() { return Object.keys(_config["view"]["tabs"]); + }, + "thresholds":{ + "min":_config["user_config"]["threshold_min"], + "low":_config["user_config"]["threshold_low"], + "high":_config["user_config"]["threshold_high"] } }; diff --git a/src/sunstone/public/app/tabs/hosts-tab/datatable.js b/src/sunstone/public/app/tabs/hosts-tab/datatable.js index 2c4c3aa801..94a1880d3f 100644 --- a/src/sunstone/public/app/tabs/hosts-tab/datatable.js +++ b/src/sunstone/public/app/tabs/hosts-tab/datatable.js @@ -317,6 +317,9 @@ define(function(require) { } function quotaDashboard(html_tag, legend, font_large_size, font_small_size, quota) { + var min = SunstoneConfig.thresholds.min; + var low = SunstoneConfig.thresholds.low; + var high = SunstoneConfig.thresholds.high; return "