highlight when integrated_gate data is out of date
Change-Id: I2f37ddf7612f3771e34a287dd061c67a4008e680
This commit is contained in:
parent
d0bcc8fa75
commit
a5192cf8c4
@ -55,6 +55,20 @@ function update_critical_dates(data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function alert_old_generated_date() {
|
||||||
|
var now = new Date();
|
||||||
|
var generated_date = Date.parse($('#generated-date').text());
|
||||||
|
var delta_hours = (now - generated_date) / 60 / 60 / 1000;
|
||||||
|
if (delta_hours > 0) {
|
||||||
|
var div = $('#generated-date');
|
||||||
|
div.css('color', 'red');
|
||||||
|
div.css('font-weight', 'bold');
|
||||||
|
var old_text = $('#generated-date').text;
|
||||||
|
div.text("Data is old: " + old_text);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function update_health(data) {
|
function update_health(data) {
|
||||||
var health = $('#health');
|
var health = $('#health');
|
||||||
health.text(data['status']);
|
health.text(data['status']);
|
||||||
|
@ -118,3 +118,6 @@ Overall Categorization Rate: {{ rate['overall'] }}%
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
alert_old_generated_date();
|
||||||
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user