Skip to content

Commit

Permalink
A set of minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Feb 7, 2015
1 parent fdaad83 commit af9ad64
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
7 changes: 7 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ TODO

#### Macros
* Previous execution timestamp
* Previous ds
* ...

#### Frontend
* Graph view: color coding by operator + legend

#### Backend
* Callbacks
* Set default args at the DAG level?
* Prevent timezone chagne on import
* Add decorator to timeout imports on master process [lib](https://github.com/pnpnpn/timeout-decorator)
* Mysql port should carry through (using default now)
* Make authentication universal
Expand Down
8 changes: 5 additions & 3 deletions airflow/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,12 @@ def render_templates(self):

def email_alert(self, exception, is_retry=False):
task = self.task
title = "AirFlow alert: {self}".format(**locals())
title = "Airflow alert: {self}".format(**locals())
exception = exception.replace('\n', '<br>')
try_ = task.retries + 1
body = (
"Try {self.try_number} out of {task.retries}<br>"
"Exception:<br>{exception}"
"Try {self.try_number} out of {try_}<br>"
"Exception:<br>{exception}<br>"
"Log: <a href='{self.log_url}'>Link</a><br>"
"Host: {self.hostname}<br>"
"Log file: {self.log_filepath}<br>"
Expand Down
6 changes: 3 additions & 3 deletions airflow/www/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class QueryForm(Form):
session.close()
return self.render(
'airflow/query.html', form=form,
title="Query",
title="Ad Hoc Query",
results=results or '',
has_data=has_data)

Expand Down Expand Up @@ -462,7 +462,7 @@ def chart(self):
response = self.render(
'airflow/highchart.html',
chart=chart,
title="Chart",
title="Airflow - Chart",
sql=sql,
label=chart.label)
session.commit()
Expand Down Expand Up @@ -529,7 +529,7 @@ def circles(self):
@login_required
def conf(self):
from airflow import configuration
title = "Application Configuration"
title = "Airflow Configuration"
subtitle = configuration.AIRFLOW_CONFIG
f = open(configuration.AIRFLOW_CONFIG, 'r')

Expand Down
2 changes: 1 addition & 1 deletion airflow/www/templates/admin/master.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
style="float: left; width:35px; margin-top: -7px;"
src="{{ url_for("static", filename="pin_100.png") }}"
title="{{ current_user.username }}">
<span>AirFlow</span>
<span>Airflow</span>
</a>
{% endblock %}
5 changes: 5 additions & 0 deletions airflow/www/templates/airflow/code.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends "airflow/master.html" %}

{% block title %}
{{ title }}
{% endblock %}

{% block body %}
{{ super() }}
<h2>{{ title }}</h2>
Expand All @@ -10,6 +14,7 @@ <h5>{{ subtitle }}</h5>
{% if code %}
<pre>{{ code }}</pre>
{% endif %}

{% if code_html %}
{{ code_html|safe }}
{% endif %}
Expand Down

0 comments on commit af9ad64

Please sign in to comment.