Deploy custom HTML pages

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

Note

P4VJS.HTMLTabs, and P4VJS.HTMLWindows are added to P4V, and live in harmony with your local definitions for HTMLTabs, and HTMLWindows.

P4VJS.HTMLActions is added to P4V, unless you have a local definition for a deployed HTMLAction. The local definition overrides a global definition to make sure developers can fix and test their actions before deploying them globally.

To deploy custom HTML tabs, windows, or actions

  1. In the Edit HTML Tab or Edit HTML Window dialog, respectively, in the URL field, change the specifier for each HTML Tab or HTML 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
    • P4VJS.HTMLActions: A URL search path to the definition of custom HTML Actions

    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. Deployed tabs and windows are defined per connection. Each server determines which tabs and windows are provided for this connection. Because deployment is driven by properties, different users can be offered different tools.

    Note

    P4Admin does not have the concept of deployed tabs or windows per connection. However, you can distribute your tabs and windows by exporting them from your development machine and then importing them onto your users' machines.

  5. In P4V, make sure the menu items for the now deployed custom HTML Tabs or HTML Windows are available from the View or Tools menu, respectively.
  6. Remove pre- or post-page from the local Submit Action.

Changes after deployment

After you have deployed your HTML Action, you can work locally on improvements without disturbing what you have already deployed. This is because your local definition of your Action takes precedence over a deployed definition.

The steps are:

  1. Copy the deployed version to your machine.
  2. Point the local Submit Action to the copied implementation.
  3. Improve the implementation locally.
  4. Deploy that improved version.
  5. Remove pre- or post-page from the local Submit Action.

Next step

Continue with Walkthrough of development and deployment.