use of org.jboss.hal.client.deployment.dialog.CreateEmptyDialog in project console by hal.
the class ContentColumn method createEmpty.
private void createEmpty() {
CreateEmptyDialog dialog = new CreateEmptyDialog(resources, name -> {
ResourceAddress address = CONTENT_TEMPLATE.resolve(statementContext, name);
ModelNode contentNode = new ModelNode();
contentNode.get(EMPTY).set(true);
Operation operation = new Operation.Builder(address, ADD).param(CONTENT, new ModelNode().add(contentNode)).build();
dispatcher.execute(operation, result -> {
refresh(Ids.deployment(name));
MessageEvent.fire(eventBus, Message.success(resources.messages().deploymentEmptySuccess(name)));
});
});
dialog.addValidationHandlerForNameItem(createUniqueValidation());
dialog.show();
}
use of org.jboss.hal.client.deployment.dialog.CreateEmptyDialog in project console by hal.
the class StandaloneDeploymentColumn method createEmpty.
private void createEmpty() {
CreateEmptyDialog dialog = new CreateEmptyDialog(resources, name -> {
ResourceAddress address = DEPLOYMENT_TEMPLATE.resolve(statementContext, name);
ModelNode contentNode = new ModelNode();
contentNode.get(EMPTY).set(true);
Operation operation = new Operation.Builder(address, ADD).param(CONTENT, new ModelNode().add(contentNode)).build();
dispatcher.execute(operation, result -> {
refresh(Ids.deployment(name));
MessageEvent.fire(eventBus, Message.success(resources.messages().deploymentEmptySuccess(name)));
});
});
dialog.addValidationHandlerForNameItem(createUniqueValidation());
dialog.show();
}
Aggregations