report.jsp 9.8 KB
Newer Older
toaster's avatar
toaster committed
1
2
3
4
5
6
7

<%@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.
--%>
8
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
toaster's avatar
toaster committed
9
10
11
12
13
14
15
16
17
18
19
20
21
<%@ 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>
22
23
24
        <jsp:include page="imports.jsp"/>
        <!--<script src="jquery-1.7.1.min.js" type="text/javascript"></script> -->

toaster's avatar
toaster committed
25
        <style type="text/css">
26
27
28
29
30
31
            body {
                width: 752px !important;
                margin-top: 8px !important;
                padding-right: 0px !important;
            }

toaster's avatar
toaster committed
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
            #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;
52
                border-collapse: separate;
toaster's avatar
toaster committed
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
            }
            #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>
97
                <td class="tblLinks"><a href="EventLog?sessionId=${session}">Recent Events</a></td>
toaster's avatar
toaster committed
98
99
100
            </tr>
        </table>

101
            <span>Select All:&nbsp;</span> <input type="checkbox" id="selectall"/>
sashah's avatar
sashah committed
102
103
104
105

        <form method="GET" action="RemoveItem">
            <input type="hidden" name="redirect" value="Report"/>
            <input type="hidden" name="collectionid" value="${collection.collection.id}" />
toaster's avatar
toaster committed
106
107
108
        <table id="reportTable">
            <thead>
                <tr>
sashah's avatar
sashah committed
109
                    <td>Remove</td>
toaster's avatar
toaster committed
110
111
112
113
114
115
116
117
                    <td>State</td>
                    <td>Path</td>
                    <td>Last Seen</td>
                    <td></td>
                </tr>
            </thead>
            <c:forEach var="item" items="${items}">
                <tr>
sashah's avatar
sashah committed
118
                    <td>
119
                          <input type="checkbox" name="removal" id="removal" value="${item.id}" />
sashah's avatar
sashah committed
120
                    </td>
toaster's avatar
toaster committed
121
122
                    <td>
                        <c:choose>
123
                            <c:when test="${item.stateAsString eq 'C'}">
toaster's avatar
toaster committed
124
125
                                Corrupt
                            </c:when>
126
                            <c:when test="${item.stateAsString eq 'T'}">
toaster's avatar
toaster committed
127
128
                                Token Missing
                            </c:when>
129
                            <c:when test="${item.stateAsString eq 'M'}">
toaster's avatar
toaster committed
130
131
                                File Missing
                            </c:when>
132
                            <c:when test="${item.stateAsString eq 'I'}">
toaster's avatar
toaster committed
133
134
                                Token Corrupt
                            </c:when>
135
                            <c:when test="${item.stateAsString eq 'P'}">
toaster's avatar
toaster committed
136
137
                                Remote Missing
                            </c:when>
138
                            <c:when test="${item.stateAsString eq 'D'}">
toaster's avatar
toaster committed
139
140
                                Remote Corrupt
                            </c:when>
141
                            <c:when test="${item.stateAsString eq 'R'}">
142
143
                                File Registered
                            </c:when>
toaster's avatar
toaster committed
144
145
146
147
148
149
150
151
152
153
154
155
156
                            <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>
157
                    <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
158
159
160
161
162
163
164
165
166
167
168
169
170
                </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>
171
172
173
174
        <!-- Button trigger modal -->
        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" style="width: 25%">
            Remove Selected
        </button>
toaster's avatar
toaster committed
175

176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
        <!-- Modal -->
        <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalLabel">Confirmation</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <h6 class="modal-body">
                        Submitting will remove all selected items and their tokens from tracking in ACE.
                        <br><br>
                        Continue?
                    </h6>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                        <button type="submit" class="btn btn-primary" onclick="docment.location = 'report.jsp">Submit</button>
                    </div>
                </div>
            </div>
        </div>
        </form>
toaster's avatar
toaster committed
199
200

        <jsp:include page="footer.jsp" />
201
202
203
204
205
206
207
208
209
        <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>

        <script type="text/javascript">
            $("#selectall").click(function() {
                $("input[name=removal]").prop('checked', $(this).prop("checked"));
            });
        </script>
toaster's avatar
toaster committed
210
211
    </body>
</html>