Package io.fabric8.process.manager.support

Examples of io.fabric8.process.manager.support.DefaultProcessControllerTest


   * @see org.eclipse.jface.viewers.StyledCellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell)
   */
  @Override
  public void update(ViewerCell cell) {
    Object element = cell.getElement();
    LogEvent log = LogViewTabSection.toLogEvent(element);
    if (log != null) {
      String className = log.getClassName();
      // we don't want to display ? as location
      if (className.trim().equals("?"))
        className = null;
      if (className != null) {
        Styler style = null;
        StyledString styledString = new StyledString(className, style);
        String fileName = log.getFileName();
        if (fileName != null) {
          styledString.append(fileName, StyledString.COUNTER_STYLER);
        }
        cell.setText(styledString.toString());
        cell.setStyleRanges(styledString.getStyleRanges());
View Full Code Here


          Long seq = JsonHelper.getAsLong(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_SEQ);
          String threadName = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_THREAD);
          Date eventTimestamp = new Date(JsonHelper.getAsLong(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_TIMESTAMP));
          Map<String, String> propertiesMap = JsonHelper.getAsPropertiesMap(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_PROPERTIES);
         
          LogEvent event = new LogEvent();
          event.setClassName(className);
          event.setContainerName(container);
          event.setException(exception);
          event.setFileName(fileName);
          event.setHost(Strings.isBlank(eventhost) ? host : eventhost);
          event.setLevel(logLevel);
          event.setLineNumber(lineNo);
          event.setLogger(logger);
          event.setMessage(logMessage);
          event.setMethodName(methodName);
          event.setSeq(seq);
          event.setThread(threadName);
          event.setTimestamp(eventTimestamp);
          event.setProperties(propertiesMap);
         
          res.addEvent(event);
        }
       
        return res.getEvents();
View Full Code Here

        final ModelNode rootNode = JsonHelper.getModelNode(json);
        final String host = JsonHelper.getAsString(rootNode, IFabric8JsonConstants.PROPERTY_LOGRESULTS_HOST);
        final Long from = JsonHelper.getAsLong(rootNode, IFabric8JsonConstants.PROPERTY_LOGRESULTS_FROM);
        final Long to = JsonHelper.getAsLong(rootNode, IFabric8JsonConstants.PROPERTY_LOGRESULTS_TO);
       
        LogResults res = new LogResults();
        res.setHost(host);
        res.setFromTimestamp(from);
        res.setToTimestamp(to);
       
        final List<ModelNode> events = JsonHelper.getAsList(rootNode, IFabric8JsonConstants.PROPERTY_LOGRESULTS_EVENTS);
        for (ModelNode ev : events) {
          String className = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_CLASS);
          String container = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_CONTAINER);
          String[] exception = JsonHelper.getAsStringArray(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_EXCEPTION);
          String fileName = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_FILE);
          String eventhost = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_HOST);
          String logLevel = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_LOGLEVEL);
          String lineNo = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_LINE);
          String logger = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_LOGGER);
          String logMessage = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_MESSAGE);
          String methodName = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_METHOD);
          Long seq = JsonHelper.getAsLong(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_SEQ);
          String threadName = JsonHelper.getAsString(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_THREAD);
          Date eventTimestamp = new Date(JsonHelper.getAsLong(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_TIMESTAMP));
          Map<String, String> propertiesMap = JsonHelper.getAsPropertiesMap(ev, IFabric8JsonConstants.PROPERTY_LOGEVENT_PROPERTIES);
         
          LogEvent event = new LogEvent();
          event.setClassName(className);
          event.setContainerName(container);
          event.setException(exception);
          event.setFileName(fileName);
          event.setHost(Strings.isBlank(eventhost) ? host : eventhost);
          event.setLevel(logLevel);
          event.setLineNumber(lineNo);
          event.setLogger(logger);
          event.setMessage(logMessage);
          event.setMethodName(methodName);
          event.setSeq(seq);
          event.setThread(threadName);
          event.setTimestamp(eventTimestamp);
          event.setProperties(propertiesMap);
         
          res.addEvent(event);
        }
       
        return res.getEvents();
      }
    });
  }
View Full Code Here

            Fabric8JMXPlugin.getLogger().warning(ex);
          return null;
        }
        final Set<ObjectName> queryNames = connection.queryNames(insightObjectName, null);
        for (ObjectName insightObjectName : queryNames) {
          LogQuerySupportMBean logQuerySupportMBean = MBeanServerInvocationHandler.newProxyInstance(connection, insightObjectName, LogQuerySupportMBean.class, true);
          return callback.doWithLogQuerySupportMBean(logQuerySupportMBean);
        }
        return null;
      }
    });
View Full Code Here

        indexer.setCacheDirectory(new File(targetDir(), "mavenIndexer"));
        indexer.start();

        List<Repository> repos = Aether.defaultRepositories();
        repos.add(new Repository("ea.repository.jboss.org", "http://repository.jboss.org/nexus/content/groups/ea"));
        aether = new Aether(Aether.USER_REPOSITORY, repos);
    }
View Full Code Here

        this.xsdDir = xsdDir;
    }

    protected void downloadArtifact(ArtifactDTO artifact, String version) {
        try {
            AetherResult result = aether.resolve(artifact.getGroupId(), artifact.getArtifactId(), version, "jar", null);
            if (result != null) {
                List<File> files = result.getResolvedFiles();
                if (files != null && files.size() > 0) {
                    File file = files.get(0);
                    //for (File file : files) {
                    File newFile = new File(archetypeDir, file.getName());
                    FileInputStream input = new FileInputStream(file);
View Full Code Here

        }
    }

    protected String[] downloadProperties(ArtifactDTO artifact, String version) {
        try {
            AetherResult result = aether.resolve(artifact.getGroupId(), artifact.getArtifactId(), version, "properties", "camelComponent");
            if (result != null) {
                List<File> files = result.getResolvedFiles();
                if (files != null && files.size() > 0) {
                    File file = files.get(0);
                    Properties p = new Properties();
                    p.load(new FileInputStream(file));
                    String comps = p.getProperty("components", "");
View Full Code Here

        indexer.setRepositories(repositories);
        indexer.setCacheDirectory(new File(targetDir(), "mavenIndexer"));
        indexer.start();

        List<Repository> repos = Aether.defaultRepositories();
        repos.add(new Repository("ea.repository.jboss.org", "http://repository.jboss.org/nexus/content/groups/ea"));
        aether = new Aether(Aether.USER_REPOSITORY, repos);
    }
View Full Code Here

    }

    @Override
    public Result execute(UIExecutionContext context) throws Exception {
        File applyFile = file.getValue();
        Controller controller = new Controller(getKubernetes());
        controller.applyJson(applyFile);
        return null;
    }
View Full Code Here

        builder.add(filterText);
    }

    @Override
    public Result execute(UIExecutionContext uiExecutionContext) throws Exception {
        Kubernetes kubernetes = getKubernetes();
        PodListSchema pods = kubernetes.getPods();
        KubernetesHelper.removeEmptyPods(pods);
        TablePrinter table = podsAsTable(pods);
        return tableResults(table);
    }
View Full Code Here

TOP

Related Classes of io.fabric8.process.manager.support.DefaultProcessControllerTest

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.