mirror of https://github.com/apache/superset.git
parent
2a587f6cb1
commit
d9388d4535
|
@ -154,7 +154,7 @@ export function scheduleQuery(query) {
|
||||||
dispatch(
|
dispatch(
|
||||||
addSuccessToast(
|
addSuccessToast(
|
||||||
t(
|
t(
|
||||||
'Your query has been scheduled. To see details of your query, navigate to Saved Queries',
|
'Your query has been scheduled. To see details of your query, navigate to Saved queries',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -65,8 +65,8 @@ const iconMap = {
|
||||||
index: 'fa-bookmark',
|
index: 'fa-bookmark',
|
||||||
};
|
};
|
||||||
const tooltipTitleMap = {
|
const tooltipTitleMap = {
|
||||||
pk: 'Primary Key',
|
pk: 'Primary key',
|
||||||
fk: 'Foreign Key',
|
fk: 'Foreign key',
|
||||||
index: 'Index',
|
index: 'Index',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -82,12 +82,12 @@ const EstimateQueryCostButton = props => {
|
||||||
|
|
||||||
const { disabled, selectedText, tooltip } = props;
|
const { disabled, selectedText, tooltip } = props;
|
||||||
const btnText = selectedText
|
const btnText = selectedText
|
||||||
? t('Estimate Selected Query Cost')
|
? t('Estimate selected query cost')
|
||||||
: t('Estimate Cost');
|
: t('Estimate cost');
|
||||||
return (
|
return (
|
||||||
<span className="EstimateQueryCostButton">
|
<span className="EstimateQueryCostButton">
|
||||||
<ModalTrigger
|
<ModalTrigger
|
||||||
modalTitle={t('Cost Estimate')}
|
modalTitle={t('Cost estimate')}
|
||||||
modalBody={renderModalBody()}
|
modalBody={renderModalBody()}
|
||||||
triggerNode={
|
triggerNode={
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -144,7 +144,7 @@ const QueryTable = props => {
|
||||||
className="ResultsModal"
|
className="ResultsModal"
|
||||||
triggerNode={
|
triggerNode={
|
||||||
<Label bsStyle="info" className="pointer">
|
<Label bsStyle="info" className="pointer">
|
||||||
{t('view results')}
|
{t('View results')}
|
||||||
</Label>
|
</Label>
|
||||||
}
|
}
|
||||||
modalTitle={t('Data preview')}
|
modalTitle={t('Data preview')}
|
||||||
|
|
|
@ -466,7 +466,7 @@ export default class ResultSet extends React.PureComponent<
|
||||||
onChange={this.changeSearch}
|
onChange={this.changeSearch}
|
||||||
value={this.state.searchText}
|
value={this.state.searchText}
|
||||||
className="form-control input-sm"
|
className="form-control input-sm"
|
||||||
placeholder={t('Filter Results')}
|
placeholder={t('Filter results')}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -498,7 +498,7 @@ export default class ResultSet extends React.PureComponent<
|
||||||
return (
|
return (
|
||||||
<div className="result-set-error-message">
|
<div className="result-set-error-message">
|
||||||
<ErrorMessageWithStackTrace
|
<ErrorMessageWithStackTrace
|
||||||
title={t('Database Error')}
|
title={t('Database error')}
|
||||||
error={query?.errors?.[0]}
|
error={query?.errors?.[0]}
|
||||||
subtitle={<MonospaceDiv>{query.errorMessage}</MonospaceDiv>}
|
subtitle={<MonospaceDiv>{query.errorMessage}</MonospaceDiv>}
|
||||||
copyText={query.errorMessage || undefined}
|
copyText={query.errorMessage || undefined}
|
||||||
|
@ -602,7 +602,7 @@ export default class ResultSet extends React.PureComponent<
|
||||||
buttonStyle="primary"
|
buttonStyle="primary"
|
||||||
onClick={() => this.fetchResults(query)}
|
onClick={() => this.fetchResults(query)}
|
||||||
>
|
>
|
||||||
{t('Refetch Results')}
|
{t('Refetch results')}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -623,7 +623,7 @@ export default class ResultSet extends React.PureComponent<
|
||||||
buttonSize="small"
|
buttonSize="small"
|
||||||
onClick={() => query.trackingUrl && window.open(query.trackingUrl)}
|
onClick={() => query.trackingUrl && window.open(query.trackingUrl)}
|
||||||
>
|
>
|
||||||
{t('Track Job')}
|
{t('Track job')}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ const buildText = (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (selectedText) {
|
if (selectedText) {
|
||||||
return t('Run Selection');
|
return t('Run selection');
|
||||||
}
|
}
|
||||||
return t('Run');
|
return t('Run');
|
||||||
};
|
};
|
||||||
|
|
|
@ -169,7 +169,7 @@ export default function SaveQuery({
|
||||||
primaryButtonName={isSaved ? t('Save') : t('Save as')}
|
primaryButtonName={isSaved ? t('Save') : t('Save as')}
|
||||||
width="620px"
|
width="620px"
|
||||||
show={showSave}
|
show={showSave}
|
||||||
title={<h4>{t('Save Query')}</h4>}
|
title={<h4>{t('Save query')}</h4>}
|
||||||
footer={[
|
footer={[
|
||||||
<>
|
<>
|
||||||
<Button onClick={close} data-test="cancel-query" cta>
|
<Button onClick={close} data-test="cancel-query" cta>
|
||||||
|
@ -181,7 +181,7 @@ export default function SaveQuery({
|
||||||
className="m-r-3"
|
className="m-r-3"
|
||||||
cta
|
cta
|
||||||
>
|
>
|
||||||
{isSaved ? t('Save As New') : t('Save')}
|
{isSaved ? t('Save as new') : t('Save')}
|
||||||
</Button>
|
</Button>
|
||||||
{isSaved && (
|
{isSaved && (
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -198,7 +198,7 @@ class ScheduleQueryButton extends React.PureComponent {
|
||||||
ref={ref => {
|
ref={ref => {
|
||||||
this.saveModal = ref;
|
this.saveModal = ref;
|
||||||
}}
|
}}
|
||||||
modalTitle={t('Schedule Query')}
|
modalTitle={t('Schedule query')}
|
||||||
modalBody={this.renderModalBody()}
|
modalBody={this.renderModalBody()}
|
||||||
triggerNode={
|
triggerNode={
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -177,7 +177,7 @@ export class SouthPane extends React.PureComponent {
|
||||||
<Tabs.TabPane tab={t('Results')} key="Results">
|
<Tabs.TabPane tab={t('Results')} key="Results">
|
||||||
{results}
|
{results}
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane tab={t('Query History')} key="History">
|
<Tabs.TabPane tab={t('Query history')} key="History">
|
||||||
<QueryHistory
|
<QueryHistory
|
||||||
queries={props.editorQueries}
|
queries={props.editorQueries}
|
||||||
actions={props.actions}
|
actions={props.actions}
|
||||||
|
|
|
@ -306,7 +306,7 @@ class SqlEditor extends React.PureComponent {
|
||||||
func: () => {
|
func: () => {
|
||||||
this.props.addQueryEditor({
|
this.props.addQueryEditor({
|
||||||
...this.props.queryEditor,
|
...this.props.queryEditor,
|
||||||
title: t('Untitled Query'),
|
title: t('Untitled query'),
|
||||||
sql: '',
|
sql: '',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -698,13 +698,13 @@ class SqlEditor extends React.PureComponent {
|
||||||
render() {
|
render() {
|
||||||
const createViewModalTitle =
|
const createViewModalTitle =
|
||||||
this.state.createAs === CtasEnum.VIEW
|
this.state.createAs === CtasEnum.VIEW
|
||||||
? 'Create View As'
|
? 'CREATE VIEW AS'
|
||||||
: 'Create Table As';
|
: 'CREATE TABLE AS';
|
||||||
|
|
||||||
const createModalPlaceHolder =
|
const createModalPlaceHolder =
|
||||||
this.state.createAs === CtasEnum.VIEW
|
this.state.createAs === CtasEnum.VIEW
|
||||||
? 'Specify name to Create View AS schema in: public'
|
? 'Specify name to CREATE VIEW AS schema in: public'
|
||||||
: 'Specify name to Create Table AS schema in: public';
|
: 'Specify name to CREATE TABLE AS schema in: public';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={this.sqlEditorRef} className="SqlEditor">
|
<div ref={this.sqlEditorRef} className="SqlEditor">
|
||||||
|
|
|
@ -156,7 +156,7 @@ export default class SqlEditorLeftBar extends React.PureComponent {
|
||||||
buttonStyle="danger"
|
buttonStyle="danger"
|
||||||
onClick={this.resetState}
|
onClick={this.resetState}
|
||||||
>
|
>
|
||||||
<i className="fa fa-bomb" /> {t('Reset State')}
|
<i className="fa fa-bomb" /> {t('Reset state')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,8 +25,8 @@ import thumbnail from './images/thumbnail.png';
|
||||||
export default class AntdFilterSelectPlugin extends ChartPlugin {
|
export default class AntdFilterSelectPlugin extends ChartPlugin {
|
||||||
constructor() {
|
constructor() {
|
||||||
const metadata = new ChartMetadata({
|
const metadata = new ChartMetadata({
|
||||||
name: t('Select Filter Plugin'),
|
name: t('Select filter plugin'),
|
||||||
description: 'Select Filter Plugin using AntD',
|
description: 'Select filter plugin using AntD',
|
||||||
isNativeFilter: true,
|
isNativeFilter: true,
|
||||||
thumbnail,
|
thumbnail,
|
||||||
});
|
});
|
||||||
|
|
|
@ -79,7 +79,7 @@ const initAsyncEvents = (options: AsyncEventOptions) => {
|
||||||
try {
|
try {
|
||||||
lastReceivedEventId = localStorage.getItem(LOCALSTORAGE_KEY);
|
lastReceivedEventId = localStorage.getItem(LOCALSTORAGE_KEY);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn('failed to fetch last event Id from localStorage');
|
console.warn('Failed to fetch last event Id from localStorage');
|
||||||
}
|
}
|
||||||
|
|
||||||
const fetchEvents = makeApi<
|
const fetchEvents = makeApi<
|
||||||
|
@ -114,7 +114,7 @@ const initAsyncEvents = (options: AsyncEventOptions) => {
|
||||||
try {
|
try {
|
||||||
localStorage.setItem(LOCALSTORAGE_KEY, lastReceivedEventId as string);
|
localStorage.setItem(LOCALSTORAGE_KEY, lastReceivedEventId as string);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn('Error saving event ID to localStorage', err);
|
console.warn('Error saving event Id to localStorage', err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ const initAsyncEvents = (options: AsyncEventOptions) => {
|
||||||
const component = componentsByJobId[asyncEvent.job_id];
|
const component = componentsByJobId[asyncEvent.job_id];
|
||||||
if (!component) {
|
if (!component) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'component not found for job_id',
|
'Component not found for job_id',
|
||||||
asyncEvent.job_id,
|
asyncEvent.job_id,
|
||||||
);
|
);
|
||||||
return setLastId(asyncEvent);
|
return setLastId(asyncEvent);
|
||||||
|
@ -156,7 +156,7 @@ const initAsyncEvents = (options: AsyncEventOptions) => {
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.warn('received event with status', asyncEvent.status);
|
console.warn('Received event with status', asyncEvent.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
return setLastId(asyncEvent);
|
return setLastId(asyncEvent);
|
||||||
|
|
|
@ -41,7 +41,7 @@ export const ANNOTATION_TYPES_METADATA = {
|
||||||
},
|
},
|
||||||
TIME_SERIES: {
|
TIME_SERIES: {
|
||||||
value: 'TIME_SERIES',
|
value: 'TIME_SERIES',
|
||||||
label: 'Time Series',
|
label: 'Time series',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ export default function App({ user }: AppProps) {
|
||||||
key="2"
|
key="2"
|
||||||
tab={
|
tab={
|
||||||
<div>
|
<div>
|
||||||
<i className="fa fa-paint-brush" /> {t('Created Content')}
|
<i className="fa fa-paint-brush" /> {t('Created content')}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
@ -73,7 +73,7 @@ export default function App({ user }: AppProps) {
|
||||||
key="3"
|
key="3"
|
||||||
tab={
|
tab={
|
||||||
<div>
|
<div>
|
||||||
<i className="fa fa-list" /> {t('Recent Activity')}
|
<i className="fa fa-list" /> {t('Recent activity')}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue