Commit 1e5309a7 by Torkel Ödegaard Committed by GitHub

DashboardRow: Update to use the new replaceWithText method (#27671)

* DashboardRow: Update to use the new replaceWithText method

* Fixed panel header as well
parent 04a09dc6
......@@ -69,7 +69,7 @@ export class DashboardRow extends React.Component<DashboardRowProps, any> {
'dashboard-row--collapsed': this.state.collapsed,
});
const title = templateSrv.replaceWithText(this.props.panel.title, this.props.panel.scopedVars);
const title = templateSrv.replace(this.props.panel.title, this.props.panel.scopedVars, 'text');
const count = this.props.panel.panels ? this.props.panel.panels.length : 0;
const panels = count === 1 ? 'panel' : 'panels';
const canEdit = this.props.dashboard.meta.canEdit === true;
......
......@@ -131,7 +131,7 @@ export class PanelHeader extends Component<Props, State> {
render() {
const { panel, scopedVars, error, isViewing, isEditing, data, alertState } = this.props;
const { menuItems } = this.state;
const title = templateSrv.replaceWithText(panel.title, scopedVars);
const title = templateSrv.replace(panel.title, scopedVars, 'text');
const panelHeaderClass = classNames({
'panel-header': true,
......
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