-
-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert TestRun edit page to Patternfly
NOTES: - estimated_time is scheduled for removal so not shown in the form - product_version is scheduled for removal in favor of TR.plan.product_version - Product & Version can't be editted anymore. Must be set on the parent TestPlan instead. - TestRun still allows specifying builds - environment is scheduled for deprecation (see #484) and is not shown anymore. Fix #445
- Loading branch information
Showing
12 changed files
with
109 additions
and
212 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
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 was deleted.
Oops, something went wrong.
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
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
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,5 @@ | ||
$(window).on('load', function() { | ||
$('#add_id_build').click(function() { | ||
return showRelatedObjectPopup(this); | ||
}); | ||
}); |
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,73 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
{% load static %} | ||
|
||
{% block title %}{% trans "Edit TestRun" %}{% endblock %} | ||
{% block head %} | ||
{{ block.super }} | ||
|
||
<script src="{% static "grappelli/jquery/jquery.min.js" %}" type="text/javascript"></script> | ||
<script src="{% static "grappelli/js/grappelli.min.js" %}" type="text/javascript"></script> | ||
<script src="{% static "admin/js/admin/RelatedObjectLookups.js" %}" type="text/javascript"></script> | ||
|
||
<script src="{% static 'testruns/js/mutable.js' %}"></script> | ||
{% endblock %} | ||
|
||
{% block contents %} | ||
<div class="container-fluid container-cards-pf"> | ||
<form class="form-horizontal" action="{% url "testruns-edit" test_run.run_id %}" method="post"> | ||
{% csrf_token %} | ||
<div class="form-group"> | ||
<label class="col-md-1 col-lg-1" for="id_summary">{% trans "Summary" %}</label> | ||
<div class="col-md-11 col-lg-11"> | ||
<input type="text" id="id_summary" name="summary" value="{{ form.summary.value }}" class="form-control" required> | ||
<p class="help-block"><a href="{% url 'test_plan_url_short' test_run.plan_id %}">TP-{{ test_run.plan_id }}: {{ test_run.plan.name }}</a></p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<div class="col-md-1 col-lg-1"> | ||
<label for="id_build">{% trans "Build" %}</label> | ||
<a href="{% url 'admin:management_build_add' %}?_popup=1&product={{ test_run.plan.product_id }}" | ||
id="add_id_build" | ||
alt="{% trans 'add new Build' %}" | ||
title="{% trans 'add new Build' %}">+</a> | ||
</div> | ||
<div class="col-md-3 col-lg-3"> | ||
<select class="form-control" id="id_build" name="build"> | ||
{% for option in form.build.field.queryset %} | ||
<option value="{{ option.pk }}" {% if option.pk == form.build.value %}selected{% endif %}>{{ option.name }}</option> | ||
{% endfor %} | ||
</select> | ||
<p class="help-block"> | ||
{% trans "Product" %}: {{ test_run.plan.product.name }}, {% trans "version" %} {{ test_run.plan.product_version.value }} | ||
</p> | ||
</div> | ||
|
||
<label class="col-md-1 col-lg-1" for="id_manager">{% trans "Manager" %}</label> | ||
<div class="col-md-3 col-lg-3 {% if form.manager.errors %}has-error{% endif %}"> | ||
<input id="id_manager" name="manager" value="{{ form.manager.value }}" type="text" | ||
class="form-control" placeholder="{% trans 'Username or email' %}" required> | ||
{{ form.manager.errors }} | ||
</div> | ||
|
||
<label class="col-md-1 col-lg-1" for="id_default_tester">{% trans "Default tester" %}</label> | ||
<div class="col-md-3 col-lg-3 {% if form.default_tester.errors %}has-error{% endif %}"> | ||
<input id="id_default_tester" name="default_tester" value="{{ form.default_tester.value }}" type="text" | ||
class="form-control" placeholder="{% trans 'Username or email' %}"> | ||
{{ form.default_tester.errors }} | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="col-lg-12" for="id_notes">{% trans "Notes" %}</label> | ||
<div class="col-lg-12"> | ||
<textarea class="form-control" id="id_notes" name="notes">{{ form.notes.value }}</textarea> | ||
</div> | ||
</div> | ||
|
||
<button type="submit" class="btn btn-default">{% trans "Save" %}</button> | ||
</form> | ||
|
||
</div><!-- /container --> | ||
{% endblock %} |
Oops, something went wrong.