Skip to content

Commit

Permalink
feat: Query History CRUD list view
Browse files Browse the repository at this point in the history
  • Loading branch information
nytai committed Nov 12, 2020
1 parent 12cb27f commit 6020af4
Show file tree
Hide file tree
Showing 21 changed files with 678 additions and 82 deletions.
21 changes: 21 additions & 0 deletions superset-frontend/images/icons/offline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions superset-frontend/images/icons/queued.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions superset-frontend/images/icons/running.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ describe('AnnotationList', () => {

it('fetches annotation layer', () => {
const callsQ = fetchMock.calls(/annotation_layer\/1/);
expect(callsQ).toHaveLength(3);
expect(callsQ[2][0]).toMatchInlineSnapshot(
expect(callsQ).toHaveLength(2);
expect(callsQ[1][0]).toMatchInlineSnapshot(
`"http://localhost/api/v1/annotation_layer/1"`,
);
});

it('fetches annotations', () => {
const callsQ = fetchMock.calls(/annotation_layer\/1\/annotation/);
expect(callsQ).toHaveLength(2);
expect(callsQ).toHaveLength(1);
expect(callsQ[0][0]).toMatchInlineSnapshot(
`"http://localhost/api/v1/annotation_layer/1/annotation/?q=(order_column:short_descr,order_direction:desc,page:0,page_size:25)"`,
);
Expand Down
9 changes: 8 additions & 1 deletion superset-frontend/src/SqlLab/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { t, supersetTheme, ThemeProvider } from '@superset-ui/core';
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
import throttle from 'lodash/throttle';
import TabbedSqlEditors from './TabbedSqlEditors';
import QueryAutoRefresh from './QueryAutoRefresh';
Expand Down Expand Up @@ -86,7 +87,13 @@ class App extends React.PureComponent {

render() {
let content;
if (this.state.hash) {
if (this.state.hash && this.state.hash === '#search') {
if (
isFeatureEnabled(FeatureFlag.ENABLE_REACT_CRUD_VIEWS) &&
isFeatureEnabled(FeatureFlag.SIP_34_QUERY_SEARCH_UI)
) {
return window.location.replace('/superset/sqllab/history/');
}
content = (
<QuerySearch
actions={this.props.actions}
Expand Down
Loading

0 comments on commit 6020af4

Please sign in to comment.