This section describes how to manage themes in Abiquo.
Prepare Branding
Back up Abiquo system elements
Abiquo recommends that you perform regular backups of the whole Abiquo platform. However, it may be useful to perform the following quick backup before enabling branding.
Back up the client UI folder
- Log in to a shell on the Abiquo server with a user with root permissions
Make a backup copy of the UI folder
mkdir /opt/abiquo/quick_ui_backup tar cvfz /opt/abiquo/quick_ui_backup/ui_`date +%Y%m%d`.tar.gz /var/www/html/ui/
Optionally assign branding privileges in the Abiquo UI
In the Abiquo UI you will see the "Modify enterprise theme" privilege in the Users category on the Privileges screen. This privilege is automatically assigned to a cloud administrator, but you can also assign it to another user that can manage enterprises.
- Log in to the Abiquo UI as a cloud administrator
- Go to Users View
- Click the role of a user with the "Manage enterprises" privilege
- Check the box to assign the "Modify enterprise theme" privilege to the user
Edit Images
You can use these images as a guideline for the image size and type. See Abiquo Style Guide and Sample Theme Image Reference
Upload themes and logos to the Abiquo UI
Upload themes to the Abiquo UI
Login Theme
The main Abiquo theme is called "abicloudDefault". If this theme is not present or not correct, the login screen will not display properly.
- Compress your theme folder
- Log in to the Abiquo Server and copy your theme to theme folder
- The theme folder is /var/www/html/ui/theme
For example, using wget from the Abiquo Server to a Linux machine
wget myuser@mymachine:~/Downloads/mytheme_base_theme.tar.gz /var/www/html/ui/theme
Move or copy any existing theme with this name to another folder name
cd /var/www/html/ui/theme mv my_custom_theme my_custom_theme_backup
Extract the theme (which will OVERWRITE any theme with the same name). For example, when the theme was compressed with tar and gzip
tar -zxvf my_custom_theme.tar.gz
Add the unsecured zone theme
To add the unsecured zone theme for user login
Open the main UI directory.
By default, you can only create one unsecured zone theme
If you wish to create more than one login environment, you will need to serve each one with a separate URL. Please contact Abiquo Support for assistance
- Edit index.html and add the link to the CSS for the unsecured theme.
You MUST add this as the LAST CSS to load, so that it has priority over the default Abiquo theme. You can search for the comment lines shown here, to help position the link correctly in the file. For example:
<!-- Unsecured theme to load (Optional) --> <!-- Example: <link rel="stylesheet" type="text/css" href="theme/sample_theme_2/css/theme_unsecured.css" /> --> <link rel="stylesheet" type="text/css" href="theme/my_custom_theme_X/css/theme_unsecured.css" />
After login, secured zone CSS files will have priority over unsecured zone file. This is because Abiquo will load the secured zone files listed in client-config-custom.json AFTER the unsecured zone CSS file in index.html.
Edit client-config-custom.json to add new secured zone themes
- Log in to a shell on the Abiquo server as a user with root permissions
Edit the client-config-custom.json file to add new secured zone themes
cd /var/www/html/ui/config vi client-config-custom.json
Edit the file and add the default theme and the custom themes.
{ "config.endpoint": "https://mjsabq.bcn.abiquo.com/api", "client.themes": [ "abicloudDefault", "my_custom_theme" ] }
You must add abicloudDefault or the user interface will not load properly
Check your JSON file format with a JSON checker to ensure that the UI will load properly
Restart the Apache daemon to load files into the cache
service httpd restart
Activate New Themes
Activate a new unsecured theme on the Abiquo Server
The new theme will be available next time users load the page
Activate a new enterprise logo and theme in the Abiquo GUI
- Log in to the Abiquo GUI as the user with the "Modify enterprise themes" privilege
- Create or Edit an enterprise
In the Enterprise Logo field, enter the relative path from the theme folder and name of the logo file. For example, "rose_console_theme/img/abiquo_gray.png".
- Select a Theme
- only themes specified in the ui/config/client-config-custom.json file are shown
- Click Save
- Log out
If you didn't restart the Apache daemon when you copied the logo file to the server, restart it now to ensure the new logo is visible
Clear the browser cache on client machines
Important
This is an essential step for the correct display of the new theme
All users should clear the browser cache on their machines before logging in to Abiquo again.
- Log in again as a user of the enterprise to check the new logo and theme