Skip to content

Commit 88a5082

Browse files
author
Vaibhav Jayaraman
committed
addressed review comments
1 parent cf1bede commit 88a5082

File tree

6 files changed

+19
-33
lines changed

6 files changed

+19
-33
lines changed

ocfweb/main/home.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from ocfweb.component.lab_status import get_lab_status
1313

1414

15-
@periodic(60)
15+
@periodic(60, ttl=86400)
1616
def get_staff_hours():
1717
return get_staff_hours_soonest_first()[:2]
1818

ocfweb/main/templates/main/staff-hours.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ <h2>Have questions? Drop by for help from a friendly volunteer staffer!</h2>
1212
<div class = "day">
1313
<div class="daytitle">
1414
<strong><big>{{staff_day.day}}</big></strong>
15-
{%if staff_day.holiday != None %}
16-
<span class="cancelled-text"> {{staff_day.holiday}} </span>
15+
{%if staff_day.holiday is not None %}
16+
<span class="cancelled-text">{{staff_day.holiday}}</span>
1717
{% endif %}
1818
</div>
1919
{% for staff_hour in staff_day.hours %}
@@ -40,7 +40,6 @@ <h5>{{staffer.position}}</h5>
4040
</div>
4141
{% endfor %}
4242
</div>
43-
</script>
4443
<div class="col-sm-4 ocf-sidebar">
4544
<h4>Open Computing Facility Lab</h4>
4645
<p>{% google_map '100%' '250px' %}</p>
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
from django import template
22

3-
from ocfweb.templatetags.lab_hours import lab_hours_holiday as holiday_hours
4-
53
register = template.Library()
64

75

86
@register.filter
97
def gravatar(staffer, size):
108
return staffer.gravatar(size)
11-
12-
13-
@register.filter
14-
def lab_holidays(hours):
15-
return holiday_hours(hours)
16-
17-
18-
@register.filter
19-
def get_bio(staffer):
20-
return staffer.get_bio()

ocfweb/static/js/site.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ $(document).ready(function() {
66
$('body').css('margin-bottom', height);
77
};
88

9-
$('[data-toogle="tooltip"]').tooltip();
10-
119
$(window).resize(function() {
1210
clearTimeout(resizeTimeout);
1311
setTimeout(updateFooterHeight, 10);
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
.mirrors-pie-chart {
2-
width: 1100px;
3-
height: 500px;
4-
padding: 10px;
5-
margin: 0;
6-
}
1+
.page-stats_mirrors {
2+
.mirrors-pie-chart {
3+
width: 1100px;
4+
height: 500px;
5+
padding: 10px;
6+
margin: 0;
7+
}
78

8-
.mirrors-mirror-usage {
9-
width: 1100px;
10-
height: 500px;
11-
padding: 10px;
12-
margin: 0;
9+
.mirrors-mirror-usage {
10+
width: 1100px;
11+
height: 500px;
12+
padding: 10px;
13+
margin: 0;
14+
}
1315
}

ocfweb/stats/templates/stats/mirrors.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@
88
{% stats_navbar %}
99
<h2> Bandwidth usage per mirrored project </h2>
1010
<div class="mirrors-pie-chart">
11-
<iframe src="https://metabase.ocf.berkeley.edu/public/question/b8783817-1e98-4658-ae8a-2826dbeff4ab" frameborder="0" width="100%" height="100%"allowtransparen></iframe>
11+
<iframe src="https://metabase.ocf.berkeley.edu/public/question/b8783817-1e98-4658-ae8a-2826dbeff4ab" frameborder="0" width="100%" height="100%" allowtranspareny></iframe>
1212
</div>
1313
<div class= "mirrors-mirror-usage">
14-
<iframe src="https://metabase.ocf.berkeley.edu/public/question/23f5e403-315c-432e-ae9f-3db0970517f7"
15-
frameborder="0"width="100%"height="100%"allowtransparency></iframe>
14+
<iframe src="https://metabase.ocf.berkeley.edu/public/question/23f5e403-315c-432e-ae9f-3db0970517f7" frameborder="0" width="100%" height="100%" allowtransparency></iframe>
1615
</div>
1716
<div class="row">
1817
<div class="col-md-6">
1918
<h4> Bandwidth Usage Since {{ start_date }} </h4>
20-
<br/>
19+
<br />
2120
<table class="table table-striped table-hover">
2221
<tr>
2322
<th> Mirrored Project </th>

0 commit comments

Comments
 (0)