mirror of https://github.com/apache/superset.git
fix: broken glyphicons used in react-json-schema (#10267)
I'm working on a talk for the Airflow Summit "Advanced Apache Superset for Data Engineers" and showing the "Schedule Query" feature that Beto contributed a while back (behind a feature flag). I found that the glyphicons used in `react-json-schema` are broken and came up with an easy fix. Also other minor tweaks on the feature.
This commit is contained in:
parent
0244e2c333
commit
11ae48062f
|
@ -25,6 +25,7 @@ import { t } from '@superset-ui/translation';
|
|||
|
||||
import Button from '../../components/Button';
|
||||
import ModalTrigger from '../../components/ModalTrigger';
|
||||
import './ScheduleQueryButton.less';
|
||||
|
||||
const validators = {
|
||||
greater: (a, b) => a > b,
|
||||
|
@ -159,12 +160,14 @@ class ScheduleQueryButton extends React.PureComponent {
|
|||
</Row>
|
||||
<Row>
|
||||
<Col md={12}>
|
||||
<Form
|
||||
schema={getJSONSchema()}
|
||||
uiSchema={getUISchema()}
|
||||
onSubmit={this.onSchedule}
|
||||
validate={getValidator()}
|
||||
/>
|
||||
<div className="json-schema">
|
||||
<Form
|
||||
schema={getJSONSchema()}
|
||||
uiSchema={getUISchema()}
|
||||
onSubmit={this.onSchedule}
|
||||
validate={getValidator()}
|
||||
/>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
{this.props.scheduleQueryWarning && (
|
||||
|
@ -194,7 +197,7 @@ class ScheduleQueryButton extends React.PureComponent {
|
|||
disabled={this.props.disabled}
|
||||
tooltip={this.props.tooltip}
|
||||
>
|
||||
<i className="fa fa-calendar" /> {t('Schedule Query')}
|
||||
<i className="fa fa-calendar" /> {t('Schedule')}
|
||||
</Button>
|
||||
}
|
||||
bsSize="medium"
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
// -------------------------------------------------------------
|
||||
// Glyphicons are not supported and used by react-json-schema
|
||||
// -------------------------------------------------------------
|
||||
.json-schema {
|
||||
i.glyphicon {
|
||||
display: none;
|
||||
}
|
||||
.btn-add::after {
|
||||
content: '+';
|
||||
}
|
||||
.array-item-move-up::after {
|
||||
content: '↑';
|
||||
}
|
||||
.array-item-move-down::after {
|
||||
content: '↓';
|
||||
}
|
||||
.array-item-remove::after {
|
||||
content: '-';
|
||||
}
|
||||
}
|
||||
// -------------------------------------------------------------
|
|
@ -162,6 +162,7 @@ class SavedQueryViewApi(SavedQueryView): # pylint: disable=too-many-ancestors
|
|||
"description",
|
||||
"sql",
|
||||
"extra_json",
|
||||
"extra",
|
||||
]
|
||||
add_columns = ["label", "db_id", "schema", "description", "sql", "extra_json"]
|
||||
edit_columns = add_columns
|
||||
|
|
Loading…
Reference in New Issue