mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
check limiting factor on query results (#14719)
This commit is contained in:
parent
26c0b30ec9
commit
a9d888ad40
@ -527,6 +527,7 @@ export default class ResultSet extends React.PureComponent<
|
|||||||
let limitMessage;
|
let limitMessage;
|
||||||
const limitReached = results?.displayLimitReached;
|
const limitReached = results?.displayLimitReached;
|
||||||
const isAdmin = !!this.props.user?.roles.Admin;
|
const isAdmin = !!this.props.user?.roles.Admin;
|
||||||
|
const limit = queryLimit || results.query.limit;
|
||||||
const displayMaxRowsReachedMessage = {
|
const displayMaxRowsReachedMessage = {
|
||||||
withAdmin: t(
|
withAdmin: t(
|
||||||
`The number of results displayed is limited to %(rows)d by the configuration DISPLAY_MAX_ROWS. `,
|
`The number of results displayed is limited to %(rows)d by the configuration DISPLAY_MAX_ROWS. `,
|
||||||
@ -535,7 +536,9 @@ export default class ResultSet extends React.PureComponent<
|
|||||||
t(
|
t(
|
||||||
`Please add additional limits/filters or download to csv to see more rows up to the`,
|
`Please add additional limits/filters or download to csv to see more rows up to the`,
|
||||||
),
|
),
|
||||||
t(`the %(queryLimit)d limit.`, { queryLimit }),
|
t(`the %(limit)d limit.`, {
|
||||||
|
limit,
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
withoutAdmin: t(
|
withoutAdmin: t(
|
||||||
`The number of results displayed is limited to %(rows)d. `,
|
`The number of results displayed is limited to %(rows)d. `,
|
||||||
@ -544,8 +547,8 @@ export default class ResultSet extends React.PureComponent<
|
|||||||
t(
|
t(
|
||||||
`Please add additional limits/filters, download to csv, or contact an admin`,
|
`Please add additional limits/filters, download to csv, or contact an admin`,
|
||||||
),
|
),
|
||||||
t(`to see more rows up to the the %(queryLimit)d limit.`, {
|
t(`to see more rows up to the the %(limit)d limit.`, {
|
||||||
queryLimit,
|
limit,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
@ -52,6 +52,7 @@ export type Query = {
|
|||||||
data: Record<string, unknown>[];
|
data: Record<string, unknown>[];
|
||||||
expanded_columns: Column[];
|
expanded_columns: Column[];
|
||||||
selected_columns: Column[];
|
selected_columns: Column[];
|
||||||
|
query: { limit: number };
|
||||||
};
|
};
|
||||||
resultsKey: string | null;
|
resultsKey: string | null;
|
||||||
schema: string;
|
schema: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user