Search in sources :

Example 1 with FORM

use of org.jboss.hal.resources.Ids.FORM in project console by hal.

the class LoggingProfileView method init.

@PostConstruct
@SuppressWarnings("Duplicates")
void init() {
    Constants constants = mbuiContext.resources().constants();
    noRootLogger = new EmptyState.Builder(Ids.LOGGING_PROFILE + "-root-logger-empty", constants.noRootLogger()).description(constants.noRootLoggerDescription()).icon(fontAwesome("sitemap")).primaryAction(constants.add(), this::addRootLogger).build();
    noRootLogger.element().classList.add(marginTopLarge);
    // hack which relies on the element hierarchy given in the template. will break if you change that hierarchy.
    rootLoggerForm.element().parentNode.appendChild(noRootLogger.element());
    rootLoggerVisibility(false);
    // --------------------------- json formatter
    AddressTemplate jsonTemplate = LOGGING_PROFILE_TEMPLATE.append(JSON_FORMATTER_TEMPLATE.lastName() + EQ_WILDCARD);
    LabelBuilder labelBuilder = new LabelBuilder();
    Metadata jsonMetadata = mbuiContext.metadataRegistry().lookup(jsonTemplate);
    Metadata jsonKeyOverridesMetadata = jsonMetadata.forComplexAttribute(KEY_OVERRIDES);
    String jsonLabel = labelBuilder.label(jsonTemplate.lastName());
    jsonFormatterTable = new ModelNodeTable.Builder<NamedNode>(Ids.build(LOGGING_PROFILE, JSON, FORMATTER, TABLE), jsonMetadata).button(constants.add(), table -> crud().add(Ids.build(LOGGING_PROFILE, JSON, FORMATTER, ADD), Names.JSON_FORMATTER, jsonTemplate.replaceWildcards(presenter.getLoggingProfile()), (name, address) -> presenter.reload()), Constraint.executable(jsonTemplate, ADD)).button(constants.remove(), table -> crud().remove(Names.JSON_FORMATTER, table.selectedRow().getName(), jsonTemplate.replaceWildcards(presenter.getLoggingProfile()), () -> presenter.reload()), Constraint.executable(jsonTemplate, REMOVE)).column(NAME, (cell, type, row, meta) -> row.getName()).build();
    jsonFormatterForm = new ModelNodeForm.Builder<NamedNode>(Ids.build(LOGGING_PROFILE, JSON, FORMATTER, FORM), jsonMetadata).onSave((form, changedValues) -> mbuiContext.crud().save(jsonLabel, form.getModel().getName(), jsonTemplate.replaceWildcards(presenter.getLoggingProfile()), changedValues, () -> presenter.reload())).prepareReset(form -> mbuiContext.crud().reset(jsonLabel, jsonFormatterTable.selectedRow().getName(), jsonTemplate.replaceWildcards(presenter.getLoggingProfile()), form, jsonMetadata, () -> presenter.reload())).build();
    jsonKeyOverridesForm = new ModelNodeForm.Builder<>(Ids.build(LOGGING_PROFILE, FORMATTER, JSON, KEY_OVERRIDES, FORM), jsonKeyOverridesMetadata).singleton(() -> {
        StatementContext jsonStatementContext = new SelectionAwareStatementContext(mbuiContext.statementContext(), () -> jsonFormatterTable.hasSelection() ? jsonFormatterTable.selectedRow().getName() : null);
        ResourceAddress address = jsonTemplate.resolve(jsonStatementContext, presenter.getLoggingProfile());
        return new Operation.Builder(address, READ_ATTRIBUTE_OPERATION).param(NAME, KEY_OVERRIDES).build();
    }, () -> presenter.addComplexObject(jsonLabel, jsonFormatterTable.selectedRow().getName(), KEY_OVERRIDES, jsonTemplate.replaceWildcards(presenter.getLoggingProfile()))).onSave((form, changedValues) -> presenter.saveComplexObject(jsonLabel, jsonFormatterTable.selectedRow().getName(), KEY_OVERRIDES, jsonTemplate.replaceWildcards(presenter.getLoggingProfile()), changedValues)).prepareReset(form -> presenter.resetComplexObject(jsonLabel, jsonFormatterTable.selectedRow().getName(), KEY_OVERRIDES, jsonTemplate.replaceWildcards(presenter.getLoggingProfile()), jsonKeyOverridesMetadata, form)).prepareRemove(form -> presenter.removeComplexObject(jsonLabel, jsonFormatterTable.selectedRow().getName(), KEY_OVERRIDES, jsonTemplate.replaceWildcards(presenter.getLoggingProfile()))).build();
    Tabs jsonTabs = new Tabs(Ids.build(LOGGING_PROFILE, FORMATTER, JSON, TAB_CONTAINER));
    jsonTabs.add(Ids.build(LOGGING_PROFILE, FORMATTER, JSON, ATTRIBUTES, TAB), constants.attributes(), jsonFormatterForm.element());
    jsonTabs.add(Ids.build(LOGGING_PROFILE, FORMATTER, JSON, KEY_OVERRIDES, TAB), Names.KEY_OVERRIDES, jsonKeyOverridesForm.element());
    HTMLElement jsonSection = section().add(h(1).textContent(Names.JSON_FORMATTER)).add(p().textContent(jsonMetadata.getDescription().getDescription())).add(jsonFormatterTable).add(jsonTabs).element();
    registerAttachable(jsonFormatterTable, jsonFormatterForm, jsonKeyOverridesForm);
    navigation.insertSecondary("logging-profile-formatter-item", Ids.build(LOGGING_PROFILE, FORMATTER, JSON, Ids.ITEM), null, Names.JSON_FORMATTER, jsonSection);
    // --------------------------- xml formatter
    AddressTemplate xmlTemplate = LOGGING_PROFILE_TEMPLATE.append(XML_FORMATTER_TEMPLATE.lastName() + EQ_WILDCARD);
    Metadata xmlMetadata = mbuiContext.metadataRegistry().lookup(xmlTemplate);
    Metadata xmlKeyOverridesMetadata = xmlMetadata.forComplexAttribute(KEY_OVERRIDES);
    String xmlLabel = labelBuilder.label(xmlTemplate.lastName());
    xmlFormatterTable = new ModelNodeTable.Builder<NamedNode>(Ids.build(LOGGING_PROFILE, XML, FORMATTER, TABLE), xmlMetadata).button(constants.add(), table -> crud().add(Ids.build(LOGGING_PROFILE, XML, FORMATTER, ADD), Names.XML_FORMATTER, xmlTemplate.replaceWildcards(presenter.getLoggingProfile()), (name, address) -> presenter.reload()), Constraint.executable(xmlTemplate, ADD)).button(constants.remove(), table -> crud().remove(Names.XML_FORMATTER, table.selectedRow().getName(), xmlTemplate.replaceWildcards(presenter.getLoggingProfile()), () -> presenter.reload()), Constraint.executable(xmlTemplate, REMOVE)).column(NAME, (cell, type, row, meta) -> row.getName()).build();
    xmlFormatterForm = new ModelNodeForm.Builder<NamedNode>(Ids.build(LOGGING_PROFILE, XML, FORMATTER, FORM), xmlMetadata).onSave((form, changedValues) -> mbuiContext.crud().save(xmlLabel, form.getModel().getName(), xmlTemplate.replaceWildcards(presenter.getLoggingProfile()), changedValues, () -> presenter.reload())).prepareReset(form -> mbuiContext.crud().reset(xmlLabel, xmlFormatterTable.selectedRow().getName(), xmlTemplate.replaceWildcards(presenter.getLoggingProfile()), form, xmlMetadata, () -> presenter.reload())).build();
    xmlKeyOverridesForm = new ModelNodeForm.Builder<>(Ids.build(LOGGING_PROFILE, FORMATTER, XML, KEY_OVERRIDES, FORM), xmlKeyOverridesMetadata).singleton(() -> {
        StatementContext xmlStatementContext = new SelectionAwareStatementContext(mbuiContext.statementContext(), () -> xmlFormatterTable.hasSelection() ? xmlFormatterTable.selectedRow().getName() : null);
        ResourceAddress address = xmlTemplate.resolve(xmlStatementContext, presenter.getLoggingProfile());
        return new Operation.Builder(address, READ_ATTRIBUTE_OPERATION).param(NAME, KEY_OVERRIDES).build();
    }, () -> presenter.addComplexObject(xmlLabel, xmlFormatterTable.selectedRow().getName(), KEY_OVERRIDES, xmlTemplate.replaceWildcards(presenter.getLoggingProfile()))).onSave((form, changedValues) -> presenter.saveComplexObject(xmlLabel, xmlFormatterTable.selectedRow().getName(), KEY_OVERRIDES, xmlTemplate.replaceWildcards(presenter.getLoggingProfile()), changedValues)).prepareReset(form -> presenter.resetComplexObject(xmlLabel, xmlFormatterTable.selectedRow().getName(), KEY_OVERRIDES, xmlTemplate.replaceWildcards(presenter.getLoggingProfile()), xmlKeyOverridesMetadata, form)).prepareRemove(form -> presenter.removeComplexObject(xmlLabel, xmlFormatterTable.selectedRow().getName(), KEY_OVERRIDES, xmlTemplate.replaceWildcards(presenter.getLoggingProfile()))).build();
    Tabs xmlTabs = new Tabs(Ids.build(LOGGING_PROFILE, FORMATTER, XML, TAB_CONTAINER));
    xmlTabs.add(Ids.build(LOGGING_PROFILE, FORMATTER, XML, ATTRIBUTES, TAB), constants.attributes(), xmlFormatterForm.element());
    xmlTabs.add(Ids.build(LOGGING_PROFILE, FORMATTER, XML, KEY_OVERRIDES, TAB), Names.KEY_OVERRIDES, xmlKeyOverridesForm.element());
    HTMLElement xmlSection = section().add(h(1).textContent(Names.XML_FORMATTER)).add(p().textContent(xmlMetadata.getDescription().getDescription())).add(xmlFormatterTable).add(xmlTabs).element();
    registerAttachable(xmlFormatterTable, xmlFormatterForm, xmlKeyOverridesForm);
    navigation.insertSecondary("logging-profile-formatter-item", Ids.build(LOGGING_PROFILE, FORMATTER, XML, Ids.ITEM), null, Names.XML_FORMATTER, xmlSection);
}
Also used : AddressTemplate(org.jboss.hal.meta.AddressTemplate) Constraint(org.jboss.hal.meta.security.Constraint) StatementContext(org.jboss.hal.meta.StatementContext) LOGGING_PROFILE_TEMPLATE(org.jboss.hal.client.configuration.subsystem.logging.AddressTemplates.LOGGING_PROFILE_TEMPLATE) TAB_CONTAINER(org.jboss.hal.resources.Ids.TAB_CONTAINER) AddResourceDialog(org.jboss.hal.core.mbui.dialog.AddResourceDialog) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) Elements.p(org.jboss.gwt.elemento.core.Elements.p) HTMLElement(elemental2.dom.HTMLElement) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) Metadata(org.jboss.hal.meta.Metadata) Names(org.jboss.hal.resources.Names) Elements.h(org.jboss.gwt.elemento.core.Elements.h) CrudOperations(org.jboss.hal.core.CrudOperations) Table(org.jboss.hal.ballroom.table.Table) Collections.emptyList(java.util.Collections.emptyList) SuggestHandler(org.jboss.hal.ballroom.form.SuggestHandler) FORM(org.jboss.hal.resources.Ids.FORM) VerticalNavigation(org.jboss.hal.ballroom.VerticalNavigation) ModelNodeHelper.failSafeGet(org.jboss.hal.dmr.ModelNodeHelper.failSafeGet) List(java.util.List) LabelBuilder(org.jboss.hal.ballroom.LabelBuilder) SelectionAwareStatementContext(org.jboss.hal.meta.SelectionAwareStatementContext) ModelDescriptionConstants(org.jboss.hal.dmr.ModelDescriptionConstants) PostConstruct(javax.annotation.PostConstruct) JSON_FORMATTER_TEMPLATE(org.jboss.hal.client.configuration.subsystem.logging.AddressTemplates.JSON_FORMATTER_TEMPLATE) CSS.fontAwesome(org.jboss.hal.resources.CSS.fontAwesome) ModelNode(org.jboss.hal.dmr.ModelNode) FileFormItem(org.jboss.hal.core.ui.FileFormItem) ModelNodeTable(org.jboss.hal.core.mbui.table.ModelNodeTable) MbuiViewImpl(org.jboss.hal.core.mbui.MbuiViewImpl) Tabs(org.jboss.hal.ballroom.Tabs) ModelNodeForm(org.jboss.hal.core.mbui.form.ModelNodeForm) XML_FORMATTER_TEMPLATE(org.jboss.hal.client.configuration.subsystem.logging.AddressTemplates.XML_FORMATTER_TEMPLATE) TAB(org.jboss.hal.resources.Ids.TAB) Elements.section(org.jboss.gwt.elemento.core.Elements.section) AddressTemplate(org.jboss.hal.meta.AddressTemplate) MbuiElement(org.jboss.hal.spi.MbuiElement) Constants(org.jboss.hal.resources.Constants) EmptyState(org.jboss.hal.ballroom.EmptyState) NameItem(org.jboss.hal.core.mbui.dialog.NameItem) DomGlobal.document(elemental2.dom.DomGlobal.document) Operation(org.jboss.hal.dmr.Operation) Ids(org.jboss.hal.resources.Ids) CATEGORY(org.jboss.hal.resources.Names.CATEGORY) ReadChildrenAutoComplete(org.jboss.hal.ballroom.autocomplete.ReadChildrenAutoComplete) CSS.marginTopLarge(org.jboss.hal.resources.CSS.marginTopLarge) FormItem(org.jboss.hal.ballroom.form.FormItem) MbuiContext(org.jboss.hal.core.mbui.MbuiContext) MbuiView(org.jboss.hal.spi.MbuiView) SELECTED_LOGGING_PROFILE_TEMPLATE(org.jboss.hal.client.configuration.subsystem.logging.AddressTemplates.SELECTED_LOGGING_PROFILE_TEMPLATE) NamedNode(org.jboss.hal.dmr.NamedNode) Elements(org.jboss.gwt.elemento.core.Elements) Form(org.jboss.hal.ballroom.form.Form) EmptyState(org.jboss.hal.ballroom.EmptyState) HTMLElement(elemental2.dom.HTMLElement) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) LabelBuilder(org.jboss.hal.ballroom.LabelBuilder) Metadata(org.jboss.hal.meta.Metadata) ModelDescriptionConstants(org.jboss.hal.dmr.ModelDescriptionConstants) Constants(org.jboss.hal.resources.Constants) NamedNode(org.jboss.hal.dmr.NamedNode) Operation(org.jboss.hal.dmr.Operation) SelectionAwareStatementContext(org.jboss.hal.meta.SelectionAwareStatementContext) StatementContext(org.jboss.hal.meta.StatementContext) SelectionAwareStatementContext(org.jboss.hal.meta.SelectionAwareStatementContext) ModelNodeTable(org.jboss.hal.core.mbui.table.ModelNodeTable) Tabs(org.jboss.hal.ballroom.Tabs) LabelBuilder(org.jboss.hal.ballroom.LabelBuilder) PostConstruct(javax.annotation.PostConstruct)

