NetworkMapLink
Class represents Network Map link
Instance attributes
- connectorName1: String
-
Connection link name 1.
- connectorName2: String
-
Connection link name 2.
- color: String
-
Link color in CSS format, or
nullif color source is not custom color.
- colorScriptName: String
-
Color script name, or
nullif color source is not script.
- colorObjects: Array
-
Array with NetObj objects used for link color calculation, or
nullif color source is not object status.
- colorSource: int
-
Color source option one of color source.
- dataSource: Array
-
Array of LinkDataSource with all datasources displayed on link.
- name: String
-
Link name.
- objectId1: int
-
First connected object id.
- objectId2: int
-
Second connected object id.
- routing: int
-
Link routing type routing algorithm.
- style: int
-
Link style link style.
- type: int
-
Link type: 0 = normal, 1 = VPN, 2 = multilink, 3 = agent tunnel, 4 = agent proxy, 5 = SSH proxy, 6 = SNMP proxy, 7 = ICMP proxy, 8 = sensor proxy, 9 = zone proxy, 10 = Wi-Fi client
- useActiveThresholds: bool
-
If active thresholds should be used for link color.
nullif color source is not object status.
- useInterfaceUtilization: bool
-
If interface utilization should be used for link color.
nullif color source is not object status.
- width: int
-
Link width.
Instance methods
- clearDataSource(): void
-
Remove all data sources from the list
- removeDataSource(index): void
-
Remove data source by index
Table 1. Parameters index
Integer
Zero-based index of data source to be removed (position in the dataSource array)
- setColorConfig(mode, data, includeThresholds, includeLinkUtilization): void
-
Set color source mode and additional parameters
Table 2. Parameters mode
Integer
One of color sources: color source. All further parameters depend on color source mode.
data
Object
Depending on color source mode one of: array of objects (NetObj or object IDs) for "object status" mode / script name for "script" mode / color as integer
0xRRGGBBor CSS color string for "custom color" mode. Required for these three modes, not used for other modes.includeThresholds
Boolean
(optional) indicates if thresholds should be included into calculation for "object status" mode, default false
includeLinkUtilization
Boolean
(optional) indicates if link utilization should be included into calculation for "object status" mode, default false
- setConnectorName1(name): void
-
Set connection 1 name
Table 3. Parameters name
String
Connection 1 name
- setConnectorName2(name): void
-
Set connection 2 name
Table 4. Parameters name
String
Connection 2 name
- setInterface1(interface): void
-
Set first interface
Table 5. Parameters interface
Interface or Integer
Interface object or interface object ID
- setInterface2(interface): void
-
Set second interface
Table 6. Parameters interface
Interface or Integer
Interface object or interface object ID
- setName(name): void
-
Set name
Table 7. Parameters name
String
Link name
- setRoutingAlgorithm(algorithm): void
-
Set routing algorithm
Table 8. Parameters algorithm
Integer
One of algorithms: routing algorithm
- setStyle(style): void
-
Set link style
Table 9. Parameters style
Integer
Link style: link style.
- setWidth(width): void
-
Set link width
Table 10. Parameters width
Integer
Link width
- updateDataSource(dci, format, location, direction): void
-
Add data source for the given DCI, or update location and direction of an existing data source for the same DCI. The format of an existing data source is not updated (known issue, netxms#3814).
Table 11. Parameters dci
DCI to add or update to data source list
format
String
Optional. DCI data display format (
nullor omitted means empty format)location
Integer
Optional. Label location, one of the location values.
0(CENTER) if omitted.direction
Integer
Optional. Data direction relative to link direction, one of the direction values.
0(NONE) if omitted.