From 427b380012741714255331d2e4fd7ecd564cdc98 Mon Sep 17 00:00:00 2001 From: littlejian <17816869670@163.com> Date: Tue, 26 Oct 2021 11:36:30 +0800 Subject: [PATCH 1/2] update projectID to projectId (#2534) --- .../at_api_chart_group/at_api_avg_cost_chart/render.go | 2 +- .../at_api_chart_group/at_api_rate_failed_chart/render.go | 2 +- .../test-dashboard/overview_group/quality_chart/render.go | 2 +- .../scene_chart_group/scene_avg_cost_chart/render.go | 2 +- .../scene_chart_group/scene_rate_failed_chart/render.go | 2 +- .../scene_chart_group/scene_rate_passed_chart/render.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/dop/component-protocol/components/test-dashboard/at_api_chart_group/at_api_avg_cost_chart/render.go b/modules/dop/component-protocol/components/test-dashboard/at_api_chart_group/at_api_avg_cost_chart/render.go index 9038d22e482..8fc8de758b7 100644 --- a/modules/dop/component-protocol/components/test-dashboard/at_api_chart_group/at_api_avg_cost_chart/render.go +++ b/modules/dop/component-protocol/components/test-dashboard/at_api_chart_group/at_api_avg_cost_chart/render.go @@ -56,7 +56,7 @@ func (f *Chart) Render(ctx context.Context, c *cptype.Component, scenario cptype timeFilter := h.GetAtSceneAndApiTimeFilter() atSvc := ctx.Value(types.AutoTestPlanService).(*autotestv2.Service) - projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectID").(string), 10, 64) + projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectId").(string), 10, 64) costTimeAvg, err := atSvc.ExecHistoryApiAvgCostTime(apistructs.StatisticsExecHistoryRequest{ TimeStart: timeFilter.TimeStart, TimeEnd: timeFilter.TimeEnd, diff --git a/modules/dop/component-protocol/components/test-dashboard/at_api_chart_group/at_api_rate_failed_chart/render.go b/modules/dop/component-protocol/components/test-dashboard/at_api_chart_group/at_api_rate_failed_chart/render.go index f4d1bad50c9..bc873507907 100644 --- a/modules/dop/component-protocol/components/test-dashboard/at_api_chart_group/at_api_rate_failed_chart/render.go +++ b/modules/dop/component-protocol/components/test-dashboard/at_api_chart_group/at_api_rate_failed_chart/render.go @@ -56,7 +56,7 @@ func (f *Chart) Render(ctx context.Context, c *cptype.Component, scenario cptype timeFilter := h.GetAtSceneAndApiTimeFilter() atSvc := ctx.Value(types.AutoTestPlanService).(*autotestv2.Service) - projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectID").(string), 10, 64) + projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectId").(string), 10, 64) statusCounts, err := atSvc.ExecHistoryApiStatusCount(apistructs.StatisticsExecHistoryRequest{ TimeStart: timeFilter.TimeStart, TimeEnd: timeFilter.TimeEnd, diff --git a/modules/dop/component-protocol/components/test-dashboard/overview_group/quality_chart/render.go b/modules/dop/component-protocol/components/test-dashboard/overview_group/quality_chart/render.go index 34a8e839ef4..5cb3a753388 100644 --- a/modules/dop/component-protocol/components/test-dashboard/overview_group/quality_chart/render.go +++ b/modules/dop/component-protocol/components/test-dashboard/overview_group/quality_chart/render.go @@ -70,7 +70,7 @@ func (q *Q) Render(ctx context.Context, c *cptype.Component, scenario cptype.Sce }() h := gshelper.NewGSHelper(gs) - q.projectID, _ = strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectID").(string), 10, 64) + q.projectID, _ = strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectId").(string), 10, 64) q.dbClient = ctx.Value(types.DBClient).(*dao.DBClient) q.coco = ctx.Value(types.CodeCoverageService).(*code_coverage.CodeCoverage) diff --git a/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_avg_cost_chart/render.go b/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_avg_cost_chart/render.go index 18b97743992..355013e8567 100644 --- a/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_avg_cost_chart/render.go +++ b/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_avg_cost_chart/render.go @@ -57,7 +57,7 @@ func (f *Chart) Render(ctx context.Context, c *cptype.Component, scenario cptype timeFilter := h.GetAtSceneAndApiTimeFilter() atSvc := ctx.Value(types.AutoTestPlanService).(*autotestv2.Service) - projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectID").(string), 10, 64) + projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectId").(string), 10, 64) costTimeAvg, err := atSvc.ExecHistorySceneAvgCostTime(apistructs.StatisticsExecHistoryRequest{ TimeStart: timeFilter.TimeStart, TimeEnd: timeFilter.TimeEnd, diff --git a/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_rate_failed_chart/render.go b/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_rate_failed_chart/render.go index 95abb78458a..bb4ed2588f6 100644 --- a/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_rate_failed_chart/render.go +++ b/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_rate_failed_chart/render.go @@ -56,7 +56,7 @@ func (f *Chart) Render(ctx context.Context, c *cptype.Component, scenario cptype timeFilter := h.GetAtSceneAndApiTimeFilter() atSvc := ctx.Value(types.AutoTestPlanService).(*autotestv2.Service) - projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectID").(string), 10, 64) + projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectId").(string), 10, 64) statusCounts, err := atSvc.ExecHistorySceneStatusCount(apistructs.StatisticsExecHistoryRequest{ TimeStart: timeFilter.TimeStart, TimeEnd: timeFilter.TimeEnd, diff --git a/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_rate_passed_chart/render.go b/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_rate_passed_chart/render.go index b10616ff02f..65632d71229 100644 --- a/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_rate_passed_chart/render.go +++ b/modules/dop/component-protocol/components/test-dashboard/scene_chart_group/scene_rate_passed_chart/render.go @@ -56,7 +56,7 @@ func (f *Chart) Render(ctx context.Context, c *cptype.Component, scenario cptype timeFilter := h.GetAtSceneAndApiTimeFilter() atSvc := ctx.Value(types.AutoTestPlanService).(*autotestv2.Service) - projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectID").(string), 10, 64) + projectID, _ := strconv.ParseUint(cputil.GetInParamByKey(ctx, "projectId").(string), 10, 64) statusCounts, err := atSvc.ExecHistorySceneApiStatusCount(apistructs.StatisticsExecHistoryRequest{ TimeStart: timeFilter.TimeStart, TimeEnd: timeFilter.TimeEnd, From 4dba5d827cf4e98040570082b15ab7a8bf859690 Mon Sep 17 00:00:00 2001 From: kakj-go <18579115540@163.com> Date: Wed, 3 Nov 2021 11:05:14 +0800 Subject: [PATCH 2/2] change mobile template push code addr --- modules/core-services/services/application/appliation.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/core-services/services/application/appliation.go b/modules/core-services/services/application/appliation.go index 7e70578250e..0b03ec96fb3 100644 --- a/modules/core-services/services/application/appliation.go +++ b/modules/core-services/services/application/appliation.go @@ -353,9 +353,8 @@ func (a *Application) Init(initReq *apistructs.ApplicationInitRequest) (uint64, if err != nil { return 0, err } - domain := strutil.Concat(strutil.ToLower(org.Name), "-org.", conf.RootDomain()) u, _ := url.Parse(conf.UIPublicURL()) - remoteUrl := fmt.Sprintf("%s://git:%s@%s/wb/%s/%s", u.Scheme, token, domain, app.ProjectName, app.Name) + remoteUrl := fmt.Sprintf("%s://git:%s@%s/%s/dop/%s/%s", u.Scheme, token, conf.UIDomain(), org.Name, app.ProjectName, app.Name) // generate git push action gitPushStage := &apistructs.PipelineYmlAction{