Repository navigation
Expand file tree
/
Copy pathlistinstanceextensions.php
More file actions
104 lines (93 loc) · 3.48 KB
/
Copy pathlistinstanceextensions.php
File metadata and controls
104 lines (93 loc) · 3.48 KB
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
<?php
/**
*
* Vulkan hardware capability database server implementation
*
* Copyright (C) 2016-2026 by Sascha Willems (www.saschawillems.de)
*
* This code is free software, you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public
* License version 3 as published by the Free Software Foundation.
*
* Please review the following information to ensure the GNU Lesser
* General Public License version 3 requirements will be met:
* http://www.gnu.org/licenses/agpl-3.0.de.html
*
* The code is distributed WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU AGPL 3.0 for more details.
*
*/
require 'pagegenerator.php';
require './database/database.class.php';
require './database/sqlrepository.php';
require './includes/functions.php';
require './includes/filterlist.class.php';
$filter_list = new FilterList(FilterList::DefaultQuickFilters);
PageGenerator::header("Instance extensions");
$platform = PageGenerator::getDefaultOSSelection();
PageGenerator::pageCaption("Listing available instance extensions");
?>
<center>
<?php PageGenerator::platformNavigation('listinstanceextensions.php', $platform, true); ?>
<div class='tablediv' style='width:auto; display: inline-block;'>
<?php $filter_list->addDefaultFilterOptions() ?>
<table id="extensions" class="table table-striped table-bordered table-hover responsive" style='width:auto;'>
<thead>
<tr>
<th></th>
<th colspan=2 class="centered">Device coverage</th>
</tr>
<tr>
<th>Extensions</th>
<th class="centered"><img src='images/icons/check.png' width=16px></th>
<th class="centered"><img src='images/icons/missing.png' width=16px></th>
<th class="centered"><abbr title="Date at when the extension was first submitted to the database for the current platform selection">First seen</abbr></th>
</tr>
</thead>
<tbody>
<?php
DB::connect();
$start = microtime(true);
try {
$instanceextensions = SqlRepository::listInstanceExtensions();
foreach($instanceextensions as $instanceextension) {
$extensionname = $instanceextension['name'];
$coverageLink = "listreports.php?instanceextension=$extensionname&platform=$platform";
$coverage = $instanceextension['coverage'];
echo "<tr>";
echo "<td class='value'>$extensionname</td>";
echo "<td class='text-center'><a class='supported' href='$coverageLink'>" . round($coverage, 2) . "<span style='font-size:10px;'>%</span></a></td>";
echo "<td class='text-center'><a class='na' href='$coverageLink&option=not'>" . round(100 - $coverage, 2) . "<span style='font-size:10px;'>%</span></a></td>";
echo "<td class='value'>".$instanceextension['date']."</td>";
echo "</tr>";
}
} catch (PDOException $e) {
echo "<b>Error while fetching data!</b><br>";
}
DB::log('listinstanceextensions.php', null, (microtime(true) - $start) * 1000);
DB::disconnect();
?>
</tbody>
</table>
</div>
<script>
$(document).ready(function() {
var table = $('#extensions').DataTable({
"pageLength" : -1,
"paging" : false,
"stateSave": false,
"searchHighlight" : true,
"dom": 'f',
"bInfo": false,
"order": [[ 0, "asc" ]]
});
$("#searchbox").on("keyup search input paste cut", function() {
table.search(this.value).draw();
});
} );
</script>
<?php PageGenerator::footer(); ?>
</center>
</body>
</html>