aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/oauth2/resources.py2
-rw-r--r--wqflask/wqflask/templates/oauth2/view-resource.html12
2 files changed, 5 insertions, 9 deletions
diff --git a/wqflask/wqflask/oauth2/resources.py b/wqflask/wqflask/oauth2/resources.py
index c01889c3..ed419076 100644
--- a/wqflask/wqflask/oauth2/resources.py
+++ b/wqflask/wqflask/oauth2/resources.py
@@ -116,7 +116,7 @@ def view_resource(resource_id: uuid.UUID):
return oauth2_get(f"oauth2/resource/view/{resource_id}").either(
lambda err: render_ui("oauth2/view-resource.html",
- resource=None, error=process_error(err)),
+ resource=None, resource_error=process_error(err)),
__resource_success__)
@resources.route("/data/link", methods=["POST"])
diff --git a/wqflask/wqflask/templates/oauth2/view-resource.html b/wqflask/wqflask/templates/oauth2/view-resource.html
index 43f3f5b9..873c3651 100644
--- a/wqflask/wqflask/templates/oauth2/view-resource.html
+++ b/wqflask/wqflask/templates/oauth2/view-resource.html
@@ -11,15 +11,11 @@
<div class="container-fluid">
+ {%if resource_error is defined %}
+ {{display_error("Resource", resource_error)}}
+ {%else%}
<div class="row">
<h3>Resource Details</h3>
- {%if error %}
- <span class="glyphicon glyphicon-exclamation-sign text-danger">
- </span>
- &nbsp;
- <strong class="text-danger">{{error.error}}</strong>
- {{error.error_description}}
- {%else%}
<table class="table">
<caption>Resource: {{resource.resource_name}}</caption>
<thead>
@@ -70,7 +66,6 @@
</tr>
</tbody>
</table>
- {%endif%}
</div>
<div class="row">
@@ -338,6 +333,7 @@
</form>
{%endif%}
</div>
+ {%endif%}
</div>