igs-slm 0.1.4b0__py3-none-any.whl → 0.1.5b0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- igs_slm-0.1.5b0.dist-info/METADATA +115 -0
- {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b0.dist-info}/RECORD +192 -172
- {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b0.dist-info}/WHEEL +1 -1
- igs_slm-0.1.5b0.dist-info/entry_points.txt +3 -0
- {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b0.dist-info/licenses}/LICENSE +1 -1
- slm/__init__.py +17 -14
- slm/admin.py +32 -5
- slm/api/edit/views.py +22 -9
- slm/api/public/views.py +9 -7
- slm/api/views.py +45 -6
- slm/apps.py +28 -6
- slm/authentication.py +3 -2
- slm/bin/startproject.py +102 -31
- slm/bin/templates/{{ project_dir }}/pyproject.toml +30 -21
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/base.py +12 -1
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/__init__.py +5 -27
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/__init__.py +6 -27
- slm/bin/templates/{{ project_dir }}/src/sites/{{ site }}/validation.py +29 -0
- slm/context.py +5 -0
- slm/defines/AlertLevel.py +10 -2
- slm/defines/AntennaCalibration.py +6 -4
- slm/defines/AntennaFeatures.py +12 -9
- slm/defines/AntennaReferencePoint.py +12 -10
- slm/defines/Aspiration.py +4 -2
- slm/defines/CardinalDirection.py +6 -4
- slm/defines/CollocationStatus.py +3 -1
- slm/defines/EquipmentState.py +6 -12
- slm/defines/FlagSeverity.py +4 -2
- slm/defines/FractureSpacing.py +7 -5
- slm/defines/FrequencyStandardType.py +6 -4
- slm/defines/GeodesyMLVersion.py +2 -0
- slm/defines/Instrumentation.py +9 -7
- slm/defines/LogEntryType.py +17 -15
- slm/defines/SLMFileType.py +4 -2
- slm/defines/SiteFileUploadStatus.py +7 -24
- slm/defines/SiteLogFormat.py +8 -32
- slm/defines/SiteLogStatus.py +9 -28
- slm/defines/TectonicPlates.py +18 -16
- slm/manage.py +24 -0
- slm/management/commands/check_upgrade.py +142 -0
- slm/management/commands/generate_sinex.py +110 -92
- slm/management/commands/head_from_index.py +11 -8
- slm/management/commands/import_archive.py +27 -18
- slm/management/commands/import_equipment.py +1 -1
- slm/management/commands/sitelog.py +1 -3
- slm/management/commands/synchronize.py +1 -1
- slm/management/commands/validate_db.py +6 -4
- slm/map/defines.py +18 -14
- slm/map/templates/slm/map.html +4 -6
- slm/migrations/0001_remove_archiveindex_no_overlapping_ranges_per_site_and_more.py +26 -0
- slm/migrations/0002_alter_archivedsitelog_file_and_more.py +44 -0
- slm/migrations/0003_alter_archivedsitelog_name_and_more.py +35 -0
- slm/migrations/0004_alter_site_name.py +24 -0
- slm/migrations/0005_slmversion.py +30 -0
- slm/migrations/0017_alter_logentry_unique_together_and_more.py +3 -1
- slm/migrations/0018_afix_deleted.py +3 -1
- slm/migrations/0018_alter_siteantenna_options_and_more.py +87 -56
- slm/migrations/0019_remove_siteantenna_marker_enu_siteantenna_marker_une_and_more.py +1 -1
- slm/migrations/0023_archivedsitelog_gml_version_and_more.py +1 -1
- slm/migrations/0031_alter_antenna_features.py +44 -0
- slm/migrations/0032_archiveindex_valid_range_and_more.py +84 -0
- slm/migrations/add_index_order_index.py +54 -0
- slm/migrations/normalize_index.py +147 -0
- slm/migrations/simplify_index.py +48 -0
- slm/migrations/verify_index.py +67 -0
- slm/models/__init__.py +2 -0
- slm/models/alerts.py +7 -10
- slm/models/data.py +1 -2
- slm/models/equipment.py +1 -1
- slm/models/fields.py +41 -0
- slm/models/index.py +183 -53
- slm/models/sitelog.py +35 -38
- slm/models/system.py +72 -31
- slm/models/user.py +1 -1
- slm/parsing/__init__.py +33 -16
- slm/parsing/legacy/binding.py +65 -34
- slm/parsing/legacy/parser.py +2 -2
- slm/parsing/xsd/binding.py +1 -1
- slm/parsing/xsd/parser.py +1 -2
- slm/receivers/__init__.py +2 -2
- slm/receivers/index.py +2 -1
- slm/receivers/migration.py +21 -0
- slm/settings/__init__.py +192 -4
- slm/settings/assets.py +26 -0
- slm/settings/auth.py +18 -14
- slm/settings/ckeditor.py +12 -6
- slm/settings/debug.py +2 -2
- slm/settings/emails.py +50 -0
- slm/settings/internationalization.py +8 -6
- slm/settings/logging.py +100 -88
- slm/settings/platform/darwin.py +16 -6
- slm/settings/rest.py +20 -15
- slm/settings/root.py +192 -98
- slm/settings/routines.py +5 -1
- slm/settings/secrets.py +20 -31
- slm/settings/security.py +7 -5
- slm/settings/slm.py +35 -16
- slm/settings/static_templates.py +12 -9
- slm/settings/templates.py +31 -25
- slm/settings/uploads.py +33 -5
- slm/settings/urls.py +1 -1
- slm/settings/validation.py +165 -165
- slm/signals.py +3 -2
- slm/static/slm/css/style.css +37 -36
- slm/static/slm/js/autocomplete.js +6 -4
- slm/static/slm/js/file_modal.js +62 -0
- slm/static/slm/js/form.js +3 -3
- slm/static/slm/js/formWidget.js +3 -3
- slm/static/slm/js/persistable.js +5 -1
- slm/templates/admin/base.html +1 -0
- slm/templates/rest_framework/base.html +23 -11
- slm/templates/slm/base.html +27 -22
- slm/templates/slm/forms/widgets/auto_complete.html +12 -11
- slm/templates/slm/forms/widgets/auto_complete_multiple.html +8 -7
- slm/templates/slm/station/download.html +6 -6
- slm/templates/slm/station/edit.html +9 -17
- slm/templates/slm/station/review.html +5 -3
- slm/templates/slm/station/upload.html +4 -1
- slm/templates/slm/station/uploads/legacy.html +1 -1
- slm/templates/slm/widgets/alert_scroll.html +4 -8
- slm/templates/slm/widgets/filelist.html +0 -5
- slm/templates/slm/widgets/log_scroll.html +2 -13
- slm/templates/slm/widgets/stationlist.html +2 -8
- slm/templatetags/slm.py +70 -9
- slm/utils.py +13 -4
- slm/validators.py +14 -14
- slm/views.py +6 -6
- slm/wsgi.py +16 -0
- igs_slm-0.1.4b0.dist-info/METADATA +0 -154
- igs_slm-0.1.4b0.dist-info/entry_points.txt +0 -3
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/validation.py +0 -11
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/local.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/wsgi.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/manage.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/wsgi.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/urls.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/admin.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/apps.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/import_archive.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/migrations/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/models.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/templates/slm/base.html +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/urls.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/views.py +0 -0
slm/static/slm/js/form.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export class Form extends Persistable {
|
|
1
|
+
class Form extends slm.Persistable {
|
|
4
2
|
/**
|
|
5
3
|
* This class encapsulates reading and writing json data to/from html forms.
|
|
6
4
|
* This is less trivial than you might assume and there are some special case
|
|
@@ -402,3 +400,5 @@ export class Form extends Persistable {
|
|
|
402
400
|
this.#changeCallbacks.push(callback);
|
|
403
401
|
}
|
|
404
402
|
}
|
|
403
|
+
|
|
404
|
+
slm.Form = Form;
|
slm/static/slm/js/formWidget.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export class FormWidget extends Persistable {
|
|
1
|
+
class FormWidget extends slm.Persistable {
|
|
4
2
|
|
|
5
3
|
#container;
|
|
6
4
|
|
|
@@ -21,3 +19,5 @@ export class FormWidget extends Persistable {
|
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
}
|
|
22
|
+
|
|
23
|
+
slm.FormWidget = FormWidget;
|
slm/static/slm/js/persistable.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
if (typeof slm === 'undefined' || slm == null) { var slm = {}; }
|
|
2
|
+
|
|
3
|
+
class Persistable {
|
|
2
4
|
/**
|
|
3
5
|
* A simple interface defining a persistable component. Data is persisted
|
|
4
6
|
* in session memory.
|
|
@@ -31,3 +33,5 @@ export class Persistable {
|
|
|
31
33
|
*/
|
|
32
34
|
}
|
|
33
35
|
}
|
|
36
|
+
|
|
37
|
+
slm.Persistable = Persistable;
|
slm/templates/admin/base.html
CHANGED
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/prettify.css" %}"/>
|
|
25
25
|
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/>
|
|
26
26
|
|
|
27
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.
|
|
28
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.
|
|
27
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/themes/base/jquery-ui.min.css" integrity="sha512-TFee0335YRJoyiqz8hA8KV3P0tXa5CpRBSoM0Wnkn7JoJx1kaq1yXL/rb8YFpWXkMOjRcv5txv+C6UluttluCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
28
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
29
29
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
30
30
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
31
31
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet">
|
|
32
32
|
|
|
33
33
|
<!-- https://github.com/lipis/flag-icons -->
|
|
34
|
-
<link rel="stylesheet" href="https://
|
|
34
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icons/7.3.2/css/flag-icons.min.css" integrity="sha512-+WVTaUIzUw5LFzqIqXOT3JVAc5SrMuvHm230I9QAZa6s+QRk8NDPswbHo2miIZj3yiFyV9lAgzO1wVrjdoO4tw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
35
35
|
|
|
36
36
|
{% compress css %}
|
|
37
37
|
<link rel='stylesheet' type='text/css' media='screen' href='{% static "slm/css/style.css" %}'>
|
|
@@ -304,14 +304,26 @@
|
|
|
304
304
|
csrfToken: "{% if request %}{{ csrf_token }}{% endif %}"
|
|
305
305
|
};
|
|
306
306
|
</script>
|
|
307
|
-
<script src="
|
|
308
|
-
<script src="
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
307
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
308
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/jquery-ui.min.js" integrity="sha512-MSOo1aY+3pXCOCdGAYoBZ6YGI0aragoQsg1mKKBHXCYPIWxamwOE7Drh+N5CPgGI5SA9IEKJiPjdfqWFWmZtRA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
309
|
+
{% compress js %}
|
|
310
|
+
<script src="{% static "rest_framework/js/ajax-form.js" %}"></script>
|
|
311
|
+
<script src="{% static "rest_framework/js/csrf.js" %}"></script>
|
|
312
|
+
<script src="{% static "rest_framework/js/bootstrap.bundle.min.js" %}"></script>
|
|
313
|
+
<script src="{% static "rest_framework/js/prettify-min.js" %}"></script>
|
|
314
|
+
<script src="{% static "rest_framework/js/default.js" %}"></script>
|
|
315
|
+
{% endcompress %}
|
|
316
|
+
{% compress js %}
|
|
317
|
+
<script src="{% static 'slm/js/fileIcons.js' %}"></script>
|
|
318
|
+
<script src="{% static 'slm/js/slm.js' %}"></script>
|
|
319
|
+
<script src="{% static 'urls.js' %}"></script>
|
|
320
|
+
<script src="{% static 'slm/js/time24.js' %}"></script>
|
|
321
|
+
<script src="{% static 'slm/js/enums.js' %}"></script>
|
|
322
|
+
<script src="{% static 'slm/js/persistable.js' %}"></script>
|
|
323
|
+
<script src="{% static 'slm/js/form.js' %}"></script>
|
|
324
|
+
<script src="{% static 'slm/js/formWidget.js' %}"></script>
|
|
325
|
+
<script src="{% static 'slm/js/autocomplete.js' %}"></script>
|
|
326
|
+
{% endcompress %}
|
|
315
327
|
|
|
316
328
|
<script>
|
|
317
329
|
$(document).ready(function() {
|
slm/templates/slm/base.html
CHANGED
|
@@ -26,15 +26,15 @@ https://docs.djangoproject.com/en/3.2/topics/templates/
|
|
|
26
26
|
<link rel="shortcut icon" type="image/png" href="{% static 'slm/img/favicon.ico' %}"/>
|
|
27
27
|
|
|
28
28
|
{% block stylesheets %}
|
|
29
|
-
<link href="https://
|
|
30
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.
|
|
29
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
30
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
31
31
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
32
32
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
33
33
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet">
|
|
34
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.
|
|
34
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/themes/base/jquery-ui.min.css" integrity="sha512-TFee0335YRJoyiqz8hA8KV3P0tXa5CpRBSoM0Wnkn7JoJx1kaq1yXL/rb8YFpWXkMOjRcv5txv+C6UluttluCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
35
35
|
|
|
36
36
|
<!-- https://github.com/lipis/flag-icons -->
|
|
37
|
-
<link rel="stylesheet" href="https://
|
|
37
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icons/7.3.2/css/flag-icons.min.css" integrity="sha512-+WVTaUIzUw5LFzqIqXOT3JVAc5SrMuvHm230I9QAZa6s+QRk8NDPswbHo2miIZj3yiFyV9lAgzO1wVrjdoO4tw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
38
38
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" integrity="sha512-H9jrZiiopUdsLpg94A333EfumgUBpO9MdbxStdeITo+KEIMaNfHNvwyjjDJb+ERPaRS6DpyRlKbvPUasNItRyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
39
39
|
|
|
40
40
|
{% compress css %}
|
|
@@ -45,29 +45,34 @@ https://docs.djangoproject.com/en/3.2/topics/templates/
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
{% block javascript %}
|
|
48
|
-
<script src="https://
|
|
49
|
-
<script src="https://
|
|
50
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/
|
|
48
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
49
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/jquery-ui.min.js" integrity="sha512-MSOo1aY+3pXCOCdGAYoBZ6YGI0aragoQsg1mKKBHXCYPIWxamwOE7Drh+N5CPgGI5SA9IEKJiPjdfqWFWmZtRA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
50
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
51
51
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js" integrity="sha512-uURl+ZXMBrF4AwGaWmEetzrd+J5/8NRkWAvJx5sbPSSuOb0bZLqf+tOzniObO00BjHa/dD7gub9oCGMLPQHtQA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
52
52
|
|
|
53
53
|
{% compress js %}
|
|
54
|
-
<script src="{% static 'slm/js/enums.js' %}"></script>
|
|
55
|
-
<script src="{% static 'slm/js/slm.js' %}"></script>
|
|
56
54
|
<script src="{% static 'slm/js/fileIcons.js' %}"></script>
|
|
55
|
+
<script src="{% static 'slm/js/slm.js' %}"></script>
|
|
57
56
|
<script src="{% static 'urls.js' %}"></script>
|
|
58
57
|
<script src="{% static 'slm/js/time24.js' %}"></script>
|
|
59
|
-
<script>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
xhr.setRequestHeader(
|
|
66
|
-
'X-CSRFToken', '{{ csrf_token }}');
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
</script>
|
|
58
|
+
<script src="{% static 'slm/js/enums.js' %}"></script>
|
|
59
|
+
<script src="{% static 'slm/js/persistable.js' %}"></script>
|
|
60
|
+
<script src="{% static 'slm/js/form.js' %}"></script>
|
|
61
|
+
<script src="{% static 'slm/js/formWidget.js' %}"></script>
|
|
62
|
+
<script src="{% static 'slm/js/autocomplete.js' %}"></script>
|
|
70
63
|
{% endcompress %}
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
slm.isModerator = {% if is_moderator %}true{% else %}false{% endif %};
|
|
67
|
+
slm.canPublish = {% if can_publish %}true{% else %}false{% endif %};
|
|
68
|
+
$.ajaxSetup({
|
|
69
|
+
beforeSend: function (xhr)
|
|
70
|
+
{
|
|
71
|
+
xhr.setRequestHeader(
|
|
72
|
+
'X-CSRFToken', '{{ csrf_token }}');
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
</script>
|
|
71
76
|
{% endblock javascript %}
|
|
72
77
|
{% endblock head %}
|
|
73
78
|
</head>
|
|
@@ -104,7 +109,7 @@ https://docs.djangoproject.com/en/3.2/topics/templates/
|
|
|
104
109
|
<div class="container-fluid mx-4">
|
|
105
110
|
{% block branding %}
|
|
106
111
|
<div class="d-flex align-items-center w-50">
|
|
107
|
-
<a href="{% url "slm:home" %}" class="navbar-brand"><img id="logo" class="me-4" src="{% static 'slm/img/slm-logo.svg' %}" alt="SLM"> Site Log Manager
|
|
112
|
+
<a href="{% url "slm:home" %}" class="navbar-brand"><img id="logo" class="me-4" src="{% static 'slm/img/slm-logo.svg' %}" alt="SLM"> Site Log Manager {{ slm_version }}</a>
|
|
108
113
|
</div>
|
|
109
114
|
{% endblock branding %}
|
|
110
115
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#collapsingNavbar3" title="Navigation">
|
|
@@ -175,7 +180,7 @@ https://docs.djangoproject.com/en/3.2/topics/templates/
|
|
|
175
180
|
</div>
|
|
176
181
|
</body>
|
|
177
182
|
|
|
178
|
-
{% compress js %}
|
|
183
|
+
{% compress js inline %}
|
|
179
184
|
<script type='text/javascript'>
|
|
180
185
|
$(document).ready(function() {
|
|
181
186
|
var options = {
|
|
@@ -6,16 +6,17 @@
|
|
|
6
6
|
<label for="{{ widget.attrs.id }}-input" style="display: none">{{ label }}</label>
|
|
7
7
|
<input id="{{ widget.attrs.id }}-input" name="{{ widget.name }}" {% if widget.value != None %} value="{{ widget.value|stringformat:'s' }}"{% endif %} type="text" style="display: none">
|
|
8
8
|
|
|
9
|
-
<script
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
<script>
|
|
10
|
+
(() => {
|
|
11
|
+
let widget = new slm.AutoComplete({container: $('fieldset#{{ widget.attrs.id }}-container')});
|
|
12
|
+
let ipt = $('fieldset#{{ widget.attrs.id }}-container input');
|
|
13
|
+
ipt.data('widget', widget);
|
|
14
|
+
if (ipt.val() && !widget.textInput.html()) {
|
|
15
|
+
widget.add(widget.getSuggestion(ipt.val()));
|
|
16
|
+
}
|
|
17
|
+
{% for value in widget|autocomplete_values %}
|
|
18
|
+
widget.add(widget.makeSuggestion(JSON.parse('{{ value|safe }}')));
|
|
19
|
+
{% endfor %}
|
|
20
|
+
})();
|
|
20
21
|
</script>
|
|
21
22
|
</fieldset>
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
<select id='{{widget.attrs.id}}-select' name="{{ widget.name }}" multiple></select>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="select-display"></div>
|
|
10
|
-
<script
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
<script>
|
|
11
|
+
(() => {
|
|
12
|
+
let widget = new slm.AutoCompleteMultiple({container: $('fieldset#{{ widget.attrs.id }}-container')});
|
|
13
|
+
$('fieldset#{{ widget.attrs.id }}-container select').data('widget', widget);
|
|
14
|
+
{% for value in widget|autocomplete_values %}
|
|
15
|
+
widget.add(widget.makeSuggestion(JSON.parse('{{ value|safe }}')));
|
|
16
|
+
{% endfor %}
|
|
17
|
+
})();
|
|
17
18
|
</script>
|
|
18
19
|
</fieldset>
|
|
@@ -29,7 +29,7 @@ Template for Download page.
|
|
|
29
29
|
<i class="bi bi-file-text slm-published" style="font-size:60px;"></i>
|
|
30
30
|
<h2 class="mb-3">{% trans "ASCII (.log)" %}</h2>
|
|
31
31
|
<p class="mb-4">{% trans "Text-based description of the metadata of a GNSS station" %}</p>
|
|
32
|
-
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='log' %}"{% endif %} download>Download</a>
|
|
32
|
+
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='log' %}?lower_case=1"{% endif %} download>Download</a>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="col-12 col-md-6 col-xl-4 my-3">
|
|
@@ -37,7 +37,7 @@ Template for Download page.
|
|
|
37
37
|
<i class="bi bi-filetype-xml slm-published" style="font-size:60px;"></i>
|
|
38
38
|
<h2 class="mb-3">{% trans "GeodesyML (.xml)" %}</h2>
|
|
39
39
|
<p class="mb-4">{% trans "Machine-readable XML format of the data and metadata of a GNSS station" %}</p>
|
|
40
|
-
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='xml' %}"{% endif %} download>Download</a>
|
|
40
|
+
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='xml' %}?lower_case=1"{% endif %} download>Download</a>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
<div class="col-12 col-md-6 col-xl-4 my-3">
|
|
@@ -45,7 +45,7 @@ Template for Download page.
|
|
|
45
45
|
<i class="bi bi-filetype-json slm-published" style="font-size:60px;"></i>
|
|
46
46
|
<h2 class="mb-3">{% trans "JSON (.json)" %}</h2>
|
|
47
47
|
<p class="mb-4">{% trans "This is still under development. JavaScript Object Notation format of the data and metadata of a GNSS station" %}</p>
|
|
48
|
-
<a class="btn btn-primary disabled {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='json' %}?
|
|
48
|
+
<a class="btn btn-primary disabled {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='json' %}?lower_case=1"{% endif %} download>Download</a>
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
@@ -59,7 +59,7 @@ Template for Download page.
|
|
|
59
59
|
<h2 class="mb-3">{% trans "ASCII (.log)" %}</h2>
|
|
60
60
|
<h3 class="mb-3 fs-4">{% trans "MODIFIED/UNPUBLISHED" %}</h3>
|
|
61
61
|
<p class="mb-4">{% trans "Text-based description of the metadata of a GNSS station" %}</p>
|
|
62
|
-
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='log' %}?unpublished=True"{% endif %} download>Download</a>
|
|
62
|
+
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='log' %}?unpublished=True&lower_case=1"{% endif %} download>Download</a>
|
|
63
63
|
</div>
|
|
64
64
|
</div>
|
|
65
65
|
<div class="col-12 col-md-6 col-xl-4 my-3">
|
|
@@ -68,7 +68,7 @@ Template for Download page.
|
|
|
68
68
|
<h2 class="mb-3">{% trans "GeodesyML (.xml)" %}</h2>
|
|
69
69
|
<h3 class="mb-3 fs-4">{% trans "MODIFIED/UNPUBLISHED" %}</h3>
|
|
70
70
|
<p class="mb-4">{% trans "Machine-readable XML format of the data and metadata of a GNSS station" %}</p>
|
|
71
|
-
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='xml' %}?unpublished=True"{% endif %} download>Download</a>
|
|
71
|
+
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='xml' %}?unpublished=True&lower_case=1"{% endif %} download>Download</a>
|
|
72
72
|
</div>
|
|
73
73
|
</div>
|
|
74
74
|
<div class="col-12 col-md-6 col-xl-4 my-3">
|
|
@@ -77,7 +77,7 @@ Template for Download page.
|
|
|
77
77
|
<h2 class="mb-3">{% trans "JSON (.json)" %}</h2>
|
|
78
78
|
<h3 class="mb-3 fs-4">{% trans "MODIFIED/UNPUBLISHED" %}</h3>
|
|
79
79
|
<p class="mb-4">{% trans "This is still under development. JavaScript Object Notation format of the data and metadata of a GNSS station" %}</p>
|
|
80
|
-
<a class="btn btn-primary disabled {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='json' %}?unpublished=True"{% endif %} download>Download</a>
|
|
80
|
+
<a class="btn btn-primary disabled {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='json' %}?unpublished=True&lower_case=1"{% endif %} download>Download</a>
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
83
83
|
</div>
|
|
@@ -8,7 +8,7 @@ Add new section capability is not functional.
|
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
{% extends "slm/station/base.html" %}
|
|
11
|
-
{% load widget_tweaks slm i18n
|
|
11
|
+
{% load widget_tweaks slm i18n %}
|
|
12
12
|
|
|
13
13
|
{% block action_content %}
|
|
14
14
|
<!-- Station Metadata Forms -->
|
|
@@ -108,13 +108,9 @@ Add new section capability is not functional.
|
|
|
108
108
|
<div class="accordion-body">
|
|
109
109
|
{% with flag_id=section_id|to_id:form.instance.id|to_id:"flags" %}
|
|
110
110
|
{{ form.instance.flags }}
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
{% compress js inline %}
|
|
115
|
-
{{ form.media.js }}
|
|
116
|
-
{{ form.flags|json_script:flag_id }}
|
|
117
|
-
{% endcompress %}
|
|
111
|
+
{{ form.media.css }}
|
|
112
|
+
{{ form.media.js }}
|
|
113
|
+
{{ form.flags|json_script:flag_id }}
|
|
118
114
|
{% include 'slm/station/form.html' with form=form form_id=form_inst_id flag_id=flag_id %}
|
|
119
115
|
{% endwith %}
|
|
120
116
|
</div>
|
|
@@ -181,7 +177,7 @@ Add new section capability is not functional.
|
|
|
181
177
|
const newForm = $('#new-form').children().first().clone();
|
|
182
178
|
newForm.find('script').each(function() {
|
|
183
179
|
const newScript = document.createElement('script');
|
|
184
|
-
newScript.type = 'module';
|
|
180
|
+
//newScript.type = 'module';
|
|
185
181
|
$(newScript).html($(this).html().replaceAll('new_form_id', formId));
|
|
186
182
|
$(this).replaceWith(newScript);
|
|
187
183
|
});
|
|
@@ -208,13 +204,9 @@ Add new section capability is not functional.
|
|
|
208
204
|
{% elif forms %}
|
|
209
205
|
{% with form=forms|first %}
|
|
210
206
|
{% with flag_id=section_id|to_id:form.instance.id|to_id:"flags" %}
|
|
211
|
-
{
|
|
212
|
-
|
|
213
|
-
{
|
|
214
|
-
{% compress js inline %}
|
|
215
|
-
{{ form.media.js }}
|
|
216
|
-
{{ form.flags|json_script:flag_id }}
|
|
217
|
-
{% endcompress %}
|
|
207
|
+
{{ form.media.css }}
|
|
208
|
+
{{ form.media.js }}
|
|
209
|
+
{{ form.flags|json_script:flag_id }}
|
|
218
210
|
{% include 'slm/station/form.html' with form=form form_id=section_id flag_id=flag_id %}
|
|
219
211
|
{% endwith %}
|
|
220
212
|
</div>
|
|
@@ -236,7 +228,7 @@ Add new section capability is not functional.
|
|
|
236
228
|
{% block station_images %}
|
|
237
229
|
{% if station_images %}
|
|
238
230
|
|
|
239
|
-
{% load slm static
|
|
231
|
+
{% load slm static i18n %}
|
|
240
232
|
|
|
241
233
|
<div class="col-12">
|
|
242
234
|
<h2>{% trans "Images" %}</h2>
|
|
@@ -5,11 +5,15 @@ Template for View/Diff page.
|
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
7
|
{% extends "slm/station/base.html" %}
|
|
8
|
-
{% load
|
|
8
|
+
{% load slm i18n static %}
|
|
9
9
|
|
|
10
10
|
{% block head %}
|
|
11
11
|
{{ block.super }}
|
|
12
12
|
|
|
13
|
+
{% comment %}there is a bug in diff-match-patch where nodejs snippet at the end throws an error - this code allows that to proceed silently{% endcomment %}
|
|
14
|
+
<script>
|
|
15
|
+
var module = {exports: {}}
|
|
16
|
+
</script>
|
|
13
17
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/diff-match-patch/1.0.5/index.min.js" integrity="sha512-s/r2YIRA8VD7KT0c9uJqKrZFrNFgKlOPeLyVXp7noa6+F8vw5LMvR+hxteawjCpp6+5A4nTYoWtwLcXEJW1YzA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
14
18
|
|
|
15
19
|
{% endblock head %}
|
|
@@ -92,7 +96,6 @@ Template for View/Diff page.
|
|
|
92
96
|
|
|
93
97
|
{{ review_stack|json_script:"slm-review-stack" }}
|
|
94
98
|
|
|
95
|
-
{% compress js inline %}
|
|
96
99
|
<script>
|
|
97
100
|
const reviewActions = $('#review-actions');
|
|
98
101
|
const submitBtn = reviewActions.find('button[name="submit"]');
|
|
@@ -457,5 +460,4 @@ Template for View/Diff page.
|
|
|
457
460
|
|
|
458
461
|
setDiff(1, 0);
|
|
459
462
|
</script>
|
|
460
|
-
{% endcompress %}
|
|
461
463
|
{% endblock %}
|
|
@@ -269,7 +269,10 @@ Template for Download page.
|
|
|
269
269
|
error: function(file, message, xhr) {
|
|
270
270
|
console.log(xhr);
|
|
271
271
|
completedFiles += 1;
|
|
272
|
-
if (
|
|
272
|
+
if (xhr.status === 500) {
|
|
273
|
+
document.write(`<pre>${message}</pre>`);
|
|
274
|
+
}
|
|
275
|
+
if (numFiles === 1 && message.file) {
|
|
273
276
|
window.location = slm.urls.reverse(
|
|
274
277
|
'slm:upload', {
|
|
275
278
|
kwargs: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% load slm compress i18n %}
|
|
2
2
|
|
|
3
3
|
<pre id="slm-parsed-legacy">{% for line in file|file_lines %}{% with idx=forloop.counter0 %}
|
|
4
|
-
<span data-line-number={{ idx }} class="{{ findings|finding_class:idx }}" {% if findings|finding_content:idx %}data-bs-toggle="popover" title="{{ findings|finding_title:idx }}" data-bs-custom-class="{{ findings|finding_class:idx }}" data-bs-html="true" data-bs-content="<pre>{{ findings|finding_content:idx }}</pre>"{% endif %}>{{ line }}</span>{% endwith %}{% endfor %}
|
|
4
|
+
<span data-line-number={{ idx }}>{{ findings|clear_prefix:idx|get_part:line }}<span class="{{ findings|finding_class:idx }}" {% if findings|finding_content:idx %}data-bs-toggle="popover" title="{{ findings|finding_title:idx }}" data-bs-custom-class="{{ findings|finding_class:idx }}" data-bs-html="true" data-bs-content="<pre>{{ findings|finding_content:idx }}</pre>"{% endif %}>{{ findings|marked_part:idx|get_part:line }}</span>{{ findings|clear_postfix:idx|get_part:line }}</span>{% endwith %}{% endfor %}
|
|
5
5
|
</pre>
|
|
6
6
|
|
|
7
7
|
{% compress css inline %}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% load
|
|
1
|
+
{% load i18n %}
|
|
2
2
|
|
|
3
3
|
<div class="slm-scroll-container">
|
|
4
4
|
<div
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
{% compress js inline %}
|
|
17
16
|
<script>
|
|
18
17
|
const deleteAlert = function(alertId) {
|
|
19
18
|
this.event.stopPropagation();
|
|
@@ -125,11 +124,8 @@
|
|
|
125
124
|
/* this is a little clunky - avoid double init when station
|
|
126
125
|
* filter is present on the page
|
|
127
126
|
*/
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
} else {
|
|
131
|
-
slm.stationFilterCallbacks.push(stationsFiltered);
|
|
132
|
-
}
|
|
127
|
+
init();
|
|
128
|
+
slm.stationFilterCallbacks.push(stationsFiltered);
|
|
133
129
|
});
|
|
134
130
|
</script>
|
|
135
|
-
|
|
131
|
+
|
|
@@ -118,10 +118,6 @@ Template for stations list.
|
|
|
118
118
|
</div>
|
|
119
119
|
</div>
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
{% load compress %}
|
|
123
|
-
|
|
124
|
-
{% compress js inline %}
|
|
125
121
|
<script>
|
|
126
122
|
const fileFilter = $('#slm-file-filter');
|
|
127
123
|
const filterFiles = $('#filter-files');
|
|
@@ -255,4 +251,3 @@ Template for stations list.
|
|
|
255
251
|
});
|
|
256
252
|
|
|
257
253
|
</script>
|
|
258
|
-
{% endcompress %}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% load compress %}
|
|
2
|
-
|
|
3
1
|
<div class="slm-scroll-container">
|
|
4
2
|
<div
|
|
5
3
|
id='slm-log-scroll'
|
|
@@ -13,14 +11,12 @@
|
|
|
13
11
|
</div>
|
|
14
12
|
</div>
|
|
15
13
|
|
|
16
|
-
{% compress js inline %}
|
|
17
14
|
<script>
|
|
18
15
|
$(document).ready(function() {
|
|
19
16
|
let reinitialize = true;
|
|
20
17
|
const scrollDiv = $("#slm-log-scroll");
|
|
21
18
|
const drawLogs = function(position, data) {
|
|
22
19
|
if (reinitialize) {
|
|
23
|
-
console.log(reinitialize);
|
|
24
20
|
scrollDiv.find('.slm-log-item').remove();
|
|
25
21
|
scrollDiv.find('h3').remove();
|
|
26
22
|
}
|
|
@@ -75,14 +71,7 @@
|
|
|
75
71
|
scrollDiv.data('slmQuery', queryParams);
|
|
76
72
|
init();
|
|
77
73
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*/
|
|
81
|
-
if ($('#filter-stations').length === 0) {
|
|
82
|
-
init();
|
|
83
|
-
} else {
|
|
84
|
-
slm.stationFilterCallbacks.push(stationsFiltered);
|
|
85
|
-
}
|
|
74
|
+
init();
|
|
75
|
+
slm.stationFilterCallbacks.push(stationsFiltered);
|
|
86
76
|
});
|
|
87
77
|
</script>
|
|
88
|
-
{% endcompress %}
|
|
@@ -71,14 +71,9 @@
|
|
|
71
71
|
</div>
|
|
72
72
|
</div>
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
<script>
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<script type="module">
|
|
79
|
-
|
|
80
|
-
import { Form } from '{% static "slm/js/form.js" %}';
|
|
81
|
-
const filterForm = new Form($('div#filter form'));
|
|
76
|
+
const filterForm = new slm.Form($('div#filter form'));
|
|
82
77
|
|
|
83
78
|
let keyupTimeoutID = 0;
|
|
84
79
|
const stationFilter = $('#slm-station-filter');
|
|
@@ -230,4 +225,3 @@
|
|
|
230
225
|
});
|
|
231
226
|
|
|
232
227
|
</script>
|
|
233
|
-
{% endcompress %}
|