Package org.rhq.core.domain.resource.group.composite

Examples of org.rhq.core.domain.resource.group.composite.ResourceGroupComposite


        }

        List<MenuItem> items = new ArrayList<MenuItem>(groupIds.size());

        for (final Integer groupId : groupIds) {
            ResourceGroupComposite groupComposite = favorites.getGroupComposite(groupId);
            if (null == groupComposite) {
                // if the resource group is gone just skip it
                continue;
            }
            final ResourceGroup group = groupComposite.getResourceGroup();

            MenuItem item = new MenuItem(String.valueOf(groupId));
            item.setTitle(group.getName());
            item.setIcon(ImageManager.getGroupIcon(group.getGroupCategory(),
                groupComposite.getExplicitAvailabilityType()));

            item.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
                public void onClick(MenuItemClickEvent event) {
                    CoreGUI.goToView(LinkManager.getResourceGroupLink(group));
                }
View Full Code Here


        if (!recentResourceIds.isEmpty() && !recentGroupIds.isEmpty()) {
            items.add(new MenuItemSeparator());
        }

        for (final Integer groupId : recentGroupIds) {
            ResourceGroupComposite groupComposite = favorites.getGroupComposite(groupId);
            if (null == groupComposite) {
                // if the resource group is gone just skip it
                continue;
            }
            final ResourceGroup group = groupComposite.getResourceGroup();

            MenuItem item = new MenuItem(String.valueOf(groupId));
            item.setTitle(group.getName());
            item.setIcon(ImageManager.getGroupIcon(group.getGroupCategory(),
                groupComposite.getExplicitAvailabilityType()));

            item.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
                public void onClick(MenuItemClickEvent event) {
                    CoreGUI.goToView(LinkManager.getResourceGroupLink(group));
                }
View Full Code Here

                    }

                    @Override
                    public void onSuccess(PageList<ResourceGroupComposite> results) {
                        if (!results.isEmpty()) {
                            final ResourceGroupComposite groupComposite = results.get(0);


                            GWTServiceLookup.getMeasurementDataService().getHighestNOOBsForGroup(groupId, resultCountFinal,
                                    new AsyncCallback<PageList<MeasurementOOBComposite>>() {
                                        @Override
                                        public void onFailure(Throwable caught) {
                                            Log.debug("Error retrieving recent out of bound metrics for group [" + groupId + "]:"
                                                    + caught.getMessage());
                                            currentlyLoading = false;
                                        }

                                        @Override
                                        public void onSuccess(PageList<MeasurementOOBComposite> result) {
                                            VLayout column = new VLayout();
                                            column.setHeight(10);
                                            column.setWidth100();
                                            if (!result.isEmpty()) {
                                                for (final MeasurementOOBComposite oob : result) {
                                                    DynamicForm row = new DynamicForm();
                                                    row.setWidth100();
                                                    row.setNumCols(2);
                                                    row.setColWidths("*", 100);

                                                    final String title = oob.getScheduleName();
                                                    LinkItem link = new LinkItem();
                                                    link.setLinkTitle(title);
                                                    link.setShowTitle(false);
                                                    link.setClipValue(false);
                                                    link.setWrap(true);
                                                    link.addClickHandler(new ClickHandler() {
                                                        @Override
                                                        public void onClick(ClickEvent event) {
                                                            ChartViewWindow window = new ChartViewWindow(title);
                                                            D3GroupGraphListView graphView = new D3GroupGraphListView
                                                                    (groupComposite.getResourceGroup(), oob.getDefinitionId(), true);

                                                            window.addItem(graphView);
                                                            window.show();

                                                        }
View Full Code Here

                        groupHistoryTable = new GroupConfigurationHistoryCriteriaTable(groupComposite);
                    } else {
                        ResourceGroup emptyGroup = new ResourceGroup("");
                        emptyGroup.setId(-1);
                        Long zero = new Long(0);
                        groupComposite = new ResourceGroupComposite(zero, zero, zero, zero, zero, zero, zero, zero,
                            emptyGroup);
                        groupHistoryTable = new GroupConfigurationHistoryCriteriaTable(groupComposite);
                    }

                    //update table for portlet display.                   
View Full Code Here

        PageList<ResourceGroupComposite> results = resourceGroupManager.findResourceGroupComposites(env.normalSubject,
            null, null,
            null, null, null, null, env.compatibleGroup.getId(), new PageControl(0, 50));
        int count = results.size();
        assert count == 1 : "results=" + results;
        ResourceGroupComposite rgc = results.get(0);
        assert rgc.getExplicitCount() == gac.visibleTotal;
        assert rgc.getImplicitCount() == gac.visibleTotal;
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.resource.group.composite.ResourceGroupComposite

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.