kgjamieson / NEXT-psych

Apache License 2.0
3 stars 2 forks source link

Editing algorithm details does not update the GUI #8

Closed stsievert closed 9 years ago

stsievert commented 9 years ago

In the GUI, choosing to edit an experiment than adding an algorithm works. However, those changes are not visible to the user on the frontend/in the GUI.

The line responsible seems to be app_params_html = render_template(app_params_template, form=form.params) in gui/base/controllers/experiment.py. This calls a Flask built-in, so I'm guessing we have formatted our parameters wrong.

In essence, I am doing the following code (the print statements involve rsyncing up the server and refreshing)

>>> print len(form.params.data['alg_rows'])
2
>>> print form.params.data['alg_rows']
[{'alg_label': u'Test', 'alg_proportion': 1.0, 'alg_id': u'RandomSampling'}, 
 {'alg_label': u'test2', 'alg_proportion': 0.5, 'alg_id': u'RandomSampling'}]
>>> app_params_html = render_template(app_params_template, form=form.params)
>>> print app_params_html
...
# HTML copied and pasted to local machine; I saw the image below

However, when I view the form on the GUI I only see the below:

screen shot 2015-10-07 at 8 25 32 pm

It looks like that in gui/base/app_manager/*/new_experiment_params.html it's not calling the function add_row = function(div_id)... maybe it's not passing the correct div_id?

stsievert commented 9 years ago

I believe this is closed by commit 7f41543f04c9e5ab007f89254da87b1899f982b5