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
7b560f90
Commit
7b560f90
authored
Apr 27, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(query editors): converted OpenTSDB editor to new form styles
parent
0ebd921b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
178 additions
and
146 deletions
+178
-146
public/app/plugins/datasource/opentsdb/partials/query.editor.html
+177
-145
public/sass/components/_gf-form.scss
+1
-1
No files found.
public/app/plugins/datasource/opentsdb/partials/query.editor.html
View file @
7b560f90
<query-editor-row
ctrl=
"ctrl"
>
<li
class=
"tight-form-item query-keyword"
style=
"width: 100px"
>
<query-editor-row
query-ctrl=
"ctrl"
can-collapse=
"false"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form max-width-25"
>
<label
class=
"gf-form-label query-keyword width-8"
>
Metric
</li>
<li>
<input
type=
"text"
class=
"input-large tight-form-input"
ng-model=
"ctrl.target.metric"
<label
class=
"gf-form-label"
bs-tooltip=
"ctrl.errors.metric"
style=
"color: rgb(229, 189, 28)"
ng-show=
"ctrl.errors.metric"
>
<i
class=
"fa fa-warning"
></i>
</label>
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.metric"
spellcheck=
'false'
bs-typeahead=
"ctrl.suggestMetrics"
placeholder=
"metric name"
data-min-length=
0
data-items=
100
ng-blur=
"ctrl.targetBlur()"
>
</input>
<a
bs-tooltip=
"ctrl.errors.metric"
style=
"color: rgb(229, 189, 28)"
ng-show=
"ctrl.errors.metric"
>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label query-keyword"
>
Aggregator
<a
bs-tooltip=
"ctrl.errors.aggregator"
style=
"color: rgb(229, 189, 28)"
ng-show=
"ctrl.errors.aggregator"
>
<i
class=
"fa fa-warning"
></i>
</a>
</li>
<li
class=
"tight-form-item query-keyword"
>
Aggregator
</li>
<li>
<select
ng-model=
"ctrl.target.aggregator"
class=
"tight-form-input input-small"
</label>
<div
class=
"gf-form-select-wrapper max-width-15"
>
<select
ng-model=
"ctrl.target.aggregator"
class=
"gf-form-input"
ng-options=
"agg for agg in ctrl.aggregators"
ng-change=
"ctrl.targetBlur()"
>
</select>
<a
bs-tooltip=
"ctrl.errors.aggregator"
style=
"color: rgb(229, 189, 28)"
ng-show=
"ctrl.errors.aggregator"
>
<i
class=
"fa fa-warning"
></i>
</a>
</li>
<li
class=
"tight-form-item query-keyword"
>
</div>
</div>
<div
class=
"gf-form max-width-20"
>
<label
class=
"gf-form-label query-keyword width-6"
>
Alias:
<tip>
Use patterns like $tag_tagname to replace part of the alias for a tag value
</tip>
</li>
<li>
<input
type=
"text"
class=
"tight-form-input input-large"
<info-popover
mode=
"right-normal"
>
Use patterns like $tag_tagname to replace part of the alias for a tag value
</info-popover>
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.alias"
spellcheck=
'false'
placeholder=
"series alias"
data-min-length=
0
data-items=
100
ng-blur=
"ctrl.targetBlur()"
></input>
</li>
</query-editor-row>
</div>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
role=
"menu"
>
<li
class=
"tight-form-item tight-form-align query-keyword"
style=
"width: 100px"
>
Down sample
</li>
<div
class=
"gf-form gf-form--grow"
>
<div
class=
"gf-form-label gf-form-label--grow"
></div>
</div>
</div>
<li>
<input
type=
"text"
class=
"input-large tight-form-input"
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form max-width-25"
>
<label
class=
"gf-form-label query-keyword width-8"
>
Down sample
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.downsampleInterval"
ng-model-onblur
ng-change=
"ctrl.targetBlur()"
placeholder=
"interval (empty = auto)"
></input>
</li>
<li
class=
"tight-form-item query-keyword"
>
Aggregator
</li>
<li>
<select
ng-model=
"ctrl.target.downsampleAggregator"
class=
"tight-form-input input-small"
placeholder=
"interval"
></input>
<info-popover
mode=
"right-absolute"
>
blank for auto, or for example
<code>
1m
</code>
</info-popover>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label query-keyword"
>
Aggregator
</label>
<div
class=
"gf-form-select-wrapper"
>
<select
ng-model=
"ctrl.target.downsampleAggregator"
class=
"gf-form-input"
ng-options=
"agg for agg in ctrl.aggregators"
ng-change=
"ctrl.targetBlur()"
>
</select>
</li>
<li
class=
"tight-form-item query-keyword"
style=
"width: 59px"
ng-if=
"ctrl.tsdbVersion == 2"
>
Fill
</li>
</div>
</div>
<li
ng-if=
"ctrl.tsdbVersion == 2"
>
<select
ng-model=
"ctrl.target.downsampleFillPolicy"
class=
"tight-form-input input-small"
<div
class=
"gf-form"
ng-if=
"ctrl.tsdbVersion == 2"
>
<label
class=
"gf-form-label query-keyword width-6"
>
Fill
</label>
<div
class=
"gf-form-select-wrapper"
>
<select
ng-model=
"ctrl.target.downsampleFillPolicy"
class=
"gf-form-input"
ng-options=
"agg for agg in ctrl.fillPolicies"
ng-change=
"ctrl.targetBlur()"
>
</select>
</li>
</div>
</div>
<gf-form-switch
class=
"gf-form"
label=
"Disable downsampling"
checked=
"ctrl.target.disableDownsampling"
on-change=
"ctrl.targetBlur()"
>
</gf-form-switch>
<li
class=
"tight-form-item query-keyword"
>
Disable downsampling
<editor-checkbox
text=
""
model=
"ctrl.target.disableDownsampling"
change=
"ctrl.targetBlur()"
></editor-checkbox>
</li>
<div
class=
"gf-form gf-form--grow"
>
<div
class=
"gf-form-label gf-form-label--grow"
></div>
</div>
</div>
</ul>
<div
class=
"clearfix"
></div>
</div>
<div
class=
"gf-form-inline"
ng-if=
"ctrl.tsdbVersion == 2"
>
<div
class=
"gf-form"
>
<div
class=
"tight-form"
ng-if=
"ctrl.tsdbVersion == 2"
>
<ul
class=
"tight-form-list"
role=
"menu"
>
<li
class=
"tight-form-item tight-form-align query-keyword"
style=
"width: 100px"
>
<label
class=
"gf-form-label query-keyword width-8"
>
Filters
<tip
ng-if=
"ctrl.tsdbVersion == 2"
>
Filters does not work with tags, either of the two will work but not both.
</tip>
</li>
<li
ng-repeat=
"fil in ctrl.target.filters track by $index"
class=
"tight-form-item"
>
<info-popover
mode=
"right-normal"
>
Filters does not work with tags, either of the two will work but not both.
</info-popover>
</label>
<div
ng-repeat=
"fil in ctrl.target.filters track by $index"
class=
"gf-form-label"
>
{{fil.tagk}}
=
{{fil.type}}
(
{{fil.filter}}
) ,
groupBy
=
{{fil.groupBy}}
<a
ng-click=
"ctrl.editFilter(fil, $index)"
>
<i
class=
"fa fa-pencil"
></i>
...
...
@@ -96,55 +108,72 @@
<a
ng-click=
"ctrl.removeFilter($index)"
>
<i
class=
"fa fa-remove"
></i>
</a>
</li
>
<li
class=
"tight-form-item
query-keyword"
ng-hide=
"ctrl.addFilterMode"
>
</div
>
<label
class=
"gf-form-label
query-keyword"
ng-hide=
"ctrl.addFilterMode"
>
<a
ng-click=
"ctrl.addFilter()"
>
<i
class=
"fa fa-plus"
></i>
</a>
</li>
</label>
</div>
<li
class=
"query-keyword"
ng-show=
"ctrl.addFilterMode"
>
<input
type=
"text"
class=
"input-small tight-form-input"
spellcheck=
'false'
<div
class=
"gf-form-inline"
ng-show=
"ctrl.addFilterMode"
>
<div
class=
"gf-form"
>
<input
type=
"text"
class=
"gf-form-input"
spellcheck=
'false'
bs-typeahead=
"ctrl.suggestTagKeys"
data-min-length=
0
data-items=
100
ng-model=
"ctrl.target.currentFilterKey"
placeholder=
"key"
></input>
ng-model=
"ctrl.target.currentFilterKey"
placeholder=
"key"
>
</input>
</div>
Type
<select
ng-model=
"ctrl.target.currentFilterType"
class=
"tight-form-input input-small"
ng-options=
"filType for filType in ctrl.filterTypes"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label"
>
Type
</label>
<div
class=
"gf-form-select-wrapper"
>
<select
ng-model=
"ctrl.target.currentFilterType"
class=
"gf-form-input"
ng-options=
"filType for filType in ctrl.filterTypes"
>
</select>
</div>
</div>
<input
type=
"text"
class=
"input-small tight-form-input"
spellcheck=
'false'
bs-typeahead=
"ctrl.suggestTagValues"
data-min-length=
0
data-items=
100
ng-model=
"ctrl.target.currentFilterValue"
placeholder=
"filter"
>
<div
class=
"gf-form"
>
<input
type=
"text"
class=
"gf-form-input"
spellcheck=
'false'
bs-typeahead=
"ctrl.suggestTagValues"
data-min-length=
0
data-items=
100
ng-model=
"ctrl.target.currentFilterValue"
placeholder=
"filter"
>
</input>
</div>
groupBy
<editor-checkbox
text=
""
model=
"ctrl.target.currentFilterGroupBy"
></editor-checkbox>
<gf-form-switch
class=
"gf-form"
label=
"Group by"
checked=
"ctrl.target.currentFilterGroupBy"
on-change=
"ctrl.targetBlur()"
>
</gf-form-switch>
<a
bs-tooltip=
"ctrl.errors.filters"
style=
"color: rgb(229, 189, 28)"
ng-show=
"ctrl.errors.filters"
>
<div
class=
"gf-form"
ng-show=
"ctrl.addFilterMode"
>
<label
class=
"gf-form-label"
ng-show=
"ctrl.errors.filters"
>
<a
bs-tooltip=
"ctrl.errors.filters"
style=
"color: rgb(229, 189, 28)"
>
<i
class=
"fa fa-warning"
></i>
</a>
</label>
<a
ng-click=
"ctrl.addFilter()"
ng-hide=
"ctrl.errors.filters"
>
add filter
</a>
<label
class=
"gf-form-label"
>
<a
ng-click=
"ctrl.addFilter()"
ng-hide=
"ctrl.errors.filters"
>
add filter
</a>
<a
ng-click=
"ctrl.closeAddFilterMode()"
>
<i
class=
"fa fa-remove"
></i>
</a>
</label>
</div>
</div>
</li
>
</ul
>
<div
class=
"clearfix"
>
</div>
</div>
<div
class=
"gf-form gf-form--grow"
>
<div
class=
"gf-form-label gf-form-label--grow"
></div
>
</div>
</div>
<div
class=
"tight-form
"
>
<ul
class=
"tight-form-list"
role=
"menu
"
>
<li
class=
"tight-form-item tight-form-align query-keyword"
style=
"width: 100px
"
>
<div
class=
"gf-form-inline
"
>
<div
class=
"gf-form
"
>
<label
class=
"gf-form-label query-keyword width-8
"
>
Tags
<tip
ng-if=
"ctrl.tsdbVersion == 2"
>
Please use filters, tags are deprecated in opentsdb 2.2
</tip>
</li>
<li
ng-repeat=
"(key, value) in ctrl.target.tags track by $index"
class=
"tight-form-item"
>
<info-popover
mode=
"right-normal"
ng-if=
"ctrl.tsdbVersion == 2"
>
Please use filters, tags are deprecated in opentsdb 2.2
</info-popover>
</label>
</div>
<div
class=
"gf-form"
ng-repeat=
"(key, value) in ctrl.target.tags track by $index"
class=
"gf-form"
>
<label
class=
"gf-form-label"
>
{{key}}
=
{{value}}
<a
ng-click=
"ctrl.editTag(key, value)"
>
<i
class=
"fa fa-pencil"
></i>
...
...
@@ -152,72 +181,75 @@
<a
ng-click=
"ctrl.removeTag(key)"
>
<i
class=
"fa fa-remove"
></i>
</a>
</li>
<li
class=
"tight-form-item query-keyword"
ng-hide=
"ctrl.addTagMode"
>
<a
ng-click=
"ctrl.addTag()"
>
<i
class=
"fa fa-plus"
></i>
</a>
</li>
<li
ng-show=
"ctrl.addTagMode"
>
<input
type=
"text"
class=
"input-small tight-form-input"
spellcheck=
'false'
</label>
</div>
<div
class=
"gf-form"
ng-hide=
"ctrl.addTagMode"
>
<label
class=
"gf-form-label query-keyword"
>
<a
ng-click=
"ctrl.addTag()"
><i
class=
"fa fa-plus"
></i></a>
</label>
</div>
<div
class=
"gf-form"
ng-show=
"ctrl.addTagMode"
>
<input
type=
"text"
class=
"gf-form-input"
spellcheck=
'false'
bs-typeahead=
"ctrl.suggestTagKeys"
data-min-length=
0
data-items=
100
ng-model=
"ctrl.target.currentTagKey"
placeholder=
"key"
></input>
ng-model=
"ctrl.target.currentTagKey"
placeholder=
"key"
>
</input>
<input
type=
"text"
class=
"
input-small tight
-form-input"
<input
type=
"text"
class=
"
gf
-form-input"
spellcheck=
'false'
bs-typeahead=
"ctrl.suggestTagValues"
data-min-length=
0
data-items=
100
ng-model=
"ctrl.target.currentTagValue"
placeholder=
"value"
>
</input>
<a
bs-tooltip=
"ctrl.errors.tags"
style=
"color: rgb(229, 189, 28)"
ng-show=
"ctrl.errors.tags"
>
<label
class=
"gf-form-label"
ng-show=
"ctrl.errors.tags"
>
<a
bs-tooltip=
"ctrl.errors.tags"
style=
"color: rgb(229, 189, 28)"
>
<i
class=
"fa fa-warning"
></i>
</a>
<a
ng-click=
"ctrl.addTag()"
ng-hide=
"ctrl.errors.tags"
>
add tag
</a>
<a
ng-click=
"ctrl.closeAddTagMode()"
>
<i
class=
"fa fa-remove"
></i>
</a>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
role=
"menu"
>
<li
class=
"tight-form-item tight-form-align query-keyword"
style=
"width: 100px"
>
Rate
<editor-checkbox
text=
""
model=
"ctrl.target.shouldComputeRate"
change=
"ctrl.targetBlur()"
></editor-checkbox>
</li>
<li
class=
"tight-form-item query-keyword"
ng-hide=
"!ctrl.target.shouldComputeRate"
>
Counter
<editor-checkbox
text=
""
model=
"ctrl.target.isCounter"
change=
"ctrl.targetBlur()"
></editor-checkbox>
</li>
<li
class=
"tight-form-item query-keyword"
ng-hide=
"!ctrl.target.isCounter || !ctrl.target.shouldComputeRate"
>
Counter Max:
</li>
<li
ng-hide=
"!ctrl.target.isCounter || !ctrl.target.shouldComputeRate"
>
<input
type=
"text"
class=
"tight-form-input input-small"
ng-disabled=
"!ctrl.target.shouldComputeRate"
</label>
<label
class=
"gf-form-label"
>
<a
ng-click=
"ctrl.addTag()"
ng-hide=
"ctrl.errors.tags"
>
add tag
</a>
<a
ng-click=
"ctrl.closeAddTagMode()"
><i
class=
"fa fa-remove"
></i></a>
</label>
</div>
<div
class=
"gf-form gf-form--grow"
>
<div
class=
"gf-form-label gf-form-label--grow"
></div>
</div>
</div>
<div
class=
"gf-form-inline"
>
<gf-form-switch
class=
"gf-form"
label=
"Rate"
label-class=
"width-8"
checked=
"ctrl.target.shouldComputeRate"
on-change=
"ctrl.targetBlur()"
>
</gf-form-switch>
<gf-form-switch
ng-hide=
"!ctrl.target.shouldComputeRate"
class=
"gf-form"
label=
"Counter"
checked=
"ctrl.target.isCounter"
on-change=
"ctrl.targetBlur()"
>
</gf-form-switch>
<div
class=
"gf-form"
ng-hide=
"!ctrl.target.isCounter || !ctrl.target.shouldComputeRate"
>
<label
class=
"gf-form-label"
>
Counter Max
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-disabled=
"!ctrl.target.shouldComputeRate"
ng-model=
"ctrl.target.counterMax"
spellcheck=
'false'
placeholder=
"max value"
ng-model-onblur
ng-blur=
"ctrl.targetBlur()"
></input>
</li>
<li
class=
"tight-form-item query-keyword"
ng-hide=
"!ctrl.target.isCounter || !ctrl.target.shouldComputeRate"
>
Reset Value:
</li>
<li
ng-hide=
"!ctrl.target.isCounter || !ctrl.target.shouldComputeRate"
>
<input
type=
"text"
class=
"tight-form-input input-small"
ng-disabled=
"!ctrl.target.shouldComputeRate"
ng-blur=
"ctrl.targetBlur()"
>
</input>
<label
class=
"gf-form-label"
>
Reset Value
</label>
<input
type=
"text"
class=
"tight-form-input input-small"
ng-disabled=
"!ctrl.target.shouldComputeRate"
ng-model=
"ctrl.target.counterResetValue"
spellcheck=
'false'
placeholder=
"reset value"
ng-model-onblur
ng-blur=
"ctrl.targetBlur()"
></input>
</li>
</ul>
ng-blur=
"ctrl.targetBlur()"
>
</input>
</div>
<div
class=
"gf-form gf-form--grow"
>
<div
class=
"gf-form-label gf-form-label--grow"
></div>
</div>
</div>
</query-editor-row>
<div
class=
"clearfix"
></div>
</div>
public/sass/components/_gf-form.scss
View file @
7b560f90
...
...
@@ -235,7 +235,7 @@ $gf-form-margin: 0.25rem;
margin-bottom
:
2px
;
}
.gf-form-switch
input
,
.gf-form-switch
,
.gf-form-switch
label
,
.gf-form-input
,
.gf-form-select-wrapper
,
...
...
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