diff --git a/ui/packages/tidb-dashboard-for-op/src/apps/TopSQL/context.ts b/ui/packages/tidb-dashboard-for-op/src/apps/TopSQL/context.ts
index b30d31f98a..c94dc3d77d 100644
--- a/ui/packages/tidb-dashboard-for-op/src/apps/TopSQL/context.ts
+++ b/ui/packages/tidb-dashboard-for-op/src/apps/TopSQL/context.ts
@@ -48,6 +48,7 @@ export const ctx: ITopSQLContext = {
ds,
cfg: {
checkNgm: true,
- showSetting: true
+ showSetting: true,
+ showLimit: true
}
}
diff --git a/ui/packages/tidb-dashboard-lib/src/apps/TopSQL/context/index.ts b/ui/packages/tidb-dashboard-lib/src/apps/TopSQL/context/index.ts
index 2bc49b850a..28c02cdc5f 100644
--- a/ui/packages/tidb-dashboard-lib/src/apps/TopSQL/context/index.ts
+++ b/ui/packages/tidb-dashboard-lib/src/apps/TopSQL/context/index.ts
@@ -52,6 +52,7 @@ export interface ITopSQLConfig {
userName?: string
showSearchInStatements?: boolean
+ showLimit?: boolean
}
export interface ITopSQLContext {
diff --git a/ui/packages/tidb-dashboard-lib/src/apps/TopSQL/pages/List/List.tsx b/ui/packages/tidb-dashboard-lib/src/apps/TopSQL/pages/List/List.tsx
index 383b80638c..23bfea8036 100644
--- a/ui/packages/tidb-dashboard-lib/src/apps/TopSQL/pages/List/List.tsx
+++ b/ui/packages/tidb-dashboard-lib/src/apps/TopSQL/pages/List/List.tsx
@@ -217,18 +217,20 @@ export function TopSQLList() {
}
disabled={isLoading}
/>
-
+ {ctx?.cfg.showLimit && (
+
+ )}