Skip to content

Commit

Permalink
Merge branch 'ft-frequent-notifications-150798553' of https://github.…
Browse files Browse the repository at this point in the history
…com/andela/healthchecks-invincibles into ft-frequent-notifications-150798553
  • Loading branch information
kaka-ruto committed Sep 15, 2017
2 parents 1f2ace9 + 25efc66 commit 13ee7e4
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 3 deletions.
25 changes: 25 additions & 0 deletions hc/api/migrations/0027_auto_20170914_0715.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-09-14 07:15
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('api', '0026_auto_20160415_1824'),
]

operations = [
migrations.AddField(
model_name='check',
name='often',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='check',
name='status',
field=models.CharField(choices=[('up', 'Up'), ('down', 'Down'), ('new', 'New'), ('paused', 'Paused'), ('often', 'Often')], default='new', max_length=6),
),
]
3 changes: 0 additions & 3 deletions hc/settings.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
"""
Django settings for hc project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
Expand Down
15 changes: 15 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
astroid==1.5.3
appnope==0.1.0
bleach==2.0.0
boto==2.48.0
Expand All @@ -13,6 +14,12 @@ django-appconf==1.0.1
django-compressor==2.1
django-ses-backend==0.1.1
djmail==0.11.0
gunicorn==19.7.1
isort==4.2.15
lazy-object-proxy==1.3.1
lxml==3.8.0
mccabe==0.6.1
mock==2.0.0
entrypoints==0.2.3
futures==3.0.3
gunicorn==19.7.1
Expand Down Expand Up @@ -40,6 +47,14 @@ pickleshare==0.7.4
premailer==2.9.6
prompt-toolkit==1.0.15
psycopg2==2.6.1
pylint==1.7.2
python-http-client==3.0.0
rcssmin==1.0.6
requests==2.9.1
rjsmin==1.0.12
six==1.10.0
whitenoise==3.3.0
wrapt==1.10.11
ptyprocess==0.5.2
Pygments==2.2.0
python-dateutil==2.6.1
Expand Down
29 changes: 29 additions & 0 deletions static/js/checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,34 @@ $(function () {
$("#update-timeout-grace").val(rounded);
});

var nagSlider = document.getElementById("nag-slider");
noUiSlider.create(nagSlider, {
start: [20],
connect: "lower",
range: {
'min': [60, 60],
'20%': [3600, 3600],
'40%': [86400, 86400],
'60%': [604800, 604800],
'80%': [2592000, 864000],
'max': 5184000,
},
pips: {
mode: 'values',
values: [60, 1800, 3600, 43200, 86400, 604800, 2592000, 5184000],
density: 4,
format: {
to: secsToText,
from: function() {}
}
}
});

nagSlider.noUiSlider.on("update", function(a, b, value) {
var rounded = Math.round(value);
$("#nag-slider-value").text(secsToText(rounded));
$("#update-nag-interval").val(rounded);
});

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

Expand All @@ -110,6 +138,7 @@ $(function () {
$("#update-timeout-form").attr("action", $this.data("url"));
periodSlider.noUiSlider.set($this.data("timeout"))
graceSlider.noUiSlider.set($this.data("grace"))
nagSlider.noUiSlider.set($this.data("nag"))
$('#update-timeout-modal').modal({"show":true, "backdrop":"static"});

return false;
Expand Down

0 comments on commit 13ee7e4

Please sign in to comment.