P4VJS User Guide (2020.1)

Deploy custom HTML pages

You typically develop custom HTML tabs and windows locally. Next, you move the files to an HTTP server for deployment.

To deploy custom HTML tabs or windows:

  1. In the Edit HTML Tab or Edit HTML Window dialog, respectively, in the URL field, change the specifier for each tab or window from file:///… to http://….
  2. Test the custom tabs or windows to make sure the deployed version works in P4V.
  3. Export the definition file and copy it to your web server. Test the URL in a browser to make sure it points to the XML definition file. P4V recognizes the following properties:

    • P4VJS.HTMLTabs: A URL search path to the definition of custom HTML tabs
    • P4VJS.HTMLWindows: A URL search path to the definition of custom HTML windows

    Both properties support a set of URLs separated by :::. For example:

    $ p4 property -n P4VJS.HTMLTabs -l
    P4VJS.HTMLTabs = http://internal.company.com:8002/htmltabs.xml:::http://external.company.com:8002/htmltabs.xml

    P4V tries to download the internal htmltabs.xml first. If it fails, it attempts to download htmltabs.xml using the external URL.

  4. Move the definition file to the HTTP server and set the properties to point to this file.

    When running, P4V should now connect to this server. Globally deployed tabs and windows are defined per connection. Each server determines which tabs and windows are provided for this connection. Because global deployment is driven by properties, different users can be offered different tools.

  5. In P4V, make sure the menu items for the now globally deployed custom HTML tabs or windows are available from the View or Tools menu, respectively.