Permalink
Browse files

numbers_widget: formatPercentValue()

  • Loading branch information...
asmuth committed Jan 4, 2012
1 parent f1b872e commit 263f429f722e0f6f88e4631cf36359e74c4de077
Showing with 6 additions and 0 deletions.
  1. +6 −0 pub/fnordmetric.js
View
@@ -78,9 +78,15 @@ var FnordMetric = (function(){
}
}
+ function formatPercentValue(value){
+ return value + '%';
+ }
+
function formatGaugeValue(gauge_key, value){
if(gauge_key.slice(0,8) === '__time__'){
return formatTimeValue(value);
+ } else if(gauge_key.slice(0,11) === '__percent__'){
+ return formatPercentValue(value);
} else {
return formatValue(value);
}

0 comments on commit 263f429

Please sign in to comment.