You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2023/03/07 09:29:27 UTC

[incubator-devlake] branch main updated: fix(tapd): add page size to frontend example (#4600)

This is an automated email from the ASF dual-hosted git repository.

warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 16cf12426 fix(tapd): add page size to frontend example (#4600)
16cf12426 is described below

commit 16cf124266182c579d71009e6cb34564a5c1af57
Author: Warren Chen <yi...@merico.dev>
AuthorDate: Tue Mar 7 17:29:22 2023 +0800

    fix(tapd): add page size to frontend example (#4600)
---
 backend/plugins/tapd/tapd.go                                            | 2 ++
 backend/plugins/tapd/tasks/bug_collector.go                             | 2 +-
 .../src/pages/blueprint/components/advanced-editor/example/tapd.ts      | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/backend/plugins/tapd/tapd.go b/backend/plugins/tapd/tapd.go
index f36fc570d..4d61d67ef 100644
--- a/backend/plugins/tapd/tapd.go
+++ b/backend/plugins/tapd/tapd.go
@@ -31,6 +31,7 @@ func main() {
 	connectionId := cmd.Flags().Uint64P("connection", "c", 0, "tapd connection id")
 	workspaceId := cmd.Flags().Uint64P("workspace", "w", 0, "tapd workspace id")
 	companyId := cmd.Flags().Uint64P("company", "o", 0, "tapd company id")
+	pageSize := cmd.Flags().Uint64P("pageSize", "p", 0, "tapd page size")
 	timeAfter := cmd.Flags().StringP("timeAfter", "a", "", "collect data that are created after specified time, ie 2006-05-06T07:08:09Z")
 	err := cmd.MarkFlagRequired("connection")
 	if err != nil {
@@ -47,6 +48,7 @@ func main() {
 			"workspaceId":  *workspaceId,
 			"companyId":    *companyId,
 			"timeAfter":    *timeAfter,
+			"pageSize":     *pageSize,
 		})
 		//
 		// cfg := config.GetConfig()
diff --git a/backend/plugins/tapd/tasks/bug_collector.go b/backend/plugins/tapd/tasks/bug_collector.go
index 148fffd2d..facc529e8 100644
--- a/backend/plugins/tapd/tasks/bug_collector.go
+++ b/backend/plugins/tapd/tasks/bug_collector.go
@@ -42,7 +42,7 @@ func CollectBugs(taskCtx plugin.SubTaskContext) errors.Error {
 	err = collectorWithState.InitCollector(helper.ApiCollectorArgs{
 		Incremental: incremental,
 		ApiClient:   data.ApiClient,
-		PageSize:    100,
+		PageSize:    int(data.Options.PageSize),
 		UrlTemplate: "bugs",
 		Query: func(reqData *helper.RequestData) (url.Values, errors.Error) {
 			query := url.Values{}
diff --git a/config-ui/src/pages/blueprint/components/advanced-editor/example/tapd.ts b/config-ui/src/pages/blueprint/components/advanced-editor/example/tapd.ts
index c9532046d..38b3eb530 100644
--- a/config-ui/src/pages/blueprint/components/advanced-editor/example/tapd.ts
+++ b/config-ui/src/pages/blueprint/components/advanced-editor/example/tapd.ts
@@ -25,6 +25,7 @@ const tapd = [
         companyId: 1,
         workspaceId: 1,
         connectionId: 1,
+        pageSize: 100,
       },
     },
   ],