Configuring resource types
You can assign existing or new custom icons to particular resource types by using the Topology viewer Resource types page in the UI console. You can also apply further resource type style edits, such as adding custom labels to a resource type, and changing the resource type icon shape, size, border, and background.
You can define a custom icon as part of editing a resource type to have the icon immediately assigned to the selected resource type. However, if you want to create a number of icons without assigning them to specific resource types, or you simply want to edit or delete icons, use the Custom icons page. For more information, see Defining custom icons.
Procedure
-
Log in to the IBM Cloud Pak for AIOps console.
-
From the main navigation, expand Operate and click Topology viewer.
-
From the topology navigation toolbar, expand Settings, and click Topology configuration.
-
On the Resource types card, click Configure.
The Resource Types page is displayed, which lists all existing resource types in table format in sortable columns. The table also displays the icons for the resource types and their names, categories (if defined), whether they are system icons or custom icons, and whether they have custom labels, styles or shapes. From here, you edit existing resource types, and then associate existing icons with them, and apply resource styling.
Tips: To reduce the number of items displayed in the table, use the Filter table text field. The table is filtered as you enter the search text. You can click Refresh (top right) to reload the items displayed, which can be useful if other users are customizing them. You can select more than one resource type and reset them to their default values, or perform a batch edit.
-
To edit resource types, select them in the table and click Edit resource type (or Batch edit resource types). The Configure relationship type page is displayed.
The Edit Resource Type page is displayed. You can toggle between the Identification and the Styling tabs. Use the options on these tabs to define the resource type.
-
Use the Identification tab to define the selected resource type's icon, label, and shape.
-
Use the Styling tab to define the selected resource type's border color, border pattern, background color, and resource display size.
Restriction: You cannot change the name of an existing resource type.
Tip: To quickly revert resource stype styles to their default, select them in the table, then click Reset to defaults.
-
-
Click Save when you are finished with your edits to save your changes and return to the Resource types page. The table displays your changes for the resource type and the associated icon.
Identification
On the Identification tab, define the selected resource type icon, label, and shape:
-
Choose an icon to associate with the resource type by using one of the following methods:
-
Icon drop-down list
If you open the Icon drop-down list, all icons are listed by name in alphabetical order.
-
View all icons
If you click View all icons, all icons are displayed in alphabetical order. Click an icon to associate it with the resource type.
-
Quick assign
If an icon exists with the same name as the resource type, click the Quick assign button to select it without having to sort through all existing icons. This function is useful if you have added a custom icon, and are now assigning it to a resource type with the same name.
-
</> (Advanced mode)
Define a JavaScript function using the simple script editor to set a different icon based on a resource type's properties, such as tag or status. Ensure that the returned value is a string that matches the name of the icon to be displayed in the topology.
Click Example for more guidance.
-
Define new custom icon
From here you can define a custom icon, which is automatically associated with the resource type when done.
-
Click the Define new custom icon button to display the Custom Icons page.
-
Click New to create a new icon. Alternatively, click the edit symbol to edit an existing icon. After you have selected or created an icon, the Configure resource type page is displayed. Use the following information to define the icon:
Icon properties
Each custom icon must have a name that uniquely identifies the icon when assigning it to a type.
Remember: You cannot change the name of an existing icon. If you want an icon to have a different name, create a new icon, then delete the old one.
Icons are defined inside an SVG editor, which runs an XML validation check. Each icon definition must be valid SVG XML with a viewBox, which is important to ensure scaling of the image.
The SVG definition must include inline styling of the image, such as stroke color and fill color. Use of style classes is not advised, as it can cause visualization issues on some browsers. If style classes must be used, naming must be unique for each svg image to prevent class definitions from being overwritten.
Optionally, each icon can be assigned to a category, so you can group icons of the same type or function together when displaying them in a list.
Remember: You can also create custom icons from the Custom Icons page accessed through DASH, which is described in the Defining custom icons topic.
-
-
-
Define the label for the resource type by editing the following fields:
-
Label
By default the name of a property (
asmProperties.name
) is used as the label that is displayed in the topology. You can replace this by typing in a custom label for the resource type. -
Label Maximum Length
You can override the default label length of 15 characters to avoid truncating the displayed label.
Warning: Avoid labels that are too long, as long labels can overlap in the topology. The maximum suggested label length is 20 characters.
-
-
Choose a shape for the resource type from the Resource Shape drop-down list.
The default shape for a resource in the Topology Viewer is a circle, or a square for a host server. You can change the shape of the resource type to one of the following shapes:
- Circle
- Square
- Hexagon
- Vertical hexagon
Styling
On the Styling tab, you can define the selected resource type border color, border pattern, background color, and resource display size:
-
For the border color, enter a hex definition. The default border color is
#171717
. -
For the border pattern, the default pattern is
''
. -
For the resource background color, the default is
#F3F3F3
(light gray). -
For the size, the default is medium.
You can further refine the size function by specifying how certain resource properties affect the size of the resource type displayed. For example, resource types can appear larger depending on the number of connections they have with other resources.