diff --git a/SAS/TMSS/src/templates/__react_jsonschema_form_widget__schema_uri.html b/SAS/TMSS/src/templates/__react_jsonschema_form_widget__schema_uri.html deleted file mode 100644 index 0a19594dadca5cc20a0a9be13c071518733152bb..0000000000000000000000000000000000000000 --- a/SAS/TMSS/src/templates/__react_jsonschema_form_widget__schema_uri.html +++ /dev/null @@ -1,87 +0,0 @@ - -<!-- EXTERNAL RESOURCES --> -<!--<link rel="stylesheet" id="theme" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">--> -<script src="https://unpkg.com/react@16/umd/react.development.js"></script> -<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> -<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> -<script src="https://unpkg.com/react-jsonschema-form/dist/react-jsonschema-form.js"></script> - - -<!-- LOGIC --> -<script type="text/babel"> - - const { Component } = React; - const { render } = ReactDOM; - const {default: Form} = JSONSchemaForm; - const log = (type) => console.log.bind(console, type); - - // Read current document provided by Django. Change 'null' default to {} - var formData = {{ field.value|safe }}; - if (formData === "null" || formData === null){ - var formData = {} - } - console.log("Initial data: " + JSON.stringify(formData)); - - // Updates the hidden input that Django will read the modified JSON from - function set_return_doc(doc){ - document.getElementById("helper_input").value = JSON.stringify(doc.formData); - // console.log(JSON.stringify(doc.formData)); - } - - // Default live validation looks pretty nice in the demo, does not show here for some reason. - // Custom validation function works as such: - function validate(formData, errors) { - // todo: check formData against schema by some external script or so - // if(valid) ( - errors.relative_starttime.addError("The horror!"); - // } - return errors; - } - - // This let's you change the appearance of the individual fields. - // Haven't found a global switch for fields of certain type yet. - const uiSchema = { - relative_starttime: { "ui:widget": "range" } - }; - - // Read schema uri that was specified by Serializer - const template_schema_uri = "{{field.style.template_schema_uri}}"; - console.log('Loading template from ' + template_schema_uri); - - // Get the schema, then render the form with it - $.get(template_schema_uri, function( template ) { - const schema = template['schema']; - console.log('Schema is: ' + JSON.stringify(schema)); - console.log('Rendering JSON form'); - render(( - <Form schema={schema} - uiSchema={uiSchema} - formData={formData} - liveValidate={true} - //validate={validate} // does not work?! - onChange={set_return_doc} - onSubmit={log("submitted")} - onError={log("errors")} /> - ), document.getElementById("app")); - }); - console.log('Rendering done'); - -</script> - - -<!-- WIDGET HTML --> -<div class="form-group {% if field.errors %}has-error{% endif %}"> - - <label class="col-sm-2 control-label"> - {% if field.label %}{{ field.label }}{% endif %} - </label> - - <input id="helper_input" name="{{ field.name }}" type="hidden" class="form-control" {% if field.value != None %} value="{{ field.value|safe }}"{% endif %}"> - - <div class="col-sm-10"> - <div id="app"></div> - </div> - - <!--<pre> {% debug %} </pre>--> - -</div> \ No newline at end of file diff --git a/SAS/TMSS/src/templates/json_editor.html b/SAS/TMSS/src/templates/json_editor.html deleted file mode 100644 index 1ee2e451068a5ee14f72a59cac2e9230cf31da8a..0000000000000000000000000000000000000000 --- a/SAS/TMSS/src/templates/json_editor.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"/> - <script src="https://cdn.jsdelivr.net/npm/@json-editor/json-editor/dist/jsoneditor.min.js"></script> -</head> -<body> - -<div id='app'></div> - -<script> - var element = document.getElementById('app'); - var schema = { - "type": "array", - "title": "Numbers", - "items": { - "type": "number", - "format": "number", - "title": "Number" - } - }; - var editor = new JSONEditor(element, { - schema: schema - }); - document.querySelector('.get-value').addEventListener('click', function () { - debug.value = JSON.stringify(editor.getValue()); - }); -</script> - -</body> -</html> diff --git a/SAS/TMSS/src/templates/json_editor_widget.html b/SAS/TMSS/src/templates/json_editor_widget.html deleted file mode 100644 index a8aeb6196e5d3d041a05fd9049f94a48f510d929..0000000000000000000000000000000000000000 --- a/SAS/TMSS/src/templates/json_editor_widget.html +++ /dev/null @@ -1,65 +0,0 @@ - -<!-- EXTERNAL RESOURCES --> -<!--<link rel="stylesheet" id="theme" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">--> -<!--<script src="https://unpkg.com/react@16/umd/react.development.js"></script>--> -<!--<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>--> -<!--<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>--> -<script src="https://cdn.jsdelivr.net/npm/@json-editor/json-editor/dist/jsoneditor.min.js"></script> - -<!-- WIDGET HTML --> -<div class="form-group {% if field.errors %}has-error{% endif %}"> - - <label class="col-sm-2 control-label"> - {% if field.label %}{{ field.label }}{% endif %} - </label> - - <input id="helper_input" name="{{ field.name }}" type="hidden" class="form-control" {% if field.value != None %} value="{{ field.value|safe }}"{% endif %}"> - - <div class="col-sm-10"> - <div id="app"></div> - </div> - - <!--<pre> {% debug %} </pre>--> - -</div> - - - -<!-- LOGIC --> -<script type="text/javascript"> - - // Read current document provided by Django. Change 'null' default to {} - var formData = {{ field.value|safe }}; - if (formData === "null" || formData === null){ - var formData = {} - } - console.log("Initial data: " + JSON.stringify(formData)); - - // Read schema (added to widget style by Serializer) - var schema = {{ field.style.schema|safe }}; - console.log('Schema is: ' + JSON.stringify(schema)); - - // render the widget - console.log('Rendering JSON form'); - - JSONEditor.defaults.options.theme = 'bootstrap3'; - JSONEditor.defaults.options.iconlib = "bootstrap3"; - - var element = document.getElementById('app'); - var editor = new JSONEditor(element,{ - schema: schema - }); - - editor.setValue(formData); - console.log('Rendering done'); - - // Updates the hidden input that Django will read the modified JSON from - editor.on('change',function() { - var value = editor.getValue(); - document.getElementById("helper_input").value = JSON.stringify(value); - //console.log(JSON.stringify(value)); - }); - - console.log(value) - -</script> diff --git a/SAS/TMSS/src/templates/react_jsonschema_form.html b/SAS/TMSS/src/templates/react_jsonschema_form.html deleted file mode 100644 index f80d7b18fe3b25f071a396d62a1b88a42e5f0882..0000000000000000000000000000000000000000 --- a/SAS/TMSS/src/templates/react_jsonschema_form.html +++ /dev/null @@ -1,606 +0,0 @@ -<html> -<head> - <title>TMSS JSON EDITOR TEST</title> - <meta charset="utf-8"> - <link rel="stylesheet" id="theme" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> - <script src="https://unpkg.com/react@16/umd/react.development.js"></script> - <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> - <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> - <script src="https://unpkg.com/react-jsonschema-form/dist/react-jsonschema-form.js"></script> -</head> -<body> -<div id="app"></div> -<script type="text/javascript"> -const schema = { - "$id": "http://example.com/example.json", - "type": "object", - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "pointing": { - "type": "object", - "additionalProperties": false, - "format": "grid", - "properties": { - "direction_type": { - "type": "string", - "title": "Reference frame", - "description": "", - "default": "J2000", - "enum": [ - "J2000", - "SUN", - "MOON", - "MERCURY", - "VENUS", - "MARS", - "JUPITER", - "SATURN", - "URANUS", - "NEPTUNE", - "PLUTO" - ] - }, - "angle1": { - "type": "number", - "title": "Angle 1", - "description": "First angle (f.e. RA)", - "default": 0 - }, - "angle2": { - "type": "number", - "title": "Angle 2", - "description": "Second angle (f.e. DEC)", - "default": 0 - }, - "distance": { - "type": "number", - "title": "Distance", - "description": "", - "default": 0, - "minimum": 0, - "required": false - } - } - }, - "beamformer_settings": { - "oneOf": [ - { - "type": "object", - "title": "Disabled", - "additionalProperties": false, - "format": "grid", - "properties": {} - }, - { - "type": "object", - "title": "Enabled", - "additionalProperties": false, - "format": "grid", - "properties": { - "enabled": { - "type": "boolean", - "format": "checkbox", - "title": "Enabled", - "description": "", - "default": true, - "options": { - "hidden": true - }, - "enum": [ - true - ] - }, - "storage_cluster": { - "type": "string", - "title": "Storage cluster", - "description": "Which cluster to write the data to", - "default": "CEP4", - "enum": [ - "CEP4", - "DragNet" - ] - }, - "channels_per_subband": { - "type": "integer", - "title": "Channels/subband", - "description": "Number of frequency bands per subband", - "default": 1, - "enum": [ - 1, - 16, - 32, - 64, - 128 - ] - }, - "stokes": { - "type": "string", - "title": "Stokes parameters", - "description": "Which stokes to produce", - "default": "I", - "enum": [ - "I", - "IQUV", - "XXYY" - ] - }, - "integration_factor": { - "type": "integer", - "title": "Integration factor (samples)", - "description": "Number of samples to integrate", - "default": 1, - "minimum": 1 - }, - "subbands_per_file": { - "type": "integer", - "title": "Subbands/file", - "description": "Fewer creates more but smaller files", - "default": 512, - "minimum": 1, - "maximum": 512 - } - } - } - ] - } - }, - "format": "grid", - "additionalProperties": false, - "properties": { - "relative_starttime": { - "type": "number", - "title": "Relative starttime (seconds)", - "description": "Starttime with respect to other observations in this scheduling unit", - "default": 0, - "minimum": 0 - }, - "duration": { - "type": "number", - "title": "Duration (seconds)", - "description": "Duration of this observation", - "default": 60, - "minimum": 0 - }, - "station_mode": { - "type": "object", - "title": "Station mode", - "format": "grid", - "additionalProperties": false, - "properties": { - "bitmode": { - "type": "integer", - "title": "Bits/sample", - "description": "Sample sensitivity. Fewer bits allow more subbands.", - "default": 8, - "enum": [ - 4, - 8, - 16 - ] - }, - "clockMHz": { - "type": "integer", - "title": "Clock (MHz)", - "description": "Sample clock", - "default": 200, - "enum": [ - 160, - 200 - ] - }, - "antenna_type": { - "type": "string", - "title": "Antenna type", - "description": "Determines frequency range and offset of subbands", - "default": "HBA", - "enum": [ - "LBA", - "HBA" - ] - }, - "filter": { - "type": "string", - "title": "Band-pass filter", - "description": "Must match antenna type and clock", - "default": "HBA_110_190", - "enum": [ - "LBA_10_70", - "LBA_30_70", - "LBA_10_90", - "LBA_30_90", - "HBA_110_190", - "HBA_170_230", - "HBA_210_250" - ] - } - } - }, - "stations": { - "type": "object", - "title": "Station list", - "additionalProperties": false, - "properties": { - "station_list": { - "title": "Station list", - "oneOf": [ - { - "type": "array", - "title": "Fixed list", - "format": "checkbox", - "additionalItems": false, - "additionalProperties": false, - "items": { - "type": "string", - "enum": [ - "CS001", - "CS002", - "CS003", - "CS004", - "CS005", - "CS006", - "CS007", - "CS011", - "CS013", - "CS017", - "CS021", - "CS024", - "CS026", - "CS028", - "CS030", - "CS031", - "CS032", - "CS101", - "CS103", - "CS201", - "CS301", - "CS302", - "CS401", - "CS501", - "RS104", - "RS106", - "RS205", - "RS208", - "RS210", - "RS305", - "RS306", - "RS307", - "RS310", - "RS406", - "RS407", - "RS409", - "RS410", - "RS503", - "RS508", - "RS509", - "DE601", - "DE602", - "DE603", - "DE604", - "DE605", - "FR606", - "SE607", - "UK608", - "DE609", - "PL610", - "PL611", - "PL612", - "IE613" - ], - "title": "Station", - "description": "" - }, - "minItems": 1, - "uniqueItems": true - }, - { - "title": "Dynamic list", - "type": "array", - "format": "tabs", - "additionalItems": false, - "items": { - "type": "object", - "format": "grid", - "title": "Station set", - "headerTemplate": "{{ self.group }}", - "additionalProperties": false, - "properties": { - "group": { - "type": "string", - "title": "Group/station", - "description": "Which (group of) station(s) to search in", - "default": "LOFAR" - }, - "min_stations": { - "type": "integer", - "title": "Minimum nr of stations", - "description": "Number of stations to use within group/station", - "default": 1, - "minimum": 0 - } - } - } - } - ] - }, - "antenna_set": { - "type": "string", - "title": "Antenna set", - "description": "Must match antenna type", - "default": "HBA_DUAL", - "enum": [ - "HBA_DUAL", - "HBA_DUAL_INNER", - "HBA_JOINED", - "HBA_JOINED_INNER", - "HBA_ONE", - "HBA_ONE_INNER", - "HBA_ZERO", - "HBA_ZERO_INNER", - "LBA_INNER", - "LBA_OUTER", - "LBA_SPARSE_EVEN", - "LBA_SPARSE_ODD" - ] - }, - "analog_pointing": { - "title": "Analog pointing", - "description": "HBA only", - "$ref": "#/definitions/pointing", - "required": [] - } - } - }, - "beams": { - "type": "array", - "title": "Beams", - "format": "tabs", - "additionalItems": false, - "items": { - "title": "Beam", - "headerTemplate": "{{ i0 }} - {{ self.name }}", - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "title": "Name/target", - "description": "Identifier for this beam", - "default": "" - }, - "digital_pointing": { - "title": "Digital pointing", - "$ref": "#/definitions/pointing" - }, - "subbands": { - "type": "array", - "title": "Subband list", - "format": "table", - "additionalItems": false, - "items": { - "type": "integer", - "title": "Subband", - "minimum": 0 - } - }, - "correlator": { - "type": "object", - "title": "Correlator", - "additionalProperties": false, - "required": [], - "properties": { - "pointing": { - "$ref": "#/definitions/pointing" - } - } - }, - "coherent_beamformer": { - "type": "object", - "title": "Coherent Beamformer", - "additionalProperties": false, - "properties": { - "pointings": { - "type": "array", - "format": "tabs", - "title": "Pointings", - "additionalItems": false, - "items": { - "$ref": "#/definitions/pointing", - "title": "Pointing", - "headerTemplate": "{{ i0 }} - ({{ self.angle1 }}, {{ self.angle2 }})" - } - }, - "rings": { - "type": "object", - "title": "TAB ring configuration", - "format": "grid", - "additionalProperties": false, - "properties": { - "number": { - "type": "integer", - "title": "Number of rings", - "description": "", - "default": 0, - "minimum": 0, - "maximum": 10 - }, - "size": { - "type": "number", - "title": "Distance between rings (degrees)", - "description": "RA/DEC distance", - "default": 1, - "minimum": 0 - } - } - } - } - } - } - } - }, - "COBALT": { - "type": "object", - "title": "COBALT correlator/beamformer", - "additionalProperties": false, - "properties": { - "blocksize": { - "type": "integer", - "title": "Block size (samples)", - "description": "Size of blocks COBALT works on, must be a multiple of all processing requirements", - "default": 196608, - "minimum": 97656, - "maximum": 292968, - "required": [] - }, - "delay_compensation": { - "type": "boolean", - "format": "checkbox", - "title": "Apply delay compensation", - "description": "Compensate for geometric and clock differences", - "default": false, - "required": [] - }, - "bandpass_correction": { - "type": "boolean", - "format": "checkbox", - "title": "Apply band-pass correction", - "description": "Compensate for differences in station sensitivity within a subband", - "default": false, - "required": [] - }, - "correlator": { - "title": "Correlator", - "oneOf": [ - { - "type": "object", - "title": "Enabled", - "format": "grid", - "additionalProperties": false, - "properties": { - "enabled": { - "type": "boolean", - "format": "checkbox", - "title": "Enabled", - "description": "", - "default": true, - "options": { - "hidden": true - }, - "enum": [ - true - ] - }, - "storage_cluster": { - "type": "string", - "title": "Storage cluster", - "description": "Which cluster to write the data to", - "default": "CEP4", - "enum": [ - "CEP4", - "DragNet" - ] - }, - "channels_per_subband": { - "type": "integer", - "title": "Channels/subband", - "description": "Number of frequency bands per subband", - "default": 64, - "minimum": 1, - "enum": [ - 1, - 8, - 16, - 32, - 64, - 128, - 256, - 512, - 1024 - ] - }, - "blocks_per_integration": { - "type": "integer", - "title": "Blocks per integration", - "description": "Number of blocks to integrate", - "default": 0, - "minimum": 0, - "required": [] - }, - "integrations_per_block": { - "type": "integer", - "title": "Integrations per block", - "description": "Number of integrations to fit within each block", - "default": 0, - "minimum": 0, - "required": [] - }, - "integration_time": { - "type": "number", - "title": "Integration time (seconds)", - "description": "Desired integration period", - "default": 1, - "minimum": 0.1 - } - } - }, - { - "type": "object", - "title": "Disabled", - "additionalProperties": false, - "format": "grid", - "properties": {} - } - ] - }, - "beamformer": { - "type": "object", - "title": "Beamformer", - "additionalProperties": false, - "properties": { - "station_subset": { - "type": "string", - "title": "Station subset", - "description": "Subset filter of stations to use for beamforming", - "default": "", - "required": [] - }, - "coherent": { - "title": "Coherent beamformer", - "$ref": "#/definitions/beamformer_settings" - }, - "incoherent": { - "title": "Incoherent beamformer", - "$ref": "#/definitions/beamformer_settings" - }, - "flys_eye": { - "title": "Fly's Eye", - "$ref": "#/definitions/beamformer_settings" - } - } - } - } - } - } -}; -</script> -<script crossorigin type="text/babel"> - const { Component } = React; -const { render } = ReactDOM; -const {default: Form} = JSONSchemaForm; - -const log = (type) => console.log.bind(console, type); - -const onSubmit = ({formData}) => console.log("Data submitted: " + JSON.stringify(formData)); - -const formData = {"relative_starttime":"bla","duration":120,"station_mode":{"bitmode":4, "clockMHz":200,"antenna_type":"HBA","filter":"HBA_110_190"},"stations":{"antenna_set":"HBA_DUAL","analog_pointing":{"direction_type":"MOON","angle1":0,"angle2":0,"distance":0}},"COBALT":{"blocksize":196608,"delay_compensation":false,"bandpass_correction":false,"beamformer":{"station_subset":""}}}; - -render(( - <Form schema={schema} - formData={formData} - onChange={log("changed")} - onSubmit={onSubmit} - onError={log("errors")} /> -), document.getElementById("app")); -</script> -</body> -</html> - diff --git a/SAS/TMSS/src/templates/react_jsonschema_form_widget.html b/SAS/TMSS/src/templates/react_jsonschema_form_widget.html deleted file mode 100644 index c249ad6c4e9b0f38f0f71e5ae32c54757698fe12..0000000000000000000000000000000000000000 --- a/SAS/TMSS/src/templates/react_jsonschema_form_widget.html +++ /dev/null @@ -1,83 +0,0 @@ - -<!-- EXTERNAL RESOURCES --> -<!--<link rel="stylesheet" id="theme" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">--> -<script src="https://unpkg.com/react@16/umd/react.development.js"></script> -<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> -<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> -<script src="https://unpkg.com/react-jsonschema-form/dist/react-jsonschema-form.js"></script> - - -<!-- LOGIC --> -<script type="text/babel"> - - const { Component } = React; - const { render } = ReactDOM; - const {default: Form} = JSONSchemaForm; - const log = (type) => console.log.bind(console, type); - - // Read current document provided by Django. Change 'null' default to {} - var formData = {{ field.value|safe }}; - if (formData === "null" || formData === null){ - var formData = {} - } - console.log("Initial data: " + JSON.stringify(formData)); - - // Updates the hidden input that Django will read the modified JSON from - function set_return_doc(doc){ - document.getElementById("helper_input").value = JSON.stringify(doc.formData); - // console.log(JSON.stringify(doc.formData)); - } - - // Default live validation looks pretty nice in the demo, does not show here for some reason. - // Custom validation function works as such: - function validate(formData, errors) { - // todo: check formData against schema by some external script or so - // if(valid) ( - errors.relative_starttime.addError("The horror!"); - // } - return errors; - } - - // This let's you change the appearance of the individual fields. - // Haven't found a global switch for fields of certain type yet. - const uiSchema = { - relative_starttime: { "ui:widget": "range" } - }; - - // Read schema (added to widget style by Serializer) - const schema = {{ field.style.schema|safe }}; - console.log('Schema is: ' + JSON.stringify(schema)); - - //Render the form - console.log('Rendering JSON form'); - render(( - <Form schema={schema} - uiSchema={uiSchema} - formData={formData} - liveValidate={true} - //validate={validate} // does not work?! - onChange={set_return_doc} - onSubmit={log("submitted")} - onError={log("errors")} /> - ), document.getElementById("app")); - console.log('Rendering done'); - -</script> - - -<!-- WIDGET HTML --> -<div class="form-group {% if field.errors %}has-error{% endif %}"> - - <label class="col-sm-2 control-label"> - {% if field.label %}{{ field.label }}{% endif %} - </label> - - <input id="helper_input" name="{{ field.name }}" type="hidden" class="form-control" {% if field.value != None %} value="{{ field.value|safe }}"{% endif %}"> - - <div class="col-sm-10"> - <div id="app"></div> - </div> - - <!--<pre> {% debug %} </pre>--> - -</div> \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/settings.py b/SAS/TMSS/src/tmss/settings.py index af22a325006980724ff896cb98b36b7b2e617df1..3058b319a373f2ccf2dfbb70cdfe49b305cb1643 100644 --- a/SAS/TMSS/src/tmss/settings.py +++ b/SAS/TMSS/src/tmss/settings.py @@ -68,7 +68,7 @@ LOGGING = { } # Build paths inside the project like this: os.path.join(BASE_DIR, ...) -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '-&$!kx$_0)u1x#zk9w^^81hfssaover2(8wdq_8n8n3u(8=-9n' # todo: set something new here for production !!! diff --git a/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py b/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py index 9983921379f68923aa8d52839d28b5afa17f9f80..6d51f05c4fa1fd59f037d1b8e7b025cceea5b219 100644 --- a/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py +++ b/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py @@ -1,14 +1,863 @@ -# Generated by Django 2.0.6 on 2018-06-11 08:56 +# Generated by Django 2.2.5 on 2020-02-17 13:55 -from django.db import migrations +import django.contrib.postgres.fields +import django.contrib.postgres.fields.jsonb +import django.contrib.postgres.indexes +from django.db import migrations, models +import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ - ] + initial = True + + dependencies = [] operations = [ - # Add things like triggers to the database here: - # migrations.RunSQL('RAW SQL CODE') + migrations.CreateModel( + name='Algorithm', + fields=[ + ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Cluster', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('location', models.CharField(help_text='Human-readable location of the cluster.', max_length=128)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='CopyReason', + fields=[ + ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Cycle', + fields=[ + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128, primary_key=True, serialize=False)), + ('start', models.DateTimeField(help_text='Moment at which the cycle starts, that is, when its projects can run.')), + ('stop', models.DateTimeField(help_text='Moment at which the cycle officially ends.')), + ('number', models.IntegerField(help_text='Cycle number.')), + ('standard_hours', models.IntegerField(help_text='Number of offered hours for standard observations.')), + ('expert_hours', models.IntegerField(help_text='Number of offered hours for expert observations.')), + ('filler_hours', models.IntegerField(help_text='Number of offered hours for filler observations.')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Dataformat', + fields=[ + ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Dataproduct', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('filename', models.CharField(help_text='Name of the file (or top-level directory) of the dataproduct. Adheres to a naming convention, but is not meant for parsing.', max_length=128)), + ('directory', models.CharField(help_text='Directory where this dataproduct is (to be) stored.', max_length=1024)), + ('deleted_since', models.DateTimeField(help_text='When this dataproduct was removed from disk, or NULL if not deleted (NULLable).', null=True)), + ('pinned_since', models.DateTimeField(help_text='When this dataproduct was pinned to disk, that is, forbidden to be removed, or NULL if not pinned (NULLable).', null=True)), + ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Dataproduct properties (f.e. beam, subband), to distinguish them when produced by the same task, and to act as input for selections in the Task Input and Work Request Relation Blueprint objects.')), + ('do_cancel', models.DateTimeField(help_text='When this dataproduct was cancelled (NULLable). Cancelling a dataproduct triggers cleanup if necessary.', null=True)), + ('expected_size', models.BigIntegerField(help_text='Expected size of dataproduct size, in bytes. Used for scheduling purposes. NULL if size is unknown (NULLable).', null=True)), + ('size', models.BigIntegerField(help_text='Dataproduct size, in bytes. Used for accounting purposes. NULL if size is (yet) unknown (NULLable).', null=True)), + ('feedback_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Dataproduct properties, as reported by the producing process.')), + ('dataformat', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataformat')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DataproductFeedbackTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), + ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DataproductSpecificationsTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), + ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Datatype', + fields=[ + ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='GeneratorTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), + ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('create_function', models.CharField(help_text='Python function to call to execute the generator.', max_length=128)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Project', + fields=[ + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128, primary_key=True, serialize=False)), + ('priority', models.IntegerField(default=0, help_text='Priority of this project w.r.t. other projects. Projects can interrupt observations of lower-priority projects.')), + ('can_trigger', models.BooleanField(default=False, help_text='True if this project is allowed to supply observation requests on the fly, possibly interrupting currently running observations (responsive telescope).')), + ('private_data', models.BooleanField(default=True, help_text='True if data of this project is sensitive. Sensitive data is not made public.')), + ('expert', models.BooleanField(default=False, help_text='Expert projects put more responsibility on the PI.')), + ('filler', models.BooleanField(default=False, help_text='Use this project to fill up idle telescope time.')), + ('cycle', models.ForeignKey(help_text='Cycle(s) to which this project belongs (NULLable).', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='projects', to='tmssapp.Cycle')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Role', + fields=[ + ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='ScheduleMethod', + fields=[ + ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SchedulingSet', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('generator_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Parameters for the generator (NULLable).', null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SchedulingUnitBlueprint', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('requirements_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Scheduling and/or quality requirements for this scheduling unit (IMMUTABLE).')), + ('do_cancel', models.BooleanField()), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SchedulingUnitDraft', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('requirements_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Scheduling and/or quality requirements for this run.')), + ('generator_instance_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Parameter value that generated this run draft (NULLable).', null=True)), + ('copies', models.ForeignKey(help_text='Source reference, if we are a copy (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='copied_from', to='tmssapp.SchedulingUnitDraft')), + ('copy_reason', models.ForeignKey(help_text='Reason why source was copied (NULLable).', null=True, on_delete=django.db.models.deletion.PROTECT, to='tmssapp.CopyReason')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SchedulingUnitTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), + ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='StationType', + fields=[ + ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Subtask', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('start_time', models.DateTimeField(help_text='Start this subtask at the specified time (NULLable).', null=True)), + ('stop_time', models.DateTimeField(help_text='Stop this subtask at the specified time (NULLable).', null=True)), + ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Final specifications, as input for the controller.')), + ('do_cancel', models.DateTimeField(help_text='Timestamp when the subtask has been ordered to cancel (NULLable).', null=True)), + ('priority', models.IntegerField(help_text='Absolute priority of this subtask (higher value means more important).')), + ('scheduler_input_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Partial specifications, as input for the scheduler.')), + ('cluster', models.ForeignKey(help_text='Where the Subtask is scheduled to run (NULLable).', null=True, on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Cluster')), + ('schedule_method', models.ForeignKey(help_text='Which method to use for scheduling this Subtask. One of (MANUAL, BATCH, DYNAMIC).', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.ScheduleMethod')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SubtaskConnector', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('dataformats', models.ManyToManyField(blank=True, to='tmssapp.Dataformat')), + ('datatype', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Datatype')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SubtaskInputSelectionTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), + ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SubtaskState', + fields=[ + ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SubtaskType', + fields=[ + ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Tags', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=128)), + ('description', models.CharField(max_length=255)), + ], + ), + migrations.CreateModel( + name='TaskBlueprint', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schedulings for this task (IMMUTABLE).')), + ('do_cancel', models.BooleanField(help_text='Cancel this task.')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='TaskConnectors', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('dataformats', models.ManyToManyField(blank=True, to='tmssapp.Dataformat')), + ('datatype', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Datatype')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='TaskDraft', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Specifications for this task.')), + ('copies', models.ForeignKey(help_text='Source reference, if we are a copy (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='copied_from', to='tmssapp.TaskDraft')), + ('copy_reason', models.ForeignKey(help_text='Reason why source was copied (NULLable).', null=True, on_delete=django.db.models.deletion.PROTECT, to='tmssapp.CopyReason')), + ('scheduling_unit_draft', models.ForeignKey(help_text='Scheduling Unit draft to which this task draft belongs.', on_delete=django.db.models.deletion.CASCADE, related_name='task_drafts', to='tmssapp.SchedulingUnitDraft')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='TaskTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), + ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('validation_code_js', models.CharField(help_text='JavaScript code for additional (complex) validation.', max_length=128)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='WorkRelationSelectionTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), + ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='TaskRelationDraft', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('selection_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Filter for selecting dataproducts from the output role.')), + ('consumer', models.ForeignKey(help_text='Task Draft that has the input connector.', on_delete=django.db.models.deletion.CASCADE, related_name='consumed_by', to='tmssapp.TaskDraft')), + ('dataformat', models.ForeignKey(help_text='Selected data format to use. One of (MS, HDF5).', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataformat')), + ('input', models.ForeignKey(help_text='Input connector of consumer.', on_delete=django.db.models.deletion.CASCADE, related_name='inputs_task_relation_draft', to='tmssapp.TaskConnectors')), + ('output', models.ForeignKey(help_text='Output connector of producer.', on_delete=django.db.models.deletion.CASCADE, related_name='outputs_task_relation_draft', to='tmssapp.TaskConnectors')), + ('producer', models.ForeignKey(help_text='Task Draft that has the output connector. NOTE: The producer does typically, but not necessarily, belong to the same Scheduling Unit (or even the same Project) as the consumer.', on_delete=django.db.models.deletion.CASCADE, related_name='produced_by', to='tmssapp.TaskDraft')), + ('selection_template', models.ForeignKey(help_text='Schema used for selection_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.WorkRelationSelectionTemplate')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='TaskRelationBlueprint', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('selection_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Filter for selecting dataproducts from the output role.')), + ('consumer', models.ForeignKey(help_text='Task Blueprint that has the input connector.', on_delete=django.db.models.deletion.CASCADE, related_name='consumed_by', to='tmssapp.TaskBlueprint')), + ('dataformat', models.ForeignKey(help_text='Selected data format to use.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataformat')), + ('draft', models.ForeignKey(help_text='Task Relation Draft which this work request instantiates.', on_delete=django.db.models.deletion.CASCADE, related_name='related_task_relation_blueprint', to='tmssapp.TaskRelationDraft')), + ('input', models.ForeignKey(help_text='Input connector of consumer.', on_delete=django.db.models.deletion.CASCADE, related_name='inputs_task_relation_blueprint', to='tmssapp.TaskConnectors')), + ('output', models.ForeignKey(help_text='Output connector of producer.', on_delete=django.db.models.deletion.CASCADE, related_name='outputs_task_relation_blueprint', to='tmssapp.TaskConnectors')), + ('producer', models.ForeignKey(help_text='Task Blueprint that has the output connector.', on_delete=django.db.models.deletion.CASCADE, related_name='produced_by', to='tmssapp.TaskBlueprint')), + ('selection_template', models.ForeignKey(help_text='Schema used for selection_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.WorkRelationSelectionTemplate')), + ], + options={ + 'abstract': False, + }, + ), + migrations.AddField( + model_name='taskdraft', + name='specifications_template', + field=models.ForeignKey(help_text='Schema used for requirements_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.TaskTemplate'), + ), + migrations.AddField( + model_name='taskconnectors', + name='input_of', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inputs', to='tmssapp.TaskTemplate'), + ), + migrations.AddField( + model_name='taskconnectors', + name='output_of', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='outputs', to='tmssapp.TaskTemplate'), + ), + migrations.AddField( + model_name='taskconnectors', + name='role', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Role'), + ), + migrations.AddField( + model_name='taskblueprint', + name='draft', + field=models.ForeignKey(help_text='Task Draft which this task instantiates.', on_delete=django.db.models.deletion.CASCADE, related_name='related_task_blueprint', to='tmssapp.TaskDraft'), + ), + migrations.AddField( + model_name='taskblueprint', + name='scheduling_unit_blueprint', + field=models.ForeignKey(help_text='Scheduling Unit Blueprint to which this task belongs.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.SchedulingUnitBlueprint'), + ), + migrations.AddField( + model_name='taskblueprint', + name='specifications_template', + field=models.ForeignKey(help_text='Schema used for specifications_doc (IMMUTABLE).', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.TaskTemplate'), + ), + migrations.CreateModel( + name='SubtaskTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), + ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('queue', models.BooleanField(default=False)), + ('realtime', models.BooleanField(default=False)), + ('type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskType')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SubtaskOutput', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('connector', models.ForeignKey(help_text='Which connector this Subtask Output implements.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.SubtaskConnector')), + ('subtask', models.ForeignKey(help_text='Subtask to which this output specification refers.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.Subtask')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SubtaskInput', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('selection_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Filter to apply to the dataproducts of the producer, to derive input dataproducts when scheduling.')), + ('connector', models.ForeignKey(help_text='Which connector this Task Input implements.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.SubtaskConnector')), + ('dataproducts', models.ManyToManyField(help_text='The Dataproducts resulting from application of the filter at time of scheduling Although the dataproducts are simply the result of applying the filter on immutable data, the filter application could change over time. We thus store the result of this filtering directly to retain which input was specified for the task..', to='tmssapp.Dataproduct')), + ('producer', models.ForeignKey(help_text='The Subtask Output providing the input dataproducts.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskOutput')), + ('selection_template', models.ForeignKey(help_text='Schema used for selection_doc.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskInputSelectionTemplate')), + ('subtask', models.ForeignKey(help_text='Subtask to which this input specification refers.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.Subtask')), + ('task_relation_blueprint', models.ForeignKey(help_text='Task Relation Blueprint which this Subtask Input implements (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.TaskRelationBlueprint')), + ], + options={ + 'abstract': False, + }, + ), + migrations.AddField( + model_name='subtaskconnector', + name='input_of', + field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, related_name='outputs', to='tmssapp.SubtaskTemplate'), + ), + migrations.AddField( + model_name='subtaskconnector', + name='output_of', + field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, related_name='inputs', to='tmssapp.SubtaskTemplate'), + ), + migrations.AddField( + model_name='subtaskconnector', + name='role', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Role'), + ), + migrations.AddField( + model_name='subtask', + name='specifications_template', + field=models.ForeignKey(help_text='Schema used for specifications_doc.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskTemplate'), + ), + migrations.AddField( + model_name='subtask', + name='state', + field=models.ForeignKey(help_text='Subtask state (see Subtask State Machine).', on_delete=django.db.models.deletion.PROTECT, related_name='task_states', to='tmssapp.SubtaskState'), + ), + migrations.AddField( + model_name='subtask', + name='task_blueprint', + field=models.ForeignKey(help_text='Task Blueprint to which this Subtask belongs.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subtasks', to='tmssapp.TaskBlueprint'), + ), + migrations.AddField( + model_name='schedulingunitdraft', + name='requirements_template', + field=models.ForeignKey(help_text='Schema used for requirements_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.SchedulingUnitTemplate'), + ), + migrations.AddField( + model_name='schedulingunitdraft', + 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='schedulingunitblueprint', + name='draft', + field=models.ForeignKey(help_text='Scheduling Unit Draft which this run instantiates.', on_delete=django.db.models.deletion.CASCADE, related_name='related_scheduling_unit_blueprint', to='tmssapp.SchedulingUnitDraft'), + ), + migrations.AddField( + model_name='schedulingunitblueprint', + name='requirements_template', + field=models.ForeignKey(help_text='Schema used for requirements_doc (IMMUTABLE).', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.SchedulingUnitTemplate'), + ), + migrations.AddField( + model_name='schedulingset', + name='generator_source', + field=models.ForeignKey(help_text='Reference for the generator to an existing collection of specifications (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.SchedulingUnitDraft'), + ), + migrations.AddField( + model_name='schedulingset', + name='generator_template', + field=models.ForeignKey(help_text='Generator for the scheduling units in this set (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.GeneratorTemplate'), + ), + migrations.AddField( + model_name='schedulingset', + name='project', + field=models.ForeignKey(help_text='Project to which this scheduling set belongs.', on_delete=django.db.models.deletion.PROTECT, related_name='scheduling_sets', to='tmssapp.Project'), + ), + migrations.CreateModel( + name='Filesystem', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('capacity', models.BigIntegerField(help_text='Capacity in bytes')), + ('cluster', models.ForeignKey(help_text='Cluster hosting this filesystem.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Cluster')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DefaultWorkRelationSelectionTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(max_length=128, unique=True)), + ('template', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.WorkRelationSelectionTemplate')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DefaultTaskTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(max_length=128, unique=True)), + ('template', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.TaskTemplate')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DefaultSubtaskTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(max_length=128, unique=True)), + ('template', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskTemplate')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DefaultSchedulingUnitTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(max_length=128, unique=True)), + ('template', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SchedulingUnitTemplate')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DefaultGeneratorTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(max_length=128, unique=True)), + ('template', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.GeneratorTemplate')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DefaultDataproductSpecificationsTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(max_length=128, unique=True)), + ('template', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.DataproductSpecificationsTemplate')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DataproductTransform', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('identity', models.BooleanField(help_text='TRUE if this transform only copies, tars, or losslessly compresses its input, FALSE if the transform changes the data. Allows for efficient reasoning about data duplication.')), + ('input', models.ForeignKey(help_text='A dataproduct that was the input of a transformation.', on_delete=django.db.models.deletion.PROTECT, related_name='inputs', to='tmssapp.Dataproduct')), + ('output', models.ForeignKey(help_text='A dataproduct that was produced from the input dataproduct.', on_delete=django.db.models.deletion.PROTECT, related_name='outputs', to='tmssapp.Dataproduct')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DataproductHash', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('hash', models.CharField(help_text='Hash value.', max_length=128)), + ('algorithm', models.ForeignKey(help_text='Algorithm used (MD5, AES256).', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Algorithm')), + ('dataproduct', models.ForeignKey(help_text='The dataproduct to which this hash refers.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataproduct')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DataproductArchiveInfo', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('storage_ticket', models.CharField(help_text='Archive-system identifier.', max_length=128)), + ('public_since', models.DateTimeField(help_text='Dataproduct is available for public download since this moment, or NULL if dataproduct is not (NULLable).', null=True)), + ('corrupted_since', models.DateTimeField(help_text='Earliest timestamp from which this dataproduct is known to be partially or fully corrupt, or NULL if dataproduct is not known to be corrupt (NULLable).', null=True)), + ('dataproduct', models.ForeignKey(help_text='A dataproduct residing in the archive.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataproduct')), + ], + options={ + 'abstract': False, + }, + ), + migrations.AddField( + model_name='dataproduct', + name='feedback_template', + field=models.ForeignKey(help_text='Schema used for feedback_doc.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.DataproductFeedbackTemplate'), + ), + migrations.AddField( + model_name='dataproduct', + name='producer', + field=models.ForeignKey(help_text='Subtask Output which generates this dataproduct.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskOutput'), + ), + migrations.AddField( + model_name='dataproduct', + name='specifications_template', + field=models.ForeignKey(help_text='Schema used for specifications_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.DataproductSpecificationsTemplate'), + ), + migrations.CreateModel( + name='AntennaSet', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), + ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), + ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), + ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), + ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), + ('rcus', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=128)), + ('inputs', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, size=128)), + ('station_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.StationType')), + ], + options={ + 'abstract': False, + }, + ), + migrations.AddIndex( + model_name='taskrelationdraft', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_tas_tags_aeef84_gin'), + ), + migrations.AddIndex( + model_name='taskrelationblueprint', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_tas_tags_256437_gin'), + ), + migrations.AddIndex( + model_name='taskconnectors', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_tas_tags_0ebd6d_gin'), + ), + migrations.AddIndex( + model_name='subtaskoutput', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_sub_tags_e25b4c_gin'), + ), + migrations.AddIndex( + model_name='subtaskinput', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_sub_tags_fb9960_gin'), + ), + migrations.AddIndex( + model_name='subtaskconnector', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_sub_tags_60e299_gin'), + ), + migrations.AddIndex( + model_name='subtask', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_sub_tags_d2fc43_gin'), + ), + migrations.AddIndex( + model_name='defaultworkrelationselectiontemplate', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_b652d9_gin'), + ), + migrations.AddIndex( + model_name='defaulttasktemplate', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_c88200_gin'), + ), + migrations.AddIndex( + model_name='defaultsubtasktemplate', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_e9c73d_gin'), + ), + migrations.AddIndex( + model_name='defaultschedulingunittemplate', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_3ab2d6_gin'), + ), + migrations.AddIndex( + model_name='defaultgeneratortemplate', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_89c89d_gin'), + ), + migrations.AddIndex( + model_name='defaultdataproductspecificationstemplate', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_269b1f_gin'), + ), + migrations.AddIndex( + model_name='dataproducttransform', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_dat_tags_380c1f_gin'), + ), + migrations.AddIndex( + model_name='dataproducthash', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_dat_tags_dae145_gin'), + ), + migrations.AddIndex( + model_name='dataproductarchiveinfo', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_dat_tags_ebf2ef_gin'), + ), + migrations.AddIndex( + model_name='dataproduct', + index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_dat_tags_5932a3_gin'), + ), ] diff --git a/SAS/TMSS/src/tmss/tmssapp/migrations/0002_auto_20200204_1117.py b/SAS/TMSS/src/tmss/tmssapp/migrations/0002_auto_20200204_1117.py deleted file mode 100644 index 095dd64a905103bd7e2aba8752f213d825bd6746..0000000000000000000000000000000000000000 --- a/SAS/TMSS/src/tmss/tmssapp/migrations/0002_auto_20200204_1117.py +++ /dev/null @@ -1,933 +0,0 @@ -# Generated by Django 2.0.6 on 2020-02-04 11:17 - -import django.contrib.postgres.fields -import django.contrib.postgres.fields.jsonb -import django.contrib.postgres.indexes -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('tmssapp', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Algorithm', - fields=[ - ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='AntennaSet', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('rcus', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=128)), - ('inputs', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, size=128)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Cluster', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('location', models.CharField(help_text='Human-readable location of the cluster.', max_length=128)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='CopyReason', - fields=[ - ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Cycle', - fields=[ - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128, primary_key=True, serialize=False)), - ('start', models.DateTimeField(help_text='Moment at which the cycle starts, that is, when its projects can run.')), - ('stop', models.DateTimeField(help_text='Moment at which the cycle officially ends.')), - ('number', models.IntegerField(help_text='Cycle number.')), - ('standard_hours', models.IntegerField(help_text='Number of offered hours for standard observations.')), - ('expert_hours', models.IntegerField(help_text='Number of offered hours for expert observations.')), - ('filler_hours', models.IntegerField(help_text='Number of offered hours for filler observations.')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Dataformat', - fields=[ - ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Dataproduct', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('filename', models.CharField(help_text='Name of the file (or top-level directory) of the dataproduct. Adheres to a naming convention, but is not meant for parsing.', max_length=128)), - ('directory', models.CharField(help_text='Directory where this dataproduct is (to be) stored.', max_length=1024)), - ('deleted_since', models.DateTimeField(help_text='When this dataproduct was removed from disk, or NULL if not deleted (NULLable).', null=True)), - ('pinned_since', models.DateTimeField(help_text='When this dataproduct was pinned to disk, that is, forbidden to be removed, or NULL if not pinned (NULLable).', null=True)), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Dataproduct properties (f.e. beam, subband), to distinguish them when produced by the same task, and to act as input for selections in the Task Input and Work Request Relation Blueprint objects.')), - ('do_cancel', models.DateTimeField(help_text='When this dataproduct was cancelled (NULLable). Cancelling a dataproduct triggers cleanup if necessary.', null=True)), - ('expected_size', models.BigIntegerField(help_text='Expected size of dataproduct size, in bytes. Used for scheduling purposes. NULL if size is unknown (NULLable).', null=True)), - ('size', models.BigIntegerField(help_text='Dataproduct size, in bytes. Used for accounting purposes. NULL if size is (yet) unknown (NULLable).', null=True)), - ('feedback_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Dataproduct properties, as reported by the producing process.')), - ('dataformat', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataformat')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DataproductArchiveInfo', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('storage_ticket', models.CharField(help_text='Archive-system identifier.', max_length=128)), - ('public_since', models.DateTimeField(help_text='Dataproduct is available for public download since this moment, or NULL if dataproduct is not (NULLable).', null=True)), - ('corrupted_since', models.DateTimeField(help_text='Earliest timestamp from which this dataproduct is known to be partially or fully corrupt, or NULL if dataproduct is not known to be corrupt (NULLable).', null=True)), - ('dataproduct', models.ForeignKey(help_text='A dataproduct residing in the archive.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataproduct')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DataproductFeedbackTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DataproductHash', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('hash', models.CharField(help_text='Hash value.', max_length=128)), - ('algorithm', models.ForeignKey(help_text='Algorithm used (MD5, AES256).', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Algorithm')), - ('dataproduct', models.ForeignKey(help_text='The dataproduct to which this hash refers.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataproduct')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DataproductSpecificationsTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DataproductTransform', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('identity', models.BooleanField(help_text='TRUE if this transform only copies, tars, or losslessly compresses its input, FALSE if the transform changes the data. Allows for efficient reasoning about data duplication.')), - ('input', models.ForeignKey(help_text='A dataproduct that was the input of a transformation.', on_delete=django.db.models.deletion.PROTECT, related_name='inputs', to='tmssapp.Dataproduct')), - ('output', models.ForeignKey(help_text='A dataproduct that was produced from the input dataproduct.', on_delete=django.db.models.deletion.PROTECT, related_name='outputs', to='tmssapp.Dataproduct')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Datatype', - fields=[ - ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DefaultDataproductSpecificationsTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(max_length=128, unique=True)), - ('template', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.DataproductSpecificationsTemplate')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DefaultGeneratorTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(max_length=128, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DefaultSchedulingUnitTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(max_length=128, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DefaultSubtaskTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(max_length=128, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DefaultTaskTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(max_length=128, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DefaultWorkRelationSelectionTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(max_length=128, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Filesystem', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('capacity', models.BigIntegerField(help_text='Capacity in bytes')), - ('cluster', models.ForeignKey(help_text='Cluster hosting this filesystem.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Cluster')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='GeneratorTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), - ('create_function', models.CharField(help_text='Python function to call to execute the generator.', max_length=128)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Project', - fields=[ - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128, primary_key=True, serialize=False)), - ('priority', models.IntegerField(default=0, help_text='Priority of this project w.r.t. other projects. Projects can interrupt observations of lower-priority projects.')), - ('can_trigger', models.BooleanField(default=False, help_text='True if this project is allowed to supply observation requests on the fly, possibly interrupting currently running observations (responsive telescope).')), - ('private_data', models.BooleanField(default=True, help_text='True if data of this project is sensitive. Sensitive data is not made public.')), - ('expert', models.BooleanField(default=False, help_text='Expert projects put more responsibility on the PI.')), - ('filler', models.BooleanField(default=False, help_text='Use this project to fill up idle telescope time.')), - ('cycle', models.ForeignKey(help_text='Cycle(s) to which this project belongs (NULLable).', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='projects', to='tmssapp.Cycle')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Role', - fields=[ - ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='ScheduleMethod', - fields=[ - ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SchedulingSet', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('generator_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Parameters for the generator (NULLable).', null=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SchedulingUnitBlueprint', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('requirements_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Scheduling and/or quality requirements for this scheduling unit (IMMUTABLE).')), - ('do_cancel', models.BooleanField()), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SchedulingUnitDraft', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('requirements_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Scheduling and/or quality requirements for this run.')), - ('generator_instance_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Parameter value that generated this run draft (NULLable).', null=True)), - ('copies', models.ForeignKey(help_text='Source reference, if we are a copy (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='copied_from', to='tmssapp.SchedulingUnitDraft')), - ('copy_reason', models.ForeignKey(help_text='Reason why source was copied (NULLable).', null=True, on_delete=django.db.models.deletion.PROTECT, to='tmssapp.CopyReason')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SchedulingUnitTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='StationType', - fields=[ - ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Subtask', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('start_time', models.DateTimeField(help_text='Start this subtask at the specified time (NULLable).', null=True)), - ('stop_time', models.DateTimeField(help_text='Stop this subtask at the specified time (NULLable).', null=True)), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Final specifications, as input for the controller.')), - ('do_cancel', models.DateTimeField(help_text='Timestamp when the subtask has been ordered to cancel (NULLable).', null=True)), - ('priority', models.IntegerField(help_text='Absolute priority of this subtask (higher value means more important).')), - ('scheduler_input_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Partial specifications, as input for the scheduler.')), - ('cluster', models.ForeignKey(help_text='Where the Subtask is scheduled to run (NULLable).', null=True, on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Cluster')), - ('schedule_method', models.ForeignKey(help_text='Which method to use for scheduling this Subtask. One of (MANUAL, BATCH, DYNAMIC).', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.ScheduleMethod')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SubtaskConnector', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('dataformats', models.ManyToManyField(blank=True, to='tmssapp.Dataformat')), - ('datatype', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Datatype')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SubtaskInput', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('selection_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Filter to apply to the dataproducts of the producer, to derive input dataproducts when scheduling.')), - ('connector', models.ForeignKey(help_text='Which connector this Task Input implements.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.SubtaskConnector')), - ('dataproducts', models.ManyToManyField(help_text='The Dataproducts resulting from application of the filter at time of scheduling Although the dataproducts are simply the result of applying the filter on immutable data, the filter application could change over time. We thus store the result of this filtering directly to retain which input was specified for the task..', to='tmssapp.Dataproduct')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SubtaskInputSelectionTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SubtaskOutput', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('connector', models.ForeignKey(help_text='Which connector this Subtask Output implements.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.SubtaskConnector')), - ('subtask', models.ForeignKey(help_text='Subtask to which this output specification refers.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.Subtask')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SubtaskState', - fields=[ - ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SubtaskTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), - ('queue', models.BooleanField(default=False)), - ('realtime', models.BooleanField(default=False)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='SubtaskType', - fields=[ - ('value', models.CharField(max_length=128, primary_key=True, serialize=False, unique=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Tags', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=128)), - ('description', models.CharField(max_length=255)), - ], - ), - migrations.CreateModel( - name='TaskBlueprint', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schedulings for this task (IMMUTABLE).')), - ('do_cancel', models.BooleanField(help_text='Cancel this task.')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='TaskConnectors', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('dataformats', models.ManyToManyField(blank=True, to='tmssapp.Dataformat')), - ('datatype', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Datatype')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='TaskDraft', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Specifications for this task.')), - ('copies', models.ForeignKey(help_text='Source reference, if we are a copy (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='copied_from', to='tmssapp.TaskDraft')), - ('copy_reason', models.ForeignKey(help_text='Reason why source was copied (NULLable).', null=True, on_delete=django.db.models.deletion.PROTECT, to='tmssapp.CopyReason')), - ('scheduling_unit_draft', models.ForeignKey(help_text='Scheduling Unit draft to which this task draft belongs.', on_delete=django.db.models.deletion.CASCADE, related_name='task_drafts', to='tmssapp.SchedulingUnitDraft')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='TaskRelationBlueprint', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('selection_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Filter for selecting dataproducts from the output role.')), - ('consumer', models.ForeignKey(help_text='Task Blueprint that has the input connector.', on_delete=django.db.models.deletion.CASCADE, related_name='consumed_by', to='tmssapp.TaskBlueprint')), - ('dataformat', models.ForeignKey(help_text='Selected data format to use.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataformat')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='TaskRelationDraft', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('selection_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Filter for selecting dataproducts from the output role.')), - ('consumer', models.ForeignKey(help_text='Task Draft that has the input connector.', on_delete=django.db.models.deletion.CASCADE, related_name='consumed_by', to='tmssapp.TaskDraft')), - ('dataformat', models.ForeignKey(help_text='Selected data format to use. One of (MS, HDF5).', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Dataformat')), - ('input', models.ForeignKey(help_text='Input connector of consumer.', on_delete=django.db.models.deletion.CASCADE, related_name='inputs_task_relation_draft', to='tmssapp.TaskConnectors')), - ('output', models.ForeignKey(help_text='Output connector of producer.', on_delete=django.db.models.deletion.CASCADE, related_name='outputs_task_relation_draft', to='tmssapp.TaskConnectors')), - ('producer', models.ForeignKey(help_text='Task Draft that has the output connector. NOTE: The producer does typically, but not necessarily, belong to the same Scheduling Unit (or even the same Project) as the consumer.', on_delete=django.db.models.deletion.CASCADE, related_name='produced_by', to='tmssapp.TaskDraft')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='TaskTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), - ('validation_code_js', models.CharField(help_text='JavaScript code for additional (complex) validation.', max_length=128)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='WorkRelationSelectionTemplate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, help_text='User-defined search keywords for object.', size=8)), - ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), - ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), - ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), - ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), - ], - options={ - 'abstract': False, - }, - ), - migrations.AddField( - model_name='taskrelationdraft', - name='selection_template', - field=models.ForeignKey(help_text='Schema used for selection_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.WorkRelationSelectionTemplate'), - ), - migrations.AddField( - model_name='taskrelationblueprint', - name='draft', - field=models.ForeignKey(help_text='Task Relation Draft which this work request instantiates.', on_delete=django.db.models.deletion.CASCADE, related_name='related_task_relation_blueprint', to='tmssapp.TaskRelationDraft'), - ), - migrations.AddField( - model_name='taskrelationblueprint', - name='input', - field=models.ForeignKey(help_text='Input connector of consumer.', on_delete=django.db.models.deletion.CASCADE, related_name='inputs_task_relation_blueprint', to='tmssapp.TaskConnectors'), - ), - migrations.AddField( - model_name='taskrelationblueprint', - name='output', - field=models.ForeignKey(help_text='Output connector of producer.', on_delete=django.db.models.deletion.CASCADE, related_name='outputs_task_relation_blueprint', to='tmssapp.TaskConnectors'), - ), - migrations.AddField( - model_name='taskrelationblueprint', - name='producer', - field=models.ForeignKey(help_text='Task Blueprint that has the output connector.', on_delete=django.db.models.deletion.CASCADE, related_name='produced_by', to='tmssapp.TaskBlueprint'), - ), - migrations.AddField( - model_name='taskrelationblueprint', - name='selection_template', - field=models.ForeignKey(help_text='Schema used for selection_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.WorkRelationSelectionTemplate'), - ), - migrations.AddField( - model_name='taskdraft', - name='specifications_template', - field=models.ForeignKey(help_text='Schema used for requirements_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.TaskTemplate'), - ), - migrations.AddField( - model_name='taskconnectors', - name='input_of', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inputs', to='tmssapp.TaskTemplate'), - ), - migrations.AddField( - model_name='taskconnectors', - name='output_of', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='outputs', to='tmssapp.TaskTemplate'), - ), - migrations.AddField( - model_name='taskconnectors', - name='role', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Role'), - ), - migrations.AddField( - model_name='taskblueprint', - name='draft', - field=models.ForeignKey(help_text='Task Draft which this task instantiates.', on_delete=django.db.models.deletion.CASCADE, related_name='related_task_blueprint', to='tmssapp.TaskDraft'), - ), - migrations.AddField( - model_name='taskblueprint', - name='scheduling_unit_blueprint', - field=models.ForeignKey(help_text='Scheduling Unit Blueprint to which this task belongs.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.SchedulingUnitBlueprint'), - ), - migrations.AddField( - model_name='taskblueprint', - name='specifications_template', - field=models.ForeignKey(help_text='Schema used for specifications_doc (IMMUTABLE).', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.TaskTemplate'), - ), - migrations.AddField( - model_name='subtasktemplate', - name='type', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskType'), - ), - migrations.AddField( - model_name='subtaskinput', - name='producer', - field=models.ForeignKey(help_text='The Subtask Output providing the input dataproducts.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskOutput'), - ), - migrations.AddField( - model_name='subtaskinput', - name='selection_template', - field=models.ForeignKey(help_text='Schema used for selection_doc.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskInputSelectionTemplate'), - ), - migrations.AddField( - model_name='subtaskinput', - name='subtask', - field=models.ForeignKey(help_text='Subtask to which this input specification refers.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.Subtask'), - ), - migrations.AddField( - model_name='subtaskinput', - name='task_relation_blueprint', - field=models.ForeignKey(help_text='Task Relation Blueprint which this Subtask Input implements (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.TaskRelationBlueprint'), - ), - migrations.AddField( - model_name='subtaskconnector', - name='input_of', - field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, related_name='outputs', to='tmssapp.SubtaskTemplate'), - ), - migrations.AddField( - model_name='subtaskconnector', - name='output_of', - field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, related_name='inputs', to='tmssapp.SubtaskTemplate'), - ), - migrations.AddField( - model_name='subtaskconnector', - name='role', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.Role'), - ), - migrations.AddField( - model_name='subtask', - name='specifications_template', - field=models.ForeignKey(help_text='Schema used for specifications_doc.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskTemplate'), - ), - migrations.AddField( - model_name='subtask', - name='state', - field=models.ForeignKey(help_text='Subtask state (see Subtask State Machine).', on_delete=django.db.models.deletion.PROTECT, related_name='task_states', to='tmssapp.SubtaskState'), - ), - migrations.AddField( - model_name='subtask', - name='task_blueprint', - field=models.ForeignKey(help_text='Task Blueprint to which this Subtask belongs.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subtasks', to='tmssapp.TaskBlueprint'), - ), - migrations.AddField( - model_name='schedulingunitdraft', - name='requirements_template', - field=models.ForeignKey(help_text='Schema used for requirements_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.SchedulingUnitTemplate'), - ), - migrations.AddField( - model_name='schedulingunitdraft', - 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='schedulingunitblueprint', - name='draft', - field=models.ForeignKey(help_text='Scheduling Unit Draft which this run instantiates.', on_delete=django.db.models.deletion.CASCADE, related_name='related_scheduling_unit_blueprint', to='tmssapp.SchedulingUnitDraft'), - ), - migrations.AddField( - model_name='schedulingunitblueprint', - name='requirements_template', - field=models.ForeignKey(help_text='Schema used for requirements_doc (IMMUTABLE).', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.SchedulingUnitTemplate'), - ), - migrations.AddField( - model_name='schedulingset', - name='generator_source', - field=models.ForeignKey(help_text='Reference for the generator to an existing collection of specifications (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.SchedulingUnitDraft'), - ), - migrations.AddField( - model_name='schedulingset', - name='generator_template', - field=models.ForeignKey(help_text='Generator for the scheduling units in this set (NULLable).', null=True, on_delete=django.db.models.deletion.SET_NULL, to='tmssapp.GeneratorTemplate'), - ), - migrations.AddField( - model_name='schedulingset', - name='project', - field=models.ForeignKey(help_text='Project to which this scheduling set belongs.', on_delete=django.db.models.deletion.PROTECT, related_name='scheduling_sets', to='tmssapp.Project'), - ), - migrations.AddField( - model_name='defaultworkrelationselectiontemplate', - name='template', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.WorkRelationSelectionTemplate'), - ), - migrations.AddField( - model_name='defaulttasktemplate', - name='template', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.TaskTemplate'), - ), - migrations.AddField( - model_name='defaultsubtasktemplate', - name='template', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskTemplate'), - ), - migrations.AddField( - model_name='defaultschedulingunittemplate', - name='template', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SchedulingUnitTemplate'), - ), - migrations.AddField( - model_name='defaultgeneratortemplate', - name='template', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.GeneratorTemplate'), - ), - migrations.AddField( - model_name='dataproduct', - name='feedback_template', - field=models.ForeignKey(help_text='Schema used for feedback_doc.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.DataproductFeedbackTemplate'), - ), - migrations.AddField( - model_name='dataproduct', - name='producer', - field=models.ForeignKey(help_text='Subtask Output which generates this dataproduct.', on_delete=django.db.models.deletion.PROTECT, to='tmssapp.SubtaskOutput'), - ), - migrations.AddField( - model_name='dataproduct', - name='specifications_template', - field=models.ForeignKey(help_text='Schema used for specifications_doc.', on_delete=django.db.models.deletion.CASCADE, to='tmssapp.DataproductSpecificationsTemplate'), - ), - migrations.AddField( - model_name='antennaset', - name='station_type', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.StationType'), - ), - migrations.AddIndex( - model_name='taskrelationdraft', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_tas_tags_aeef84_gin'), - ), - migrations.AddIndex( - model_name='taskrelationblueprint', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_tas_tags_256437_gin'), - ), - migrations.AddIndex( - model_name='taskconnectors', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_tas_tags_0ebd6d_gin'), - ), - migrations.AddIndex( - model_name='subtaskoutput', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_sub_tags_e25b4c_gin'), - ), - migrations.AddIndex( - model_name='subtaskinput', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_sub_tags_fb9960_gin'), - ), - migrations.AddIndex( - model_name='subtaskconnector', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_sub_tags_60e299_gin'), - ), - migrations.AddIndex( - model_name='subtask', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_sub_tags_d2fc43_gin'), - ), - migrations.AddIndex( - model_name='defaultworkrelationselectiontemplate', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_b652d9_gin'), - ), - migrations.AddIndex( - model_name='defaulttasktemplate', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_c88200_gin'), - ), - migrations.AddIndex( - model_name='defaultsubtasktemplate', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_e9c73d_gin'), - ), - migrations.AddIndex( - model_name='defaultschedulingunittemplate', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_3ab2d6_gin'), - ), - migrations.AddIndex( - model_name='defaultgeneratortemplate', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_89c89d_gin'), - ), - migrations.AddIndex( - model_name='defaultdataproductspecificationstemplate', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_def_tags_269b1f_gin'), - ), - migrations.AddIndex( - model_name='dataproducttransform', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_dat_tags_380c1f_gin'), - ), - migrations.AddIndex( - model_name='dataproducthash', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_dat_tags_dae145_gin'), - ), - migrations.AddIndex( - model_name='dataproductarchiveinfo', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_dat_tags_ebf2ef_gin'), - ), - migrations.AddIndex( - model_name='dataproduct', - index=django.contrib.postgres.indexes.GinIndex(fields=['tags'], name='tmssapp_dat_tags_5932a3_gin'), - ), - ] diff --git a/SAS/TMSS/src/tmss/tmssapp/migrations/0003_populate.py b/SAS/TMSS/src/tmss/tmssapp/migrations/0002_populate.py similarity index 72% rename from SAS/TMSS/src/tmss/tmssapp/migrations/0003_populate.py rename to SAS/TMSS/src/tmss/tmssapp/migrations/0002_populate.py index 201995ef74496b4f2a3c857245616ca6bcffec29..9635547b078df7ffd378d6c9539619c7e3d1e46f 100644 --- a/SAS/TMSS/src/tmss/tmssapp/migrations/0003_populate.py +++ b/SAS/TMSS/src/tmss/tmssapp/migrations/0002_populate.py @@ -1,12 +1,12 @@ from django.db import migrations -from ..populate import * +from lofar.sas.tmss.tmss.tmssapp.populate import * class Migration(migrations.Migration): dependencies = [ - ('tmssapp', '0002_auto_20200204_1117'), + ('tmssapp', '0001_initial'), ] operations = [ migrations.RunPython(populate_choices), diff --git a/SAS/TMSS/src/tmss/tmssapp/models/specification.py b/SAS/TMSS/src/tmss/tmssapp/models/specification.py index e6532a9429f68cd6a4816c6c7a5ebb8f89cd9924..86f621bfa1e2cf6e3130c2a83f8c270ac7ab0330 100644 --- a/SAS/TMSS/src/tmss/tmssapp/models/specification.py +++ b/SAS/TMSS/src/tmss/tmssapp/models/specification.py @@ -6,7 +6,6 @@ from django.db.models import Model, CharField, DateTimeField, BooleanField, Fore from django.contrib.postgres.fields import ArrayField, JSONField from django.contrib.postgres.indexes import GinIndex from enum import Enum -from django_json_widget.widgets import JSONEditorWidget # # Common @@ -144,9 +143,6 @@ class TaskConnectors(BasicCommon): # abstract models class Template(NamedCommon): - formfield_overrides = { - JSONField: {'widget': JSONEditorWidget}, - } version = CharField(max_length=128, help_text='Version of this template (with respect to other templates of the same name).') schema = JSONField(help_text='Schema for the configurable parameters needed to use this template.') diff --git a/SAS/TMSS/src/tmss/tmssapp/populate.py b/SAS/TMSS/src/tmss/tmssapp/populate.py index df0d905a5ead5d6cab14b640d36f322d37f5bc4d..f911e93ea7472c5ad9f40f900e15cd83134738c2 100644 --- a/SAS/TMSS/src/tmss/tmssapp/populate.py +++ b/SAS/TMSS/src/tmss/tmssapp/populate.py @@ -17,7 +17,7 @@ class Migration(migrations.Migration): import json from lofar.sas.tmss.tmss.tmssapp.models.specification import Role, Datatype, Dataformat, CopyReason -from lofar.sas.tmss.tmss.tmssapp.models.scheduling import SubtaskState, SubtaskType, SubtaskTemplate, StationType, Algorithm, ScheduleMethod +from lofar.sas.tmss.tmss.tmssapp.models.scheduling import SubtaskState, SubtaskType, SubtaskTemplate, Subtask, StationType, Algorithm, ScheduleMethod def populate_choices(apps, schema_editor): ''' @@ -32,6 +32,7 @@ def populate_choices(apps, schema_editor): def populate_lofar_json_schemas(apps, schema_editor): _populate_correlator_schema() + _populate_subtask_with_correlator_schema_example() _populate_obscontrol_schema() _populate_stations_schema() @@ -40,7 +41,7 @@ def _populate_correlator_schema(): "name": "correlator schema", "description": 'first attempt at correlator schema', "version": '0.1', - "schema": json.dumps(json.loads(''' + "schema": json.loads(''' { "$id": "http://example.com/example.json", "type": "object", @@ -150,7 +151,7 @@ def _populate_correlator_schema(): ] } } -}''')), +}'''), "realtime": True, "queue": False, "tags": []} @@ -158,12 +159,45 @@ def _populate_correlator_schema(): SubtaskTemplate.objects.create(**subtask_template_data) + +def _populate_subtask_with_correlator_schema_example(): + from datetime import datetime + + specifications_doc = { + "duration": 60, + "calibrator": { "enabled": False, + "autoselect": False, + "pointing": {"direction_type": "J2000", + "angle1": 45, + "angle2": 20} }, + "channels_per_subband": 64, + "integration_time": 1, + "storage_cluster": "CEP4" } + + subtask_template = SubtaskTemplate.objects.get(name='correlator schema') + + subtask_data = {"start_time": datetime.utcnow().isoformat(), + "stop_time": datetime.utcnow().isoformat(), + "state": SubtaskState.objects.all()[0], + "specifications_doc": specifications_doc, + "task_blueprint": None, + "specifications_template": subtask_template, + "tags": ["TMSS", "TESTING", "FAKE_DATA"], + "do_cancel": None, + "priority": 1, + "schedule_method": ScheduleMethod.objects.all()[0], + "cluster": None, + "scheduler_input_doc": ""} + + Subtask.objects.create(**subtask_data) + + def _populate_obscontrol_schema(): subtask_template_data = {"type": SubtaskType.objects.get(value='observation'), "name": "obscontrol schema", "description": 'first attempt at obscontrol schema', "version": '0.1', - "schema": json.dumps(json.loads(''' + "schema": json.loads(''' { "$id": "http://example.com/example.json", "type": "object", @@ -461,7 +495,7 @@ def _populate_obscontrol_schema(): } } } -}''')), +}'''), "realtime": True, "queue": False, "tags": []} @@ -475,7 +509,7 @@ def _populate_stations_schema(): "name": "stations schema", "description": 'first attempt at stations schema', "version": '0.1', - "schema": json.dumps(json.loads(''' + "schema": json.loads(''' { "$id": "http://example.com/example.json", "type": "object", @@ -704,7 +738,7 @@ def _populate_stations_schema(): } } } -}''')), +}'''), "realtime": True, "queue": False, "tags": []} diff --git a/SAS/TMSS/src/tmss/tmssapp/serializers/scheduling.py b/SAS/TMSS/src/tmss/tmssapp/serializers/scheduling.py index c108d4fbebefe8fa507cd505c518c213dcad55c5..7e06297f42bb8e1ff4b2dc75b272a558ec3ac8a9 100644 --- a/SAS/TMSS/src/tmss/tmssapp/serializers/scheduling.py +++ b/SAS/TMSS/src/tmss/tmssapp/serializers/scheduling.py @@ -2,6 +2,9 @@ This file contains the serializers (for the elsewhere defined data models) """ +import logging +logger = logging.getLogger(__name__) + from rest_framework import serializers from .. import models from .specification import RelationalHyperlinkedModelSerializer @@ -137,3 +140,31 @@ class DataproductHashSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.DataproductHash fields = '__all__' + + +class SubtaskSerializerJSONeditorOnline(RelationalHyperlinkedModelSerializer): + + # Create a JSON editor form to replace the simple text field based on the schema in the template that this + # draft refers to. If that fails, the JSONField remains a standard text input. + # + # Note: I feel a bit uneasy with this since I feel there should be a more straight-forward solution tham + # ...intercepting the init process to determine the schema (or template uri or so) for the style attribute. + # ...Hoewever, I did not manage to simply pass the value(!) of e.g. the template field as a style attribute + # ...of the JSONField via a SerializerMethodField or similar, although I feel that should be possible. + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + import json + + try: + schema = self.instance.specifications_template.schema + self.fields['specifications_doc'] = serializers.JSONField( + style={'template': 'josdejong_jsoneditor_widget.html', + 'schema': json.dumps(schema)}) + except Exception as e: + # todo: Shall we use one of the default templates for the init? + logger.exception('Could not determine schema, hence no fancy JSON form. Expected for list view.') + + class Meta: + model = models.Subtask + fields = '__all__' \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/tmssapp/serializers/specification.py b/SAS/TMSS/src/tmss/tmssapp/serializers/specification.py index 586472fce556ef0d72ad4c3c93f2183ac7ede1a0..e3804396d7e8601705d9adac99cee64fc8dd9f4a 100644 --- a/SAS/TMSS/src/tmss/tmssapp/serializers/specification.py +++ b/SAS/TMSS/src/tmss/tmssapp/serializers/specification.py @@ -163,8 +163,7 @@ class TaskRelationBlueprintSerializer(serializers.HyperlinkedModelSerializer): # ----- JSON - -class TaskBlueprintSerializerReactJSONform(RelationalHyperlinkedModelSerializer): +class TaskBlueprintSerializerJSONeditorOnline(RelationalHyperlinkedModelSerializer): # Create a JSON editor form to replace the simple text field based on the schema in the template that this # blueprint refers to. If that fails, the JSONField remains a standard text input. @@ -179,57 +178,25 @@ class TaskBlueprintSerializerReactJSONform(RelationalHyperlinkedModelSerializer) import json try: - schema = self.instance.template.schema - - self.fields['requirements_doc'] = serializers.JSONField( - style={'template': 'react_jsonschema_form_widget.html', + schema = self.instance.specifications_template.schema + self.fields['specifications_doc'] = serializers.JSONField( + style={'template': 'josdejong_jsoneditor_widget.html', 'schema': json.dumps(schema)}) except: # todo: Shall we use one of the default templates for the init? print('Could not determine schema, hence no fancy JSON form. Expected for list view.') - class Meta: model = models.TaskBlueprint fields = '__all__' extra_fields = ['subtasks', 'produced_by', 'consumed_by'] -class TaskBlueprintSerializerJSONeditor(RelationalHyperlinkedModelSerializer): - - # Create a JSON editor form to replace the simple text field based on the schema in the template that this - # blueprint refers to. If that fails, the JSONField remains a standard text input. - # - # Note: I feel a bit uneasy with this since I feel there should be a more straight-forward solution tham - # ...intercepting the init process to determine the schema (or template uri or so) for the style attribute. - # ...Hoewever, I did not manage to simply pass the value(!) of e.g. the template field as a style attribute - # ...of the JSONField via a SerializerMethodField or similar, although I feel that should be possible. - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - import json - - try: - schema = self.instance.template.schema - self.fields['requirements_doc'] = serializers.JSONField( - style={'template': 'json_editor_widget.html', - 'schema': json.dumps(schema)}) - - except: - # todo: Shall we use one of the default templates for the init? - print('Could not determine schema, hence no fancy JSON form. Expected for list view.') - - - #requirements_doc = serializers.JSONField(style={'template': 'json_editor_form_2.html', 'template_schema_uri': "http://localhost:8000/task_template/2/?format=json"}) - class Meta: - model = models.TaskBlueprint - fields = '__all__' - extra_fields = ['subtasks', 'produced_by', 'consumed_by'] -class TaskBlueprintSerializerJSONeditorOnline(RelationalHyperlinkedModelSerializer): +class TaskDraftSerializerJSONeditorOnline(RelationalHyperlinkedModelSerializer): # Create a JSON editor form to replace the simple text field based on the schema in the template that this - # blueprint refers to. If that fails, the JSONField remains a standard text input. + # draft refers to. If that fails, the JSONField remains a standard text input. # # Note: I feel a bit uneasy with this since I feel there should be a more straight-forward solution tham # ...intercepting the init process to determine the schema (or template uri or so) for the style attribute. @@ -241,8 +208,8 @@ class TaskBlueprintSerializerJSONeditorOnline(RelationalHyperlinkedModelSerializ import json try: - schema = self.instance.template.schema - self.fields['requirements_doc'] = serializers.JSONField( + schema = self.instance.specifications_template.schema + self.fields['specifications_doc'] = serializers.JSONField( style={'template': 'josdejong_jsoneditor_widget.html', 'schema': json.dumps(schema)}) @@ -250,17 +217,9 @@ class TaskBlueprintSerializerJSONeditorOnline(RelationalHyperlinkedModelSerializ # todo: Shall we use one of the default templates for the init? print('Could not determine schema, hence no fancy JSON form. Expected for list view.') - - #requirements_doc = serializers.JSONField(style={'template': 'json_editor_form_2.html', 'template_schema_uri': "http://localhost:8000/task_template/2/?format=json"}) class Meta: - model = models.TaskBlueprint + model = models.TaskDraft fields = '__all__' - extra_fields = ['subtasks', 'produced_by', 'consumed_by'] - + extra_fields = ['related_task_blueprint', 'produced_by', 'consumed_by'] -class TaskBlueprintJSONSerializer(RelationalHyperlinkedModelSerializer): - class Meta: - model = models.TaskBlueprint - fields = ('requirements_doc',) - extra_fields = ['subtasks', 'produced_by', 'consumed_by'] \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/tmssapp/viewsets/scheduling.py b/SAS/TMSS/src/tmss/tmssapp/viewsets/scheduling.py index aa8b3510c0f9a7e95d5a8302e16954f8fe8dfd14..0812570889378c2dda16f7d22f3e22193f2ace72 100644 --- a/SAS/TMSS/src/tmss/tmssapp/viewsets/scheduling.py +++ b/SAS/TMSS/src/tmss/tmssapp/viewsets/scheduling.py @@ -132,3 +132,23 @@ class DataproductArchiveInfoViewSet(LOFARViewSet): class DataproductHashViewSet(LOFARViewSet): queryset = models.DataproductHash.objects.all() serializer_class = serializers.DataproductHashSerializer + + +# --- JSON + +class SubtaskViewSetJSONeditorOnline(LOFARViewSet): + queryset = models.Subtask.objects.all() + serializer_class = serializers.SubtaskSerializerJSONeditorOnline + + def get_view_name(self): # override name because DRF auto-naming does not produce something usable here + name = "Subtask" + if self.suffix: + name += ' ' + self.suffix + return name + + def get_queryset(self): + if 'task_blueprint_pk' in self.kwargs: + task_blueprint = get_object_or_404(models.TaskBlueprint, pk=self.kwargs['task_blueprint_pk']) + return task_blueprint.subtasks.all() + else: + return models.Subtask.objects.all() diff --git a/SAS/TMSS/src/tmss/tmssapp/viewsets/specification.py b/SAS/TMSS/src/tmss/tmssapp/viewsets/specification.py index c9ab8b5e1b1239eef057365146524c38384c48e7..c20beefeeec1913a60721f0fcd25b70756c51823 100644 --- a/SAS/TMSS/src/tmss/tmssapp/viewsets/specification.py +++ b/SAS/TMSS/src/tmss/tmssapp/viewsets/specification.py @@ -128,15 +128,15 @@ class SchedulingUnitBlueprintViewSet(LOFARViewSet): class TaskDraftViewSet(LOFARViewSet): - queryset = models.TaskDraft.objects.all() - serializer_class = serializers.TaskDraftSerializer + queryset = models.TaskDraft.objects.all() + serializer_class = serializers.TaskDraftSerializer - def get_queryset(self): - if 'scheduling_unit_draft_pk' in self.kwargs: - scheduling_unit_draft = get_object_or_404(models.SchedulingUnitDraft, pk=self.kwargs['scheduling_unit_draft_pk']) - return scheduling_unit_draft.task_drafts.all() - else: - return models.TaskDraft.objects.all() + def get_queryset(self): + if 'scheduling_unit_draft_pk' in self.kwargs: + scheduling_unit_draft = get_object_or_404(models.SchedulingUnitDraft, pk=self.kwargs['scheduling_unit_draft_pk']) + return scheduling_unit_draft.task_drafts.all() + else: + return models.TaskDraft.objects.all() class TaskBlueprintViewSet(LOFARViewSet): @@ -181,27 +181,29 @@ class TaskRelationBlueprintViewSet(LOFARViewSet): # --- JSON - -class TaskBlueprintViewSetReactJSONform(LOFARViewSet): - queryset = models.TaskBlueprint.objects.all() - serializer_class = serializers.TaskBlueprintSerializerReactJSONform - - -class TaskBlueprintViewSetJSONeditor(LOFARViewSet): - queryset = models.TaskBlueprint.objects.all() - serializer_class = serializers.TaskBlueprintSerializerJSONeditor - - class TaskBlueprintViewSetJSONeditorOnline(LOFARViewSet): queryset = models.TaskBlueprint.objects.all() serializer_class = serializers.TaskBlueprintSerializerJSONeditorOnline + def get_view_name(self): # override name because DRF auto-naming does not produce something usable here + name = "Task Blueprint" + if self.suffix: + name += ' ' + self.suffix + return name -# # todo: this is experimental / for demo purposes. Remove or make functional. -# class JSONEditorViewSet(LOFARViewSet): -# renderer_classes = [TemplateHTMLRenderer] -# template_name = 'react_jsonschema_form.html' -# queryset = models.TaskBlueprint.objects.all() -# serializer_class = serializers.TaskBlueprintJSONSerializer +class TaskDraftViewSetJSONeditorOnline(LOFARViewSet): + queryset = models.TaskDraft.objects.all() + serializer_class = serializers.TaskDraftSerializerJSONeditorOnline + def get_view_name(self): # override name because DRF auto-naming does not produce something usable here + name = "Task Draft" + if self.suffix: + name += ' ' + self.suffix + return name + def get_queryset(self): + if 'scheduling_unit_draft_pk' in self.kwargs: + scheduling_unit_draft = get_object_or_404(models.SchedulingUnitDraft, pk=self.kwargs['scheduling_unit_draft_pk']) + return scheduling_unit_draft.task_drafts.all() + else: + return models.TaskDraft.objects.all() \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/urls.py b/SAS/TMSS/src/tmss/urls.py index fd80e0ea5a09c91653c7fb3148b134a048ae3f9c..5b81a1f8323eb75f6321db1c71bb8a0bcfe3eb04 100644 --- a/SAS/TMSS/src/tmss/urls.py +++ b/SAS/TMSS/src/tmss/urls.py @@ -88,7 +88,7 @@ router.register(r'project', viewsets.ProjectViewSet) router.register(r'scheduling_set', viewsets.SchedulingSetViewSet) router.register(r'scheduling_unit_draft', viewsets.SchedulingUnitDraftViewSet) router.register(r'scheduling_unit_blueprint', viewsets.SchedulingUnitBlueprintViewSet) -router.register(r'task_draft', viewsets.TaskDraftViewSet) +#router.register(r'task_draft', viewsets.TaskDraftViewSet) # todo: default view, re-activate or remove the JSON editor one in bottom router.register(r'task_blueprint', viewsets.TaskBlueprintViewSet) router.register(r'task_relation_draft', viewsets.TaskRelationDraftViewSet) router.register(r'task_relation_blueprint', viewsets.TaskRelationBlueprintViewSet) @@ -97,7 +97,7 @@ router.register(r'task_relation_blueprint', viewsets.TaskRelationBlueprintViewSe router.register(r'cycle/(?P<cycle_pk>[\w\-]+)/project', viewsets.ProjectViewSet) router.register(r'scheduling_set/(?P<scheduling_set_pk>\d+)/scheduling_unit_draft', viewsets.SchedulingUnitDraftViewSet) router.register(r'scheduling_unit_draft/(?P<scheduling_unit_draft_pk>\d+)/scheduling_unit_blueprint', viewsets.SchedulingUnitBlueprintViewSet) -router.register(r'scheduling_unit_draft/(?P<scheduling_unit_draft_pk>\d+)/task_draft', viewsets.TaskDraftViewSet) +#router.register(r'scheduling_unit_draft/(?P<scheduling_unit_draft_pk>\d+)/task_draft', viewsets.TaskDraftViewSet) # todo: default view, re-activate or remove the JSON editor one in bottom router.register(r'task_draft/(?P<task_draft_pk>\d+)/task_blueprint', viewsets.TaskBlueprintViewSet) router.register(r'task_draft/(?P<task_draft_pk>\d+)/task_relation_draft', viewsets.TaskRelationDraftViewSet) router.register(r'task_relation_draft/(?P<task_relation_draft_pk>\d+)/task_relation_blueprint', viewsets.TaskRelationBlueprintViewSet) @@ -123,9 +123,8 @@ router.register(r'subtask_input_selection_template', viewsets.SubtaskInputSelect router.register(r'dataproduct_feedback_template', viewsets.DataproductFeedbackTemplateViewSet) # instances -router.register(r'subtask', viewsets.SubtaskViewSet) +#router.register(r'subtask', viewsets.SubtaskViewSet) # todo: default view, re-activate or remove the JSON editor one in bottom router.register(r'dataproduct', viewsets.DataproductViewSet) -#router.register(r'dataproduct_relation', viewsets.DataproductRelationViewSet) router.register(r'subtask_input', viewsets.SubtaskInputViewSet) router.register(r'subtask_output', viewsets.SubtaskOutputViewSet) router.register(r'antenna_set', viewsets.AntennaSetViewSet) @@ -140,10 +139,10 @@ router.register(r'task_relation_blueprint', viewsets.TaskRelationBlueprintViewSe # --- # JSON -router.register(r'task_blueprint_A', viewsets.TaskBlueprintViewSetJSONeditor) -router.register(r'task_blueprint_B', viewsets.TaskBlueprintViewSetReactJSONform) -router.register(r'task_blueprint_C', viewsets.TaskBlueprintViewSetJSONeditorOnline) -#router.register(r'json_editor', viewsets.JSONEditorViewSet) +router.register(r'task_draft', viewsets.TaskDraftViewSetJSONeditorOnline) +router.register(r'scheduling_unit_draft/(?P<scheduling_unit_draft_pk>\d+)/task_draft', viewsets.TaskDraftViewSetJSONeditorOnline) +router.register(r'subtask', viewsets.SubtaskViewSetJSONeditorOnline) + urlpatterns.extend(router.urls)