Search in sources :

Example 6 with GraphContainer

use of org.opennms.features.topology.api.GraphContainer in project opennms by OpenNMS.

the class TopologyContextMenu method addNavigateToItems.

// adds menu items for the "navigate to" operation
private static void addNavigateToItems(MenuBuilder menuBuilder, List<VertexRef> targets, OperationContext operationContext) {
    if (!targets.isEmpty()) {
        menuBuilder.createPath("Navigate To");
        final GraphContainer graphContainer = operationContext.getGraphContainer();
        // Find the vertices in other graphs that this vertex links to
        final Collection<VertexRef> oppositeVertices = graphContainer.getTopologyServiceClient().getOppositeVertices(targets.get(0));
        // Find all namespaces
        final Set<String> targetNamespaces = oppositeVertices.stream().map(v -> v.getNamespace()).collect(Collectors.toSet());
        // Find provider for namespaces and add menu entry
        for (String eachTargetNamespace : targetNamespaces) {
            // Find the graph provider for the target namespace
            final GraphProvider targetGraphProvider = graphContainer.getTopologyServiceClient().getGraphProviders().stream().filter(g -> g.getNamespace().equals(eachTargetNamespace)).findFirst().orElse(null);
            if (targetGraphProvider == null) {
                LOG.warn("No graph provider found for namespace '{}'.", eachTargetNamespace);
                continue;
            }
            NavigationMenuItem item = new NavigationMenuItem(targetGraphProvider, targets.get(0));
            menuBuilder.addMenuItem(item, "Navigate To");
        }
    }
}
Also used : GraphContainer(org.opennms.features.topology.api.GraphContainer) GraphContainer(org.opennms.features.topology.api.GraphContainer) Logger(org.slf4j.Logger) ContextMenu(org.vaadin.peter.contextmenu.ContextMenu) MenuBar(com.vaadin.ui.MenuBar) Collection(java.util.Collection) LoggerFactory(org.slf4j.LoggerFactory) UI(com.vaadin.ui.UI) Set(java.util.Set) ContextMenuState(org.vaadin.peter.contextmenu.client.ContextMenuState) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) List(java.util.List) DefaultOperationContext(org.opennms.features.topology.app.internal.DefaultOperationContext) OperationContext(org.opennms.features.topology.api.OperationContext) VertexRef(org.opennms.features.topology.api.topo.VertexRef) Collections(java.util.Collections) GraphProvider(org.opennms.features.topology.api.topo.GraphProvider) GraphProvider(org.opennms.features.topology.api.topo.GraphProvider) VertexRef(org.opennms.features.topology.api.topo.VertexRef)

Example 7 with GraphContainer

use of org.opennms.features.topology.api.GraphContainer in project opennms by OpenNMS.

the class TopologyUI method init.

