Package org.jboss.as.console.client.widgets.nav

Examples of org.jboss.as.console.client.widgets.nav.DefaultTreeItem


        int includedSubsystems =0;

        // build groups first
        for(SubsystemGroup group : SubsystemMetaData.getGroups().values())
        {
            final TreeItem groupTreeItem = new DefaultTreeItem(group.getName());

            for(final SubsystemGroupItem groupItem : group.getItems())
            {
                for(SubsystemRecord subsys: subsystems)
                {
                    if(subsys.getKey().equals(groupItem.getKey())
                            && groupItem.isDisabled()==false)
                    {
                        includedSubsystems++;

                        final String key = groupItem.getPresenter();

                        // messaging  -----------------------------------

                        if("messaging".equals(key)) {
                            // See  https://issues.jboss.org/browse/AS7-1857
                            // there can be multiple messaging server instances

                            new LoadHornetQServersCmd(Console.MODULES.getDispatchAsync()).execute(
                                    new AsyncCallback<List<String>>() {
                                        @Override
                                        public void onFailure(Throwable caught) {
                                            Console.error("Failed to load messaging server names", caught.getMessage());
                                        }

                                        @Override
                                        public void onSuccess(List<String> result) {

                                            for(String server : result)
                                            {
                                                String token = parentPlace + key+";name="+server;
                                                final LHSNavTreeItem link = new LHSNavTreeItem("Provider: "+server, token);
                                                link.setKey(key);
                                                groupTreeItem.addItem(link);
                                            }
                                        }
                                    }
                            );

                            //if(groupTreeItem.getChildCount()>0)
                            subsysTree.addItem(groupTreeItem);

                            // skip ahead
                            continue;
                        }

                        // logging  -----------------------------------

                        else if("logging".equals(key))
                        {

                            //TreeItem logging = new DefaultTreeItem("Logging");

                            final LHSNavTreeItem loggers  = new LHSNavTreeItem("Loggers", NameTokens.Logger);
                            final LHSNavTreeItem handlers = new LHSNavTreeItem("Log Handlers", NameTokens.Logger+";page=handler");

                            //logging.addItem(loggers);
                            //logging.addItem(handlers);

                            groupTreeItem.addItem(loggers);
                            groupTreeItem.addItem(handlers);

                            subsysTree.addItem(groupTreeItem);

                            continue;
                        }
                       

                        String token = parentPlace + key;
                        final LHSNavTreeItem link = new LHSNavTreeItem(groupItem.getName(), token);
                        link.setKey(key);

                        groupTreeItem.addItem(link);
                    }
                }
            }

            // skip empty groups
            if(groupTreeItem.getChildCount()>0)
                subsysTree.addItem(groupTreeItem);

        }

        // fallback in case no manageable subsystems exist
View Full Code Here


        serverPicker = new ServerPicker();
        innerlayout.add(serverPicker.asWidget());

        Tree statusTree = new LHSNavTree("domain-runtime");
        TreeItem servers = new DefaultTreeItem("Domain Status");
        statusTree.addItem(servers);

        LHSNavTreeItem serverInstances= new LHSNavTreeItem(Console.CONSTANTS.common_label_serverInstances(), new ClickHandler()
        {
            @Override
            public void onClick(ClickEvent event) {
                Console.MODULES.getPlaceManager().revealPlace(
                        new PlaceRequest(NameTokens.InstancesPresenter)
                );
            }
        });


        LHSNavTreeItem jvm = new LHSNavTreeItem("JVM Status", NameTokens.HostVMMetricPresenter);

        servers.addItem(serverInstances);
        servers.addItem(jvm);

        innerlayout.add(statusTree);


        // -------------

        Tree metricTree = new LHSNavTree("domain-runtime");

        TreeItem subsystems = new DefaultTreeItem("Subsystem Metrics");

        LHSNavTreeItem datasources = new LHSNavTreeItem("Datasources", "ds-metrics");
        LHSNavTreeItem jmsQueues = new LHSNavTreeItem("JMS Destinations", "jms-metrics");
        LHSNavTreeItem web = new LHSNavTreeItem("Web", "web-metrics");
        LHSNavTreeItem tx = new LHSNavTreeItem("Transactions", "tx-metrics");

        subsystems.addItem(datasources);
        subsystems.addItem(jmsQueues);
        subsystems.addItem(web);
        subsystems.addItem(tx);

        metricTree.addItem(subsystems);
        subsystems.setState(true); // open by default
        servers.setState(true);

        innerlayout.add(metricTree);

