Skip to content
tapSchemaEditing.xhtml 40 KiB
Newer Older
<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition template="/WEB-INF/templates/master.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <ui:define name="title">Editing #{tapSchemaEditing.tapSchema.name}</ui:define>
    <ui:define name="scripts">
        <h:outputScript library="js" name="edit-tapschema.js"></h:outputScript>
        <script>
            TSM.initUCDValidator('#{tapSchemaEditing.searchUCDDialog.UCDRegExp}');
        </script>
    </ui:define>
    <ui:define name="content">
        <c:set var="tapSchema" value="#{tapSchemaEditing.tapSchema}" />
        <c:set var="UCDDialog" value="#{tapSchemaEditing.searchUCDDialog}" />
        <h:form id="main">
            <h1 class="text-center">Editing #{tapSchemaEditing.tapSchema.name}</h1>

            <div class="col-sm-6 vpadding text-center">
                <h:commandLink class="btn btn-success btn-lg" action="#{tapSchemaEditing.update()}">
                    <span class="icon-save"></span>
                    Update
                    <f:ajax execute="@form" render="@form" onevent="TSM.notifyUpdate"/>
                </h:commandLink>
            </div>
            <div class="col-sm-6 vpadding text-right">
                <h:commandLink class="btn btn-info" action="#{tapSchemaEditing.back()}">
                    <span class="glyphicon glyphicon-arrow-left"></span>
                    Back
                </h:commandLink>
                <h:outputText value="&#160;" />
                <h:commandLink class="btn btn-danger" action="#{tapSchemaEditing.logout()}">
                    <span class="glyphicon glyphicon-log-out"></span>
                    Close session
                </h:commandLink>
            </div>
            <div class="clearfix"></div>
            <br/>

            <h:panelGroup id="main_panel">
                <ul class="nav nav-tabs" id="schemas" role="tablist">
                    <ui:repeat value="#{tapSchema.allEntityWrappers}" var="schema">
                        <li role="presentation" class="removable-tab #{tapSchema.selectedEntity.name eq schema.name ? 'active': ''} #{schema.toRemove ? 'to-remove' : ''}">
                            <h:commandLink role="tab" action="#{tapSchema.selectEntity(schema.name)}">
                                <span class="#{schema.toRemove ? 'strikeout':''}">#{schema.name}</span>
                                <f:ajax execute="@form" render="@form" />
                                <h:commandButton class="remove-btn" rendered="#{!schema.toRemove}" action="#{tapSchema.removeEntityWrapper(schema.name)}" value="&#215;" onclick="TSM.stopPropagation(event)">
                                    <f:ajax execute="@form" render="@form" />
                                </h:commandButton>
                            </h:commandLink>
                        </li>
                    </ui:repeat>
                    <h:panelGroup rendered="#{tapSchema.addables.size() gt 0}">
                        <li>
                            <h:commandLink role="tab" class="plus-tab" action="#{tapSchemaEditing.openAddablesModal(tapSchema)}">
                                <span class="glyphicon glyphicon-plus-sign"></span>
                                <f:ajax execute="@form" render="main:addables_modal_content" onevent="TSM.openAddablesModal" />
                <div role="tabpanel" class="tab-content">
                    <h:panelGroup rendered="#{tapSchema.selectedEntity.toRemove}">
                        <div class="col-xs-12 vpadding">
                            <div class="alert alert-info clearfix">
                                <span class="glyphicon glyphicon-info-sign"></span>
                                This schema will be removed on TAP Schema Update.
                                <h:commandLink class="btn btn-primary pull-right" action="#{tapSchemaEditing.undoRemove(tapSchema)}">
                                    Undo
                                    <f:ajax execute="@form" render="@form" />
                                </h:commandLink>
                            </div>
                        </div>                            
                    </h:panelGroup>
                    <h:panelGroup rendered="#{!tapSchema.selectedEntity.toRemove}">
                        <div class="schema-info clearfix">
                            <div class="form-horizontal" id="schemaValues">
                                <div class="form-group col-lg-6">
                                    <h:outputLabel for="schema_utype" class="col-sm-3 control-label">Schema utype</h:outputLabel>
                                    <div class="col-sm-9">
                                        <h:inputText 
                                            id="schema_utype"
                                            class="form-control #{tapSchema.selectedEntity.isChanged('utype') ? 'changed' : ''}"
                                            value="#{tapSchema.selectedEntity.utype}">
                                            <f:ajax event="keyup" execute="@form" listener="#{tapSchemaEditing.textInputChanged(tapSchema.selectedEntity, 'utype')}" onevent="TSM.textInputChanged" />
                                    </div>
                                </div>
                                <div class="form-group col-lg-6">
                                    <h:outputLabel for="schema_description" class="col-sm-3 control-label">Schema description</h:outputLabel>
                                        <h:inputText 
                                            id="schema_description"
                                            class="form-control #{tapSchema.selectedEntity.isChanged('description') ? 'changed' : ''}"
                                            value="#{tapSchema.selectedEntity.description}">
                                            <f:ajax event="keyup" execute="@form" listener="#{tapSchemaEditing.textInputChanged(tapSchema.selectedEntity, 'description')}" onevent="TSM.textInputChanged" />
                        <h:panelGroup id="tables_wrapper">
                            <ul class="nav nav-tabs" id="tables" role="tablist">
                                <ui:repeat value="#{tapSchemaEditing.tapSchema.selectedEntity.allEntityWrappers}" var="table">
                                    <li role="presentation" class="removable-tab #{tapSchema.selectedTable.name eq table.name ? 'active':''} #{table.toRemove? 'to-remove':''}">
                                        <h:commandLink role="tab" action="#{tapSchema.selectedEntity.selectEntity(table.name)}">
                                            <span class="#{table.toRemove ? 'strikeout':''}">#{table.name}</span>
                                            <f:ajax execute="@form" render="main:tables_wrapper" />
                                            <h:commandButton class="remove-btn" rendered="#{!table.toRemove}" action="#{tapSchema.selectedEntity.removeEntityWrapper(table.name)}" value="&#215;" onclick="TSM.stopPropagation(event)">
                                                <f:ajax execute="@form" render="main:tables_wrapper" />
                                            </h:commandButton>
                                        </h:commandLink>
                                    </li>
                                </ui:repeat>
                                <h:panelGroup rendered="#{tapSchema.selectedEntity.addables.size() gt 0}">
                                    <li>
                                        <h:commandLink role="tab" class="plus-tab" action="#{tapSchemaEditing.openAddablesModal(tapSchema.selectedEntity)}">
                                            <span class="glyphicon glyphicon-plus-sign"></span>
                                            <f:ajax execute="@form" render="main:addables_modal_content" onevent="TSM.openAddablesModal" />
                            <h:panelGroup rendered="#{tapSchema.selectedTable ne null}">
                                <div role="tabpanel">
                                    <h:panelGroup rendered="#{tapSchema.selectedTable.toRemove}">
                                        <div class="col-xs-12 vpadding">
                                            <div class="alert alert-info clearfix">
                                                <span class="glyphicon glyphicon-info-sign"></span>
                                                This table will be removed on TAP Schema Update.
                                                <h:commandLink class="btn btn-primary pull-right" action="#{tapSchemaEditing.undoRemove(tapSchema.selectedEntity)}">
                                                    Undo
                                                    <f:ajax execute="@form" render="@form" />
                                                </h:commandLink>
                                    </h:panelGroup>

                                    <h:panelGroup rendered="#{!tapSchema.selectedTable.toRemove}">
                                        <div class="table-info clearfix">
                                            <div class="form-horizontal" id="tableValues">
                                                <div class="form-group col-lg-6">
                                                    <h:outputLabel for="table_utype" class="col-sm-3 control-label">Table utype</h:outputLabel>
                                                    <div class="col-sm-9">
                                                        <h:inputText 
                                                            id="table_utype"
                                                            class="form-control #{tapSchema.selectedTable.isChanged('utype') ? 'changed' : ''}"
                                                            value="#{tapSchema.selectedTable.utype}">
                                                            <f:ajax event="keyup" execute="@form" listener="#{tapSchemaEditing.textInputChanged(tapSchema.selectedTable, 'utype')}" onevent="TSM.textInputChanged" />
                                                        </h:inputText>
                                                    </div>
                                                </div>
                                                <div class="form-group col-lg-6">
                                                    <h:outputLabel for="table_description" class="col-sm-3 control-label">Table description</h:outputLabel>
                                                    <div class="col-sm-9">
                                                        <h:inputText 
                                                            id="table_description"
                                                            class="form-control #{tapSchema.selectedTable.isChanged('description') ? 'changed' : ''}"
                                                            value="#{tapSchema.selectedTable.description}">
                                                            <f:ajax event="keyup" execute="@form" listener="#{tapSchemaEditing.textInputChanged(tapSchema.selectedTable, 'description')}" onevent="TSM.textInputChanged" />
                                        <h:panelGroup layout="block" class="columns-header" id="columns_header">
                                            <div class="columns-header-name">
                                                Columns<h:outputText value="&#160;" />
                                                <h:commandLink class="btn btn-success" rendered="#{tapSchema.selectedTable.addables.size() gt 0}" action="#{tapSchemaEditing.openAddablesModal(tapSchema.selectedTable)}">
                                                    <span class="glyphicon glyphicon-plus-sign"></span>
                                                    <f:ajax execute="@form" render="main:addables_modal_content" onevent="TSM.openAddablesModal" />
                                                </h:commandLink>
                                            </div>
                                            <h:panelGroup rendered="#{tapSchema.selectedColumn ne null}" layout="block" class="columns-header-properties">
                                                #{tapSchema.selectedColumn.name}
                                                <h:panelGroup rendered="#{tapSchema.selectedColumn.primaryKey}">
                                                    <span class="icon-key text-danger" title="Primary key"></span>
                                                </h:panelGroup>
                                                <h:panelGroup rendered="#{tapSchema.selectedColumn.foreignKey ne null}">
                                                    <span class="icon-key text-success" title="Foreign key: #{tapSchema.selectedColumn.foreignKey}"></span>
                                                </h:panelGroup>
                                                <h:panelGroup rendered="#{!(tapSchema.selectedColumn.primaryKey or tapSchema.selectedColumn.foreignKey ne null) and tapSchema.selectedColumn.indexed}">
                                                    <span class="icon-index text-warning" title="Indexed"></span>
                                                </h:panelGroup>
                                            </h:panelGroup> 
                                        </h:panelGroup>
                                        <div class="columns-wrapper">
                                            <div class="columns-selector">
                                                <ul class="nav nav-pills">
                                                    <ui:repeat value="#{tapSchema.selectedTable.allEntityWrappers}" var="column" id="columns-list">
                                                        <li role="presentation" class="#{tapSchema.selectedColumn.name eq column.name ? 'active': ''}">
                                                            <h:commandLink role="tab" action="#{tapSchema.selectedTable.selectEntity(column.name)}" class="#{column.toRemove ? 'strikeout' : ''}" id="column-selector">
                                                                <h:commandButton class="btn btn-link remove-btn" disabled="#{column.toRemove}" value="&#215;" onclick="TSM.stopPropagation(event)" id="column-remover">
                                                                    <f:ajax execute="@form" render="main:column_wrapper main:columns_header" listener="#{tapSchemaEditing.removeColumn(column.name)}" onevent="TSM.columnRemoved" />
                                                                <h:panelGroup rendered="#{column.primaryKey}">
                                                                    <span class="icon-key text-danger" title="Primary key"></span>
                                                                </h:panelGroup>
                                                                <h:panelGroup rendered="#{column.foreignKey ne null}">
                                                                    <span class="icon-key text-success" title="Foreign key: #{column.foreignKey}"></span>
                                                                </h:panelGroup>
                                                                <h:panelGroup rendered="#{!(column.primaryKey or column.foreignKey ne null) and column.indexed}">
                                                                    <span class="icon-index text-warning" title="Indexed"></span>
                                                                </h:panelGroup>      

                                                                <span class="#{column.toRemove ? 'strikeout':''}">#{column.name}</span>
                                                                <f:ajax execute="@form" render="main:column_wrapper main:columns_header" onevent="TSM.columnChanged" />
                                            <h:panelGroup id="column_wrapper">
                                                <h:panelGroup class="column-info" layout="block" rendered="#{tapSchema.selectedColumn ne null}">
                                                    <h:panelGroup rendered="#{tapSchema.selectedColumn.toRemove}">
                                                        <div class="alert alert-info clearfix">
                                                            <span class="glyphicon glyphicon-info-sign"></span>
                                                            This column will be removed on TAP Schema Update.
                                                            <h:commandLink class="btn btn-primary pull-right" action="#{tapSchemaEditing.undoRemoveColumn()}">
                                                                Undo
                                                                <f:ajax execute="@form" render="main:column_wrapper main:columns_header" onevent="TSM.columnRemovalUndo" />
                                                    <h:panelGroup rendered="#{!tapSchema.selectedColumn.toRemove}">
                                                        <div class="row">
                                                            <div class="col-xs-6">
                                                                <div class="form-group">
                                                                    <label for="datatype" class="control-label">Datatype:</label>
                                                                    <span>#{tapSchema.selectedColumn.datatype}</span>
                                                                </div>
                                                            </div>
                                                            <div class="col-xs-6">
                                                                <div class="form-group">
                                                                    <label for="size" class="control-label">Size:</label>
                                                                    <span>#{tapSchema.selectedColumn.size}</span>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-xs-6">
                                                                <div class="checkbox">
                                                                    <label>
                                                                        <h:selectBooleanCheckbox 
                                                                            value="#{tapSchemaEditing.tapSchema.selectedColumn.std}"
                                                                            class="#{tapSchema.selectedColumn.isChanged('std') ? 'changed' : ''}">
                                                                            <f:ajax execute="@form" render="@this" />
                                                                        </h:selectBooleanCheckbox>
                                                                        STD
                                                                    </label>
                                                                </div>
                                                            </div>
                                                            <div class="col-xs-6">
                                                                <div class="checkbox">
                                                                    <label>
                                                                        <h:selectBooleanCheckbox 
                                                                            value="#{tapSchemaEditing.tapSchema.selectedColumn.principal}"
                                                                            class="#{tapSchema.selectedColumn.isChanged('principal') ? 'changed' : ''}">
                                                                            <f:ajax execute="@form" render="@this" />
                                                                        </h:selectBooleanCheckbox>
                                                                        Principal
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                            <h:outputLabel for="column_utype" class="control-label">UType:</h:outputLabel>
                                                            <h:inputText 
                                                                id="column_utype"
                                                                class="form-control #{tapSchema.selectedColumn.isChanged('utype') ? 'changed' : ''}"
                                                                value="#{tapSchema.selectedColumn.utype}">
                                                                <f:ajax event="keyup" execute="@form" listener="#{tapSchemaEditing.textInputChanged(tapSchema.selectedColumn, 'utype')}" onevent="TSM.textInputChanged" />
                                                            <label for="main:column_ucd" class="control-label">UCD:</label>
