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
a8570135
Commit
a8570135
authored
Feb 18, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made dashcontrol es index configurable
parent
c72053a0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
panels/dashcontrol/editor.html
+6
-2
panels/dashcontrol/module.js
+4
-3
panels/table/module.html
+1
-0
No files found.
panels/dashcontrol/editor.html
View file @
a8570135
...
...
@@ -25,8 +25,11 @@
<div
class=
"span2"
>
<label
class=
"small"
>
Elasticsearch
</label><input
type=
"checkbox"
ng-model=
"panel.load.elasticsearch"
ng-checked=
"panel.load.elasticsearch"
>
</div>
<div
class=
"span4"
ng-show=
"panel.load.elasticsearch"
>
<label
class=
"small"
>
Elasticsearch list size
</label><input
class=
"input-small"
type=
"number"
ng-model=
"panel.elasticsearch_size"
>
<div
class=
"span3"
ng-show=
"panel.load.elasticsearch"
>
<label
class=
"small"
>
ES list size
</label><input
class=
"input-mini"
type=
"number"
ng-model=
"panel.elasticsearch_size"
>
</div>
<div
class=
"span3"
ng-show=
"panel.load.elasticsearch"
>
<label
class=
"small"
>
ES store index
</label><input
class=
"input-small"
type=
"text"
ng-model=
"panel.elasticsearch_saveto"
>
</div>
</div>
</div>
\ No newline at end of file
panels/dashcontrol/module.js
View file @
a8570135
...
...
@@ -18,6 +18,7 @@ angular.module('kibana.dashcontrol', [])
local
:
true
,
},
elasticsearch_size
:
20
,
elasticsearch_saveto
:
'kibana-int'
}
_
.
defaults
(
$scope
.
panel
,
_d
);
...
...
@@ -61,7 +62,7 @@ angular.module('kibana.dashcontrol', [])
$scope
.
save_elasticsearch
=
function
()
{
var
save
=
_
.
clone
(
$scope
.
dashboards
)
save
.
title
=
$scope
.
elasticsearch
.
title
;
var
result
=
$scope
.
ejs
.
Document
(
'kibana-int'
,
'dashboard'
,
save
.
title
).
source
({
var
result
=
$scope
.
ejs
.
Document
(
$scope
.
panel
.
elasticsearch_saveto
,
'dashboard'
,
save
.
title
).
source
({
user
:
'guest'
,
group
:
'guest'
,
title
:
save
.
title
,
...
...
@@ -75,7 +76,7 @@ angular.module('kibana.dashcontrol', [])
}
$scope
.
delete_elasticsearch
=
function
(
dashboard
)
{
var
result
=
$scope
.
ejs
.
Document
(
'kibana-int'
,
'dashboard'
,
dashboard
.
_id
).
doDelete
();
var
result
=
$scope
.
ejs
.
Document
(
$scope
.
panel
.
elasticsearch_saveto
,
'dashboard'
,
dashboard
.
_id
).
doDelete
();
result
.
then
(
function
(
result
)
{
$scope
.
alert
(
'Dashboard Deleted'
,
''
,
'success'
,
5000
)
$scope
.
elasticsearch
.
dashboards
=
_
.
without
(
$scope
.
elasticsearch
.
dashboards
,
dashboard
)
...
...
@@ -84,7 +85,7 @@ angular.module('kibana.dashcontrol', [])
$scope
.
elasticsearch_dblist
=
function
(
query
)
{
if
(
$scope
.
panel
.
load
.
elasticsearch
)
{
var
request
=
$scope
.
ejs
.
Request
().
indices
(
'kibana-int'
).
types
(
'dashboard'
);
var
request
=
$scope
.
ejs
.
Request
().
indices
(
$scope
.
panel
.
elasticsearch_saveto
).
types
(
'dashboard'
);
var
results
=
request
.
query
(
$scope
.
ejs
.
QueryStringQuery
(
query
||
'*'
)
).
size
(
$scope
.
panel
.
elasticsearch_size
).
doSearch
();
...
...
panels/table/module.html
View file @
a8570135
...
...
@@ -13,6 +13,7 @@
<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
class=
"small"
ng-show=
"panel.fields.length == 0"
>
No columns configured. You may want to add a
<strong>
fields panel
</strong>
, or click the edit button in the top right of this panel to add some columns
</div>
<table
class=
"table table-condensed table-striped"
ng-style=
"panel.style"
>
<thead>
<th
style=
"white-space:nowrap"
ng-repeat=
"field in panel.fields"
>
...
...
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