forked from garbrand/HudsonDashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
charts.html
97 lines (84 loc) · 2.59 KB
/
charts.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
<!DOCTYPE html>
<html>
<head>
<title>Burndown</title>
<style type="text/css" media="screen">
html * {
padding: 0; margin: 0;
}
.pinned {
position: absolute; overflow: auto;
}
.height {
top: 0; bottom: 0;
}
.sides {
right: 0; left: 0;
}
#sheets {
display: none;
z-index: 1000;
}
#sheets iframe {
width: 100%; height: 100%;
}
#charts iframe {
width: 50%; height: 50%;
float: left;
}
</style>
</head>
<body>
<div class="viewport pinned height sides">
<div class="viewport pinned height sides" id="sheets">
<!-- ALL -->
<iframe frameborder='0' src='https://docs.google.com/spreadsheet/pub?key=0AoMLeMpVOVUCdHI0MnJueDNSWUEzNFJSTVVDZmNGc2c&output=html&widget=true'></iframe>
</div>
<div class="viewport pinned height sides" id="charts">
<!-- OPS -->
<iframe frameborder='0' src='https://docs.google.com/spreadsheet/pub?key=0AoMLeMpVOVUCdHI0MnJueDNSWUEzNFJSTVVDZmNGc2c&single=true&gid=11&output=html&widget=true'></iframe>
<!-- Burndown -->
<iframe frameborder='0' src='https://docs.google.com/spreadsheet/pub?key=0AoMLeMpVOVUCdHI0MnJueDNSWUEzNFJSTVVDZmNGc2c&single=true&gid=2&output=html&widget=true'></iframe>
<!-- Unplanned -->
<iframe frameborder='0' src='https://docs.google.com/spreadsheet/pub?key=0AoMLeMpVOVUCdHI0MnJueDNSWUEzNFJSTVVDZmNGc2c&single=true&gid=6&output=html&widget=true'></iframe>
<!-- Story Points -->
<iframe frameborder='0' src='https://docs.google.com/spreadsheet/pub?key=0AoMLeMpVOVUCdHI0MnJueDNSWUEzNFJSTVVDZmNGc2c&single=true&gid=9&output=html&widget=true'></iframe>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
bindKeys();
// poll();
function toggle() {
$('#sheets').toggle();
}
function bindKeys() {
$('body').keypress(function(event, ui) {
console.log(event.which);
// SHIFT + S: toggle views
if(event.which == 83 && event.shiftKey) toggle();
// SHIFT + R: reload charts
if(event.which == 10 && events.shiftKey) reload();
});
};
function reload() {
var $iframes = $('iframe');
var $this;
$.each($iframes, function() {
$this = $(this);
console.log($this.attr('src'));
$this.attr('src', $this.attr('src'));
});
};
function poll() {
var timer = 10 * 1000;
var id = setInterval(function() {
reload();
}, timer);
console.log('polling with id', id, 'with interval', timer);
};
});
</script>
</body>
</html>