mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
fix(report): fix start date format and paginated query (#12132)
* fix: start date format for executation log * fix: paginated query
This commit is contained in:
parent
ba952ba39d
commit
0d9c863b6e
@ -33,6 +33,8 @@ import Owner from 'src/types/Owner';
|
||||
import { AlertReportCronScheduler } from './components/AlertReportCronScheduler';
|
||||
import { AlertObject, Operator, Recipient, MetaObject } from './types';
|
||||
|
||||
const SELECT_PAGE_SIZE = 2000; // temporary fix for paginated query
|
||||
|
||||
type SelectValue = {
|
||||
value: string;
|
||||
label: string;
|
||||
@ -616,7 +618,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
|
||||
|
||||
// Fetch data to populate form dropdowns
|
||||
const loadOwnerOptions = (input = '') => {
|
||||
const query = rison.encode({ filter: input });
|
||||
const query = rison.encode({ filter: input, page_size: SELECT_PAGE_SIZE });
|
||||
return SupersetClient.get({
|
||||
endpoint: `/api/v1/report/related/owners?q=${query}`,
|
||||
}).then(
|
||||
@ -633,7 +635,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
|
||||
};
|
||||
|
||||
const loadSourceOptions = (input = '') => {
|
||||
const query = rison.encode({ filter: input });
|
||||
const query = rison.encode({ filter: input, page_size: SELECT_PAGE_SIZE });
|
||||
return SupersetClient.get({
|
||||
endpoint: `/api/v1/report/related/database?q=${query}`,
|
||||
}).then(
|
||||
@ -682,7 +684,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
|
||||
};
|
||||
|
||||
const loadDashboardOptions = (input = '') => {
|
||||
const query = rison.encode({ filter: input });
|
||||
const query = rison.encode({ filter: input, page_size: SELECT_PAGE_SIZE });
|
||||
return SupersetClient.get({
|
||||
endpoint: `/api/v1/report/related/dashboard?q=${query}`,
|
||||
}).then(
|
||||
@ -731,7 +733,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
|
||||
};
|
||||
|
||||
const loadChartOptions = (input = '') => {
|
||||
const query = rison.encode({ filter: input });
|
||||
const query = rison.encode({ filter: input, page_size: SELECT_PAGE_SIZE });
|
||||
return SupersetClient.get({
|
||||
endpoint: `/api/v1/report/related/chart?q=${query}`,
|
||||
}).then(
|
||||
|
@ -104,7 +104,7 @@ function ExecutionLog({ addDangerToast, isReportEnabled }: ExecutionLogProps) {
|
||||
row: {
|
||||
original: { start_dttm: startDttm },
|
||||
},
|
||||
}: any) => moment(new Date(startDttm)).format('ll'),
|
||||
}: any) => moment(new Date(startDttm)).format('MM/DD/YYYY hh:mm:ss a'),
|
||||
Header: t('Start At'),
|
||||
accessor: 'start_dttm',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user