Files
superset2/caravel/assets/javascripts/SqlLab/components/QueryHistory.jsx
Maxime Beauchemin 940659bc14 [sqllab] some frontend tests (#1400)
* [sqllab] some frontend tests

* linting

* Addressing comments

* Addressing unaddressed comments

* Touchups
2016-10-25 16:44:32 -07:00

33 lines
692 B
JavaScript

import React from 'react';
import QueryTable from './QueryTable';
import { Alert } from 'react-bootstrap';
const propTypes = {
queries: React.PropTypes.array.isRequired,
actions: React.PropTypes.object.isRequired,
};
const QueryHistory = (props) => {
if (props.queries.length > 0) {
return (
<QueryTable
columns={[
'state', 'started', 'duration', 'progress',
'rows', 'sql', 'output', 'actions',
]}
queries={props.queries}
actions={props.actions}
/>
);
}
return (
<Alert bsStyle="info">
No query history yet...
</Alert>
);
};
QueryHistory.propTypes = propTypes;
export default QueryHistory;