Jenkins - change title of main page - jenkins

How can I change the title in the Jenkins start page:
http://jenkinsserver.domain.whatever:9090/
As I see, the title is already in German with some special UTF-8 chars and this one makes trouble using selenium in the background to control Jenkins. I am quite sure the value is set somewhere - but where?
Jenkins runs on a Windows server.

You can just install the Simple Theme Plugin and then in Manage Jenkins > Configure System > Theme, point the URL of theme JS field to a .js file containing at minimum something like:
document.title = "Wathever title you prefer";
Save and reload the page.
It worked for me..

Jenkins is using the browser locale language settings, change that. Please also better specify the question, what do you mean by title? Local domain address? If so, this can be done in settings -> "Jenkins URL".

Related

Change neo4j browser title

Is it possible to change the default browser title for Neo4j?
We run multiple instances and the current browser title (userID#bolt://ip-address:port) is not very useful - we'd like to say stuff like userID#Neo4j-Dev, etc.
Why not roll your own ?
The browser is a separate github project that can be found at https://github.com/neo4j/neo4j-browser (comes with build instructions), and I believe you are looking to modify the files underneath src/browser/modules/DocTitle.
Hope this helps,
Regards,
Tom
I believe that is not possible change the default title of Neo4j browser. But as a workaround (not very elegant, i know :) you can open the console of your browser and type:
document.title = "My custom title";
The browser title will be updated.

Neo4j: change default Browser settings

I want "Do not use Bolt" checkbox being checked by default in Neo4j Browser Settings.
Setting dbms.connector.bolt.enabled=false doesn't affect this field in browser.
I'm using Neo4j 3.1.4
How can I change Browser Settings default values?
For now the only solution I found is to change the default settings in neo4j-browser-<version>.jar.
To change useBolt setting you need to change useBolt:!0 to useBolt:!1 in the JavaScript file located in browser/scripts folder of jar file.
This solution was tested for neo4j-browser version 2.0.0-M10.
Or alternatively you can try to clone neo4j-browser, make needed changes and build a jar file.
It would be nice to have an ability to change such settings via a configuration file.

Can /consoleText be made the default console page in Jenkins?

Is there any setting I can change in Jenkins to make /consoleText the default page for console outputs? Right now, I have to click on console, and then click on the View as plain text link to get this page.
PS: I'm open to "hack" suggestions, if there's no way to officially do this in Jenkins.
Edit: While I'd be perfectly happy with just making /consoleText as the default page, what would be even better would be to replace the View as plain text link with a View dynamic log link, so that I can access the console link too, in case I need it.
You can try the Sidebar-Link Plugin which will give you the ability to add side links on various Jenkins pages like the build, top level, etc.

Jenkins HTML Publisher Plugin: No external links with Jenkins 1.643

I have a Jenkins job, where I generate an HTML-Page as a post buildstep, containing an image link ( HTML img tag). This HTML page is published by the HTMLPublisher Plugin for each job.
This has always worked great. But since I have updated Jenkins to v. 1.643, I only see a blank page when I click the published HTML page.
I've tried out a lot of things and found out the following strange behaviour:
Since the update, I cannot embed external links into the HTML-pages I publish.
If I embed an image from an external location (img src="somelocation/xxx.jpg), the image won't be displayed.
If I examine the HTML page with Firefox, I can see that the image tag is greyed out like it was invisible, but it is not.
If I embed a normal hyperlink, pointing to an external location, I can see the link in the displayed page, but when I click on it, nothing happens.
It is like Jenkins would not permit external links in this context.
Please help me out here :)
Thank you!
Edit:
Thanks to Dave Bacher, he gave me the right hint.
Look at this page to see Jenkins' new security policy.
https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy#ConfiguringContentSecurityPolicy-Implementation
You have to relax the rules, so that embedding external images is allowed again.
For testing it, just type the following in your script console:
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox; img-src *;")
This will allow embedding images from any external website.
If you run Jenkins on Ubuntu and you want to set this permanently, just edit the file /etc/default/jenkins. Under # arguments to pass to java add the following line:
JAVA_ARGS="-Dhudson.model.DirectoryBrowserSupport.CSP=\"sandbox; img-src *;\""
The issue you're seeing is likely related to recent security fixes. See the Configuring Content Security Policy wiki page for details on how to relax the Jenkins configuration.
The CSP header sent by Jenkins can be modified by setting the system property hudson.model.DirectoryBrowserSupport.CSP:
If its value is the empty string, e.g. java -Dhudson.model.DirectoryBrowserSupport.CSP= -jar jenkins.war then the header will not be sent at all.
(Warning!) This is potentially very unsafe and should only be used after reviewing the overall security setup.
You can experiment with different settings using the Jenkins Script Console.
Also as the wiki page notes, make sure you've upgraded to HTML Publisher 1.10 (or later).
I know the original question was for Linux, but this will also help out the Windows users... If you have Jenkins installed as a service (starting from Jenkins.exe) you will need to change the arguments in jenkins.xml for that property to persist.
If you are going to use the unsafe blank option remember to put the parameter in quotes. Below is my example line from jenkins.xml:
<arguments>-Xrs -Xmx1048m -XX:MaxPermSize=512m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle "-Dhudson.model.DirectoryBrowserSupport.CSP= " -jar "%BASE%\jenkins.war" --httpPort=8080</arguments>
If you are using Red Hat then update JENKINS_JAVA_OPTIONS

Jenkins in Windows shows UI in russian language

I am from Ukraine.
When I open Jenkins in the browser I see all the UI in Russian.
I am running Jenkins on Windows.
However - there is no Russian in Windows configuration "Region and Settings".
Format - English(United States).
Location - United States.
Only the Timezone is Ukrainian - UTC +02:00.
Is it possible to force Jenkins to show the UI in English language?
PS.
I did not have such a problem with Hudson before.
Locale Plugin helped to change the default locale to English.
I changed the language in the configuration of Chrome and now Jenkins is in English :)
By default, Jenkins uses the default language of your browser, if it is set. To change it, you could do the follow.
1. Download and install the locale plugin:
From the main page of Jenkins, go to Manage Jenkins -> Manage Plugins
Click on Availables
Check the "Locale plugin" and clicks on "Download now and install after restart".
Jenkins will download the plugin and restart if not job has been scheduled.
2. Set the language:
Once the plugin has been installed, change the language using following steps:
From the main page of Jenkins, go to Manage Jenkins -> Configure System.
Under Locale, there will be a field called "Default Language". Enter the new language. It could be "en" or "ENGLISH".
Under the text box, check the checkBox called "Ignore browser preference and force this language to all users".
Locale Plugin helped to change default locale to en.
A better and more simple solution is to just remove Russian from Chrome.
In other words, change Browser Language Settings.
e.g. for Chrome, Go to Chrome Settings -> Language -> Remove selected language.
You have to install the Locale plugin, which is already available but not installed as default, and then under Manage System > Locale insert "Locale.ENGLISH" in java style.
Maybe you can try this
$ sudo languagesetup
and choose 1) Use English for the main language to change it back.
Reference,
https://support.apple.com/en-us/HT202036
By default, Jenkins takes your browser language. To change it, you need to install Locale plugin and set proper language to ignore browser preferences. Go to Manage Jenkins -> Configure System, find Default Language and set what you need.
You can check the video https://youtu.be/UiikMY1uW1w
Seems like chrome has an issue on this,
It kept sending Hebrew as the first option in the
Accept-Language on the header
although English was set to be the top-language on the list (Chrome settings > Languages)
Solution
And only after I've added some other language (Russian for instance) and set it to be the 'top' and then set the English back to be the 'top' it solved!
All you need to do is change your browser's language settings and put english first.
My operating system is windows 10. I want to use English languages for Jenkins UI.
For Region & Languages, I added Turkish and English my default setting is English, however, Jenkins UI is Turkish. If I remove Turkish Jenkins UI looks fine and it turns on English.
My solution is pretty simple: use an extension in Chromium compatible browsers like this https://chrome.google.com/webstore/detail/locale-switcher/kngfjpghaokedippaapkfihdlmmlafcc, that lets you change the locale of the browser easily.
This solution works not only for Jenkins, but for many other websites, and doesn't require to restart Jenkins.
You can test the web with differents languages.

Resources