Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: v4.0 fix symbolic link note

...

Upload themes and logos to the Abiquo UI   

Upload themes to the Abiquo UI

...

  1. Compress your theme folder
  2. 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
      
  3. 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
    
  4. 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

You can set a default theme that Abiquo can use to style the login zone and enterprises when no other theme is selected. You cannot select the default theme directly. When you set a default theme, Abiquo still requires the abicloudDefault theme as before. You do not need to add the default theme to the list of themes in client-config-custom.json. 

To 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
    languagebash
    > theme/ ln -s default sample_theme_2 default

    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.

Remember to check the file ownership and access settings, because the Abiquo Tomcat server will need to access the branding files. 

Edit client-config-custom.json to add new themes

  1. Log in to a shell on the Abiquo server as a user with the appropriate permissions (e.g. root or sudo user)root permissions
  2. Edit the client-config-custom.json file to add new enterprise themes

    Code Block
    cd /var/www/html/ui/config
    vi client-config-custom.json
  3. Edit the file and add the default theme and the custom themes within the brackets { and }. 

    Code Block
     "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

  4. Restart the Apache daemon to load files into the cache

    Code Block
    service httpd restart

...