@Override
protected void init(final VaadinRequest request) {
    // Register a cleanup
    request.getService().addSessionDestroyListener((SessionDestroyListener) event -> m_widgetManager.removeUpdateListener(TopologyUI.this));
    try {
        m_headerHtml = getHeader(((VaadinServletRequest) request).getHttpServletRequest());
    } catch (final Exception e) {
        LOG.error("failed to get header HTML for request " + request.getPathInfo(), e.getCause());
    }
    //create VaadinApplicationContext
    m_applicationContext = m_serviceManager.createApplicationContext(new VaadinApplicationContextCreator() {

        @Override
        public VaadinApplicationContext create(OnmsServiceManager manager) {
            VaadinApplicationContextImpl context = new VaadinApplicationContextImpl();
            context.setSessionId(request.getWrappedSession().getId());
            context.setUiId(getUIId());
            context.setUsername(request.getRemoteUser());
            return context;
        }
    });
    m_verticesUpdateManager = new OsgiVerticesUpdateManager(m_serviceManager, m_applicationContext);
    m_serviceManager.getEventRegistry().addPossibleEventConsumer(this, m_applicationContext);
    // Set the algorithm last so that the criteria and SZLs are
    // in place before we run the layout algorithm.
    m_graphContainer.setApplicationContext(m_applicationContext);
    createLayouts();
    // Set up an error handler for UI-level exceptions
    setupErrorHandler();
    // Add an auto refresh handler to the GraphContainer
    setupAutoRefresher();
    loadUserSettings();
    // If no Topology Provider was selected (due to loadUserSettings(), fallback to default
    if (Strings.isNullOrEmpty(m_graphContainer.getMetaTopologyId())) {
        CheckedOperation defaultTopologySelectorOperation = getDefaultTopologySelectorOperation(m_bundlecontext);
        // no default found, abort
        Objects.requireNonNull(defaultTopologySelectorOperation, "No default GraphProvider found.");
        defaultTopologySelectorOperation.execute(Lists.newArrayList(), new DefaultOperationContext(TopologyUI.this, m_graphContainer, DisplayLocation.MENUBAR));
    }
    // Add a request handler that parses incoming focusNode and szl query parameters
    TopologyUIRequestHandler handler = new TopologyUIRequestHandler();
    getSession().addRequestHandler(handler);
    // deal with those in init case
    handler.handleRequestParameter(request);
    // Add the default criteria if we do not have already a criteria set
    if (getWrappedVertexHopCriteria(m_graphContainer).isEmpty() && noAdditionalFocusCriteria()) {
        List<Criteria> defaultCriteriaList = m_graphContainer.getTopologyServiceClient().getDefaults().getCriteria();
        if (defaultCriteriaList != null) {
            // set default
            defaultCriteriaList.forEach(eachCriteria -> m_graphContainer.addCriteria(eachCriteria));
        }
    }
    // We set the listeners at the end, to not fire them all the time when initializing the UI
    setupListeners();
    // We force a reload to trigger a fireGraphChanged()
    m_graphContainer.setDirty(true);
    m_graphContainer.redoLayout();
    // Trigger a selectionChanged
    m_selectionManager.selectionChanged(m_selectionManager);
}
Also used : HasExtraComponents(org.opennms.features.topology.api.HasExtraComponents) VerticalSplitPanel(com.vaadin.ui.VerticalSplitPanel) Alignment(com.vaadin.ui.Alignment) SelectionAwareTable(org.opennms.features.topology.api.browsers.SelectionAwareTable) SearchBox(org.opennms.features.topology.app.internal.ui.SearchBox) VertexHopGraphProvider.getWrappedVertexHopCriteria(org.opennms.features.topology.api.support.VertexHopGraphProvider.getWrappedVertexHopCriteria) CategoryHopCriteria(org.opennms.features.topology.app.internal.support.CategoryHopCriteria) Map(java.util.Map) ServiceReference(org.osgi.framework.ServiceReference) RedoLayoutOperation(org.opennms.features.topology.app.internal.operations.RedoLayoutOperation) VaadinResponse(com.vaadin.server.VaadinResponse) Property(com.vaadin.data.Property) HistoryManager(org.opennms.features.topology.api.HistoryManager) Set(java.util.Set) AbsoluteLayout(com.vaadin.ui.AbsoluteLayout) IconRepositoryManager(org.opennms.features.topology.app.internal.support.IconRepositoryManager) Criteria(org.opennms.features.topology.api.topo.Criteria) VaadinApplicationContextImpl(org.opennms.osgi.VaadinApplicationContextImpl) VertexRef(org.opennms.features.topology.api.topo.VertexRef) MenuUpdateListener(org.opennms.features.topology.app.internal.menu.MenuUpdateListener) DefaultErrorHandler(com.vaadin.server.DefaultErrorHandler) UriFragmentChangedListener(com.vaadin.server.Page.UriFragmentChangedListener) Title(com.vaadin.annotations.Title) VerticalLayout(com.vaadin.ui.VerticalLayout) TreeSet(java.util.TreeSet) VertexHopGraphProvider(org.opennms.features.topology.api.support.VertexHopGraphProvider) VertexUpdateListener(org.opennms.features.topology.app.internal.TopologyComponent.VertexUpdateListener) DefaultTopologyProviderInfo(org.opennms.features.topology.api.topo.DefaultTopologyProviderInfo) Strings(com.google.common.base.Strings) HttpServletRequest(javax.servlet.http.HttpServletRequest) Lists(com.google.common.collect.Lists) VaadinApplicationContextCreator(org.opennms.osgi.VaadinApplicationContextCreator) TopologyMenuBar(org.opennms.features.topology.app.internal.menu.TopologyMenuBar) OnmsHeaderProvider(org.opennms.web.api.OnmsHeaderProvider) InfoPanelItem(org.opennms.features.topology.api.info.item.InfoPanelItem) IOException(java.io.IOException) PreserveOnRefresh(com.vaadin.annotations.PreserveOnRefresh) Refresher(com.github.wolfie.refresher.Refresher) LayoutHintComponent(org.opennms.features.topology.app.internal.ui.LayoutHintComponent) HorizontalLayout(com.vaadin.ui.HorizontalLayout) TopologyProviderInfo(org.opennms.features.topology.api.topo.TopologyProviderInfo) InfoPanelItemProvider(org.opennms.features.topology.api.info.InfoPanelItemProvider) OperationManager(org.opennms.features.topology.app.internal.menu.OperationManager) ContentType(org.opennms.features.topology.api.browsers.ContentType) EventConsumer(org.opennms.osgi.EventConsumer) GraphContainer(org.opennms.features.topology.api.GraphContainer) ConfirmationDialog(org.opennms.netmgt.vaadin.core.ConfirmationDialog) RequestHandler(com.vaadin.server.RequestHandler) ToolbarPanel(org.opennms.features.topology.app.internal.ui.ToolbarPanel) LoggerFactory(org.slf4j.LoggerFactory) UI(com.vaadin.ui.UI) CheckedOperation(org.opennms.features.topology.api.CheckedOperation) Window(com.vaadin.ui.Window) VaadinRequest(com.vaadin.server.VaadinRequest) ByteArrayInputStream(java.io.ByteArrayInputStream) DefaultInfoPanelItem(org.opennms.features.topology.api.info.item.DefaultInfoPanelItem) SelectionListener(org.opennms.features.topology.api.SelectionListener) VaadinApplicationContext(org.opennms.osgi.VaadinApplicationContext) InvalidSyntaxException(org.osgi.framework.InvalidSyntaxException) Collection(java.util.Collection) OnmsServiceManager(org.opennms.osgi.OnmsServiceManager) Collectors(java.util.stream.Collectors) BundleContext(org.osgi.framework.BundleContext) Objects(java.util.Objects) List(java.util.List) Theme(com.vaadin.annotations.Theme) HudDisplay(org.opennms.features.topology.app.internal.ui.HudDisplay) TabSheet(com.vaadin.ui.TabSheet) TransactionOperations(org.springframework.transaction.support.TransactionOperations) VertexHopCriteria(org.opennms.features.topology.api.support.VertexHopGraphProvider.VertexHopCriteria) TopologyContextMenu(org.opennms.features.topology.app.internal.menu.TopologyContextMenu) Optional(java.util.Optional) WidgetUpdateListener(org.opennms.features.topology.api.WidgetUpdateListener) IViewContribution(org.opennms.features.topology.api.IViewContribution) SessionDestroyListener(com.vaadin.server.SessionDestroyListener) VerticesUpdateManager(org.opennms.features.topology.api.VerticesUpdateManager) WidgetManager(org.opennms.features.topology.api.WidgetManager) LayoutManager(org.opennms.features.topology.app.internal.support.LayoutManager) TopologyLinkBuilder(org.opennms.features.topology.link.TopologyLinkBuilder) SelectionContext(org.opennms.features.topology.api.SelectionContext) Vertex(org.opennms.features.topology.api.topo.Vertex) MapViewManager(org.opennms.features.topology.api.MapViewManager) BreadcrumbComponent(org.opennms.features.topology.app.internal.ui.breadcrumbs.BreadcrumbComponent) CustomLayout(com.vaadin.ui.CustomLayout) SelectionNotifier(org.opennms.features.topology.api.SelectionNotifier) OnmsServiceManagerLocator(org.opennms.osgi.locator.OnmsServiceManagerLocator) Notification(com.vaadin.ui.Notification) Label(com.vaadin.ui.Label) WidgetContext(org.opennms.features.topology.api.WidgetContext) Logger(org.slf4j.Logger) SelectedTabChangeEvent(com.vaadin.ui.TabSheet.SelectedTabChangeEvent) DisplayLocation(org.opennms.features.topology.api.OperationContext.DisplayLocation) MapViewManagerListener(org.opennms.features.topology.api.MapViewManagerListener) InfoPanel(org.opennms.features.topology.app.internal.ui.InfoPanel) VaadinServletRequest(com.vaadin.server.VaadinServletRequest) SelectedTabChangeListener(com.vaadin.ui.TabSheet.SelectedTabChangeListener) UriFragmentChangedEvent(com.vaadin.server.Page.UriFragmentChangedEvent) VaadinSession(com.vaadin.server.VaadinSession) OperationContext(org.opennms.features.topology.api.OperationContext) ToolbarPanelController(org.opennms.features.topology.app.internal.ui.ToolbarPanelController) SelectionManager(org.opennms.features.topology.api.SelectionManager) NoSuchProviderException(org.opennms.features.topology.app.internal.service.NoSuchProviderException) NoContentAvailableWindow(org.opennms.features.topology.app.internal.ui.NoContentAvailableWindow) StyleSheet(com.vaadin.annotations.StyleSheet) Collections(java.util.Collections) InputStream(java.io.InputStream) Component(com.vaadin.ui.Component) OnmsServiceManager(org.opennms.osgi.OnmsServiceManager) VaadinApplicationContextCreator(org.opennms.osgi.VaadinApplicationContextCreator) VaadinApplicationContextImpl(org.opennms.osgi.VaadinApplicationContextImpl) CheckedOperation(org.opennms.features.topology.api.CheckedOperation) VaadinServletRequest(com.vaadin.server.VaadinServletRequest) VertexHopGraphProvider.getWrappedVertexHopCriteria(org.opennms.features.topology.api.support.VertexHopGraphProvider.getWrappedVertexHopCriteria) CategoryHopCriteria(org.opennms.features.topology.app.internal.support.CategoryHopCriteria) Criteria(org.opennms.features.topology.api.topo.Criteria) VertexHopCriteria(org.opennms.features.topology.api.support.VertexHopGraphProvider.VertexHopCriteria) IOException(java.io.IOException) InvalidSyntaxException(org.osgi.framework.InvalidSyntaxException) NoSuchProviderException(org.opennms.features.topology.app.internal.service.NoSuchProviderException)

