Fix issue with hidden SourceSelector
Previously, the SourceSelector would hide itself unless Chronograf was connected to more than one source. This prevented a Chronograf instance from selecting a dynamic source or creating flux queries when only connected to one source. In addition to fixing this issue, this commit removes the “Source:” text from the TimeMachine controls, per the design spec.enhancement/default-for-missing-annotations
parent
42b28205d2
commit
6e99afe5a4
|
@ -30,9 +30,12 @@ const SourceSelector: SFC<Props> = ({
|
|||
isDynamicSourceSelected,
|
||||
onSelectDynamicSource,
|
||||
}) => {
|
||||
return sources.length > 1 && queries.length ? (
|
||||
if (!sources.length || !queries.length) {
|
||||
return <div className="source-selector" />
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="source-selector">
|
||||
<h3>Source:</h3>
|
||||
<SourceDropdown
|
||||
service={service}
|
||||
services={services}
|
||||
|
@ -46,8 +49,6 @@ const SourceSelector: SFC<Props> = ({
|
|||
onSelectDynamicSource={onSelectDynamicSource}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="source-selector" />
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue