1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/development/charts/table/index.html
2022-07-20 19:33:16 +04:00

68 lines
1.5 KiB
HTML

<html>
<head>
<script type="text/javascript" src="./jquery.min.js"></script>
<style>
table {
border: 1px solid black;
border-collapse: collapse;
}
tr {
border: 1px solid black;
}
</style>
<script>
$(function () {
var loadTime = [];
$.getJSON('stats.json', function (data) {
$.each(data.children, function (index, datum) {
if (datum.name) {
var tblRow =
'<tr>' +
'<td>' +
index +
'</td>' +
'<td>' +
datum.name +
'</td>' +
'<td>' +
datum.value +
'</td>' +
'</tr>';
$(tblRow).appendTo('#loaddata tbody');
}
});
$(
'<tr>' +
'<td>' +
'Total' +
'</td>' +
'<td>' +
'--' +
'</td>' +
'<td>' +
data.value +
'</td>' +
'</tr>',
).appendTo('#loaddata tbody');
});
});
</script>
</head>
<body>
<div class="wrapper">
<div class="profile">
<table id="loaddata">
<thead>
<th>S.No</th>
<th>Name</th>
<th>TotalTime</th>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</body>
</html>