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
d2239427
Commit
d2239427
authored
Mar 29, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux(): big progress on updating query editors
parent
24a7d4f8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
53 deletions
+85
-53
public/app/features/panel/partials/query_editor_row.html
+3
-2
public/app/plugins/datasource/influxdb/partials/query.editor.html
+30
-46
public/app/plugins/datasource/influxdb/partials/query_part.html
+1
-1
public/sass/_grafana.scss
+1
-0
public/sass/components/_gf-form.scss
+34
-4
public/sass/components/_query_part.scss
+16
-0
No files found.
public/app/features/panel/partials/query_editor_row.html
View file @
d2239427
<div
class=
"gf-form-
inline
"
>
<div
class=
"gf-form-
query
"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label"
>
{{ctrl.target.refId}}
...
...
@@ -9,7 +9,8 @@
</a>
</label>
</div>
<div
ng-transclude
style=
"max-width: 100%; flex-grow: 10;"
>
<div
ng-transclude
class=
"gf-form-query-content"
>
</div>
<div
class=
"gf-form"
>
...
...
public/app/plugins/datasource/influxdb/partials/query.editor.html
View file @
d2239427
<query-editor-row
ctrl=
"ctrl"
>
<div
ng-hide=
"ctrl.target.rawQuery"
class=
"gf-form-inline"
>
<div
class=
"gf-form"
ng-show=
"ctrl.target.rawQuery"
>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.query"
spellcheck=
"false"
ng-blur=
"ctrl.refresh()"
></input>
</div>
<div
ng-hide=
"ctrl.target.rawQuery"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label query-keyword width-7"
>
FROM
</label>
<metric-segment
segment=
"ctrl.policySegment"
get-options=
"ctrl.getPolicySegments()"
on-change=
"ctrl.policyChanged()"
></metric-segment>
<metric-segment
segment=
"ctrl.measurementSegment"
get-options=
"ctrl.getMeasurements()"
on-change=
"ctrl.measurementChanged()"
></metric-segment>
</div>
<label
class=
"gf-form-label query-keyword"
>
WHERE
</label>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label query-keyword"
>
WHERE
</label>
<div
ng-repeat=
"segment in ctrl.tagSegments"
>
<metric-segment
segment=
"segment"
get-options=
"ctrl.getTagsOrValues(segment, $index)"
on-change=
"ctrl.tagSegmentUpdated(segment, $index)"
></metric-segment>
</div>
</div>
<div
class=
"gf-form"
ng-show=
"ctrl.target.rawQuery"
>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.query"
spellcheck=
"false"
ng-blur=
"ctrl.refresh()"
></input>
<div
class=
"gf-form-filler"
></div>
</div>
</query-editor-row>
<div
ng-hide=
"ctrl.target.rawQuery"
>
<div
class=
"gf-form-inline query-editor-secondary-row"
ng-repeat=
"selectParts in ctrl.queryModel.selectModels"
>
<div
class=
"gf-form-inline"
ng-repeat=
"selectParts in ctrl.queryModel.selectModels"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label query-keyword width-7"
>
<span
ng-show=
"$index === 0"
>
SELECT
</span>
</label>
</div>
<div
class=
"gf-form"
ng-repeat=
"part in selectParts"
>
<influx-query-part-editor
ng-repeat=
"part in selectParts"
class=
"gf-form-label tight-form-func"
class=
"gf-form-label query-part"
part=
"part"
remove-action=
"ctrl.removeSelectPart(selectParts, part)"
part-updated=
"ctrl.selectPartUpdated(selectParts, part)"
get-options=
"ctrl.getPartOptions(part)"
>
</influx-query-part-editor>
</div>
<div
class=
"gf-form"
>
<label
class=
"dropdown"
dropdown-typeahead=
"ctrl.selectMenu"
dropdown-typeahead-on-select=
"ctrl.addSelectPart(selectParts, $item, $subItem)"
>
</label>
</div>
<div
class=
"gf-form-filler"
></div>
</div>
<div
class=
"gf-form-inline query-editor-secondary-row"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label query-keyword width-7"
>
<span>
GROUP BY
</span>
</label>
<influx-query-part-editor
ng-repeat=
"part in ctrl.queryModel.groupByParts"
part=
"part"
class=
"gf-form-label tight-form-func
"
class=
"gf-form-label query-part
"
remove-action=
"ctrl.removeGroupByPart(part, $index)"
part-updated=
"ctrl.refresh();"
get-options=
"ctrl.getPartOptions(part)"
>
</influx-query-part-editor>
<metric-segment
segment=
"ctrl.groupBySegment"
get-options=
"ctrl.getGroupByOptions()"
on-change=
"ctrl.groupByAction(part, $index)"
></metric-segment>
</div>
</div>
<div
ng-hide=
"ctrl.target.rawQuery"
ng-if=
"false"
>
<div
class=
"tight-form"
ng-repeat=
"selectParts in ctrl.queryModel.selectModels"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item query-keyword tight-form-align"
style=
"width: 75px;"
>
<span
ng-show=
"$index === 0"
>
SELECT
</span>
</li>
<li
ng-repeat=
"part in selectParts"
>
<influx-query-part-editor
part=
"part"
class=
"tight-form-item tight-form-func"
remove-action=
"ctrl.removeSelectPart(selectParts, part)"
part-updated=
"ctrl.selectPartUpdated(selectParts, part)"
get-options=
"ctrl.getPartOptions(part)"
></influx-query-part-editor>
</li>
<li
class=
"dropdown"
dropdown-typeahead=
"ctrl.selectMenu"
dropdown-typeahead-on-select=
"ctrl.addSelectPart(selectParts, $item, $subItem)"
>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item query-keyword tight-form-align"
style=
"width: 75px;"
>
<span>
GROUP BY
</span>
</li>
<li
ng-repeat=
"part in ctrl.queryModel.groupByParts"
>
<influx-query-part-editor
part=
"part"
class=
"tight-form-item tight-form-func"
remove-action=
"ctrl.removeGroupByPart(part, $index)"
part-updated=
"ctrl.refresh();"
get-options=
"ctrl.getPartOptions(part)"
></influx-query-part-editor>
</li>
<li>
<metric-segment
segment=
"ctrl.groupBySegment"
get-options=
"ctrl.getGroupByOptions()"
on-change=
"ctrl.groupByAction(part, $index)"
></metric-segment>
</li>
</ul>
<div
class=
"clearfix"
></div>
<div
class=
"gf-form-filler"
></div>
</div>
</div>
</div>
<div
class=
"gf-form-inline query-editor-secondary-row
"
>
<div
class=
"gf-form-inline
"
>
<div
class=
"gf-form max-width-30"
>
<label
class=
"gf-form-label query-keyword width-7"
>
ALIAS BY
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.alias"
spellcheck=
'false'
placeholder=
"Naming pattern"
ng-blur=
"ctrl.refresh()"
>
...
...
@@ -101,5 +83,7 @@
<select
class=
"gf-form-input gf-size-auto"
ng-model=
"ctrl.target.resultFormat"
ng-options=
"f.value as f.text for f in ctrl.resultFormats"
ng-change=
"ctrl.refresh()"
></select>
</div>
</div>
</div>
<div
class=
"gf-form-filler"
></div>
</div>
</query-editor-row>
public/app/plugins/datasource/influxdb/partials/query_part.html
View file @
d2239427
...
...
@@ -2,4 +2,4 @@
<span
class=
"pointer fa fa-remove"
ng-click=
"removeActionInternal()"
></span>
</div>
<a
ng-click=
"toggleControls()"
>
{{part.def.type}}
</a><span>
(
</span><span
class=
"query-part-parameters"
></span><span>
)
</span>
<a
ng-click=
"toggleControls()"
class=
"query-part-name"
>
{{part.def.type}}
</a><span>
(
</span><span
class=
"query-part-parameters"
></span><span>
)
</span>
public/sass/_grafana.scss
View file @
d2239427
...
...
@@ -68,6 +68,7 @@
@import
"components/drop"
;
@import
"components/query_editor"
;
@import
"components/tabbed_view"
;
@import
"components/query_part"
;
// PAGES
@import
"pages/login"
;
...
...
public/sass/components/_gf-form.scss
View file @
d2239427
...
...
@@ -49,6 +49,16 @@ $gf-form-margin: 0.25rem;
@include
border-radius
(
$label-border-radius-sm
);
}
.gf-form-filler
{
margin-right
:
$gf-form-margin
;
margin-bottom
:
$gf-form-margin
;
flex-grow
:
1
;
background-color
:
$input-label-bg
;
border
:
$input-btn-border-width
solid
transparent
;
@include
border-radius
(
$label-border-radius-sm
);
}
.gf-form-checkbox
{
flex-shrink
:
0
;
padding
:
$input-padding-y
$input-padding-x
;
...
...
@@ -152,10 +162,6 @@ $gf-form-margin: 0.25rem;
flex-grow
:
0
;
}
.query-editor-secondary-row
{
margin-left
:
5
.2rem
;
}
.gf-form-switch
{
margin-right
:
$gf-form-margin
;
}
...
...
@@ -186,3 +192,27 @@ $gf-form-margin: 0.25rem;
pointer-events
:
none
;
}
}
.gf-form-query
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
nowrap
;
align-content
:
flex-start
;
align-items
:
flex-start
;
.gf-form
,
.gf-form-filler
{
margin-bottom
:
2px
;
}
.gf-form-input
,
.gf-form-select-wrapper
,
.gf-form-filler
,
.gf-form-label
{
margin-right
:
2px
;
}
}
.gf-form-query-content
{
flex-grow
:
1
;
}
public/sass/components/_query_part.scss
0 → 100644
View file @
d2239427
.query-part
{
background-color
:
$input-bg
!
important
;
&
.show-function-controls
{
padding-top
:
5px
;
min-width
:
100px
;
text-align
:
center
;
}
}
.query-part-name
{
}
.query-part-parameters
{
}
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