Skip to content

Commit

Permalink
Merge pull request #12 from maricaantonacci/devel
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
maricaantonacci authored Sep 16, 2019
2 parents 5c341ca + a266dbe commit eb4830f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def avatar(email, size):
"metadata": {
"icon": "https://cdn4.iconfinder.com/data/icons/mosaicon-04/512/websettings-512.png"
},
"enable_config_form": False,
"inputs": {},
"tabs": {}
}
Expand All @@ -65,7 +66,6 @@ def avatar(email, size):
toscaInfo[tosca]['inputs'] = template['topology_template']['inputs']

## add parameters code here
enable_config_form = False
tabs = {}
if tosca_pars_dir:
tosca_pars_path = tosca_pars_dir + "/" # this has to be reassigned here because is local.
Expand All @@ -77,7 +77,7 @@ def avatar(email, size):
if fname[0] != '.':
tosca_pars_file = os.path.join(fpath, fname)
with io.open(tosca_pars_file) as pars_file:
enable_config_form = True
toscaInfo[tosca]['enable_config_form'] = True
pars_data = yaml.load(pars_file)
toscaInfo[tosca]['inputs'] = pars_data["inputs"]
if "tabs" in pars_data:
Expand Down Expand Up @@ -261,8 +261,7 @@ def configure():
return render_template('createdep.html',
template=toscaInfo[selected_tosca],
selectedTemplate=selected_tosca,
slas=slas,
enable_config_form=enable_config_form)
slas=slas)


def add_sla_to_template(template, sla_id):
Expand Down
2 changes: 1 addition & 1 deletion app/templates/createdep.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h4 class="font-weight-bold text-primary">
</div>

<form id="depSubmit" action="{{ url_for('createdep', template=selectedTemplate) }}" method="post">
{% if enable_config_form %}
{% if template['enable_config_form'] is defined and template['enable_config_form'] is sameas true %}
{% include 'config_form.html' %}
{% else %}
{% include 'default_form.html' %}
Expand Down

0 comments on commit eb4830f

Please sign in to comment.