Example 8 with GraphContainer

use of org.opennms.features.topology.api.GraphContainer in project opennms by OpenNMS.

the class BusinessServiceVertexInfoPanelItemProvider method createComponent.

private Component createComponent(AbstractBusinessServiceVertex ref, GraphContainer graphContainer) {
    final FormLayout formLayout = new FormLayout();
    formLayout.setSpacing(false);
    formLayout.setMargin(false);
    ref.accept(new BusinessServiceVertexVisitor<Void>() {

        @Override
        public Void visit(BusinessServiceVertex vertex) {
            final BusinessService businessService = businessServiceManager.getBusinessServiceById(vertex.getServiceId());
            formLayout.addComponent(createLabel("Reduce function", getReduceFunctionDescription(businessService.getReduceFunction())));
            // Apply Reduce Function specific details
            businessService.getReduceFunction().accept(new ReduceFunctionVisitor<Void>() {

                @Override
                public Void visit(HighestSeverity highestSeverity) {
                    return null;
                }

                @Override
                public Void visit(HighestSeverityAbove highestSeverityAbove) {
                    return null;
                }

                @Override
                public // Threshold is not very transparent, we add an Explain Button in these cases
                Void visit(Threshold threshold) {
                    final Button explainButton = createButton("Explain", "Explain the Threshold function", FontAwesome.TABLE, (Button.ClickListener) event -> {
                        ThresholdExplanationWindow explainWindow = new ThresholdExplanationWindow(SimulationAwareStateMachineFactory.createSimulatedStateMachine(businessServiceManager, graphContainer.getCriteria()).explain(businessService, (Threshold) businessService.getReduceFunction()));
                        UI.getCurrent().addWindow(explainWindow);
                    });
                    explainButton.setStyleName(BaseTheme.BUTTON_LINK);
                    formLayout.addComponent(explainButton);
                    return null;
                }

                @Override
                public Void visit(ExponentialPropagation exponentialPropagation) {
                    return null;
                }
            });
            return null;
        }

        @Override
        public Void visit(IpServiceVertex vertex) {
            IpService ipService = businessServiceManager.getIpServiceById(vertex.getIpServiceId());
            formLayout.addComponent(createLabel("Interface", ipService.getIpAddress()));
            formLayout.addComponent(createLabel("Service", ipService.getServiceName()));
            if (!ipService.getServiceName().equals(vertex.getLabel())) {
                formLayout.addComponent(createLabel("Friendly Name", vertex.getLabel()));
            }
            return null;
        }

        @Override
        public Void visit(ReductionKeyVertex vertex) {
            formLayout.addComponent(createLabel("Reduction Key", vertex.getReductionKey()));
            if (!vertex.getReductionKey().equals(vertex.getLabel())) {
                formLayout.addComponent(createLabel("Friendly Name", vertex.getLabel()));
            }
            return null;
        }
    });
    return formLayout;
}
Also used : FormLayout(com.vaadin.ui.FormLayout) GraphContainer(org.opennms.features.topology.api.GraphContainer) AbstractBusinessServiceVertex(org.opennms.features.topology.plugins.topo.bsm.AbstractBusinessServiceVertex) IpService(org.opennms.netmgt.bsm.service.model.IpService) BaseTheme(com.vaadin.ui.themes.BaseTheme) VerticalLayout(com.vaadin.ui.VerticalLayout) Threshold(org.opennms.netmgt.bsm.service.model.functions.reduce.Threshold) UI(com.vaadin.ui.UI) BusinessServiceManager(org.opennms.netmgt.bsm.service.BusinessServiceManager) HighestSeverityAbove(org.opennms.netmgt.bsm.service.model.functions.reduce.HighestSeverityAbove) Window(com.vaadin.ui.Window) BusinessService(org.opennms.netmgt.bsm.service.model.BusinessService) BusinessServiceVertexVisitor(org.opennms.features.topology.plugins.topo.bsm.BusinessServiceVertexVisitor) Strings(com.google.common.base.Strings) FontAwesome(com.vaadin.server.FontAwesome) GraphVertexToTopologyVertexConverter(org.opennms.features.topology.plugins.topo.bsm.GraphVertexToTopologyVertexConverter) VertexInfoPanelItemProvider(org.opennms.features.topology.api.info.VertexInfoPanelItemProvider) DefaultInfoPanelItem(org.opennms.features.topology.api.info.item.DefaultInfoPanelItem) ReductionFunction(org.opennms.netmgt.bsm.service.model.functions.reduce.ReductionFunction) Status(org.opennms.netmgt.bsm.service.model.Status) Label(com.vaadin.ui.Label) ShortcutAction(com.vaadin.event.ShortcutAction) Comparator.comparing(java.util.Comparator.comparing) UIHelper.createLabel(org.opennms.netmgt.vaadin.core.UIHelper.createLabel) BusinessServicesTopologyProvider(org.opennms.features.topology.plugins.topo.bsm.BusinessServicesTopologyProvider) ThresholdResultExplanation(org.opennms.netmgt.bsm.service.model.functions.reduce.ThresholdResultExplanation) InfoPanelItem(org.opennms.features.topology.api.info.item.InfoPanelItem) ExponentialPropagation(org.opennms.netmgt.bsm.service.model.functions.reduce.ExponentialPropagation) IpServiceVertex(org.opennms.features.topology.plugins.topo.bsm.IpServiceVertex) Collectors(java.util.stream.Collectors) Sizeable(com.vaadin.server.Sizeable) SimulationAwareStateMachineFactory(org.opennms.features.topology.plugins.topo.bsm.simulate.SimulationAwareStateMachineFactory) TransactionAwareBeanProxyFactory(org.opennms.netmgt.vaadin.core.TransactionAwareBeanProxyFactory) BusinessServiceVertexStatusInfoPanelItemProvider.createStatusLabel(org.opennms.features.topology.plugins.topo.bsm.info.BusinessServiceVertexStatusInfoPanelItemProvider.createStatusLabel) List(java.util.List) Button(com.vaadin.ui.Button) Table(com.vaadin.ui.Table) Edge(org.opennms.netmgt.bsm.service.model.edge.Edge) FormLayout(com.vaadin.ui.FormLayout) BusinessServiceVertex(org.opennms.features.topology.plugins.topo.bsm.BusinessServiceVertex) ReductionKeyVertex(org.opennms.features.topology.plugins.topo.bsm.ReductionKeyVertex) GraphEdge(org.opennms.netmgt.bsm.service.model.graph.GraphEdge) ReduceFunctionVisitor(org.opennms.netmgt.bsm.service.model.functions.reduce.ReduceFunctionVisitor) VertexRef(org.opennms.features.topology.api.topo.VertexRef) HighestSeverity(org.opennms.netmgt.bsm.service.model.functions.reduce.HighestSeverity) UIHelper.createButton(org.opennms.netmgt.vaadin.core.UIHelper.createButton) Component(com.vaadin.ui.Component) HighestSeverity(org.opennms.netmgt.bsm.service.model.functions.reduce.HighestSeverity) ReductionKeyVertex(org.opennms.features.topology.plugins.topo.bsm.ReductionKeyVertex) HighestSeverityAbove(org.opennms.netmgt.bsm.service.model.functions.reduce.HighestSeverityAbove) IpService(org.opennms.netmgt.bsm.service.model.IpService) IpServiceVertex(org.opennms.features.topology.plugins.topo.bsm.IpServiceVertex) BusinessService(org.opennms.netmgt.bsm.service.model.BusinessService) ReduceFunctionVisitor(org.opennms.netmgt.bsm.service.model.functions.reduce.ReduceFunctionVisitor) Button(com.vaadin.ui.Button) UIHelper.createButton(org.opennms.netmgt.vaadin.core.UIHelper.createButton) ExponentialPropagation(org.opennms.netmgt.bsm.service.model.functions.reduce.ExponentialPropagation) AbstractBusinessServiceVertex(org.opennms.features.topology.plugins.topo.bsm.AbstractBusinessServiceVertex) BusinessServiceVertex(org.opennms.features.topology.plugins.topo.bsm.BusinessServiceVertex) Threshold(org.opennms.netmgt.bsm.service.model.functions.reduce.Threshold)

