browse.jsp 9.95 KB
Newer Older
toaster's avatar
toaster committed
1
2
3
4
5
6
7
8
9
10
11
12
13

<%@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 uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@taglib uri="/WEB-INF/tlds/monitor" prefix="m"%> 
<!DOCTYPE html
14
15
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
toaster's avatar
toaster committed
16
17

<html>
18

toaster's avatar
toaster committed
19
20
21
22
23
24
25
26
27
28
29
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Browse Collection</title>
        <link rel="stylesheet" type="text/css" href="style.css" />
        <script type="text/javascript" SRC="srbFunctions.js" ></script>
        <style type="text/css">
            .directory {
                font-size: 12px;
                margin-left: 10px;
                white-space: nowrap;
            }
30
31


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
52
53
54
55
56
57
58
59
60
61
62
            #scrollDirectory {
                height: 400px;
                padding-left: 10px;
                padding-top: 10px;
                padding-bottom: 10px;
                width:250px;
                overflow: scroll;
                margin: 0 0 0 auto; 
            }
            #scrollContainer {
                border-right: 1px solid #000000;
                border-top: 1px solid #000000;
                padding-top: 10px;
                padding-bottom: 10px;
                width:265px;
                float: left;
            }
            #description {
                width: 460px;
                float: right;
                font-size: 14px;
                margin-left: 10px;
                margin-top: 10px;
                /**overflow: visible;*/
            }
            #description table {
                font-size: 12px;
            }
            #reptable {
                margin-top: 30px;
                width: 100%;
63

toaster's avatar
toaster committed
64
            }
65

toaster's avatar
toaster committed
66
67
68
            img {
                border: 0 0 0 0;
            }
69

toaster's avatar
toaster committed
70
71
72
73
74
75
76
77
78
79
80
            .statusM {
                color: #ff0000;
            }
            .statusT {
                color: #ff0000;
            }
            .statusC {
                color: #ff0000;
            }
            .badreplica {
            }
81

toaster's avatar
toaster committed
82
83
84
        </style>
    </head>
    <body>
85

toaster's avatar
toaster committed
86
        <jsp:include page="header.jsp" />
87

toaster's avatar
toaster committed
88
89
90
        <div id="scrollContainer">
            <div id="scrollDirectory">
                <c:forEach var="dir" items="${directoryTree.roots}">
91

toaster's avatar
toaster committed
92
                    <m:tree var="dn" node="${dir}">
93

toaster's avatar
toaster committed
94
95
96
97
                        <m:dirbegin>
                            <c:choose>
                                <c:when test="${dn.directory}">
                                    <a href="Browse?item=${dn.id}"><img src="images/folder.jpg" >&nbsp;<span class="status${dn.status}">${dn.name}</span></a><BR>
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
                                        <div class="directory">
                                        </c:when>
                                        <c:otherwise>
                                            <a href="Browse?item=${dn.id}"><img src="images/file.jpg">&nbsp;<span class="status${dn.status}">${dn.name}</span></a><br>
                                            </c:otherwise>
                                        </c:choose>
                                    </m:dirbegin>

                                    <m:dirend>
                                        <c:if test="${dn.directory}">
                                    </div>
                                </c:if>

                            </m:dirend>
                        </m:tree>
                    </c:forEach>
toaster's avatar
toaster committed
114
115
116
117
118
119
120
121
            </div>
        </div>
        <div id="description">
            <c:if test="${selectedFile != null}">
                <strong>${selectedFile.name}</strong>
                <table>
                    <tr><td>Last Checked</td><td>${selectedFile.root.lastVisited}</td></tr>
                    <tr><td>Last Seen Intact</td><td>${selectedFile.root.lastSeen}</td></tr>
122
                    <tr><td>Path</td><td>${selectedFile.root.path}</td></tr>
123
                    <c:if test="${!selectedFile.root.directory}"><tr><td>Size</td><td><m:FileSize value="${selectedFile.root.size}" /></td></tr></c:if>
toaster's avatar
toaster committed
124
125
126
                    <tr><td>State</td><td>
                            <c:choose>
                                <c:when test="${selectedFile.root.state eq 'A'}">
127
                                    <img src="images/file-ok.jpg"/>
128
129
130
131
132
133
134
135
136
137
                                    </c:when>
                                    <c:when test="${selectedFile.root.state eq 'C'}">
                                        Corrupt
                                    </c:when>
                                    <c:when test="${selectedFile.root.state eq 'T'}">
                                        Token Missing
                                    </c:when>
                                    <c:when test="${selectedFile.root.state eq 'M'}">
                                        File Missing
                                    </c:when>
138
139
140
                                    <c:when test="${selectedFile.root.state eq 'R'}">
                                        File Registered
                                    </c:when>
141
142
143
144
145
146
147
148
149
                                    <c:when test="${selectedFile.root.state eq 'P'}">
                                        Remote File Missing
                                    </c:when>
                                    <c:when test="${selectedFile.root.state eq 'D'}">
                                        Remote File Corrupt
                                    </c:when>
                                </c:choose>
                        </td></tr>
                        <c:if test="${!selectedFile.root.directory}">
