Skip to content

Commit

Permalink
Make the formatting of the test ML pipeline page a bit better.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmenezes0 committed Apr 17, 2024
1 parent 884fa50 commit 968db61
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
1 change: 0 additions & 1 deletion consultation_analyser/consultations/dummy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def __init__(self, responses=10, include_themes=True, **options):
# Timestamp to avoid duplicates - set these as default options
timestamp = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
if "name" not in options:
# name = f"Dummy consultation generated at {timestamp}"
options["name"] = f"Dummy consultation generated at {timestamp}"
if "slug" not in options:
options["slug"] = f"consultation-slug-{timestamp}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,43 @@
{% endif %}
{% endfor %}

<h1 class="govuk-heading-xl">Create dummy data for testing</h1>
<h1 class="govuk-heading-xl">Test the machine learning pipeline</h1>
<form method="post" novalidate>{{ csrf_input }}


<p class="govuk-body">Local, test, dev environments only. Generate dummy questions and responses only, no themes.</p>

<form method="post" novalidate>{{ csrf_input }}
{{ govukButton({
'text': "Generate dummy consultation",
'name': "generate_dummy_consultation"
}) }}


<h2 class="govuk-heading-l">Existing consultations</h2>
{% for c in consultations %}

<a href="{{ url('consultation', kwargs={'consultation_slug': c.slug}) }}" class="govuk-link govuk-link--no-visited-state">
{{ c.name }}
</a>
<h2 class="govuk-heading-l">Generate a dummy consultation for testing</h2>
<p class="govuk-body">Local, test, and develop environments only. Generate dummy questions and responses but no dummy themes.</p>

{{ govukButton({
'text': "Generate themes",
'name': "consultation_id",
'value': c.id
'text': "Generate dummy consultation",
'name': "generate_dummy_consultation"
}) }}

<br>
{% endfor %}

</form>

{% endblock %}
<h2 class="govuk-heading-l">Generate themes for existing consultations</h2>
{% for c in consultations %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<p>
<a href="{{ url('consultation', kwargs={'consultation_slug': c.slug}) }}" class="govuk-body-l govuk-link govuk-link--no-visited-state">
{{ c.name }}
</a>
</p>
</div>
<div class="govuk-grid-column-one-third">
<p>
{{ govukButton({
'text': "Generate themes",
'name': "consultation_id",
'value': c.id
}) }}
</p>
</div>
</div>
{% endfor %}

</form>

{% endblock %}



0 comments on commit 968db61

Please sign in to comment.