use of org.jboss.hal.client.deployment.dialog.AddUnmanagedDialog in project console by hal.
the class StandaloneDeploymentColumn method addUnmanaged.
private void addUnmanaged() {
Metadata metadata = metadataRegistry.lookup(DEPLOYMENT_TEMPLATE);
AddUnmanagedDialog dialog = new AddUnmanagedDialog(metadata, resources, (name, model) -> series(new FlowContext(progress.get()), new AddUnmanagedDeployment(dispatcher, name, model)).subscribe(new SuccessfulOutcome<FlowContext>(eventBus, resources) {
@Override
public void onSuccess(FlowContext context) {
refresh(Ids.deployment(name));
MessageEvent.fire(eventBus, Message.success(resources.messages().addResourceSuccess(Names.UNMANAGED_DEPLOYMENT, name)));
}
}));
dialog.getForm().<String>getFormItem(NAME).addValidationHandler(createUniqueValidation());
dialog.show();
}
use of org.jboss.hal.client.deployment.dialog.AddUnmanagedDialog in project console by hal.
the class ContentColumn method addUnmanaged.
private void addUnmanaged() {
Metadata metadata = metadataRegistry.lookup(CONTENT_TEMPLATE);
AddUnmanagedDialog dialog = new AddUnmanagedDialog(metadata, resources, (name, model) -> series(new FlowContext(progress.get()), new AddUnmanagedDeployment(dispatcher, name, model)).subscribe(new org.jboss.hal.core.SuccessfulOutcome<FlowContext>(eventBus, resources) {
@Override
public void onSuccess(FlowContext context) {
refresh(Ids.content(name));
MessageEvent.fire(eventBus, Message.success(resources.messages().addResourceSuccess(Names.UNMANAGED_DEPLOYMENT, name)));
}
}));
dialog.getForm().<String>getFormItem(NAME).addValidationHandler(createUniqueValidation());
dialog.show();
}
use of org.jboss.hal.client.deployment.dialog.AddUnmanagedDialog in project console by hal.
the class ServerGroupDeploymentColumn method addUnmanaged.
private void addUnmanaged() {
Metadata metadata = metadataRegistry.lookup(CONTENT_TEMPLATE);
AddUnmanagedDialog dialog = new AddUnmanagedDialog(metadata, resources, (name, model) -> {
if (model != null) {
String serverGroup = statementContext.selectedServerGroup();
String runtimeName = model.get(RUNTIME_NAME).asString();
series(new FlowContext(progress.get()), new AddUnmanagedDeployment(dispatcher, name, model), new AddServerGroupDeployment(environment, dispatcher, name, runtimeName, serverGroup)).subscribe(new SuccessfulOutcome<FlowContext>(eventBus, resources) {
@Override
public void onSuccess(FlowContext context) {
refresh(Ids.serverGroupDeployment(serverGroup, name));
MessageEvent.fire(eventBus, Message.success(resources.messages().addResourceSuccess(Names.UNMANAGED_DEPLOYMENT, name)));
}
});
}
});
dialog.getForm().<String>getFormItem(NAME).addValidationHandler(createUniqueValidation());
dialog.show();
}
Aggregations