[TSVB] Fix bugs with the new split gauge/metric behavior (#13823)

* Adding a check to make sure everything is available to render

* Adding some safety

* Fixing a bug with the label

* Adding an additional sleep to wait for the new data to arrive.
This commit is contained in:
Chris Cowan 2017-10-26 15:47:57 -07:00
parent 70da63fa23
commit 8a5fce43ac
3 changed files with 4 additions and 1 deletions

View file

@ -5,6 +5,7 @@ import calculateLabel from '../../common/calculate_label';
export function visWithSplits(WrappedComponent) {
function SplitVisComponent(props) {
const { model, visData } = props;
if (!model || !visData || !visData[model.id]) return (<WrappedComponent {...props} />);
if (visData[model.id].series.every(s => s.id.split(':').length === 1)) {
return (<WrappedComponent {...props} />);
}

View file

@ -62,7 +62,6 @@
.rhythm_metric__additionalLabel {
font-size: 0.25em;
width: 50px;
overflow: hidden;
text-overflow: ellipsis;
padding: 2px 0 0 0;

View file

@ -27,6 +27,9 @@ export default function ({ getService, getPageObjects }) {
})
.then(function clickMetric() {
return PageObjects.visualBuilder.clickMetric();
})
.then(function sleep() {
return PageObjects.common.sleep(1003);
});
});