diff --git a/SAS/TMSS/src/tmss/CMakeLists.txt b/SAS/TMSS/src/tmss/CMakeLists.txt index a38c2b149ed20a69a4ae3376365d869db9c1990e..3e7754777f2f6d34a58352c9d78765303dd9cfa4 100644 --- a/SAS/TMSS/src/tmss/CMakeLists.txt +++ b/SAS/TMSS/src/tmss/CMakeLists.txt @@ -13,3 +13,4 @@ python_install(${_py_files} DESTINATION lofar/sas/tmss/tmss) add_subdirectory(tmssapp) +add_subdirectory(workflowapp) diff --git a/SAS/TMSS/src/tmss/settings.py b/SAS/TMSS/src/tmss/settings.py index 3fcb6ea5e997dfabaa0357e8d62c9da6b4a54cac..5e5d8e1e11e724e6cd93e31f57c247bc34b131f7 100644 --- a/SAS/TMSS/src/tmss/settings.py +++ b/SAS/TMSS/src/tmss/settings.py @@ -116,6 +116,7 @@ INSTALLED_APPS = [ 'jsoneditor', 'drf_yasg', 'django_filters', + 'lofar.sas.tmss.tmss.workflowapp', 'material', 'material.frontend', 'viewflow', diff --git a/SAS/TMSS/src/tmss/tmssapp/CMakeLists.txt b/SAS/TMSS/src/tmss/tmssapp/CMakeLists.txt index e24af6998d0ad9240a454cd41fdb389a38cb4208..58c545f7ed434d8c05064e1fad48ebf0c93d821a 100644 --- a/SAS/TMSS/src/tmss/tmssapp/CMakeLists.txt +++ b/SAS/TMSS/src/tmss/tmssapp/CMakeLists.txt @@ -23,5 +23,3 @@ add_subdirectory(serializers) add_subdirectory(viewsets) add_subdirectory(adapters) add_subdirectory(schemas) -add_subdirectory(workflows) - diff --git a/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py b/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py index daa63f9369488f5e160485fbfec01af9cdb5121b..45b53b6b1f17acc72ba81dedbfe5036d1b420889 100644 --- a/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py +++ b/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.9 on 2020-09-24 15:47 +# Generated by Django 3.0.9 on 2020-09-30 09:15 from django.conf import settings import django.contrib.postgres.fields @@ -14,7 +14,6 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('viewflow', '0008_jsonfield_and_artifact'), ] operations = [ @@ -492,26 +491,6 @@ class Migration(migrations.Migration): 'abstract': False, }, ), - migrations.CreateModel( - name='SchedulingUnitDemo', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=50)), - ('state', models.IntegerField()), - ], - ), - migrations.CreateModel( - name='SchedulingUnitDemoProcess', - fields=[ - ('process_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='viewflow.Process')), - ('text', models.CharField(max_length=150)), - ('approved', models.BooleanField(default=False)), - ], - options={ - 'abstract': False, - }, - bases=('viewflow.process',), - ), migrations.CreateModel( name='SchedulingUnitDraft', fields=[ @@ -764,19 +743,6 @@ class Migration(migrations.Migration): 'abstract': False, }, ), - migrations.CreateModel( - name='HelloWorldProcess', - fields=[ - ], - options={ - 'verbose_name': 'World Request', - 'verbose_name_plural': 'World Requests', - 'proxy': True, - 'indexes': [], - 'constraints': [], - }, - bases=('viewflow.process',), - ), migrations.CreateModel( name='Setting', fields=[ @@ -1093,11 +1059,6 @@ class Migration(migrations.Migration): name='scheduling_set', field=models.ForeignKey(help_text='Set to which this scheduling unit draft belongs.', on_delete=django.db.models.deletion.CASCADE, related_name='scheduling_unit_drafts', to='tmssapp.SchedulingSet'), ), - migrations.AddField( - model_name='schedulingunitdemoprocess', - name='su', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tmssapp.SchedulingUnitDemo'), - ), migrations.AddField( model_name='schedulingunitblueprint', name='draft', diff --git a/SAS/TMSS/src/tmss/tmssapp/models/CMakeLists.txt b/SAS/TMSS/src/tmss/tmssapp/models/CMakeLists.txt index 2ac64b115ecf2f4bc700c614a3ba9572f3af6aa6..7598bc12c79161c19b95275e001a28adb92d3b56 100644 --- a/SAS/TMSS/src/tmss/tmssapp/models/CMakeLists.txt +++ b/SAS/TMSS/src/tmss/tmssapp/models/CMakeLists.txt @@ -5,8 +5,6 @@ set(_py_files __init__.py specification.py scheduling.py - helloworldflow.py - schedulingunitdemoflow.py ) python_install(${_py_files} diff --git a/SAS/TMSS/src/tmss/tmssapp/models/__init__.py b/SAS/TMSS/src/tmss/tmssapp/models/__init__.py index be7a174d740d60b255c47117cb8abfc657cc9bde..93f3c7e6d54f95c40d6d9484aad802b13f9991ba 100644 --- a/SAS/TMSS/src/tmss/tmssapp/models/__init__.py +++ b/SAS/TMSS/src/tmss/tmssapp/models/__init__.py @@ -1,4 +1,2 @@ from .specification import * -from .scheduling import * -from .helloworldflow import * -from .schedulingunitdemoflow import * \ No newline at end of file +from .scheduling import * \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/tmssapp/viewsets/CMakeLists.txt b/SAS/TMSS/src/tmss/tmssapp/viewsets/CMakeLists.txt index 445e0bbe4672e5cdad3a5a41be8575dbf2169ff0..fc0325a523508e371b2456d96b3467274dae748d 100644 --- a/SAS/TMSS/src/tmss/tmssapp/viewsets/CMakeLists.txt +++ b/SAS/TMSS/src/tmss/tmssapp/viewsets/CMakeLists.txt @@ -6,8 +6,6 @@ set(_py_files lofar_viewset.py specification.py scheduling.py - helloworldflow.py - schedulingunitdemoflow.py ) python_install(${_py_files} diff --git a/SAS/TMSS/src/tmss/tmssapp/viewsets/__init__.py b/SAS/TMSS/src/tmss/tmssapp/viewsets/__init__.py index 882458975ee4be50507620471ed1026433ddf589..93f3c7e6d54f95c40d6d9484aad802b13f9991ba 100644 --- a/SAS/TMSS/src/tmss/tmssapp/viewsets/__init__.py +++ b/SAS/TMSS/src/tmss/tmssapp/viewsets/__init__.py @@ -1,3 +1,2 @@ from .specification import * -from .scheduling import * -from .schedulingunitdemoflow import * \ No newline at end of file +from .scheduling import * \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/urls.py b/SAS/TMSS/src/tmss/urls.py index 37d9d081a3a3ecbee61e876ea3ee365b7c111ace..af3411b868953413e5b87113d6beade2c26c6ff5 100644 --- a/SAS/TMSS/src/tmss/urls.py +++ b/SAS/TMSS/src/tmss/urls.py @@ -23,7 +23,7 @@ from django.views.generic.base import TemplateView, RedirectView from collections import OrderedDict from rest_framework import routers, permissions -from .tmssapp import viewsets, models, serializers, views, workflows +from .tmssapp import viewsets, models, serializers, views from rest_framework.documentation import include_docs_urls from drf_yasg.views import get_schema_view from drf_yasg import openapi diff --git a/SAS/TMSS/src/tmss/workflowapp/CMakeLists.txt b/SAS/TMSS/src/tmss/workflowapp/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..1c8dc797642fb136f781043f45875173b0e5ebfa --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/CMakeLists.txt @@ -0,0 +1,19 @@ + +include(PythonInstall) + +set(_py_files + __init__.py + admin.py + apps.py + ) + +python_install(${_py_files} + DESTINATION lofar/sas/tmss/tmss/workflowapp) + + + +add_subdirectory(migrations) +add_subdirectory(models) +add_subdirectory(viewsets) +add_subdirectory(workflows) + diff --git a/SAS/TMSS/src/tmss/tmssapp/viewsets/helloworldflow.py b/SAS/TMSS/src/tmss/workflowapp/__init__.py similarity index 100% rename from SAS/TMSS/src/tmss/tmssapp/viewsets/helloworldflow.py rename to SAS/TMSS/src/tmss/workflowapp/__init__.py diff --git a/SAS/TMSS/src/tmss/workflowapp/admin.py b/SAS/TMSS/src/tmss/workflowapp/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..8c38f3f3dad51e4585f3984282c2a4bec5349c1e --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/SAS/TMSS/src/tmss/workflowapp/apps.py b/SAS/TMSS/src/tmss/workflowapp/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..7a61bbed619de41b996b6b0d06bb82559bce2819 --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class WorkfowappConfig(AppConfig): + name = 'workfowapp' diff --git a/SAS/TMSS/src/tmss/workflowapp/migrations/0001_initial.py b/SAS/TMSS/src/tmss/workflowapp/migrations/0001_initial.py new file mode 100644 index 0000000000000000000000000000000000000000..102edfd62a840ae9b7e66fbe07242e5c80aaf3f2 --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/migrations/0001_initial.py @@ -0,0 +1,50 @@ +# Generated by Django 3.0.9 on 2020-09-30 09:15 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('viewflow', '0008_jsonfield_and_artifact'), + ] + + operations = [ + migrations.CreateModel( + name='SchedulingUnitDemo', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50)), + ('state', models.IntegerField()), + ], + ), + migrations.CreateModel( + name='HelloWorldProcess', + fields=[ + ], + options={ + 'verbose_name': 'World Request', + 'verbose_name_plural': 'World Requests', + 'proxy': True, + 'indexes': [], + 'constraints': [], + }, + bases=('viewflow.process',), + ), + migrations.CreateModel( + name='SchedulingUnitDemoProcess', + fields=[ + ('process_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='viewflow.Process')), + ('text', models.CharField(max_length=150)), + ('approved', models.BooleanField(default=False)), + ('su', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='workflowapp.SchedulingUnitDemo')), + ], + options={ + 'abstract': False, + }, + bases=('viewflow.process',), + ), + ] diff --git a/SAS/TMSS/src/tmss/workflowapp/migrations/CMakeLists.txt b/SAS/TMSS/src/tmss/workflowapp/migrations/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..158ea7946445fcee8e52b00447df80a873e98ec2 --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/migrations/CMakeLists.txt @@ -0,0 +1,8 @@ + +include(PythonInstall) + + +FILE(GLOB _py_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py) + +python_install(${_py_files} + DESTINATION lofar/sas/tmss/tmss/workflowapp/migrations) \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/workflowapp/migrations/__init__.py b/SAS/TMSS/src/tmss/workflowapp/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/SAS/TMSS/src/tmss/workflowapp/models.py b/SAS/TMSS/src/tmss/workflowapp/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/SAS/TMSS/src/tmss/tmssapp/workflows/CMakeLists.txt b/SAS/TMSS/src/tmss/workflowapp/models/CMakeLists.txt similarity index 71% rename from SAS/TMSS/src/tmss/tmssapp/workflows/CMakeLists.txt rename to SAS/TMSS/src/tmss/workflowapp/models/CMakeLists.txt index 474aada33041160e598ac2b1a126d68971d75afd..1c94f0a15d5ade684111945ce5bb79dfe25f7a91 100644 --- a/SAS/TMSS/src/tmss/tmssapp/workflows/CMakeLists.txt +++ b/SAS/TMSS/src/tmss/workflowapp/models/CMakeLists.txt @@ -8,4 +8,4 @@ set(_py_files ) python_install(${_py_files} - DESTINATION lofar/sas/tmss/tmss/tmssapp/workflows) + DESTINATION lofar/sas/tmss/tmss/workflowapp/models) diff --git a/SAS/TMSS/src/tmss/tmssapp/workflows/__init__.py b/SAS/TMSS/src/tmss/workflowapp/models/__init__.py similarity index 100% rename from SAS/TMSS/src/tmss/tmssapp/workflows/__init__.py rename to SAS/TMSS/src/tmss/workflowapp/models/__init__.py diff --git a/SAS/TMSS/src/tmss/tmssapp/models/helloworldflow.py b/SAS/TMSS/src/tmss/workflowapp/models/helloworldflow.py similarity index 100% rename from SAS/TMSS/src/tmss/tmssapp/models/helloworldflow.py rename to SAS/TMSS/src/tmss/workflowapp/models/helloworldflow.py diff --git a/SAS/TMSS/src/tmss/tmssapp/models/schedulingunitdemoflow.py b/SAS/TMSS/src/tmss/workflowapp/models/schedulingunitdemoflow.py similarity index 100% rename from SAS/TMSS/src/tmss/tmssapp/models/schedulingunitdemoflow.py rename to SAS/TMSS/src/tmss/workflowapp/models/schedulingunitdemoflow.py diff --git a/SAS/TMSS/src/tmss/workflowapp/tests.py b/SAS/TMSS/src/tmss/workflowapp/tests.py new file mode 100644 index 0000000000000000000000000000000000000000..7ce503c2dd97ba78597f6ff6e4393132753573f6 --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/SAS/TMSS/src/tmss/workflowapp/views.py b/SAS/TMSS/src/tmss/workflowapp/views.py new file mode 100644 index 0000000000000000000000000000000000000000..91ea44a218fbd2f408430959283f0419c921093e --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/SAS/TMSS/src/tmss/workflowapp/viewsets/CMakeLists.txt b/SAS/TMSS/src/tmss/workflowapp/viewsets/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..fb8816b96902d3a611d9bfab92b4c5bbb5c9c487 --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/viewsets/CMakeLists.txt @@ -0,0 +1,11 @@ + +include(PythonInstall) + +set(_py_files + __init__.py + helloworldflow.py + schedulingunitdemoflow.py + ) + +python_install(${_py_files} + DESTINATION lofar/sas/tmss/tmss/workflowapp/viewsets) diff --git a/SAS/TMSS/src/tmss/workflowapp/viewsets/__init__.py b/SAS/TMSS/src/tmss/workflowapp/viewsets/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b77c70aeb959e9d4f63c395fd1079cfbbe3bc078 --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/viewsets/__init__.py @@ -0,0 +1 @@ +from .schedulingunitdemoflow import * \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/workflowapp/viewsets/helloworldflow.py b/SAS/TMSS/src/tmss/workflowapp/viewsets/helloworldflow.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/SAS/TMSS/src/tmss/tmssapp/viewsets/schedulingunitdemoflow.py b/SAS/TMSS/src/tmss/workflowapp/viewsets/schedulingunitdemoflow.py similarity index 100% rename from SAS/TMSS/src/tmss/tmssapp/viewsets/schedulingunitdemoflow.py rename to SAS/TMSS/src/tmss/workflowapp/viewsets/schedulingunitdemoflow.py diff --git a/SAS/TMSS/src/tmss/workflowapp/workflows/CMakeLists.txt b/SAS/TMSS/src/tmss/workflowapp/workflows/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..f52cef52d6e3a895d7688cc7bb9c4e975df23ac7 --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/workflows/CMakeLists.txt @@ -0,0 +1,11 @@ + +include(PythonInstall) + +set(_py_files + __init__.py + helloworldflow.py + schedulingunitdemoflow.py + ) + +python_install(${_py_files} + DESTINATION lofar/sas/tmss/tmss/workflowapp/workflows) diff --git a/SAS/TMSS/src/tmss/workflowapp/workflows/__init__.py b/SAS/TMSS/src/tmss/workflowapp/workflows/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..45516795a25730483ebfa40c1fbdb5f533df8ebe --- /dev/null +++ b/SAS/TMSS/src/tmss/workflowapp/workflows/__init__.py @@ -0,0 +1,2 @@ +from .helloworldflow import * +from .schedulingunitdemoflow import * \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/tmssapp/workflows/helloworldflow.py b/SAS/TMSS/src/tmss/workflowapp/workflows/helloworldflow.py similarity index 100% rename from SAS/TMSS/src/tmss/tmssapp/workflows/helloworldflow.py rename to SAS/TMSS/src/tmss/workflowapp/workflows/helloworldflow.py diff --git a/SAS/TMSS/src/tmss/tmssapp/workflows/schedulingunitdemoflow.py b/SAS/TMSS/src/tmss/workflowapp/workflows/schedulingunitdemoflow.py similarity index 100% rename from SAS/TMSS/src/tmss/tmssapp/workflows/schedulingunitdemoflow.py rename to SAS/TMSS/src/tmss/workflowapp/workflows/schedulingunitdemoflow.py