Customizing a Perspective in Performance Data Investigator
To get started with Performance Data Investigator (PDI), first go to the Getting Started with the Performance Data Investigator article by Dawn May. After you have used PDI to see what it can do, you may feel the need to modify or change some of the provided charts or tables for your analysis preferences. This document will explain the best ways to edit perspectives and views to customize them for specific purposes.
- A Content Package or Package describes a folder that is used to hold multiple perspectives. You will see the content package names when you first click on Investigate Data.
- A Perspective describes a set of one or more views which can be rendered with one set of data. This is what determines what you see when you click Display.
- A View describes a chart or table that will be rendered with the data selected. One or more views make up a perspective.
- The Perspective List panel is the initial panel that comes up when you click on Investigate Data on the Performance tab. This shows the packages and perspectives available.
- The Perspective Display panel is what you see when you click on Display from the Perspective List panel or when drilling down from your initial perspective.
Enabling Design Mode
The first thing that needs to be done in order to customize a perspective is to enable Design Mode. Enabling design mode allows customized development of new content packages.
Each user has a Custom Perspectives package available to them, but this package is not visible to other users (although there is a way a users custom perspective can be made visible through the URL generated when saved). The userid custom content package is a good place to use as a sandbox and test new perspectives before putting them into a package for others to use. Without design mode enabled you can still make copies of existing perspectives and change them in your Custom Perspectives package.
With design mode enabled, additional advanced edit features become available. You will be able to edit and save perspectives into any unlocked content package.
There are multiple ways to get to the Options panel used to enable design mode. There is an Options button which appears at the bottom of the Perspective List panel (as shown in figure 1) as well as at the bottom of a Perspective Display panel.
Figure 1. Perspective List panel - Options Button.
There is also an Edit -> Options item as part of the menu bar at the top of a Perspective Display panel. Clicking the Options button will bring you to the Options panel as shown in Figure 2.
Figure 2. Options panel – Enable Design Mode.
Click on the Enable Design Mode checkbox and select OK.
Creating a new Content Package
You will want a new content package to store your perspectives. The shipped content packages are locked to preserve their integrity. A locked package cannot be added to, edited or deleted. Creating a new content package will allow you to keep your new perspectives together in one package as well as visible and usable by others on your system.
To create a new content package, click on the new package icon at the top of the Perspectives list (on the Perspective List panel) as shown in Figure 3.
Figure 3. Perspective List panel – New Package icon.
Once you fill in the name and description and press OK, you will return to the Perspective List panel and be able to see the new package as showing in Figure 4.
Figure 4. Perspective List panel – New Package created.
Editing a Perspective
To modify an existing perspective that you would like to customize, there are two different methods. The best method is to edit a locked perspective from the Perspective Display panel, and then save the modified perspectives to a new name. The other approach is to edit an unlocked copy of the original from the Perspective List panel.
The advantages of editing a locked perspective from the Perspective Display panel are:
- If you don't like the changes, you can leave the display without saving. You will not affect the original and your changes will be discarded.
- As you make changes, you will be able to verify and see the results in the display panel.
In comparison, when editing an unlocked perspective from the Perspective List panel, changes are saved to the package you are editing as you exit the panels.
To edit the perspective while displaying the results, we recommend editing a locked perspective only. Future enhancements are planned to safely edit and save an unlocked perspective from the Perspective Display panel.
Editing a Locked Perspective
First display the locked perspective you want to modify with any valid collection for that perspective.
Next go to the Edit Perspective or Edit View panel from the Perspective Display panel by one of these methods (see Figure 5):
- Edit -> Edit Perspective from the top menu bar
- Edit Perspective button at the bottom of the panel
- Edit View from the Select Action pull down menu.
Note that there can be one or more views in a perspective. Each view has its own Select Action pull down menu.
Figure 5. Perspective Display panel Edit.
If you start with Edit Perspective, you will see the Edit Perspective panel and can edit the perspective information (Name and Description), add a view, or select a view to edit as in Figure 6.
Figure 6. Edit Perspective panel.
If you go to Edit View directly or from the Edit Perspective panel, you will see the specifications that make up the view and can be modified (Name, Type, DataSet (SQL), Drilldown options, Chart properties such as DataSeries and Thresholds) as shown in Figure 7.
Figure 7. Edit View panel.
By selecting ModifySQL you can view and make changes to the SQL that creates the view data set (Figure 8).
Figure 8. Modify SQL panel.
This panel shows the exact SQL statement PDI will use to retrieve data from the performance data selected. This information could be helpful to an experienced SQL developer. Making changes to the SQL statement will affect the result data set being shown in the table or chart.
Note that the queries rely on SQL aliases created to represent the specific database members needed to target the performance collection selected. To run these queries outside of PDI, the same aliases would need to be created in your SQL interactive session.
Edit Data Series
By selecting the Edit button for a Data Series, you can make changes to how the data will be displayed for the chart (Figure 9).
Figure 9. Edit Data Series panel.
Editing the data series allows you to view and change the way the performance collection is charted. You will be able to modify some of the specifications such as the range and type of chart (bar or line, stacked or clustered), color and pattern choices, breakdown dimension and tooltips.
From the Edit Data Series panel, you can preserve your changes by selecting OK, or exit without saving your changes with the Cancel button.
From the Edit View and Edit Perspective panels, selecting OK will preserve your changes for the display, but will not save your changes to the perspective (when editing from the Perspective Display panel). This enables you to try out changes.
Saving Edited Changes
When editing from the Perspective Display panel, the changes are not saved until you explicitly save the perspective using the Save As button. They are only preserved for the current display.
After editing a locked perspective, use the Save As button to save the changes into an alternate location by using a different name (see Figure 10).
Figure 10. Save Perspective panel.
Steps to save perspective (Figure 10):
- Select the package name where you want the perspective to be stored. Note that in addition to any content packages created on your system, there is a Custom Perspectives – UserID folder shown. This is referred to as the users custom content package. It is not visible to anyone on the system except your userid. Other content packages on the system are usable by all.
- Change the name of the perspective if desired for the new location.
- Uncheck or check the Locked checkbox as needed (the default is the setting of the original perspective you are saving from).
- Click on Save.
When saving a locked perspective, you are required to Save As to a different name. You also will not be able to overwrite an existing perspective with a new or different perspective.
Note that once you have done the save from the Perspective Display panel, the perspective you are viewing is still the original locked perspective, not the newly saved one. Press the Done or History-> Home button to get back to the Perspective List panel. From there you can select and display the newly saved perspective.
Copying a Perspective
Before editing an unlocked perspective, we recommend that you make a copy of the original perspective.
Select the perspective and a valid collection and click on Display. From the Perspective Display panel, select Save As to save this perspective under a new name as shown in Figure 10.
Editing an Unlocked Perspective
Only unlocked perspectives can be edited from the Perspective List panel. When a locked perspective is selected, the Edit button will be disabled. Editing from the Perspective List panel is the best method for editing an unlocked perspective.
It is recommended that you make a copy of a perspective before editing with this method because as changes are made, they are saved to the perspective as you exit the editing panels.
Figure 11. Edit from Perspective List panel.
Selected Edit on the right side of the panel as shown in Figure 11.
When editing from the Perspective List panel, changes are saved to the content package as you exit the panels with the OK button. There is no Cancel button on the Edit Perspective and Edit View panels.
The ability to edit perspectives in Performance Data Investigator is a great way to give you exactly what you need for analyzing performance data. This article has touched upon the main aspects of editing and saving perspectives. Watch for future enhancements and comment on other areas you would like to see documented.
Read Getting Started with the Performance Data Investigator by Dawn May.
Visit the IBM i 7.1 information Center to get more information about Performance Data Investigator.
Follow Dawn May's blog, i Can… Investigate Performance Data and look for the latest blogs in the Performance category.
Make sure you have the latest level Group PTF for IBM HTTP Server for i installed on your system for the most recent enhancements. Refer to IBM System i Support to file the level available for 6.1 and 7.1.
Dig deeper into IBM i on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.