mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
Minor react graph panel refactorings and fixes
This commit is contained in:
parent
0fd92ef6fb
commit
0fe452ec26
@ -32,7 +32,7 @@ export class Switch extends PureComponent<Props, State> {
|
||||
const switchClassName = `gf-form-switch ${switchClass} ${transparent ? 'gf-form-switch--transparent' : ''}`;
|
||||
|
||||
return (
|
||||
<label htmlFor={labelId} className="gf-form-switch-container">
|
||||
<label htmlFor={labelId} className="gf-form gf-form-switch-container">
|
||||
{label && <div className={labelClassName}>{label}</div>}
|
||||
<div className={switchClassName}>
|
||||
<input id={labelId} type="checkbox" checked={checked} onChange={this.internalOnChange} />
|
||||
|
@ -27,26 +27,17 @@ export class GraphOptions extends PureComponent<PanelOptionsProps<Options>> {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="form-option-box">
|
||||
<div className="form-option-box__header">Display Options</div>
|
||||
<div className="section gf-form-group">
|
||||
<h5 className="section-heading">Draw Modes</h5>
|
||||
<Switch label="Lines" labelClass="width-5" checked={showLines} onChange={this.onToggleLines} />
|
||||
<Switch label="Bars" labelClass="width-5" checked={showBars} onChange={this.onToggleBars} />
|
||||
<Switch label="Points" labelClass="width-5" checked={showPoints} onChange={this.onTogglePoints} />
|
||||
</div>
|
||||
<div className="section gf-form-group">
|
||||
<h5 className="section-heading">Test Options</h5>
|
||||
<Switch label="Lines" labelClass="width-5" checked={showLines} onChange={this.onToggleLines} />
|
||||
<Switch label="Bars" labelClass="width-5" checked={showBars} onChange={this.onToggleBars} />
|
||||
<Switch label="Points" labelClass="width-5" checked={showPoints} onChange={this.onTogglePoints} />
|
||||
</div>
|
||||
<div className="section gf-form-group">
|
||||
<h5 className="section-heading">Draw Modes</h5>
|
||||
<Switch label="Lines" labelClass="width-5" checked={showLines} onChange={this.onToggleLines} />
|
||||
<Switch label="Bars" labelClass="width-5" checked={showBars} onChange={this.onToggleBars} />
|
||||
<Switch label="Points" labelClass="width-5" checked={showPoints} onChange={this.onTogglePoints} />
|
||||
</div>
|
||||
<div className="form-option-box">
|
||||
<div className="form-option-box__header">Axes</div>
|
||||
</div>
|
||||
<div className="form-option-box">
|
||||
<div className="form-option-box__header">Thresholds</div>
|
||||
<div className="section gf-form-group">
|
||||
<h5 className="section-heading">Test Options</h5>
|
||||
<Switch label="Lines" labelClass="width-5" checked={showLines} onChange={this.onToggleLines} />
|
||||
<Switch label="Bars" labelClass="width-5" checked={showBars} onChange={this.onToggleBars} />
|
||||
<Switch label="Points" labelClass="width-5" checked={showPoints} onChange={this.onTogglePoints} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user