From: Dawid Jagieła Date: Thu, 15 Oct 2015 14:19:17 +0000 (+0200) Subject: work in progress X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=957dafde8290f3ab8d25f7b96af10e583d50100b;p=qcg-portal.git work in progress --- diff --git a/qcg/templates/qcg/job_submit.html b/qcg/templates/qcg/job_submit.html index 6a712a9..b25ba06 100644 --- a/qcg/templates/qcg/job_submit.html +++ b/qcg/templates/qcg/job_submit.html @@ -100,6 +100,10 @@ plugins: ['remove_button'] }); + $('#id_sequence').on("click keyup", function(){ + $(this).val($(this).val().toUpperCase()); + }); + // hide delete checkbox in empty env form $('#env-form-empty').find('div.form-group:last-of-type').hide(); $('#env-controls').find('> div').formset({ diff --git a/qcg/utils.py b/qcg/utils.py index c6453e9..8307bbb 100644 --- a/qcg/utils.py +++ b/qcg/utils.py @@ -21,6 +21,7 @@ from qcg import constants from django.utils import encoding + resources_cache = caches['resources'] @@ -109,6 +110,7 @@ def to_job_desc(params, proxy): QCG.start() desc = JobDescription() + direct_map = ('env_variables', 'executable', 'arguments', 'note', 'grant', 'hosts', 'properties', 'queue', 'procs', 'wall_time', 'memory', 'memory_per_slot', 'modules', 'input', 'stage_in', 'native', 'notify', 'preprocess', 'postprocess', 'persistent') @@ -117,6 +119,7 @@ def to_job_desc(params, proxy): if params[name]: setattr(desc, name, params[name]) + if params['application']: desc.set_application(*params['application']) desc.stage_in += [params['master_file']] @@ -158,7 +161,9 @@ def to_job_desc(params, proxy): przemytnik.append([u'UNRESPORTAL_DT',params['dt']]) if params['damax']: przemytnik.append([u'UNRESPORTAL_DAMAX',params['damax']]) + setattr(desc, 'env_variables', przemytnik) + # TODO monitoring return desc diff --git a/qcg/views.py b/qcg/views.py index 4a6cf34..df16a01 100644 --- a/qcg/views.py +++ b/qcg/views.py @@ -358,7 +358,7 @@ def job_save_template(request, job_id): template_form = JobTemplateForm(request.POST, instance=JobTemplate(owner=request.user, description=job.qcg_description)) - + if template_form.is_valid(): template = template_form.save()