Example 9 with GraphContainer

use of org.opennms.features.topology.api.GraphContainer in project opennms by OpenNMS.

the class GraphMLSearchProvider method onFocusSearchResult.

@Override
public void onFocusSearchResult(SearchResult searchResult, OperationContext operationContext) {
    final GraphContainer graphContainer = operationContext.getGraphContainer();
    final DefaultVertexRef vertexRef = new DefaultVertexRef(searchResult.getNamespace(), searchResult.getId(), searchResult.getLabel());
    if (graphContainer.getTopologyServiceClient().getVertex(vertexRef) == null) {
        // The vertex to add to focus is not in the current layer
        // Find the GraphProvider it belongs to
        Optional<GraphProvider> first = graphContainer.getTopologyServiceClient().getGraphProviders().stream().filter(eachProvider -> eachProvider.getNamespace().equals(searchResult.getNamespace())).findFirst();
        // If there is a graph provider (which should) select it
        if (first.isPresent() && first.get().getVertex(vertexRef) != null) {
            graphContainer.selectTopologyProvider(first.get());
            graphContainer.clearCriteria();
        }
    }
    super.onFocusSearchResult(searchResult, operationContext);
}
Also used : GraphContainer(org.opennms.features.topology.api.GraphContainer) Objects(java.util.Objects) GraphContainer(org.opennms.features.topology.api.GraphContainer) List(java.util.List) DefaultVertexRef(org.opennms.features.topology.api.topo.DefaultVertexRef) SearchResult(org.opennms.features.topology.api.topo.SearchResult) OperationContext(org.opennms.features.topology.api.OperationContext) SimpleSearchProvider(org.opennms.features.topology.api.topo.SimpleSearchProvider) Optional(java.util.Optional) SearchQuery(org.opennms.features.topology.api.topo.SearchQuery) VertexRef(org.opennms.features.topology.api.topo.VertexRef) ArrayList(java.util.ArrayList) GraphProvider(org.opennms.features.topology.api.topo.GraphProvider) DefaultVertexRef(org.opennms.features.topology.api.topo.DefaultVertexRef) GraphProvider(org.opennms.features.topology.api.topo.GraphProvider)

