Skip to content

Commit

Permalink
Merge pull request #988 from rashidkpc/master
Browse files Browse the repository at this point in the history
Remove pie panel, replace with goal panel, closes #795
  • Loading branch information
Rashid Khan committed Feb 25, 2014
2 parents 5bc265e + a4b16dd commit cc6d5d9
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 220 deletions.
6 changes: 3 additions & 3 deletions docs/kibana/panels.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ include::panels/bettermap.asciidoc[]
include::panels/column.asciidoc[]
// src/app/panels/column/module.js:1

include::panels/goal.asciidoc[]
// src/app/panels/goal/module.js:1

include::panels/histogram.asciidoc[]
// src/app/panels/histogram/module.js:1

Expand All @@ -44,9 +47,6 @@ include::panels/hits.asciidoc[]
include::panels/map.asciidoc[]
// src/app/panels/map/module.js:1

include::panels/pie.asciidoc[]
// src/app/panels/pie/module.js:1

include::panels/sparklines.asciidoc[]
// src/app/panels/sparklines/module.js:1

Expand Down
38 changes: 38 additions & 0 deletions docs/kibana/panels/goal.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
== Goal
Status: *Stable*

The goal panel display progress towards a fixed goal on a pie chart

// src/app/panels/goal/module.js:5

=== Parameters
donut:: Draw a hole in the middle of the pie, creating a tasty donut.
// src/app/panels/goal/module.js:46

tilt:: Tilt the pie back into an oval shape
// src/app/panels/goal/module.js:51

legend:: The location of the legend, above, below or none
// src/app/panels/goal/module.js:55

labels:: Set to false to disable drawing labels inside the pie slices
// src/app/panels/goal/module.js:59

spyable:: Set to false to disable the inspect function.
// src/app/panels/goal/module.js:63

==== Query

query object:: This confusingly named object has properties to set the terms mode field,
and the fixed goal for the goal mode
query.field::: the field to facet on in terms mode
query.goal::: the fixed goal for goal mode
// src/app/panels/goal/module.js:67

==== Queries

queries object:: This object describes the queries to use on this panel.
queries.mode::: Of the queries available, which to use. Options: +all, pinned, unpinned, selected+
queries.ids::: In +selected+ mode, which query ids are selected.
// src/app/panels/goal/module.js:76

50 changes: 0 additions & 50 deletions docs/kibana/panels/pie.asciidoc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
<div class="editor-row" ng-switch="panel.mode">
<div class="editor-row">

<div class="section">
<h5>Mode</h5>
<div class="editor-option">
<label class="small">Mode</label>
<select class="input-small" ng-change="set_mode(panel.mode);set_refresh(true)" ng-model="panel.mode" ng-options="f for f in ['terms','goal']"></select>
</div>
</div>

<div class="section" ng-switch-when="terms">
<h5>Parameters</h5>
<div class="editor-option">
<label class="small">Field</label>
<input type="text" class="input-small" bs-typeahead="fields.list" ng-model="panel.query.field" ng-change="set_refresh(true)">
</div>
<div class="editor-option">
<label class="small">Length</label>
<input class="input-mini" type="number" ng-model="panel.size" ng-change="set_refresh(true)">
</div>
<div class="editor-option">
<label class="small">Exclude Terms(s) (comma separated)</label>
<input array-join type="text" ng-model='panel.exclude'></input>
</div>
</div>

<div class="section" ng-switch-when="goal">
<h5>Parameters</h5>
<div class="editor-option">
<form style="margin-bottom: 0px">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div ng-controller='pie' ng-init="init()">
<div ng-controller='goal' ng-init="init()">
<style>
.pieLabel { pointer-events: none }
.goal-label { pointer-events: none }
</style>
<div ng-show="panel.legend == 'above'" ng-repeat="query in legend" style="float:left;padding-left: 10px;">
<span ng-show="panel.chart != 'none'"><i class="icon-circle" ng-style="{color:query.color}"></i></span><span class="small"> {{query.label}} ({{query.data[0][1]}}) </span></span>
</div><br>
<div style="clear:both"></div>

<div pie class="pointer" params="{{panel}}" style="position:relative"></div>
<div goal params="{{panel}}" style="position:relative"></div>

<div ng-show="panel.legend == 'below'" ng-repeat="query in legend" style="float:left;padding-left: 10px;">
<span ng-show="panel.chart != 'none'"><i class="icon-circle" ng-style="{color:query.color}"></i></span><span class="small"> {{query.label}} ({{query.data[0][1]}}) </span></span>
Expand Down
Loading

0 comments on commit cc6d5d9

Please sign in to comment.