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
c72053a0
Commit
c72053a0
authored
Feb 18, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added pagination to table module
parent
4904c7fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
+36
-2
panels/pie/module.js
+1
-1
panels/table/module.html
+28
-1
panels/table/module.js
+7
-0
No files found.
panels/pie/module.js
View file @
c72053a0
...
...
@@ -6,7 +6,7 @@ angular.module('kibana.pie', [])
// Set and populate defaults
var
_d
=
{
query
:
{
field
:
"_all"
,
query
:
"*"
,
goal
:
1
},
size
:
10
0
,
size
:
10
,
exclude
:
[],
donut
:
false
,
tilt
:
false
,
...
...
panels/table/module.html
View file @
c72053a0
<kibana-panel
ng-controller=
'table'
>
<div
style=
"height:{{row.height}};overflow-y:auto;overflow-x:auto"
>
<div
style=
"height:{{row.height}};overflow-y:auto;overflow-x:auto"
>
<div
class=
"row-fluid"
>
<div
class=
"span1 offset3"
style=
"text-align:right"
>
<i
ng-click=
"panel.offset = 0;get_data();"
ng-show=
"panel.offset > 0"
class=
'icon-circle-arrow-left pointer'
></i>
<i
ng-click=
"panel.offset = (panel.offset - panel.size);get_data();"
ng-show=
"panel.offset > 0"
class=
'icon-arrow-left pointer'
></i>
</div>
<div
class=
"span4"
style=
"text-align:center"
>
<strong>
{{panel.offset}}
</strong>
to
<strong>
{{panel.offset + data.length}}
</strong>
<small>
of
&
#8805 {{hits}} hits
</small>
</div>
<div
class=
"span1"
style=
"text-align:left"
>
<i
ng-click=
"panel.offset = (panel.offset + panel.size);get_data();"
ng-show=
"hits > (panel.offset + data.length)"
class=
'icon-arrow-right pointer'
></i>
</div>
</div>
<table
class=
"table table-condensed table-striped"
ng-style=
"panel.style"
>
<thead>
<th
style=
"white-space:nowrap"
ng-repeat=
"field in panel.fields"
>
...
...
@@ -13,5 +26,18 @@
<td
ng-repeat=
"field in panel.fields"
>
{{row['_source'][field]}}
</td>
</tr>
</table>
<div
class=
"row-fluid"
>
<div
class=
"span1 offset3"
style=
"text-align:right"
>
<i
ng-click=
"panel.offset = 0;get_data();"
ng-show=
"panel.offset > 0"
class=
'icon-circle-arrow-left pointer'
></i>
<i
ng-click=
"panel.offset = (panel.offset - panel.size);get_data();"
ng-show=
"panel.offset > 0"
class=
'icon-arrow-left pointer'
></i>
</div>
<div
class=
"span4"
style=
"text-align:center"
>
<strong>
{{panel.offset}}
</strong>
to
<strong>
{{panel.offset + data.length}}
</strong>
<small>
of
&
#8805 {{hits}} hits
</small>
</div>
<div
class=
"span1"
style=
"text-align:left"
>
<i
ng-click=
"panel.offset = (panel.offset + panel.size);get_data();"
ng-show=
"hits > (panel.offset + data.length)"
class=
'icon-arrow-right pointer'
></i>
</div>
</div>
</div>
</kibana-panel>
\ No newline at end of file
panels/table/module.js
View file @
c72053a0
...
...
@@ -7,6 +7,7 @@ angular.module('kibana.table', [])
var
_d
=
{
query
:
"*"
,
size
:
100
,
offset
:
0
,
sort
:
[
'@timestamp'
,
'desc'
],
group
:
"default"
,
style
:
{},
...
...
@@ -54,6 +55,11 @@ angular.module('kibana.table', [])
broadcast_fields
();
}
$scope
.
page
=
function
(
page
)
{
$scope
.
panel
.
offset
=
page
*
$scope
.
panel
.
size
$scope
.
get_data
();
}
$scope
.
get_data
=
function
()
{
// Make sure we have everything for the request to complete
if
(
_
.
isUndefined
(
$scope
.
panel
.
index
)
||
_
.
isUndefined
(
$scope
.
time
))
...
...
@@ -70,6 +76,7 @@ angular.module('kibana.table', [])
)
)
.
size
(
$scope
.
panel
.
size
)
.
from
(
$scope
.
panel
.
offset
)
.
sort
(
$scope
.
panel
.
sort
[
0
],
$scope
.
panel
.
sort
[
1
])
.
doSearch
();
...
...
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