View Full Code Here


        // ----------------------------------------------------

        statusTree = new LHSNavTree("standalone-runtime");
        TreeItem serverContents = new DefaultTreeItem("Server");

        statusTree.addItem(serverContents);


        LHSNavTreeItem server = new LHSNavTreeItem("Configuration", NameTokens.StandaloneServerPresenter);
        LHSNavTreeItem jvmItem = new LHSNavTreeItem("JVM", NameTokens.VirtualMachine);
        serverContents.addItem(server);
        serverContents.addItem(jvmItem);


        //LHSNavTreeItem metrics = new LHSNavTreeItem("Subsystem Metrics", "metrics");

        LHSNavTreeItem datasources = new LHSNavTreeItem("Datasources", "ds-metrics");
        LHSNavTreeItem jmsQueues = new LHSNavTreeItem("JMS Destinations", "jms-metrics");
        LHSNavTreeItem web = new LHSNavTreeItem("Web", "web-metrics");
        LHSNavTreeItem tx = new LHSNavTreeItem("Transactions", NameTokens.TXMetrics);

        /*subsysContents.addItem(datasources);
        subsysContents.addItem(jmsQueues);
        subsysContents.addItem(web);
        subsysContents.addItem(tx);*/


        mapping.put(NameTokens.DataSourcePresenter, datasources);
        mapping.put(NameTokens.MessagingPresenter, jmsQueues);
        mapping.put(NameTokens.WebPresenter, web);
        mapping.put(NameTokens.TransactionPresenter, tx);


        DisclosurePanel serverPanel  = new DisclosureStackPanel("Status", true).asWidget();
        serverPanel.setContent(statusTree);

        // open by default
        serverContents.setState(true);


        stack.add(serverPanel);

        // ----------------------------------------------------
View Full Code Here

        return layout;
    }

    public void setSubsystems(List<SubsystemRecord> result) {

        TreeItem subsysContents = new DefaultTreeItem("Subsystem Metrics");

        for(SubsystemRecord subsys : result)
        {
            LHSNavTreeItem navEntry = mapping.get(subsys.getKey());
            if(navEntry!=null)
            {
                subsysContents.addItem(navEntry);
            }
        }

        statusTree.addItem(subsysContents);
        subsysContents.setState(true);
    }
View Full Code Here

        int includedSubsystems =0;

        // build groups first
        for(SubsystemGroup group : SubsystemMetaData.getGroups().values())
        {
            final TreeItem groupTreeItem = new DefaultTreeItem(group.getName());

            for(final SubsystemGroupItem groupItem : group.getItems())
            {
                for(SubsystemRecord subsys: subsystems)
                {
                    if(subsys.getKey().equals(groupItem.getKey())
                            && groupItem.isDisabled()==false)
                    {
                        includedSubsystems++;

                        final String key = groupItem.getPresenter();

                        String token = key;
                        final LHSNavTreeItem link = new LHSNavTreeItem(groupItem.getName(), token);
                        link.setKey(key);

                        groupTreeItem.addItem(link);
                    }
                }
            }

            // skip empty groups
            if(groupTreeItem.getChildCount()>0)
                subsysTree.addItem(groupTreeItem);

        }

        // fallback in case no manageable subsystems exist
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.widgets.nav.DefaultTreeItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.