Merge branch '38720-sort-admin-runners' into 'master'
Add sort runners on admin runners Closes #38720 See merge request gitlab-org/gitlab-ce!14661
This commit is contained in:
commit
22ade6e7cb
|
@ -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
|
||||||
|
|
|
@ -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|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Add sort runners on admin runners
|
||||||
|
merge_request: 14661
|
||||||
|
author: Takuya Noguchi
|
||||||
|
type: added
|
Loading…
Reference in New Issue