mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(dashlist): fixed issue with viewing last viewed dashboards, when you had more than dashboards in last viewed than panel limit they did not show up in list
This commit is contained in:
parent
1abdd170d3
commit
81c11ebb53
@ -43,13 +43,10 @@ class DashListCtrl extends PanelCtrl {
|
|||||||
var params: any = {limit: this.panel.limit};
|
var params: any = {limit: this.panel.limit};
|
||||||
|
|
||||||
if (this.panel.mode === 'recently viewed') {
|
if (this.panel.mode === 'recently viewed') {
|
||||||
var dashboardIds = impressions.getDashboardOpened();
|
var dashIds = _.first(impressions.getDashboardOpened(), this.panel.limit);
|
||||||
|
|
||||||
return this.backendSrv.search({
|
return this.backendSrv.search({dashboardIds: dashIds, limit: this.panel.limit}).then(result => {
|
||||||
dashboardIds: impressions.getDashboardOpened(),
|
this.dashList = dashIds.map(orderId => {
|
||||||
limit: this.panel.limit
|
|
||||||
}).then(result => {
|
|
||||||
this.dashList = dashboardIds.map(orderId => {
|
|
||||||
return _.find(result, dashboard => {
|
return _.find(result, dashboard => {
|
||||||
return dashboard.id === orderId;
|
return dashboard.id === orderId;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user