Example 2 with FORM

use of org.jboss.hal.resources.Ids.FORM in project console by hal.

the class ServerActions method copyServer.

// ------------------------------------------------------ server operations
public void copyServer(Server server, Callback callback) {
    Operation operation = new Operation.Builder(ResourceAddress.root(), READ_CHILDREN_NAMES_OPERATION).param(CHILD_TYPE, HOST).build();
    dispatcher.execute(operation, result -> {
        List<String> hosts = new ArrayList<>();
        result.asList().forEach(m -> hosts.add(m.asString()));
        // get the first host only to retrieve the r-r-d for server-config
        // as /host=*/server-config=*:read-operation-description(name=add) does not work
        AddressTemplate template = AddressTemplate.of("/host=" + hosts.get(0) + "/server-config=*");
        metadataProcessor.lookup(template, progress.get(), new SuccessfulMetadataCallback(eventBus, resources) {

            @Override
            public void onMetadata(Metadata metadata) {
                String id = Ids.build(SERVER_GROUP, statementContext.selectedServerGroup(), SERVER, FORM);
                SingleSelectBoxItem hostFormItem = new SingleSelectBoxItem(HOST, Names.HOST, hosts, false);
                hostFormItem.setRequired(true);
                NameItem nameItem = new NameItem();
                ModelNodeForm<ModelNode> form = new ModelNodeForm.Builder<>(id, metadata).fromRequestProperties().unboundFormItem(nameItem, 0).unboundFormItem(hostFormItem, 1, resources.messages().addServerHostHelp()).exclude(AUTO_START, SOCKET_BINDING_DEFAULT_INTERFACE, SOCKET_BINDING_GROUP, UPDATE_AUTO_START_WITH_SERVER_STATUS).build();
                AddResourceDialog dialog = new AddResourceDialog(resources.messages().copyServerTitle(), form, (resource, payload) -> {
                    // read server-config recursively to retrieve nested resources
                    ModelNode serverConfigModel = new ModelNode();
                    serverConfigModel.get(HOST).set(server.getHost());
                    serverConfigModel.get(SERVER_CONFIG).set(server.getName());
                    ResourceAddress serverAddress = new ResourceAddress(serverConfigModel);
                    Operation opReadServer = new Operation.Builder(serverAddress, READ_RESOURCE_OPERATION).param(RECURSIVE, true).build();
                    dispatcher.execute(opReadServer, new Consumer<ModelNode>() {

                        @Override
                        public void accept(ModelNode newServerModel) {
                            String newServerName = nameItem.getValue();
                            // set the chosen group in the model
                            newServerModel.get(GROUP).set(payload.get(GROUP).asString());
                            if (payload.hasDefined(SOCKET_BINDING_PORT_OFFSET)) {
                                newServerModel.get(SOCKET_BINDING_PORT_OFFSET).set(payload.get(SOCKET_BINDING_PORT_OFFSET).asLong());
                            }
                            newServerModel.get(NAME).set(newServerName);
                            ModelNode newServerModelAddress = new ModelNode();
                            newServerModelAddress.get(HOST).set(hostFormItem.getValue());
                            newServerModelAddress.get(SERVER_CONFIG).set(newServerName);
                            Operation opAddServer = new Operation.Builder(new ResourceAddress(newServerModelAddress), ADD).payload(newServerModel).build();
                            Composite comp = new Composite();
                            comp.add(opAddServer);
                            // create operation for each nested resource of the source server
                            createOperation(comp, JVM, newServerModel, newServerModelAddress);
                            createOperation(comp, INTERFACE, newServerModel, newServerModelAddress);
                            createOperation(comp, PATH, newServerModel, newServerModelAddress);
                            createOperation(comp, SYSTEM_PROPERTY, newServerModel, newServerModelAddress);
                            createOperation(comp, SSL, newServerModel, newServerModelAddress);
                            dispatcher.execute(comp, (CompositeResult result) -> {
                                MessageEvent.fire(eventBus, Message.success(resources.messages().addResourceSuccess(Names.SERVER, newServerName)));
                                callback.execute();
                            }, (operation1, failure) -> {
                                MessageEvent.fire(eventBus, Message.error(resources.messages().addResourceError(newServerName, failure)));
                                callback.execute();
                            }, (operation1, exception) -> {
                                MessageEvent.fire(eventBus, Message.error(resources.messages().addResourceError(newServerName, exception.getMessage())));
                                callback.execute();
                            });
                        }

                        private void createOperation(Composite composite, String resource, ModelNode model, ModelNode baseAddress) {
                            if (model.hasDefined(resource)) {
                                List<Property> props = model.get(resource).asPropertyList();
                                props.forEach(p -> {
                                    String propname = p.getName();
                                    ModelNode _address = baseAddress.clone();
                                    _address.get(resource).set(propname);
                                    Operation operation = new Operation.Builder(new ResourceAddress(_address), ADD).payload(p.getValue()).build();
                                    composite.add(operation);
                                });
                            }
                        }
                    });
                });
                dialog.show();
            }
        });
    });
}
Also used : AddressTemplate(org.jboss.hal.meta.AddressTemplate) AddResourceDialog(org.jboss.hal.core.mbui.dialog.AddResourceDialog) Dialog(org.jboss.hal.ballroom.dialog.Dialog) DISABLED(org.jboss.hal.core.runtime.server.ServerConfigStatus.DISABLED) Provider(javax.inject.Provider) Elements.a(org.jboss.gwt.elemento.core.Elements.a) TimeoutHandler.repeatUntilTimeout(org.jboss.hal.dmr.dispatch.TimeoutHandler.repeatUntilTimeout) STOPPED(org.jboss.hal.core.runtime.server.ServerConfigStatus.STOPPED) StatementContext(org.jboss.hal.meta.StatementContext) LoggerFactory(org.slf4j.LoggerFactory) AddResourceDialog(org.jboss.hal.core.mbui.dialog.AddResourceDialog) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) ManagementModel(org.jboss.hal.meta.ManagementModel) Icons(org.jboss.hal.resources.Icons) ModelNodeHelper.asEnumValue(org.jboss.hal.dmr.ModelNodeHelper.asEnumValue) TextBoxItem(org.jboss.hal.ballroom.form.TextBoxItem) OnError(org.jboss.hal.dmr.dispatch.Dispatcher.OnError) Elements.p(org.jboss.gwt.elemento.core.Elements.p) STARTED(org.jboss.hal.core.runtime.server.ServerConfigStatus.STARTED) HTMLElement(elemental2.dom.HTMLElement) Map(java.util.Map) SuspendState(org.jboss.hal.core.runtime.SuspendState) Message(org.jboss.hal.spi.Message) Timeouts(org.jboss.hal.core.runtime.Timeouts) Metadata(org.jboss.hal.meta.Metadata) Names(org.jboss.hal.resources.Names) EnumSet(java.util.EnumSet) CSS.marginLeft5(org.jboss.hal.resources.CSS.marginLeft5) Predicate(java.util.function.Predicate) SingleSelectBoxItem(org.jboss.hal.ballroom.form.SingleSelectBoxItem) FORM(org.jboss.hal.resources.Ids.FORM) ReadSocketBinding(org.jboss.hal.core.runtime.server.ServerUrlTasks.ReadSocketBinding) List(java.util.List) MetadataProcessor(org.jboss.hal.meta.processing.MetadataProcessor) Callback(org.jboss.hal.spi.Callback) Action(org.jboss.hal.core.runtime.Action) ModelDescriptionConstants(org.jboss.hal.dmr.ModelDescriptionConstants) Core(org.jboss.hal.core.Core) Flow.series(org.jboss.hal.flow.Flow.series) Footer(org.jboss.hal.spi.Footer) SafeHtml(com.google.gwt.safehtml.shared.SafeHtml) Subscription(rx.Subscription) CSS.fontAwesome(org.jboss.hal.resources.CSS.fontAwesome) DomGlobal.setTimeout(elemental2.dom.DomGlobal.setTimeout) ModelNode(org.jboss.hal.dmr.ModelNode) Alert(org.jboss.hal.ballroom.Alert) MessageEvent(org.jboss.hal.spi.MessageEvent) SHORT_TIMEOUT(org.jboss.hal.resources.UIConstants.SHORT_TIMEOUT) SuccessfulMetadataCallback(org.jboss.hal.meta.processing.SuccessfulMetadataCallback) ModelNodeHelper.getOrDefault(org.jboss.hal.dmr.ModelNodeHelper.getOrDefault) HashMap(java.util.HashMap) RUNNING(org.jboss.hal.core.runtime.RunningState.RUNNING) Result(org.jboss.hal.core.runtime.Result) FlowContext(org.jboss.hal.flow.FlowContext) Outcome(org.jboss.hal.flow.Outcome) ArrayList(java.util.ArrayList) OnFail(org.jboss.hal.dmr.dispatch.Dispatcher.OnFail) Inject(javax.inject.Inject) ModelNodeForm(org.jboss.hal.core.mbui.form.ModelNodeForm) Property(org.jboss.hal.dmr.Property) Strings(com.google.common.base.Strings) AsyncCallback(com.google.gwt.user.client.rpc.AsyncCallback) TimeoutHandler.repeatOperationUntil(org.jboss.hal.dmr.dispatch.TimeoutHandler.repeatOperationUntil) Progress(org.jboss.hal.flow.Progress) AddressTemplate(org.jboss.hal.meta.AddressTemplate) NameItem(org.jboss.hal.core.mbui.dialog.NameItem) ReadSocketBindingGroup(org.jboss.hal.core.runtime.server.ServerUrlTasks.ReadSocketBindingGroup) BlockingDialog(org.jboss.hal.ballroom.dialog.BlockingDialog) Logger(org.slf4j.Logger) CompositeResult(org.jboss.hal.dmr.CompositeResult) Operation(org.jboss.hal.dmr.Operation) Ids(org.jboss.hal.resources.Ids) EventBus(com.google.web.bindery.event.shared.EventBus) CSS.pfIcon(org.jboss.hal.resources.CSS.pfIcon) DialogFactory(org.jboss.hal.ballroom.dialog.DialogFactory) CompletableSubscriber(rx.CompletableSubscriber) Consumer(java.util.function.Consumer) Composite(org.jboss.hal.dmr.Composite) Dispatcher(org.jboss.hal.dmr.dispatch.Dispatcher) Resources(org.jboss.hal.resources.Resources) SUSPENDED(org.jboss.hal.core.runtime.SuspendState.SUSPENDED) RunningState(org.jboss.hal.core.runtime.RunningState) Elements.span(org.jboss.gwt.elemento.core.Elements.span) Elements(org.jboss.gwt.elemento.core.Elements) OperationFormBuilder(org.jboss.hal.core.mbui.form.OperationFormBuilder) Form(org.jboss.hal.ballroom.form.Form) URL_KEY(org.jboss.hal.core.runtime.server.ServerUrlTasks.URL_KEY) SingleSelectBoxItem(org.jboss.hal.ballroom.form.SingleSelectBoxItem) Composite(org.jboss.hal.dmr.Composite) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) CompositeResult(org.jboss.hal.dmr.CompositeResult) OperationFormBuilder(org.jboss.hal.core.mbui.form.OperationFormBuilder) ArrayList(java.util.ArrayList) Metadata(org.jboss.hal.meta.Metadata) SuccessfulMetadataCallback(org.jboss.hal.meta.processing.SuccessfulMetadataCallback) Operation(org.jboss.hal.dmr.Operation) ModelNodeForm(org.jboss.hal.core.mbui.form.ModelNodeForm) NameItem(org.jboss.hal.core.mbui.dialog.NameItem) Consumer(java.util.function.Consumer) ModelNode(org.jboss.hal.dmr.ModelNode) Property(org.jboss.hal.dmr.Property)

