return outString;
}
public void loadIndexData(Map<String, Object> context) {
try {
DatabaseSnapshot snapshot = SnapshotGeneratorFactory.getInstance().createSnapshot(database.getDefaultSchema(), database, new SnapshotControl(database));
StringBuilder buffer = new StringBuilder();
Database database = snapshot.getDatabase();
buffer.append("<div class='panel panel-primary'>");
buffer.append("<div class='panel-heading'><h2 style='margin-top:0px; margin-bottom:0px'>").append(StringUtils.escapeHtml(database.getConnection().getURL())).append("</h2></div>\n");
buffer.append("<div class='panel-body'>");
buffer.append("<strong>Database type:</strong> ").append(StringUtils.escapeHtml(database.getDatabaseProductName())).append("<br>\n");
buffer.append("<strong>Database version:</strong> ").append(StringUtils.escapeHtml(database.getDatabaseProductVersion())).append("<br>\n");
buffer.append("<strong>Database user:</strong> ").append(StringUtils.escapeHtml(database.getConnection().getConnectionUserName())).append("<br>\n");
Set<Schema> schemas = snapshot.get(Schema.class);
if (schemas.size() > 1) {
throw new UnexpectedLiquibaseException("Can only display one schema");
}
Schema schema = schemas.iterator().next();
if (database.supportsSchemas()) {
buffer.append("<strong>Catalog & Schema:</strong> ").append(schema.getCatalogName()).append(" / ").append(schema.getName()).append("<br>\n");
} else {
buffer.append("<strong>Catalog:</strong> ").append(schema.getCatalogName()).append("<br>\n");
}
buffer.append("</div>\n");
buffer.append("</div>\n");
SnapshotControl snapshotControl = snapshot.getSnapshotControl();
List<Class> includedTypes = sort(snapshotControl.getTypesToInclude());
StringBuilder catalogBuffer = new StringBuilder();
StringBuilder detailsBuilder = new StringBuilder();