Developer Notes: Keep the following since it had pictures showing the two methods of adding a node, in case we decided to put it back..
Draft Campaign Editor¶
The Campaign Editor referred to in several places in the POMS Overview makes use of a dynamic visualization library called vis.js .
Of the several graphic libraries vis.js offers, the Campaign Editor is based on the Network component which allows the user to create the whole campaign structure in a easy-to-use way employing the concept of 'node' and 'edge'.
- Node --> campaign defaults, campaign stage, login/setup and job type.
- Edge --> dependencies
To demonstrate the use of the Campaign Editor we will use the basic campaign 'eve_calib' .
The campaign has been created using the following basic steps:
- From POMS main menu, under Campaign Data click on Campaigns
- From Campaigns page click on Add, assign a name and Save (in our example eve_calib).
- Under Campaigns, find the newly added campaign, eve_calib, and click on the 'GUI Editor' icon.
The following page shows the result of the previous actions:
The picture shows the Campaign Editor drawing board showing the basic elements resulted from creating the campaign.
The drawing board has an 'Edit' button which will show available actions on the elements:
- Add Node
- Add Edge
- Delete Selected (only shown when an existing element is selected)
It is divided in two sections, the top part where you compose the campaign by adding stages and dependencies, and the bottom part where it shows the login/setup and jobtype elements.
When the campaign is created, it is assigned assigned some default values and a single stage based on a generic login/setup and jobtype templates.
Double clicking on the elements it shows the form that contains the associated fields and values.
For example, double clicking on the eve_calib and the stage0 elements you would see the following:
The picture illustrates how the stage has inherited the defaults for the campaign; by convention, the default values in a stage are shown with an 'aqua' color background.
Interacting with the GUI¶
The GUI offers easy way to add and modify the elements. Let's briefly describe some.
Basic actions are as follows (mouse based):
- Double left click on an element, example the node eve_calib, will open up a form with the currently stored values which are modifiable.
- Single left click on an element will select it and allow actions on it chosen from the Edit bar.
- Single right click on the node will allow to create another node which will be a child of it inheriting the parent's field values.
Let's see the actions in practice as we add another stage and a dependency to our basic campaign.
This can be done in two ways, of which one (case A) it will be more likely used in most cases, but we want to illustrate both.
The following pictures will show, side by side the two cases, A and B to achieve the same scenario.
After clicking OK, this is what you would see:
In case A, you will end up with a new stage already connected by a dependency.
In case B, you will end up having a new node, a.k.a. stage, on the 'editor drawing board' , as a standalone node that you can then connect to the previous stage by adding an edge .
The picture below shows the results of adding the dependency in both cases.
- Case A is one time operation
- Case B requires two steps: selecting the 'Add Edge' and then connecting the stages.
Both cases can be used of course depending on the needs.
An interesting situation, using the case A previously illustrated, is when you want to add multiple children from the same parent, example 3 stages from the existing stage1: this can be accoplished by right clicking on parent and when specifying the name add '*N', N being the number of stages you want to create; as usual the children will inherit all the fields from the parent.
See below where 3 stages were created: