From 05592a3001f7269cfb3cb49474141b32dee41348 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 26 Apr 2023 10:51:07 +0100 Subject: [PATCH 1/5] fix icons on the admin/users page ensuring remains on a single line limiting length of email field --- web_src/css/admin.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/css/admin.css b/web_src/css/admin.css index a07a63b11ea43..5623422e03f09 100644 --- a/web_src/css/admin.css +++ b/web_src/css/admin.css @@ -40,7 +40,7 @@ } .admin.user .email { - max-width: 200px; + max-width: 130px; } .admin dl.admin-dl-horizontal { From bbcc48743e3cc3261053220d4a5718d05ca0d229 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 26 Apr 2023 10:51:35 +0100 Subject: [PATCH 2/5] updating the admin/runners page adding sort icons and allowing sort by name --- models/actions/runner.go | 6 ++++++ routers/web/shared/actions/runners.go | 1 + templates/shared/actions/runner_list.tmpl | 15 ++++++++++++--- web_src/css/runner.css | 7 +++++++ 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/models/actions/runner.go b/models/actions/runner.go index cce8b4f4431d3..70a2f0a9093ea 100644 --- a/models/actions/runner.go +++ b/models/actions/runner.go @@ -180,6 +180,12 @@ func (opts FindRunnerOptions) toOrder() string { return "last_online ASC" case "alphabetically": return "name ASC" + case "reversealphabetically": + return "name DESC" + case "newest": + return "id DESC" + case "oldest": + return "id ASC" } return "last_online DESC" } diff --git a/routers/web/shared/actions/runners.go b/routers/web/shared/actions/runners.go index 2c3614cbbcb2a..59545d2f9ba6a 100644 --- a/routers/web/shared/actions/runners.go +++ b/routers/web/shared/actions/runners.go @@ -56,6 +56,7 @@ func RunnersList(ctx *context.Context, tplName base.TplName, opts actions_model. ctx.Data["RegistrationToken"] = token.Token ctx.Data["RunnerOnwerID"] = opts.OwnerID ctx.Data["RunnerRepoID"] = opts.RepoID + ctx.Data["SortType"] = opts.Sort pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) ctx.Data["Page"] = pager diff --git a/templates/shared/actions/runner_list.tmpl b/templates/shared/actions/runner_list.tmpl index e738a581c329e..024d3573c32e7 100644 --- a/templates/shared/actions/runner_list.tmpl +++ b/templates/shared/actions/runner_list.tmpl @@ -45,9 +45,18 @@ - - - + + + diff --git a/web_src/css/runner.css b/web_src/css/runner.css index d0ea5252e5166..d326423c2b16c 100644 --- a/web_src/css/runner.css +++ b/web_src/css/runner.css @@ -52,3 +52,10 @@ background-color: var(--color-yellow); color: var(--color-white); } + +.runner-container .runner-tags { + display: flex; + flex-direction: row; + flex-wrap: wrap; + width: 200px; +} From 9d6c4a7250e0dd68c6255b3a613aa4d8ba314be6 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 26 Apr 2023 19:47:50 +0100 Subject: [PATCH 3/5] remove uneeded display flex --- web_src/css/runner.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/web_src/css/runner.css b/web_src/css/runner.css index d326423c2b16c..6a7d353364254 100644 --- a/web_src/css/runner.css +++ b/web_src/css/runner.css @@ -54,8 +54,5 @@ } .runner-container .runner-tags { - display: flex; - flex-direction: row; - flex-wrap: wrap; width: 200px; } From 86389da27af48ff1e366e4a7b8a90d55d03edd37 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 12 Sep 2023 12:43:19 +0100 Subject: [PATCH 4/5] centralise the sort arrow as per comment --- web_src/css/base.css | 1 + 1 file changed, 1 insertion(+) diff --git a/web_src/css/base.css b/web_src/css/base.css index 8542248d90c17..8edd0ddd2e706 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -2054,6 +2054,7 @@ table th[data-sortt-desc]:hover { table th[data-sortt-asc] .svg, table th[data-sortt-desc] .svg { margin-left: 0.25rem; + margin-top: 0.25rem; } .ui.dropdown .menu .item { From d18df6618b4873d9bdaa4c8bbd2313bd4ed7084c Mon Sep 17 00:00:00 2001 From: John Date: Tue, 12 Sep 2023 12:57:54 +0100 Subject: [PATCH 5/5] Revert "centralise the sort arrow as per comment" This reverts commit 86389da27af48ff1e366e4a7b8a90d55d03edd37. --- web_src/css/base.css | 1 - 1 file changed, 1 deletion(-) diff --git a/web_src/css/base.css b/web_src/css/base.css index 8edd0ddd2e706..8542248d90c17 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -2054,7 +2054,6 @@ table th[data-sortt-desc]:hover { table th[data-sortt-asc] .svg, table th[data-sortt-desc] .svg { margin-left: 0.25rem; - margin-top: 0.25rem; } .ui.dropdown .menu .item {
{{.locale.Tr "actions.runners.status"}}{{.locale.Tr "actions.runners.id"}}{{.locale.Tr "actions.runners.name"}} + {{.locale.Tr "actions.runners.status"}} + {{SortArrow "online" "offline" .SortType false}} + + {{.locale.Tr "actions.runners.id"}} + {{SortArrow "oldest" "newest" .SortType false}} + + {{.locale.Tr "actions.runners.name"}} + {{SortArrow "alphabetically" "reversealphabetically" .SortType false}} + {{.locale.Tr "actions.runners.version"}} {{.locale.Tr "actions.runners.owner_type"}} {{.locale.Tr "actions.runners.labels"}}