mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
DashboardRow: Update to use the new replaceWithText method (#27671)
* DashboardRow: Update to use the new replaceWithText method * Fixed panel header as well
This commit is contained in:
parent
04a09dc60a
commit
1e5309a788
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user