Merge branch 'master' into annotations_redesign

This commit is contained in:
Torkel Ödegaard 2014-07-16 13:18:21 +02:00
commit b47047a91d
9 changed files with 64 additions and 30 deletions

View File

@ -6,6 +6,7 @@ vNext
- 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: Add continuous query in series results (series typeahead). #581
- InfluxDB: Support for alias & alias patterns when using raw query mode, #584
**Changes**
- Graphite: Use unix epoch for Graphite from/to for absolute time ranges (Closes #536)

View File

@ -1,8 +1,14 @@
[Grafana](http://grafana.org) [![Build Status](https://api.travis-ci.org/grafana/grafana.png)](https://travis-ci.org/grafana/grafana)
=================
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.
[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)
================
[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
### Graphite Target Editor
@ -22,7 +28,7 @@ A beautiful, easy to use and feature rich Graphite dashboard replacement and gra
- Bars, Lines, Points.
- Smart Y-axis formating
- Series toggles & color selector
- Axis labels
- Legend values, and formating options
- Grid thresholds, axis labels
- [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
### InfluxDB
- [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
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
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-Methods" "GET, OPTIONS";
add_header "Access-Control-Allow-Headers" "Authorization, origin, accept";

View File

@ -19,8 +19,8 @@
<ul class="dropdown-menu pull-right" role="menu">
<li role="menuitem">
<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="hideQuery()" ng-show="target.rawQuery">Hide 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">Query editor mode</a>
</li>
</ul>
</li>
@ -41,17 +41,35 @@
</li>
</ul>
<input type="text"
class="grafana-target-text-input span10"
<!-- Raw Query mode -->
<ul class="grafana-segment-list" ng-show="target.rawQuery">
<li>
<input type="text"
class="grafana-target-segment-input span8"
ng-model="target.query"
placeholder="select ..."
focus-me="target.rawQuery"
spellcheck='false'
data-min-length=0 data-items=100
ng-model-onblur
ng-blur="get_data()"
ng-show="target.rawQuery">
ng-blur="get_data()">
</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">
<li>
<input type="text"

View File

@ -97,10 +97,6 @@ function (angular, _, kbn, InfluxSeries) {
query = _.template(template, templateData, this.templateSettings);
query = filterSrv.applyTemplateToTarget(query);
if (target.alias) {
alias = filterSrv.applyTemplateToTarget(target.alias);
}
if (target.groupby_field_add) {
groupByField = target.groupby_field;
}
@ -108,6 +104,10 @@ function (angular, _, kbn, InfluxSeries) {
target.query = query;
}
if (target.alias) {
alias = filterSrv.applyTemplateToTarget(target.alias);
}
var handleResponse = _.partial(handleInfluxQueryResponse, alias, groupByField);
return this.doInfluxRequest(query, alias).then(handleResponse);
@ -145,7 +145,7 @@ function (angular, _, kbn, InfluxSeries) {
return $q.reject(err);
}
return this.doInfluxRequest(query)
return this.doInfluxRequest(interpolated)
.then(function (results) {
return _.map(results[0].points, function (metric) {
return {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,7 @@
.graph-canvas-wrapper {
position: relative;
}
.graph-legend {
margin: 0 20px;
text-align: left;

View File

@ -3,10 +3,10 @@ module.exports = function(config) {
css: {
src: [
'<%= srcDir %>/css/normalize.min.css',
'<%= srcDir %>/css/bootstrap.dark.min.css',
'<%= srcDir %>/css/timepicker.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'
},