Project

General

Profile

Actions

Bug #15478

closed

Default sorting of hosts in the host list

Added by Jeff Sparrow almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello. I am looking to change two things on the main hosts page.

1. I would like the default page load to be sorted by last report time.

2. I would like the operating system column to be pulled from osmajversion instead of kernelmajversion.

Actions #1

Updated by Dominic Cleal almost 8 years ago

  • Project changed from Smart Proxy to Foreman
  • Subject changed from Want to edit some of the /app settings to Default sorting of hosts in the host list
  • Category set to Web Interface

I don't think these two items are related, so it would be best to file the second as a separate issue with some specific data about the facts and OS you're dealing with.

The OS name generated during facts import heavily depends on the precise facts sent by your configuration management tool and the OS in use. In any case, the host listing should use the description set under Hosts > Operating systems, you can edit this to override it.

Actions #2

Updated by Jeff Sparrow almost 8 years ago

Thanks Dominic. I figured since both were /app related, they were. But I created issue 1547979 http://projects.theforeman.org/issues/15479

In regards to this issue, I changed it to sort by last report, like 2 years ago. But my recent updates have reverted back and I dont remember where exactly I changed it.

Thanks.

Actions #3

Updated by Jeff Sparrow almost 8 years ago

I cloned the 1.6 branch and did a diff on my files. I found:

./app/models/concerns/hostext/search.rb and changed the following lines:

12 scoped_search :on => :name, :complete_value => true, :default_order => true
13 scoped_search :on => :last_report, :complete_value => true, :only_explicit => true

to

12 scoped_search :on => :name, :complete_value => true, :only_explicit => true
13 scoped_search :on => :last_report, :complete_value => true, :default_order => :desc

Actions #4

Updated by Jeff Sparrow almost 8 years ago

Anyway. I dont see a way to mark this as closed, but it can be closed per fix above.

Actions #5

Updated by Dominic Cleal almost 8 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF