Python-97
Python-97

Reputation: 298

How can I change all the Kibana logos to other logos?

How can I change all the Kibana logos to other logos??

I tried the link method below and other methods, but they didn't work.

https://discuss.elastic.co/t/replace-the-kibana-logo/27547

My Goals

I circled what I was trying to change in Kibana.

enter image description here enter image description here enter image description here

@Miokael Amidi update post (Loading logo and text)

enter image description here

const logo = _react.default.createElement("svg", {…  

could not find code.

Result:
const logo = _react.default.createElement("img", {src:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqkAAAK … 5CYII=',width:'100px'});

-> Also, I don't know how to write the code.

-> Can I copy and paste it as it is?

Also,I can't see it.(Navbar Logo) enter image description here Locate string and replace with own base64 or SVG image "EuiHeaderLogo"],{"data-test-subj":"logo”,iconType:"logoElastic"

Result:
EuiHeaderLogo"],{"data-test-subj":"logo”, iconType:"data:image/png;base64,iVBORw0
… SUVORK5CYII="

-> help me plz..

Upvotes: 5

Views: 6991

Answers (2)

Lizozom
Lizozom

Reputation: 2311

If you want to customize Kibana without modifying the source code, you can use the custom-kibana-theme plugin (disclaimer, developed by me).

It is tested for compatibility on the latest 7.17 version as well as 8.x to customize Kibana's logos, fonts, colors, etc.

For example, here's the modified login page:

enter image description here

Upvotes: 0

Lunatic
Lunatic

Reputation: 1906

It's quit easy just follow the steps for each case you need

  • Favicon

Go to the folder where the favicons are to see the sizes of each favicon that Kibana serves.
/usr/share/kibana/src/core/server/core_app/assets/favicons/

Take your personal logo and create a version that matches the size of each of the files within the Kibana favicons folder.

Replace each file with the custom logo. Keep the original names of the files to be replaced.

  • Browser tab and title

Open file
$ sudo nano /usr/share/kibana/src/core/server/rendering/views/template.js

Look for the code line that generates the title "Elastic" and change that to your custom text
/*#__PURE__*/_react.default.createElement("title", null, "Elastic"),

Result:
/*#__PURE__*/_react.default.createElement("title", null, "Custom_Text"),

  • Loading logo and text

Open file
$ sudo nano /usr/share/kibana/src/core/server/rendering/views/template.js

Look for code string:
const logo = _react.default.createElement("svg", {…

Replace this with a base64 or SVG version of your custom logo. I used a base64 image.

Result:
const logo = _react.default.createElement("img", {src:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqkAAAK … 5CYII=',width:'100px'});

Locate code block and replace message

}, i18n('core.ui.welcomeMessage', {
defaultMessage: 'Loading Elastic'

Result:
}, i18n('core.ui.welcomeMessage', {
defaultMessage: 'Loading custom_text'

  • Login logo and text

Open file
$ sudo nano /usr/share/kibana/x-pack/plugins/security/target/public/4.plugin.js

Search for the welcome text and replace it with your own
{id:"xpack.security.loginPage.welcomeTitle",defaultMessage:"Welcome to Elastic"}

Result:
{id:"xpack.security.loginPage.welcomeTitle",defaultMessage:"Welcome to custom_text"}

Search for the Login logo image and replace it with your own
className:"loginWelcome__logo"}, … {type:"logoElastic",size:"xxl"}

  • Navbar Logo

Open file
$ sudo nano /usr/share/kibana/src/core/target/public/core.entry.js

Locate string and replace with own base64 or SVG image
"EuiHeaderLogo"],{"data-test-subj":"logo”,iconType:"logoElastic"

Result:
EuiHeaderLogo"],{"data-test-subj":"logo”, iconType:"data:image/png;base64,iVBORw0
… SUVORK5CYII="

Save changes to JavaScript file and generate the compressed files. Then restart Kibana.
$ npx gzip-cli /usr/share/kibana/src/core/target/public/core.entry.js -e=gz -e=br

$ sudo systemctl restart kibana

Upvotes: 6

Related Questions