Commit ee8ba469 by Torkel Odegaard

began on being able to control fill style per series

parent 903dfc61
......@@ -18,11 +18,17 @@
<script type="text/ng-template" id="colorPopup.html">
<div class="histogram-legend-popover">
<div class="histogram-legend-popover-header">
<a class="close" ng-click="dismiss();" href="">×</a>
</div>
<div class="editor-row">
<a class="small" ng-click="toggleYAxis(series)">
Toggle Y-axis (y&sup2;)
2:nd Y-axis (y&sup2;) <input type="checkbox"></input>
</a>
</div>
<a class="close" ng-click="dismiss();" href="">×</a>
<div class="editor-row">
Fill style <select class="input-mini" ng-model="panel.aliasFillStyle[series.alias]" ng-options="f for f in ['no', 'all', 'null']" ng-change="get_data()"></select>
</div>
<div class="editor-row">
......
......@@ -217,7 +217,8 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
targets: [],
aliasColors: {},
aliasYAxis: {}
aliasYAxis: {},
aliasFillStyle: {}
};
_.defaults($scope.panel,_d);
......@@ -338,15 +339,18 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
if(results.length === 0 ) {
return [];
}
_.each(results, function(targetData) {
var alias = targetData.target;
var color = $scope.panel.aliasColors[alias] || $scope.colors[data.length];
var yaxis = $scope.panel.aliasYAxis[alias] || 1;
var tsOpts = {
interval: $scope.interval,
start_date: $scope.range && $scope.range.from,
end_date: $scope.range && $scope.range.to,
fill_style: 'no'
fill_style: $scope.panel.aliasFillStyle[alias] || 'no',
};
_.each(results, function(targetData) {
var time_series = new timeSeries.ZeroFilled(tsOpts);
_.each(targetData.datapoints, function(valueArray) {
......@@ -355,10 +359,6 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
}
});
var alias = targetData.target;
var color = $scope.panel.aliasColors[alias] || $scope.colors[data.length];
var yaxis = $scope.panel.aliasYAxis[alias] || 1;
var seriesInfo = {
alias: alias,
color: color,
......
/** @scratch /configuration/config.js/1
* == Configuration
* config.js is where you will find the core Kibana configuration. This file contains parameter that
* config.js is where you will find the core Grafana configuration. This file contains parameter that
* must be set before kibana is run for the first time.
*/
define(['settings'],
......@@ -16,13 +16,15 @@ function (Settings) {
* ==== elasticsearch
*
* The URL to your elasticsearch server. You almost certainly don't
* want +http://localhost:9200+ here. Even if Kibana and Elasticsearch are on
* want +http://localhost:9200+ here. Even if Grafana and Elasticsearch are on
* the same host. By default this will attempt to reach ES at the same host you have
* kibana installed on. You probably want to set it to the FQDN of your
* Grafana installed on. You probably want to set it to the FQDN of your
* elasticsearch host
*/
elasticsearch: "http://"+window.location.hostname+":9200",
graphiteUrl: "http://"+window.location.hostname+":8080",
/** @scratch /configuration/config.js/5
* ==== default_route
*
......@@ -35,12 +37,13 @@ function (Settings) {
default_route : '/dashboard/file/default.json',
/** @scratch /configuration/config.js/5
* ==== kibana-int
* ==== Grafana-int
*
* The default ES index to use for storing Kibana specific object
* The default ES index to use for storing Grafana specific object
* such as stored dashboards
*/
kibana_index: "kibana-int",
grafana_index: "grafana-int",
/** @scratch /configuration/config.js/5
* ==== panel_name
......
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