...
Info | ||
---|---|---|
| ||
The main Abiquo theme is called "abicloudDefault". If this theme is the default and it 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
Code Block 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
Code Block 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
Code Block tar -zxvf my_custom_theme.tar.gz
...
Set a default theme
To add the unsecured zone theme for user login
Open the main UI directory.
Info 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:
Code Block |
---|
<!-- 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" /> |
...
set a default theme that will persist after upgrades you can do one of the following steps:
In the theme folder, create a symbolic link, named 'default', which points to the desired theme to mark it as the default:
Code Block > theme/ ln -s default sample_theme_2
Note that Tomcat does not allow access to symbolic links by default and you will need to enable the allowLinking property. See https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html#Common_Attributes
- If you do not wish to use a symbolic link for security reasons, in the theme folder, rename or copy the folder of the theme you would like to use as the default to create a "default" folder.
Edit client-config-custom.json to add new
...
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
Code Block cd /var/www/html/ui/config vi client-config-custom.json
Edit the file and add the default theme and the custom themes.
Code Block { "config.endpoint": "https://mjsabq.bcn.abiquo.com/api", "client.themes": [ "abicloudDefault", "my_custom_theme" ] }
Note 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
Code Block 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
...
To activate new themes, do these steps.
- 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
...