Commit b47047a9 by Torkel Ödegaard

Merge branch 'master' into annotations_redesign

parents 9eb9bd84 1c56ac7e
...@@ -6,6 +6,7 @@ vNext ...@@ -6,6 +6,7 @@ vNext
- New legend display option "Right side", will show legend to the right of the graph (Issue #556) - New legend display option "Right side", will show legend to the right of the graph (Issue #556)
- InfluxDB: Enhanced series aliasing (legend names) with pattern replacements (Issue #525) - InfluxDB: Enhanced series aliasing (legend names) with pattern replacements (Issue #525)
- InfluxDB: Add continuous query in series results (series typeahead). #581 - InfluxDB: Add continuous query in series results (series typeahead). #581
- InfluxDB: Support for alias & alias patterns when using raw query mode, #584
**Changes** **Changes**
- Graphite: Use unix epoch for Graphite from/to for absolute time ranges (Closes #536) - Graphite: Use unix epoch for Graphite from/to for absolute time ranges (Closes #536)
......
[Grafana](http://grafana.org) [![Build Status](https://api.travis-ci.org/grafana/grafana.png)](https://travis-ci.org/grafana/grafana) [Grafana](http://grafana.org) [![Build Status](https://api.travis-ci.org/grafana/grafana.png)](https://travis-ci.org/grafana/grafana) [![Gittip](http://img.shields.io/gittip/torkelo.svg)](https://www.gittip.com/torkelo)
================= ================
A beautiful, easy to use and feature rich Graphite dashboard replacement and graph editor. Visit [grafana.org](http://grafana.org) for screenshots, videos and feature descriptions. [Website](http://grafana.org) |
[Twitter](http://twitter.com/grafana) |
[IRC](http://webchat.freenode.net/?channels=grafana) |
[Email](mailto:contact@grafana.org)
![](http://grafana.org/assets/img/edit_dashboards.png) Grafana is An open source, feature rich metrics dashboard and graph editor for
Graphite, InfluxDB & OpenTSDB.
![](http://grafana.org/assets/img/start_page_bg.png)
## Features ## Features
### Graphite Target Editor ### Graphite Target Editor
...@@ -22,7 +28,7 @@ A beautiful, easy to use and feature rich Graphite dashboard replacement and gra ...@@ -22,7 +28,7 @@ A beautiful, easy to use and feature rich Graphite dashboard replacement and gra
- Bars, Lines, Points. - Bars, Lines, Points.
- Smart Y-axis formating - Smart Y-axis formating
- Series toggles & color selector - Series toggles & color selector
- Axis labels - Legend values, and formating options
- Grid thresholds, axis labels - Grid thresholds, axis labels
- [Annotations] (https://github.com/grafana/grafana/wiki/Annotations) - [Annotations] (https://github.com/grafana/grafana/wiki/Annotations)
...@@ -40,6 +46,10 @@ A beautiful, easy to use and feature rich Graphite dashboard replacement and gra ...@@ -40,6 +46,10 @@ A beautiful, easy to use and feature rich Graphite dashboard replacement and gra
### InfluxDB ### InfluxDB
- [Use InfluxDB](https://github.com/grafana/grafana/wiki/InfluxDB) as metric datasource - [Use InfluxDB](https://github.com/grafana/grafana/wiki/InfluxDB) as metric datasource
- Query editor with series and column typeahead, easy group by and function selection
### OpenTSDB
- Query editor with metric name typeahead and tag filtering
# Requirements # Requirements
Grafana is very easy to install. It is a client side web app with no backend. Any webserver will do. Optionally you will need ElasticSearch if you want to be able to save and load dashboards quickly instead of json files or local storage. Grafana is very easy to install. It is a client side web app with no backend. Any webserver will do. Optionally you will need ElasticSearch if you want to be able to save and load dashboards quickly instead of json files or local storage.
...@@ -73,7 +83,7 @@ Note that using "\*" leaves your graphite instance quite open so you might want ...@@ -73,7 +83,7 @@ Note that using "\*" leaves your graphite instance quite open so you might want
Here is the same thing, in nginx format: Here is the same thing, in nginx format:
``` ```
add_header "Access-Control-Allow-Origin" "*"; add_header "Access-Control-Allow-Origin" "*";
add_header "Access-Control-Allow-Credentials" "true"; add_header "Access-Control-Allow-Credentials" "true";
add_header "Access-Control-Allow-Methods" "GET, OPTIONS"; add_header "Access-Control-Allow-Methods" "GET, OPTIONS";
add_header "Access-Control-Allow-Headers" "Authorization, origin, accept"; add_header "Access-Control-Allow-Headers" "Authorization, origin, accept";
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
<ul class="dropdown-menu pull-right" role="menu"> <ul class="dropdown-menu pull-right" role="menu">
<li role="menuitem"> <li role="menuitem">
<a tabindex="1" ng-click="duplicate()">Duplicate</a> <a tabindex="1" ng-click="duplicate()">Duplicate</a>
<a tabindex="2" ng-click="showQuery()" ng-hide="target.rawQuery">Show Query</a> <a tabindex="2" ng-click="showQuery()" ng-hide="target.rawQuery">Raw query mode</a>
<a tabindex="2" ng-click="hideQuery()" ng-show="target.rawQuery">Hide Query</a> <a tabindex="2" ng-click="hideQuery()" ng-show="target.rawQuery">Query editor mode</a>
</li> </li>
</ul> </ul>
</li> </li>
...@@ -41,17 +41,35 @@ ...@@ -41,17 +41,35 @@
</li> </li>
</ul> </ul>
<input type="text" <!-- Raw Query mode -->
class="grafana-target-text-input span10" <ul class="grafana-segment-list" ng-show="target.rawQuery">
<li>
<input type="text"
class="grafana-target-segment-input span8"
ng-model="target.query" ng-model="target.query"
placeholder="select ..." placeholder="select ..."
focus-me="target.rawQuery" focus-me="target.rawQuery"
spellcheck='false' spellcheck='false'
data-min-length=0 data-items=100 data-min-length=0 data-items=100
ng-model-onblur ng-model-onblur
ng-blur="get_data()" ng-blur="get_data()">
ng-show="target.rawQuery"> </li>
<li class="grafana-target-segment">
as
</li>
<li>
<input type="text"
class="input-medium grafana-target-segment-input"
ng-model="target.alias"
spellcheck='false'
placeholder="alias"
ng-blur="get_data()">
</li>
</ul>
<!-- Query editor mode -->
<ul class="grafana-segment-list" role="menu" ng-hide="target.rawQuery"> <ul class="grafana-segment-list" role="menu" ng-hide="target.rawQuery">
<li> <li>
<input type="text" <input type="text"
......
...@@ -97,10 +97,6 @@ function (angular, _, kbn, InfluxSeries) { ...@@ -97,10 +97,6 @@ function (angular, _, kbn, InfluxSeries) {
query = _.template(template, templateData, this.templateSettings); query = _.template(template, templateData, this.templateSettings);
query = filterSrv.applyTemplateToTarget(query); query = filterSrv.applyTemplateToTarget(query);
if (target.alias) {
alias = filterSrv.applyTemplateToTarget(target.alias);
}
if (target.groupby_field_add) { if (target.groupby_field_add) {
groupByField = target.groupby_field; groupByField = target.groupby_field;
} }
...@@ -108,6 +104,10 @@ function (angular, _, kbn, InfluxSeries) { ...@@ -108,6 +104,10 @@ function (angular, _, kbn, InfluxSeries) {
target.query = query; target.query = query;
} }
if (target.alias) {
alias = filterSrv.applyTemplateToTarget(target.alias);
}
var handleResponse = _.partial(handleInfluxQueryResponse, alias, groupByField); var handleResponse = _.partial(handleInfluxQueryResponse, alias, groupByField);
return this.doInfluxRequest(query, alias).then(handleResponse); return this.doInfluxRequest(query, alias).then(handleResponse);
...@@ -145,7 +145,7 @@ function (angular, _, kbn, InfluxSeries) { ...@@ -145,7 +145,7 @@ function (angular, _, kbn, InfluxSeries) {
return $q.reject(err); return $q.reject(err);
} }
return this.doInfluxRequest(query) return this.doInfluxRequest(interpolated)
.then(function (results) { .then(function (results) {
return _.map(results[0].points, function (metric) { return _.map(results[0].points, function (metric) {
return { return {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
.graph-canvas-wrapper {
position: relative;
}
.graph-legend { .graph-legend {
margin: 0 20px; margin: 0 20px;
text-align: left; text-align: left;
......
...@@ -3,10 +3,10 @@ module.exports = function(config) { ...@@ -3,10 +3,10 @@ module.exports = function(config) {
css: { css: {
src: [ src: [
'<%= srcDir %>/css/normalize.min.css', '<%= srcDir %>/css/normalize.min.css',
'<%= srcDir %>/css/bootstrap.dark.min.css',
'<%= srcDir %>/css/timepicker.css', '<%= srcDir %>/css/timepicker.css',
'<%= srcDir %>/css/spectrum.css', '<%= srcDir %>/css/spectrum.css',
'<%= srcDir %>/css/animate.min.css' '<%= srcDir %>/css/animate.min.css',
'<%= srcDir %>/css/bootstrap.dark.min.css'
], ],
dest: '<%= srcDir %>/css/default.min.css' dest: '<%= srcDir %>/css/default.min.css'
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment