Skip to content

Commit

Permalink
add back current spec in request details page
Browse files Browse the repository at this point in the history
  • Loading branch information
Sispheor committed Oct 3, 2023
1 parent fe3ba9e commit e9327e6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
4 changes: 4 additions & 0 deletions project-static/squest/css/squest.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,7 @@ aside {
input.form-control[disabled] {
cursor: not-allowed;
}

.popover {
max-width: 100%;
}
36 changes: 27 additions & 9 deletions templates/service_catalog/request_details/approval.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{% has_perm request.user "service_catalog.reject_request" object as can_reject_request %}
{% has_perm request.user "service_catalog.accept_request" object as can_accept_request %}
{% has_perm request.user "service_catalog.process_request" object as can_process_request %}
{% has_perm request.user "service_catalog.view_admin_spec_instance" object.instance as can_view_admin_spec_instance %}

<div class="timeline">
<div>
Expand All @@ -13,14 +14,28 @@
<h3 class="timeline-header">Requested by <a
href="{% url 'profiles:user_details' object.user.id %}">{{ object.user }}</a></h3>
<div class="timeline-body">
<table class="row">
{% for variable_name, value in object.fill_in_survey.items %}
<tr>
<td class="col-sm-2"><b>{{ variable_name }}</b></td>
<td class="col-sm-10">{{ value }}</td>
</tr>
{% endfor %}
</table>
<div class="row">
<table class="col-md-6">
{% for variable_name, value in object.fill_in_survey.items %}
<tr>
<td class="col-sm-2"><b>{{ variable_name }}</b></td>
<td class="col-sm-10">{{ value }}</td>
</tr>
{% endfor %}
</table>
<div class="col-md-6">
<div class="row justify-content-end">
<button data-html="true" type="button" class="btn btn-secondary m-1" data-container="body" data-toggle="popover" data-placement="right" data-content="<pre>{{ object.instance.user_spec | pretty_json }}</pre>">
Instance spec
</button>
{% if can_view_admin_spec_instance %}
<button data-html="true" type="button" class="btn btn-secondary m-1" data-container="body" data-toggle="popover" data-placement="right" data-content="<pre>{{ object.instance.spec | pretty_json }}</pre>">
Instance admin spec
</button>
{% endif %}
</div>
</div>
</div>
</div>

</div>
Expand Down Expand Up @@ -275,7 +290,10 @@ <h3 class="timeline-header">Process the request</h3>
<h3 class="timeline-header text-success">Processing</h3>
<div class="timeline-body">
{% if object.get_state_display == "PROCESSING" %}
The request is currently being processed
The request is currently being processed.
{% if can_process_request and object.tower_job_id is not None%}
<a href="{{ object.tower_job_url }}">Job #{{ object.tower_job_id }}</a>
{% endif %}
{% else %}
<blockquote class="quote-success">
<i class="fas fa-check text-success"></i> Request processed successfully
Expand Down

0 comments on commit e9327e6

Please sign in to comment.