-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
153 lines (121 loc) · 4 KB
/
index.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
<!DOCTYPE html>
<html><head>
<style type="text/css">
@import url(http://fonts.googleapis.com/css?family=Ubuntu:300);
body {
font-family: Ubuntu, Arial, sans-serif;
margin: 4em;
}
</style>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="out/data.js"></script>
<script type="text/javascript">
google.load('visualization', '1.0', {'packages':['corechart']});
google.setOnLoadCallback(draw);
function groupSize(data) {
var f = data.clone();
for (var i=0; i<f.getNumberOfRows(); i++) {
for (var j=1; j<=4; j++) {
var value = f.getValue(i, j);
var mb = value / 1024 / 1024;
f.setValue(i, j, mb);
f.setFormattedValue(i, j, parseInt(mb).toString() + ' MB')
}
}
return f;
}
function draw() {
var data = getData();
new google.visualization.ColumnChart(document.getElementById('package-i386')).
draw(data['packages']['i386'],
{width: 800,
height: 400,
vAxis: {title: "Packages"},
hAxis: {title: "Releases"},
isStacked: true}
);
new google.visualization.ColumnChart(document.getElementById('size-i386')).
draw(groupSize(data['sizes']['i386']),
{width: 800,
height: 400,
vAxis: {title: "Size", format: "#,### MB"},
hAxis: {title: "Releases"},
isStacked: true}
);
new google.visualization.ColumnChart(document.getElementById('package-amd64')).
draw(data['packages']['amd64'],
{width: 800,
height: 400,
vAxis: {title: "Packages"},
hAxis: {title: "Releases"},
isStacked: true}
);
new google.visualization.ColumnChart(document.getElementById('size-amd64')).
draw(groupSize(data['sizes']['amd64']),
{width: 800,
height: 400,
vAxis: {title: "Size", format: "#,### MB"},
hAxis: {title: "Releases"},
isStacked: true}
);
new google.visualization.ColumnChart(document.getElementById('package-armel')).
draw(data['packages']['armel'],
{width: 800,
height: 400,
vAxis: {title: "Packages"},
hAxis: {title: "Releases"},
isStacked: true}
);
new google.visualization.ColumnChart(document.getElementById('size-armel')).
draw(groupSize(data['sizes']['armel']),
{width: 800,
height: 400,
vAxis: {title: "Size", format: "#,### MB"},
hAxis: {title: "Releases"},
isStacked: true}
);
new google.visualization.ColumnChart(document.getElementById('package-armhf')).
draw(data['packages']['armhf'],
{width: 800,
height: 400,
vAxis: {title: "Packages"},
hAxis: {title: "Releases"},
isStacked: true}
);
new google.visualization.ColumnChart(document.getElementById('size-armhf')).
draw(groupSize(data['sizes']['armhf']),
{width: 800,
height: 400,
vAxis: {title: "Size", format: "#,### MB"},
hAxis: {title: "Releases"},
isStacked: true}
);
}
document.onload = function() {
start();
}
</script>
</head><body>
<h1>BlankOn Repository: Packages and Sizes</h1>
<h2>i386</h2>
<h3>Total Packages</h3>
<div id="package-i386"></div>
<h3>Total Package Size</h3>
<div id="size-i386"></div>
<h2>amd64</h2>
<h3>Total Packages</h3>
<div id="package-amd64"></div>
<h3>Total Package Size</h3>
<div id="size-amd64"></div>
<h2>armel</h2>
<h3>Total Packages</h3>
<div id="package-armel"></div>
<h3>Total Package Size</h3>
<div id="size-armel"></div>
<h2>armhf</h2>
<h3>Total Packages</h3>
<div id="package-armhf"></div>
<h3>Total Package Size</h3>
<div id="size-armhf"></div>
<a href="https://github.com/BlankOn/vis-blankon-pkg"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
</body></html>