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
7381d256
Commit
7381d256
authored
Jun 01, 2017
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: adds folder-picker to save as dialog
parent
d081f852
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
2 deletions
+14
-2
public/app/features/dashboard/dashboard_srv.ts
+3
-0
public/app/features/dashboard/folder_picker/picker.html
+0
-0
public/app/features/dashboard/folder_picker/picker.ts
+2
-0
public/app/features/dashboard/partials/settings.html
+1
-1
public/app/features/dashboard/save_as_modal.ts
+4
-1
public/sass/components/_modals.scss
+4
-0
No files found.
public/app/features/dashboard/dashboard_srv.ts
View file @
7381d256
...
...
@@ -117,6 +117,9 @@ export class DashboardSrv {
newScope
.
clone
=
this
.
dash
.
getSaveModelClone
();
newScope
.
clone
.
editable
=
true
;
newScope
.
clone
.
hideControls
=
false
;
newScope
.
clone
.
meta
=
{};
newScope
.
clone
.
meta
.
parentId
=
this
.
dash
.
meta
.
parentId
;
newScope
.
clone
.
meta
.
isFolder
=
this
.
dash
.
meta
.
isFolder
;
this
.
$rootScope
.
appEvent
(
'show-modal'
,
{
templateHtml
:
'<save-dashboard-as-modal dismiss="dismiss()"></save-dashboard-as-modal>'
,
...
...
public/app/features/dashboard/folder_picker/picker.html
View file @
7381d256
public/app/features/dashboard/folder_picker/picker.ts
View file @
7381d256
...
...
@@ -42,8 +42,10 @@ export class FolderPickerCtrl {
folderChanged
()
{
const
selected
=
_
.
find
(
this
.
folders
,
{
title
:
this
.
selectedFolderSegment
.
value
});
if
(
selected
)
{
this
.
dashboard
.
parentId
=
selected
.
id
;
}
}
}
export
interface
Folder
{
...
...
public/app/features/dashboard/partials/settings.html
View file @
7381d256
...
...
@@ -45,7 +45,7 @@
</div>
</div>
<folder-picker
ng-
hide=
"
dashboardMeta.isFolder"
dashboard=
"dashboard"
></folder-picker>
<folder-picker
ng-
if=
"!
dashboardMeta.isFolder"
dashboard=
"dashboard"
></folder-picker>
</div>
<div
class=
"section"
>
...
...
public/app/features/dashboard/save_as_modal.ts
View file @
7381d256
...
...
@@ -3,7 +3,7 @@
import
coreModule
from
'app/core/core_module'
;
const
template
=
`
<div class="modal-body">
<div class="modal-body
modal-body--with-overflow
">
<div class="modal-header">
<h2 class="modal-header-title">
<i class="fa fa-copy"></i>
...
...
@@ -21,6 +21,9 @@ const template = `
<label class="gf-form-label">New name</label>
<input type="text" class="gf-form-input" ng-model="ctrl.clone.title" give-focus="true" required>
</div>
<div class="gf-form">
<folder-picker ng-if="!clone.meta.isFolder" selected-folder="clone.meta.parentId" on-change="onFolderChange"></folder-picker>
</div>
</div>
<div class="gf-form-button-row text-center">
...
...
public/sass/components/_modals.scss
View file @
7381d256
...
...
@@ -87,6 +87,10 @@
max-width
:
500px
;
}
.modal-body--with-overflow
{
overflow-y
:
visible
;
}
.confirm-modal
{
max-width
:
500px
;
...
...
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