Skip to content

Commit

Permalink
[ML] Fixes rebase regressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Oct 3, 2018
1 parent df6aa4e commit 89d0068
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export class ExplorerChartRare extends React.Component {
const svgHeight = chartHeight + margin.top + margin.bottom;

const svg = chartElement.append('svg')
.classed('ml-explorer-chart-svg', true)
.attr('width', svgWidth)
.attr('height', svgHeight);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ function getChartId(series) {
function ExplorerChartContainer({
series,
tooManyBuckets,
mlSelectSeverityService
mlSelectSeverityService,
wrapLabel
}) {
const wrapLabel = isLabelLengthAboveThreshold(series);

const {
detectorLabel,
entityFields,
functionDescription
} = series;

return (
<React.Fragment>
// Needs to be a div, Using React.Fragment would break the Flex Layout
<div>
<div className="ml-explorer-chart-icons">
{tooManyBuckets && (
<span className="ml-explorer-chart-icon">
Expand Down Expand Up @@ -115,7 +115,7 @@ function ExplorerChartContainer({
/>
);
})()}
</React.Fragment>
</div>
);
}

Expand All @@ -131,6 +131,8 @@ export function ExplorerChartsContainer({
const chartsWidth = (chartsPerRow === 1) ? 'calc(100% - 20px)' : 'auto';
const chartsColumns = (chartsPerRow === 1) ? 0 : chartsPerRow;

const wrapLabel = seriesToPlot.some((series) => isLabelLengthAboveThreshold(series));

return (
<EuiFlexGrid columns={chartsColumns}>
{(seriesToPlot.length > 0) && seriesToPlot.map((series) => (
Expand All @@ -139,6 +141,7 @@ export function ExplorerChartsContainer({
series={series}
tooManyBuckets={tooManyBuckets}
mlSelectSeverityService={mlSelectSeverityService}
wrapLabel={wrapLabel}
/>
</EuiFlexItem>
))}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ml-explorer-chart,
.ml-explorer-chart-container {

.ml-explorer-chart-svg {
Expand Down

0 comments on commit 89d0068

Please sign in to comment.