Class: StyleUpdaterService

StyleUpdaterService

Service which will take care of styling elements when the state of the graph change.
It will update css style on elements in the graph.
It uses an instance of GraphService to be able to get elements in this graph.
Because GraphService owns the core instance of Cytoscape (GraphService#cy).


new StyleUpdaterService()

Constructor.
Injects an instance of GraphService.

Source:

Methods


clearStyleAllSelectedNodes()

Remove all css classes which concern the state selected of nodes.
This will deselect visually the nodes in the graph.

Source:

clearStyleDeployedSelectedNodes()

Remove css class which concern selected nodes which have been deployed during the execution.
This will deselect visually the nodes, which have been deployed, in the graph.

Source:

clearStyleFailedSelectedNodes()

Remove css class which concern selected nodes which have a failure during the execution (i.e. exit code > 0).
This will deselect visually the nodes, which have a failure, in the graph.

Source:

clearStyleReadySelectedNodes()

Remove css class which concern selected nodes which have just sent their description during the execution.
This will deselect visually the nodes, which have a just sent their description, in the graph.

Source:

clearStyleSelectedEdges()

Remove css class which concern selected edges.
This will deselect visually the nodes in the graph.

Source:

clearStyleSelectedItems()

Remove all css classes which concern the state selected of elements (i.e. nodes/edges).
This will deselect visually the elements in the graph.

Source:

clearStyleSelectedNodes()

Remove css class which concern selected nodes before the execution of the nodes.
This will deselect visually the nodes, which are not yet executed, in the graph.

Source:

clearStyleValidatedSelectedNodes()

Remove css class which concern selected nodes which have been executed with no error during the execution (i.e. exit code = 0).
This will deselect visually the nodes, which have a been executed with no error, in the graph.

Source:

hideAlternative(sup)

Hide all alternatives (nodes and edges) of the graph.

Parameters:
Name Type Description
sup number

The supervised group

Source:

hideAlternatives()

Hide all alternatives (nodes and edges) of the graph.

Source:

showAlternatives(sup)

Show alternatives which belong to the supervised group sup.

Parameters:
Name Type Description
sup number

The supervised group

Source:

updateAlternativesCurrentService(currentService)

Update alternatives of the current service, by changing css.

Parameters:
Name Type Description
currentService any

The current service

Source:

updateFontSizeNodeLabel(changes, change)

Update dynamically the font size of the node label.
The node label content changes when we update the srv field in the form in AppComponent.
Updates the font size to prevent the text from overflowing on the node.

Parameters:
Name Type Description
changes any

The array containing all the inputs in GraphComponent

change any

The input which concern the node label (a.k.a. currentSrv in GraphComponent)

Source:

updateStyleEdgesAlternative()

Update edges which are connected to at least one node which is an alternative.
This will transform solid lines in dashed lines.

Source:

updateStyleEdgesControl()

Update the style of edges when the type of these edges is 'Control'.
Add css class 'edge-control' to these edges.

Source: