diff --git a/CHANGELOG.md b/CHANGELOG.md index c0c8fe29f18..61e9d0c1f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ vNext +**New features or improvements** +- Allow [[..]] filter notation in all text panels (markdown/html/text) (Issue #511) + +**Changes** +- Use unix epoch for Graphite from/to for absolute time ranges (Closes #536) + +**Fixes** +- Fix formatting negative values (PR #545) + + +# 1.6.1 (2014-06-24) + **New features or improvements** - Ability to set y min/max for right y-axis (RR #519, Closes #360) - thx @acedrew diff --git a/package.json b/package.json index 004bd166b73..cb46712796c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "1.6.0", + "version": "1.6.1", "repository": { "type": "git", "url": "http://github.com/torkelo/grafana.git" diff --git a/src/app/components/kbn.js b/src/app/components/kbn.js index 67bab9ff061..5faeafeb1ff 100644 --- a/src/app/components/kbn.js +++ b/src/app/components/kbn.js @@ -481,23 +481,23 @@ function($, _, moment) { }; kbn.msFormat = function(size, decimals) { - if (size < 1000) { + if (Math.abs(size) < 1000) { return size.toFixed(0) + " ms"; } // Less than 1 min - else if (size < 60000) { + else if (Math.abs(size) < 60000) { return (size / 1000).toFixed(decimals) + " s"; } // Less than 1 hour, devide in minutes - else if (size < 3600000) { + else if (Math.abs(size) < 3600000) { return (size / 60000).toFixed(decimals) + " min"; } // Less than one day, devide in hours - else if (size < 86400000) { + else if (Math.abs(size) < 86400000) { return (size / 3600000).toFixed(decimals) + " hour"; } // Less than one year, devide in days - else if (size < 31536000000) { + else if (Math.abs(size) < 31536000000) { return (size / 86400000).toFixed(decimals) + " day"; } @@ -506,23 +506,23 @@ function($, _, moment) { kbn.sFormat = function(size, decimals) { // Less than 10 min, use seconds - if (size < 600) { + if (Math.abs(size) < 600) { return size.toFixed(decimals) + " s"; } // Less than 1 hour, devide in minutes - else if (size < 3600) { + else if (Math.abs(size) < 3600) { return (size / 60).toFixed(decimals) + " min"; } // Less than one day, devide in hours - else if (size < 86400) { + else if (Math.abs(size) < 86400) { return (size / 3600).toFixed(decimals) + " hour"; } // Less than one week, devide in days - else if (size < 604800) { + else if (Math.abs(size) < 604800) { return (size / 86400).toFixed(decimals) + " day"; } // Less than one year, devide in week - else if (size < 31536000) { + else if (Math.abs(size) < 31536000) { return (size / 604800).toFixed(decimals) + " week"; } @@ -530,10 +530,10 @@ function($, _, moment) { }; kbn.microsFormat = function(size, decimals) { - if (size < 1000) { + if (Math.abs(size) < 1000) { return size.toFixed(0) + " µs"; } - else if (size < 1000000) { + else if (Math.abs(size) < 1000000) { return (size / 1000).toFixed(decimals) + " ms"; } else { @@ -542,16 +542,16 @@ function($, _, moment) { }; kbn.nanosFormat = function(size, decimals) { - if (size < 1000) { + if (Math.abs(size) < 1000) { return size.toFixed(0) + " ns"; } - else if (size < 1000000) { + else if (Math.abs(size) < 1000000) { return (size / 1000).toFixed(decimals) + " µs"; } - else if (size < 1000000000) { + else if (Math.abs(size) < 1000000000) { return (size / 1000000).toFixed(decimals) + " ms"; } - else if (size < 60000000000){ + else if (Math.abs(size) < 60000000000){ return (size / 1000000000).toFixed(decimals) + " s"; } else { diff --git a/src/app/dashboards/default.json b/src/app/dashboards/default.json index f2a1c55a7bc..35d37b36370 100644 --- a/src/app/dashboards/default.json +++ b/src/app/dashboards/default.json @@ -24,7 +24,7 @@ "type": "text", "loadingEditor": false, "mode": "markdown", - "content": "####Thank you for trying out Grafana! \n\nGeneral documentation is found in the readme and in the wiki section of the [Github Project](https://github.com/torkelo/grafana). If you encounter any problem or have an idea for an improvement do not hesitate to open a github issue. \n\nTips: \n\n- Ctrl+S saves the current dashboard\n- Ctrl+F Opens the dashboard finder (searches elastic search)\n- Ctrl+H Hide/show row controls \n- Click and drag graph title to move panel (only works when row controls are enabled)\n\nIf you do not see a graph in the panel bellow the browser cannot access your graphite installation. Please make sure that the graphiteUrl property in config.js is correctly set and accessible.", + "content": "####Thank you for trying out Grafana! \n\nGeneral documentation is found in the readme and in the wiki section of the [Github Project](https://github.com/torkelo/grafana). If you encounter any problem or have an idea for an improvement do not hesitate to open a github issue. \n\nTips: \n\n- Ctrl+S saves the current dashboard\n- Ctrl+F Opens the dashboard finder (searches elastic search)\n- Ctrl+H Hide/show row controls \n- Click and drag graph title to move panel (only works when row controls are enabled)\n\nIf you do not see a graph in the panel below the browser cannot access your graphite installation. Please make sure that datasources property in config.js is correctly set and that any urls accessible from your browser.", "style": {}, "title": "Welcome to Grafana" } @@ -41,7 +41,7 @@ { "span": 12, "editable": true, - "type": "graphite", + "type": "graph", "x-axis": true, "y-axis": true, "scale": 1, diff --git a/src/app/panels/text/module.html b/src/app/panels/text/module.html index adaf823be52..3db0a30d031 100644 --- a/src/app/panels/text/module.html +++ b/src/app/panels/text/module.html @@ -1,10 +1,4 @@
-
-+