Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
feat: better UI
Browse files Browse the repository at this point in the history
  • Loading branch information
DaruZero committed Nov 2, 2022
1 parent 9cb2484 commit bd4a96b
Showing 1 changed file with 42 additions and 38 deletions.
80 changes: 42 additions & 38 deletions src/QueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -679,55 +679,59 @@ export class QueryEditor extends PureComponent<Props> {
error={'This input is required and must be a valid number'}
disabled={!this.timeBucketEnabled}
>
<Input label={'Size'} value={this.selectedTimeBucketSize} onChange={this.onTimeBucketSizeChange} />
<Input
label={'Size'}
value={this.selectedTimeBucketSize}
onChange={this.onTimeBucketSizeChange}
width={20}
/>
</InlineField>
<InlineField label={'Unit'} disabled={!this.timeBucketEnabled}>
<Select
options={this.tagTimeBucketUnitOptions}
width={30}
width={20}
defaultValue={this.defaultTimeBucketUnit.value}
value={this.selectedTimeBucketUnit}
onChange={this.onTimeBucketUnitChange}
/>
</InlineField>
</InlineFieldRow>
</div>
<div className={'gf-form'}>
<InlineLabel
width={'auto'}
tooltip={'How missing data should be filled. For more information, please visit our documentation.'}
>
Handling missing values
</InlineLabel>
<Select
options={this.tagGapfillingOptions}
width={30}
defaultValue={this.tagGapfillingOptions[0]}
value={this.selectedConfigurationGapfilling}
onChange={this.onConfigurationGapfillingChange}
disabled={!this.timeBucketEnabled}
/>
</div>
<div className={'gf-form'}>
<InlineLabel width={'auto'} tooltip={'Include last datapoint before time interval'}>
Include last datapoint before time interval
</InlineLabel>
<InlineSwitch
value={this.selectedConfigurationIncludeLastDatapoint}
onClick={this.onConfigurationIncludeLastDatapointChange}
disabled={!this.timeBucketEnabled}
/>
</div>
<div className={'gf-form'}>
<InlineLabel width={'auto'} tooltip={'Include next datapoint after time interval'}>
Include next datapoint after time interval
</InlineLabel>
<InlineSwitch
value={this.selectedConfigurationIncludeNextDatapoint}
onClick={this.onConfigurationIncludeNextDatapointChange}
disabled={!this.timeBucketEnabled}
/>
</div>
<FieldSet hidden={!this.timeBucketEnabled}>
<div className={'gf-form'}>
<InlineLabel
width={60}
tooltip={'How missing data should be filled. For more information, please visit our documentation.'}
>
Handling missing values
</InlineLabel>
<Select
options={this.tagGapfillingOptions}
width={30}
defaultValue={this.tagGapfillingOptions[0]}
value={this.selectedConfigurationGapfilling}
onChange={this.onConfigurationGapfillingChange}
/>
</div>
<div className={'gf-form'}>
<InlineLabel width={60} tooltip={'Include last datapoint before time interval'}>
Include last datapoint before time interval
</InlineLabel>
<InlineSwitch
value={this.selectedConfigurationIncludeLastDatapoint}
onClick={this.onConfigurationIncludeLastDatapointChange}
/>
</div>
<div className={'gf-form'}>
<InlineLabel width={60} tooltip={'Include next datapoint after time interval'}>
Include next datapoint after time interval
</InlineLabel>
<InlineSwitch
value={this.selectedConfigurationIncludeNextDatapoint}
onClick={this.onConfigurationIncludeNextDatapointChange}
/>
</div>
</FieldSet>
</FieldSet>
</div>
);
Expand Down

0 comments on commit bd4a96b

Please sign in to comment.