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
d11b17b8
Commit
d11b17b8
authored
Nov 30, 2016
by
Carl Bergquist
Committed by
GitHub
Nov 30, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5677 from bmundt/remove_columns
Added Hidden Column Style for Table Panel
parents
4543bfe5
e17b1548
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletions
+15
-1
public/app/plugins/panel/table/editor.ts
+1
-0
public/app/plugins/panel/table/module.html
+1
-1
public/app/plugins/panel/table/renderer.ts
+13
-0
No files found.
public/app/plugins/panel/table/editor.ts
View file @
d11b17b8
...
...
@@ -39,6 +39,7 @@ export class TablePanelEditorCtrl {
{
text
:
'Number'
,
value
:
'number'
},
{
text
:
'String'
,
value
:
'string'
},
{
text
:
'Date'
,
value
:
'date'
},
{
text
:
'Hidden'
,
value
:
'hidden'
}
];
this
.
fontSizes
=
[
'80%'
,
'90%'
,
'100%'
,
'110%'
,
'120%'
,
'130%'
,
'150%'
,
'160%'
,
'180%'
,
'200%'
,
'220%'
,
'250%'
];
this
.
dateFormats
=
[
...
...
public/app/plugins/panel/table/module.html
View file @
d11b17b8
...
...
@@ -4,7 +4,7 @@
<table
class=
"table-panel-table"
>
<thead>
<tr>
<th
ng-repeat=
"col in ctrl.table.columns"
>
<th
ng-repeat=
"col in ctrl.table.columns"
ng-hide=
"col.hidden"
>
<div
class=
"table-panel-table-header-inner pointer"
ng-click=
"ctrl.toggleColumnSort(col, $index)"
>
{{col.text}}
<span
class=
"table-panel-table-header-controls"
ng-if=
"col.sort"
>
...
...
public/app/plugins/panel/table/renderer.ts
View file @
d11b17b8
...
...
@@ -45,6 +45,12 @@ export class TableRenderer {
return
this
.
defaultCellFormater
;
}
if
(
style
.
type
===
'hidden'
)
{
return
v
=>
{
return
undefined
;
};
}
if
(
style
.
type
===
'date'
)
{
return
v
=>
{
if
(
v
===
undefined
||
v
===
null
)
{
...
...
@@ -123,6 +129,13 @@ export class TableRenderer {
widthHack
=
'<div class="table-panel-width-hack">'
+
this
.
table
.
columns
[
columnIndex
].
text
+
'</div>'
;
}
if
(
value
===
undefined
)
{
style
=
' style="display:none;"'
;
this
.
table
.
columns
[
columnIndex
].
hidden
=
true
;
}
else
{
this
.
table
.
columns
[
columnIndex
].
hidden
=
false
;
}
return
'<td'
+
style
+
'>'
+
value
+
widthHack
+
'</td>'
;
}
...
...
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