}
});
}
private void updateMonitoringTab(Set<ResourceTypeFacet> facets) {
ViewFactory viewFactory;
boolean visible = hasMetricsOfType(this.groupComposite, null);
if (updateTab(this.monitoringTab, visible, true)) {
visible = hasMetricsOfType(this.groupComposite, DataType.MEASUREMENT) ||
hasMetricsOfType(this.groupComposite, DataType.AVAILABILITY);
boolean showOnPage;
if(BrowserUtility.isBrowserPreIE9()){
showOnPage = false;
}else{
showOnPage = visible;
}
viewFactory = (!showOnPage) ? null : new ViewFactory() {
@Override
public Canvas createView() {
return MetricsGroupView.create(EntityContext.forGroup(groupComposite.getResourceGroup().getId(),
isAutoCluster(), isAutoGroup()), groupComposite.getResourceGroup());
}
};
updateSubTab(this.monitoringTab, this.monitorGraphs, visible, true, viewFactory);
// visible = same test as above
viewFactory = (!visible) ? null : new ViewFactory() {
@Override
public Canvas createView() {
//gwt version of group table view.
return new GroupMonitoringTablesView(groupComposite);
}
};
updateSubTab(this.monitoringTab, this.monitorMetrics, visible, true, viewFactory);
visible = hasMetricsOfType(this.groupComposite, DataType.TRAIT);
viewFactory = (!visible) ? null : new ViewFactory() {
@Override
public Canvas createView() {
return viewWithoutHeader(new TraitsView(groupId));
}
};
updateSubTab(this.monitoringTab, this.monitorTraits, visible, true, viewFactory);
visible = hasMetricsOfType(this.groupComposite, null);
viewFactory = (!visible) ? null : new ViewFactory() {
@Override
public Canvas createView() {
return viewWithoutHeader(new ResourceGroupSchedulesView(groupComposite));
}
};
updateSubTab(this.monitoringTab, this.monitorSched, visible, true, viewFactory);
visible = facets.contains(ResourceTypeFacet.CALL_TIME);
viewFactory = (!visible) ? null : new ViewFactory() {
@Override
public Canvas createView() {
return new CalltimeView(EntityContext.forGroup(groupComposite.getResourceGroup()));
}
};