Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6aff4984
Commit
6aff4984
authored
Oct 04, 2017
by
Takuya Noguchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sort runners on admin runners
parent
2828b768
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
app/controllers/admin/runners_controller.rb
app/controllers/admin/runners_controller.rb
+2
-1
app/views/admin/runners/index.html.haml
app/views/admin/runners/index.html.haml
+1
-1
changelogs/unreleased/38720-sort-admin-runners.yml
changelogs/unreleased/38720-sort-admin-runners.yml
+5
-0
No files found.
app/controllers/admin/runners_controller.rb
View file @
6aff4984
...
@@ -2,7 +2,8 @@ class Admin::RunnersController < Admin::ApplicationController
...
@@ -2,7 +2,8 @@ class Admin::RunnersController < Admin::ApplicationController
before_action
:runner
,
except: :index
before_action
:runner
,
except: :index
def
index
def
index
@runners
=
Ci
::
Runner
.
order
(
'id DESC'
)
sort
=
params
[
:sort
]
==
'contacted_asc'
?
{
contacted_at: :asc
}
:
{
id: :desc
}
@runners
=
Ci
::
Runner
.
order
(
sort
)
@runners
=
@runners
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@runners
=
@runners
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@runners
=
@runners
.
page
(
params
[
:page
]).
per
(
30
)
@runners
=
@runners
.
page
(
params
[
:page
]).
per
(
30
)
@active_runners_cnt
=
Ci
::
Runner
.
online
.
count
@active_runners_cnt
=
Ci
::
Runner
.
online
.
count
...
...
app/views/admin/runners/index.html.haml
View file @
6aff4984
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
%th
Projects
%th
Projects
%th
Jobs
%th
Jobs
%th
Tags
%th
Tags
%th
Last contact
%th
=
link_to
'Last contact'
,
admin_runners_path
(
params
.
slice
(
:search
).
merge
(
sort:
'contacted_asc'
))
%th
%th
-
@runners
.
each
do
|
runner
|
-
@runners
.
each
do
|
runner
|
...
...
changelogs/unreleased/38720-sort-admin-runners.yml
0 → 100644
View file @
6aff4984
---
title
:
Add sort runners on admin runners
merge_request
:
14661
author
:
Takuya Noguchi
type
:
added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment