Personal tools

rPath Appliance Platform Agent:Branding

From rPath Wiki

Jump to: navigation, search

Contents

The rPath Appliance Platform Agent can be branded with appliance information, logos, and custom style sheets (CSS) in place of the rPath defaults. Appliance developers use branding to provide a custom look and feel for appliance administration. Use the reference and instructions here to provide custom branding for rPath Appliance Platform Agent. Create a package with a descriptive name such as rapa-branding-custom to install your custom files to appropriate locations on an appliances.

Configuration Entries

Some branding can be accomplished by modifying rPath Appliance Platform Agent configuration in a custom.cfg file in /etc/raa/. Locate the [global] entries in /etc/raa/prod.cfg that are grouped together as pertaining to branding:

# Branding
product.companyName="rPath"
product.companyCopyYears="2006-2007"
product.companyURL="http://www.rpath.com"
product.productName="rPath Appliance Platform"
product.productVersion="2.0"

If you have an existing custom.cfg used for other customizations on the same appliance, copy these directives into its [global] entry and modify the strings as desired. If you need to create a new custom.cfg, use the following as a template to create the file:

[global]

# Custom branding for the rPath Appliance Platform Agent interface
product.companyName="Example Corporation"
product.companyCopyYears="2005-2007"
product.companyURL="http://www.example.com"
product.productName="Sample Appliance"
product.productVersion="1.1"


The rPath Appliance Platform Agent default start page may be customized. This can be done in version 3.0.0 and above. Locate the [/status] entries in /etc/raa/prod.cfg:

[/status]
# Change this path to point to a static 'snippet' of HTML for
# vendor-specific branding. Change to a blank string to disable.
status.vendorInformationPath = "/path/to/your/custom.html"

Alter this section inside /etc/raa/raaplugins/custom.cfg to override the default setting inside prod.cfg.

The setting status.vendorInformationPath designates the path to a HTML file that alters the appearance of the area above status notifications which is shown directly after logging into the rPath Appliance Platform Agent.

   The page must be XHTML compliant as using a non XHTML compliant page will cause loss of the entire Agent display and functionality.

The default path to the template is raaplugins/status/web/static/vendor.html but can be customized altering the path of status.vendorInformationPath. rPath recommends using the vendor.html file as a template for any customizations. Copy this file to another location, alter as needed, and package this file inside a branding trove that can be included with your appliance. A restart of the agent is required for customizations to take effect.


Alternate Branding Location

rPath Appliance Platform Agent provides an alternate branding location for files intended to override default graphics and style sheets. If a file exists in the alternate location, the agent uses that file; if a file does not exist in the alternate location, the agent uses its default.

Agent Branding

The default location for agent branding is:

/usr/share/conary/web-common/apps/raa

The alternate location is:

/usr/share/raa/content

The relative paths under the alternate location must match exactly to the relative paths in the default location.

One example of providing alternative branding files is in replacing the product logo. The default product logo (270x98 pixels) is in the following location:

/usr/share/conary/web-common/apps/raa/images/prodlogo.png

To replace this file with a custom logo, ensure the filename is prodlogo.png and save it to this alternate location:

/usr/share/raa/content/images/prodlogo.png

For the example, this action includes creating the images directory in the alternate location to correspond to the images directory in the default location.

Custom CSS

Some versions of the Appliance Agent (2.1.0-2.1.4) allowed you to use a custom.css file to make style customizations. This method for overriding styles has been superceded by the "alternative branding" method described above. Any changes done in the old manner should be merged into your own raa.css file in the alternate directory /usr/share/raa/content/css/.

Plugin CSS

Standard agent plugins have plugin-specific CSS located in the web/static/ directory for each plugin. The alternate location for plugin-specific modifications is /usr/share/raa/content/plugins. Use the relative path under the plugin directory to match the path after raaplugins for that plugin. For example, the following is the default location for the backup plugin CSS:

/usr/lib/raa/raaplugins/backup/web/static/css/backup.css

To override the backup plugin CSS, create the following to replace it:

/usr/share/raa/content/plugins/backup/web/static/css/backup.css

Branding Templates

When modifications to existing branding structures are not sufficient to accomplish the desired interface branding, appliance developers can shadow and modify the rapa package used to apply these conventions.