mirror of https://github.com/apache/superset.git
[sqllab] adding more descriptive labels to left panel (#1407)
This commit is contained in:
parent
6fb3b305ad
commit
3dea6e0da5
|
@ -39,6 +39,7 @@ class DatabaseSelect extends React.Component {
|
||||||
isLoading={this.state.databaseLoading}
|
isLoading={this.state.databaseLoading}
|
||||||
autosize={false}
|
autosize={false}
|
||||||
onChange={this.changeDb.bind(this)}
|
onChange={this.changeDb.bind(this)}
|
||||||
|
valueRenderer={this.props.valueRenderer}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -49,6 +50,7 @@ DatabaseSelect.propTypes = {
|
||||||
onChange: React.PropTypes.func,
|
onChange: React.PropTypes.func,
|
||||||
actions: React.PropTypes.object,
|
actions: React.PropTypes.object,
|
||||||
databaseId: React.PropTypes.number,
|
databaseId: React.PropTypes.number,
|
||||||
|
valueRenderer: React.PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
DatabaseSelect.defaultProps = {
|
DatabaseSelect.defaultProps = {
|
||||||
|
|
|
@ -127,6 +127,11 @@ class SqlEditorLeftBar extends React.Component {
|
||||||
<DatabaseSelect
|
<DatabaseSelect
|
||||||
onChange={this.onChange.bind(this)}
|
onChange={this.onChange.bind(this)}
|
||||||
databaseId={this.props.queryEditor.dbId}
|
databaseId={this.props.queryEditor.dbId}
|
||||||
|
valueRenderer={(o) => (
|
||||||
|
<div>
|
||||||
|
<span className="text-muted">Database:</span> {o.label}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="m-t-5">
|
<div className="m-t-5">
|
||||||
|
@ -135,6 +140,11 @@ class SqlEditorLeftBar extends React.Component {
|
||||||
placeholder={`Select a schema (${this.state.schemaOptions.length})`}
|
placeholder={`Select a schema (${this.state.schemaOptions.length})`}
|
||||||
options={this.state.schemaOptions}
|
options={this.state.schemaOptions}
|
||||||
value={this.props.queryEditor.schema}
|
value={this.props.queryEditor.schema}
|
||||||
|
valueRenderer={(o) => (
|
||||||
|
<div>
|
||||||
|
<span className="text-muted">Schema:</span> {o.label}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
isLoading={this.state.schemaLoading}
|
isLoading={this.state.schemaLoading}
|
||||||
autosize={false}
|
autosize={false}
|
||||||
onChange={this.changeSchema.bind(this)}
|
onChange={this.changeSchema.bind(this)}
|
||||||
|
|
Loading…
Reference in New Issue