toaster's avatar
toaster committed
150
151
                        <tr><td>Last Change</td><td>${selectedFile.root.stateChange}</td></tr>
                        <tr><td>${selectedFile.root.parentCollection.digestAlgorithm} Digest</td><td style="font-size: 10px;">${selectedFile.root.fileDigest}</td></tr>
152
                        <tr><td>Token Proof:</td><td style="font-size: 10px;">${selectedFile.itemProof}</td></tr>
toaster's avatar
toaster committed
153
154
                        <tr><td>Token Round:</td><td>${selectedFile.root.token.round}</td></tr>
                        <tr><td>Token Issued:</td><td>${selectedFile.root.token.createDate}</td></tr>
155
                        </c:if>
156

toaster's avatar
toaster committed
157
158
                </table>
                <c:if test="${!selectedFile.root.directory}">
159
160
161
162
163
164
165
166
167
                    <m:Auth role="Log">
                        <a href="EventLog?logpath=${selectedFile.root.path}&amp;clear=1">View Log</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    </m:Auth>
                    <m:Auth role="Download Token">
                        <c:if test="${selectedFile.root.token.id != null}">
                            <a href="DownloadToken?tokenid=${selectedFile.root.token.id}">View Token</a>&nbsp;&nbsp;&nbsp;&nbsp;
                        </c:if>
                    </m:Auth>
                    <m:Auth role="Download Item">
toaster's avatar
toaster committed
168
                        <c:if test="${selectedFile.root.parentCollection.settings['proxy.data']}">
169
170
171
172
173
174
                            <a href="Path/${selectedFile.root.parentCollection.name}${selectedFile.root.path}">Download Item</a>&nbsp;&nbsp;&nbsp;&nbsp;
                        </c:if>
                    </m:Auth>
                    <m:Auth role="Show Duplicates">
                        <a href="ShowDuplicates?itemid=${selectedFile.root.id}">View Duplicates</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    </m:Auth>
toaster's avatar
toaster committed
175
                </c:if>
176

toaster's avatar
toaster committed
177
                <c:if test="${!auditing}">
178
179
180
181
182
183
184
185
                    <m:Auth role="Remove Item">
                        <a href="RemoveItem?itemid=${selectedFile.root.id}">Remove</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    </m:Auth>
                    <m:Auth role="Audit">
                        <c:if test="${selectedFile.root.directory}">
                            <a href="StartSync?type=file&amp;collectionid=${selectedFile.root.parentCollection.id}&amp;itemid=${selectedFile.root.id}">Audit Files</a>&nbsp;&nbsp;&nbsp;&nbsp;
                        </c:if>
                    </m:Auth>
toaster's avatar
toaster committed
186
                </c:if>
187
188
                <m:Auth role="Summary">
                    <c:if test="${selectedFile.root.directory}">
189
                        <a href="Summary?collectionid=${selectedFile.root.parentCollection.id}&amp;itemid=${selectedFile.root.id}&amp;output=store">Download&nbsp;Token Store</a>&nbsp;&nbsp;&nbsp;&nbsp;
190
191
192
                        <a href="Summary?collectionid=${selectedFile.root.parentCollection.id}&amp;itemid=${selectedFile.root.id}&amp;output=digest">Download&nbsp;Digests</a>&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="Summary?collectionid=${selectedFile.root.parentCollection.id}&amp;itemid=${selectedFile.root.id}&amp;output=checkm">Checkm&nbsp;Manifest</a>&nbsp;&nbsp;&nbsp;&nbsp;

193
                        <c:if test="${selectedFile.root.parentCollection.settings['proxy.data']}">
194
195
                            <a href="Summary?collectionid=${selectedFile.root.parentCollection.id}&amp;itemid=${selectedFile.root.id}&amp;output=wget">Web&nbsp;Crawler&nbsp;URL&nbsp;List</a>
                        </c:if>
196

197
198
199
200
201
202
203
204
205
206
                        <!--
                        <br><br>
                        <FORM METHOD=POST ENCTYPE="multipart/form-data" ACTION="Compare">
                            <input type="hidden" name="collectionid" value="${workingCollection.collection.id}">
                            <input type="hidden" name="itemid" value="${selectedFile.root.id}">
                            Filter supplied file: <input type="text" NAME="filter" size="30" value="${selectedFile.root.path}"><br>
                            Manifest file to compare: <INPUT TYPE=FILE NAME="upfile"><BR><br>
                            <INPUT TYPE=SUBMIT VALUE="Submit">
                        </FORM>
                        -->
toaster's avatar
toaster committed
207
                    </c:if>
208
                </m:Auth>
toaster's avatar
toaster committed
209
210
211
            </c:if>
        </div>
        <jsp:include page="footer.jsp" />
212

toaster's avatar
toaster committed
213
214
    </body>
</html>