-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dosportal improvement, view of users, records, ..
- Loading branch information
1 parent
8f43177
commit 14a92df
Showing
22 changed files
with
802 additions
and
175 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
from django import forms | ||
from .models import Detector, record | ||
|
||
|
||
class DetectorLogblogForm(forms.Form): | ||
text = forms.CharField( | ||
widget=forms.Textarea( | ||
attrs={ | ||
'class': 'form-control' | ||
} | ||
) | ||
) | ||
|
||
|
||
|
||
class RecordForm(forms.ModelForm): | ||
log_file = forms.FileField( | ||
required=False, | ||
widget=forms.widgets.FileInput(attrs={ | ||
'class': 'form-control', | ||
}), | ||
label="Log file", | ||
#widget=forms.FileInput(attrs={ | ||
# 'class': 'form-control', | ||
#}) | ||
) | ||
|
||
detector = forms.ModelChoiceField( | ||
queryset=Detector.objects.all(), | ||
widget=forms.Select(attrs={ | ||
'class': 'form-control', | ||
}), | ||
required=False | ||
) | ||
|
||
record_type = forms.ChoiceField( | ||
choices=record.RECORD_TYPES, | ||
widget=forms.Select(attrs={ | ||
'class': 'form-control', | ||
}) | ||
) | ||
|
||
time_start = forms.DateTimeField( | ||
widget=forms.DateTimeInput(attrs={ | ||
'type': "datetime-local", | ||
'class': 'form-control datetimepicker-input', | ||
}) | ||
) | ||
|
||
|
||
class Meta: | ||
model = record | ||
exclude = ("time_end", "measurement", "log_filename", "metadata", "duration") |
24 changes: 24 additions & 0 deletions
24
DOSPORTAL/migrations/0030_alter_flight_cari_alter_measurement_flight.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.7 on 2023-12-03 10:54 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('DOSPORTAL', '0029_carimodel_flight_cari'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='flight', | ||
name='cari', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='DOSPORTAL.carimodel'), | ||
), | ||
migrations.AlterField( | ||
model_name='measurement', | ||
name='flight', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='measurement', to='DOSPORTAL.flight', verbose_name='Reference na objekt s informacemi o letu'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.7 on 2023-12-03 16:09 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('DOSPORTAL', '0030_alter_flight_cari_alter_measurement_flight'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='detectorlogbook', | ||
name='public', | ||
field=models.BooleanField(default=True), | ||
), | ||
] |
29 changes: 29 additions & 0 deletions
29
DOSPORTAL/migrations/0032_detector_data_alter_detectorlogbook_public_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 4.2.7 on 2023-12-03 17:21 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('DOSPORTAL', '0031_detectorlogbook_public'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='detector', | ||
name='data', | ||
field=models.JSONField(default={}, help_text='Detector metadata, used for advanced data processing and maintaining', verbose_name='Detector data'), | ||
preserve_default=False, | ||
), | ||
migrations.AlterField( | ||
model_name='detectorlogbook', | ||
name='public', | ||
field=models.BooleanField(default=True, help_text='Private logbook will be visible for maintainers of detector and for dosportal admins.', verbose_name='Wish to be visible to everyone?'), | ||
), | ||
migrations.AlterField( | ||
model_name='detectorlogbook', | ||
name='text', | ||
field=models.TextField(help_text='Detailed description of activity made on the detector.', verbose_name='Logbook text'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.7 on 2023-12-03 17:23 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('DOSPORTAL', '0032_detector_data_alter_detectorlogbook_public_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='detector', | ||
name='manufactured_date', | ||
field=models.DateField(blank=True, help_text='Date when detector was manufactured', null=True, verbose_name='Manufactured date'), | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
DOSPORTAL/migrations/0034_record_metadata_alter_detector_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 4.2.7 on 2023-12-03 20:03 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('DOSPORTAL', '0033_detector_manufactured_date'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='record', | ||
name='metadata', | ||
field=models.JSONField(help_text='record metadata, used for advanced data processing and maintaining', null=True, verbose_name='record_metadata'), | ||
), | ||
migrations.AlterField( | ||
model_name='detector', | ||
name='data', | ||
field=models.JSONField(help_text='Detector metadata, used for advanced data processing and maintaining', verbose_name='Detector metadata'), | ||
), | ||
] |
22 changes: 22 additions & 0 deletions
22
DOSPORTAL/migrations/0035_remove_record_time_end_record_record_duration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 4.2.7 on 2023-12-03 21:17 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('DOSPORTAL', '0034_record_metadata_alter_detector_data'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='record', | ||
name='time_end', | ||
), | ||
migrations.AddField( | ||
model_name='record', | ||
name='record_duration', | ||
field=models.DurationField(help_text='Duration of record', null=True, verbose_name='Record duration'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.