Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
a1faaa13
Commit
a1faaa13
authored
Apr 17, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(): query editors, started work on updated ES query editor
parent
805fd18b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
111 deletions
+77
-111
public/app/partials/metrics.html
+1
-1
public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html
+18
-22
public/app/plugins/datasource/elasticsearch/partials/metric_agg.html
+42
-67
public/app/plugins/datasource/elasticsearch/partials/query.editor.html
+16
-21
No files found.
public/app/partials/metrics.html
View file @
a1faaa13
<div
class=
"query-editor-rows gf-form-group"
>
<div
ng-repeat=
"target in ctrl.panel.targets"
ng-class=
"{'
tight
-form-disabled': target.hide}"
>
<div
ng-repeat=
"target in ctrl.panel.targets"
ng-class=
"{'
gf
-form-disabled': target.hide}"
>
<rebuild-on-change
property=
"ctrl.panel.datasource || target.datasource"
show-null=
"true"
>
<plugin-component
type=
"query-ctrl"
>
</plugin-component>
...
...
public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html
View file @
a1faaa13
<div
class=
"
tight-form
"
>
<
ul
class=
"tight-form-list
"
>
<l
i
class=
"tight-form-item query-keyword tight-form-align"
style=
"width: 75px;
"
>
<div
class=
"
gf-form-inline
"
>
<
div
class=
"gf-form
"
>
<l
abel
class=
"gf-form-label query-keyword width-7
"
>
<span
ng-show=
"isFirst"
>
Group by
</span>
<span
ng-hide=
"isFirst"
>
Then by
</span>
</l
i
>
<li>
</l
abel
>
<metric-segment-model
property=
"agg.type"
options=
"bucketAggTypes"
on-change=
"onTypeChanged()"
custom=
"false"
css-class=
"tight-form-item-large"
></metric-segment-model>
</li>
<li
ng-if=
"agg.field"
>
<metric-segment-model
property=
"agg.field"
get-options=
"getFieldsInternal()"
on-change=
"onChange()"
css-class=
"tight-form-item-xxlarge"
></metric-segment>
</li>
<li
ng-if=
"!agg.field"
>
<span
class=
"tight-form-item tight-form-item-xxlarge"
>
</span>
</li>
<li
class=
"tight-form-item last"
ng-if=
"settingsLinkText"
>
<metric-segment-model
ng-if=
"agg.field"
property=
"agg.field"
get-options=
"getFieldsInternal()"
on-change=
"onChange()"
css-class=
"tight-form-item-xxlarge"
></metric-segment>
<label
class=
"gf-form-label"
ng-if=
"settingsLinkText"
>
<a
ng-click=
"toggleOptions()"
>
<i
class=
"fa fa-caret-down"
ng-show=
"showOptions"
></i>
<i
class=
"fa fa-caret-right"
ng-hide=
"showOptions"
></i>
{{settingsLinkText}}
</a>
</li>
</ul>
</label>
</div>
<div
class=
"gf-form-filler"
></div>
<
ul
class=
"tight-form-list pull-right
"
>
<l
i
class=
"tight-form-item last
"
ng-if=
"isFirst"
>
<
div
class=
"gf-form
"
>
<l
abel
class=
"gf-form-label
"
ng-if=
"isFirst"
>
<a
class=
"pointer"
ng-click=
"addBucketAgg()"
><i
class=
"fa fa-plus"
></i></a>
</l
i
>
<l
i
class=
"tight-form-item last
"
>
</l
abel
>
<l
abel
class=
"gf-form-label
"
>
<a
class=
"pointer"
ng-click=
"removeBucketAgg()"
><i
class=
"fa fa-minus"
></i></a>
</li>
</ul>
<div
class=
"clearfix"
></div>
</label>
</div>
</div>
<div
class=
"tight-form"
ng-if=
"showOptions"
>
...
...
public/app/plugins/datasource/elasticsearch/partials/metric_agg.html
View file @
a1faaa13
<div
class=
"
tight-form"
ng-class=
"{'tight
-form-disabled': agg.hide}"
>
<
ul
class=
"tight-form-list
"
>
<l
i
class=
"tight-form-item query-keyword tight-form-align"
style=
"width: 75px;
"
>
<div
class=
"
gf-form-inline"
ng-class=
"{'gf
-form-disabled': agg.hide}"
>
<
div
class=
"gf-form
"
>
<l
abel
class=
"gf-form-label query-keyword width-7
"
>
Metric
<a
ng-click=
"toggleShowMetric()"
bs-tooltip=
"'Click to toggle show / hide metric'"
>
<i
class=
"fa fa-eye"
ng-hide=
"agg.hide"
></i>
<i
class=
"fa fa-eye-slash"
ng-show=
"agg.hide"
></i>
</a>
</li>
<li>
</label>
</div>
<div
class=
"gf-form"
>
<metric-segment-model
property=
"agg.type"
options=
"metricAggTypes"
on-change=
"onTypeChange()"
custom=
"false"
css-class=
"tight-form-item-large"
></metric-segment-model>
</li>
<li
ng-if=
"aggDef.requiresField"
>
<metric-segment-model
property=
"agg.field"
get-options=
"getFieldsInternal()"
on-change=
"onChange()"
css-class=
"tight-form-item-xxlarge"
></metric-segment-model>
</li>
<li
ng-if=
"aggDef.isPipelineAgg"
>
<metric-segment-model
property=
"agg.pipelineAgg"
options=
"pipelineAggOptions"
on-change=
"onChangeInternal()"
custom=
"false"
css-class=
"tight-form-item-xxlarge"
></metric-segment-model>
</li>
<li
class=
"tight-form-item last"
ng-if=
"settingsLinkText"
>
<metric-segment-model
ng-if=
"aggDef.requiresField"
property=
"agg.field"
get-options=
"getFieldsInternal()"
on-change=
"onChange()"
css-class=
"tight-form-item-xxlarge"
></metric-segment-model>
<metric-segment-model
ng-if=
"aggDef.isPipelineAgg"
property=
"agg.pipelineAgg"
options=
"pipelineAggOptions"
on-change=
"onChangeInternal()"
custom=
"false"
css-class=
"tight-form-item-xxlarge"
></metric-segment-model>
</div>
<div
class=
"gf-form"
ng-if=
"settingsLinkText"
>
<label
class=
"gf-form-label"
>
<a
ng-click=
"toggleOptions()"
>
<i
class=
"fa fa-caret-down"
ng-show=
"showOptions"
></i>
<i
class=
"fa fa-caret-right"
ng-hide=
"showOptions"
></i>
{{settingsLinkText}}
</a>
</l
i
>
</
ul
>
</l
abel
>
</
div
>
<ul
class=
"tight-form-list pull-right"
>
<li
class=
"tight-form-item last"
ng-if=
"isFirst"
>
<div
class=
"gf-form-filler"
></div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label"
ng-if=
"isFirst"
>
<a
class=
"pointer"
ng-click=
"addMetricAgg()"
><i
class=
"fa fa-plus"
></i></a>
</l
i
>
<l
i
class=
"tight-form-item last
"
ng-if=
"!isSingle"
>
</l
abel
>
<l
abel
class=
"gf-form-label
"
ng-if=
"!isSingle"
>
<a
class=
"pointer"
ng-click=
"removeMetricAgg()"
><i
class=
"fa fa-minus"
></i></a>
</l
i
>
</
ul
>
<div
class=
"clearfix"
></div>
</l
abel
>
</
div
>
</div>
<div
class=
"tight-form"
ng-if=
"showOptions"
>
<div
class=
"tight-form-inner-box tight-form-container"
>
<div
class=
"tight-form"
ng-if=
"agg.type === 'derivative'"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 75px;"
>
Unit
</li>
<li>
<input
type=
"text"
class=
"input-medium tight-form-input last"
ng-model=
"agg.settings.unit"
ng-blur=
"onChangeInternal()"
spellcheck=
'false'
>
</li>
</ul>
<div
class=
"clearfix"
></div>
<div
class=
"gf-form-group"
ng-if=
"showOptions"
>
<div
class=
"gf-form"
ng-if=
"agg.type === 'derivative'"
>
<label
class=
"gf-form-label width-8"
>
Unit
</label>
<input
type=
"text"
class=
"gf-form-input max-width-10"
ng-model=
"agg.settings.unit"
ng-blur=
"onChangeInternal()"
spellcheck=
'false'
>
</div>
<div
class=
"tight-form"
ng-if=
"agg.type === 'moving_avg'"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 75px;"
>
Window
</li>
<li>
<input
type=
"number"
class=
"input-medium tight-form-input last"
ng-model=
"agg.settings.window"
ng-blur=
"onChangeInternal()"
spellcheck=
'false'
>
</li>
</ul>
<div
class=
"clearfix"
></div>
<div
class=
"gf-form"
ng-if=
"agg.type === 'moving_avg'"
>
<label
class=
"gf-form-label width-8"
>
Window
</label>
<input
type=
"number"
class=
"gf-form-input max-width-10"
ng-model=
"agg.settings.window"
ng-blur=
"onChangeInternal()"
spellcheck=
'false'
>
</div>
<div
class=
"tight-form"
ng-if=
"agg.type === 'moving_avg'"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 75px;"
>
Model
</li>
<li>
<input
type=
"text"
class=
"input-medium tight-form-input last"
ng-change=
"onChangeInternal()"
ng-model=
"agg.settings.model"
blur=
"onChange()"
spellcheck=
'false'
>
</li>
</ul>
<div
class=
"clearfix"
></div>
<div
class=
"gf-form"
ng-if=
"agg.type === 'moving_avg'"
>
<label
class=
"gf-form-label width-8"
>
Model
</label>
<input
type=
"text"
class=
"gf-form-input max-width-10"
ng-change=
"onChangeInternal()"
ng-model=
"agg.settings.model"
blur=
"onChange()"
spellcheck=
'false'
>
</div>
<div
class=
"tight-form last"
ng-if=
"agg.type === 'percentiles'"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
>
Percentiles
</li>
<li>
<input
type=
"text"
class=
"input-xlarge tight-form-input last"
ng-model=
"agg.settings.percents"
array-join
ng-blur=
"onChange()"
></input>
</li>
</ul>
<div
class=
"clearfix"
></div>
<div
class=
"gf-form"
ng-if=
"agg.type === 'percentiles'"
>
<label
class=
"gf-form-label"
>
Percentiles
</label>
<input
type=
"text"
class=
"gf-form-input max-width-25"
ng-model=
"agg.settings.percents"
array-join
ng-blur=
"onChange()"
></input>
</div>
<div
ng-if=
"agg.type === 'extended_stats'"
>
<div
class=
"tight
-form"
ng-repeat=
"stat in extendedStats"
>
<ul
class=
"tight
-form-list"
>
<div
class=
"gf
-form"
ng-repeat=
"stat in extendedStats"
>
<ul
class=
"gf
-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 100px"
>
{{stat.text}}
</li>
...
...
@@ -134,5 +110,4 @@
<div
class=
"clearfix"
></div>
</div>
</div>
</div>
public/app/plugins/datasource/elasticsearch/partials/query.editor.html
View file @
a1faaa13
<query-editor-row
ctrl=
"ctrl"
></query-editor-row
>
<query-editor-row
query-ctrl=
"ctrl"
>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item query-keyword"
style=
"width: 75px"
>
Query
</li>
<li>
<input
type=
"text"
class=
"tight-form-input"
style=
"width: 345px;"
ng-model=
"ctrl.target.query"
spellcheck=
'false'
placeholder=
"Lucene query"
ng-blur=
"ctrl.refresh()"
>
</li>
<li
class=
"tight-form-item query-keyword"
>
Alias
</li>
<li>
<input
type=
"text"
class=
"tight-form-input"
style=
"width: 200px;"
ng-model=
"ctrl.target.alias"
spellcheck=
'false'
placeholder=
"alias patterns (empty = auto)"
ng-blur=
"ctrl.refresh()"
>
</li>
</ul>
</div>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form gf-form-flex"
>
<label
class=
"gf-form-label query-keyword width-7"
>
Query
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.query"
spellcheck=
'false'
placeholder=
"Lucene query"
ng-blur=
"ctrl.refresh()"
>
</div>
<div
class=
"gf-form max-width-15"
>
<label
class=
"gf-form-label query-keyword"
>
Alias
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.alias"
spellcheck=
'false'
placeholder=
"alias patterns (empty = auto)"
ng-blur=
"ctrl.refresh()"
>
</div>
</div>
<div
ng-repeat=
"agg in ctrl.target.metrics"
>
<div
ng-repeat=
"agg in ctrl.target.metrics"
>
<elastic-metric-agg
target=
"ctrl.target"
index=
"$index"
get-fields=
"ctrl.getFields($fieldType)"
on-change=
"ctrl.queryUpdated()"
es-version=
"ctrl.esVersion"
>
</elastic-metric-agg>
</div>
</div>
<div
ng-repeat=
"agg in ctrl.target.bucketAggs"
>
<div
ng-repeat=
"agg in ctrl.target.bucketAggs"
>
<elastic-bucket-agg
target=
"ctrl.target"
index=
"$index"
get-fields=
"ctrl.getFields($fieldType)"
on-change=
"ctrl.queryUpdated()"
>
</elastic-bucket-agg>
</div>
</div>
</query-editor-row>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment