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
34cffc6b
Commit
34cffc6b
authored
Dec 14, 2017
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashfolder: fix after backendSrv change
also removes unused create folder modal
parent
f1b1dbc6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
67 deletions
+1
-67
public/app/features/dashboard/create_folder_ctrl.ts
+1
-1
public/app/features/dashboard/folder_modal/folder.html
+0
-24
public/app/features/dashboard/folder_modal/folder.ts
+0
-42
No files found.
public/app/features/dashboard/create_folder_ctrl.ts
View file @
34cffc6b
...
...
@@ -20,7 +20,7 @@ export class CreateFolderCtrl {
return
this
.
backendSrv
.
createDashboardFolder
(
title
).
then
(
result
=>
{
appEvents
.
emit
(
'alert-success'
,
[
'Folder Created'
,
'OK'
]);
var
folderUrl
=
`/dashboards/folder/
${
result
.
id
}
/db/
${
result
.
slug
}
`
;
var
folderUrl
=
`/dashboards/folder/
${
result
.
dashboard
.
id
}
/
${
result
.
meta
.
slug
}
`
;
this
.
$location
.
url
(
folderUrl
);
});
}
...
...
public/app/features/dashboard/folder_modal/folder.html
deleted
100644 → 0
View file @
f1b1dbc6
<div
class=
"modal-body"
>
<div
class=
"modal-header"
>
<h2
class=
"modal-header-title"
>
<i
class=
"gicon gicon-folder-new"
></i>
<span
class=
"p-l-1"
>
New Dashboard Folder
</span>
</h2>
<a
class=
"modal-header-close"
ng-click=
"ctrl.dismiss();"
>
<i
class=
"fa fa-remove"
></i>
</a>
</div>
<form
name=
"ctrl.saveForm"
ng-submit=
"ctrl.create()"
class=
"modal-content folder-modal"
novalidate
>
<div
class=
"p-t-2"
>
<div
class=
"gf-form"
>
<input
type=
"text"
ng-model=
"ctrl.title"
required
give-focus=
"true"
class=
"gf-form-input"
placeholder=
"Enter folder name"
/>
</div>
</div>
<div
class=
"gf-form-button-row text-center"
>
<button
type=
"submit"
class=
"btn btn-success"
ng-disabled=
"ctrl.saveForm.$invalid"
>
Create
</button>
<a
class=
"btn-text"
ng-click=
"ctrl.dismiss();"
>
Cancel
</a>
</div>
</form>
</div>
public/app/features/dashboard/folder_modal/folder.ts
deleted
100644 → 0
View file @
f1b1dbc6
import
coreModule
from
'app/core/core_module'
;
import
appEvents
from
'app/core/app_events'
;
export
class
FolderCtrl
{
title
:
string
;
dismiss
:
any
;
/** @ngInject */
constructor
(
private
backendSrv
,
private
$location
)
{
}
create
()
{
if
(
!
this
.
title
||
this
.
title
.
trim
().
length
===
0
)
{
return
;
}
const
title
=
this
.
title
.
trim
();
return
this
.
backendSrv
.
createDashboardFolder
(
title
).
then
(
result
=>
{
appEvents
.
emit
(
'alert-success'
,
[
'Folder Created'
,
'OK'
]);
this
.
dismiss
();
var
folderUrl
=
'/dashboard/db/'
+
result
.
slug
;
this
.
$location
.
url
(
folderUrl
);
});
}
}
export
function
folderModal
()
{
return
{
restrict
:
'E'
,
templateUrl
:
'public/app/features/dashboard/folder_modal/folder.html'
,
controller
:
FolderCtrl
,
bindToController
:
true
,
controllerAs
:
'ctrl'
,
scope
:
{
dismiss
:
"&"
}
};
}
coreModule
.
directive
(
'folderModal'
,
folderModal
);
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