diff --git a/diffido.py b/diffido.py index eff5ba8..30536f6 100755 --- a/diffido.py +++ b/diffido.py @@ -147,9 +147,11 @@ def run_job(id_=None, *args, **kwargs): if change_fraction < min_change: return # send notification - diff = get_diff(id_) + diff = get_diff(id_, {}).get('diff') + if not diff: + return send_email(to=email, subject='%s page changed' % schedule.get('title'), - body='changes:\n\n%s' % diff.get('diff')) + body='changes:\n\n%s' % diff) def safe_run_job(id_=None, *args, **kwargs): diff --git a/dist/index.html b/dist/index.html index 1fc5297..ebd78e9 100644 --- a/dist/index.html +++ b/dist/index.html @@ -3,18 +3,28 @@ {% block body %}
-
- - -

Schedules add new

-
- - ${ item.id } - ${ item.title } - ${ item.url } - history - -
+
+ + +
+ Card without hover effect + + add_circle_outline + +
+
+ + + + + ${ item.id } + ${ item.title } + ${ item.url } + history + + + +
@@ -38,7 +48,6 @@ var app = new Vue({ getSchedules: function() { self = this; var data = axios.get('/api/schedules').then(function(response) { - console.log(response); var schedules = []; _.forEach(response.data.schedules || {}, function(value, key) { value.id = key; @@ -55,12 +64,11 @@ var app = new Vue({ body { background-color: white; + padding: 6px; } .md-table { - width: 60%; - min-height: 400px; - max-height: 800px; + height: 80%; }