mirror of https://github.com/apache/druid.git
better query view initial state (#10431)
This commit is contained in:
parent
dad69481f0
commit
89160c2f9b
|
@ -99,6 +99,17 @@ $nav-width: 250px;
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.init-state {
|
||||
background: #232d35;
|
||||
text-align: center;
|
||||
|
||||
p {
|
||||
position: relative;
|
||||
top: 38%;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Intent, Switch, Tooltip } from '@blueprintjs/core';
|
||||
import { Code, Intent, Switch, Tooltip } from '@blueprintjs/core';
|
||||
import axios from 'axios';
|
||||
import classNames from 'classnames';
|
||||
import { QueryResult, QueryRunner, SqlQuery } from 'druid-query-toolkit';
|
||||
|
@ -295,9 +295,11 @@ export class QueryView extends React.PureComponent<QueryViewProps, QueryViewStat
|
|||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
const { liveQueryMode, queryString } = this.state;
|
||||
|
||||
this.metadataQueryManager.runQuery(null);
|
||||
|
||||
if (this.state.liveQueryMode !== 'off') {
|
||||
if (liveQueryMode !== 'off' && queryString) {
|
||||
this.handleRun();
|
||||
}
|
||||
}
|
||||
|
@ -522,6 +524,13 @@ export class QueryView extends React.PureComponent<QueryViewProps, QueryViewStat
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
{queryResultState.isInit() && (
|
||||
<div className="init-state">
|
||||
<p>
|
||||
Enter a query and click <Code>Run</Code>
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</SplitterLayout>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue