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
be34417b
Commit
be34417b
authored
May 29, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: refactoring PR #11996 and fixing issue #11551 16706hashkey in json editors
parent
634a26d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
public/app/features/annotations/editor_ctrl.ts
+4
-0
public/app/features/annotations/partials/editor.html
+2
-2
public/app/features/dashboard/save_provisioned_modal.ts
+1
-1
public/app/features/dashboard/settings/settings.ts
+2
-1
No files found.
public/app/features/annotations/editor_ctrl.ts
View file @
be34417b
...
@@ -70,6 +70,10 @@ export class AnnotationsEditorCtrl {
...
@@ -70,6 +70,10 @@ export class AnnotationsEditorCtrl {
this
.
mode
=
'list'
;
this
.
mode
=
'list'
;
}
}
move
(
index
,
dir
)
{
_
.
move
(
this
.
annotations
,
index
,
index
+
dir
);
}
add
()
{
add
()
{
this
.
annotations
.
push
(
this
.
currentAnnotation
);
this
.
annotations
.
push
(
this
.
currentAnnotation
);
this
.
reset
();
this
.
reset
();
...
...
public/app/features/annotations/partials/editor.html
View file @
be34417b
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
<td
class=
"pointer"
ng-click=
"ctrl.edit(annotation)"
>
<td
class=
"pointer"
ng-click=
"ctrl.edit(annotation)"
>
{{annotation.datasource || 'Default'}}
{{annotation.datasource || 'Default'}}
</td>
</td>
<td
style=
"width: 1%"
><i
ng-click=
"
_.move(ctrl.annotations,$index,$index
-1)"
ng-hide=
"$first"
class=
"pointer fa fa-arrow-up"
></i></td>
<td
style=
"width: 1%"
><i
ng-click=
"
ctrl.move($index,
-1)"
ng-hide=
"$first"
class=
"pointer fa fa-arrow-up"
></i></td>
<td
style=
"width: 1%"
><i
ng-click=
"
_.move(ctrl.annotations,$index,$index+
1)"
ng-hide=
"$last"
class=
"pointer fa fa-arrow-down"
></i></td>
<td
style=
"width: 1%"
><i
ng-click=
"
ctrl.move($index,
1)"
ng-hide=
"$last"
class=
"pointer fa fa-arrow-down"
></i></td>
<td
style=
"width: 1%"
>
<td
style=
"width: 1%"
>
<a
ng-click=
"ctrl.removeAnnotation(annotation)"
class=
"btn btn-danger btn-mini"
ng-hide=
"annotation.builtIn"
>
<a
ng-click=
"ctrl.removeAnnotation(annotation)"
class=
"btn btn-danger btn-mini"
ng-hide=
"annotation.builtIn"
>
<i
class=
"fa fa-remove"
></i>
<i
class=
"fa fa-remove"
></i>
...
...
public/app/features/dashboard/save_provisioned_modal.ts
View file @
be34417b
...
@@ -48,7 +48,7 @@ export class SaveProvisionedDashboardModalCtrl {
...
@@ -48,7 +48,7 @@ export class SaveProvisionedDashboardModalCtrl {
constructor
(
dashboardSrv
)
{
constructor
(
dashboardSrv
)
{
this
.
dash
=
dashboardSrv
.
getCurrent
().
getSaveModelClone
();
this
.
dash
=
dashboardSrv
.
getCurrent
().
getSaveModelClone
();
delete
this
.
dash
.
id
;
delete
this
.
dash
.
id
;
this
.
dashboardJson
=
JSON
.
stringify
(
this
.
dash
,
null
,
2
);
this
.
dashboardJson
=
angular
.
toJson
(
this
.
dash
,
true
);
}
}
save
()
{
save
()
{
...
...
public/app/features/dashboard/settings/settings.ts
View file @
be34417b
...
@@ -2,6 +2,7 @@ import { coreModule, appEvents, contextSrv } from 'app/core/core';
...
@@ -2,6 +2,7 @@ import { coreModule, appEvents, contextSrv } from 'app/core/core';
import
{
DashboardModel
}
from
'../dashboard_model'
;
import
{
DashboardModel
}
from
'../dashboard_model'
;
import
$
from
'jquery'
;
import
$
from
'jquery'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
angular
from
'angular'
;
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
export
class
SettingsCtrl
{
export
class
SettingsCtrl
{
...
@@ -118,7 +119,7 @@ export class SettingsCtrl {
...
@@ -118,7 +119,7 @@ export class SettingsCtrl {
this
.
viewId
=
this
.
$location
.
search
().
editview
;
this
.
viewId
=
this
.
$location
.
search
().
editview
;
if
(
this
.
viewId
)
{
if
(
this
.
viewId
)
{
this
.
json
=
JSON
.
stringify
(
this
.
dashboard
.
getSaveModelClone
(),
null
,
2
);
this
.
json
=
angular
.
toJson
(
this
.
dashboard
.
getSaveModelClone
(),
true
);
}
}
if
(
this
.
viewId
===
'settings'
&&
this
.
dashboard
.
meta
.
canMakeEditable
)
{
if
(
this
.
viewId
===
'settings'
&&
this
.
dashboard
.
meta
.
canMakeEditable
)
{
...
...
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