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
9f766557
Commit
9f766557
authored
Dec 15, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dashboard: fixed minor issue when trying to aborting dashboard delete from search list, Fixes #1233
parent
846cf934
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
src/app/controllers/dashboardNavCtrl.js
+1
-0
src/app/controllers/search.js
+7
-0
No files found.
src/app/controllers/dashboardNavCtrl.js
View file @
9f766557
...
...
@@ -107,6 +107,7 @@ function (angular, _, moment, config, store) {
$scope
.
deleteDashboardConfirmed
=
function
(
options
)
{
var
id
=
options
.
id
;
$scope
.
db
.
deleteDashboard
(
id
).
then
(
function
(
id
)
{
$scope
.
appEvent
(
'dashboard-deleted'
,
id
);
$scope
.
appEvent
(
'alert-success'
,
[
'Dashboard Deleted'
,
id
+
' has been deleted'
]);
},
function
(
err
)
{
$scope
.
appEvent
(
'alert-error'
,
[
'Deleted failed'
,
err
]);
...
...
src/app/controllers/search.js
View file @
9f766557
...
...
@@ -19,6 +19,9 @@ function (angular, _, config, $) {
$scope
.
db
=
datasourceSrv
.
getGrafanaDB
();
$scope
.
currentSearchId
=
0
;
// events
$scope
.
onAppEvent
(
'dashboard-deleted'
,
$scope
.
dashboardDeleted
);
$timeout
(
function
()
{
$scope
.
giveSearchFocus
=
$scope
.
giveSearchFocus
+
1
;
$scope
.
query
.
query
=
'title:'
;
...
...
@@ -123,6 +126,10 @@ function (angular, _, config, $) {
$scope
.
deleteDashboard
=
function
(
dash
,
evt
)
{
evt
.
stopPropagation
();
$scope
.
appEvent
(
'delete-dashboard'
,
{
id
:
dash
.
id
,
title
:
dash
.
title
});
};
$scope
.
dashboardDeleted
=
function
(
evt
,
id
)
{
var
dash
=
_
.
findWhere
(
$scope
.
results
.
dashboards
,
{
id
:
id
});
$scope
.
results
.
dashboards
=
_
.
without
(
$scope
.
results
.
dashboards
,
dash
);
};
...
...
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