Customizing the UI ( No longer main.less? )

I found the previous reply on editing main.less to remove the logo, but is that still valid for the latest release?

And in a related note where does the:

Title: “ManageIQ: Login” Live?

Have trawled through but so far no joy.

Thanks!

James

@epwinchell Can you please take a look at this question? Thx, Dan

Hi James,

The relevant files for the Login screen title are:

https://github.com/ManageIQ/manageiq/blob/master/app/views/layouts/login.html.haml#L6

and

https://github.com/ManageIQ/manageiq/blob/master/app/helpers/application_helper.rb#L454

Main.less has been replaced by main.scss:

https://github.com/ManageIQ/manageiq/blob/master/app/assets/stylesheets/main.scss

Which logo would you like to remove?

Eric

1 Like

Thanks Eric, most helpful!

It was the ManageIQ logo for the login and top Nav Bar, but we just replaced instead with another SVG. We did try amending some of those colour codes previously, but must have missed a step.

In terms of Title the bit we wanted to change was:

title = I18n.t(‘product.name’)

But looks like amending that will cause other issues, so we will leave that well alone and leave it as “ManageIQ” ( just trying to appease the marketing department ).

Cheers,

James

Hi @epwinchell, so as far as we can tell the background on the login screen is ( even double checked the colour to confirm hex code):

$login-bg-color: #083c5a

We have amended this to the required colour: #87ceff

/var/www/miq/vmdb/app/assets/stylesheets/main.scss

Saved and refreshed, rebooted, tried multiple browsers and devices… and we still see the old colour. Are we editing the correct line and/or is there something else we need to update?

Thanks again, greatly appreciated!

James

Hi James,

You’ll need to run"rake assets:clean" and “rake assets:precompile”

Let me know if that helps.

Eric

Perfect , thanks Eric! Just in case anyone is reading this and seeks the full commands:

vmdb && bundle exec rake assets:clean
vmdb && bundle exec rake assets:precompile
service evmserverd restart

Great. If you need anything else, just let me know.

Just to add another info for this thread, newer version of miq has “Custom Logos” menu for this customization work

thanks to MIQ UI team.

Hello Eric,

I need remove these text in red box, would you please help advise how to do?

Thank you,
Andy

Hi Andy,

Here is the relevant code: https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/views/dashboard/login.html.haml#L113-L124

Regards,

Eric

1 Like

Thanks Eric for the help! I can remove the text :slight_smile:

Regards,
Andy

1 Like

Digging up an old post… but is there a way to change the “ManageIQ:” which i assume get’s pulled from a table, rather than editing the Title tag of every page? For instance:

%head
%title
= h(title_from_layout(@layout))

Just update this line: https://github.com/ManageIQ/manageiq/blob/master/locale/en.yml#L6

Regards,

Eric

@epwinchell Perfect thanks.

Hello Eric,
Recently we’ve upgraded to fine-4…now I can’t find the path to modify the UI as before. Would you please help advise?

BR,
Andy

Hi Andy,

Which file are you looking for?

Eric

Hello Eric,

I am looking for the main.scss and login.scss to modify the Login page UI.

Regards,
Andy

They moved to the UI repo here:


1 Like

Thanks @epwinchell.

Here is how I locate those two files on the appliance locally.

yum install -y mlocate 
updatedb
locate "stylesheets/login.scss" && locate "stylesheets/main.scss"
2 Likes