Search in sources :

Example 1 with HEADERS

use of org.jboss.hal.dmr.ModelDescriptionConstants.HEADERS in project console by hal.

the class ConstantHeadersElement method showHeaders.

public void showHeaders(ModelNode modelNode) {
    selectedPath = modelNode.get(PATH).asString();
    int selectedIndex = modelNode.get(HAL_INDEX).asInt();
    List<NamedNode> headers = failSafeList(modelNode, HEADERS).stream().map(node -> new NamedNode(node.get(NAME).asString(), node)).collect(toList());
    headersElement.update(selectedIndex, headers);
    pages.showPage(Ids.CONSTANT_HEADERS_PATH_PAGE);
}
Also used : ModelNode(org.jboss.hal.dmr.ModelNode) IsElement(org.jboss.gwt.elemento.core.IsElement) Constraint(org.jboss.hal.meta.security.Constraint) HAL_INDEX(org.jboss.hal.dmr.ModelDescriptionConstants.HAL_INDEX) ModelNodeHelper.storeIndex(org.jboss.hal.dmr.ModelNodeHelper.storeIndex) ModelNodeTable(org.jboss.hal.core.mbui.table.ModelNodeTable) AddResourceDialog(org.jboss.hal.core.mbui.dialog.AddResourceDialog) CONSTANT_HEADERS(org.jboss.hal.dmr.ModelDescriptionConstants.CONSTANT_HEADERS) TextBoxItem(org.jboss.hal.ballroom.form.TextBoxItem) ModelNodeForm(org.jboss.hal.core.mbui.form.ModelNodeForm) Elements.section(org.jboss.gwt.elemento.core.Elements.section) AddressTemplate(org.jboss.hal.meta.AddressTemplate) Elements.p(org.jboss.gwt.elemento.core.Elements.p) VALUE(org.jboss.hal.dmr.ModelDescriptionConstants.VALUE) HTMLElement(elemental2.dom.HTMLElement) NAME(org.jboss.hal.dmr.ModelDescriptionConstants.NAME) HasPresenter(org.jboss.hal.core.mvp.HasPresenter) Metadata(org.jboss.hal.meta.Metadata) Elements.h(org.jboss.gwt.elemento.core.Elements.h) Pages(org.jboss.hal.ballroom.Pages) Table(org.jboss.hal.ballroom.table.Table) Ids(org.jboss.hal.resources.Ids) ModelNodeHelper.failSafeList(org.jboss.hal.dmr.ModelNodeHelper.failSafeList) DialogFactory(org.jboss.hal.ballroom.dialog.DialogFactory) List(java.util.List) LabelBuilder(org.jboss.hal.ballroom.LabelBuilder) Collectors.toList(java.util.stream.Collectors.toList) HEADERS(org.jboss.hal.dmr.ModelDescriptionConstants.HEADERS) PATH(org.jboss.hal.dmr.ModelDescriptionConstants.PATH) MetadataRegistry(org.jboss.hal.meta.MetadataRegistry) Resources(org.jboss.hal.resources.Resources) Attachable(org.jboss.hal.ballroom.Attachable) InlineAction(org.jboss.hal.ballroom.table.InlineAction) NamedNode(org.jboss.hal.dmr.NamedNode) SafeHtml(com.google.gwt.safehtml.shared.SafeHtml) Form(org.jboss.hal.ballroom.form.Form) Scope(org.jboss.hal.ballroom.table.Scope) NamedNode(org.jboss.hal.dmr.NamedNode) Constraint(org.jboss.hal.meta.security.Constraint)

Aggregations

SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)1 HTMLElement (elemental2.dom.HTMLElement)1 List (java.util.List)1 Collectors.toList (java.util.stream.Collectors.toList)1 Elements.h (org.jboss.gwt.elemento.core.Elements.h)1 Elements.p (org.jboss.gwt.elemento.core.Elements.p)1 Elements.section (org.jboss.gwt.elemento.core.Elements.section)1 IsElement (org.jboss.gwt.elemento.core.IsElement)1 Attachable (org.jboss.hal.ballroom.Attachable)1 LabelBuilder (org.jboss.hal.ballroom.LabelBuilder)1 Pages (org.jboss.hal.ballroom.Pages)1 DialogFactory (org.jboss.hal.ballroom.dialog.DialogFactory)1 Form (org.jboss.hal.ballroom.form.Form)1 TextBoxItem (org.jboss.hal.ballroom.form.TextBoxItem)1 InlineAction (org.jboss.hal.ballroom.table.InlineAction)1 Scope (org.jboss.hal.ballroom.table.Scope)1 Table (org.jboss.hal.ballroom.table.Table)1 AddResourceDialog (org.jboss.hal.core.mbui.dialog.AddResourceDialog)1 ModelNodeForm (org.jboss.hal.core.mbui.form.ModelNodeForm)1 ModelNodeTable (org.jboss.hal.core.mbui.table.ModelNodeTable)1