Package org.rhq.coregui.client.components.view

Examples of org.rhq.coregui.client.components.view.ViewFactory


        };
        updateSubTab(this.inventoryTab, this.inventoryAgent, true, enabled, viewFactory);
    }

    private void updateAlertsTabContent(final ResourceComposite resourceComposite) {
        updateSubTab(this.alertsTab, this.alertHistory, true, true, new ViewFactory() {
            @Override
            public Canvas createView() {
              return viewWithoutHeader( ResourceAlertHistoryView.get(resourceComposite) );
            }
        });

        updateSubTab(this.alertsTab, this.alertDef, true, true, new ViewFactory() {
            @Override
            public Canvas createView() {
              return viewWithoutHeader( new ResourceAlertDefinitionsView(resourceComposite));
            }
        });
View Full Code Here


    }

    private void updateMonitoringTabContent(final Resource resource, Set<ResourceTypeFacet> facets) {
        boolean visible = hasMetricsOfType(this.resourceComposite, DataType.MEASUREMENT)
            || hasMetricsOfType(this.resourceComposite, DataType.AVAILABILITY);
        ViewFactory viewFactory;

        boolean visibleToIE8 = !BrowserUtility.isBrowserPreIE9();

        // visible = same test as above
        viewFactory = (!visible) ? null : new ViewFactory() {
            @Override
            public Canvas createView() {
                // metricsResourceView contains state of opened graphs (unlike other stateless views)
                metricsResourceView = MetricsResourceView.create(resourceComposite.getResource() );

                // this listener handles the subtab navigation
                addViewRenderedListener(metricsResourceView);

                return metricsResourceView;
            }
        };
        updateSubTab(this.monitoringTab, this.monitorMetrics, visible, visibleToIE8, viewFactory);

        visible = hasMetricsOfType(this.resourceComposite, DataType.TRAIT);
        viewFactory = (!visible) ? null : new ViewFactory() {
            @Override
            public Canvas createView() {
                return viewWithoutHeader(new TraitsView(resource.getId()));
            }
        };
        updateSubTab(this.monitoringTab, this.monitorTraits, visible, true, viewFactory);

        updateSubTab(this.monitoringTab, this.monitorSched, hasMetricsOfType(this.resourceComposite, null), true,
            new ViewFactory() {
                @Override
                public Canvas createView() {
                    return viewWithoutHeader(new ResourceSchedulesView(resourceComposite));
                }
            });

        visible = facets.contains(ResourceTypeFacet.CALL_TIME);
        viewFactory = (!visible) ? null : new ViewFactory() {
            @Override
            public Canvas createView() {
                return new CalltimeView(EntityContext.forResource(resource.getId()));
            }
        };
View Full Code Here

    }

    private void updateEventsTabContent(final ResourceComposite resourceComposite, Set<ResourceTypeFacet> facets) {
        if (updateTab(this.eventsTab, facets.contains(ResourceTypeFacet.EVENT), true)) {

            updateSubTab(this.eventsTab, this.eventHistory, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                      return viewWithoutHeader(EventCompositeHistoryView.get(resourceComposite));
                }
            });
View Full Code Here

            //     2) user can see both operation arguments and results in the history details pop-up
            //     3) operation arguments/results become read-only configuration data in the history details pop-up
            //     4) user can navigate to the group operation that spawned this resource operation history, if appropriate
            // note: enabled operation execution/schedules from left-nav, if it doesn't already exist

            updateSubTab(this.operationsTab, this.operationsSchedules, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return viewWithoutHeader(new ResourceOperationScheduleListView(resourceComposite));
                }
            });

            updateSubTab(this.operationsTab, this.operationsHistory, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new ResourceOperationHistoryListView(resourceComposite);
                }
            });
View Full Code Here

    private void updateConfigurationTabContent(final ResourceComposite resourceComposite, final Resource resource,
        ResourcePermission resourcePermissions, Set<ResourceTypeFacet> facets) {
        if (updateTab(this.configurationTab, facets.contains(ResourceTypeFacet.CONFIGURATION),
            resourcePermissions.isConfigureRead())) {

            updateSubTab(this.configurationTab, this.configCurrent, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new ResourceConfigurationEditView(resourceComposite);
                }
            });

            updateSubTab(this.configurationTab, this.configHistory, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                      return viewWithoutHeader(new ResourceConfigurationHistoryListView(resourceComposite.getResourcePermission()
                        .isConfigureWrite(), resource.getId()));
                }
View Full Code Here

    }

    private void updateDriftTabContent(final ResourceComposite resourceComposite, Set<ResourceTypeFacet> facets) {
        if (updateTab(this.driftTab, facets.contains(ResourceTypeFacet.DRIFT), true)) {

            updateSubTab(this.driftTab, this.driftDefinitions, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return viewWithoutHeader (ResourceDriftDefinitionsView.get(resourceComposite));
                }
            });
View Full Code Here

    }

    private void updateContentTabContent(final Resource resource, Set<ResourceTypeFacet> facets) {
        if (updateTab(this.contentTab, facets.contains(ResourceTypeFacet.CONTENT), true)) {

            updateSubTab(this.contentTab, this.contentDeployed, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new FullHTMLPane("/portal/rhq/resource/content/view-plain.xhtml?id=" + resource.getId());
                }
            });

            updateSubTab(this.contentTab, this.contentNew, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new FullHTMLPane("/portal/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId());
                }
            });

            updateSubTab(this.contentTab, this.contentSubscrip, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new FullHTMLPane("/portal/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId());
                }
            });

            updateSubTab(this.contentTab, this.contentHistory, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new FullHTMLPane("/portal/rhq/resource/content/history-plain.xhtml?id=" + resource.getId());
                }
            });
View Full Code Here

        }
    }

    private void updateSummaryTab() {
        // Summary tab is always visible and enabled.
        updateSubTab(this.summaryTab, this.summaryActivity, true, true, new ViewFactory() {
            @Override
            public Canvas createView() {
                return new ActivityView(groupComposite, isAutoCluster(), isAutoGroup());
            }
        });
View Full Code Here

            }
        });
    }

    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()));
                }
            };
View Full Code Here

    private void updateInventoryTab(Set<ResourceTypeFacet> facets) {
        // Inventory tab is always visible and enabled.
        final boolean canModifyMembers = (!isDynaGroup() && !isAutoGroup() && !isAutoCluster() && globalPermissions
            .contains(Permission.MANAGE_INVENTORY));

        updateSubTab(this.inventoryTab, this.inventoryMembers, true, true, new ViewFactory() {
            @Override
            public Canvas createView() {
                return viewWithoutHeader(new MembersView(groupComposite.getResourceGroup().getId(), canModifyMembers));
            }
        });
        updateSubTab(this.inventoryTab, this.inventoryConn, facets.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION),
            true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new GroupPluginConfigurationEditView(groupComposite);
                }
            });
        updateSubTab(this.inventoryTab, this.inventoryConnHistory,
            facets.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION), true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new HistoryGroupPluginConfigurationView(groupComposite);
                }
            });
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.components.view.ViewFactory

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.