chore: remove SIP_34_QUERY_SEARCH_UI feature flag (#11863)

This commit is contained in:
ʈᵃᵢ 2020-12-01 09:29:16 -08:00 committed by GitHub
parent 44e80e0175
commit ffa32cde14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 21 deletions

View File

@ -88,10 +88,7 @@ class App extends React.PureComponent {
render() {
let content;
if (this.state.hash && this.state.hash === '#search') {
if (
isFeatureEnabled(FeatureFlag.ENABLE_REACT_CRUD_VIEWS) &&
isFeatureEnabled(FeatureFlag.SIP_34_QUERY_SEARCH_UI)
) {
if (isFeatureEnabled(FeatureFlag.ENABLE_REACT_CRUD_VIEWS)) {
return window.location.replace('/superset/sqllab/history/');
}
content = (

View File

@ -33,7 +33,6 @@ export enum FeatureFlag {
DISPLAY_MARKDOWN_HTML = 'DISPLAY_MARKDOWN_HTML',
ESCAPE_MARKDOWN_HTML = 'ESCAPE_MARKDOWN_HTML',
VERSIONED_EXPORT = 'VERSIONED_EXPORT',
SIP_34_QUERY_SEARCH_UI = 'SIP_34_QUERY_SEARCH_UI',
}
export type FeatureFlagMap = {

View File

@ -17,7 +17,6 @@
* under the License.
*/
import { t } from '@superset-ui/core';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
export const commonMenuData = {
name: t('Data'),
@ -44,7 +43,7 @@ export const commonMenuData = {
name: 'Query History',
label: t('Query History'),
url: '/superset/sqllab/history/',
usesRouter: isFeatureEnabled(FeatureFlag.SIP_34_QUERY_SEARCH_UI),
usesRouter: true,
},
],
};

View File

@ -186,7 +186,7 @@ function QueryList({ addDangerToast, addSuccessToast }: QueryListProps) {
{
accessor: QueryObjectColumns.start_time,
Header: t('Time'),
size: 'lg',
size: 'xl',
Cell: ({
row: {
original: { start_time, end_time },
@ -222,12 +222,12 @@ function QueryList({ addDangerToast, addSuccessToast }: QueryListProps) {
{
accessor: QueryObjectColumns.tab_name,
Header: t('Tab Name'),
size: 'lg',
size: 'xl',
},
{
accessor: QueryObjectColumns.database_name,
Header: t('Database'),
size: 'lg',
size: 'xl',
},
{
accessor: QueryObjectColumns.database,
@ -236,7 +236,7 @@ function QueryList({ addDangerToast, addSuccessToast }: QueryListProps) {
{
accessor: QueryObjectColumns.schema,
Header: t('Schema'),
size: 'lg',
size: 'xl',
},
{
Cell: ({
@ -273,13 +273,13 @@ function QueryList({ addDangerToast, addSuccessToast }: QueryListProps) {
},
accessor: QueryObjectColumns.sql_tables,
Header: t('Tables'),
size: 'lg',
size: 'xl',
disableSortBy: true,
},
{
accessor: QueryObjectColumns.user,
Header: t('User'),
size: 'lg',
size: 'xl',
Cell: ({
row: {
original: { user },

View File

@ -340,8 +340,8 @@ class SupersetAppInitializer:
)
appbuilder.add_link(
"Query Search",
label=_("Query Search"),
href="/superset/sqllab#search",
label=_("Query History"),
href="/superset/sqllab/history",
icon="fa-search",
category_icon="fa-flask",
category="SQL Lab",

View File

@ -337,7 +337,6 @@ DEFAULT_FEATURE_FLAGS: Dict[str, bool] = {
"ROW_LEVEL_SECURITY": False,
# Enables Alerts and reports new implementation
"ALERT_REPORTS": False,
"SIP_34_QUERY_SEARCH_UI": False,
}
# Set the default view to card/grid view if thumbnail support is enabled.

View File

@ -2774,11 +2774,8 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
@event_logger.log_this
@expose("/sqllab/history/", methods=["GET"])
@event_logger.log_this
def sqllab_search(self) -> FlaskResponse:
if not (
is_feature_enabled("ENABLE_REACT_CRUD_VIEWS")
and is_feature_enabled("SIP_34_QUERY_SEARCH_UI")
):
def sqllab_history(self) -> FlaskResponse:
if not is_feature_enabled("ENABLE_REACT_CRUD_VIEWS"):
return redirect("/superset/sqllab#search", code=307)
return super().render_app_template()