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
85382dc2
Commit
85382dc2
authored
Nov 24, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(table): fixed table height alignment
parent
7315a0ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
public/app/panels/table/module.ts
+8
-6
No files found.
public/app/panels/table/module.ts
View file @
85382dc2
...
...
@@ -19,6 +19,7 @@ export function tablePanel() {
link
:
function
(
scope
,
elem
)
{
var
data
;
var
panel
=
scope
.
panel
;
var
pageCount
=
0
;
var
formaters
=
[];
function
getTableHeight
()
{
...
...
@@ -26,8 +27,11 @@ export function tablePanel() {
if
(
_
.
isString
(
panelHeight
))
{
panelHeight
=
parseInt
(
panelHeight
.
replace
(
'px'
,
''
),
10
);
}
if
(
pageCount
>
1
)
{
panelHeight
-=
28
;
}
return
(
panelHeight
-
4
0
)
+
'px'
;
return
(
panelHeight
-
6
0
)
+
'px'
;
}
function
appendTableRows
(
tbodyElem
)
{
...
...
@@ -46,7 +50,7 @@ export function tablePanel() {
footerElem
.
empty
();
var
pageSize
=
panel
.
pageSize
||
100
;
var
pageCount
=
Math
.
ceil
(
data
.
rows
.
length
/
pageSize
);
pageCount
=
Math
.
ceil
(
data
.
rows
.
length
/
pageSize
);
if
(
pageCount
===
1
)
{
return
;
}
...
...
@@ -73,12 +77,10 @@ export function tablePanel() {
appendTableRows
(
tbodyElem
);
rootElem
.
css
({
'max-height'
:
panel
.
scroll
?
getTableHeight
()
:
''
});
container
.
css
({
'font-size'
:
panel
.
fontSize
});
appendPaginationControls
(
footerElem
);
rootElem
.
css
({
'max-height'
:
panel
.
scroll
?
getTableHeight
()
:
''
});
}
elem
.
on
(
'click'
,
'.table-panel-page-link'
,
switchPage
);
...
...
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