report.jsp 6.56 KB
Newer Older
toaster's avatar
toaster committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136

<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib tagdir="/WEB-INF/tags" prefix="h" %>


<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Collection Errors</title>
        <link rel="stylesheet" type="text/css" href="style.css" />
        <style type="text/css">
            #summaryTable {
                margin-left: 50px;
                margin-right: auto;
            }
            .lblTd {
                padding-left: 50px;
            }
            .dataTd {
                padding-left: 10px;
            }
            #reportTable {
                width: 90%;
                margin-left: auto;
                margin-right: auto;
                margin-top: 20px;
                margin-bottom: 10px;
                border-left: 1px solid #000000;
                border-right: 1px solid #000000;
                border-top: 1px solid #000000;
                border-bottom: 1px solid #000000;

            }
            #reportTable thead {
                border-bottom: 1px solid #000000;
                background-color: #e8e8e8;
            }
            #navtable {
                width: 100%;
            }
            .datecol {
                width: 150px;
            }
            .tblLinks {
                padding-left: 50px;
            }

        </style>
    </head>
    <body>
        <jsp:include page="header.jsp" />

        <table id="summaryTable">
            <tr>
                <td class="lblTd">Active Files</td>
                <td class="dataTd"><h:DefaultValue test="${collection.activeFiles > -1}" success="${collection.activeFiles}" failure="0"/></td>
                <td class="lblTd">Corrupt Remote Files</td>
                <td class="dataTd"><h:DefaultValue test="${collection.remoteCorrupt > -1}" success="${collection.remoteCorrupt}" failure="0"/></td>
                <td class="lblTd">Files without Tokens</td>
                <td class="dataTd"><h:DefaultValue test="${collection.missingTokens} > -1}" success="${collection.missingTokens}" failure="0"/></td>

            </tr>
            <tr>
                <td class="lblTd">Missing Files</td>
                <td class="dataTd"><h:DefaultValue test="${collection.missingFiles > -1}" success="${collection.missingFiles}" failure="0"/></td>
                <td class="lblTd">Missing Remote Files</td>
                <td class="dataTd"><h:DefaultValue test="${collection.remoteMissing > -1}" success="${collection.remoteMissing}" failure="0"/></td>
                <td class="lblTd">Files with possible corrupt digests</td>
                <td class="dataTd"><h:DefaultValue test="${collection.invalidDigests > -1}" success="${collection.invalidDigests}" failure="0"/></td>
            </tr>
            <tr>
                <td class="lblTd">Corrupt Files</td>
                <td class="dataTd"><h:DefaultValue test="${collection.corruptFiles > -1}" success="${collection.corruptFiles}" failure="0"/></td>
            </tr>
            <tr>
                <td class="tblLinks"><a href="Report?collectionid=${collection.collection.id}&amp;text=1&amp;count=-1">Download List</a></td>
                <td class="tblLinks"><a href="StartSync?collectionid=${collection.collection.id}&amp;type=corrupt">Audit Corrupt Files</a></td>
            </tr>
        </table>

        <table id="reportTable">
            <thead>
                <tr>
                    <td>State</td>
                    <td>Path</td>
                    <td>Last Seen</td>
                    <td></td>
                </tr>
            </thead>
            <c:forEach var="item" items="${items}">
                <tr>
                    <td>
                        <c:choose>
                            <c:when test="${item.state eq 'C'}">
                                Corrupt
                            </c:when>
                            <c:when test="${item.state eq 'T'}">
                                Token Missing
                            </c:when>
                            <c:when test="${item.state eq 'M'}">
                                File Missing
                            </c:when>
                            <c:when test="${item.state eq 'I'}">
                                Token Corrupt
                            </c:when>
                            <c:when test="${item.state eq 'P'}">
                                Remote Missing
                            </c:when>
                            <c:when test="${item.state eq 'D'}">
                                Remote Corrupt
                            </c:when>
                            <c:otherwise>
                                ${item.state}
                            </c:otherwise>
                        </c:choose>
                    </td>
                    <td>

                        <c:choose>
                            <c:when test="${item.directory}"><span><img src="images/folder.jpg"/>${item.path}</span></c:when>
                            <c:otherwise><span><img src="images/file.jpg" alt=""/>${fn:replace(item.path, "/", "&#x200B;/")}</span></c:otherwise>
                        </c:choose>
                    </td>
                    <td class="datecol"><span>${fn:replace(item.lastSeen, " ", "&nbsp;")}</span></td>
137
                    <td><a href="EventLog?logpath=${item.path}">log</a> <a href="RemoveItem?itemid=${item.id}&amp;redirect=Report%3Fcollectionid=${collection.collection.id}">remove</a> </td>
toaster's avatar
toaster committed
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
                </tr>
            </c:forEach>
            <tr><td colspan="5">
                    <table id="navtable">
                        <tr>
                            <td>
                                <a href="Report?top=${items[0].id}&collectionid=${collection.collection.id}&count=${count}">&lt;&lt;</a></td>
                            <td align="center">Only items with errors are listed</td>
                            <td align="right"><a href="Report?start=${next}&collectionid=${collection.collection.id}&count=${count}">&gt;&gt;</a></td>
                        </tr>
                    </table>
                </td></tr>
        </table>



        <jsp:include page="footer.jsp" />
    </body>
</html>