master #392
@ -276,3 +276,6 @@ Similar to bootstraps 'shadow-lg'
|
|||||||
.tree-label.badge{
|
.tree-label.badge{
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
.alert{
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
@ -93,14 +93,23 @@ class ClientProxyParcelWFS(BaseClientProxyView):
|
|||||||
auth = HTTPDigestAuth(CLIENT_PROXY_AUTH_USER, CLIENT_PROXY_AUTH_PASSWORD)
|
auth = HTTPDigestAuth(CLIENT_PROXY_AUTH_USER, CLIENT_PROXY_AUTH_PASSWORD)
|
||||||
|
|
||||||
content, response_code = self.perform_url_call(url, auth=auth)
|
content, response_code = self.perform_url_call(url, auth=auth)
|
||||||
body = json.loads(content)
|
error_detected = response_code != 200
|
||||||
|
error_code = f"response code:{response_code}"
|
||||||
|
try:
|
||||||
|
body = json.loads(content)
|
||||||
|
except JSONDecodeError:
|
||||||
|
body = {}
|
||||||
|
error_code = "json invalid"
|
||||||
|
error_detected = True
|
||||||
|
|
||||||
body["crs"] = {
|
body["crs"] = {
|
||||||
"type": "name",
|
"type": "name",
|
||||||
"properties": {
|
"properties": {
|
||||||
"name": "urn:ogc:def:crs:EPSG::25832"
|
"name": "urn:ogc:def:crs:EPSG::25832",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if response_code != 200:
|
if error_detected:
|
||||||
|
body["crs"]["properties"]["msg"] = f"Error detected ({error_code})"
|
||||||
return JsonResponse({
|
return JsonResponse({
|
||||||
"status_code": response_code,
|
"status_code": response_code,
|
||||||
"content": body,
|
"content": body,
|
||||||
|
@ -27,7 +27,18 @@
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
<div class="row alert alert-{{ message.tags }}">
|
<div class="row alert alert-{{ message.tags }}">
|
||||||
{{ message }}
|
<div>
|
||||||
|
<span class="mr-3">
|
||||||
|
{% if "danger" in message.tags %}
|
||||||
|
{% fa5_icon 'exclamation' %}
|
||||||
|
{% elif "info" in message.tags %}
|
||||||
|
{% fa5_icon 'info' %}
|
||||||
|
{% elif "success" in message.tags %}
|
||||||
|
{% fa5_icon 'check' %}
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
{{ message }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,13 +23,22 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
</header>
|
</header>
|
||||||
<div class="container-fluid mt-3 px-5">
|
<div class="container-fluid mt-3 px-5">
|
||||||
<div class="">
|
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
<div class="row alert alert-{{ message.tags }}">
|
<div class="row alert alert-{{ message.tags }}">
|
||||||
|
<div>
|
||||||
|
<span class="mr-3">
|
||||||
|
{% if "danger" in message.tags %}
|
||||||
|
{% fa5_icon 'exclamation' %}
|
||||||
|
{% elif "info" in message.tags %}
|
||||||
|
{% fa5_icon 'info' %}
|
||||||
|
{% elif "success" in message.tags %}
|
||||||
|
{% fa5_icon 'check' %}
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
{{ message }}
|
{{ message }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user