From 05c08ec2466a658d0d6b48cf7a084df91ba9bf75 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Fri, 6 Jan 2023 14:12:14 +0800 Subject: [PATCH] chore: format runner id --- templates/shared/actions/runner_edit.tmpl | 4 ++-- templates/shared/actions/runner_id.tmpl | 1 + templates/shared/actions/runner_list.tmpl | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 templates/shared/actions/runner_id.tmpl diff --git a/templates/shared/actions/runner_edit.tmpl b/templates/shared/actions/runner_edit.tmpl index 9c6188f233..461c02ecad 100644 --- a/templates/shared/actions/runner_edit.tmpl +++ b/templates/shared/actions/runner_edit.tmpl @@ -1,7 +1,7 @@
{{template "base/alert" .}}

- {{.locale.Tr "actions.runners.runner_title"}} #{{.Runner.ID}} {{.Runner.Name}} + {{.locale.Tr "actions.runners.runner_title"}} {{template "shared/actions/runner_id" .Runner.ID}} {{.Runner.Name}}

@@ -69,7 +69,7 @@ {{range .Tasks}} - #{{.ID}} + {{template "shared/actions/runner_id" .ID}} {{.Status.String}} {{.GetRepoName}} diff --git a/templates/shared/actions/runner_id.tmpl b/templates/shared/actions/runner_id.tmpl new file mode 100644 index 0000000000..be38fadcc9 --- /dev/null +++ b/templates/shared/actions/runner_id.tmpl @@ -0,0 +1 @@ +#{{.}} diff --git a/templates/shared/actions/runner_list.tmpl b/templates/shared/actions/runner_list.tmpl index 3a58464602..93f630c035 100644 --- a/templates/shared/actions/runner_list.tmpl +++ b/templates/shared/actions/runner_list.tmpl @@ -62,12 +62,12 @@ {{if .Editable $.RunnerOnwerID $.RunnerRepoID}} - #{{.ID}} + {{template "shared/actions/runner_id" .ID}} {{.Name}} {{else}}

- #{{.ID}} + {{template "shared/actions/runner_id" .ID}} {{.Name}}

{{end}}