mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
chore: upgrade eslint, babel, and prettier (#12393)
This commit is contained in:
@@ -96,7 +96,10 @@ export const DataTablesPane = ({
|
||||
|
||||
const getData = useCallback(
|
||||
(resultType: string) => {
|
||||
setIsLoading(prevIsLoading => ({ ...prevIsLoading, [resultType]: true }));
|
||||
setIsLoading(prevIsLoading => ({
|
||||
...prevIsLoading,
|
||||
[resultType]: true,
|
||||
}));
|
||||
return getChartDataRequest({
|
||||
formData: queryFormData,
|
||||
resultFormat: 'json',
|
||||
|
||||
@@ -218,11 +218,9 @@ const ExploreChartPanel = props => {
|
||||
/>
|
||||
);
|
||||
|
||||
const elementStyle = (dimension, elementSize, gutterSize) => {
|
||||
return {
|
||||
[dimension]: `calc(${elementSize}% - ${gutterSize + gutterMargin}px)`,
|
||||
};
|
||||
};
|
||||
const elementStyle = (dimension, elementSize, gutterSize) => ({
|
||||
[dimension]: `calc(${elementSize}% - ${gutterSize + gutterMargin}px)`,
|
||||
});
|
||||
|
||||
const panelBody = <div className="panel-body">{renderChart()}</div>;
|
||||
|
||||
|
||||
@@ -198,12 +198,16 @@ export const customTimeRangeEncode = (customRange: CustomRangeType): string => {
|
||||
// relative : specific
|
||||
if (sinceMode === 'relative' && SPECIFIC_MODE.includes(untilMode)) {
|
||||
const until = untilMode === 'specific' ? untilDatetime : untilMode;
|
||||
const since = `DATEADD(DATETIME("${until}"), ${-Math.abs(sinceGrainValue)}, ${sinceGrain})`; // eslint-disable-line
|
||||
const since = `DATEADD(DATETIME("${until}"), ${-Math.abs(
|
||||
sinceGrainValue,
|
||||
)}, ${sinceGrain})`; // eslint-disable-line
|
||||
return `${since} : ${until}`;
|
||||
}
|
||||
|
||||
// relative : relative
|
||||
const since = `DATEADD(DATETIME("${anchorValue}"), ${-Math.abs(sinceGrainValue)}, ${sinceGrain})`; // eslint-disable-line
|
||||
const since = `DATEADD(DATETIME("${anchorValue}"), ${-Math.abs(
|
||||
sinceGrainValue,
|
||||
)}, ${sinceGrain})`; // eslint-disable-line
|
||||
const until = `DATEADD(DATETIME("${anchorValue}"), ${untilGrainValue}, ${untilGrain})`;
|
||||
return `${since} : ${until}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user