Package io.fabric8.utils

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


        TablePrinter table = new TablePrinter();
        table.columns("cluster", "masters", "slaves", "services");

        for (String clusterName : clusters.keySet()) {
            Map<String, ClusterNode> nodes = clusters.get(clusterName);
            table.row(clusterName, "", "", "", "");
            for (String nodeName : nodes.keySet()) {
                ClusterNode node = nodes.get(nodeName);
                table.row("   " + nodeName,
                        printList(node.masters),
                        printList(node.slaves),
View Full Code Here


        for (String clusterName : clusters.keySet()) {
            Map<String, ClusterNode> nodes = clusters.get(clusterName);
            table.row(clusterName, "", "", "", "");
            for (String nodeName : nodes.keySet()) {
                ClusterNode node = nodes.get(nodeName);
                table.row("   " + nodeName,
                        printList(node.masters),
                        printList(node.slaves),
                        printList(node.services));
            }
        }
View Full Code Here

                if (container.getId().equals(fabricService.getCurrentContainer().getId())) {
                    marker = "*";
                }

                List<String> assignedProfiles = dataStore.getContainerProfiles(container.getId());
                table.row(indent + container.getId() + marker, container.getVersion().getId(), container.getType(),
                        aliveText(container), assignedProfiles.get(0), CommandUtils.status(container));

                // we want multiple profiles to be displayed on next lines
                for (int i = 1; i < assignedProfiles.size(); i++) {
                    table.row("", "", "", "", assignedProfiles.get(i), "");
View Full Code Here

                table.row(indent + container.getId() + marker, container.getVersion().getId(), container.getType(),
                        aliveText(container), assignedProfiles.get(0), CommandUtils.status(container));

                // we want multiple profiles to be displayed on next lines
                for (int i = 1; i < assignedProfiles.size(); i++) {
                    table.row("", "", "", "", assignedProfiles.get(i), "");
                }
            }
        }
        table.print();
    }
View Full Code Here

                String springStatus = dataStore.getContainerAttribute(container.getId(), DataStore.ContainerAttribute.SpringStatus, "", false, false);
                blueprintStatus = blueprintStatus.toLowerCase(Locale.ENGLISH);
                springStatus = springStatus.toLowerCase(Locale.ENGLISH);

                List<String> assignedProfiles = dataStore.getContainerProfiles(container.getId());
                table.row(indent + container.getId() + marker, container.getVersion().getId(), container.getType(),
                        aliveText(container), assignedProfiles.get(0), blueprintStatus, springStatus, CommandUtils.status(container));

                // we want multiple profiles to be displayed on next lines
                for (int i = 1; i < assignedProfiles.size(); i++) {
                    table.row("", "", "", "", assignedProfiles.get(i), "", "", "");
View Full Code Here

                table.row(indent + container.getId() + marker, container.getVersion().getId(), container.getType(),
                        aliveText(container), assignedProfiles.get(0), blueprintStatus, springStatus, CommandUtils.status(container));

                // we want multiple profiles to be displayed on next lines
                for (int i = 1; i < assignedProfiles.size(); i++) {
                    table.row("", "", "", "", assignedProfiles.get(i), "", "", "");
                }
            }
        }
        table.print();
View Full Code Here

                        Set<Map.Entry<String, Parser>> artifactMapEntries = artifactMap.entrySet();
                        for (Map.Entry<String, Parser> artifactMapEntry : artifactMapEntries) {
                            String location = artifactMapEntry.getKey();
                            Parser parser = artifactMapEntry.getValue();
                            if (isSnapshot(parser) || watcher.wildCardMatch(location, url)) {
                                printer.row(url, key.getProfileId(), key.getVersion(), location);
                            }
                        }
                    }
                } else {
                    printer.row(url, "", "", "");
View Full Code Here

                                printer.row(url, key.getProfileId(), key.getVersion(), location);
                            }
                        }
                    }
                } else {
                    printer.row(url, "", "", "");
                }
            }
            printer.print();
        } else {
            List<String> urls = watcher.getWatchURLs();
View Full Code Here

    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()),
                    getStringOrBlank(profile.getDependentProfiles()));
        }
        table.print();
View Full Code Here

          String profileId = profile.getId();
            // skip profiles that do not exists (they may have been deleted)
            if (profileService.hasProfile(versionId, profileId) && (hidden || !profile.isHidden())) {
                int active = fabricService.getAssociatedContainers(versionId, profileId).length;
                String parents = Strings.join(profile.getParentIds(), " ");
                table.row(profileId, activeContainerCountText(active), parents);
            }
        }
        table.print();
    }
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.