Skip to content
consistencyChecks.xhtml 5.15 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">Consistency problems for #{consistency.tapSchema.name}</ui:define>
    <ui:define name="scripts">
        <h:outputScript library="js" name="keepalive.js"></h:outputScript>
        <script>startKeepAlive('${keepalive.restPath}', '${keepalive.conversationId}');</script>
    </ui:define>
    <ui:define name="content">
        <div class="container">
            <div class="row">
                <div class="col-xs-12">
                    <h1>Consistency problems detected in #{consistency.tapSchema.name}</h1>
                    <h:form id="main">

                        <h:panelGroup rendered="#{consistency.tapSchema.consistencyChecks.inconsistencies.size() gt 0}">
                            <h2>Inconsistent values</h2>
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>TAP_SCHEMA entity</th>
                                        <th>Name/Description</th>
                                        <th>Wrong field</th>
                                        <th>Wrong value</th>
                                        <th>Correct value</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <ui:repeat value="#{consistency.tapSchema.consistencyChecks.inconsistencies}" var="inconsistency">
                                        <tr>
                                            <td>${inconsistency.tapSchemaEntityType}</td>
                                            <td>${inconsistency.tapSchemaEntityDescription}</td>
                                            <td>${inconsistency.wrongPropertyName}</td>
                                            <td class="text-danger">${inconsistency.currentValue}</td>
                                            <td class="text-success">${inconsistency.correctValue}</td>
                                        </tr>
                                    </ui:repeat>
                                </tbody>
                            </table>
                        </h:panelGroup>

                        <h:panelGroup rendered="#{consistency.tapSchema.consistencyChecks.unexisingSchemas.size() gt 0}">
                            <h2>Missing schemas</h2>
                            <ul>
                                <ui:repeat value="#{consistency.tapSchema.consistencyChecks.unexisingSchemas}" var="schema">
                                    <li>${schema}</li>
                                </ui:repeat>
                            </ul>
                        </h:panelGroup>

                        <h:panelGroup rendered="#{consistency.tapSchema.consistencyChecks.unexisingTables.size() gt 0}">
                            <h2>Missing tables</h2>
                            <ul>
                                <ui:repeat value="#{consistency.tapSchema.consistencyChecks.unexisingTables}" var="table">
                                    <li>${table}</li>
                                </ui:repeat>
                            </ul>
                        </h:panelGroup>

                        <h:panelGroup rendered="#{consistency.tapSchema.consistencyChecks.unexisingColumns.size() gt 0}">
                            <h2>Missing columns</h2>
                            <ul>
                                <ui:repeat value="#{consistency.tapSchema.consistencyChecks.unexisingColumns}" var="column">
                                    <li>${column}</li>
                                </ui:repeat>
                            </ul>
                        </h:panelGroup>
                        <br/>

                        <div class="alert alert-warning text-center">
                            <span class="glyphicon glyphicon-warning-sign"></span>
                            <strong>If you proceed the TAP_SCHEMA Manager will fix these values.</strong>
                        </div>

                        <div class="text-center">
                            <h:commandLink action="#{consistency.back()}" class="btn btn-default">
                                <span class="glyphicon glyphicon-arrow-left"></span>
                                Back
                            </h:commandLink>
                            &#160;
Sonia Zorba's avatar
Sonia Zorba committed
                            <h:commandLink action="#{consistency.proceed()}" class="btn btn-primary" onclick="showWaiting()">
                                Proceed
                                <span class="glyphicon glyphicon-arrow-right"></span>
                            </h:commandLink>
                        </div>
                    </h:form>
                </div>
            </div>
        </div>

    </ui:define>
</ui:composition>