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
7fc9921b
Unverified
Commit
7fc9921b
authored
Apr 16, 2020
by
Torkel Ödegaard
Committed by
GitHub
Apr 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed share json (#23607)
parent
5fc255bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
public/app/core/controllers/all.ts
+1
-0
public/app/core/controllers/json_editor_ctrl.ts
+20
-0
No files found.
public/app/core/controllers/all.ts
View file @
7fc9921b
...
...
@@ -2,3 +2,4 @@ import './invited_ctrl';
import
'./signup_ctrl'
;
import
'./reset_password_ctrl'
;
import
'./error_ctrl'
;
import
'./json_editor_ctrl'
;
public/app/core/controllers/json_editor_ctrl.ts
0 → 100644
View file @
7fc9921b
import
angular
from
'angular'
;
import
coreModule
from
'../core_module'
;
export
class
JsonEditorCtrl
{
/** @ngInject */
constructor
(
$scope
:
any
)
{
$scope
.
json
=
angular
.
toJson
(
$scope
.
model
.
object
,
true
);
$scope
.
canUpdate
=
$scope
.
model
.
updateHandler
!==
void
0
&&
$scope
.
model
.
canUpdate
;
$scope
.
canCopy
=
$scope
.
model
.
enableCopy
;
$scope
.
update
=
()
=>
{
const
newObject
=
angular
.
fromJson
(
$scope
.
json
);
$scope
.
model
.
updateHandler
(
newObject
,
$scope
.
model
.
object
);
};
$scope
.
getContentForClipboard
=
()
=>
$scope
.
json
;
}
}
coreModule
.
controller
(
'JsonEditorCtrl'
,
JsonEditorCtrl
);
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