[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-backoffice] branch master updated: change instance a
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-backoffice] branch master updated: change instance and trigger /history |
Date: |
Fri, 05 Jan 2018 15:31:01 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository backoffice.
The following commit(s) were added to refs/heads/master by this push:
new 1203d49 change instance and trigger /history
1203d49 is described below
commit 1203d49ff4d45907a15c96b90bdf8939663b8e7b
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Jan 5 15:30:45 2018 +0100
change instance and trigger /history
---
talerbackoffice/backoffice/backoffice.py | 10 ++--------
talerbackoffice/backoffice/static/backoffice.js | 9 +++++++++
talerbackoffice/backoffice/templates/backoffice.html | 2 +-
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/talerbackoffice/backoffice/backoffice.py
b/talerbackoffice/backoffice/backoffice.py
index fa9c8fd..e59d0e6 100644
--- a/talerbackoffice/backoffice/backoffice.py
+++ b/talerbackoffice/backoffice/backoffice.py
@@ -43,14 +43,9 @@ TC = TalerConfig.from_env()
BACKEND_URL = os.environ.get("BACKOFFICE_BACKEND")
INSTANCES = os.environ.get("BACKOFFICE_INSTANCES")
CURRENCY = TC["taler"]["currency"].value_string(required=True)
-
-
-LOGGER.info("Will work against %s, for those instances: %s" \
- % (BACKEND_URL, INSTANCES))
-exit(9)
-
app.config.from_object(__name__)
+
@app.context_processor
def utility_processor():
def url(my_url):
@@ -62,8 +57,7 @@ def utility_processor():
@app.route("/")
def index():
- return flask.render_template("templates/backoffice.html")
-
+ return flask.render_template("templates/backoffice.html",
instances=INSTANCES.split())
@app.route("/javascript")
def javascript_licensing():
diff --git a/talerbackoffice/backoffice/static/backoffice.js
b/talerbackoffice/backoffice/static/backoffice.js
index 77b4fd5..73d21b6 100644
--- a/talerbackoffice/backoffice/static/backoffice.js
+++ b/talerbackoffice/backoffice/static/backoffice.js
@@ -315,6 +315,15 @@ function get_instance(){
}
/**
+ * Nullify curreny instance and triggers history for newly
+ * selected one.
+ */
+function change_instance(){
+ INSTANCE = null;
+ get_history();
+}
+
+/**
* - scroll if true, the logic tries to retrieve the
* "next page" of all the proposals known to the merchant.
*/
diff --git a/talerbackoffice/backoffice/templates/backoffice.html
b/talerbackoffice/backoffice/templates/backoffice.html
index ba6422f..6c4a21e 100644
--- a/talerbackoffice/backoffice/templates/backoffice.html
+++ b/talerbackoffice/backoffice/templates/backoffice.html
@@ -6,7 +6,7 @@
wire transfers and viceversa.</p>
<div>
- <select id="instance">
+ <select id="instance" onchange="change_instance();">
{% for instance in instances %}
<option value="{{ instance }}">{{ instance }}</option>
{% endfor %}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-backoffice] branch master updated: change instance and trigger /history,
gnunet <=