-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable.html
157 lines (147 loc) · 6.9 KB
/
table.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Conan | bzip2/1.0.8</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap.min.css"/>
<style>
tr td {
white-space:nowrap;
}
</style>
</head>
<body>
<div class="container-fluid">
<h1>bzip2/1.0.8</h1>
<div class="info">
<p>
Depending on your package_id_mode, any combination of settings, options and requirements
can give you a different packageID. Take into account that your configuration might be
different from the one used to generate the packages.
</p>
</div>
<!-- Button trigger modal -->
<span id="filterProfileButton"> |
<button type="button" class="btn btn-link" data-toggle="modal" data-target="#filterProfile">
Filter using profile
</button>
</span>
<!-- Modal -->
<div class="modal fade" id="filterProfile" tabindex="-1" role="dialog" aria-labelledby="filterProfileLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="filterProfileLabel">Filter results</h4>
</div>
<div class="modal-body">
<p>Copy and paste here the content of a Conan profile:</p>
<form>
<div class="form-group">
<textarea id="filterProfileValue" class="form-control" rows="8" placeholder="[settings] os=Macos arch=x86_64 compiler=apple-clang compiler.version=11.0 compiler.libcxx=libc++ build_type=Release"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" onclick="apply_profile_filter()">Apply filter</button>
</div>
</div>
</div>
</div>
<table id="results" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th class="text-center" rowspan="2" colspan="1">
remote
</th>
<th class="text-center" rowspan="2" colspan="1">
package_id
</th>
<th class="text-center" rowspan="2" colspan="1">
outdated
</th>
<th class="text-center" rowspan="1" colspan="0">
options
</th>
</tr>
<tr>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<th>remote</th>
<th>package_id</th>
<th>outdated</th>
</tr>
</tfoot>
</table>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.21/js/dataTables.bootstrap.min.js"></script>
<script>
$(document).ready(function() {
// Setup - add a text input to each footer cell
$('#results tfoot th').each( function () {
var title = $(this).text();
var title_id = title.replace('.', '_');
$(this).html( '<input type="text" id="filter-input-'+title_id+'" class="form-control filter-input" placeholder="Filter '+title+'" style="width:100%"/>' );
});
var table = $('#results').DataTable( {
"dom": "lrtip",
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"pageLength": 10,
"columnDefs": [
{ className: "cell_border_right", "targets": [ 2, 2 ] },
{ className: "cell_border_right monospaced", "targets": [2, ]}
]
});
// Apply the search
table.columns().every( function () {
var that = this;
$( 'input', this.footer() ).on( 'keyup change clear', function () {
if ( that.search() !== this.value ) {
that
.search( this.value )
.draw();
}
} );
} );
// Add filter profile to
$("#filterProfileButton").appendTo("#results_length");
});
function apply_profile_filter() {
// Parse the profile input
var profile_txt = $("#filterProfileValue").val();
var regex = {
section: /^\s*\[\s*([^\]]*)\s*\]\s*$/,
param: /^\s*([^=]+?)\s*=\s*(.*?)\s*$/
};
profile_txt.split(/[\r\n]+/).forEach( function(line) {
if(regex.param.test(line)){
var match = line.match(regex.param);
var field_id = '#filter-input-'+match[1].replace('.', '_');
$(field_id).val(match[2]);
$(field_id).keyup();
}
});
$('#filterProfile').modal('hide');
}
</script>
</div>
</body>
<footer>
<div class="container-fluid">
<div class="info">
<p>
Conan <b>v1.53.0</b> <script>document.write(new Date().getFullYear())</script> JFrog LTD. <a>https://conan.io</a>
</p>
</div>
</div>
</footer>
</html>