|
@@ -21,15 +21,21 @@ export class QueriesTab extends React.Component<Props, any> {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const { panel, dashboard } = this.props;
|
|
|
|
|
+
|
|
|
|
|
+ // make sure the panel has datasource & queries properties
|
|
|
|
|
+ panel.datasource = panel.datasource || null;
|
|
|
|
|
+ panel.targets = panel.targets || [{}];
|
|
|
|
|
+
|
|
|
const loader = getAngularLoader();
|
|
const loader = getAngularLoader();
|
|
|
const template = '<metrics-tab />';
|
|
const template = '<metrics-tab />';
|
|
|
const scopeProps = {
|
|
const scopeProps = {
|
|
|
ctrl: {
|
|
ctrl: {
|
|
|
- panel: this.props.panel,
|
|
|
|
|
- dashboard: this.props.dashboard,
|
|
|
|
|
|
|
+ panel: panel,
|
|
|
|
|
+ dashboard: dashboard,
|
|
|
panelCtrl: {
|
|
panelCtrl: {
|
|
|
- panel: this.props.panel,
|
|
|
|
|
- dashboard: this.props.dashboard,
|
|
|
|
|
|
|
+ panel: panel,
|
|
|
|
|
+ dashboard: dashboard,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|