|
|
@@ -233,7 +233,6 @@ export class DashboardModel {
|
|
|
}
|
|
|
|
|
|
duplicatePanel(panel, row) {
|
|
|
- var rowIndex = _.indexOf(this.rows, row);
|
|
|
var newPanel = angular.copy(panel);
|
|
|
newPanel.id = this.getNextPanelId();
|
|
|
|
|
|
@@ -242,8 +241,7 @@ export class DashboardModel {
|
|
|
delete newPanel.repeatPanelId;
|
|
|
delete newPanel.scopedVars;
|
|
|
|
|
|
- var currentRow = this.rows[rowIndex];
|
|
|
- currentRow.panels.push(newPanel);
|
|
|
+ row.addPanel(newPanel);
|
|
|
return newPanel;
|
|
|
}
|
|
|
|