From 10ebbeca2f582003cdff284958f845d1c6df6a55 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Fri, 9 Dec 2022 15:29:26 +0800 Subject: [PATCH] chore: rename to action --- routers/web/repo/actions/view.go | 10 ++--- templates/repo/actions/list.tmpl | 2 +- .../{build_list.tmpl => runs_list.tmpl} | 0 templates/repo/actions/view.tmpl | 2 +- .../{RepoBuildView.vue => RepoActionView.vue} | 40 +++++++++---------- web_src/js/index.js | 4 +- 6 files changed, 29 insertions(+), 29 deletions(-) rename templates/repo/actions/{build_list.tmpl => runs_list.tmpl} (100%) rename web_src/js/components/{RepoBuildView.vue => RepoActionView.vue} (95%) diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index 644cbd9cc3..dbdcc517e7 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -50,11 +50,11 @@ type ViewRequest struct { type ViewResponse struct { StateData struct { - BuildInfo struct { + RunInfo struct { HTMLURL string `json:"htmlurl"` Title string `json:"title"` Cancelable bool `json:"cancelable"` - } `json:"buildInfo"` + } `json:"runInfo"` AllJobGroups []ViewGroup `json:"allJobGroups"` CurrentJobInfo struct { Title string `json:"title"` @@ -108,9 +108,9 @@ func ViewPost(ctx *context_module.Context) { run := current.Run resp := &ViewResponse{} - resp.StateData.BuildInfo.Title = run.Title - resp.StateData.BuildInfo.HTMLURL = run.HTMLURL() - resp.StateData.BuildInfo.Cancelable = !run.Status.IsDone() + resp.StateData.RunInfo.Title = run.Title + resp.StateData.RunInfo.HTMLURL = run.HTMLURL() + resp.StateData.RunInfo.Cancelable = !run.Status.IsDone() respJobs := make([]*ViewJob, len(jobs)) for i, v := range jobs { diff --git a/templates/repo/actions/list.tmpl b/templates/repo/actions/list.tmpl index ccece77e3d..ce0d82a600 100644 --- a/templates/repo/actions/list.tmpl +++ b/templates/repo/actions/list.tmpl @@ -41,7 +41,7 @@ - {{template "repo/actions/build_list" .}} + {{template "repo/actions/runs_list" .}} diff --git a/templates/repo/actions/build_list.tmpl b/templates/repo/actions/runs_list.tmpl similarity index 100% rename from templates/repo/actions/build_list.tmpl rename to templates/repo/actions/runs_list.tmpl diff --git a/templates/repo/actions/view.tmpl b/templates/repo/actions/view.tmpl index 3651d2d0fc..8b20b890d3 100644 --- a/templates/repo/actions/view.tmpl +++ b/templates/repo/actions/view.tmpl @@ -2,7 +2,7 @@
{{template "repo/header" .}} -
+
diff --git a/web_src/js/components/RepoBuildView.vue b/web_src/js/components/RepoActionView.vue similarity index 95% rename from web_src/js/components/RepoBuildView.vue rename to web_src/js/components/RepoActionView.vue index 7286788daa..c2acb52160 100644 --- a/web_src/js/components/RepoBuildView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -1,8 +1,8 @@