Customizing a topology widget layout

A topology widget can be configured to display a layout view other than the default tree layout.

About this task

Complete the following procedure to set an alternative layout for a policy.

Procedure

  1. Create a properties file for the topology widget using the following file naming convention (unless a properties file already exists for the policy):

    $IMPACT_HOME/uiproviderconfig/properties/Policy_<PolicyName>_<Output Parameter name>.properties

    For example, for a policy named TestTopology and an output parameter named Result, the properties file would be:

    $IMPACT_HOME/uiproviderconfig/properties/Policy_TestTopology_Result.properties

  2. Edit the file and add the following properties:
    topology.layout=hierarchical
    topology.layout.params={flowDirection: "bottom", globalLinkStyle: "orthogonal"}
    In this example, the layout has been set to hierarchical. You can set topology.layout to one of the following values:
    • tree
    • hierarchical
    • grid
    • forceDirected
    • shortLink
    • longLink

    Each layout is configured by a set of parameters. The parameters are specified by setting topology.layout.params to a comma-separated list of key:value pairs. The following tables show the parameters that are available of each of the topology.layout values.

    Table 1. Parameters available with tree.

    Key

    Available Values

    layoutMode

    • free
    • level
    • tip over
    • tip leaves over
    • tip roots over
    • tip roots and leaves over
    • radial
    • alternating radial

    flowDirection

    • right
    • left
    • top
    • bottom

    globalLinkStyle

    • straight
    • no reshape
    • orthogonal
    • mixed

    connectorStyle

    • automatic
    • centered
    • evenly spaced

    globalAlignment

    • center
    • border center
    • east
    • west
    • tip over
    • tip over west
    • tip over east west
    • tip over both sides
    • mixed

    levelAlignment

    • center
    • north
    • south

    aspectRatio

    • 1
    • 10
    Table 2. Parameters available with hierarchical.

    Key

    Available Values

    flowDirection

    • right
    • left
    • top
    • bottom

    levelJustification

    • center
    • left
    • right
    • top
    • bottom

    levelingStrategy

    • optimal
    • semi optimal
    • higher levels
    • lower levels
    • spread out

    globalLinkStyle

    • polyline
    • orthogonal
    • straight
    • mixed
    • no reshape

    connectorStyle

    • automatic
    • centered
    • evenly spaced

    horizontalNodeOffset

    • 0
    • 100

    horizontalLinkOffset

    • 0
    • 100

    horizontalNodeLinkOffset

    • 0
    • 100

    verticalNodeOffset

    • 0
    • 100

    verticalLinkOffset

    • 0
    • 100

    verticalNodeLinkOffset

    • 0
    • 100
    Table 3. Parameters available with grid.

    Key

    Available Values

    layoutMode

    • tile to grid fixed height
    • tile to grid fixed width
    • tile to columns
    • tile to rows

    globalHorizontalAlignment

    • center
    • left
    • right

    globalVerticalAlignment

    • center
    • top
    • bottom

    maxNumberOfNodesPerRowOrColumn

    • 1
    • 10

    compareMode

    • order by index
    • order alphabetically
    Table 4. Parameters available with forceDirected.

    Key

    Available Values

    layoutMode

    • fast multilevel
    • incremental
    • non incremental

    preferredLinksLength

    • 25
    • 45

    linkStyle

    • straight
    • no reshape

    maxAllowedMaxPerIteration

    • 5
    • 25

    allowedNumberOfIterations

    • 250
    • 1250

    convergenceThreshold

    • 0.1
    • 3.5
    Table 5. Parameters available with shortLink.

    Key

    Available Values

    globalLinkStyle

    • direct
    • orthogonal
    • mixed
    • no reshape

    globalSelfLinkStyle

    • two bends orthogonal
    • three bends orthogonal

    globalConnectorStyle

    • automatic
    • fixed offset
    • evenly spaced
    • mixed

    linkOffset

    • 0
    • 20

    minFinalSegmentLength

    • 10
    • 100

    flowDirection

    • right
    • left
    • top
    • bottom

    levelJustification

    • center
    • left
    • right
    • top
    • bottom

    levelingStrategy

    • optimal
    • semi optimal
    • higher levels
    • lower levels
    • spread out

    connectorStyle

    • automatic
    • centered
    • evenly spaced
    Table 6. Parameters available with longLink.

    Key

    Available Values

    globalLinkStyle

    • direct
    • orthogonal
    • mixed
    • no reshape

    verticalMinOffset

    • 1
    • 20

    horizontalMinOffset

    • 1
    • 20

    flowDirection

    • right
    • left
    • top
    • bottom

    levelJustification

    • center
    • left
    • right
    • top
    • bottom

    levelingStrategy

    • optimal
    • semi optimal
    • higher levels
    • lower levels
    • spread out

    connectorStyle

    • automatic
    • centered
    • evenly spaced
    Note:

    Changes to the properties file do not appear in the widget immediately, you have to wait for the automatic refresh that is done by Impact in the backend or restart Impact UI server.