use of org.pentaho.di.ui.cluster.dialog.ClusterSchemaDialog in project pentaho-kettle by pentaho.
the class RepositoryExplorerDialog method editCluster.
public void editCluster(String clusterName) {
try {
ObjectId id = rep.getClusterID(clusterName);
// Load the last version
ClusterSchema cluster = rep.loadClusterSchema(id, rep.getSlaveServers(), null);
ClusterSchemaDialog dd = new ClusterSchemaDialog(shell, cluster, rep.getSlaveServers());
if (dd.open()) {
rep.insertLogEntry("Updating cluster '" + cluster.getName() + "'");
rep.save(cluster, Const.VERSION_COMMENT_EDIT_VERSION, null);
if (!clusterName.equalsIgnoreCase(cluster.getName())) {
refreshTree();
}
}
} catch (KettleException e) {
// CHECKSTYLE:LineLength:OFF
new ErrorDialog(shell, BaseMessages.getString(PKG, "RepositoryExplorerDialog.Cluster.Edit.UnexpectedError.Title"), BaseMessages.getString(PKG, "RepositoryExplorerDialog.Cluster.Edit.UnexpectedError.Message") + clusterName + "]", e);
}
}
Aggregations