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
05d064ca
Commit
05d064ca
authored
May 17, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
export(): moved to share modal
parent
df50fa23
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
72 deletions
+65
-72
public/app/features/dashboard/dashnav/dashnav.html
+3
-5
public/app/features/dashboard/dashnav/dashnav.ts
+0
-6
public/app/features/dashboard/export/export_modal.html
+52
-59
public/app/features/dashboard/partials/shareModal.html
+4
-0
public/app/features/dashboard/shareModalCtrl.js
+6
-2
No files found.
public/app/features/dashboard/dashnav/dashnav.html
View file @
05d064ca
...
@@ -30,12 +30,12 @@
...
@@ -30,12 +30,12 @@
</li>
</li>
<li>
<li>
<a
class=
"pointer"
ng-click=
"shareDashboard(1)"
>
<a
class=
"pointer"
ng-click=
"shareDashboard(1)"
>
<i
class=
"icon-gf icon-gf-snapshot"
></i>
Snapshot
sharing
<i
class=
"icon-gf icon-gf-snapshot"
></i>
Snapshot
</a>
</a>
</li>
</li>
<li>
<li>
<a
class=
"pointer"
ng-click=
"share
Export(
)"
>
<a
class=
"pointer"
ng-click=
"share
Dashboard(2
)"
>
<i
class=
"fa fa-cloud-upload"
></i>
Export
for sharing
<i
class=
"fa fa-cloud-upload"
></i>
Export
</a>
</a>
</li>
</li>
</ul>
</ul>
...
@@ -49,8 +49,6 @@
...
@@ -49,8 +49,6 @@
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('settings');"
>
Settings
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('settings');"
>
Settings
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('annotations');"
>
Annotations
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('annotations');"
>
Annotations
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('templating');"
>
Templating
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('templating');"
>
Templating
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"exportDashboard();"
>
Export
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"editJson();"
>
View JSON
</a></li>
<li
ng-if=
"contextSrv.isEditor && !dashboard.editable"
><a
class=
"pointer"
ng-click=
"makeEditable();"
>
Make Editable
</a></li>
<li
ng-if=
"contextSrv.isEditor && !dashboard.editable"
><a
class=
"pointer"
ng-click=
"makeEditable();"
>
Make Editable
</a></li>
<li
ng-if=
"contextSrv.isEditor"
><a
class=
"pointer"
ng-click=
"saveDashboardAs();"
>
Save As...
</a></li>
<li
ng-if=
"contextSrv.isEditor"
><a
class=
"pointer"
ng-click=
"saveDashboardAs();"
>
Save As...
</a></li>
<li
ng-if=
"dashboardMeta.canSave"
><a
class=
"pointer"
ng-click=
"deleteDashboard();"
>
Delete dashboard
</a></li>
<li
ng-if=
"dashboardMeta.canSave"
><a
class=
"pointer"
ng-click=
"deleteDashboard();"
>
Delete dashboard
</a></li>
...
...
public/app/features/dashboard/dashnav/dashnav.ts
View file @
05d064ca
...
@@ -59,12 +59,6 @@ export class DashNavCtrl {
...
@@ -59,12 +59,6 @@ export class DashNavCtrl {
$scope
.
shareDashboard
(
1
);
$scope
.
shareDashboard
(
1
);
};
};
$scope
.
shareExport
=
function
()
{
$scope
.
appEvent
(
'show-modal'
,
{
templateHtml
:
'<dash-export-modal></dash-export-modal>'
,
});
};
$scope
.
openSearch
=
function
()
{
$scope
.
openSearch
=
function
()
{
$scope
.
appEvent
(
'show-dash-search'
);
$scope
.
appEvent
(
'show-dash-search'
);
};
};
...
...
public/app/features/dashboard/export/export_modal.html
View file @
05d064ca
<div
class=
"modal-body"
>
<div
class=
"modal-header"
>
<!-- <p> -->
<h2
class=
"modal-header-title"
>
<!-- Exporting will export a cleaned sharable dashboard that can be imported -->
<i
class=
"fa fa-cloud-upload"
></i>
<!-- into another Grafana instance. -->
<span
class=
"p-l-1"
>
Export Dashboard
</span>
<!-- </p> -->
</h2>
<a
class=
"modal-header-close"
ng-click=
"dismiss();"
>
<div
class=
"share-modal-big-icon"
>
<i
class=
"fa fa-remove"
></i>
<i
class=
"fa fa-cloud-upload"
></i>
</a>
</div>
</div>
<div
class=
"modal-content"
ng-cloak
>
<!-- <p> -->
<!-- Exporting will export a cleaned sharable dashboard that can be imported -->
<!-- into another Grafana instance. -->
<!-- </p> -->
<h3
class=
"section-heading"
>
Options
</h3>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-8"
>
Title
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.dash.title"
ng-change=
"ctrl.titleChanged()"
>
<label
class=
"gf-form-label text-success"
ng-show=
"ctrl.dash.title"
>
<i
class=
"fa fa-check"
></i>
</label>
</div>
<div
class=
"gf-form gf-form--grow"
>
<label
class=
"gf-form-label width-8"
>
Description
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.dash.description"
ng-change=
"ctrl.titleChanged()"
>
<label
class=
"gf-form-label text-success"
ng-show=
"ctrl.dash.description"
>
<i
class=
"fa fa-check"
></i>
</label>
</div>
</div>
<!-- <h3 class="section-heading"> -->
<!-- Dashboard data sources -->
<!-- </h3> -->
<!-- -->
<!-- <div class="gf-form-group"> -->
<!-- <div class="gf-form-inline" ng-repeat="input in ctrl.dash.__inputs"> -->
<!-- <div class="gf-form width-25"> -->
<!-- <label class="gf-form-label width-8">Name</label> -->
<!-- <input type="text" class="gf-form-input" ng-model="input.name"> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<div
class=
"gf-form-button-row"
>
<div
class=
"share-snapshot-header"
>
<button
type=
"button"
class=
"btn gf-form-btn width-10 btn-success"
ng-click=
"ctrl.save()"
>
<p
class=
"share-snapshot-info-text"
>
<i
class=
"fa fa-save"
></i>
Save to file
Export the dashboard to a JSON file. The exporter will templatize the
</button>
dashboard's data sources to make it easy for other's to to import and reuse.
<button
type=
"button"
class=
"btn gf-form-btn width-10 btn-secondary"
ng-click=
"ctrl.saveJson()"
>
You can share dashboards on
<a
class=
"external-link"
href=
"https://grafana.net"
>
Grafana.net
</a>
<i
class=
"fa fa-file-text-o"
></i>
View JSON
</p>
</button>
</div>
<a
class=
"btn btn-link"
ng-click=
"dismiss()"
>
Cancel
</a>
</div>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-8"
>
Title
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.dash.title"
ng-change=
"ctrl.titleChanged()"
>
<label
class=
"gf-form-label text-success"
ng-show=
"ctrl.dash.title"
>
<i
class=
"fa fa-check"
></i>
</label>
</div>
<div
class=
"gf-form gf-form--grow"
>
<label
class=
"gf-form-label width-8"
>
Description
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.dash.description"
ng-change=
"ctrl.titleChanged()"
>
<label
class=
"gf-form-label text-success"
ng-show=
"ctrl.dash.description"
>
<i
class=
"fa fa-check"
></i>
</label>
</div>
</div>
</div>
</div>
<!-- <h3 class="section-heading"> -->
<!-- Dashboard data sources -->
<!-- </h3> -->
<!-- -->
<!-- <div class="gf-form-group"> -->
<!-- <div class="gf-form-inline" ng-repeat="input in ctrl.dash.__inputs"> -->
<!-- <div class="gf-form width-25"> -->
<!-- <label class="gf-form-label width-8">Name</label> -->
<!-- <input type="text" class="gf-form-input" ng-model="input.name"> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<div
class=
"gf-form-button-row"
>
<button
type=
"button"
class=
"btn gf-form-btn width-10 btn-success"
ng-click=
"ctrl.save()"
>
<i
class=
"fa fa-save"
></i>
Save to file
</button>
<button
type=
"button"
class=
"btn gf-form-btn width-10 btn-secondary"
ng-click=
"ctrl.saveJson()"
>
<i
class=
"fa fa-file-text-o"
></i>
View JSON
</button>
<a
class=
"btn btn-link"
ng-click=
"dismiss()"
>
Cancel
</a>
</div>
</div>
public/app/features/dashboard/partials/shareModal.html
View file @
05d064ca
...
@@ -45,6 +45,10 @@
...
@@ -45,6 +45,10 @@
<
/div
>
<
/div
>
</script>
</script>
<script
type=
"text/ng-template"
id=
"shareExport.html"
>
<
dash
-
export
-
modal
><
/dash-export-modal
>
</script>
<script
type=
"text/ng-template"
id=
"shareLinkOptions.html"
>
<script
type=
"text/ng-template"
id=
"shareLinkOptions.html"
>
<
div
class
=
"gf-form-group section"
>
<
div
class
=
"gf-form-group section"
>
<
gf
-
form
-
switch
class
=
"gf-form"
<
gf
-
form
-
switch
class
=
"gf-form"
...
...
public/app/features/dashboard/shareModalCtrl.js
View file @
05d064ca
...
@@ -22,11 +22,15 @@ function (angular, _, require, config) {
...
@@ -22,11 +22,15 @@ function (angular, _, require, config) {
$scope
.
modalTitle
=
'Share Panel'
;
$scope
.
modalTitle
=
'Share Panel'
;
$scope
.
tabs
.
push
({
title
:
'Embed'
,
src
:
'shareEmbed.html'
});
$scope
.
tabs
.
push
({
title
:
'Embed'
,
src
:
'shareEmbed.html'
});
}
else
{
}
else
{
$scope
.
modalTitle
=
'Share
Dashboard
'
;
$scope
.
modalTitle
=
'Share'
;
}
}
if
(
!
$scope
.
dashboard
.
meta
.
isSnapshot
)
{
if
(
!
$scope
.
dashboard
.
meta
.
isSnapshot
)
{
$scope
.
tabs
.
push
({
title
:
'Snapshot sharing'
,
src
:
'shareSnapshot.html'
});
$scope
.
tabs
.
push
({
title
:
'Snapshot'
,
src
:
'shareSnapshot.html'
});
}
if
(
!
$scope
.
dashboard
.
meta
.
isSnapshot
)
{
$scope
.
tabs
.
push
({
title
:
'Export'
,
src
:
'shareExport.html'
});
}
}
$scope
.
buildUrl
();
$scope
.
buildUrl
();
...
...
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