Update custom.html
parent
4d1209eec6
commit
0e483df1a3
|
|
@ -9,15 +9,14 @@
|
||||||
<div id="storageInfo"></div>
|
<div id="storageInfo"></div>
|
||||||
<div id="piechart" style="width: 900px; height: 500px;"></div>
|
<div id="piechart" style="width: 900px; height: 500px;"></div>
|
||||||
<script>
|
<script>
|
||||||
google.charts.load('current', {'packages':['corechart']});
|
|
||||||
google.charts.setOnLoadCallback(drawChart);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Called when we know what device we're using
|
// Called when we know what device we're using
|
||||||
function onInit(device) {
|
function onInit(device) {
|
||||||
//Util.showModal("Reading Storage...");
|
Util.showModal("Reading Storage...");
|
||||||
Puck.eval(`require("Storage").list(/\\.info$/).map(appInfoName => {
|
Puck.eval(`require("Storage").list(/\\.info$/).map(appInfoName => {
|
||||||
let appInfo = require("Storage").readJSON(appInfoName,1)||{};
|
let appInfo = require("Storage").readJSON(appInfoName,1)||{};
|
||||||
//print(appInfoName, appInfo);
|
//print(appInfoName, appInfo);
|
||||||
|
|
@ -75,7 +74,7 @@
|
||||||
|
|
||||||
var data = google.visualization.arrayToDataTable([
|
var data = google.visualization.arrayToDataTable([
|
||||||
${apps.map(app => `
|
${apps.map(app => `
|
||||||
[${app[0]},${app[1]+app[2]}
|
[${app[0]},${app[1]+app[2]}],
|
||||||
).join("")}
|
).join("")}
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
@ -90,7 +89,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
google.charts.load('current', {'packages':['corechart']});
|
||||||
|
google.charts.setOnLoadCallback(drawChart);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue