Appboard/2.5/builder/widgets/topology/basic example

Revision as of 13:45, 22 September 2014 by imported>Jason.nicholls (→‎Create a new Data Source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


The following is a step by step “hands on” example of using the Topology Widget:


Create a new Data Source

  1. Click the Data Sources toolbar option on the left.
  2. Click the Add button.
  3. Give the Data Source the name of “Showcase” and choose the adapter type of File and then select CSV Directory .
  4. Click the Add Data Source button and you will be presented with a new Wizard.
  5. On the Connect wizard page use ${application.home}/data/examples/showcase/CSV as the directory value and leave all the other configuration options alone.
  6. Click Next and you will be shown all the CSV Tables that were found in that directory. Use the following screenshot to set the Primary Key for each of the five tables shown in the following figure:
    Primary Key Settings
  7. The table application_assets needs a Multi Primary Key. Click Edit and select AppID and AssetID.
  8. The table services_applications also needs a Multi Primary Key. Click Edit and select ServiceID and AppID.
  9. On the Associate screen, click Add Association four times and configure the selections as shown in the figure below:
    Associations

Create a new Relationship Model

  1. Navigate to the Data Collections page and switch the Collection Type to the Relationship mode by clicking on the toggle switch.
  2. Click the Add button to launch the relationship model editor.
  3. For the Model Name, enter Service Model.
  4. First we need to add the “root” node type for our model. Click the Add Source button and pick showcase.services.
  5. Next we want to add relationships to this root node. Click the green “+” button on the services badge.
  6. For Relationship Target select services_applications.applications_detail. For Relationship Type select Child. We are telling the relationship model editor that we want to get all the applications that are children of the service by following the association path through the join table. Click Finish.
  7. Now we tell the model editor about the relationship to assets. Click the green “+” on the applications_detail badge.
  8. For Relationship Target select applications_assets.assets. For Relationship Type select Child. We want to see the assets connected to the applications by following the association through the application_assets join table. Click Finish.
    Associations
  9. To describe the data with appearance rules, click the yellow “/” button on the Services Badge.
  10. Click the Name token in the list to make the label rule show the Service Name value as the label of the nodes rendered for this data type. In this sample data we don’t have status for services so we can skip to the Icon rule tab.
  11. Add an Icon Rule called Service Icon, click to add an Icon, and select Chevron Short from the library under Available Icons. In the two pull-downs, select Type and is not null. This creates a simple rule that as long as the Type of a service is not empty, we will show a Chevron Icon.
  12. Click Close to close the Icon Rule Editor and select the Icon Rule called Service Icon from the drop-down list, if it is not already selected.
  13. Click Close to return to the Relation Model Editor.
  14. Click the yellow “/” on the Applications_detail badge.
  15. Select ApplicationName for the label.
  16. Under the Color tab, add a Color Filter rule called Criticality, and create four Color rules selecting a different color for each. Use Criticality, =, and enter the numbers 1-4 in the Value boxes (1 for the first, 2 for second, etc.). Click Close.
  17. Skip the Status Shape rules.
  18. For the Icon section, add an Icon rule called Application Icon, using the Application1 Icon from the library and selecting AppID and is not null for the rule.
  19. Click Close to close the Icon Rule Editor and select the Icon Rule called Application Icon from the drop-down list, if it is not already selected.
  20. Click Close to return to the Relation Model Editor.
  21. Click the yellow “/” on the Assets badge.
  22. Use Name for the label.
  23. Add a Color Filter called Asset Colors, and click to add three Color rules selecting a different color for each. Use State, =, and enter the numbers 1-3 in the Value boxes.
  24. Click Close to close the Color Filter Rule Editor and select the Color Filter Rule called Asset Colors from the drop-down list, if it is not already selected.
  25. Go to the Icon section, add an Icon rule called Asset Icon,and select Rackmount01 as the Icon with Type and is not null as the rule.
  26. Click Close to close the Icon Rule Editor and select the Icon Rule called Asset Icon from the drop-down list, if it is not already selected.
  27. Close the dialog and click Finish in the Relationship Model Editor.


Create a new Topology Widget

  1. Click the Add Stack button in the left panel. Add a Stack called My Topology.
  2. Click the Add Widget button in the left panel.
  3. For Widget Type select the Topology Widget from the Diagrams category.
  4. Select the Data Collection showcase.services.
  5. Enter the Widget Name "Service Topology Example".
  6. Click Next.
  7. For the Relationship Model, select "Service Model".
  8. For Default Layout select "Bi-Hierarchical".
  9. Enable Auto Node Drill Down. Keep all remaining default options.
  10. Click Next, and Finish. View the completed Topology Widget in the Builder.


Observe that there are many services displayed, producing a diluted Topology. The final step is to filter the Data Collection to only show services that have children, which would provide meaningful information in a topology view.


Filter the Data in the Topology Widget

  1. Navigate to the Data Collections page and leave the Collection Type switch on the default Flat Collection setting.
  2. Click the Add button to launch the Data Collections Wizard.
  3. For the Data Collection Name, enter "Services With Children".
  4. For the Data Source, select "Showcase.services".
  5. Click the Configure Client Side tab to go to the Client Side Filter configuration tab.
  6. Click Add Rule to add a Rule of type "Simple Property Comparison".
  7. For the rule, enter Property services_applications[].AppID is not null.
  8. Click Ok.
  9. Go to the Widgets Administration panel and edit the Service Topology Example Widget.
  10. Change the Data Collection to "Service With Children" (the new filtered data set of services).
  11. Click Close. View the completed Topology Widget in the Builder. The finished product should look similar to the image at the beginning of this page.
  12. Drill down into some of the nodes by clicking the arrow image in the upper-right section of the node icon.