Example 3 with FORM

use of org.jboss.hal.resources.Ids.FORM in project console by hal.

the class MapperDecoderView method init.

@PostConstruct
void init() {
    Metadata metadata = mbuiContext.metadataRegistry().lookup(CONSTANT_PERMISSION_MAPPER_TEMPLATE);
    constantPermissionMapperElement = new ResourceElement.Builder(Ids.ELYTRON_CONSTANT_PERMISSION_MAPPER, CONSTANT_PERMISSION_MAPPER, metadata, mbuiContext).column(NAME, (cell, type, row, meta) -> row.getName()).setComplexListAttribute(PERMISSIONS, asList(CLASS_NAME, MODULE), asList(CLASS_NAME, MODULE), modelNode -> build(modelNode.get(CLASS_NAME).asString(), modelNode.get(MODULE).asString())).onCrud(() -> presenter.reload(CONSTANT_PERMISSION_MAPPER, this::updateConstantPermissionMapper)).build();
    navigation.insertSecondary("mappers-decoders-permission-mapper-item", build(Ids.ELYTRON_CONSTANT_PERMISSION_MAPPER, ITEM), "mappers-decoders-custom-permission-mapper-item", "Constant Permission Mapper", constantPermissionMapperElement.element());
    registerAttachable(constantPermissionMapperElement);
    // =========
    String mappedId = "mappers-decoders-mapped-role-mapper";
    Metadata mappedMetadata = mbuiContext.metadataRegistry().lookup(MAPPED_ROLE_MAPPER_TEMPLATE);
    LabelBuilder labelBuilder = new LabelBuilder();
    String title = labelBuilder.label(MAPPED_ROLE_MAPPER);
    mappedRoleMapperTable = new ModelNodeTable.Builder<NamedNode>(build(mappedId, TABLE), mappedMetadata).button(mbuiContext.tableButtonFactory().add(MAPPED_ROLE_MAPPER_TEMPLATE, table -> presenter.addMappedRoleMapper())).button(mbuiContext.tableButtonFactory().remove(title, MAPPED_ROLE_MAPPER_TEMPLATE, table -> table.selectedRow().getName(), () -> presenter.reload())).column(NAME, (cell, type, row, meta) -> row.getName()).build();
    mappedRoleMapperForm = new ModelNodeForm.Builder<NamedNode>(build(mappedId, FORM), mappedMetadata).customFormItem(ROLE_MAP, desc -> new RoleMapListItem(ROLE_MAP, labelBuilder.label(ROLE_MAP))).onSave((form, changedValues) -> {
        String name = form.getModel().getName();
        ResourceAddress address = MAPPED_ROLE_MAPPER_TEMPLATE.resolve(mbuiContext.statementContext(), name);
        saveForm(title, name, address, changedValues, mappedMetadata);
    }).build();
    HTMLElement mappedSection = section().add(h(1).textContent(Names.SIMPLE_PERMISSION_MAPPER)).add(p().textContent(metadata.getDescription().getDescription())).add(mappedRoleMapperTable).add(mappedRoleMapperForm).element();
    registerAttachable(mappedRoleMapperTable, mappedRoleMapperForm);
    navigation.insertSecondary("mappers-decoders-role-mappers", build(mappedId, ITEM), null, title, mappedSection);
    // =========
    Metadata spmMetadata = mbuiContext.metadataRegistry().lookup(AddressTemplates.SIMPLE_PERMISSION_MAPPER_TEMPLATE);
    simplePermissionMapperElement = new SimplePermissionMapperElement(spmMetadata, mbuiContext.tableButtonFactory());
    navigation.insertSecondary("mappers-decoders-permission-mapper-item", build(Ids.ELYTRON_SIMPLE_PERMISSION_MAPPER, ITEM), "mappers-decoders-simple-permission-mapper-item", "Simple Permission Mapper", simplePermissionMapperElement.element());
    registerAttachable(simplePermissionMapperElement);
}
Also used : ResourceElement(org.jboss.hal.core.mbui.ResourceElement) ModelNodeTable(org.jboss.hal.core.mbui.table.ModelNodeTable) MbuiViewImpl(org.jboss.hal.core.mbui.MbuiViewImpl) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) ModelNodeForm(org.jboss.hal.core.mbui.form.ModelNodeForm) Elements.section(org.jboss.gwt.elemento.core.Elements.section) MbuiElement(org.jboss.hal.spi.MbuiElement) Elements.p(org.jboss.gwt.elemento.core.Elements.p) HTMLElement(elemental2.dom.HTMLElement) Arrays.asList(java.util.Arrays.asList) ITEM(org.jboss.hal.resources.Ids.ITEM) Metadata(org.jboss.hal.meta.Metadata) Names(org.jboss.hal.resources.Names) Elements.h(org.jboss.gwt.elemento.core.Elements.h) Ids.build(org.jboss.hal.resources.Ids.build) Table(org.jboss.hal.ballroom.table.Table) Ids(org.jboss.hal.resources.Ids) FORM(org.jboss.hal.resources.Ids.FORM) VerticalNavigation(org.jboss.hal.ballroom.VerticalNavigation) List(java.util.List) LabelBuilder(org.jboss.hal.ballroom.LabelBuilder) MbuiContext(org.jboss.hal.core.mbui.MbuiContext) MAPPED_ROLE_MAPPER_TEMPLATE(org.jboss.hal.client.configuration.subsystem.elytron.AddressTemplates.MAPPED_ROLE_MAPPER_TEMPLATE) ModelDescriptionConstants(org.jboss.hal.dmr.ModelDescriptionConstants) PostConstruct(javax.annotation.PostConstruct) MbuiView(org.jboss.hal.spi.MbuiView) ResourceElement(org.jboss.hal.core.mbui.ResourceElement) NamedNode(org.jboss.hal.dmr.NamedNode) CONSTANT_PERMISSION_MAPPER_TEMPLATE(org.jboss.hal.client.configuration.subsystem.elytron.AddressTemplates.CONSTANT_PERMISSION_MAPPER_TEMPLATE) Form(org.jboss.hal.ballroom.form.Form) HTMLElement(elemental2.dom.HTMLElement) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) LabelBuilder(org.jboss.hal.ballroom.LabelBuilder) Metadata(org.jboss.hal.meta.Metadata) NamedNode(org.jboss.hal.dmr.NamedNode) ModelNodeTable(org.jboss.hal.core.mbui.table.ModelNodeTable) LabelBuilder(org.jboss.hal.ballroom.LabelBuilder) PostConstruct(javax.annotation.PostConstruct)

