diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-01-05 15:30:45 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-01-05 15:30:45 +0100 |
commit | 1203d49ff4d45907a15c96b90bdf8939663b8e7b (patch) | |
tree | 81b041437a0570d22b06d3fba009ad173439e0ea /talerbackoffice | |
parent | c6e2ca80a10fd87cb92e24d39dbf76acca6542c3 (diff) | |
download | backoffice-1203d49ff4d45907a15c96b90bdf8939663b8e7b.tar.gz backoffice-1203d49ff4d45907a15c96b90bdf8939663b8e7b.tar.bz2 backoffice-1203d49ff4d45907a15c96b90bdf8939663b8e7b.zip |
change instance and trigger /history
Diffstat (limited to 'talerbackoffice')
-rw-r--r-- | talerbackoffice/backoffice/backoffice.py | 10 | ||||
-rw-r--r-- | talerbackoffice/backoffice/static/backoffice.js | 9 | ||||
-rw-r--r-- | 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 %} |