Commit 81c11ebb by Torkel Ödegaard

fix(dashlist): fixed issue with viewing last viewed dashboards, when you had…

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
parent 1abdd170
......@@ -43,13 +43,10 @@ class DashListCtrl extends PanelCtrl {
var params: any = {limit: this.panel.limit};
if (this.panel.mode === 'recently viewed') {
var dashboardIds = impressions.getDashboardOpened();
var dashIds = _.first(impressions.getDashboardOpened(), this.panel.limit);
return this.backendSrv.search({
dashboardIds: impressions.getDashboardOpened(),
limit: this.panel.limit
}).then(result => {
this.dashList = dashboardIds.map(orderId => {
return this.backendSrv.search({dashboardIds: dashIds, limit: this.panel.limit}).then(result => {
this.dashList = dashIds.map(orderId => {
return _.find(result, dashboard => {
return dashboard.id === orderId;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment