-
Notifications
You must be signed in to change notification settings - Fork 0
/
resulttable.tag
57 lines (52 loc) · 1.37 KB
/
resulttable.tag
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
<resulttable>
<div class="panel panel-default table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th style="width: 35%;">{ thCol1 }</th>
<th>{ thCol2 }</th>
<th style="width: 10em;">{ thCol3 }</th>
</tr>
</thead>
<tbody>
<tr if="{ !data || Object.keys(data).length === 0 }">
<td>{ resultsMessage }</td>
<td></td>
<td></td>
</tr>
<tr each="{ deadResources, foundOnURL in data }">
<td><a href="{ foundOnURL }" target="_blank">{ foundOnURL }</a></td>
<td colspan="2">
<div class="panel panel-default" style="margin-bottom: 0;">
<table class="table">
<tr each="{ deadResource in deadResources }">
<td><a href="{ deadResource.URL }" target="_blank">{ deadResource.URL }</a></td>
<td style="width: 9em;">{ deadResource.StatusCode }</td>
</tr>
</table>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>{ thCol1 }</th>
<th>{ thCol2 }</th>
<th>{ thCol3 }</th>
</tr>
</tfoot>
</table>
</div>
<script>
var self = this;
self.thCol1 = opts.thCol1;
self.thCol2 = opts.thCol2;
self.thCol3 = opts.thCol3;
self.resultsMessage = opts.resultsMessage;
self.data = opts.data;
self.on('update', function() {
self.resultsMessage = opts.resultsMessage;
self.data = opts.data;
});
</script>
</resulttable>