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
435d0f22
Commit
435d0f22
authored
Mar 07, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(dashlist): better handling of invalid dashboard ids
parent
dc2738af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
pkg/services/sqlstore/dashboard.go
+2
-1
public/app/features/dashboard/impression_store.ts
+9
-2
public/app/plugins/panel/dashlist/module.ts
+2
-1
No files found.
pkg/services/sqlstore/dashboard.go
View file @
435d0f22
...
...
@@ -150,7 +150,7 @@ func SearchDashboards(query *search.FindPersistedDashboardsQuery) error {
sql
.
WriteString
(
" AND ("
)
for
i
,
dashboardId
:=
range
query
.
DashboardIds
{
if
i
!=
0
{
sql
.
WriteString
(
"OR"
)
sql
.
WriteString
(
"
OR"
)
}
sql
.
WriteString
(
" dashboard.id = ?"
)
...
...
@@ -167,6 +167,7 @@ func SearchDashboards(query *search.FindPersistedDashboardsQuery) error {
sql
.
WriteString
(
fmt
.
Sprintf
(
" ORDER BY dashboard.title ASC LIMIT 1000"
))
var
res
[]
DashboardSearchProjection
err
:=
x
.
Sql
(
sql
.
String
(),
params
...
)
.
Find
(
&
res
)
if
err
!=
nil
{
return
err
...
...
public/app/features/dashboard/impression_store.ts
View file @
435d0f22
...
...
@@ -28,8 +28,15 @@ export class ImpressionsStore {
}
getDashboardOpened
()
{
var
impressions
=
store
.
get
(
"dashboard_impressions"
);
return
JSON
.
parse
(
impressions
||
"[]"
);
var
impressions
=
store
.
get
(
"dashboard_impressions"
)
||
"[]"
;
impressions
=
JSON
.
parse
(
impressions
);
impressions
=
_
.
filter
(
impressions
,
el
=>
{
return
_
.
isNumber
(
el
);
});
return
impressions
;
}
}
...
...
public/app/plugins/panel/dashlist/module.ts
View file @
435d0f22
...
...
@@ -49,11 +49,12 @@ class DashListCtrl extends PanelCtrl {
dashboardIds
:
impressions
.
getDashboardOpened
(),
limit
:
this
.
panel
.
limit
}).
then
(
result
=>
{
this
.
dashList
=
dashboardIds
.
map
(
orderId
=>
{
return
_
.
find
(
result
,
dashboard
=>
{
return
dashboard
.
id
===
orderId
;
});
}).
filter
(
el
=>
{
return
el
!==
undefined
;
});
this
.
renderingCompleted
();
...
...
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