Browse Source

Make the ssh_info page more flexible

This way adding more information about the ssh keys of the servers is
as easy as extending the configuration file.
Pierre-Yves Chibon 8 years ago
parent
commit
9427530213
1 changed files with 7 additions and 13 deletions
  1. 7 13
      pagure/templates/doc_ssh_keys.html

+ 7 - 13
pagure/templates/doc_ssh_keys.html

@@ -21,20 +21,14 @@ instance:
   </p>
 
 {% for cert in config.get('SSH_KEYS') %}
-<div class="card">
-  <div class="card-header">
-    <strong>{{ cert }} Fingerprint</strong>
+  {% for type in config['SSH_KEYS'][cert] %}
+  <div class="card">
+    <div class="card-header">
+      <strong>{{ cert }} {{ type | title }}</strong>
+    </div>
+    <pre class="softwrap">{{ config['SSH_KEYS'][cert][type] }}</pre>
   </div>
-  <pre>{{ config['SSH_KEYS'][cert]['fingerprint'] }}</pre>
-</div>
-
-<div class="card">
-  <div class="card-header">
-    <strong>{{ cert }} Hostkey</strong>
-  </div>
-  <pre class="softwrap">{{ config['SSH_KEYS'][cert]['pubkey'] }}</pre>
-</div>
-
+  {% endfor %}
 {% endfor %}
 
 {% else %}