Example 10 with GraphContainer

use of org.opennms.features.topology.api.GraphContainer in project opennms by OpenNMS.

the class SimulationModeOperation method execute.

@Override
public void execute(List<VertexRef> targets, OperationContext operationContext) {
    final GraphContainer container = operationContext.getGraphContainer();
    if (isChecked(operationContext.getGraphContainer())) {
        container.removeCriteria(crit);
    } else {
        container.addCriteria(crit);
    }
    // Force a refresh to update the status
    container.redoLayout();
}
Also used : GraphContainer(org.opennms.features.topology.api.GraphContainer)

Aggregations

GraphContainer (org.opennms.features.topology.api.GraphContainer)20 VertexRef (org.opennms.features.topology.api.topo.VertexRef)11 List (java.util.List)7 Collectors (java.util.stream.Collectors)6 Collection (java.util.Collection)5 Collections (java.util.Collections)4 Objects (java.util.Objects)4 Vertex (org.opennms.features.topology.api.topo.Vertex)4 Strings (com.google.common.base.Strings)3 UI (com.vaadin.ui.UI)3 ArrayList (java.util.ArrayList)3 Set (java.util.Set)3 OperationContext (org.opennms.features.topology.api.OperationContext)3 DefaultInfoPanelItem (org.opennms.features.topology.api.info.item.DefaultInfoPanelItem)3 InfoPanelItem (org.opennms.features.topology.api.info.item.InfoPanelItem)3 WrappedVertexHopCriteria (org.opennms.features.topology.api.support.VertexHopGraphProvider.WrappedVertexHopCriteria)3 GraphProvider (org.opennms.features.topology.api.topo.GraphProvider)3 Lists (com.google.common.collect.Lists)2 Component (com.vaadin.ui.Component)2 Label (com.vaadin.ui.Label)2