Commit 958578b0 authored by Gianluca Filippone's avatar Gianluca Filippone
Browse files

Adjustments on Choreography client console extension

parent 3a546c69
......@@ -87,7 +87,7 @@ public class ChoreographyDirectoryPanel extends GroupDirectoryPanel {
final List<IColumn<GroupTO, String>> columns = new ArrayList<>();
columns.add(new AttrColumn<>("id", SchemaType.PLAIN));
columns.add(new PropertyColumn<>(new ResourceModel("name", "Name"), "name"));
columns.add(new PropertyColumn<>(new ResourceModel("name", "Name"), "Name", "name"));
columns.add(new AttrColumn<>("description", SchemaType.PLAIN));
columns.add(new AbstractColumn<GroupTO, String>(new ResourceModel("", "Enactment Engine")) {
......
......@@ -36,6 +36,8 @@ public class ResizeChoreographyModalPanel extends AbstractModalPanel<Serializabl
private static final long serialVersionUID = 1570261203472359825L;
private final BaseModal<Serializable> resizeModal;
private final GroupTO choreography;
private final ChoreographyRestClient choreographyRestClient;
......@@ -48,6 +50,7 @@ public class ResizeChoreographyModalPanel extends AbstractModalPanel<Serializabl
final ChoreographyRestClient choreographyRestClient,
final PageReference pageRef) {
super(modal, pageRef);
this.resizeModal = modal;
this.choreography = choreography;
this.choreographyRestClient = choreographyRestClient;
......@@ -61,7 +64,10 @@ public class ResizeChoreographyModalPanel extends AbstractModalPanel<Serializabl
container.add(form);
this.sizeInput = new AjaxSpinnerFieldPanel.Builder<Integer>()
.build("size", "New Size", Integer.class, new Model<>()).setRequired(true);
.build("size", "New Size", Integer.class, new Model<>());
sizeInput.setRequired(true);
sizeInput.addRequiredLabel();
sizeInput.setModelObject(1); //Retreive this info from somewhere
form.add(sizeInput);
}
......@@ -70,6 +76,7 @@ public class ResizeChoreographyModalPanel extends AbstractModalPanel<Serializabl
try {
choreographyRestClient.resizeChoreography(
choreography.getPlainAttrMap().get("id").getValues().iterator().next(), sizeInput.getModelObject());
resizeModal.close(target);
SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
} catch (SyncopeClientException e) {
LOG.error("While deleting object {}", choreography.getKey(), e);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment