-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use severity as as default sort #1121
base: main
Are you sure you want to change the base?
Conversation
3793318
to
9b37857
Compare
@@ -50,15 +50,19 @@ public function indexAction() | |||
|
|||
$limitControl = $this->createLimitControl(); | |||
$paginationControl = $this->createPaginationControl($hosts); | |||
|
|||
$defaultSort = 'host.state.severity desc,host.state.last_state_change desc'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$defaultSort = 'host.state.severity desc,host.state.last_state_change desc'; | |
$defaultSort = ['host.state.severity DESC', 'host.state.last_state_change DESC']; |
This looks more readable to me.
'host.display_name' => t('Name'), | ||
'host.state.severity desc,host.state.last_state_change desc' => t('Severity'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'host.display_name' => t('Name'), | |
'host.state.severity desc,host.state.last_state_change desc' => t('Severity'), | |
'host.state.severity desc,host.state.last_state_change desc' => t('Severity'), | |
'host.display_name' => t('Name'), |
You need to also change the order of this array to reflect that the hosts were ordered by severity by default.
@@ -60,6 +60,8 @@ public function indexAction() | |||
|
|||
$limitControl = $this->createLimitControl(); | |||
$paginationControl = $this->createPaginationControl($services); | |||
|
|||
$defaultSort = 'service.state.severity desc,service.state.last_state_change desc'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$defaultSort = 'service.state.severity desc,service.state.last_state_change desc'; | |
$defaultSort = ['service.state.severity DESC', 'service.state.last_state_change Desc']; |
@@ -60,6 +60,8 @@ public function indexAction() | |||
|
|||
$limitControl = $this->createLimitControl(); | |||
$paginationControl = $this->createPaginationControl($services); | |||
|
|||
$defaultSort = 'service.state.severity desc,service.state.last_state_change desc'; | |||
$sortControl = $this->createSortControl( | |||
$services, | |||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, change the order of the array to reflect the default sort.
9b37857
to
deea667
Compare
resolves #1096