Sonia Zorba's avatar
Sonia Zorba committed
                                                            <h:commandLink action="#{tapSchemaEditing.openUCDDialog()}" class="form-control #{tapSchemaEditing.tapSchema.selectedColumn.isChanged('ucd') ? 'changed' : ''}" id="column_ucd" onclick="TSM.showLoading()">
                                                                #{tapSchemaEditing.tapSchema.selectedColumn.ucd}
                                                                <f:ajax execute="@form" render="ucd_search_form:search_UCD_modal_content" onevent="TSM.openSearchUCDModal"/>
                                                        <div class="form-group">
                                                            <h:outputLabel for="column_unit" class="control-label">Unit:</h:outputLabel>
                                                            <h:inputText 
                                                                id="column_unit"
                                                                class="form-control #{tapSchema.selectedColumn.isChanged('unit') ? 'changed' : ''}"
                                                                value="#{tapSchema.selectedColumn.unit}">
                                                                <f:ajax event="keyup" execute="@form" listener="#{tapSchemaEditing.textInputChanged(tapSchema.selectedColumn, 'unit')}" onevent="TSM.textInputChanged" />
                                                        </div>
                                                        <div class="form-group">
                                                            <h:outputLabel for="column_description" class="control-label">Description:</h:outputLabel>
                                                            <h:inputText 
                                                                id="column_description"
                                                                class="form-control #{tapSchema.selectedColumn.isChanged('description') ? 'changed' : ''}"
                                                                value="#{tapSchema.selectedColumn.description}">
                                                                <f:ajax event="keyup" execute="@form" listener="#{tapSchemaEditing.textInputChanged(tapSchema.selectedColumn, 'description')}" onevent="TSM.textInputChanged" />
                                                        </div>
                                                    </h:panelGroup>
                                                </h:panelGroup>
                                            </h:panelGroup>
                            </h:panelGroup>
                        </h:panelGroup>
                    </h:panelGroup>
            <div class="modal fade" tabindex="-1" role="dialog" id="addablesModal">
                <div class="modal-dialog">
                    <div class="modal-content">

                        <div class="modal-header">
                            <div class="pull-right">
                                <h:commandLink class="btn btn-default btn-sm" action="#{tapSchemaEditing.checkAllEntities(false)}">
                                    <span class="glyphicon glyphicon-remove"></span>
                                    Deselect all
                                    <f:ajax execute="@form" render="addables_modal_content" />
                                </h:commandLink>
                            <div class="hpadding pull-right">
                                <h:commandLink class="btn btn-default btn-sm" action="#{tapSchemaEditing.checkAllEntities(true)}">
                                    <span class="glyphicon glyphicon-ok"></span>
                                    Select all
                                    <f:ajax execute="@form" render="addables_modal_content" />
                                </h:commandLink>
                            </div>  
                            <h4 class="modal-title">Add</h4>
                        </div>
                        <div class="modal-body">
                            <div class="clearfix">                              
                            <div class="addables">
                                <h:panelGroup id="addables_modal_content">
                                    <h:panelGroup rendered="#{tapSchemaEditing.currentAddingContainer ne null}">
                                        <ui:repeat value="#{tapSchemaEditing.currentAddables}" var="item">
                                            <div class="checkbox">
                                                <label>
                                                    <h:selectBooleanCheckbox value="#{item.selected}"/>
                                                    #{item.name}
                                                </label>
                                            </div>
                                        </ui:repeat>
                                    </h:panelGroup>
                                </h:panelGroup>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                            <h:commandLink class="btn btn-primary" action="#{tapSchemaEditing.addSelected}">
                                Add
                                <f:ajax execute="@form" render="main_panel" onevent="TSM.entitiesAdded" />
        <div class="modal fade" tabindex="-1" role="dialog" id="searchUCDModal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <h:form id="ucd_search_form">
                        <h:panelGroup id="search_UCD_modal_content">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">&#215;</span></button>
                                <h4 class="modal-title">UCD Search Dialog</h4>
                            </div>
                            <div class="modal-body">
                                <div class="form-group">
                                    <h:selectOneRadio value="#{UCDDialog.manualInsertion}" valueChangeListener="#{UCDDialog.setDefault()}">
                                        <f:selectItem itemValue="#{false}" itemLabel="Search by description" />
                                        <f:selectItem itemValue="#{true}" itemLabel="Manual insertion" />
                                        <f:ajax execute="@this" render="UCDDialogBodyMainContent ucdDialogFooter" />
                                    </h:selectOneRadio>
                                </div>
                                <h:panelGroup layout="block" id="UCDDialogBodyMainContent">
                                    <h:panelGroup rendered="#{UCDDialog.UCDServiceErrorMessage ne null}">
                                        <div class="alert alert-danger">
                                            <strong>Error while communicating with UCD web service:</strong>
                                            #{UCDDialog.UCDServiceErrorMessage}
                                    <h:panelGroup rendered="#{UCDDialog.manualInsertion}">
                                        <div class="form-group">
                                            <h:outputLabel for="ucd_text_manual" class="control-label">UCD:</h:outputLabel>
                                            <h:inputText id="ucd_text_manual" class="form-control" value="#{UCDDialog.UCDManualText}" validator="#{UCDDialog.validateManualUCD}" onchange="TSM.validateManualUCD(event)" onkeyup="TSM.validateManualUCD(event)" />
                                            <h:panelGroup id="ucd_validation_result" class="text-danger" layout="span">
                                                <h:message for="ucd_text_manual" />
                                            </h:panelGroup>
                                    <h:panelGroup rendered="#{!UCDDialog.manualInsertion}">
                                        <div class="form-group">
                                            <h:outputLabel for="ucd_dialog_description" class="control-label">Description:</h:outputLabel>
                                                <h:inputText id="ucd_dialog_description" class="form-control" value="#{UCDDialog.description}" onkeydown="TSM.ucdTextKeyDown(event)" />
                                                    <h:commandLink class="btn btn-default" action="#{UCDDialog.search(UCDDialog.description)}" id="search_UCD_btn" onclick="TSM.showLoading()">
                                                        <span class="glyphicon glyphicon-search"></span>
                                                        <f:ajax execute="@form" render="@form" onevent="TSM.hideLoading" />
                                        </div>
                                        <h:panelGroup rendered="#{UCDDialog.UCDnotFound}">
                                            <div class="alert alert-danger" role="alert">
                                                No UCD found for this description!
                                            </div>
                                        </h:panelGroup>
                                        <h:panelGroup rendered="#{UCDDialog.selectedUCD ne null}">
                                            <div class="alert alert-info" role="alert">
                                                <strong>Selected UCD:</strong>
                                                <span>#{UCDDialog.selectedUCD}</span>
                                            </div>
                                        </h:panelGroup>

                                        <h:panelGroup layout="block" class="form-group" rendered="#{UCDDialog.suggestedUCD ne null}">
                                            <label class="control-label">Suggested complete UCD:</label>
                                            <h:commandLink class="btn-default text-left form-control" action="#{UCDDialog.selectUCD(UCDDialog.suggestedUCD)}">
                                                #{UCDDialog.suggestedUCD}
                                                <f:ajax execute="@form" render="@form" />
                                            </h:commandLink>
                                        </h:panelGroup>

                                        <h:panelGroup class="vpadding" layout="block" rendered="#{UCDDialog.suggestedUCDs.size() gt 0}">
                                            <label class="control-label">Other suggested UCD:</label>
                                            <ui:repeat value="#{UCDDialog.suggestedUCDs}" var="ucdInfo">
                                                <div class="input-group">
                                                    <span class="input-group-addon">#{ucdInfo.score}</span>
                                                    <span class="input-group-addon flag#{ucdInfo.flag}">#{ucdInfo.flag}</span>
                                                    <h:commandLink class="form-control text-left btn-default selectUCD" action="#{UCDDialog.selectUCD(ucdInfo.word)}">
                                                        <span class="resultWord">#{ucdInfo.word}</span>
                                                        <f:ajax execute="@form" render="@form" />
                                                    </h:commandLink>
                                                    <span class="input-group-btn">
                                                        <h:commandLink class="btn btn-default" action="#{UCDDialog.explain(ucdInfo)}">
                                                            <span class="glyphicon glyphicon-question-sign"></span>
                                                            <f:ajax execute="@form" render="@form" />
                                                        </h:commandLink>
                                                    </span>
                                                </div>
                                                <h:panelGroup class="resultDefinition" layout="block" rendered="#{ucdInfo.definition ne null}">
                                                    <span class="help-block">#{ucdInfo.definition}</span>
                                                </h:panelGroup>
                                            </ui:repeat>
                                        </h:panelGroup>
                                </h:panelGroup>
                            <h:panelGroup class="modal-footer" id="ucdDialogFooter" layout="block">
                                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                                <h:commandButton id="save_ucd" class="btn btn-primary" disabled="#{UCDDialog.selectedUCD eq null and !UCDDialog.manualInsertion}" action="#{tapSchemaEditing.saveUCD()}" onclick="TSM.showLoading()" value="Save changes">
                                    <f:ajax execute="@form" render="@form main:column_ucd" onevent="TSM.saveUCDCalled" />
                            </h:panelGroup>

        <div class="modal fade" tabindex="-1" role="dialog" id="errorModal" data-backdrop="static">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title text-danger">
                            <span class="glyphicon glyphicon-alert"></span>
                            Error
                        </h4>
                    </div>
                    <div class="modal-body">
                        <p>An error occurred. The page will be reloaded.</p>
                        <div class="alert alert-danger" role="alert">
                            <p><strong class="errorName"></strong></p>
                            <p class="errorMessage"></p>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <h:form>
                            <h:commandLink class="btn btn-primary">Ok</h:commandLink>
                        </h:form>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal fade" tabindex="-1" role="dialog" id="updateSuccessModal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-body">
                        <div class="alert alert-success" role="alert">
                            <p>
                                <span class="glyphicon glyphicon-info-sign"></span>
                                TAP_SCHEMA successfully updated!
                            </p>
                        </div>
                        <div class="text-center">
                            <button type="button" class="btn btn-primary" data-dismiss="modal">Ok</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
Sonia Zorba's avatar
Sonia Zorba committed

        <div class="loading hide">
            <div class="icon-wrapper">
                <span class="glyphicon glyphicon-refresh animate-spin"></span>
            </div>
        </div>
    </ui:define>
</ui:composition>