Examples of AlertScanNode


Examples of com.subgraph.vega.ui.scanner.alerts.tree.AlertScanNode

 
  private void handleRemoveScanInstance(RemoveScanInstanceEvent event) {
    if(tree != null && !event.getScanInstance().isActive()) {
      tree.removeScan(event.getScanInstance());
      refreshViewer();
      final AlertScanNode scanNode = chooseScanNode();
      if(scanNode != null) {
        viewer.setSelection(new StructuredSelection(scanNode));
      }
    }
  }
View Full Code Here

Examples of com.subgraph.vega.ui.scanner.alerts.tree.AlertScanNode

 
  private void addActiveScan(IScanInstance scan) {
    if(scan != null) {
      lastStatusMap.put(scan.getScanId(), -1);
      scan.addScanEventListenerAndPopulate(this);
      AlertScanNode scanNode = tree.addScan(scan);
      viewer.refresh();
      viewer.setSelection(new StructuredSelection(scanNode));
    }
  }
View Full Code Here

Examples of com.subgraph.vega.ui.scanner.alerts.tree.AlertScanNode

    if (lastStatus != status) {
      final long scanId = event.getScanInstance().getScanId()
      lastStatusMap.put(scanId, status);
      if (scanId != IScanAlertRepository.PROXY_ALERT_ORIGIN_SCAN_ID) {
        if (event.getScanInstance().isActive() == true) {
          final AlertScanNode scanNode = tree.getScanNode(event.getScanInstance().getScanId());
          synchronized(this) {
            if (!activeList.contains(scanNode)) {
              activeList.add(scanNode);
              if (activeList.size() == 1) {
                blinkTimer.scheduleAtFixedRate(createBlinkTask(), 0, BLINK_INTERVAL);
View Full Code Here

Examples of com.subgraph.vega.ui.scanner.alerts.tree.AlertScanNode

  }
 
  @Override
  public Image getImage(Object element) {
    if(element instanceof AlertScanNode) {
      final AlertScanNode node = (AlertScanNode) element;
      if (node.getScanInstance().isActive()) {
        final boolean activeBlinkState = contentProvider.isBlinkStateActive();
        if(activeBlinkState) {
          return imageCache.get(node.getImage());
        } else {
          return imageCache.getDisabled(node.getImage());
        }
      } else {
        return imageCache.get(node.getImage());
      }
    } else if(element instanceof IAlertTreeNode) {
      final String imageKey = ((IAlertTreeNode) element).getImage();
      if(imageKey != null) {
        return imageCache.get(imageKey);
View Full Code Here

Examples of com.subgraph.vega.ui.scanner.alerts.tree.AlertScanNode

        Object o = ((IStructuredSelection)selection).getFirstElement();
        if(o instanceof IScanAlert) {   
          IScanAlert alert = (IScanAlert) o;
          displayAlert(alert);
        } else if (o instanceof AlertScanNode) {
          final AlertScanNode node = (AlertScanNode) o;
          displayScanSummary(node.getScanInstance());
        } else if (o instanceof AlertTitleNode) {
          final AlertTitleNode node = (AlertTitleNode) o;
          if(node.getAlertCount() == 1) {
            displayAlert(node.getFirstAlert());
          }
        }
      }
    });
   
    stackLayout.topControl = dashboard;
    contentPanel.layout();
   
    final IModel model = Activator.getDefault().getModel();
    if(model != null) {
      setCurrentWorkspace(model.addWorkspaceListener(this));
    }
    IStructuredSelection selection = (IStructuredSelection) getSite().getPage().getSelection(ScanAlertView.ID);
    if(selection != null && selection.getFirstElement() instanceof AlertScanNode) {
      AlertScanNode node = (AlertScanNode) selection.getFirstElement();
      displayScanSummary(node.getScanInstance());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.