October feature list #226
2 changed files with 31 additions and 26 deletions
|
|
@ -911,6 +911,9 @@ class ServiceInstance(ServalaModelMixin, models.Model):
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
for key, value in secret.data.items():
|
for key, value in secret.data.items():
|
||||||
|
# Skip keys ending with _HOST as they're only useful for dedicated OpenShift clusters
|
||||||
|
if key.endswith("_HOST"):
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
credentials[key] = base64.b64decode(value).decode("utf-8")
|
credentials[key] = base64.b64decode(value).decode("utf-8")
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
|
||||||
|
|
@ -173,34 +173,36 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if instance.connection_credentials %}
|
{% if instance.connection_credentials %}
|
||||||
<div class="card">
|
<div class="col-12">
|
||||||
<div class="card-header">
|
<div class="card">
|
||||||
<h4>{% translate "Connection Credentials" %}</h4>
|
<div class="card-header">
|
||||||
</div>
|
<h4>{% translate "Connection Credentials" %}</h4>
|
||||||
<div class="card-body">
|
</div>
|
||||||
<div class="table-responsive">
|
<div class="card-body">
|
||||||
<table class="table table-bordered">
|
<div class="table-responsive">
|
||||||
<thead>
|
<table class="table table-bordered">
|
||||||
<tr>
|
<thead>
|
||||||
<th>{% translate "Name" %}</th>
|
|
||||||
<th>{% translate "Value" %}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for key, value in instance.connection_credentials.items %}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ key }}</td>
|
<th>{% translate "Name" %}</th>
|
||||||
<td>
|
<th>{% translate "Value" %}</th>
|
||||||
{% if key == "error" %}
|
|
||||||
<span class="text-danger">{{ value }}</span>
|
|
||||||
{% else %}
|
|
||||||
<code>{{ value }}</code>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
{% for key, value in instance.connection_credentials.items %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ key }}</td>
|
||||||
|
<td>
|
||||||
|
{% if key == "error" %}
|
||||||
|
<span class="text-danger">{{ value }}</span>
|
||||||
|
{% else %}
|
||||||
|
<code>{{ value }}</code>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue