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
6d2af0d8
Commit
6d2af0d8
authored
Feb 28, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added share link for ES stored dashboards
parent
430bdd03
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
2 deletions
+29
-2
panels/dashcontrol/load.html
+2
-0
panels/dashcontrol/module.html
+3
-2
panels/dashcontrol/module.js
+9
-0
panels/dashcontrol/save.html
+1
-0
panels/dashcontrol/share.html
+14
-0
No files found.
panels/dashcontrol/load.html
View file @
6d2af0d8
<div>
<div>
<a
class=
"close"
ng-click=
"dismiss()"
href=
""
>
×
</a>
<a
class=
"close"
ng-click=
"dismiss()"
href=
""
>
×
</a>
<h4>
Load
</h4>
<div
ng-show=
'panel.load.local'
>
<div
ng-show=
'panel.load.local'
>
<h5>
Local File
</h5>
<h5>
Local File
</h5>
<form>
<form>
...
@@ -32,6 +33,7 @@
...
@@ -32,6 +33,7 @@
<tr
ng-repeat=
"dashboard in elasticsearch.dashboards"
>
<tr
ng-repeat=
"dashboard in elasticsearch.dashboards"
>
<td><a
ng-click=
"delete_elasticsearch(dashboard)"
><i
class=
"icon-remove"
></i></a></td>
<td><a
ng-click=
"delete_elasticsearch(dashboard)"
><i
class=
"icon-remove"
></i></a></td>
<td><a
ng-click=
"dash_load(dashboard['_source']['dashboard'])"
>
{{dashboard._id}}
</a></td>
<td><a
ng-click=
"dash_load(dashboard['_source']['dashboard'])"
>
{{dashboard._id}}
</a></td>
<td><a><i
class=
"icon-share"
ng-click=
"share_link(dashboard._id,'elasticsearch',dashboard._id)"
bs-modal=
"'panels/dashcontrol/share.html'"
></i></a></td>
</tr>
</tr>
</table>
</table>
</div>
</div>
...
...
panels/dashcontrol/module.html
View file @
6d2af0d8
<kibana-panel
ng-controller=
'dashcontrol'
>
<kibana-panel
ng-controller=
'dashcontrol'
>
<label
class=
'small'
>
Dashboard Control
</label>
<label
class=
'small'
>
Dashboard Control
</label>
<button
class=
'btn'
ng-show=
"panel.load.gist || panel.load.elasticsearch || panel.load.local"
data-placement=
"bottom"
data-unique=
"1"
ng-click=
"elasticsearch_dblist(elasticsearch.query)"
bs-popover=
"'panels/dashcontrol/load.html'"
><i
class=
'icon-folder-open'
></i>
Load
<i
class=
'icon-caret-down'
></i></button>
<button
class=
'btn'
ng-show=
"panel.load.gist || panel.load.elasticsearch || panel.load.local"
data-placement=
"bottom"
data-unique=
"1"
ng-click=
"elasticsearch_dblist(elasticsearch.query)"
bs-popover=
"'panels/dashcontrol/load.html'"
><i
class=
'icon-folder-open'
></i>
<i
class=
'icon-caret-down'
></i></button>
<button
class=
'btn'
ng-show=
"panel.save.gist || panel.save.elasticsearch || panel.save.local || panel.save.default"
data-placement=
"bottom"
data-unique=
"1"
bs-popover=
"'panels/dashcontrol/save.html'"
><i
class=
'icon-save'
></i>
Save
<i
class=
'icon-caret-down'
></i></button>
<button
class=
'btn'
ng-show=
"panel.save.gist || panel.save.elasticsearch || panel.save.local || panel.save.default"
data-placement=
"bottom"
data-unique=
"1"
bs-popover=
"'panels/dashcontrol/save.html'"
><i
class=
'icon-save'
></i>
<i
class=
'icon-caret-down'
></i></button>
</kibana-panel>
</kibana-panel>
\ No newline at end of file
panels/dashcontrol/module.js
View file @
6d2af0d8
...
@@ -89,6 +89,15 @@ angular.module('kibana.dashcontrol', [])
...
@@ -89,6 +89,15 @@ angular.module('kibana.dashcontrol', [])
}
}
}
}
$scope
.
share_link
=
function
(
title
,
type
,
id
)
{
$scope
.
share
=
{
location
:
location
.
href
.
replace
(
location
.
hash
,
""
),
type
:
type
,
id
:
id
,
link
:
location
.
href
.
replace
(
location
.
hash
,
""
)
+
"#dashboard/"
+
type
+
"/"
+
id
};
}
$scope
.
purge
=
function
()
{
$scope
.
purge
=
function
()
{
if
(
Modernizr
.
localstorage
)
{
if
(
Modernizr
.
localstorage
)
{
localStorage
[
'dashboard'
]
=
''
;
localStorage
[
'dashboard'
]
=
''
;
...
...
panels/dashcontrol/save.html
View file @
6d2af0d8
<div>
<div>
<a
class=
"close"
ng-click=
"dismiss()"
href=
""
>
×
</a>
<a
class=
"close"
ng-click=
"dismiss()"
href=
""
>
×
</a>
<h4>
Save
</h4>
<div
ng-show=
"panel.save.default || panel.save.local"
>
<div
ng-show=
"panel.save.default || panel.save.local"
>
<h5>
Locally
</h5>
<h5>
Locally
</h5>
<form>
<form>
...
...
panels/dashcontrol/share.html
0 → 100644
View file @
6d2af0d8
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h3>
{{share.id}}
<small>
shareable link
</small></h3>
</div>
<div
class=
"modal-body"
>
<label>
Share this dashboard with this URL
</label>
<input
ng-model=
'share.link'
type=
"text"
style=
"width:90%"
onclick=
"this.select()"
onfocus=
"this.select()"
ng-change=
"share_link(share.type,share.id)"
>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-success"
ng-click=
"dismiss();$broadcast('render')"
>
Close
</button>
</div>
\ No newline at end of file
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