Methods

addNewComponent(e)

Decides which component have to be displayed to get created.
Parameters:
NameTypeDescription
eobjectEvent object

changeSettingsTab(Event)

Hide and show tab links and the content for it.
Parameters:
NameTypeDescription
EventObject

clickOnCanvas(e)

Handles click event on the canvas and displays the specific Form to edit the component.
Parameters:
NameTypeDescription
eobjectEvent object

createTopology(ctx, conf)

Creates the topology shown on the canvas. A new scene with timer plus the parts defined in the configuration.
Parameters:
NameTypeDescription
ctxobjectcanvas context
confobjectconfiguration as JSON

deleteBindingForm(e)

Removes a binding.
Parameters:
NameTypeDescription
eobjectEvent object

deleteConsumerForm(e)

Remove consumer from the scene, render and remove CSS class from the consumer panel.
Parameters:
NameTypeDescription
eobjectEvent object

deleteExchangeForm(e)

Remove exchange from the scene, from the producers and the bindings to the exchange. Renders and removes CSS class from the exchange panel.
Parameters:
NameTypeDescription
eobjectEvent object

deleteProducerForm(e)

Remove producer from the scene, render and remove CSS class from the producer panel.
Parameters:
NameTypeDescription
eobjectEvent object

deleteQueueForm(e)

Removes queue from the scene, render and remove CSS class from the queue panel.
Parameters:
NameTypeDescription
eobjectEvent object

displayBinding(binding)

Display the form to create or edit binding component.
Parameters:
NameTypeDescription
bindingBindingBinding object

displayConsumer(consumer)

Display the form to create or edit consumer component.
Parameters:
NameTypeDescription
consumerConsumerConsumer object

displayExchange(exchange)

Displays the form to create or edit exchange component.
Parameters:
NameTypeDescription
exchangeExchangeExchange object

displayForm(form)

Adds the CSS class to the selected one and remove it from all other ones.
Parameters:
NameTypeDescription
formstring

displayProducer(producer)

Display the form to create or edit a producer component.
Parameters:
NameTypeDescription
producerProducerProducer object

displayQueue(queue)

Display the form to create or edit queue component.
Parameters:
NameTypeDescription
queueQueueQueue object

displaySettings(binding)

Display the form to edit settings.
Parameters:
NameTypeDescription
bindingBindingBinding object

exportAsyncApi(e)

Export topology as AsyncApi.
Parameters:
NameTypeDescription
eobjectEvent object

exportCurl(e)

Export topology as curl statements.
Parameters:
NameTypeDescription
eobjectEvent object

exportRabbitmqadmin(e)

Export topology as rabbitmqadmin statements.
Parameters:
NameTypeDescription
eobjectEvent object

exportTerraform(e)

Export topology as Terraform.
Parameters:
NameTypeDescription
eobjectEvent object

exportTopology(e)

Export topology as config.
Parameters:
NameTypeDescription
eobjectEvent object

findCircle(val, mx, my) → {object}

Current mouse position inside of a cirle.
Parameters:
NameTypeDescription
valobjectcan be Exchange or Queue object
mxnumberx position of the mouse
mynumbery position of the mouse
Returns:
Type: 
object

findLine(val, mx, my) → {object}

Current mouse position over a line.
Parameters:
NameTypeDescription
valBindingBinding object
mxnumberx position of the mouse
mynumbery position of the mouse
Returns:
Type: 
object

findPosition(e, line) → {object}

Find the actor in the scene from the current mouse position.
Parameters:
NameTypeDefaultDescription
eobjectEvent object
line*false
Returns:
- undefined or the found actor in scene
Type: 
object

findSquare(val, mx, my) → {object}

Current mouse position inside of a square.
Parameters:
NameTypeDescription
valobjectcan be Producer or Consumer object
mxnumberx position of the mouse
mynumbery position of the mouse
Returns:
Type: 
object

getSettings() → {object}

Gets the settings from loacalStorage and parse it as JSON.
Returns:
settings - settings as JSON from localStorage.
Type: 
object

hideBinding(e)

Reset form values and remove CSS class from the binding panel.
Parameters:
NameTypeDescription
eobjectEvent object

hideConsumer(e)

Reset form values and remove CSS class from the consumer panel.
Parameters:
NameTypeDescription
eobjectEvent object

hideExchange(e)

Resets form values and remove CSS class from the exchange panel.
Parameters:
NameTypeDescription
eobjectEvent object

hideProducer(e)

Reset form values and remove CSS class from the producer panel.
Parameters:
NameTypeDescription
eobjectEvent object

hideQueue(e)

Reset form values and remove CSS class from the queue panel.
Parameters:
NameTypeDescription
eobjectEvent object

hideSettings(e)

Reset form values and remove CSS class from the settings panel.
Parameters:
NameTypeDescription
eobjectEvent object

linepointNearestMouse(line, x, y) → {object}

Calculates the point on the line that's nearest to the mouse position. https://stackoverflow.com/questions/24043967/detect-if-mouse-is-over-an-object-inside-canvas
Parameters:
NameTypeDescription
lineobjectline with start and end point (x1,y1,x2,y2)
xnumberx position
ynumbery position
Returns:
Type: 
object

mouseDownOnCanvas(e)

Handles mouse down event on the canvas to start dragging without hover effect of actors.
Parameters:
NameTypeDescription
eobjectEvent object

mouseMoveOnCanvas(e)

Handles mouse move event on the canvas to dragged actor.
Parameters:
NameTypeDescription
eobjectEvent object

mouseUpOnCanvas(e)

Handles mouse up event on the canvas to stop dragging of actors.
Parameters:
NameTypeDescription
eobjectEvent object

sendBindingForm(e)

Sends the form to create or edit an binding component.
Parameters:
NameTypeDescription
eobjectEvent object

sendConsumerForm(e)

Sends the form to create or edit a consumer component.
Parameters:
NameTypeDescription
eobjectEvent object

sendExchangeForm(e)

Sends the form to create or edit an exchange component.
Parameters:
NameTypeDescription
eobjectEvent object

sendProducerForm(e)

Sends the form to create or edit a producer component.
Parameters:
NameTypeDescription
eobjectEvent object

sendQueueForm(e)

Sends the form to create or edit an queue component.
Parameters:
NameTypeDescription
eobjectEvent object

sendSettingsForm(e)

Sends the form to set settings.
Parameters:
NameTypeDescription
eobjectEvent object

setSettings(settings)

Sets the current settings in localStorage.
Parameters:
NameTypeDescription
settingsobjectsettings as JSON to set in localStorage.