use of org.jboss.hal.meta.AddressTemplate in project console by hal.
the class ModclusterPresenter method prepareResetCustomLoadMetric.
public void prepareResetCustomLoadMetric(Form<NamedNode> form) {
AddressTemplate template = CUSTOM_LOAD_METRIC_TEMPLATE.replaceWildcards(proxyName);
Metadata metadata = metadataRegistry.lookup(CUSTOM_LOAD_METRIC_TEMPLATE);
crud.reset(Names.CUSTOM_LOAD_METRIC, form.getModel().getName(), template, form, metadata, this::reload);
}
use of org.jboss.hal.meta.AddressTemplate in project console by hal.
the class ModclusterPresenter method addCustomLoadMetric.
// =================== custom load metric
public void addCustomLoadMetric() {
String id = Ids.build(CUSTOM_LOAD_METRIC, FORM, ADD);
AddressTemplate template = CUSTOM_LOAD_METRIC_TEMPLATE.replaceWildcards(proxyName);
crud.add(id, Names.CUSTOM_LOAD_METRIC, template, (name, address) -> reload());
}
use of org.jboss.hal.meta.AddressTemplate in project console by hal.
the class RemoteActiveMQView method setPresenter.
@Override
public void setPresenter(RemoteActiveMQPresenter presenter) {
super.setPresenter(presenter);
// register the suggestion handlers here rather than in a @PostConstruct method
// they need a valid presenter reference!
List<AddressTemplate> connectors = asList(CONNECTOR_REMOTE_TEMPLATE, IN_VM_CONNECTOR_REMOTE_TEMPLATE, HTTP_CONNECTOR_REMOTE_TEMPLATE, REMOTE_CONNECTOR_REMOTE_TEMPLATE);
connectionFactoryForm.getFormItem(CONNECTORS).registerSuggestHandler(new ReadChildrenAutoComplete(mbuiContext.dispatcher(), presenter.statementContext, connectors));
connectionFactoryForm.getFormItem(DISCOVERY_GROUP).registerSuggestHandler(new ReadChildrenAutoComplete(mbuiContext.dispatcher(), presenter.statementContext, DISCOVERY_GROUP_REMOTE_TEMPLATE));
pooledConnectionFactoryForm.getFormItem(CONNECTORS).registerSuggestHandler(new ReadChildrenAutoComplete(mbuiContext.dispatcher(), presenter.statementContext, connectors));
pooledConnectionFactoryForm.getFormItem(DISCOVERY_GROUP).registerSuggestHandler(new ReadChildrenAutoComplete(mbuiContext.dispatcher(), presenter.statementContext, DISCOVERY_GROUP_REMOTE_TEMPLATE));
connectorForm.getFormItem(SOCKET_BINDING).registerSuggestHandler(new ReadChildrenAutoComplete(mbuiContext.dispatcher(), statementContext(), SOCKET_BINDING_TEMPLATE));
discoveryGroupForm.getFormItem(SOCKET_BINDING).registerSuggestHandler(new ReadChildrenAutoComplete(mbuiContext.dispatcher(), statementContext(), SOCKET_BINDING_TEMPLATE));
remoteConnectorForm.getFormItem(SOCKET_BINDING).registerSuggestHandler(new ReadChildrenAutoComplete(mbuiContext.dispatcher(), statementContext(), SOCKET_BINDING_TEMPLATE));
httpConnectorForm.getFormItem(SOCKET_BINDING).registerSuggestHandler(new ReadChildrenAutoComplete(mbuiContext.dispatcher(), statementContext(), SOCKET_BINDING_TEMPLATE));
}
use of org.jboss.hal.meta.AddressTemplate in project console by hal.
the class ModclusterPresenter method saveLoadMetric.
public void saveLoadMetric(Form<NamedNode> form, Map<String, Object> changedValues) {
AddressTemplate template = LOAD_METRIC_TEMPLATE.replaceWildcards(proxyName);
crud.save(Names.LOAD_METRIC, form.getModel().getName(), template, changedValues, this::reload);
}
use of org.jboss.hal.meta.AddressTemplate in project console by hal.
the class ModclusterPresenter method addLoadProviderSimple.
public void addLoadProviderSimple() {
String id = Ids.build("load-provider-simple", FORM, ADD);
AddressTemplate template = LOAD_PROVIDER_SIMPLE_TEMPLATE.replaceWildcards(proxyName);
crud.addSingleton(id, Names.LOAD_PROVIDER_SIMPLE, template, address -> reload());
}
Aggregations