Package io.fabric8.utils

Examples of io.fabric8.utils.TablePrinter.columns()


        return null;
    }

    private void printContainers(Container[] containers, Version version, PrintStream out) {
        TablePrinter table = new TablePrinter();
        table.columns("id", "version", "type", "connected", "profiles", "provision status");
        for (Container container : containers) {
            if (CommandUtils.matchVersion(container, version)) {
                String indent = "";
                for (Container c = container; !c.isRoot(); c = c.getParent()) {
                    indent+="  ";
View Full Code Here


        return container.isAlive() ? "yes" : "";
    }

    private void printContainersVerbose(Container[] containers, Version version, PrintStream out) {
        TablePrinter table = new TablePrinter();
        table.columns("id", "version", "type", "connected", "profiles", "blueprint", "spring", "provision status");
        for (Container container : containers) {
            if (CommandUtils.matchVersion(container, version)) {
                String indent = "";
                for (Container c = container; !c.isRoot(); c = c.getParent()) {
                    indent += "  ";
View Full Code Here

        }

        if (list) {
            // list the watched bundles.
            TablePrinter printer = new TablePrinter();
            printer.columns("url", "profile", "version", "bundle");
            for (String url : watcher.getWatchURLs()) {
                Map<ProfileVersionKey, Map<String, Parser>> profileArtifacts = watcher.getProfileArtifacts();
                if (profileArtifacts.size() > 0) {
                    Set<Map.Entry<ProfileVersionKey, Map<String, Parser>>> entries = profileArtifacts.entrySet();
                    for (Map.Entry<ProfileVersionKey, Map<String, Parser>> entry : entries) {
View Full Code Here

    }

    @Override
    protected void printRequirements(PrintStream out, FabricRequirements requirements) {
        TablePrinter table = new TablePrinter();
        table.columns("profile", "# minimum", "# maximum", "depends on");
        List<ProfileRequirements> profileRequirements = requirements.getProfileRequirements();
        for (ProfileRequirements profile : profileRequirements) {
            table.row(profile.getProfile(),
                    getStringOrBlank(profile.getMinimumInstances()),
                    getStringOrBlank(profile.getMaximumInstances()),
View Full Code Here

        return null;
    }

    protected void printProfiles(ProfileService profileService, List<Profile> profiles, PrintStream out) {
        TablePrinter table = new TablePrinter();
        table.columns("id", "# containers", "parents");
        for (Profile profile : profiles) {
          String versionId = profile.getVersion();
          String profileId = profile.getId();
            // skip profiles that do not exists (they may have been deleted)
            if (profileService.hasProfile(versionId, profileId) && (hidden || !profile.isHidden())) {
View Full Code Here

    }

    protected void printInstallations(List<Installation> installations, PrintStream out) {
        TablePrinter printer = new TablePrinter();
        if (verbose) {
            printer.columns("id", "pid", "connected", "type", "directory");
        } else {
            printer.columns("id", "pid", "connected", "type");
        }

        for (Installation installation : installations) {
View Full Code Here

    protected void printInstallations(List<Installation> installations, PrintStream out) {
        TablePrinter printer = new TablePrinter();
        if (verbose) {
            printer.columns("id", "pid", "connected", "type", "directory");
        } else {
            printer.columns("id", "pid", "connected", "type");
        }

        for (Installation installation : installations) {

            String id = installation.getId();
View Full Code Here

        printEnvironment(installation, System.out);
    }

    protected void printEnvironment(Installation installation, PrintStream out) {
        TablePrinter printer = new TablePrinter();
        printer.columns("variable", "value");

        for (String variable : installation.getEnvironment().keySet()) {
            String value = installation.getEnvironment().get(variable);
            printer.row(variable, value);
        }
View Full Code Here

        printInstallations(installations, System.out);
    }

    protected void printInstallations(List<Installation> installations, PrintStream out) {
        TablePrinter printer = new TablePrinter();
        printer.columns("id", "pid", "name");

        for (Installation installation : installations) {
            String id = installation.getId();
            String pid = "";
            try {
View Full Code Here

        return null;
    }

    private void printContainers(PodListSchema pods, PrintStream out) {
        TablePrinter table = new TablePrinter();
        table.columns("id", "image(s)", "host", "labels", "status");
        List<PodSchema> items = pods.getItems();
        if (items == null) {
            items = Collections.EMPTY_LIST;
        }
        Filter<PodSchema> filter = KubernetesHelpers.createPodFilter(filterText);
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.