Constructor
new View(model, hostPermutation, label)
Constructs a View that draws the specified model
Parameters:
Name | Type | Description |
---|---|---|
model |
ModelGraph | |
hostPermutation |
HostPermutation | |
label |
String |
- Source:
Methods
draw()
Clears the current visualization and re-draws the current model.
- Source:
getAbbreviatedHostname(hostname) → {string}
Gets the abbreiviated hostname string associated with given hostname
string. If no abbreviation is recorded, then returns original string.
Parameters:
Name | Type | Description |
---|---|---|
hostname |
string |
- Source:
Returns:
abbreviated hostname
- Type
- string
getHosts() → {Array.<String>}
Gets the hosts as an array
- Source:
Returns:
The hosts
- Type
- Array.<String>
getLabel() → {Graph}
Gets the label
- Source:
Returns:
The label
- Type
- Graph
getModel() → {Graph}
Gets the model
- Source:
Returns:
The model
- Type
- Graph
getTailNodes() → {Array.<VisualNode>}
Return the tail nodes of each host in this view's graph
- Source:
Returns:
- Type
- Array.<VisualNode>
getTransformer() → {Transformer}
Gets the transformer associated with this view. In other words, the
transformer configured for and responsible for transforming the
VisualGraph that this view draws.
- Source:
Returns:
The transformer associated with this view
- Type
- Transformer
getVisualModel() → {VisualGraph}
Gets the current visual model
- Source:
Returns:
The current model
- Type
- VisualGraph
hasAbbreviatedHostnames() → {boolean}
Returns true if the abbrviated hostname strings have been cached.
- Source:
Returns:
- Type
- boolean
hasHost() → {Boolean}
Returns whether this modelGraph has the given host
- Source:
Returns:
True if the graph has this particular host
- Type
- Boolean
hasQueryMatch() → {Boolean}
Returns whether this modelGraph has structures matching the current query
- Source:
Returns:
True if this modelGraph has elements matching the current search
- Type
- Boolean
setAbbreviatedHostname(hostname, abbrev)
Caches the abbreviated hostname, creating the cache if necessary
Parameters:
Name | Type | Description |
---|---|---|
hostname |
string | Complete hostname |
abbrev |
string | Abbreviated, ellipsified hostname |
- Source:
setGreyHost(visualNode, isScrolledPast)
If isScrolledPast is true, changes colour of visualNode's host to grey.
If it is false, changes host node back to the original colour
Parameters:
Name | Type | Description |
---|---|---|
visualNode |
VisualNode | |
isScrolledPast |
Boolean |
- Source:
setWidth(newWidth)
Sets the width of this view
Parameters:
Name | Type | Description |
---|---|---|
newWidth |
Number | The new width |
- Source: