Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
This gitlab instance will be under maintenance Tuesday 6th May from 10 am to 11 am CET
Show more breadcrumbs
Arkindex
Frontend
Commits
4fe188f6
Commit
4fe188f6
authored
1 year ago
by
Erwan Rouchet
Committed by
Valentin Rigal
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Sort agents by hostname
parent
eb1500fa
No related branches found
No related tags found
1 merge request
!1515
Sort agents by hostname
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/views/Process/Agents.vue
+3
-4
3 additions, 4 deletions
src/views/Process/Agents.vue
with
3 additions
and
4 deletions
src/views/Process/Agents.vue
+
3
−
4
View file @
4fe188f6
...
...
@@ -9,8 +9,10 @@
<
script
>
import
{
mapState
,
mapActions
,
mapMutations
}
from
'
vuex
'
import
{
sortBy
}
from
'
lodash
'
import
{
errorParser
}
from
'
@/helpers
'
import
InLineAgent
from
'
@/components/Process/Agents/InLineAgent.vue
'
export
default
{
components
:
{
InLineAgent
...
...
@@ -21,10 +23,7 @@ export default {
computed
:
{
...
mapState
(
'
ponos
'
,
[
'
agents
'
]),
orderedAgents
()
{
// Sort agents to display active ones first
return
Object
.
values
(
this
.
agents
).
sort
(
(
a
,
b
)
=>
new
Date
(
b
.
last_ping
)
-
new
Date
(
a
.
last_ping
)
)
return
sortBy
(
Object
.
values
(
this
.
agents
),
agent
=>
agent
.
hostname
.
toLowerCase
())
}
},
methods
:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment