[sqllab] improve Hive support (#3187)

* [sqllab] improve Hive support

* Fix "Transport not open" bug
* Getting progress bar to show
* Bump pyhive to 0.4.0
* Getting [Track Job] button to show

* Fix testzz
This commit is contained in:
Maxime Beauchemin
2017-07-27 14:00:19 -07:00
committed by GitHub
parent 25c599d040
commit b888802e05
10 changed files with 122 additions and 51 deletions

View File

@@ -155,6 +155,7 @@ export default class ResultSet extends React.PureComponent {
}
if (['running', 'pending', 'fetching'].indexOf(query.state) > -1) {
let progressBar;
let trackingUrl;
if (query.progress > 0 && query.state === 'running') {
progressBar = (
<ProgressBar
@@ -163,11 +164,24 @@ export default class ResultSet extends React.PureComponent {
label={`${query.progress}%`}
/>);
}
if (query.trackingUrl) {
trackingUrl = (
<Button
bsSize="small"
onClick={() => { window.open(query.trackingUrl); }}
>
Track Job
</Button>
);
}
return (
<div>
<img className="loading" alt="Loading..." src="/static/assets/images/loading.gif" />
<QueryStateLabel query={query} />
{progressBar}
<div>
{trackingUrl}
</div>
</div>
);
} else if (query.state === 'failed') {