Example 4 with FORM

use of org.jboss.hal.resources.Ids.FORM in project console by hal.

the class StandaloneServerPresenter method disableSslForManagementInterface.

@Override
@SuppressWarnings("DuplicatedCode")
public void disableSslForManagementInterface() {
    Constants constants = resources.constants();
    String serverName = environment.isStandalone() ? Names.STANDALONE_SERVER : Names.DOMAIN_CONTROLLER;
    String label = constants.reload() + " " + serverName;
    SwitchItem reload = new SwitchItem(RELOAD, label);
    reload.setExpressionAllowed(false);
    Form<ModelNode> form = new ModelNodeForm.Builder<>(Ids.build(RELOAD, FORM), Metadata.empty()).unboundFormItem(reload).build();
    form.attach();
    HTMLElement formElement = form.element();
    ModelNode model = new ModelNode();
    model.setEmptyObject();
    form.edit(model);
    ResourceAddress httpAddress = HTTP_INTERFACE_TEMPLATE.resolve(statementContext);
    DialogFactory.buildConfirmation(constants.disableSSL(), resources.messages().disableSSLManagementQuestion(serverName), formElement, Dialog.Size.MEDIUM, () -> {
        List<Task<FlowContext>> tasks = new ArrayList<>();
        // load the http-interface resource to get the port, there are differente attributes for
        // standalone and domain mode.
        Task<FlowContext> loadHttpInterface = flowContext -> {
            Operation readHttpInterface = new Operation.Builder(httpAddress, READ_RESOURCE_OPERATION).build();
            return dispatcher.execute(readHttpInterface).doOnSuccess(value -> {
                if (value.hasDefined(SOCKET_BINDING)) {
                    // standalone mode uses a socket-binding for port
                    // store the socket-binding name in the flow context and on a later call
                    // read the socket-binding-group=<s-b-g>/socket-binding=<http-binding> to
                    // retrieve the port number
                    flowContext.set(SOCKET_BINDING, value.get(SOCKET_BINDING).asString());
                }
            }).toCompletable();
        };
        tasks.add(loadHttpInterface);
        // if standalone mode, read the socket-binding-group=<s-b-g>/socket-binding=<http-binding>
        // to retrieve the port number
        Task<FlowContext> readHttpPortTask = flowContext -> {
            Operation op = new Operation.Builder(ResourceAddress.root(), READ_CHILDREN_NAMES_OPERATION).param(CHILD_TYPE, SOCKET_BINDING_GROUP).build();
            return dispatcher.execute(op).doOnSuccess(result -> {
                String sbg = result.asList().get(0).asString();
                String httpBinding = flowContext.get(SOCKET_BINDING);
                ResourceAddress address = SOCKET_BINDING_GROUP_TEMPLATE.resolve(statementContext, sbg, httpBinding);
                Operation readPort = new Operation.Builder(address, READ_ATTRIBUTE_OPERATION).param(NAME, PORT).param(RESOLVE_EXPRESSIONS, true).build();
                dispatcher.execute(readPort, portResult -> flowContext.set(PORT, portResult.asString()));
            }).toCompletable();
        };
        tasks.add(readHttpPortTask);
        // as part of the disable ssl task, undefine the secure-socket-binding
        // the attribute only exists in standalone mode
        Task<FlowContext> undefSslTask = flowContext -> {
            Operation op = new Operation.Builder(httpAddress, UNDEFINE_ATTRIBUTE_OPERATION).param(NAME, SECURE_SOCKET_BINDING).build();
            return dispatcher.execute(op).toCompletable();
        };
        tasks.add(undefSslTask);
        // as part of the disable ssl task, undefine the ssl-context
        Task<FlowContext> undefineSslContextTask = flowContext -> {
            Operation op = new Operation.Builder(httpAddress, UNDEFINE_ATTRIBUTE_OPERATION).param(NAME, SSL_CONTEXT).build();
            return dispatcher.execute(op).toCompletable();
        };
        tasks.add(undefineSslContextTask);
        series(new FlowContext(progress.get()), tasks).subscribe(new SuccessfulOutcome<FlowContext>(getEventBus(), resources) {

            @Override
            public void onSuccess(FlowContext flowContext) {
                if (reload.getValue() != null && reload.getValue()) {
                    String port = flowContext.get(PORT).toString();
                    // extracts the url search path, so the reload shows the same view the use is on
                    String urlSuffix = window.location.getHref();
                    urlSuffix = urlSuffix.substring(urlSuffix.indexOf("//") + 2);
                    urlSuffix = urlSuffix.substring(urlSuffix.indexOf("/"));
                    // the location to redirect the browser to the unsecure URL
                    // TODO Replace hardcoded scheme
                    String location = "http://" + window.location.getHostname() + ":" + port + urlSuffix;
                    reloadServer(null, location);
                } else {
                    reload();
                    MessageEvent.fire(getEventBus(), Message.success(resources.messages().disableSSLManagementSuccess()));
                }
            }

            @Override
            public void onError(FlowContext context, Throwable throwable) {
                MessageEvent.fire(getEventBus(), Message.error(resources.messages().disableSSLManagementError(throwable.getMessage())));
            }
        });
    }).show();
}
Also used : Dialog(org.jboss.hal.ballroom.dialog.Dialog) INCLUDE_RUNTIME(org.jboss.hal.dmr.ModelDescriptionConstants.INCLUDE_RUNTIME) LIST_REMOVE_OPERATION(org.jboss.hal.dmr.ModelDescriptionConstants.LIST_REMOVE_OPERATION) Provider(javax.inject.Provider) Environment(org.jboss.hal.config.Environment) StatementContext(org.jboss.hal.meta.StatementContext) TopologyTasks.reloadBlocking(org.jboss.hal.core.runtime.TopologyTasks.reloadBlocking) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) SOCKET_BINDING(org.jboss.hal.dmr.ModelDescriptionConstants.SOCKET_BINDING) VALUE(org.jboss.hal.dmr.ModelDescriptionConstants.VALUE) HTMLElement(elemental2.dom.HTMLElement) Map(java.util.Map) Message(org.jboss.hal.spi.Message) KEY_MANAGER(org.jboss.hal.dmr.ModelDescriptionConstants.KEY_MANAGER) NAME(org.jboss.hal.dmr.ModelDescriptionConstants.NAME) UNDEFINE_ATTRIBUTE_OPERATION(org.jboss.hal.dmr.ModelDescriptionConstants.UNDEFINE_ATTRIBUTE_OPERATION) READ_RESOURCE_OPERATION(org.jboss.hal.dmr.ModelDescriptionConstants.READ_RESOURCE_OPERATION) SOCKET_BINDING_GROUP(org.jboss.hal.dmr.ModelDescriptionConstants.SOCKET_BINDING_GROUP) Server(org.jboss.hal.core.runtime.server.Server) LIST_ADD_OPERATION(org.jboss.hal.dmr.ModelDescriptionConstants.LIST_ADD_OPERATION) HttpManagementInterfacePresenter(org.jboss.hal.client.runtime.managementinterface.HttpManagementInterfacePresenter) Metadata(org.jboss.hal.meta.Metadata) Names(org.jboss.hal.resources.Names) PORT(org.jboss.hal.dmr.ModelDescriptionConstants.PORT) SOCKET_BINDING_GROUP_TEMPLATE(org.jboss.hal.client.shared.sslwizard.AbstractConfiguration.SOCKET_BINDING_GROUP_TEMPLATE) CrudOperations(org.jboss.hal.core.CrudOperations) RESOLVE_EXPRESSIONS(org.jboss.hal.dmr.ModelDescriptionConstants.RESOLVE_EXPRESSIONS) NameToken(com.gwtplatform.mvp.client.annotations.NameToken) INDEX(org.jboss.hal.dmr.ModelDescriptionConstants.INDEX) FinderPath(org.jboss.hal.core.finder.FinderPath) SECURE_SOCKET_BINDING(org.jboss.hal.dmr.ModelDescriptionConstants.SECURE_SOCKET_BINDING) FORM(org.jboss.hal.resources.Ids.FORM) Collectors(java.util.stream.Collectors) List(java.util.List) OperationFactory(org.jboss.hal.core.OperationFactory) PATH(org.jboss.hal.dmr.ModelDescriptionConstants.PATH) RESULT(org.jboss.hal.dmr.ModelDescriptionConstants.RESULT) SwitchItem(org.jboss.hal.ballroom.form.SwitchItem) Flow.series(org.jboss.hal.flow.Flow.series) Finder(org.jboss.hal.core.finder.Finder) Footer(org.jboss.hal.spi.Footer) SafeHtml(com.google.gwt.safehtml.shared.SafeHtml) SupportsExpertMode(org.jboss.hal.core.mvp.SupportsExpertMode) ModelNode(org.jboss.hal.dmr.ModelNode) ATTRIBUTES_ONLY(org.jboss.hal.dmr.ModelDescriptionConstants.ATTRIBUTES_ONLY) MessageEvent(org.jboss.hal.spi.MessageEvent) ProxyPlace(com.gwtplatform.mvp.client.proxy.ProxyPlace) SuccessfulOutcome(org.jboss.hal.core.SuccessfulOutcome) CHILD_TYPE(org.jboss.hal.dmr.ModelDescriptionConstants.CHILD_TYPE) KEY_STORE(org.jboss.hal.dmr.ModelDescriptionConstants.KEY_STORE) HashMap(java.util.HashMap) CONSTANT_HEADERS(org.jboss.hal.dmr.ModelDescriptionConstants.CONSTANT_HEADERS) FlowContext(org.jboss.hal.flow.FlowContext) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ModelNodeForm(org.jboss.hal.core.mbui.form.ModelNodeForm) Task(org.jboss.hal.flow.Task) RELOAD(org.jboss.hal.dmr.ModelDescriptionConstants.RELOAD) Progress(org.jboss.hal.flow.Progress) AddressTemplate(org.jboss.hal.meta.AddressTemplate) Constants(org.jboss.hal.resources.Constants) TRUST_MANAGER(org.jboss.hal.dmr.ModelDescriptionConstants.TRUST_MANAGER) Requires(org.jboss.hal.spi.Requires) CompositeResult(org.jboss.hal.dmr.CompositeResult) ProxyCodeSplit(com.gwtplatform.mvp.client.annotations.ProxyCodeSplit) EnableSSLWizard(org.jboss.hal.client.shared.sslwizard.EnableSSLWizard) SSL_CONTEXT(org.jboss.hal.dmr.ModelDescriptionConstants.SSL_CONTEXT) Operation(org.jboss.hal.dmr.Operation) Ids(org.jboss.hal.resources.Ids) FinderPathFactory(org.jboss.hal.core.finder.FinderPathFactory) EventBus(com.google.web.bindery.event.shared.EventBus) READ_ATTRIBUTE_OPERATION(org.jboss.hal.dmr.ModelDescriptionConstants.READ_ATTRIBUTE_OPERATION) WRITE_ATTRIBUTE_OPERATION(org.jboss.hal.dmr.ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION) DialogFactory(org.jboss.hal.ballroom.dialog.DialogFactory) DomGlobal.window(elemental2.dom.DomGlobal.window) Composite(org.jboss.hal.dmr.Composite) Dispatcher(org.jboss.hal.dmr.dispatch.Dispatcher) HEADERS(org.jboss.hal.dmr.ModelDescriptionConstants.HEADERS) NameTokens(org.jboss.hal.meta.token.NameTokens) MbuiPresenter(org.jboss.hal.core.mbui.MbuiPresenter) Resources(org.jboss.hal.resources.Resources) MbuiView(org.jboss.hal.core.mbui.MbuiView) EnableSSLPresenter(org.jboss.hal.client.shared.sslwizard.EnableSSLPresenter) READ_CHILDREN_NAMES_OPERATION(org.jboss.hal.dmr.ModelDescriptionConstants.READ_CHILDREN_NAMES_OPERATION) SERVER_SSL_CONTEXT(org.jboss.hal.dmr.ModelDescriptionConstants.SERVER_SSL_CONTEXT) START_MODE(org.jboss.hal.dmr.ModelDescriptionConstants.START_MODE) Host(org.jboss.hal.core.runtime.host.Host) Form(org.jboss.hal.ballroom.form.Form) ConstantHeadersPresenter(org.jboss.hal.client.runtime.managementinterface.ConstantHeadersPresenter) Task(org.jboss.hal.flow.Task) HTMLElement(elemental2.dom.HTMLElement) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) Constants(org.jboss.hal.resources.Constants) Operation(org.jboss.hal.dmr.Operation) FlowContext(org.jboss.hal.flow.FlowContext) List(java.util.List) ArrayList(java.util.ArrayList) ModelNode(org.jboss.hal.dmr.ModelNode) SuccessfulOutcome(org.jboss.hal.core.SuccessfulOutcome) SwitchItem(org.jboss.hal.ballroom.form.SwitchItem)

