feat(data-visualization): add offset param to charts-query (#5911)

* feat(locale): add offset param to charts-query(backend)

* feat(locale): add offset param to charts-query(frontend)

---------

Co-authored-by: mahuan <1007409254@qq.com>
This commit is contained in:
mahuantest 2024-12-20 11:41:08 +08:00 committed by GitHub
parent 5de1666c51
commit 7f7a1fdbfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 22 additions and 2 deletions

View File

@ -461,6 +461,19 @@ export const querySchema: ISchema = {
},
},
},
offset: {
title: '{{t("Offset")}}',
type: 'number',
'x-decorator': 'FormItem',
'x-component': 'InputNumber',
'x-component-props': {
defaultValue: 0,
min: 0,
style: {
width: '100px',
},
},
},
},
},
// sql: {

View File

@ -50,6 +50,7 @@ export type QueryProps = Partial<{
}[];
filter: any;
limit: number;
offset: number;
sql: {
fields?: string;
clauses?: string;

View File

@ -23,6 +23,7 @@
"Filter": "Filter",
"Sort": "Sort",
"Limit": "Limit",
"Offset": "Offset",
"Enable cache": "Enable cache",
"TTL (second)": "TTL (second)",
"Field": "Field",

View File

@ -23,6 +23,7 @@
"Filter": "フィルター",
"Sort": "ソート",
"Limit": "制限",
"Offset": "スキップする件数",
"Enable cache": "キャッシュを有効化",
"TTL (second)": "TTL",
"Field": "フィールド",
@ -97,4 +98,4 @@
"Show padding": "パディングを表示",
"Distinct": "重複排除",
"Collapse": "折りたたみ"
}
}

View File

@ -23,6 +23,7 @@
"Filter": "필터",
"Sort": "정렬",
"Limit": "결과 제한",
"Offset": "건너뛸 개수",
"Enable cache": "캐시 활성화",
"TTL (second)": "TTL (초)",
"Field": "필드",

View File

@ -23,6 +23,7 @@
"Filter": "过滤",
"Sort": "排序",
"Limit": "结果数量",
"Offset": "跳过数量",
"Enable cache": "启用缓存",
"TTL (second)": "缓存时间 (秒)",
"Field": "字段",

View File

@ -91,7 +91,7 @@ export class QueryParser {
parse() {
return async (ctx: Context, next: Next) => {
const { measures, dimensions, orders, include, where, limit } = ctx.action.params.values;
const { measures, dimensions, orders, include, where, limit, offset } = ctx.action.params.values;
const { attributes: measureAttributes, fieldMap: measureFieldMap, hasAgg } = this.parseMeasures(ctx, measures);
const {
attributes: dimensionAttributes,
@ -109,6 +109,7 @@ export class QueryParser {
group,
order,
limit: limit || 2000,
offset: offset || 0,
subQuery: false,
raw: true,
},

View File

@ -38,6 +38,7 @@ export type QueryParams = Partial<{
orders: OrderProps[];
filter: any;
limit: number;
offset: number;
sql: {
fields?: string;
clauses?: string;