APPLICATION_CHOICES = (
CHOICES_PLACEHOLDER,
- ('unres32', 'UNRES 3.2'),
+ ('unres-gab', 'UNRES GAB'),
+ ('unres-e0ll2y', 'UNRES E0LL2Y'),
)
QUEUE_CHOICES = (
('plgrid-testing', 'plgrid-testing'),
)
MODULES_CHOICES = (
- ('plgrid/apps/python', 'plgrid/apps/python'),
- ('plgrid/apps/matlab', 'plgrid/apps/matlab'),
+ CHOICES_PLACEHOLDER,
)
PROTOCOL_CHOICES = (
('', u'Brak'),
retmin = forms.IntegerField(label=u"RETMIN", help_text=u"Dolny zakres temparatur dla wymiany replik", min_value=2, initial=250, required=False)
retmax = forms.IntegerField(label=u"RETMAX", help_text=u"Górny zakres temperatur dla wymiany replik", min_value=2, initial=450, required=False)
- application = forms.ChoiceField(choices=APPLICATION_CHOICES, label=u"Aplikacja", required=False, initial='unres32') # TODO choices
+ application = forms.ChoiceField(choices=APPLICATION_CHOICES, label=u"Aplikacja", required=False, initial='unres-gab') # TODO choices
master_file = forms.CharField(label=u"Plik główny", max_length=500, required=False)
executable = forms.CharField(label=u"Plik wykonywalny", max_length=500, required=False)
script = forms.CharField(label=u"Skrypt", widget=forms.Textarea(attrs={'rows': 2, 'cols': 40}), required=False)
data = super(JobDescriptionForm, self).clean()
force_field = data.get('force_field')
- if force_field == self.FORCE_FIELD_CHOICES[0]:
+
+ if force_field == u'GAB':
data['application'] = [u'unres-gab']
else:
data['application'] = [u'unres-e0ll2y']
- if data['master_file']:
- self.add_error('master_file', u"Należy podać plik główny")
-
+ '''if data['master_file']:
+ self.add_error('master_file', u"Należy podać plik główny. :"+data['master_file'])
+ '''
if data['procs'] and data['nodes']:
self.add_error(None, u"Zdefiniuj tylko jedno z pól: liczbę procesów lub topologię węzłów")
{% bootstrap_field form.retmin layout="horizontal" form_group_class="form-group collapse" %}
{% bootstrap_field form.retmax layout="horizontal" form_group_class="form-group collapse" %}
-
- {% bootstrap_field form.application layout="horizontal" %}
-
{% bootstrap_field form.master_file layout="horizontal" %}
- <!-- {% bootstrap_field form.application layout="horizontal" %}
+
+ {% bootstrap_field form.application layout="horizontal" %}
{% bootstrap_field form.executable layout="horizontal" form_group_class="form-group collapse" %}
{% bootstrap_field form.script layout="horizontal" form_group_class="form-group collapse" %}
{% bootstrap_field form.arguments layout="horizontal" %}
{% bootstrap_field form.note layout="horizontal" %}
- {% bootstrap_field form.grant layout="horizontal" form_group_class="form-group collapse" %}
+ {% bootstrap_field form.grant layout="horizontal" form_group_class="form-group collapse" %}
</fieldset>
<fieldset id="resources" class="tab-pane" role="tabpanel">
from qcg.utils import paginator_context, to_job_desc, to_form_data
from qcg.service import update_user_data, update_job, cancel, clean
+# for Debugging
+from pprint import pprint
def index(request):
return render(request, 'qcg/base.html')
params['env_variables'] = [(env['name'], env['value'])
for env in env_formset.cleaned_data if env and not env['DELETE']]
+ # tu wygenerować plik inputowy i go uploadować?
+
+ params['persistent'] = True
+ # Debugging parametrów
+ pprint(params)
+
job_desc = to_job_desc(params, request.session['proxy'])
if save_template:
return redirect(template)
+ # wyłączenie wysyłania zadania
+ '''
job = job_desc.submit()
messages.success(request,
format_html('<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> '
u'Zlecono zadanie <em>{}</em>.', job.job_id))
-
+ '''
return redirect('jobs')
else:
form = JobDescriptionForm(initial=form_data)