Example 5 with FORM

use of org.jboss.hal.resources.Ids.FORM in project console by hal.

the class StoresPresenter method importCertificate.

void importCertificate(Metadata metadata, String name) {
    AddressTemplate template = metadata.getTemplate();
    String resource = Names.KEY_STORE + SPACE + name;
    metadata = metadata.forOperation(IMPORT_CERTIFICATE);
    Form<ModelNode> form = new ModelNodeForm.Builder<>(Ids.build(template.lastName(), IMPORT_CERTIFICATE), metadata).build();
    form.setSaveCallback((form1, changedValues) -> {
        ModelNode payload = form.getModel();
        String path = payload.get(PATH).asString();
        if (!payload.hasDefined(VALIDATE)) {
            payload.get(VALIDATE).set(false);
        }
        ResourceAddress address = template.resolve(statementContext, name);
        String alias = payload.get(ALIAS).asString();
        List<Task<FlowContext>> tasks = new ArrayList<>();
        tasks.add(flowContext -> {
            Operation operation = new Operation.Builder(address, IMPORT_CERTIFICATE).payload(payload).build();
            return dispatcher.execute(operation).doOnError(ex -> MessageEvent.fire(getEventBus(), Message.error(resources.messages().importCertificateError(alias, path, resource, ex.getMessage())))).toCompletable();
        });
        tasks.add(flowContext -> {
            Operation operation = new Operation.Builder(KEY_STORE_TEMPLATE.resolve(statementContext, name), STORE).build();
            return dispatcher.execute(operation).doOnError(ex -> MessageEvent.fire(getEventBus(), Message.error(resources.messages().storeError(resource, ex.getMessage())))).toCompletable();
        });
        tasks.add(flowContext -> {
            Operation operation = new Operation.Builder(address, READ_ALIASES_OPERATION).build();
            return dispatcher.execute(operation).doOnError(ex -> MessageEvent.fire(getEventBus(), Message.error(resources.messages().readAliasesError(resource, ex.getMessage())))).toCompletable();
        });
        series(new FlowContext(progress.get()), tasks).subscribe(new SuccessfulOutcome<FlowContext>(getEventBus(), resources) {

            @Override
            public void onSuccess(FlowContext flowContext) {
                MessageEvent.fire(getEventBus(), Message.success(resources.messages().importCertificateSuccess(alias, path, resource)));
            }

            @Override
            public void onError(FlowContext context, Throwable ex) {
                MessageEvent.fire(getEventBus(), Message.error(resources.messages().removeAliasError(alias, resource, ex.getMessage())));
            }
        });
    });
    Dialog dialog = new Dialog.Builder(resources.constants().importCertificate()).add(p().textContent(metadata.getDescription().getDescription()).element()).add(form.element()).primary(resources.constants().importt(), form::save).size(Dialog.Size.MEDIUM).closeOnEsc(true).cancel().build();
    dialog.registerAttachable(form);
    dialog.show();
    form.edit(new ModelNode());
}
Also used : AddressTemplate(org.jboss.hal.meta.AddressTemplate) Dialog(org.jboss.hal.ballroom.dialog.Dialog) Provider(javax.inject.Provider) Environment(org.jboss.hal.config.Environment) Date(java.util.Date) StatementContext(org.jboss.hal.meta.StatementContext) AddResourceDialog(org.jboss.hal.core.mbui.dialog.AddResourceDialog) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) Icons(org.jboss.hal.resources.Icons) Elements.p(org.jboss.gwt.elemento.core.Elements.p) HTMLElement(elemental2.dom.HTMLElement) Message(org.jboss.hal.spi.Message) HasPresenter(org.jboss.hal.core.mvp.HasPresenter) Metadata(org.jboss.hal.meta.Metadata) Names(org.jboss.hal.resources.Names) ModelNodeHelper.asNamedNodes(org.jboss.hal.dmr.ModelNodeHelper.asNamedNodes) NameToken(com.gwtplatform.mvp.client.annotations.NameToken) FinderPath(org.jboss.hal.core.finder.FinderPath) FORM(org.jboss.hal.resources.Ids.FORM) List(java.util.List) LabelBuilder(org.jboss.hal.ballroom.LabelBuilder) AddressTemplates(org.jboss.hal.client.runtime.subsystem.elytron.AddressTemplates) ModelDescriptionConstants(org.jboss.hal.dmr.ModelDescriptionConstants) HalView(org.jboss.hal.core.mvp.HalView) CalendarUtil(com.google.gwt.user.datepicker.client.CalendarUtil) Flow.series(org.jboss.hal.flow.Flow.series) Finder(org.jboss.hal.core.finder.Finder) Footer(org.jboss.hal.spi.Footer) SafeHtml(com.google.gwt.safehtml.shared.SafeHtml) SupportsExpertMode(org.jboss.hal.core.mvp.SupportsExpertMode) ModelNode(org.jboss.hal.dmr.ModelNode) Elements.div(org.jboss.gwt.elemento.core.Elements.div) Alert(org.jboss.hal.ballroom.Alert) MessageEvent(org.jboss.hal.spi.MessageEvent) ProxyPlace(com.gwtplatform.mvp.client.proxy.ProxyPlace) SuccessfulOutcome(org.jboss.hal.core.SuccessfulOutcome) FlowContext(org.jboss.hal.flow.FlowContext) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ModelNodeForm(org.jboss.hal.core.mbui.form.ModelNodeForm) Task(org.jboss.hal.flow.Task) Progress(org.jboss.hal.flow.Progress) AddressTemplate(org.jboss.hal.meta.AddressTemplate) ApplicationFinderPresenter(org.jboss.hal.core.mvp.ApplicationFinderPresenter) Requires(org.jboss.hal.spi.Requires) CompositeResult(org.jboss.hal.dmr.CompositeResult) ProxyCodeSplit(com.gwtplatform.mvp.client.annotations.ProxyCodeSplit) Operation(org.jboss.hal.dmr.Operation) Ids(org.jboss.hal.resources.Ids) FinderPathFactory(org.jboss.hal.core.finder.FinderPathFactory) EventBus(com.google.web.bindery.event.shared.EventBus) DialogFactory(org.jboss.hal.ballroom.dialog.DialogFactory) Consumer(java.util.function.Consumer) Composite(org.jboss.hal.dmr.Composite) Dispatcher(org.jboss.hal.dmr.dispatch.Dispatcher) NameTokens(org.jboss.hal.meta.token.NameTokens) Resources(org.jboss.hal.resources.Resources) Format(org.jboss.hal.ballroom.Format) SuggestCapabilitiesAutoComplete(org.jboss.hal.ballroom.autocomplete.SuggestCapabilitiesAutoComplete) NamedNode(org.jboss.hal.dmr.NamedNode) Collections(java.util.Collections) Form(org.jboss.hal.ballroom.form.Form) Task(org.jboss.hal.flow.Task) ResourceAddress(org.jboss.hal.dmr.ResourceAddress) LabelBuilder(org.jboss.hal.ballroom.LabelBuilder) ArrayList(java.util.ArrayList) Operation(org.jboss.hal.dmr.Operation) ModelNodeForm(org.jboss.hal.core.mbui.form.ModelNodeForm) FlowContext(org.jboss.hal.flow.FlowContext) Dialog(org.jboss.hal.ballroom.dialog.Dialog) AddResourceDialog(org.jboss.hal.core.mbui.dialog.AddResourceDialog) ModelNode(org.jboss.hal.dmr.ModelNode)

Aggregations

HTMLElement (elemental2.dom.HTMLElement)9 List (java.util.List)9 ModelNodeForm (org.jboss.hal.core.mbui.form.ModelNodeForm)9 Metadata (org.jboss.hal.meta.Metadata)9 Ids (org.jboss.hal.resources.Ids)9 FORM (org.jboss.hal.resources.Ids.FORM)9 Names (org.jboss.hal.resources.Names)9 Form (org.jboss.hal.ballroom.form.Form)8 ModelNode (org.jboss.hal.dmr.ModelNode)8 Operation (org.jboss.hal.dmr.Operation)8 ResourceAddress (org.jboss.hal.dmr.ResourceAddress)8 StatementContext (org.jboss.hal.meta.StatementContext)8 ModelDescriptionConstants (org.jboss.hal.dmr.ModelDescriptionConstants)7 AddressTemplate (org.jboss.hal.meta.AddressTemplate)7 EventBus (com.google.web.bindery.event.shared.EventBus)6 ArrayList (java.util.ArrayList)6 Map (java.util.Map)6 Inject (javax.inject.Inject)6 Provider (javax.inject.Provider)6 Elements.p (org.jboss.gwt.elemento.core.Elements.p)6