use of org.apache.karaf.shell.support.table.ShellTable in project karaf by apache.
the class HistoryCommand method execute.
@Override
public Object execute() throws Exception {
List<ImageHistory> histories = getDockerService().history(image, url);
ShellTable table = new ShellTable();
table.column("ID");
table.column("Created");
table.column("Created By");
table.column("Tags");
table.column("Size");
for (ImageHistory history : histories) {
table.addRow().addContent(history.getId(), history.getCreated(), history.getCreatedBy(), history.getComment(), history.getTags(), history.getSize());
}
table.print(System.out);
return null;
}
use of org.apache.karaf.shell.support.table.ShellTable in project karaf by apache.
the class ListCommand method execute.
@Override
public Object execute() throws Exception {
ShellTable table = new ShellTable();
table.column("ID");
table.column("Flight");
table.column("Customer");
for (Booking booking : bookingService.list()) {
table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer());
}
table.print(System.out);
return null;
}
use of org.apache.karaf.shell.support.table.ShellTable in project karaf by apache.
the class ListCommand method execute.
@Override
public Object execute() throws Exception {
ShellTable table = new ShellTable();
table.column("ID");
table.column("Flight");
table.column("Customer");
for (Booking booking : bookingService.list()) {
table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer());
}
table.print(System.out);
return null;
}
use of org.apache.karaf.shell.support.table.ShellTable in project karaf by apache.
the class ListCommand method execute.
@Override
public Object execute() throws Exception {
ShellTable table = new ShellTable();
table.column("ID");
table.column("Flight");
table.column("Customer");
for (Booking booking : bookingService.list()) {
table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer());
}
table.print(System.out);
return null;
}
use of org.apache.karaf.shell.support.table.ShellTable in project karaf by apache.
the class GetLogLevel method execute.
@Override
public Object execute() throws Exception {
if (logger == null || logger.equalsIgnoreCase("ALL")) {
Map<String, String> loggers = logService.getLevel("ALL");
ShellTable table = new ShellTable();
table.column("Logger");
table.column("Level");
loggers.forEach((n, l) -> table.addRow().addContent(n, l));
table.print(System.out, !noFormat);
} else {
Map<String, String> loggers = logService.getLevel(logger);
String level = loggers.get(logger);
System.out.println(level);
}
return null;
}
Aggregations