mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Public Dashboards: use default dashboard time range instead of current (#51656)
This commit is contained in:
parent
119c13e666
commit
9f6297ca9b
@ -138,7 +138,7 @@ export const SharePublicDashboard = (props: Props) => {
|
||||
<br />
|
||||
<div style={{ padding: '5px' }}>
|
||||
<Input
|
||||
value={props.dashboard.time.from}
|
||||
value={props.dashboard.getDefaultTime().from}
|
||||
disabled={true}
|
||||
addonBefore={
|
||||
<span style={{ width: '50px', display: 'flex', alignItems: 'center', padding: '5px' }}>
|
||||
@ -147,7 +147,7 @@ export const SharePublicDashboard = (props: Props) => {
|
||||
}
|
||||
/>
|
||||
<Input
|
||||
value={props.dashboard.time.to}
|
||||
value={props.dashboard.getDefaultTime().to}
|
||||
disabled={true}
|
||||
addonBefore={
|
||||
<span style={{ width: '50px', display: 'flex', alignItems: 'center', padding: '5px' }}>To:</span>
|
||||
|
@ -1108,6 +1108,10 @@ export class DashboardModel implements TimeModel {
|
||||
}
|
||||
}
|
||||
|
||||
getDefaultTime() {
|
||||
return this.originalTime;
|
||||
}
|
||||
|
||||
private getPanelRepeatVariable(panel: PanelModel) {
|
||||
return this.getVariablesFromState(this.uid).find((variable) => variable.name === panel.repeat);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user