// ----------------------------------------------------
LHSNavTree domainNavigation = new LHSNavTree("domain");
domainNavigation.getElement().setAttribute("aria-label", "Domain Tasks");
LHSTreeSection domainLeaf = new LHSTreeSection("Domain", true);
domainLeaf.addItem(new LHSNavTreeItem("Overview", NameTokens.Topology));
domainLeaf.addItem(new LHSNavTreeItem("Patch Management", NameTokens.PatchingPresenter));
domainLeaf.addItem(new LHSNavTreeItem("Manage Deployments", NameTokens.DeploymentsPresenter));
domainNavigation.addItem(domainLeaf);
domainNavigation.expandTopLevel();
stack.add(domainNavigation);
// ----------------------------------------------------
serverPicker = new ServerPicker();
stack.add(serverPicker.asWidget());
// ----------------------------------------------------
navigation = new LHSNavTree("domain-runtime");
navigation.getElement().setAttribute("aria-label", "Runtime Tasks");
// -------------
metricLeaf = new LHSTreeSection("Server Status");
navigation.addItem(metricLeaf);
LHSNavTreeItem datasources = new LHSNavTreeItem("Datasources", NameTokens.DataSourceMetricPresenter);
LHSNavTreeItem jmsQueues = new LHSNavTreeItem("JMS Destinations", NameTokens.JmsMetricPresenter);
LHSNavTreeItem web = new LHSNavTreeItem("Web", NameTokens.WebMetricPresenter);
LHSNavTreeItem jpa = new LHSNavTreeItem("JPA", NameTokens.JPAMetricPresenter);
LHSNavTreeItem ws = new LHSNavTreeItem("Webservices", NameTokens.WebServiceRuntimePresenter);
LHSNavTreeItem naming = new LHSNavTreeItem("JNDI View", NameTokens.JndiPresenter);
metricPredicates.add(new Predicate("datasources", datasources));
metricPredicates.add(new Predicate("messaging", jmsQueues));
metricPredicates.add(new Predicate("web", web));
metricPredicates.add(new Predicate("jpa", jpa));
metricPredicates.add(new Predicate("webservices", ws));
metricPredicates.add(new Predicate("naming", naming));
// Extension based additions
RuntimeExtensionRegistry registry = Console.getRuntimeLHSItemExtensionRegistry();
List<RuntimeExtensionMetaData> menuExtensions = registry.getExtensions();
for (RuntimeExtensionMetaData ext : menuExtensions) {
if(RuntimeGroup.METRICS.equals(ext.getGroup()))
{
metricPredicates.add(
new Predicate(
ext.getKey(), new LHSNavTreeItem(ext.getName(), ext.getToken())
)
);
}
else if(RuntimeGroup.OPERATiONS.equals(ext.getGroup()))
{
runtimePredicates.add(
new Predicate(
ext.getKey(), new LHSNavTreeItem(ext.getName(), ext.getToken())
)
);
}
else
{
Log.warn("Invalid runtime group for extension: " + ext.getGroup());
}
}
// ---
runtimeLeaf = new LHSTreeSection("Runtime Operations");
navigation.addItem(runtimeLeaf);
LHSNavTreeItem osgi = new LHSNavTreeItem("OSGi", NameTokens.OSGiRuntimePresenter);
runtimePredicates.add(new Predicate("osgi", osgi));