The table column has a hyperlink for launching to the perspective graph:
public persNameDisplayObj:{}=null;
in perspective-info-manager.ts: initializes this object
tmpPersInfo.persNameDisplayObj = {linkTxt: tmpPersInfo.getPerspectiveName(), otherTxt: ""};
ngOnInit(): void {
GlobalSetting.panelTitle = this.mriText.s('perf.dojo.table.title');
this.initColumns();
this.initActions();
this.getData();
}
initColumns(): void {
this.columnsDefault = [
{ field: 'packageName', header: this.mriText.s('perf.dojo.package.name'),selected:true, sortable:true},
**{ field: 'perspectiveName', header: this.mriText.s('perf.dojo.perspective.name'),selected:true, sortable:true, _hyperlink:"persNameDisplayObj"_},**
{ field: 'description', header: this.mriText.s('perf.dojo.description') ,selected:true, sortable:true},
{ field: 'viewName', header: this.mriText.s('perf.dojo.view.name') ,selected:true, sortable:true},
{ field: 'metrics', header: this.mriText.s('perf.dojo.metrics'),selected:true, sortable:true },
{ field: 'sql', header: this.mriText.s('perf.dojo.sql'),selected:true, sortable:true, hyperlink:"sqlDisplayObj"}
];
}
**onLinkClick($event): void{**
console.log($event);
let rowData = $event.row;
let col = $event.col;
**if(col == 'persNameDisplayObj'){
this.gotoDojoGraph(rowData);**
}else if(col == 'sqlDisplayObj'){
this.viewSQLDetail.sqlCmd = rowData.getFullSql();
this.viewSQLDetail.showSql();
}
}
**gotoDojoGraph**(rowData): void {
console.log(rowData);
let pInfo = rowData;
this.router.navigate(['/mainframe/performance/dojo-graph'], { state: {
packageId: pInfo.getPackageId(),
perspectiveId: pInfo.getPerspectiveId(),
**perspectiveName: pInfo.getPerspectiveName(),**
collectionLib: pInfo.getCollectionLib(),
collectionName: pInfo.getCollectionName(),
collectionType: pInfo.getCollectionType(),
collectionFormat: pInfo.getCollectionFormat(),
fileLevel: pInfo.getFileLevel(),
startTime: pInfo.getStartTime(),
endTime: pInfo.getEndTime(),
systemName: pInfo.getSystemName(),
release: pInfo.getRelease()
} });
}
<span *ngIf="col.hyperlink" style="vertical-align:middle;">{{rowData[col.hyperlink].otherTxt}}<a href="javascript:void(0);"(click)= "onLinkClick.emit({row:rowData,col:col.hyperlink})">{{rowData[col.hyperlink].linkTxt}}</a></span>
Above for the column in basictable, "javascript:vodi(0)" means we go nowhere but execute the click function. So here the onLinkClick() function is triggered and passed the perspective info and hyper link object name as parameters.
When clicked in the browser, the onLinkClick() function invokes gotoDojoGraph() method with the perspective name information and the router routes to the "dojo-graph" path. The component DojoGraphLauncher(dojo.graph.launcher.ts) is then invoked
In the gotoDojoGraph() function, the router routes to the "dojo-graph" path, and its corresponding component is DojoGraphLauncher(dojo.graph.launcher.ts). All the routing configuration info are stored in performance.routing.module.ts:
{
path: 'dojo-graph',
component: DojoGraphLauncher
},
The template of DojoGraphLauncher component is dojo.graph.launcher.html. The DojoGraphLauncher object is constructed with the perspective info passed in and in the ngOnInit() function it finally loads our js script DojoGraphLauncher.js. In the js, it loads all the dojo classes and parses the dojo widgets in dojo.graph.launcher.html and finally calls DojoGraph.js.
In DojoGraph.js, it will send request to the server side and get the data to render on the chart by sending an Ajax request with the url:
url = "/Navigator/DispatcherServlet/perf/dojoChartRequestHandler?f=getData"
The servlet will find the controller class PerformanceController by this part:
@RequestMapping("/DispatcherServlet/perf")
public class PerformanceController extends BaseController {
In PerformanceController, it will find the method dojoChartRequestHandler to handle this request:
@RequestMapping("/dojoChartRequestHandler")
public ResponseObject dojoChartRequestHandler() {
9). The chart data will be returned to the DojoGraph.js from the getData() function of GraphDataProvider directly.
Doing a click on this element in HtmlUnit does not end up activating this same code.
Is there a way to determine why the onLinkClick() and gotoDojoGraph() methods are not being processed when calling "click()" for the table element?
On the page we are processing with the table and perspective names, this is the element we want to "click on";
<a _ngcontent-ogg-c139="" href="javascript:void(0);">
CPU Utilization (Average)
</a>
For a page like this, we can select one of the items in the 2nd column (CPU Utilization (Average) or "Database Health Indicators"), or alternatively we can do the pop-up menu and select "Investigate Data" which should launch the same chart for whatever row we are hovered over ("Disk Health Indicators" in this screenshot).
Here is a full row:
NewFile.xml.txt
Is there something else that needs to be done for the click to be activated in this situation? I gave you I think a lot more information that may be needed to make sure the whole setup was defined. If you need clarification on anything just ask.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too