mirror of
https://github.com/grafana/grafana.git
synced 2025-01-19 13:03:32 -06:00
Update module editor form
This commit is contained in:
parent
12e540b2f3
commit
e12f131271
@ -17,25 +17,35 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span10">
|
||||||
<form>
|
<form class="form-horizontal">
|
||||||
<h6>Field</h6>
|
<div class="control-group">
|
||||||
<input type="text" class="input-small" ng-model="panel.field">
|
<label class="control-label" for="panelfield">Primary Field</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" id="panelfield" class="input" ng-model="panel.field">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="panelsecondaryfield">Secondary Field</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" id="panelsecondaryfield" class="input"
|
||||||
|
ng-model="panel.secondaryfield"
|
||||||
|
data-placement="right"
|
||||||
|
placeholder="Optional"
|
||||||
|
bs-tooltip="'Allows aggregating on Primary field, while counting stats on a secondary (e.g. Group By user_id, Sum(purchase_price)).'" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="panelquery">Query</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" id="panelquery" class="input" ng-model="panel.query">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span6">
|
|
||||||
<form class="input-append">
|
|
||||||
<h6>Query</h6><input type="text" ng-model="panel.query">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="span1">
|
|
||||||
<h6>Map</h6>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span11">
|
<div class="span11">
|
||||||
<h4>Display Options</h4>
|
<h4>Display Options</h4>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
.hexagon {
|
.hexagon {
|
||||||
fill: none;
|
fill: none;
|
||||||
stroke: #000;
|
stroke: #000;
|
||||||
stroke-width: .5px;
|
stroke-width: .1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -239,15 +239,14 @@ angular.module('kibana.map2', [])
|
|||||||
.size([width, height])
|
.size([width, height])
|
||||||
.radius(scope.panel.display.binning.hexagonSize);
|
.radius(scope.panel.display.binning.hexagonSize);
|
||||||
|
|
||||||
|
//bin and sort the points, so we can set the various ranges appropriately
|
||||||
var binnedPoints = hexbin(points).sort(function(a, b) { return b.length - a.length; });
|
var binnedPoints = hexbin(points).sort(function(a, b) { return b.length - a.length; });
|
||||||
console.log(binnedPoints);
|
|
||||||
|
|
||||||
|
|
||||||
var radius = d3.scale.sqrt()
|
var radius = d3.scale.sqrt()
|
||||||
.domain([0, binnedPoints[0].length])
|
.domain([0, binnedPoints[0].length])
|
||||||
.range([0, scope.panel.display.binning.hexagonSize]);
|
.range([0, scope.panel.display.binning.hexagonSize]);
|
||||||
|
|
||||||
|
|
||||||
var color = d3.scale.linear()
|
var color = d3.scale.linear()
|
||||||
.domain([0,binnedPoints[0].length])
|
.domain([0,binnedPoints[0].length])
|
||||||
.range(["white", "steelblue"])
|
.range(["white", "steelblue"])
|
||||||
|
Loading…
Reference in New Issue
Block a user