Parcourir la source

Add a template for submissions

Baptiste Jonglez il y a 10 ans
Parent
commit
d4d708cc6c
2 fichiers modifiés avec 13 ajouts et 1 suppressions
  1. 1 1
      peerfinder.py
  2. 12 0
      templates/submit.html

+ 1 - 1
peerfinder.py

@@ -154,7 +154,7 @@ def submit_job():
         for t in targets:
             db.session.add(t)
         db.session.commit()
-        return "Launching jobs towards {}".format(", ".join((str(t) for t in targets)))
+        return render_template('submit.html', targets=targets)
     else:
         return "Invalid arguments"
 

+ 12 - 0
templates/submit.html

@@ -0,0 +1,12 @@
+<p>Your request has been submitted, ping will be launched towards the
+specified targets.</p>
+
+<p>The results should be available within a few minutes by using the following links:</p>
+
+<p>
+  <ul>
+    {% for t in targets %}
+    <li><a href="/result/show/{{ t.id }}">result for {{ t }}</a></li>
+    {% endfor %}
+  </ul>
+</p>