From da219cf0bbaa57c72e37d68baac3d6f3ffe57435 Mon Sep 17 00:00:00 2001
From: Nico Vermaas <vermaas@astron.nl>
Date: Tue, 13 Apr 2021 10:12:12 +0200
Subject: [PATCH] add filter field to configuration table (gui)

---
 atdb/taskdatabase/services/algorithms.py             | 5 ++++-
 atdb/taskdatabase/templates/taskdatabase/config.html | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py
index fb99eb9f..b4702ae0 100644
--- a/atdb/taskdatabase/services/algorithms.py
+++ b/atdb/taskdatabase/services/algorithms.py
@@ -107,13 +107,16 @@ def convert_config_to_html(querylist):
             # iterate through the dict of key/values
             key = record.key
             value = record.value
+            filter = record.filter
+
             try:
                 if "://" in value:
                     link = "<a href=" + '"' + value + '">' + key +"</a>"
                     value = link
             except:
                 pass
-            line = "<tr><td><b>" + str(key) + "</b></td><td>" + str(value) + "</td></tr>"
+
+            line = "<tr><td><b>" + str(filter) + "</b></td> <td><b>" + str(key) + "</b></td><td>" + str(value) + "</td></tr>"
             results = results + line
     except:
         results = "<tr><td>no data</td></tr>"
diff --git a/atdb/taskdatabase/templates/taskdatabase/config.html b/atdb/taskdatabase/templates/taskdatabase/config.html
index f68f6341..f27a683e 100644
--- a/atdb/taskdatabase/templates/taskdatabase/config.html
+++ b/atdb/taskdatabase/templates/taskdatabase/config.html
@@ -7,6 +7,7 @@
      <div class="card-body">
          <h3>Configuration </h3>
            <table class="table table-striped">
+               <th>filter</th><th>key</th><th>value</th>
                <tbody>
                   {{ results | safe }}
                 </tbody>
-- 
GitLab