@CliCommand(value = INFO_STREAM, help = "Show information about a specific stream") public List<Object> streamInfo(@CliOption(key = { "", "name" }, help = "the name of the stream to show", mandatory = true, optionContext = "existing-stream disable-string-converter") String name) { List<Object> result = new ArrayList<>(); final StreamDeploymentResource stream = streamOperations().info(name); TableModelBuilder<Object> modelBuilder = new TableModelBuilder<>(); modelBuilder.addRow().addValue("Stream Name").addValue("Stream Definition").addValue("Status"); modelBuilder.addRow().addValue(stream.getStreamName()) .addValue(stream.getDslText()) .addValue(stream.getStatus()); TableBuilder builder = DataFlowTables.applyStyle(new TableBuilder(modelBuilder.build())); result.add(builder.build()); if (StringUtils.hasText(stream.getDeploymentProperties())) { //TODO: rename Deployment properties for Skipper as it includes apps' info (app:version) as well result.add(String.format("Stream Deployment properties: %s", ShellUtils.prettyPrintIfJson(stream.getDeploymentProperties()))); } return result; }
@CliCommand(value = INFO_STREAM, help = "Show information about a specific stream") public List<Object> streamInfo(@CliOption(key = { "", "name" }, help = "the name of the stream to show", mandatory = true, optionContext = "existing-stream disable-string-converter") String name) { List<Object> result = new ArrayList<>(); final StreamDeploymentResource stream = streamOperations().info(name); TableModelBuilder<Object> modelBuilder = new TableModelBuilder<>(); modelBuilder.addRow().addValue("Stream Name").addValue("Stream Definition").addValue("Status"); modelBuilder.addRow().addValue(stream.getStreamName()) .addValue(stream.getDslText()) .addValue(stream.getStatus()); TableBuilder builder = DataFlowTables.applyStyle(new TableBuilder(modelBuilder.build())); result.add(builder.build()); if (StringUtils.hasText(stream.getDeploymentProperties())) { //TODO: rename Deployment properties for Skipper as it includes apps' info (app:version) as well result.add(String.format("Stream Deployment properties: %s", ShellUtils.prettyPrintIfJson(stream.getDeploymentProperties()))); } return result; }