Skip to content

Commit

Permalink
addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhav Jayaraman committed Apr 13, 2018
1 parent cf1bede commit 88a5082
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 33 deletions.
2 changes: 1 addition & 1 deletion ocfweb/main/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ocfweb.component.lab_status import get_lab_status


@periodic(60)
@periodic(60, ttl=86400)
def get_staff_hours():
return get_staff_hours_soonest_first()[:2]

Expand Down
5 changes: 2 additions & 3 deletions ocfweb/main/templates/main/staff-hours.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ <h2>Have questions? Drop by for help from a friendly volunteer staffer!</h2>
<div class = "day">
<div class="daytitle">
<strong><big>{{staff_day.day}}</big></strong>
{%if staff_day.holiday != None %}
<span class="cancelled-text"> {{staff_day.holiday}} </span>
{%if staff_day.holiday is not None %}
<span class="cancelled-text">{{staff_day.holiday}}</span>
{% endif %}
</div>
{% for staff_hour in staff_day.hours %}
Expand All @@ -40,7 +40,6 @@ <h5>{{staffer.position}}</h5>
</div>
{% endfor %}
</div>
</script>
<div class="col-sm-4 ocf-sidebar">
<h4>Open Computing Facility Lab</h4>
<p>{% google_map '100%' '250px' %}</p>
Expand Down
12 changes: 0 additions & 12 deletions ocfweb/main/templatetags/staff_hours.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
from django import template

from ocfweb.templatetags.lab_hours import lab_hours_holiday as holiday_hours

register = template.Library()


@register.filter
def gravatar(staffer, size):
return staffer.gravatar(size)


@register.filter
def lab_holidays(hours):
return holiday_hours(hours)


@register.filter
def get_bio(staffer):
return staffer.get_bio()
2 changes: 0 additions & 2 deletions ocfweb/static/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ $(document).ready(function() {
$('body').css('margin-bottom', height);
};

$('[data-toogle="tooltip"]').tooltip();

$(window).resize(function() {
clearTimeout(resizeTimeout);
setTimeout(updateFooterHeight, 10);
Expand Down
24 changes: 13 additions & 11 deletions ocfweb/static/scss/pages/_mirrors.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
.mirrors-pie-chart {
width: 1100px;
height: 500px;
padding: 10px;
margin: 0;
}
.page-stats_mirrors {
.mirrors-pie-chart {
width: 1100px;
height: 500px;
padding: 10px;
margin: 0;
}

.mirrors-mirror-usage {
width: 1100px;
height: 500px;
padding: 10px;
margin: 0;
.mirrors-mirror-usage {
width: 1100px;
height: 500px;
padding: 10px;
margin: 0;
}
}
7 changes: 3 additions & 4 deletions ocfweb/stats/templates/stats/mirrors.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
{% stats_navbar %}
<h2> Bandwidth usage per mirrored project </h2>
<div class="mirrors-pie-chart">
<iframe src="https://metabase.ocf.berkeley.edu/public/question/b8783817-1e98-4658-ae8a-2826dbeff4ab" frameborder="0" width="100%" height="100%"allowtransparen></iframe>
<iframe src="https://metabase.ocf.berkeley.edu/public/question/b8783817-1e98-4658-ae8a-2826dbeff4ab" frameborder="0" width="100%" height="100%" allowtranspareny></iframe>
</div>
<div class= "mirrors-mirror-usage">
<iframe src="https://metabase.ocf.berkeley.edu/public/question/23f5e403-315c-432e-ae9f-3db0970517f7"
frameborder="0"width="100%"height="100%"allowtransparency></iframe>
<iframe src="https://metabase.ocf.berkeley.edu/public/question/23f5e403-315c-432e-ae9f-3db0970517f7" frameborder="0" width="100%" height="100%" allowtransparency></iframe>
</div>
<div class="row">
<div class="col-md-6">
<h4> Bandwidth Usage Since {{ start_date }} </h4>
<br/>
<br />
<table class="table table-striped table-hover">
<tr>
<th> Mirrored Project </th>
Expand Down

0 comments on commit 88a5082

Please sign in to comment.