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
c17b5d13
Commit
c17b5d13
authored
Aug 02, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
table: minor table options improvement
parent
ede827f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
public/app/plugins/panel/table/editor.html
+9
-1
public/app/plugins/panel/table/editor.ts
+23
-1
No files found.
public/app/plugins/panel/table/editor.html
View file @
c17b5d13
...
...
@@ -17,9 +17,17 @@
<span>
{{column.text}}
</span>
</label>
</div>
<div
class=
"gf-form"
>
<div
class=
"gf-form"
ng-show=
"editor.canSetColumns"
>
<metric-segment
segment=
"editor.addColumnSegment"
get-options=
"editor.getColumnOptions()"
on-change=
"editor.addColumn()"
></metric-segment>
</div>
<div
class=
"gf-form"
ng-hide=
"editor.canSetColumns"
>
<label
class=
"gf-form-label"
>
Auto
<info-popover
mode=
"right-normal"
ng-if=
"editor.columnsHelpMessage"
>
{{editor.columnsHelpMessage}}
</info-popover>
</label>
</div>
</div>
</div>
...
...
public/app/plugins/panel/table/editor.ts
View file @
c17b5d13
...
...
@@ -16,6 +16,8 @@ export class TablePanelEditorCtrl {
fontSizes
:
any
;
addColumnSegment
:
any
;
getColumnNames
:
any
;
canSetColumns
:
boolean
;
columnsHelpMessage
:
string
;
/** @ngInject */
constructor
(
$scope
,
private
$q
,
private
uiSegmentSrv
)
{
...
...
@@ -24,8 +26,27 @@ export class TablePanelEditorCtrl {
this
.
panel
=
this
.
panelCtrl
.
panel
;
this
.
transformers
=
transformers
;
this
.
fontSizes
=
[
'80%'
,
'90%'
,
'100%'
,
'110%'
,
'120%'
,
'130%'
,
'150%'
,
'160%'
,
'180%'
,
'200%'
,
'220%'
,
'250%'
];
this
.
addColumnSegment
=
uiSegmentSrv
.
newPlusButton
();
this
.
updateTransformHints
();
}
updateTransformHints
()
{
this
.
canSetColumns
=
false
;
this
.
columnsHelpMessage
=
''
;
switch
(
this
.
panel
.
transform
)
{
case
"timeseries_aggregations"
:
{
this
.
canSetColumns
=
true
;
break
;
}
case
"json"
:
{
this
.
canSetColumns
=
true
;
break
;
}
case
"table"
:
{
this
.
columnsHelpMessage
=
"Columns and their order are determined by the data query"
;
}
}
}
getColumnOptions
()
{
...
...
@@ -57,6 +78,7 @@ export class TablePanelEditorCtrl {
this
.
panel
.
columns
.
push
({
text
:
'Avg'
,
value
:
'avg'
});
}
this
.
updateTransformHints
();
this
.
render
();
}
...
...
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