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
abeaef71
Commit
abeaef71
authored
Aug 30, 2017
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DashExport: fix View JSON in export menu
ref #9002
parent
54129b13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
public/app/features/dashboard/export/export_modal.ts
+11
-7
public/app/features/dashboard/partials/shareModal.html
+1
-1
No files found.
public/app/features/dashboard/export/export_modal.ts
View file @
abeaef71
...
@@ -12,13 +12,14 @@ import {DashboardExporter} from './exporter';
...
@@ -12,13 +12,14 @@ import {DashboardExporter} from './exporter';
export
class
DashExportCtrl
{
export
class
DashExportCtrl
{
dash
:
any
;
dash
:
any
;
exporter
:
DashboardExporter
;
exporter
:
DashboardExporter
;
dismiss
:
()
=>
void
;
/** @ngInject */
/** @ngInject */
constructor
(
private
backendSrv
,
dashboardSrv
,
datasourceSrv
,
$scope
)
{
constructor
(
private
backendSrv
,
private
dashboardSrv
,
datasourceSrv
,
private
$scope
)
{
this
.
exporter
=
new
DashboardExporter
(
datasourceSrv
);
this
.
exporter
=
new
DashboardExporter
(
datasourceSrv
);
this
.
exporter
.
makeExportable
(
dashboardSrv
.
getCurrent
()).
then
(
dash
=>
{
this
.
exporter
.
makeExportable
(
this
.
dashboardSrv
.
getCurrent
()).
then
(
dash
=>
{
$scope
.
$apply
(()
=>
{
this
.
$scope
.
$apply
(()
=>
{
this
.
dash
=
dash
;
this
.
dash
=
dash
;
});
});
});
});
...
@@ -31,11 +32,13 @@ export class DashExportCtrl {
...
@@ -31,11 +32,13 @@ export class DashExportCtrl {
}
}
saveJson
()
{
saveJson
()
{
var
html
=
angular
.
toJson
(
this
.
dash
,
true
);
var
clone
=
this
.
dashboardSrv
.
getCurrent
().
getSaveModelClone
();
var
uri
=
"data:application/json,"
+
encodeURIComponent
(
html
);
var
newWindow
=
window
.
open
(
uri
);
}
this
.
$scope
.
$root
.
appEvent
(
'show-json-editor'
,
{
object
:
clone
,
});
this
.
dismiss
();
}
}
}
export
function
dashExportDirective
()
{
export
function
dashExportDirective
()
{
...
@@ -45,6 +48,7 @@ export function dashExportDirective() {
...
@@ -45,6 +48,7 @@ export function dashExportDirective() {
controller
:
DashExportCtrl
,
controller
:
DashExportCtrl
,
bindToController
:
true
,
bindToController
:
true
,
controllerAs
:
'ctrl'
,
controllerAs
:
'ctrl'
,
scope
:
{
dismiss
:
"&"
}
};
};
}
}
...
...
public/app/features/dashboard/partials/shareModal.html
View file @
abeaef71
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
</script>
</script>
<script
type=
"text/ng-template"
id=
"shareExport.html"
>
<script
type=
"text/ng-template"
id=
"shareExport.html"
>
<
dash
-
export
-
modal
><
/dash-export-modal
>
<
dash
-
export
-
modal
dismiss
=
"dismiss()"
><
/dash-export-modal
>
</script>
</script>
<script
type=
"text/ng-template"
id=
"shareLinkOptions.html"
>
<script
type=
"text/ng-template"
id=
"shareLinkOptions.html"
>
...
...
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