How to change the order of views in Jenkins
Asked Answered
P

5

11

I've created a new view (tab) in Jenkins. It was created in the out most right of the page and i'd like it to be moved to the left. I searched everywhere and could not find how to do it. Would appreciate your help.

Pereyra answered 24/7, 2016 at 15:35 Comment(0)
L
4

Actually i found it pretty simple to just add empty spaces in front of the view name and because it orders it alphabetically, you can get the desired result with just a few clicks:

Jenkins views screenshot

Louisalouisburg answered 28/6, 2018 at 21:40 Comment(3)
Unfortunately, you have to add this on job creation. Jenkins will not let you edit a name to include spaces as it views it as the same name.Witchhunt
@PrestonM there is an option on the left pane to edit the view. And then you can rename the view. However the initial view when landing on the main jenkins page is still defaulted to "All" which bothers me. I would prefer to land on a view where only the enabled jobs are show :/Volleyball
@Volleyball - On the Manage Jenkins -> Configure System page you can change the default view to something other than "All" using the "Default view" settingSaransarangi
P
4

You can also just add a number before each tab. Example: "1. First Tab", "2. Second Tab", "3. Third Tab"

Photomap answered 16/6, 2021 at 10:29 Comment(1)
But, for the 10th view, it is coming next to first view. Like, "1. First Tab", "10. Tenth Tab", "2. Second Tab".Rafaelita
C
3

I tried the Dashboard View plugin but couldn't get it working out of the box and didn't want to spend any time on it really.

My solution - which gave me somewhat peace of mind - was to prefix the view names with roman numerals :)

Concordia answered 3/10, 2017 at 7:25 Comment(1)
But, for the 9th view, it is coming next to fourth view. Like, "iv. Fourth Tab", "ix. Ninth Tab", "v. Fifth Tab".Rafaelita
S
3

Prefix the view name with a soft hyphen ­ to make them appear at the end or with a space to make them appear infront ­

shy = String.fromCharCode(173);
chars = ['A','B','Z', shy + 'Z','a',' a','b','z',];
document.body.innerHTML = chars.toString() + '<br/>' + chars.sort().toString()
<html><head></head><body></body></html>
Subaquatic answered 22/3, 2019 at 10:29 Comment(1)
The soft hyphen works great! Thanks!Manysided
R
2

Tabs are in alphabetical order and I don't think there is any way to change that. So your best option may be to rename your tab so that it starts with an 'A'.

An alternative may be to use this plugin : https://wiki.jenkins-ci.org/display/JENKINS/Dashboard+View It allow customisation of the main page.

Rader answered 25/7, 2016 at 12:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.