Methods
addNewComponent(e)
Decides which component have to be displayed to get created.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
changeSettingsTab(Event)
Hide and show tab links and the content for it.
Parameters:
Name | Type | Description |
---|---|---|
Event | Object |
- Source
clickOnCanvas(e)
Handles click event on the canvas and displays the specific Form to edit the component.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
createTopology(ctx, conf)
Creates the topology shown on the canvas. A new scene with timer plus the parts defined in the configuration.
Parameters:
Name | Type | Description |
---|---|---|
ctx | object | canvas context |
conf | object | configuration as JSON |
- Source
deleteBindingForm(e)
Removes a binding.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
deleteConsumerForm(e)
Remove consumer from the scene, render and remove CSS class from the consumer panel.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
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:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
deleteProducerForm(e)
Remove producer from the scene, render and remove CSS class from the producer panel.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
deleteQueueForm(e)
Removes queue from the scene, render and remove CSS class from the queue panel.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
displayBinding(binding)
Display the form to create or edit binding component.
Parameters:
Name | Type | Description |
---|---|---|
binding | Binding | Binding object |
- Source
displayConsumer(consumer)
Display the form to create or edit consumer component.
Parameters:
Name | Type | Description |
---|---|---|
consumer | Consumer | Consumer object |
- Source
displayExchange(exchange)
Displays the form to create or edit exchange component.
Parameters:
Name | Type | Description |
---|---|---|
exchange | Exchange | Exchange object |
- Source
displayForm(form)
Adds the CSS class to the selected one and remove it from all other ones.
Parameters:
Name | Type | Description |
---|---|---|
form | string |
- Source
displayProducer(producer)
Display the form to create or edit a producer component.
Parameters:
Name | Type | Description |
---|---|---|
producer | Producer | Producer object |
- Source
displayQueue(queue)
Display the form to create or edit queue component.
Parameters:
Name | Type | Description |
---|---|---|
queue | Queue | Queue object |
- Source
displaySettings(binding)
Display the form to edit settings.
Parameters:
Name | Type | Description |
---|---|---|
binding | Binding | Binding object |
- Source
exportAsyncApi(e)
Export topology as AsyncApi.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
exportCurl(e)
Export topology as curl statements.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
exportRabbitmqadmin(e)
Export topology as rabbitmqadmin statements.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
exportTerraform(e)
Export topology as Terraform.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
exportTopology(e)
Export topology as config.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
findCircle(val, mx, my) → {object}
Current mouse position inside of a cirle.
Parameters:
Name | Type | Description |
---|---|---|
val | object | can be Exchange or Queue object |
mx | number | x position of the mouse |
my | number | y position of the mouse |
- Source
Returns:
- Type:
- object
findLine(val, mx, my) → {object}
Current mouse position over a line.
Parameters:
Name | Type | Description |
---|---|---|
val | Binding | Binding object |
mx | number | x position of the mouse |
my | number | y position of the mouse |
- Source
Returns:
- Type:
- object
findPosition(e, line) → {object}
Find the actor in the scene from the current mouse position.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
e | object | Event object | |
line | * | false |
- Source
Returns:
- undefined or the found actor in scene
- Type:
- object
findSquare(val, mx, my) → {object}
Current mouse position inside of a square.
Parameters:
Name | Type | Description |
---|---|---|
val | object | can be Producer or Consumer object |
mx | number | x position of the mouse |
my | number | y position of the mouse |
- Source
Returns:
- Type:
- object
getSettings() → {object}
Gets the settings from loacalStorage and parse it as JSON.
- Source
Returns:
settings - settings as JSON from localStorage.
- Type:
- object
hideBinding(e)
Reset form values and remove CSS class from the binding panel.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
hideConsumer(e)
Reset form values and remove CSS class from the consumer panel.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
hideExchange(e)
Resets form values and remove CSS class from the exchange panel.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
hideProducer(e)
Reset form values and remove CSS class from the producer panel.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
hideQueue(e)
Reset form values and remove CSS class from the queue panel.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
hideSettings(e)
Reset form values and remove CSS class from the settings panel.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
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:
Name | Type | Description |
---|---|---|
line | object | line with start and end point (x1,y1,x2,y2) |
x | number | x position |
y | number | y position |
- Source
Returns:
- Type:
- object
mouseDownOnCanvas(e)
Handles mouse down event on the canvas to start dragging without hover effect of actors.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
mouseMoveOnCanvas(e)
Handles mouse move event on the canvas to dragged actor.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
mouseUpOnCanvas(e)
Handles mouse up event on the canvas to stop dragging of actors.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
sendBindingForm(e)
Sends the form to create or edit an binding component.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
sendConsumerForm(e)
Sends the form to create or edit a consumer component.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
sendExchangeForm(e)
Sends the form to create or edit an exchange component.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
sendProducerForm(e)
Sends the form to create or edit a producer component.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
sendQueueForm(e)
Sends the form to create or edit an queue component.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
sendSettingsForm(e)
Sends the form to set settings.
Parameters:
Name | Type | Description |
---|---|---|
e | object | Event object |
- Source
setSettings(settings)
Sets the current settings in localStorage.
Parameters:
Name | Type | Description |
---|---|---|
settings | object | settings as JSON to set in localStorage. |
- Source