-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsample.html
262 lines (253 loc) · 9.2 KB
/
sample.html
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>jobCollection test app</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
</head>
<body>
</body>
<template name="master">
{{> top}}
{{> Template.dynamic template=nav data=navData}}
{{> Template.dynamic template=content data=contentData}}
</template>
<template name="top">
<div class="container panel">
<h3>fileCollection + jobCollection Test App</h3>
{{#if currentUser}}
<span class="pull-right"><b>UserId:</b> <span class="text-info">{{userId}}</span>
<b>Token:</b> <span class="text-info">{{loginToken}}</span></span>
{{/if}}
<div class="loginTemp">
{{> loginButtons align="right"}}
</div>
</div>
</template>
<template name="nav">
<div class="container panel">
<ul class="nav nav-pills">
<li class="{{active 'gallery'}}"><a href="/gallery">Gallery</a></li>
<li class="{{active 'files'}}"><a href="/files">Files</a></li>
<li class="{{active 'jobs'}}"><a href="/jobs">Jobs</a></li>
</ul>
</div>
</template>
<template name="gallery">
{{#with data}}
<div class="container panel panel-default">
<div class="panel-heading"><h4>Image gallery</h4></div>
<div class="panel-body {{root}}DropZone">
<div class="row equal">
{{#each dataEntries}}
<div class="col-sm-6 col-lg-2">
<div class="thumbnail">
{{#if isImage}}
{{#if thumb}}
<a href="{{../baseURL}}/id/{{id}}" target="_self"><img class="img-thumbnail" alt="{{altMessage}}" src="{{../baseURL}}/id/{{thumb}}"></a>
{{else}}
<a href="{{../baseURL}}/id/{{id}}" target="_self"><img class="img-thumbnail" alt="{{altMessage}}" src=""></a>
{{/if}}
{{else}}
<span class="text-muted text-center">No preview</span>
{{/if}}
<div class="caption text-center">{{shortFilename 16}}</div>
</div>
</div>
{{else}}
<div class="col-sm-12">
<div class="container">
<p class="lead text-info text-center ">No images in gallery, drag some image files here to upload</p>
</div>
</div>
{{/each}}
</div>
</div>
</div>
{{/with}}
</template>
<template name="fileControls">
<div class="panel-body">
<button type="button" class="btn btn-danger remove-files">
<span class="glyphicon glyphicon-remove"></span> Delete all
</button>
</div>
</template>
<template name="fileTable">
{{#with data}}
<div class="container panel panel-default">
<div class="panel-heading"><h4>File Collection</h4></div>
{{> fileControls}}
<div class="panel-body">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Name</th>
<th>ID</th>
<th>Owner</th>
<th>Size</th>
<th>Type</th>
<th>Checksum</th>
</tr>
</thead>
<tbody>
{{#each dataEntries}}
<tr>
<td>
<a href="{{../baseURL}}/id/{{id}}?download=true" target="_self">{{shortFilename 32}}</a>
<button type="button" class="close del-file" aria-hidden="true">×</button>
</td>
<td>{{id}}</td>
<td>
{{#if owner}}
{{owner}}
{{else}}
<span class="text-muted">No owner</span>
{{/if}}
</td>
<td>
{{#if length}}
{{formattedLength}}
{{else}}
{{uploadStatus}}
<div class="progress">
<div class="progress-bar" role="progressbar" min-width="60px" aria-valuenow="{{uploadProgress}}" aria-valuemin="0" aria-valuemax="100" style="width: {{uploadProgress}}%;">
<span class="text-muted">{{uploadProgress}}%</span>
</div>
</div>
{{/if}}
</td>
<td>{{contentType}}</td>
<td>{{md5}}</td>
</tr>
{{else}}
<tr><td colspan="20" align=center>
<span class="text-info">No files in collection...</span>
</td></tr>
{{/each}}
</tbody>
</table>
</div>
</div>
{{/with}}
</template>
<template name="jobControls">
<div class="panel-body">
<button type="button" class="btn btn-success clear-completed">
<span class="glyphicon glyphicon-ok"></span> Clear Completed
</button>
<button type="button" class="btn btn-default pause-queue" data-toggle="button">
<span class="glyphicon glyphicon-pause"></span> Pause all
</button>
<button type="button" class="btn btn-info restart-queue">
<span class="glyphicon glyphicon-repeat"></span> Restart all
</button>
<button type="button" class="btn btn-warning cancel-queue">
<span class="glyphicon glyphicon-ban-circle"></span> Cancel all
</button>
<button type="button" class="btn btn-danger remove-queue">
<span class="glyphicon glyphicon-remove"></span> Remove all
</button>
<button type="button" class="btn btn-danger pull-right stop-queue">
<span class="glyphicon glyphicon-off"></span> Shutdown Queue
</button>
</div>
</template>
<template name="jobTable">
{{#with data}}
<div class="container panel panel-default">
<div class="panel-heading"><h4>Job Collection</h4></div>
{{> jobControls}}
<div class="panel-body">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Type</th>
<th>ID</th>
<th>Run</th>
<th>Updated</th>
<th>Pri</th>
<th>Dep</th>
<th>Attempts</th>
<th>Repeats</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{{#each jobEntries}}
{{> jobEntry}}
{{else}}
<tr><td colspan="20" align=center>
<span class="text-info">No jobs in collection...</span>
</td></tr>
{{/each}}
</tbody>
</table>
</div>
</div>
{{/with}}
</template>
<template name="jobEntry">
<tr>
{{#with doc}}
<td>{{type}}</td>
<td>{{jobId}}</td>
<td class="{{futurePast}}">{{runAt}}</td>
<td>{{lastUpdated}}</td>
<td>{{priority}}</td>
<td>{{numDepends}} / {{numResolved}}</td>
<td>{{retried}} / {{numRetries}}</td>
<td>{{repeated}} / {{numRepeats}}</td>
<td>
{{#if running}}
<div class="progress">
<div class="progress-bar progress-bar-info" role="progressbar" min-width="60px" aria-valuenow="{{progress.percent}}" aria-valuemin="0" aria-valuemax="100" style="width: {{progress.percent}}%;">
<span class="text-primary text-center">{{progress.percent}}%</span>
</div>
</div>
{{else}}
<span class="label label-{{statusBG}}">{{status}}</span>
{{/if}}
</td>
<td class="button-column">
{{#if pausable}}
<button type="button" class="btn pause-job btn-default btn-xs" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Pause Job">
<span class="glyphicon glyphicon-pause"></span>
</button>
{{/if}}
{{#if resumable}}
<button type="button" class="btn resume-job btn-default btn-xs" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Resume Job">
<span class="glyphicon glyphicon-play"></span>
</button>
{{/if}}
{{#if restartable}}
<button type="button" class="btn restart-job btn-info btn-xs" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Restart Job">
<span class="glyphicon glyphicon-repeat"></span>
</button>
{{/if}}
{{#if rerunable}}
<button type="button" class="btn rerun-job btn-info btn-xs" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Rerun Job">
<span class="glyphicon glyphicon-refresh"></span>
</button>
{{/if}}
{{#if cancellable}}
<button type="button " class="btn cancel-job btn-warning btn-xs" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Cancel Job">
<span class="glyphicon glyphicon-ban-circle"></span>
</button>
{{/if}}
{{#if removable}}
{{#if rerunable}}
<button type="button" class="btn remove-job btn-success btn-xs" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Remove Job">
<span class="glyphicon glyphicon-ok"></span>
</button>
{{else}}
<button type="button" class="btn remove-job btn-danger btn-xs" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Remove Job">
<span class="glyphicon glyphicon-remove"></span>
</button>
{{/if}}
{{/if}}
</td>
{{/with}}
</tr>
</template>