Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

numbers_widget: formatPercentValue()

  • Loading branch information...
commit 263f429f722e0f6f88e4631cf36359e74c4de077 1 parent f1b872e
@paulasmuth paulasmuth authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 pub/fnordmetric.js
View
6 pub/fnordmetric.js
@@ -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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.