Skip to content

Commit

Permalink
Revert workaround for thumbnail slowness.
Browse files Browse the repository at this point in the history
This patch reverts commit 43fa0377154e35ec639968ffefe95c88f38186b4
from Wed Nov 25 10:12:49 2015 -0500.

Prior to this change, the Usage tab in XDMoD displayed a thumbnail view
by default. The thumbnail view showed multiple charts, one for each of
the statistics of the first node in the catalog.

The XDMoD code was changed to use the metric explorer backend to generate
the data for the Usage tab. Unfortunately, the changes resulted in terrible load
performance for the thumbnail view. A short term workaround was
implemented in commit 43fa0377154e35ec639968ffefe95c88f38186b4. This
workaround loaded one of the charts by default rather than the thunmbnail
chart view.

The changes in ubccr#750 mitigate
the slowness so this pull request reverts the workaround.
  • Loading branch information
jpwhite4 committed Dec 19, 2018
1 parent ecbb6f2 commit 0b6923b
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions html/gui/js/modules/Usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -962,34 +962,10 @@ Ext.extend(XDMoD.Module.Usage, XDMoD.PortalModule, {

if (child) {

tree.expandPath(child.getPath(), null, function (success) {
// If the summary node was successfully expanded...
if (success) {
// If available, open the default statistic.
//
// Open XDMoD Default: CPU Hours: Total
// XDMoD Default: XD SUs Charged: Total
var defaultStatistic = CCR.xdmod.features.xsede ? "total_su" : "total_cpu_hours";
var jobCountNode = child.findChild("statistic", defaultStatistic);
if (jobCountNode && !jobCountNode.disabled) {
tree.getSelectionModel().select(jobCountNode);
return;
}
tree.getSelectionModel().select(child);

// Otherwise, open the first available statistic,
// if any.
var firstAvailableStatisticNode = child.findChildBy(function (n) {
return !n.disabled;
});
if (firstAvailableStatisticNode) {
tree.getSelectionModel().select(firstAvailableStatisticNode);
return;
}
}
tree.expandPath(child.getPath(), null, function () {

// If none of the summary node's children could be
// opened, select the summary node.
tree.getSelectionModel().select(child);
});

} //if(child)
Expand Down

0 comments on commit 0b6923b

Please # to comment.