-
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.
Merge branch 'master' of github.com:roman-dvorak/DOSPORTAL
- Loading branch information
Showing
23 changed files
with
818 additions
and
177 deletions.
There are no files selected for viewing
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,38 @@ | ||
on: | ||
push: | ||
# branches: ['release'] | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: roman-dvorak/DOSPORTAL/web | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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") |
2 changes: 1 addition & 1 deletion
2
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
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
Oops, something went wrong.