From: Maciej Tronowski Date: Fri, 27 Feb 2015 16:17:15 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/master' X-Git-Tag: v1.0~147 X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=cc19da48b2818c23cd4643ea62405a47da02037a;p=qcg-portal.git Merge remote-tracking branch 'origin/master' # Conflicts: # plgng/settings.py # qcg/forms.py # qcg/views.py --- cc19da48b2818c23cd4643ea62405a47da02037a diff --cc qcg/forms.py index 1771327,e078fe7..83a053a --- a/qcg/forms.py +++ b/qcg/forms.py @@@ -61,111 -56,17 +61,127 @@@ class FiltersForm(forms.Form) for host in Allocation.objects.values_list('host_name', flat=True).order_by('host_name').distinct()) +class JobDescriptionForm(forms.Form): + class Host(object): + GALERA = 'galera.task.gda.pl' + HYDRA = 'hydra.icm.edu.pl' + INULA = 'inula.man.poznan.pl' + MOSS = 'moss.man.poznan.pl' + NOVA = 'nova.wcss.wroc.pl' + REEF = 'reef.man.poznan.pl' + ZEUS = 'zeus.cyfronet.pl' + + CHOICES = ( + CHOICES_PLACEHOLDER, + (GALERA, u'Galera'), + (HYDRA, u'Hydra'), + (INULA, u'Inula'), + (MOSS, u'Moss'), + (NOVA, u'Supernova'), + (REEF, u'Reef'), + (ZEUS, u'Zeus'), + ) + APPLICATION_CHOICES = ( + CHOICES_PLACEHOLDER, + ('bash', 'BASH'), + ('python', 'Python'), + ('matlab', 'MATLAB'), + ) + QUEUE_CHOICES = ( + CHOICES_PLACEHOLDER, + ('plgid', 'plgrid'), + ('plgid-long', 'plgrid-long'), + ('plgid-testing', 'plgrid-testing'), + ) + MODULES_CHOICES = ( + ('plgrid/apps/python', 'plgrid/apps/python'), + ('plgrid/apps/matlab', 'plgrid/apps/matlab'), + ) + NOTIFY_CHOICES = ( + (0, u'Brak'), + (1, u'E-mail'), + (2, u'XMPP'), + ) + PROCESS_CHOICES = ( + (0, u'Brak'), + (1, u'Polecenie'), + (2, u'Skrypt'), + ) + + application = forms.ChoiceField(choices=APPLICATION_CHOICES, label=u"Aplikacja", required=False) # TODO choices + executable = forms.CharField(label=u"Polecenie", max_length=500, required=False) # TODO grid ftp + arguments = forms.CharField(label=u"Argumenty", max_length=1000, required=False) + + name = forms.CharField(label=u"Nazwa", max_length=100, required=False) + note = forms.CharField(label=u"Notatka", widget=forms.Textarea(attrs={'rows': 2, 'cols': 40}), required=False) + grant = forms.CharField(label=u"Grant", max_length=100, required=False) + + host = forms.ChoiceField(label=u"Host", choices=Host.CHOICES, required=False) + queue = PredefinedChoiceField(choices=QUEUE_CHOICES, label=u"Kolejka", required=False) + procs = forms.IntegerField(label=u"Liczba procesów", min_value=0, required=False) + nodes = forms.CharField(label=u"Topologia węzłów", max_length=10, validators=[nodes_validator], required=False) + wall_time = forms.IntegerField(label=u"Wall time (s)", min_value=0, required=False) # TODO duration field + memory = forms.IntegerField(label=u"Pamięć (MB)", min_value=0, required=False) + memory_per_slot = forms.IntegerField(label=u"Pamięci per proces (MB)", min_value=0, required=False) + + # TODO grid ftp + input = forms.CharField(label=u"Standardowe wejście", max_length=500, required=False) + output = forms.CharField(label=u"Standardowe wyjście", max_length=500, required=False) + error = forms.CharField(label=u"Standardowe wyjście błędów", max_length=500, required=False) + stage_in = forms.CharField(label=u"Stage in", max_length=500, required=False) + stage_out = forms.CharField(label=u"Stage out", max_length=500, required=False) + + properties = MultiplePredefinedChoiceField(label=u"Właściwości węzłów", required=False) + modules = forms.MultipleChoiceField(label=u"Moduły", choices=MODULES_CHOICES, required=False) # TODO choices + + not_after = forms.DateTimeField(label=u"Nie później niż", required=False) + not_before = forms.DateTimeField(label=u"Nie wcześniej niż", required=False) + deadline = forms.IntegerField(label=u"Deadline (s)", min_value=0, required=False) # TODO duration field + reservation = forms.CharField(label=u"Rezerwacja", max_length=100, required=False) + + monitoring = forms.BooleanField(label=u"Portal QCG-Monitoring", required=False) + notify_type = forms.ChoiceField(label=u"Monitorowanie stanu", choices=NOTIFY_CHOICES, required=False, initial=0, + widget=forms.RadioSelect) + notify_address = forms.EmailField(label=u"Adres", required=False) + watch_output_type = forms.ChoiceField(label=u"Monitorowanie wyjścia", choices=NOTIFY_CHOICES, required=False, + initial=0, widget=forms.RadioSelect) + watch_output_address = forms.EmailField(label=u"Adres", required=False) + watch_output_pattern = forms.CharField(label=u"Wzorzec", max_length=500, required=False) + + preprocess_type = forms.ChoiceField(label=u"Preprocessing", choices=PROCESS_CHOICES, required=False, initial=0, + widget=forms.RadioSelect) + preprocess_cmd = forms.CharField(label=u"Polecenie", max_length=1000, required=False) + preprocess_script = forms.CharField(label=u"Skrypt", max_length=500, required=False) # TODO grid ftp + postprocess_type = forms.ChoiceField(label=u"Postprocessing", choices=PROCESS_CHOICES, required=False, initial=0, + widget=forms.RadioSelect) + postprocess_cmd = forms.CharField(label=u"Polecenie", max_length=1000, required=False) + postprocess_script = forms.CharField(label=u"Skrypt", max_length=500, required=False) # TODO grid ftp + native = MultiplePredefinedChoiceField(label=u"Parametry natywne", required=False) + persistent = forms.BooleanField(label=u"Trwałe", required=False) + use_scratch = forms.BooleanField(label=u"Scratch", required=False) + + +class EnvForm(forms.Form): + name = forms.CharField(label=u"Nazwa", max_length=100, validators=[env_name_validator], + widget=forms.TextInput(attrs={'placeholder': u'Nazwa'})) + value = forms.CharField(label=u"Wartość", max_length=500, + widget=forms.TextInput(attrs={'placeholder': u'Wartość'})) + + +EnvFormSet = forms.formset_factory(EnvForm, can_delete=True, extra=0) ++ ++ + class ColumnsForm(forms.Form): + JOB_ID, DESCRIPTION, SUBMISSION, START, END, STATUS, HOST = range(7) + COLUMNS_CHOICES = ( + (JOB_ID, u"Identyfikator zadania"), + (DESCRIPTION, u"Opis"), + (SUBMISSION, u"Wysłane"), + (START, u"Start"), + (END, u"Koniec"), + (STATUS, u"Status"), + (HOST, u"Host"), + ) + + columns = forms.MultipleChoiceField(choices=COLUMNS_CHOICES, label=u"Kolumny", required=False, - widget=forms.CheckboxSelectMultiple) ++ widget=forms.CheckboxSelectMultiple) diff --cc qcg/templates/qcg/jobs.html index 9f55914,db14d9d..9f184e7 --- a/qcg/templates/qcg/jobs.html +++ b/qcg/templates/qcg/jobs.html @@@ -18,8 -18,9 +18,9 @@@ {% block extra_js %} - + +