diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 13f1135401..02bc7e0aeb 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3271,6 +3271,7 @@ runners.delete_runner_failed = Failed to delete runner runners.delete_runner_header = Confirm to delete this runner runners.delete_runner_notice = If a task is running on this runner, it will be terminated and mark as failed. It may break building workflow. runners.delete_runner_confirm = Delete this runner +runners.none = No runners available runners.status.unspecified = Unknown runners.status.idle = Idle runners.status.active = Active diff --git a/templates/shared/actions/runner_list.tmpl b/templates/shared/actions/runner_list.tmpl index 3a5556e003..bd8936cec1 100644 --- a/templates/shared/actions/runner_list.tmpl +++ b/templates/shared/actions/runner_list.tmpl @@ -55,37 +55,43 @@ - {{range .Runners}} - - - {{.StatusLocaleName $.locale}} - - - {{if .Editable $.RunnerOnwerID $.RunnerRepoID}} - - {{template "shared/actions/runner_id" .ID}} - {{.Name}} - - {{else}} -

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

- {{end}} - - {{.OwnType}} - - {{range .AllLabels}} - {{.}} - {{end}} - - {{if .LastOnline}}{{TimeSinceUnix .LastOnline $.locale}}{{else}}{{$.locale.Tr "never"}}{{end}} - - {{if .Editable $.RunnerOnwerID $.RunnerRepoID}} - {{svg "octicon-pencil"}} - {{end}} - - + {{if .Runners}} + {{range .Runners}} + + + {{.StatusLocaleName $.locale}} + + + {{if .Editable $.RunnerOnwerID $.RunnerRepoID}} + + {{template "shared/actions/runner_id" .ID}} + {{.Name}} + + {{else}} +

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

+ {{end}} + + {{.OwnType}} + + {{range .AllLabels}} + {{.}} + {{end}} + + {{if .LastOnline}}{{TimeSinceUnix .LastOnline $.locale}}{{else}}{{$.locale.Tr "never"}}{{end}} + + {{if .Editable $.RunnerOnwerID $.RunnerRepoID}} + {{svg "octicon-pencil"}} + {{end}} + + + {{end}} + {{else}} + + {{.locale.Tr "actions.runners.none"}} + {{end}}