use of org.jboss.hal.meta.Metadata in project console by hal.
the class StoreElement method tableForm.
private Form<ModelNode> tableForm(CacheType cacheType, Store store, Table table, MetadataRegistry metadataRegistry) {
AddressTemplate template = cacheType.template.append(STORE + "=" + store.resource).append(TABLE + "=" + table.resource);
Metadata metadata = metadataRegistry.lookup(template);
String id = Ids.build(cacheType.baseId, store.baseId, table.baseId, Ids.FORM);
return new ModelNodeForm.Builder<>(id, metadata).include(PREFIX).customFormItem(ID_COLUMN, ad -> new ColumnFormItem(ID_COLUMN)).customFormItem(DATA_COLUMN, ad -> new ColumnFormItem(DATA_COLUMN)).customFormItem(TIMESTAMP_COLUMN, ad -> new ColumnFormItem(TIMESTAMP_COLUMN)).include(BATCH_SIZE, FETCH_SIZE).unsorted().onSave((f, changedValues) -> presenter.saveTable(table, changedValues)).prepareReset(f -> presenter.resetTable(table, f)).build();
}
use of org.jboss.hal.meta.Metadata in project console by hal.
the class LoggingProfileView method savePatternFormatter.
void savePatternFormatter(Form<NamedNode> form, Map<String, Object> changedValues) {
String name = form.getModel().getName();
Metadata metadata = mbuiContext.metadataRegistry().lookup(LOGGING_PROFILE_TEMPLATE.append(PATTERN_FORMATTER + EQ_WILDCARD));
saveForm(Names.PATTERN_FORMATTER, name, SELECTED_LOGGING_PROFILE_TEMPLATE.append(PATTERN_FORMATTER + EQ_WILDCARD).resolve(selectionAwareStatementContext, name), changedValues, metadata);
}
use of org.jboss.hal.meta.Metadata in project console by hal.
the class LoggingProfileView method resetSizeHandler.
void resetSizeHandler(Form<NamedNode> form) {
String name = form.getModel().getName();
Metadata metadata = mbuiContext.metadataRegistry().lookup(LOGGING_PROFILE_TEMPLATE.append(SIZE_ROTATING_FILE_HANDLER + EQ_WILDCARD));
resetForm(Names.SIZE_ACTION_HANDLER, name, SELECTED_LOGGING_PROFILE_TEMPLATE.append(SIZE_ROTATING_FILE_HANDLER + EQ_WILDCARD).resolve(selectionAwareStatementContext, name), form, metadata);
}
use of org.jboss.hal.meta.Metadata in project console by hal.
the class LoggingProfileView method resetCustomHandler.
void resetCustomHandler(Form<NamedNode> form) {
String name = form.getModel().getName();
Metadata metadata = mbuiContext.metadataRegistry().lookup(LOGGING_PROFILE_TEMPLATE.append(CUSTOM_HANDLER + EQ_WILDCARD));
resetForm(Names.CUSTOM_ACTION_HANDLER, name, SELECTED_LOGGING_PROFILE_TEMPLATE.append(CUSTOM_HANDLER + EQ_WILDCARD).resolve(selectionAwareStatementContext, name), form, metadata);
}
use of org.jboss.hal.meta.Metadata in project console by hal.
the class LoggingProfileView method resetConsoleHandler.
void resetConsoleHandler(Form<NamedNode> form) {
String name = form.getModel().getName();
Metadata metadata = mbuiContext.metadataRegistry().lookup(LOGGING_PROFILE_TEMPLATE.append(CONSOLE_HANDLER + EQ_WILDCARD));
resetForm(Names.CONSOLE_ACTION_HANDLER, name, SELECTED_LOGGING_PROFILE_TEMPLATE.append(CONSOLE_HANDLER + EQ_WILDCARD).resolve(selectionAwareStatementContext, name), form, metadata);
}
Aggregations