Pārlūkot izejas kodu

poc: merge sync

Torkel Ödegaard 8 gadi atpakaļ
vecāks
revīzija
636cca8332

+ 1 - 3
public/app/features/dashboard/dashgrid/AddPanelPanel.tsx

@@ -86,9 +86,7 @@ export class AddPanelPanel extends React.Component<AddPanelPanelProps, AddPanelP
 
   handleCloseAddPanel(evt) {
     evt.preventDefault();
-    const panelContainer = this.props.getPanelContainer();
-    const dashboard = panelContainer.getDashboard();
-    dashboard.removePanel(dashboard.panels[0]);
+    this.props.dashboard.removePanel(this.props.dashboard.panels[0]);
   }
 
   renderPanelItem(panel, index) {

+ 0 - 1
public/app/features/dashboard/dashgrid/DashboardPanel.tsx

@@ -1,7 +1,6 @@
 import React from 'react';
 import config from 'app/core/config';
 import classNames from 'classnames';
-import appEvents from 'app/core/app_events';
 import { PanelModel } from '../panel_model';
 import { DashboardModel } from '../dashboard_model';
 import { AttachedPanel } from './PanelLoader';

+ 1 - 1
public/app/features/dashboard/dashgrid/DashboardRow.tsx

@@ -33,7 +33,7 @@ export class DashboardRow extends React.Component<DashboardRowProps, any> {
   }
 
   update() {
-    this.dashboard.processRepeats();
+    this.props.dashboard.processRepeats();
     this.forceUpdate();
   }