-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2335 from mkurek/async-transitions-2
Added async fields to transition model
- Loading branch information
Showing
7 changed files
with
112 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/ralph/lib/transitions/migrations/0006_auto_20160401_0842.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('transitions', '0005_auto_20160325_0817'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='transition', | ||
name='run_asynchronously', | ||
field=models.BooleanField(default=False, help_text='Run this transition in the background (this could be enforced if you choose at least one asynchronous action)'), | ||
), | ||
migrations.AlterField( | ||
model_name='transition', | ||
name='async_service_name', | ||
field=models.CharField(max_length=100, default='ASYNC_TRANSITIONS', blank=True, help_text='Name of asynchronous (internal) service to run this transition. Fill this field only if you want to run this transition in the background.', null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 15 additions & 1 deletion
16
src/ralph/lib/transitions/templates/transitions/current_transitions.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
{% extends BASE_TEMPLATE %} | ||
{% load i18n transitions_tags %} | ||
|
||
{% block extrahead %} | ||
{{ block.super }} | ||
{% if are_jobs_running %} | ||
<meta http-equiv="refresh" content="5"> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block view_content %} | ||
{% include "transitions/_transition_jobs_table.html" %} | ||
<h1>{% trans "Current transitions" %}</h1> | ||
{% include "transitions/_transition_jobs_table.html" with jobs=job_in_progress %} | ||
|
||
<h1>{% trans "Finished transitions" %}</h1> | ||
{# TODO: add pagination etc #} | ||
{% include "transitions/_transition_jobs_table.html" with jobs=jobs_ended %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters