Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void init() {
table -> presenter.addSocketBinding(INBOUND)))
.button(mbuiContext.tableButtonFactory().remove(inboundTemplate,
table -> presenter.removeSocketBinding(INBOUND, table.selectedRow().getName())))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(PORT, (cell, type, row, meta) -> row.get(PORT).asString())
.column(new InlineAction<>(Names.CLIENT_MAPPINGS, row -> presenter.showClientMappings(row)))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import static org.jboss.hal.ballroom.LayoutBuilder.row;
import static org.jboss.hal.client.configuration.SystemPropertiesPresenter.ROOT_TEMPLATE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.BOOT_TIME;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;
import static org.jboss.hal.dmr.ModelDescriptionConstants.VALUE;

public class SystemPropertiesView extends HalViewImpl implements SystemPropertiesPresenter.MyView {
Expand Down Expand Up @@ -74,7 +73,7 @@ public SystemPropertiesView(Environment environment, MetadataRegistry metadataRe
.button(tableButtonFactory.remove(Names.SYSTEM_PROPERTY, ROOT_TEMPLATE,
table -> table.selectedRow().getName(),
() -> presenter.reload()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(VALUE);
if (!environment.isStandalone()) {
tb.column("boot-time");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void init() {
SessionManagement.HOTROD.template,
table -> table.selectedRow().getName(),
() -> presenter.reload()))
.column("name", (cell, type, row, meta) -> row.getName())
.nameColumn()
.build();
hotRodSessionManagementAffinityElement = new AffinityElement(SessionManagement.HOTROD, mbuiContext.metadataRegistry(),
mbuiContext.resources());
Expand Down Expand Up @@ -197,7 +197,7 @@ void init() {
SessionManagement.INFINISPAN.template,
table -> table.selectedRow().getName(),
() -> presenter.reload()))
.column("name", (cell, type, row, meta) -> row.getName())
.nameColumn()
.build();
infinispanSessionManagementAffinityElement = new AffinityElement(SessionManagement.INFINISPAN,
mbuiContext.metadataRegistry(), mbuiContext.resources());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private HTMLElement buildServicePanel(String baseId, AddressTemplate template, S

Table<NamedNode> table = new ModelNodeTable.Builder<NamedNode>(Ids.build(baseId, Ids.TABLE),
metadata)
.column(NAME, (cell, t, row, meta) -> row.getName())
.nameColumn()
.button(tableButtonFactory.add(Ids.build(baseId, Ids.ADD), type, template,
(name, address) -> presenter.reload()))
.button(tableButtonFactory.remove(type, template, (api) -> api.selectedRow().getName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
import static org.jboss.hal.dmr.ModelDescriptionConstants.DEFAULT_SFSB_CACHE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.DEFAULT_SFSB_PASSIVATION_DISABLED_CACHE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.DEFAULT_SLSB_INSTANCE_POOL;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;
import static org.jboss.hal.dmr.ModelDescriptionConstants.PASSIVATION_STORE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.SERVICE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.TYPE;
Expand Down Expand Up @@ -153,7 +152,7 @@ void init() {
(name, address) -> presenter.reload()))
.button(mbuiContext.tableButtonFactory().remove(Names.APPLICATION_SECURITY_DOMAIN, template,
(api) -> api.selectedRow().getName(), () -> presenter.reload()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.build();

appSecurityDomainForm = new ModelNodeForm.Builder<NamedNode>(Ids.EJB3_APPLICATION_SECURITY_DOMAIN_FORM,
Expand Down Expand Up @@ -209,7 +208,7 @@ void init() {
.button(mbuiContext.tableButtonFactory().remove(rpTypeLabel, REMOTING_PROFILE_TEMPLATE,
table -> table.selectedRow().getName(),
() -> presenter.reload()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(ejbReceiverPage.makeInlineAction(), "20em")
.column(httpConnectionPage.makeInlineAction(), "20em")
.build();
Expand Down Expand Up @@ -261,7 +260,7 @@ void init() {
.button(mbuiContext.tableButtonFactory().remove(RER_CHANNEL_CREATION_OPTIONS_TEMPLATE,
table -> presenter.removeRerChannelCreationOptions(ccoTypeLabel, table.selectedRow().getName(),
selectedRemotingProfile, selectedEjbReceiver)))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.columns(TYPE, VALUE)
.build();

Expand Down Expand Up @@ -426,7 +425,7 @@ public RemotingProfileSubpage(AddressTemplate template) {
.button(mbuiContext.tableButtonFactory().remove(template,
table -> presenter.removeRemotingProfileChild(label, table.selectedRow().getName(),
selectedRemotingProfile, childType, template)))
.column(NAME, (cell, t, row, meta) -> row.getName())
.nameColumn()
.columns(columnNames);

if (childType.equals(ER_TYPE)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class HttpAuthenticationFactoryElement implements IsElement<HTMLElement>, Attach
metadata.getTemplate(), (n, a) -> presenter.reloadHttpAuthenticationFactories()))
.button(tableButtonFactory.remove(Names.HTTP_AUTHENTICATION_FACTORY, metadata.getTemplate(),
(table) -> table.selectedRow().getName(), () -> presenter.reloadHttpAuthenticationFactories()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(new InlineAction<>(Names.MECHANISM_CONFIGURATIONS, this::showMechanismConfiguration), "15em")
.build();
factoryForm = new ModelNodeForm.Builder<NamedNode>(id(FORM), metadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class JdbcRealmElement implements IsElement<HTMLElement>, Attachable, HasPresent
.button(tableButtonFactory.add(metadata.getTemplate(), table -> presenter.addJdbcRealm()))
.button(tableButtonFactory.remove(Names.JDBC_REALM, metadata.getTemplate(),
(table) -> table.selectedRow().getName(), () -> presenter.reloadJdbcRealms()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(new InlineAction<>(Names.PRINCIPAL_QUERY, this::showPrincipalQuery))
.build();
HTMLElement jdbcRealmSection = section()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class LdapKeyStoreElement implements IsElement<HTMLElement>, Attachable, HasPres
asList(DIR_CONTEXT, SEARCH_PATH), (n, a) -> presenter.reloadLdapKeyStores()))
.button(tableButtonFactory.remove(Names.LDAP_KEY_STORE, metadata.getTemplate(),
(table) -> table.selectedRow().getName(), () -> presenter.reloadLdapKeyStores()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.build();

attributes = new ModelNodeForm.Builder<NamedNode>(id(FORM), metadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class LdapRealmElement implements IsElement<HTMLElement>, Attachable, Has
.button(tableButtonFactory.add(metadata.getTemplate(), table -> presenter.addLdapRealm()))
.button(tableButtonFactory.remove(Names.LDAP_REALM, metadata.getTemplate(),
(table) -> table.selectedRow().getName(), () -> presenter.reloadLdapRealms()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(new InlineAction<>(Names.IDENTITY_ATTRIBUTE_MAPPING, this::showIdentityAttributeMapping),
"15em")
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import static org.jboss.hal.dmr.ModelDescriptionConstants.FROM;
import static org.jboss.hal.dmr.ModelDescriptionConstants.MAPPED_ROLE_MAPPER;
import static org.jboss.hal.dmr.ModelDescriptionConstants.MODULE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;
import static org.jboss.hal.dmr.ModelDescriptionConstants.PERMISSIONS;
import static org.jboss.hal.dmr.ModelDescriptionConstants.ROLE_MAP;
import static org.jboss.hal.dmr.ModelDescriptionConstants.TABLE;
Expand Down Expand Up @@ -123,7 +122,7 @@ 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())
.nameColumn()
.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))
Expand All @@ -148,7 +147,7 @@ void init() {
.button(mbuiContext.tableButtonFactory().remove(title, MAPPED_ROLE_MAPPER_TEMPLATE,
table -> table.selectedRow().getName(),
() -> presenter.reload()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.build();

mappedRoleMapperForm = new ModelNodeForm.Builder<NamedNode>(build(mappedId, FORM), mappedMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class SaslAuthenticationFactoryElement implements IsElement<HTMLElement>, Attach
metadata.getTemplate(), (n, a) -> presenter.reloadSaslAuthenticationFactories()))
.button(tableButtonFactory.remove(Names.SASL_AUTHENTICATION_FACTORY, metadata.getTemplate(),
(table) -> table.selectedRow().getName(), () -> presenter.reloadSaslAuthenticationFactories()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(new InlineAction<>(Names.MECHANISM_CONFIGURATIONS, this::showMechanismConfiguration), "15em")
.build();
factoryForm = new ModelNodeForm.Builder<NamedNode>(id(FORM), metadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class SimplePermissionMapperElement
SIMPLE_PERMISSION_MAPPER_TEMPLATE, (name, address) -> presenter.reloadSimplePermissionMapper()))
.button(tableButtonFactory.remove(Names.SIMPLE_PERMISSION_MAPPER, metadata.getTemplate(),
(table) -> table.selectedRow().getName(), () -> presenter.reloadSimplePermissionMapper()))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(new InlineAction<>(Names.PERMISSION_MAPPINGS, this::showPermissionMappings), "15em")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private void initBackups(CacheType cacheType, MetadataRegistry metadataRegistry,
.button(tableButtonFactory.add(backupTemplate, table -> presenter.addBackup()))
.button(tableButtonFactory.remove(backupTemplate,
table -> presenter.removeBackup(table.selectedRow().getName())))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.build();

backupForm = new ModelNodeForm.Builder<NamedNode>(Ids.build(cacheType.baseId, BACKUPS, Ids.FORM),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public RemoteCacheContainerView(MetadataRegistry metadataRegistry, TableButtonFa
.button(tableButtonFactory.add(REMOTE_CLUSTER_TEMPLATE, table -> presenter.addRemoteCluster()))
.button(tableButtonFactory.remove(REMOTE_CLUSTER_TEMPLATE,
table -> presenter.removeRemoteCluster(table.selectedRow().getName())))
.column(resources.constants().name(), (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(Names.SOCKET_BINDINGS, (cell, type, row, meta) -> {
ModelNode socketBindings = row.get(SOCKET_BINDINGS);
if (socketBindings.isDefined()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ThreadPoolsEditor implements IsElement<HTMLElement>, Attachable, HasPresen
.button(tableButtonFactory.remove(WORKMANAGER_LRT_TEMPLATE,
table -> presenter.removeThreadPool(workmanagerTemplate, workmanager,
table.selectedRow())))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(resources.constants().type(), (cell, type, row, meta) -> row.getRunningMode())
.column(MAX_THREADS)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import static org.jboss.hal.client.configuration.subsystem.jgroups.AddressTemplates.CHANNEL_FORK_PROTOCOL_TEMPLATE;
import static org.jboss.hal.client.configuration.subsystem.jgroups.AddressTemplates.CHANNEL_TEMPLATE;
import static org.jboss.hal.client.configuration.subsystem.jgroups.AddressTemplates.SELECTED_CHANNEL_FORK_PROTOCOL_TEMPLATE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;

/** Element to configure the fork resource */
class ChannelElement implements IsElement<HTMLElement>, Attachable, HasPresenter<JGroupsPresenter> {
Expand Down Expand Up @@ -72,7 +71,7 @@ class ChannelElement implements IsElement<HTMLElement>, Attachable, HasPresenter
.button(tableButtonFactory.remove(CHANNEL_TEMPLATE,
table -> presenter.removeResource(CHANNEL_TEMPLATE, table.selectedRow().getName(),
Names.CHANNEL)))
.column(NAME, (cell, type, row, meta) -> row.getName())
.nameColumn()
.column(new InlineAction<>(Names.FORK, row -> {
selectedChannel = row.getName();
presenter.showForks(row);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import static org.jboss.hal.client.configuration.subsystem.jgroups.AddressTemplates.CHANNEL_FORK_TEMPLATE;
import static org.jboss.hal.client.configuration.subsystem.jgroups.AddressTemplates.SELECTED_CHANNEL_FORK_TEMPLATE;
import static org.jboss.hal.client.configuration.subsystem.jgroups.ChannelElement.PROTOCOL_ID;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;

public class ForkElement implements IsElement<HTMLElement>, Attachable, HasPresenter<JGroupsPresenter> {

Expand All @@ -66,7 +65,7 @@ public class ForkElement implements IsElement<HTMLElement>, Attachable, HasPrese
.button(tableButtonFactory.remove(CHANNEL_FORK_TEMPLATE,
table -> presenter.removeResource(SELECTED_CHANNEL_FORK_TEMPLATE,
table.selectedRow().getName(), Names.FORK)))
.column(NAME, (cell, t, row, meta) -> row.getName())
.nameColumn()
.column(new InlineAction<>(Names.PROTOCOL, row -> {
presenter.showChannelProtocol(row);
presenter.showChannelInnerPage(PROTOCOL_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import static org.jboss.elemento.Elements.h;
import static org.jboss.elemento.Elements.p;
import static org.jboss.elemento.Elements.section;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;

public class GenericElement implements IsElement<HTMLElement>, Attachable, HasPresenter<JGroupsPresenter> {

Expand All @@ -57,7 +56,7 @@ public class GenericElement implements IsElement<HTMLElement>, Attachable, HasPr
Ids.build(resourceId, Ids.ADD, Ids.FORM), name)))
.button(tableButtonFactory.remove(template,
table -> presenter.removeResource(template, table.selectedRow().getName(), name)))
.column(NAME, (cell, t, row, meta) -> row.getName())
.nameColumn()
.build();
form = new ModelNodeForm.Builder<NamedNode>(Ids.build(resourceId, Ids.FORM), metadata)
.onSave((form, changedValues) -> presenter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import static org.jboss.elemento.Elements.p;
import static org.jboss.elemento.Elements.section;
import static org.jboss.hal.client.configuration.subsystem.jgroups.JGroupsPresenter.AUTH;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;
import static org.jboss.hal.dmr.ModelDescriptionConstants.TOKEN;

public class ProtocolElement implements IsElement<HTMLElement>, Attachable, HasPresenter<JGroupsPresenter> {
Expand Down Expand Up @@ -86,7 +85,8 @@ public class ProtocolElement implements IsElement<HTMLElement>, Attachable, HasP
.button(tableButtonFactory.add(template, launchWizard))
.button(tableButtonFactory.remove(template,
table -> presenter.removeResource(template, table.selectedRow().getName(), resourceName)))
.column(NAME, (cell, t, row, meta) -> row.getName())
.indexColumn()
.nameColumn()
.build();
form = createForm(metadata);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import static org.jboss.hal.client.configuration.subsystem.jgroups.AddressTemplates.RELAY_TEMPLATE;
import static org.jboss.hal.client.configuration.subsystem.jgroups.AddressTemplates.SELECTED_RELAY_TEMPLATE;
import static org.jboss.hal.client.configuration.subsystem.jgroups.StackElement.REMOTE_SITE_ID;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;

public class RelayElement implements IsElement<HTMLElement>, Attachable, HasPresenter<JGroupsPresenter> {

Expand All @@ -61,7 +60,7 @@ public class RelayElement implements IsElement<HTMLElement>, Attachable, HasPres
.button(tableButtonFactory.remove(RELAY_TEMPLATE,
table -> presenter.removeResource(SELECTED_RELAY_TEMPLATE, table.selectedRow().getName(),
Names.RELAY)))
.column(NAME, (cell, t, row, meta) -> row.getName())
.nameColumn()
.column(new InlineAction<>(Names.REMOTE_SITE, row -> {
presenter.showRemoteSites(row);
presenter.showStackInnerPage(REMOTE_SITE_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import static org.jboss.elemento.Elements.p;
import static org.jboss.elemento.Elements.section;
import static org.jboss.hal.client.configuration.subsystem.jgroups.AddressTemplates.*;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME;

/** Element to configure the stack resource */
class StackElement implements IsElement<HTMLElement>, Attachable, HasPresenter<JGroupsPresenter> {
Expand Down Expand Up @@ -90,7 +89,7 @@ class StackElement implements IsElement<HTMLElement>, Attachable, HasPresenter<J
.button(tableButtonFactory.remove(STACK_TEMPLATE,
table -> presenter.removeResource(STACK_TEMPLATE, table.selectedRow().getName(),
Names.STACK)))
.column(NAME, (cell, t, row, meta) -> row.getName())
.nameColumn()
.column(inlineActions)
.build();

Expand Down
Loading