wip: panel-header: Refactor so "Share" use the same code in angular+react

This commit is contained in:
Johannes Schill
2018-10-30 16:39:08 +01:00
parent f9dd516578
commit 5375ce5ffd
4 changed files with 16 additions and 17 deletions

View File

@@ -6,6 +6,7 @@ import {
duplicatePanel,
copyPanel as copyPanelUtil,
editPanelJson as editPanelJsonUtil,
sharePanel as sharePanelUtil,
} from 'app/features/dashboard/utils/panel';
import Remarkable from 'remarkable';
import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN } from 'app/core/constants';
@@ -262,14 +263,7 @@ export class PanelCtrl {
}
sharePanel() {
const shareScope = this.$scope.$new();
shareScope.panel = this.panel;
shareScope.dashboard = this.dashboard;
this.publishAppEvent('show-modal', {
src: 'public/app/features/dashboard/partials/shareModal.html',
scope: shareScope,
});
sharePanelUtil(this.dashboard, this.panel);
}
getInfoMode() {