Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 34 additions & 32 deletions src/default_panels/GraphTransformsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,39 @@ export class Aggregations extends Component {
return null;
}

return aggregations
.filter(
aggr =>
aggr.target && aggr.target.match(/transforms\[\d*\]\./gi) === null
)
.map(({target}, i) => (
<AggregationSection show key={i} aggregationIndex={i}>
<Dropdown
attr="func"
label={target}
options={[
{label: _('Count'), value: 'count'},
{label: _('Sum'), value: 'sum'},
{label: _('Average'), value: 'avg'},
{label: _('Median'), value: 'median'},
{label: _('Mode'), value: 'mode'},
{label: _('RMS'), value: 'rms'},
{label: _('Standard Deviation'), value: 'stddev'},
{label: _('Min'), value: 'min'},
{label: _('Max'), value: 'max'},
{label: _('First'), value: 'first'},
{label: _('Last'), value: 'last'},
{label: _('Change'), value: 'change'},
{label: _('Range'), value: 'range'},
]}
clearable={false}
/>
</AggregationSection>
));
return (
<PlotlySection name={_('Aggregations')} attr="aggregations">
{aggregations
.filter(
aggr =>
aggr.target && aggr.target.match(/transforms\[\d*\]\./gi) === null
)
.map(({target}, i) => (
<AggregationSection show key={i} aggregationIndex={i}>
<Dropdown
attr="func"
label={target}
options={[
{label: _('Count'), value: 'count'},
{label: _('Sum'), value: 'sum'},
{label: _('Average'), value: 'avg'},
{label: _('Median'), value: 'median'},
{label: _('Mode'), value: 'mode'},
{label: _('RMS'), value: 'rms'},
{label: _('Standard Deviation'), value: 'stddev'},
{label: _('Min'), value: 'min'},
{label: _('Max'), value: 'max'},
{label: _('First'), value: 'first'},
{label: _('Last'), value: 'last'},
{label: _('Change'), value: 'change'},
{label: _('Range'), value: 'range'},
]}
clearable={false}
/>
</AggregationSection>
))}
</PlotlySection>
);
}
}

Expand Down Expand Up @@ -88,9 +92,7 @@ const GraphTransformsPanel = (props, {localize: _}) => {
]}
/>

<PlotlySection name={_('Aggregations')} attr="aggregations">
<Aggregations />
</PlotlySection>
<Aggregations />
</TransformAccordion>
</TraceAccordion>
);
Expand Down
8 changes: 8 additions & 0 deletions src/styles/components/widgets/_colorpicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,11 @@ $colorpicker-width: 185px;
}
}
}

.fold .fold {
.colorpicker__container {
width: calc(
$colorpicker-width - var(--spacing-half-unit) - var(--spacing-half-unit)
);
}
}