igs-slm 0.1.0b0__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.0b0.dist-info/LICENSE +21 -0
- igs_slm-0.1.0b0.dist-info/METADATA +151 -0
- igs_slm-0.1.0b0.dist-info/RECORD +447 -0
- igs_slm-0.1.0b0.dist-info/WHEEL +4 -0
- igs_slm-0.1.0b0.dist-info/entry_points.txt +3 -0
- igs_tools/__init__.py +0 -0
- igs_tools/connection.py +88 -0
- igs_tools/defines/__init__.py +8 -0
- igs_tools/defines/constellation.py +21 -0
- igs_tools/defines/data_center.py +75 -0
- igs_tools/defines/rinex.py +49 -0
- igs_tools/directory.py +247 -0
- igs_tools/utils.py +66 -0
- slm/__init__.py +21 -0
- slm/admin.py +674 -0
- slm/api/edit/__init__.py +0 -0
- slm/api/edit/serializers.py +316 -0
- slm/api/edit/views.py +1632 -0
- slm/api/fields.py +89 -0
- slm/api/filter.py +504 -0
- slm/api/pagination.py +55 -0
- slm/api/permissions.py +65 -0
- slm/api/public/__init__.py +0 -0
- slm/api/public/serializers.py +249 -0
- slm/api/public/views.py +606 -0
- slm/api/serializers.py +132 -0
- slm/api/views.py +148 -0
- slm/apps.py +323 -0
- slm/authentication.py +198 -0
- slm/bin/__init__.py +0 -0
- slm/bin/startproject.py +262 -0
- slm/bin/templates/{{ project_dir }}/pyproject.toml +35 -0
- slm/bin/templates/{{ project_dir }}/sites/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/base.py +15 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/develop/__init__.py +56 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/develop/local.py +4 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/develop/wsgi.py +16 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/manage.py +34 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/production/__init__.py +61 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/production/wsgi.py +16 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/urls.py +7 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/validation.py +11 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/admin.py +5 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/apps.py +14 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/management/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/management/commands/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/management/commands/import_archive.py +64 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/migrations/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/models.py +6 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/templates/slm/base.html +8 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/urls.py +10 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/views.py +5 -0
- slm/defines/AlertLevel.py +24 -0
- slm/defines/AntennaCalibration.py +25 -0
- slm/defines/AntennaFeatures.py +27 -0
- slm/defines/AntennaReferencePoint.py +22 -0
- slm/defines/Aspiration.py +13 -0
- slm/defines/CardinalDirection.py +19 -0
- slm/defines/CollocationStatus.py +12 -0
- slm/defines/EquipmentState.py +22 -0
- slm/defines/FlagSeverity.py +14 -0
- slm/defines/FractureSpacing.py +15 -0
- slm/defines/FrequencyStandardType.py +15 -0
- slm/defines/GeodesyMLVersion.py +48 -0
- slm/defines/ISOCountry.py +1194 -0
- slm/defines/Instrumentation.py +19 -0
- slm/defines/LogEntryType.py +30 -0
- slm/defines/SLMFileType.py +18 -0
- slm/defines/SiteFileUploadStatus.py +61 -0
- slm/defines/SiteLogFormat.py +49 -0
- slm/defines/SiteLogStatus.py +78 -0
- slm/defines/TectonicPlates.py +28 -0
- slm/defines/__init__.py +46 -0
- slm/forms.py +1126 -0
- slm/jinja2/slm/sitelog/ascii_9char.log +346 -0
- slm/jinja2/slm/sitelog/legacy.log +346 -0
- slm/jinja2/slm/sitelog/xsd/0.4/collocationInformation.xml +12 -0
- slm/jinja2/slm/sitelog/xsd/0.4/condition.xml +12 -0
- slm/jinja2/slm/sitelog/xsd/0.4/contact.xml +52 -0
- slm/jinja2/slm/sitelog/xsd/0.4/formInformation.xml +5 -0
- slm/jinja2/slm/sitelog/xsd/0.4/frequencyStandard.xml +12 -0
- slm/jinja2/slm/sitelog/xsd/0.4/gnssAntenna.xml +16 -0
- slm/jinja2/slm/sitelog/xsd/0.4/gnssReceiver.xml +11 -0
- slm/jinja2/slm/sitelog/xsd/0.4/humiditySensor.xml +13 -0
- slm/jinja2/slm/sitelog/xsd/0.4/localEpisodicEffect.xml +10 -0
- slm/jinja2/slm/sitelog/xsd/0.4/moreInformation.xml +22 -0
- slm/jinja2/slm/sitelog/xsd/0.4/multipathSource.xml +10 -0
- slm/jinja2/slm/sitelog/xsd/0.4/otherInstrumentation.xml +5 -0
- slm/jinja2/slm/sitelog/xsd/0.4/pressureSensor.xml +12 -0
- slm/jinja2/slm/sitelog/xsd/0.4/radioInterference.xml +11 -0
- slm/jinja2/slm/sitelog/xsd/0.4/sensor.xml +16 -0
- slm/jinja2/slm/sitelog/xsd/0.4/signalObstruction.xml +10 -0
- slm/jinja2/slm/sitelog/xsd/0.4/siteIdentification.xml +22 -0
- slm/jinja2/slm/sitelog/xsd/0.4/siteLocation.xml +21 -0
- slm/jinja2/slm/sitelog/xsd/0.4/surveyedLocalTie.xml +20 -0
- slm/jinja2/slm/sitelog/xsd/0.4/temperatureSensor.xml +13 -0
- slm/jinja2/slm/sitelog/xsd/0.4/waterVaporSensor.xml +11 -0
- slm/jinja2/slm/sitelog/xsd/0.5/document.xml +10 -0
- slm/jinja2/slm/sitelog/xsd/geodesyml_0.4.xml +99 -0
- slm/jinja2/slm/sitelog/xsd/geodesyml_0.5.xml +112 -0
- slm/management/__init__.py +0 -0
- slm/management/commands/__init__.py +53 -0
- slm/management/commands/build_index.py +96 -0
- slm/management/commands/generate_sinex.py +675 -0
- slm/management/commands/head_from_index.py +541 -0
- slm/management/commands/import_archive.py +908 -0
- slm/management/commands/import_equipment.py +351 -0
- slm/management/commands/set_site.py +56 -0
- slm/management/commands/sitelog.py +144 -0
- slm/management/commands/synchronize.py +60 -0
- slm/management/commands/update_data_availability.py +167 -0
- slm/management/commands/validate_db.py +186 -0
- slm/management/commands/validate_gml.py +73 -0
- slm/map/__init__.py +1 -0
- slm/map/admin.py +5 -0
- slm/map/api/__init__.py +0 -0
- slm/map/api/edit/__init__.py +0 -0
- slm/map/api/edit/serializers.py +28 -0
- slm/map/api/edit/views.py +46 -0
- slm/map/api/public/__init__.py +0 -0
- slm/map/api/public/serializers.py +29 -0
- slm/map/api/public/views.py +64 -0
- slm/map/apps.py +7 -0
- slm/map/defines.py +53 -0
- slm/map/migrations/0001_initial.py +115 -0
- slm/map/migrations/__init__.py +0 -0
- slm/map/models.py +63 -0
- slm/map/static/slm/css/map.css +86 -0
- slm/map/static/slm/js/map.js +159 -0
- slm/map/templates/slm/map.html +374 -0
- slm/map/templates/slm/station/base.html +11 -0
- slm/map/templates/slm/station/edit.html +10 -0
- slm/map/templates/slm/top_nav.html +17 -0
- slm/map/templatetags/__init__.py +0 -0
- slm/map/templatetags/slm_map.py +18 -0
- slm/map/urls.py +25 -0
- slm/map/views.py +36 -0
- slm/middleware.py +29 -0
- slm/migrations/0001_alter_siteantenna_marker_enu_alter_sitelocation_llh_and_more.py +47 -0
- slm/migrations/0001_initial.py +4826 -0
- slm/migrations/0002_alter_dataavailability_site.py +22 -0
- slm/migrations/0003_remove_logentry_slm_logentr_site_lo_7a2af7_idx_and_more.py +80 -0
- slm/migrations/0004_alter_logentry_timestamp_and_more.py +25 -0
- slm/migrations/0005_alter_logentry_options_alter_logentry_section_and_more.py +46 -0
- slm/migrations/0006_alter_logentry_options_alter_logentry_index_together.py +24 -0
- slm/migrations/0007_alter_dataavailability_rate.py +23 -0
- slm/migrations/0008_alter_archiveindex_options_and_more.py +64 -0
- slm/migrations/0009_alter_archiveindex_end.py +21 -0
- slm/migrations/0010_alter_dataavailability_rinex_version_and_more.py +844 -0
- slm/migrations/0011_alter_siteidentification_fracture_spacing.py +33 -0
- slm/migrations/0012_alter_logentry_type.py +36 -0
- slm/migrations/0013_unpublishedfilesalert.py +48 -0
- slm/migrations/0014_sitelogpublished.py +48 -0
- slm/migrations/0015_alter_siteantenna_options_and_more.py +181 -0
- slm/migrations/0016_alter_antenna_description_alter_radome_description_and_more.py +42 -0
- slm/migrations/0017_alter_logentry_unique_together_and_more.py +54 -0
- slm/migrations/0018_afix_deleted.py +34 -0
- slm/migrations/0018_alter_siteantenna_options_and_more.py +244 -0
- slm/migrations/0019_remove_siteantenna_marker_enu_siteantenna_marker_une_and_more.py +101 -0
- slm/migrations/0020_alter_manufacturer_options.py +16 -0
- slm/migrations/0021_alter_siteform_report_type.py +23 -0
- slm/migrations/0022_rename_antcal_antenna_radome_slm_antcal_antenna_20827a_idx_and_more.py +297 -0
- slm/migrations/0023_archivedsitelog_gml_version_and_more.py +55 -0
- slm/migrations/0024_alter_agency_name_alter_agency_shortname.py +24 -0
- slm/migrations/0025_alter_archivedsitelog_log_format_and_more.py +61 -0
- slm/migrations/0026_alter_archivedsitelog_log_format_and_more.py +61 -0
- slm/migrations/0027_importalert_file_contents_importalert_findings_and_more.py +41 -0
- slm/migrations/0028_antenna_replaced_manufacturer_url_radome_replaced_and_more.py +46 -0
- slm/migrations/0029_manufacturer_full_name.py +17 -0
- slm/migrations/0030_alter_antenna_state_alter_radome_state_and_more.py +43 -0
- slm/migrations/__init__.py +0 -0
- slm/migrations/load_satellitesystems.py +27 -0
- slm/models/__init__.py +118 -0
- slm/models/about.py +14 -0
- slm/models/alerts.py +1204 -0
- slm/models/data.py +58 -0
- slm/models/equipment.py +229 -0
- slm/models/help.py +14 -0
- slm/models/index.py +428 -0
- slm/models/sitelog.py +4279 -0
- slm/models/system.py +723 -0
- slm/models/user.py +304 -0
- slm/parsing/__init__.py +786 -0
- slm/parsing/legacy/__init__.py +4 -0
- slm/parsing/legacy/binding.py +817 -0
- slm/parsing/legacy/parser.py +377 -0
- slm/parsing/xsd/__init__.py +34 -0
- slm/parsing/xsd/binding.py +86 -0
- slm/parsing/xsd/geodesyml/0.4/commonTypes.xsd +133 -0
- slm/parsing/xsd/geodesyml/0.4/contact.xsd +29 -0
- slm/parsing/xsd/geodesyml/0.4/dataStreams.xsd +129 -0
- slm/parsing/xsd/geodesyml/0.4/document.xsd +64 -0
- slm/parsing/xsd/geodesyml/0.4/equipment.xsd +427 -0
- slm/parsing/xsd/geodesyml/0.4/fieldMeasurement.xsd +170 -0
- slm/parsing/xsd/geodesyml/0.4/geodesyML.xsd +71 -0
- slm/parsing/xsd/geodesyml/0.4/geodeticEquipment.xsd +343 -0
- slm/parsing/xsd/geodesyml/0.4/geodeticMonument.xsd +147 -0
- slm/parsing/xsd/geodesyml/0.4/lineage.xsd +614 -0
- slm/parsing/xsd/geodesyml/0.4/localInterferences.xsd +131 -0
- slm/parsing/xsd/geodesyml/0.4/measurement.xsd +473 -0
- slm/parsing/xsd/geodesyml/0.4/monumentInfo.xsd +251 -0
- slm/parsing/xsd/geodesyml/0.4/observationSystem.xsd +429 -0
- slm/parsing/xsd/geodesyml/0.4/project.xsd +38 -0
- slm/parsing/xsd/geodesyml/0.4/quality.xsd +176 -0
- slm/parsing/xsd/geodesyml/0.4/referenceFrame.xsd +194 -0
- slm/parsing/xsd/geodesyml/0.4/siteLog.xsd +71 -0
- slm/parsing/xsd/geodesyml/0.5/commonTypes.xsd +133 -0
- slm/parsing/xsd/geodesyml/0.5/contact.xsd +29 -0
- slm/parsing/xsd/geodesyml/0.5/dataStreams.xsd +129 -0
- slm/parsing/xsd/geodesyml/0.5/document.xsd +64 -0
- slm/parsing/xsd/geodesyml/0.5/equipment.xsd +427 -0
- slm/parsing/xsd/geodesyml/0.5/fieldMeasurement.xsd +170 -0
- slm/parsing/xsd/geodesyml/0.5/geodesyML.xsd +71 -0
- slm/parsing/xsd/geodesyml/0.5/geodeticEquipment.xsd +343 -0
- slm/parsing/xsd/geodesyml/0.5/geodeticMonument.xsd +147 -0
- slm/parsing/xsd/geodesyml/0.5/lineage.xsd +614 -0
- slm/parsing/xsd/geodesyml/0.5/localInterferences.xsd +131 -0
- slm/parsing/xsd/geodesyml/0.5/measurement.xsd +473 -0
- slm/parsing/xsd/geodesyml/0.5/monumentInfo.xsd +306 -0
- slm/parsing/xsd/geodesyml/0.5/observationSystem.xsd +429 -0
- slm/parsing/xsd/geodesyml/0.5/project.xsd +38 -0
- slm/parsing/xsd/geodesyml/0.5/quality.xsd +176 -0
- slm/parsing/xsd/geodesyml/0.5/referenceFrame.xsd +194 -0
- slm/parsing/xsd/geodesyml/0.5/siteLog.xsd +73 -0
- slm/parsing/xsd/parser.py +116 -0
- slm/parsing/xsd/resolver.py +28 -0
- slm/receivers/__init__.py +11 -0
- slm/receivers/alerts.py +87 -0
- slm/receivers/cleanup.py +41 -0
- slm/receivers/event_loggers.py +175 -0
- slm/receivers/index.py +67 -0
- slm/settings/__init__.py +55 -0
- slm/settings/auth.py +15 -0
- slm/settings/ckeditor.py +14 -0
- slm/settings/debug.py +47 -0
- slm/settings/internationalization.py +12 -0
- slm/settings/logging.py +113 -0
- slm/settings/platform/__init__.py +0 -0
- slm/settings/platform/darwin.py +10 -0
- slm/settings/rest.py +21 -0
- slm/settings/root.py +152 -0
- slm/settings/routines.py +43 -0
- slm/settings/secrets.py +37 -0
- slm/settings/security.py +5 -0
- slm/settings/slm.py +188 -0
- slm/settings/static_templates.py +53 -0
- slm/settings/templates.py +29 -0
- slm/settings/uploads.py +8 -0
- slm/settings/urls.py +126 -0
- slm/settings/validation.py +196 -0
- slm/signals.py +250 -0
- slm/singleton.py +49 -0
- slm/static/rest_framework/css/bootstrap-tweaks.css +204 -0
- slm/static/rest_framework/css/bootstrap.min.css +7 -0
- slm/static/rest_framework/css/bootstrap.min.css.map +1 -0
- slm/static/rest_framework/css/default.css +82 -0
- slm/static/rest_framework/css/prettify.css +30 -0
- slm/static/rest_framework/docs/css/base.css +344 -0
- slm/static/rest_framework/docs/css/highlight.css +125 -0
- slm/static/rest_framework/docs/css/jquery.json-view.min.css +11 -0
- slm/static/rest_framework/docs/img/favicon.ico +0 -0
- slm/static/rest_framework/docs/img/grid.png +0 -0
- slm/static/rest_framework/docs/js/api.js +321 -0
- slm/static/rest_framework/docs/js/highlight.pack.js +2 -0
- slm/static/rest_framework/docs/js/jquery.json-view.min.js +7 -0
- slm/static/rest_framework/img/grid.png +0 -0
- slm/static/rest_framework/js/ajax-form.js +127 -0
- slm/static/rest_framework/js/bootstrap.bundle.min.js +7 -0
- slm/static/rest_framework/js/bootstrap.bundle.min.js.map +1 -0
- slm/static/rest_framework/js/bootstrap.min.js.map +1 -0
- slm/static/rest_framework/js/coreapi-0.1.1.js +2043 -0
- slm/static/rest_framework/js/csrf.js +52 -0
- slm/static/rest_framework/js/default.js +47 -0
- slm/static/rest_framework/js/jquery-3.5.1.min.js +2 -0
- slm/static/rest_framework/js/prettify-min.js +28 -0
- slm/static/slm/css/admin.css +3 -0
- slm/static/slm/css/defines.css +82 -0
- slm/static/slm/css/forms.css +1 -0
- slm/static/slm/css/style.css +1004 -0
- slm/static/slm/img/email-branding.png +0 -0
- slm/static/slm/img/favicon.ico +0 -0
- slm/static/slm/img/login-bg.jpg +0 -0
- slm/static/slm/img/slm-logo.svg +4 -0
- slm/static/slm/js/autocomplete.js +341 -0
- slm/static/slm/js/enums.js +322 -0
- slm/static/slm/js/fileIcons.js +30 -0
- slm/static/slm/js/form.js +404 -0
- slm/static/slm/js/formWidget.js +23 -0
- slm/static/slm/js/persistable.js +33 -0
- slm/static/slm/js/slm.js +1028 -0
- slm/static/slm/js/time24.js +212 -0
- slm/static_templates/slm/css/defines.css +26 -0
- slm/static_templates/slm/js/enums.js +28 -0
- slm/static_templates/slm/js/fileIcons.js +16 -0
- slm/static_templates/slm/js/urls.js +5 -0
- slm/templates/account/base.html +20 -0
- slm/templates/account/email/base.html +43 -0
- slm/templates/account/email/base_message.txt +7 -0
- slm/templates/account/email/email_confirmation_message.html +16 -0
- slm/templates/account/email/email_confirmation_message.txt +7 -0
- slm/templates/account/email/email_confirmation_signup_message.html +1 -0
- slm/templates/account/email/email_confirmation_signup_message.txt +1 -0
- slm/templates/account/email/email_confirmation_signup_subject.txt +1 -0
- slm/templates/account/email/email_confirmation_subject.txt +4 -0
- slm/templates/account/email/password_reset_key_message.html +28 -0
- slm/templates/account/email/password_reset_key_message.txt +9 -0
- slm/templates/account/email/password_reset_key_subject.txt +4 -0
- slm/templates/account/email/unknown_account_message.html +25 -0
- slm/templates/account/email/unknown_account_message.txt +12 -0
- slm/templates/account/email/unknown_account_subject.txt +4 -0
- slm/templates/account/login.html +67 -0
- slm/templates/account/logout.html +38 -0
- slm/templates/account/password_change.html +48 -0
- slm/templates/account/password_reset.html +51 -0
- slm/templates/account/password_reset_done.html +20 -0
- slm/templates/account/password_reset_from_key.html +52 -0
- slm/templates/account/password_reset_from_key_done.html +17 -0
- slm/templates/admin/base.html +7 -0
- slm/templates/messages.html +8 -0
- slm/templates/rest_framework/README +16 -0
- slm/templates/rest_framework/admin/detail.html +10 -0
- slm/templates/rest_framework/admin/dict_value.html +11 -0
- slm/templates/rest_framework/admin/list.html +32 -0
- slm/templates/rest_framework/admin/list_value.html +11 -0
- slm/templates/rest_framework/admin/simple_list_value.html +2 -0
- slm/templates/rest_framework/admin.html +282 -0
- slm/templates/rest_framework/api.html +3 -0
- slm/templates/rest_framework/base.html +334 -0
- slm/templates/rest_framework/docs/auth/basic.html +42 -0
- slm/templates/rest_framework/docs/auth/session.html +40 -0
- slm/templates/rest_framework/docs/auth/token.html +41 -0
- slm/templates/rest_framework/docs/document.html +37 -0
- slm/templates/rest_framework/docs/error.html +71 -0
- slm/templates/rest_framework/docs/index.html +55 -0
- slm/templates/rest_framework/docs/interact.html +57 -0
- slm/templates/rest_framework/docs/langs/javascript-intro.html +5 -0
- slm/templates/rest_framework/docs/langs/javascript.html +15 -0
- slm/templates/rest_framework/docs/langs/python-intro.html +3 -0
- slm/templates/rest_framework/docs/langs/python.html +13 -0
- slm/templates/rest_framework/docs/langs/shell-intro.html +3 -0
- slm/templates/rest_framework/docs/langs/shell.html +6 -0
- slm/templates/rest_framework/docs/link.html +113 -0
- slm/templates/rest_framework/docs/sidebar.html +78 -0
- slm/templates/rest_framework/filters/base.html +16 -0
- slm/templates/rest_framework/filters/ordering.html +17 -0
- slm/templates/rest_framework/filters/search.html +13 -0
- slm/templates/rest_framework/horizontal/checkbox.html +23 -0
- slm/templates/rest_framework/horizontal/checkbox_multiple.html +32 -0
- slm/templates/rest_framework/horizontal/dict_field.html +11 -0
- slm/templates/rest_framework/horizontal/fieldset.html +16 -0
- slm/templates/rest_framework/horizontal/form.html +6 -0
- slm/templates/rest_framework/horizontal/input.html +21 -0
- slm/templates/rest_framework/horizontal/list_field.html +11 -0
- slm/templates/rest_framework/horizontal/list_fieldset.html +13 -0
- slm/templates/rest_framework/horizontal/radio.html +42 -0
- slm/templates/rest_framework/horizontal/select.html +36 -0
- slm/templates/rest_framework/horizontal/select_multiple.html +38 -0
- slm/templates/rest_framework/horizontal/textarea.html +21 -0
- slm/templates/rest_framework/inline/checkbox.html +8 -0
- slm/templates/rest_framework/inline/checkbox_multiple.html +14 -0
- slm/templates/rest_framework/inline/dict_field.html +9 -0
- slm/templates/rest_framework/inline/fieldset.html +6 -0
- slm/templates/rest_framework/inline/form.html +8 -0
- slm/templates/rest_framework/inline/input.html +9 -0
- slm/templates/rest_framework/inline/list_field.html +9 -0
- slm/templates/rest_framework/inline/list_fieldset.html +3 -0
- slm/templates/rest_framework/inline/radio.html +25 -0
- slm/templates/rest_framework/inline/select.html +24 -0
- slm/templates/rest_framework/inline/select_multiple.html +25 -0
- slm/templates/rest_framework/inline/textarea.html +9 -0
- slm/templates/rest_framework/login.html +3 -0
- slm/templates/rest_framework/login_base.html +65 -0
- slm/templates/rest_framework/pagination/numbers.html +47 -0
- slm/templates/rest_framework/pagination/previous_and_next.html +21 -0
- slm/templates/rest_framework/raw_data_form.html +11 -0
- slm/templates/rest_framework/schema.js +3 -0
- slm/templates/rest_framework/vertical/checkbox.html +16 -0
- slm/templates/rest_framework/vertical/checkbox_multiple.html +30 -0
- slm/templates/rest_framework/vertical/dict_field.html +7 -0
- slm/templates/rest_framework/vertical/fieldset.html +13 -0
- slm/templates/rest_framework/vertical/form.html +6 -0
- slm/templates/rest_framework/vertical/input.html +17 -0
- slm/templates/rest_framework/vertical/list_field.html +7 -0
- slm/templates/rest_framework/vertical/list_fieldset.html +7 -0
- slm/templates/rest_framework/vertical/radio.html +40 -0
- slm/templates/rest_framework/vertical/select.html +34 -0
- slm/templates/rest_framework/vertical/select_multiple.html +31 -0
- slm/templates/rest_framework/vertical/textarea.html +17 -0
- slm/templates/slm/about.html +21 -0
- slm/templates/slm/alerts/alert.html +15 -0
- slm/templates/slm/alerts/geodesymlinvalid.html +8 -0
- slm/templates/slm/alerts/importalert.html +10 -0
- slm/templates/slm/alerts.html +18 -0
- slm/templates/slm/auth_menu.html +41 -0
- slm/templates/slm/base.html +195 -0
- slm/templates/slm/emails/alert_issued.html +31 -0
- slm/templates/slm/emails/alert_issued.txt +9 -0
- slm/templates/slm/emails/base.html +6 -0
- slm/templates/slm/emails/changes_rejected.txt +7 -0
- slm/templates/slm/emails/review_requested.txt +7 -0
- slm/templates/slm/forms/widgets/auto_complete.html +21 -0
- slm/templates/slm/forms/widgets/auto_complete_multiple.html +18 -0
- slm/templates/slm/forms/widgets/checkbox_multiple.html +6 -0
- slm/templates/slm/forms/widgets/inline_multi.html +1 -0
- slm/templates/slm/forms/widgets/splitdatetime.html +14 -0
- slm/templates/slm/forms/widgets/time24.html +37 -0
- slm/templates/slm/help.html +54 -0
- slm/templates/slm/messages.html +13 -0
- slm/templates/slm/new_site.html +88 -0
- slm/templates/slm/profile.html +57 -0
- slm/templates/slm/register.html +40 -0
- slm/templates/slm/reports/file_log.html +43 -0
- slm/templates/slm/reports/head_log.html +23 -0
- slm/templates/slm/reports/head_report.html +55 -0
- slm/templates/slm/reports/index_log.html +23 -0
- slm/templates/slm/reports/index_report.html +71 -0
- slm/templates/slm/station/alert.html +8 -0
- slm/templates/slm/station/alerts.html +19 -0
- slm/templates/slm/station/base.html +104 -0
- slm/templates/slm/station/download.html +87 -0
- slm/templates/slm/station/edit.html +283 -0
- slm/templates/slm/station/form.html +110 -0
- slm/templates/slm/station/log.html +18 -0
- slm/templates/slm/station/review.html +461 -0
- slm/templates/slm/station/upload.html +295 -0
- slm/templates/slm/station/uploads/attachment.html +20 -0
- slm/templates/slm/station/uploads/geodesyml.html +1 -0
- slm/templates/slm/station/uploads/image.html +27 -0
- slm/templates/slm/station/uploads/json.html +0 -0
- slm/templates/slm/station/uploads/legacy.html +77 -0
- slm/templates/slm/top_nav.html +14 -0
- slm/templates/slm/user_activity.html +16 -0
- slm/templates/slm/widgets/alert_scroll.html +135 -0
- slm/templates/slm/widgets/filelist.html +258 -0
- slm/templates/slm/widgets/legend.html +12 -0
- slm/templates/slm/widgets/log_scroll.html +88 -0
- slm/templates/slm/widgets/stationlist.html +233 -0
- slm/templatetags/__init__.py +0 -0
- slm/templatetags/jinja2.py +9 -0
- slm/templatetags/slm.py +459 -0
- slm/urls.py +148 -0
- slm/utils.py +299 -0
- slm/validators.py +297 -0
- slm/views.py +654 -0
- slm/widgets.py +134 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
|
|
3
|
+
Template for Download page.
|
|
4
|
+
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
{% extends "slm/station/base.html" %}
|
|
8
|
+
{% load i18n slm %}
|
|
9
|
+
|
|
10
|
+
{% block head %}
|
|
11
|
+
{{ block.super }}
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="https://unpkg.com/dropzone@5/dist/min/dropzone.min.css" type="text/css"/>
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
#upload-container {}
|
|
17
|
+
|
|
18
|
+
#sitefile-upload {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 400px;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
|
|
24
|
+
<script src="https://unpkg.com/dropzone@5/dist/min/dropzone.min.js"></script>
|
|
25
|
+
|
|
26
|
+
{% endblock head %}
|
|
27
|
+
|
|
28
|
+
{% block action_content %}
|
|
29
|
+
<div class="row">
|
|
30
|
+
<div class="col-3">
|
|
31
|
+
{% block file_list %}
|
|
32
|
+
{% include 'slm/widgets/filelist.html' %}
|
|
33
|
+
{% endblock %}
|
|
34
|
+
</div>
|
|
35
|
+
<div class="col-9">
|
|
36
|
+
<div class="container px-5">
|
|
37
|
+
<!-- Title -->
|
|
38
|
+
<div class="d-flex flex-column justify-content-left align-items-left mt-4">
|
|
39
|
+
<div class="mb-4 pb-3 border-bottom">
|
|
40
|
+
<h2 id="slm-file-header">{% if file %}<a href="{{ file.edit_link }}" target="_blank" download="{{ file.name }}"><i class="{{ file|file_icon }}"></i> <span class="slm-file-name">{{ file.name }}</span></a>{% else %}{% trans "Upload" %}{% endif %}</h2>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<!-- Download Options -->
|
|
45
|
+
<div id="upload-container" class="p-3">
|
|
46
|
+
|
|
47
|
+
{% if file %}
|
|
48
|
+
<!-- action bar -->
|
|
49
|
+
<div class="d-flex justify-content-between">
|
|
50
|
+
<div class="d-flex flex-column">
|
|
51
|
+
{% if file.user %}<p class="fs-5"><strong>{% trans "Uploaded by:" %}</strong> {{ file.user.name }}</p>{% endif %}
|
|
52
|
+
<p class="fs-5"><strong>{% trans "Date Uploaded:" %}</strong> {{ file.timestamp.date }}</p>
|
|
53
|
+
</div>
|
|
54
|
+
<div id="file-actions" class="d-flex justify-content-end align-items-center">
|
|
55
|
+
{% if file.file_type == SLMFileType.SITE_IMAGE %}
|
|
56
|
+
<button name="rotate" onclick="rotate(90);" type="button" class="btn btn-primary"><i class="bi bi-arrow-counterclockwise"></i></button>
|
|
57
|
+
<button name="rotate" onclick="rotate(-90);" type="button" class="btn btn-primary"><i class="bi bi-arrow-clockwise"></i></button>
|
|
58
|
+
{% endif %}
|
|
59
|
+
{% if can_publish %}
|
|
60
|
+
<button name="unpublish" onclick="publishFile(false);" type="button" class="btn btn-primary" style="{% if file.status != SiteFileUploadStatus.PUBLISHED %}display: none{% endif %}">{% trans 'Unpublish' %}</button>
|
|
61
|
+
<button name="publish" onclick="publishFile(true);" type="button" class="btn btn-primary" style="{% if file.status != SiteFileUploadStatus.UNPUBLISHED %}display: none{% endif %}">{% trans 'Publish' %}</button>
|
|
62
|
+
{% endif %}
|
|
63
|
+
<button name="delete" onclick="deleteFile();" type="button" class="btn btn-danger">{% trans 'Delete' %}</button>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
{% if file.file_type == SLMFileType.SITE_LOG %}
|
|
68
|
+
<hr/>
|
|
69
|
+
{% if finding_errors is not None or finding_warnings is not None %}
|
|
70
|
+
<h4>
|
|
71
|
+
{% if finding_errors %}
|
|
72
|
+
{% trans 'This log was rejected because' %} <span style="color: red">{{ finding_errors }} {% trans 'errors were found.' %}</span> {% trans 'Scroll down to see the errors. Please correct them and resubmit.' %}
|
|
73
|
+
{% elif finding_warnings %}
|
|
74
|
+
{% trans 'This log was accepted with' %} {{ finding_warnings }} {% trans 'warnings. Please correct the warnings if possible. To publish this log please' %} <a href="{% url 'slm:review' station=station %}">{% trans 'submit it for review.' %}</a>
|
|
75
|
+
{% elif finding_errors == 0 %}
|
|
76
|
+
{% trans 'This log was accepted. To publish these changes please' %} <a href="{% url 'slm:review' station=station %}">{% trans 'submit it for review.' %}</a>
|
|
77
|
+
{% endif %}
|
|
78
|
+
</h4>
|
|
79
|
+
<hr/>
|
|
80
|
+
{% endif %}
|
|
81
|
+
{% if file.log_format == SiteLogFormat.LEGACY %}
|
|
82
|
+
{% include 'slm/station/uploads/legacy.html' %}
|
|
83
|
+
{% elif file.log_format == SiteLogFormat.ASCII_9CHAR %}
|
|
84
|
+
{% include 'slm/station/uploads/legacy.html' %}
|
|
85
|
+
{% elif file.log_format == SiteLogFormat.GEODESY_ML %}
|
|
86
|
+
{% include 'slm/station/uploads/geodesyml.html' %}
|
|
87
|
+
{% elif file.log_format == SiteLogFormat.JSON %}
|
|
88
|
+
{% include 'slm/station/uploads/json.html' %}
|
|
89
|
+
{% endif %}
|
|
90
|
+
{% else %}
|
|
91
|
+
{% if file.file_type == SLMFileType.SITE_IMAGE %}
|
|
92
|
+
{% include 'slm/station/uploads/image.html' %}
|
|
93
|
+
{% elif file.file_type == SLMFileType.ATTACHMENT %}
|
|
94
|
+
{% include 'slm/station/uploads/attachment.html' %}
|
|
95
|
+
{% endif %}
|
|
96
|
+
{% if form %}
|
|
97
|
+
|
|
98
|
+
{% endif %}
|
|
99
|
+
{% endif %}
|
|
100
|
+
|
|
101
|
+
<script>
|
|
102
|
+
|
|
103
|
+
const fileActions = $('#file-actions');
|
|
104
|
+
const unpublishBtn = fileActions.find('button[name="unpublish"]');
|
|
105
|
+
const publishBtn = fileActions.find('button[name="publish"]');
|
|
106
|
+
const deleteBtn = fileActions.find('button[name="delete"]');
|
|
107
|
+
const updateBtn = $('button[name="update"]');
|
|
108
|
+
|
|
109
|
+
const rotate = function(degrees) {
|
|
110
|
+
slm.rotateImage(degrees, {{ file.id }}).done(
|
|
111
|
+
function(data, status, jqXHR) {
|
|
112
|
+
location.reload();
|
|
113
|
+
}
|
|
114
|
+
).fail(
|
|
115
|
+
function(jqXHR, textStatus, errorThrown) {
|
|
116
|
+
alert(`{% trans 'Rotate failed:' %}: ${jqXHR.responseText}`);
|
|
117
|
+
console.log(jqXHR);
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const deleteFile = function() {
|
|
123
|
+
slm.deleteFile("{{ station }}", {{ file.id }}).done(
|
|
124
|
+
function(data, status, jqXHR) {
|
|
125
|
+
window.location = slm.urls.reverse(
|
|
126
|
+
'slm:upload', {
|
|
127
|
+
kwargs: {'station': "{{ station }}"}
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
{% if file.status == SiteFileUploadStatus.UNPUBLISHED %}
|
|
131
|
+
slm.updateFileBadges(-1);
|
|
132
|
+
{% endif %}
|
|
133
|
+
}
|
|
134
|
+
).fail(
|
|
135
|
+
function(jqXHR, textStatus, errorThrown) {
|
|
136
|
+
alert(`{% trans 'Delete failed:' %}: ${jqXHR.responseText}`);
|
|
137
|
+
console.log(jqXHR);
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const publishFile = function(publish) {
|
|
143
|
+
$('body').css('cursor', 'progress');
|
|
144
|
+
let btn = $('button#select-file-{{ file.id }}');
|
|
145
|
+
let oldStatus = slm.SiteFileUploadStatus.get(btn.data('slmFileStatus'));
|
|
146
|
+
slm.publishFile("{{ station }}", {{ file.id }}, publish).done(
|
|
147
|
+
function(data, status, jqXHR) {
|
|
148
|
+
$('body').css('cursor', 'default');
|
|
149
|
+
let newStatus = slm.SiteFileUploadStatus.get(data.status);
|
|
150
|
+
publishBtn.hide();
|
|
151
|
+
unpublishBtn.hide();
|
|
152
|
+
if (newStatus === slm.SiteFileUploadStatus.PUBLISHED) {
|
|
153
|
+
unpublishBtn.show();
|
|
154
|
+
} else if (newStatus === slm.SiteFileUploadStatus.UNPUBLISHED) {
|
|
155
|
+
publishBtn.show();
|
|
156
|
+
}
|
|
157
|
+
btn.removeClass(oldStatus.css);
|
|
158
|
+
btn.addClass(newStatus.css);
|
|
159
|
+
btn.data('slmFileStatus', newStatus.value);
|
|
160
|
+
slm.updateFileBadges(publish ? -1 : 1);
|
|
161
|
+
}
|
|
162
|
+
).fail(
|
|
163
|
+
function(jqXHR, textStatus, errorThrown) {
|
|
164
|
+
$('body').css('cursor', 'default');
|
|
165
|
+
alert(`{% trans 'Delete failed:' %}: ${jqXHR.responseText}`);
|
|
166
|
+
console.log(jqXHR);
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const updateFile = function() {
|
|
172
|
+
$('body').css('cursor', 'progress');
|
|
173
|
+
$.ajax({
|
|
174
|
+
url: slm.urls.reverse(
|
|
175
|
+
'slm_edit_api:files-detail',
|
|
176
|
+
{kwargs: {'site': '{{ station }}', 'pk': {{ file.id }}}}
|
|
177
|
+
),
|
|
178
|
+
method: 'PATCH',
|
|
179
|
+
data: $('form#slm-file-form').serialize()
|
|
180
|
+
}).done(
|
|
181
|
+
function(data, status, jqXHR) {
|
|
182
|
+
$('body').css('cursor', 'default');
|
|
183
|
+
$('h2#slm-file-header span.slm-file-name').html(data['name']);
|
|
184
|
+
$('button#select-file-{{file.id}} span.slm-file-name').html(data['name']);
|
|
185
|
+
updateBtn.blur();
|
|
186
|
+
window.scrollTo(0, 0);
|
|
187
|
+
}
|
|
188
|
+
).fail(
|
|
189
|
+
function(jqXHR, textStatus, errorThrown) {
|
|
190
|
+
$('body').css('cursor', 'default');
|
|
191
|
+
alert(`{% trans 'Update failed:' %}: ${jqXHR.responseText}`);
|
|
192
|
+
console.log(jqXHR);
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
</script>
|
|
198
|
+
{% else %}
|
|
199
|
+
<div id="sitefile-upload" class="dropzone">
|
|
200
|
+
<div class="dz-message" data-dz-message>
|
|
201
|
+
<p><i class="bi bi-cloud-arrow-up"></i></p>
|
|
202
|
+
<p class="fs-5 fw-bold">{% translate "Click to upload or drag and drop files to upload an updated site log, site images or miscellaneous files." %}</p>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<script>
|
|
207
|
+
|
|
208
|
+
Dropzone.autoDiscover = false;
|
|
209
|
+
let numFiles = 0;
|
|
210
|
+
let completedFiles = 0;
|
|
211
|
+
// Dropzone has been added as a global variable.
|
|
212
|
+
const dropzone = new Dropzone(
|
|
213
|
+
"div#sitefile-upload",
|
|
214
|
+
{
|
|
215
|
+
url: slm.urls.reverse(
|
|
216
|
+
'slm_edit_api:files-list',
|
|
217
|
+
{kwargs: {'site': '{{ station }}'}}
|
|
218
|
+
),
|
|
219
|
+
maxFilesize: {{ MAX_UPLOAD_MB }},
|
|
220
|
+
headers:{
|
|
221
|
+
'X-CSRFToken' : "{{ csrf_token }}"
|
|
222
|
+
},
|
|
223
|
+
init: function () {
|
|
224
|
+
this.on('addedfile', function (file) {
|
|
225
|
+
numFiles += 1;
|
|
226
|
+
});
|
|
227
|
+
this.on("complete", function (file) {
|
|
228
|
+
completedFiles += 1;
|
|
229
|
+
if (file.xhr.status < 300) {
|
|
230
|
+
let response = JSON.parse(file.xhr.responseText);
|
|
231
|
+
if (numFiles === 1) {
|
|
232
|
+
window.location = slm.urls.reverse(
|
|
233
|
+
'slm:upload', {
|
|
234
|
+
kwargs: {
|
|
235
|
+
station: "{{ station }}",
|
|
236
|
+
file: response.id
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
let siteNavBtn = $(`button#select-{{ station }}`);
|
|
242
|
+
let errBadge = siteNavBtn.find('span.slm-error-badge');
|
|
243
|
+
let siteStatus = slm.SiteLogStatus.get(response.site_status);
|
|
244
|
+
let fileStatus = slm.SiteFileUploadStatus.get(response.status);
|
|
245
|
+
siteNavBtn.removeClass(
|
|
246
|
+
slm.SiteLogStatus.get(
|
|
247
|
+
siteNavBtn.data('slmStatus')
|
|
248
|
+
).css
|
|
249
|
+
);
|
|
250
|
+
siteNavBtn.data('slmStatus', siteStatus.value);
|
|
251
|
+
siteNavBtn.addClass(siteStatus.css);
|
|
252
|
+
siteNavBtn.data('slmFlags', response.site_flags);
|
|
253
|
+
errBadge.html(response.site_flags);
|
|
254
|
+
if (response.site_flags) {
|
|
255
|
+
errBadge.show();
|
|
256
|
+
} else {
|
|
257
|
+
errBadge.hide();
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (fileStatus === slm.SiteFileUploadStatus.UNPUBLISHED) {
|
|
261
|
+
slm.updateFileBadges(1);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
if (completedFiles === numFiles) {
|
|
265
|
+
initFileList($("#slm-file-list"));
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
},
|
|
269
|
+
error: function(file, message, xhr) {
|
|
270
|
+
console.log(xhr);
|
|
271
|
+
completedFiles += 1;
|
|
272
|
+
if (numFiles === 1) {
|
|
273
|
+
window.location = slm.urls.reverse(
|
|
274
|
+
'slm:upload', {
|
|
275
|
+
kwargs: {
|
|
276
|
+
station: "{{ station }}",
|
|
277
|
+
file: message.file
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
$(file.previewElement).addClass("dz-error").find(
|
|
283
|
+
'.dz-error-message'
|
|
284
|
+
).html(message.error);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
);
|
|
288
|
+
</script>
|
|
289
|
+
{% endif %}
|
|
290
|
+
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
{% endblock %}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{% load i18n widget_tweaks %}
|
|
2
|
+
|
|
3
|
+
<div class="row m-2">
|
|
4
|
+
<div class="col-12">
|
|
5
|
+
<form id="slm-file-form">
|
|
6
|
+
{% csrf_token %}
|
|
7
|
+
<div class="row my-2">
|
|
8
|
+
<div class="col-12">
|
|
9
|
+
{% render_field form.name class="form-control" title=form.name.help_text placeholder=form.name.help_text %}
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="row my-2">
|
|
13
|
+
<div class="col-12">
|
|
14
|
+
{% render_field form.description rows="3" class="form-control" title=form.description.help_text placeholder=form.description.help_text %}
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<button name="update" onclick="updateFile();" type="button" class="btn btn-primary">{% trans 'Update' %}</button>
|
|
18
|
+
</form>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{% extends "slm/station/uploads/legacy.html" %}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{% load i18n widget_tweaks %}
|
|
2
|
+
|
|
3
|
+
<div class="m-2">
|
|
4
|
+
<img src="{{ file.edit_link }}" class="img-fluid mt-5" style="image-orientation: none;" />
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div class="row m-2">
|
|
8
|
+
<div class="col-12">
|
|
9
|
+
<form id="slm-file-form">
|
|
10
|
+
{% csrf_token %}
|
|
11
|
+
<div class="row my-2">
|
|
12
|
+
<div class="col-6">
|
|
13
|
+
{% render_field form.name class="form-control" title=form.name.help_text placeholder=form.name.help_text %}
|
|
14
|
+
</div>
|
|
15
|
+
<div class="col-6">
|
|
16
|
+
{% render_field form.direction class="form-control" title=form.direction.help_text %}
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="row my-2">
|
|
20
|
+
<div class="col-12">
|
|
21
|
+
{% render_field form.description rows="3" class="form-control" title=form.description.help_text placeholder=form.description.help_text %}
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<button name="update" onclick="updateFile();" type="button" class="btn btn-primary">{% trans 'Update' %}</button>
|
|
25
|
+
</form>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{% load slm compress i18n %}
|
|
2
|
+
|
|
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 %}
|
|
5
|
+
</pre>
|
|
6
|
+
|
|
7
|
+
{% compress css inline %}
|
|
8
|
+
<style>
|
|
9
|
+
pre#slm-parsed-legacy {
|
|
10
|
+
background-color: ghostwhite;
|
|
11
|
+
}
|
|
12
|
+
pre#slm-parsed-legacy span.slm-parse-error {
|
|
13
|
+
background-color: #dc3545;
|
|
14
|
+
}
|
|
15
|
+
pre#slm-parsed-legacy span.slm-parse-error:hover {
|
|
16
|
+
width: 100%;
|
|
17
|
+
background-color: darkred;
|
|
18
|
+
color: white;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
pre#slm-parsed-legacy span.slm-parse-warning {
|
|
22
|
+
background-color: orange;
|
|
23
|
+
}
|
|
24
|
+
pre#slm-parsed-legacy span.slm-parse-warning:hover {
|
|
25
|
+
width: 100%;
|
|
26
|
+
background-color: darkorange;
|
|
27
|
+
color: white;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
pre#slm-parsed-legacy span.slm-parse-ignore {
|
|
31
|
+
background-color: lightgrey;
|
|
32
|
+
}
|
|
33
|
+
pre#slm-parsed-legacy span.slm-parse-ignore:hover {
|
|
34
|
+
width: 100%;
|
|
35
|
+
background-color: darkgray;
|
|
36
|
+
color: white;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
div.popover.slm-parse-error h3 {
|
|
41
|
+
background-color: darkred;
|
|
42
|
+
color: white;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
div.popover.slm-parse-warning h3 {
|
|
46
|
+
background-color: darkorange;
|
|
47
|
+
color: white;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
div.popover.slm-parse-ignore h3 {
|
|
51
|
+
background-color: darkgray;
|
|
52
|
+
color: white;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.popover-body pre {
|
|
56
|
+
white-space: pre-wrap; /* CSS3 */
|
|
57
|
+
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
|
58
|
+
white-space: -pre-wrap; /* Opera 4-6 */
|
|
59
|
+
white-space: -o-pre-wrap; /* Opera 7 */
|
|
60
|
+
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
</style>
|
|
65
|
+
{% endcompress css %}
|
|
66
|
+
|
|
67
|
+
{{findings | json_script:"slm-parse-findings"}}
|
|
68
|
+
|
|
69
|
+
{% compress js inline %}
|
|
70
|
+
<script type="text/javascript">
|
|
71
|
+
|
|
72
|
+
const findings = JSON.parse(
|
|
73
|
+
document.getElementById('slm-parse-findings').textContent
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
</script>
|
|
77
|
+
{% endcompress js %}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<li class="nav-item {% if url_name == 'home' %}active{% endif %}">
|
|
2
|
+
<a class="nav-link" href="{% url "slm:home" %}">Home</a>
|
|
3
|
+
</li>
|
|
4
|
+
{% if request.user.can_propose_site %}
|
|
5
|
+
<li class="nav-item {% if url_name == 'new_site' %}active{% endif %}">
|
|
6
|
+
<a class="nav-link" href="{% url 'slm:new_site' %}">New Site</a>
|
|
7
|
+
</li>
|
|
8
|
+
{% endif %}
|
|
9
|
+
<li class="nav-item {% if url_name == 'about' %}active{% endif %}">
|
|
10
|
+
<a class="nav-link" href="{% url 'slm:about' %}">About</a>
|
|
11
|
+
</li>
|
|
12
|
+
<li class="nav-item {% if url_name == 'help' %}active{% endif %}">
|
|
13
|
+
<a class="nav-link" href="{% url 'slm:help' %}">Help</a>
|
|
14
|
+
</li>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{% extends "slm/base.html" %}
|
|
2
|
+
{% load widget_tweaks i18n %}
|
|
3
|
+
|
|
4
|
+
{% block page_content %}
|
|
5
|
+
<div class="container mb-5">
|
|
6
|
+
<!-- Title -->
|
|
7
|
+
<div class="mt-5 mb-4 pb-3 border-bottom">
|
|
8
|
+
<h1>{% if log_user.name %}{{ log_user.name }}{% else %}{{ log_user.email }}{% endif %} {% translate "Activity Log" %}</h1>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="container form-group px-lg-5">
|
|
12
|
+
{% include 'slm/widgets/log_scroll.html' with log_user=log_user %}
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
{% endblock %}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{% load compress i18n %}
|
|
2
|
+
|
|
3
|
+
<div class="slm-scroll-container">
|
|
4
|
+
<div
|
|
5
|
+
id='slm-alert-scroll'
|
|
6
|
+
class="list-group overflow-auto vh-100 w-100 no-scrollbar"
|
|
7
|
+
data-slm-page=0
|
|
8
|
+
data-slm-page-size={{page_size|default:10}}
|
|
9
|
+
>
|
|
10
|
+
<div class="p-2 p-lg-5 d-flex justify-content-center" style="display: none">
|
|
11
|
+
<div class="slm-loader"></div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
{% compress js inline %}
|
|
17
|
+
<script>
|
|
18
|
+
const deleteAlert = function(alertId) {
|
|
19
|
+
this.event.stopPropagation();
|
|
20
|
+
$(document.body).css({'cursor' : 'wait'});
|
|
21
|
+
$.ajax({
|
|
22
|
+
url: slm.urls.reverse(
|
|
23
|
+
'slm_edit_api:alerts-detail',
|
|
24
|
+
{kwargs: {'pk': alertId}}
|
|
25
|
+
),
|
|
26
|
+
method: 'DELETE'
|
|
27
|
+
}).done(
|
|
28
|
+
function() {
|
|
29
|
+
$(document.body).css({'cursor' : 'initial'});
|
|
30
|
+
$(`#alert-${alertId}`).remove();
|
|
31
|
+
{% if site %}
|
|
32
|
+
$.ajax({
|
|
33
|
+
url: slm.urls.reverse(
|
|
34
|
+
'slm_edit_api:stations-detail',
|
|
35
|
+
{kwargs: {pk: {{ site.pk }} }}
|
|
36
|
+
)
|
|
37
|
+
}).done(function(data) {
|
|
38
|
+
slm.updateAlertBell(data);
|
|
39
|
+
});
|
|
40
|
+
{% endif %}
|
|
41
|
+
}
|
|
42
|
+
).fail(
|
|
43
|
+
function(jqXHR) {
|
|
44
|
+
$(document.body).css({'cursor' : 'initial'});
|
|
45
|
+
console.log(jqXHR);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
$(document).ready(function() {
|
|
51
|
+
let reinitialize = true;
|
|
52
|
+
const scrollDiv = $("#slm-alert-scroll");
|
|
53
|
+
const includeTargets = {% if exclude_targets %}false{% else %}true{% endif %};
|
|
54
|
+
|
|
55
|
+
function drawAlerts(position, data) {
|
|
56
|
+
if (reinitialize) {
|
|
57
|
+
scrollDiv.find('.slm-alert-item').remove();
|
|
58
|
+
scrollDiv.find('h3').remove();
|
|
59
|
+
}
|
|
60
|
+
reinitialize = false;
|
|
61
|
+
for (const alert of data) {
|
|
62
|
+
const level = slm.AlertLevel.get(alert.level);
|
|
63
|
+
const timestamp = new Date(alert.timestamp);
|
|
64
|
+
let siteUrl = null;
|
|
65
|
+
if (alert.site) {
|
|
66
|
+
siteUrl = slm.urls.reverse('slm:edit', {kwargs: {'station': alert.site}});
|
|
67
|
+
}
|
|
68
|
+
const deleteButton = function() {
|
|
69
|
+
if (alert.sticky) {
|
|
70
|
+
return '';
|
|
71
|
+
}
|
|
72
|
+
return `<div class="slm-alert-close" style="cursor: pointer" onclick="deleteAlert(${alert.id})" title='{% trans "Dismiss alert" %}'><i class="bi bi-trash3 text-danger"></i></div>`;
|
|
73
|
+
}
|
|
74
|
+
const targetButton = function() {
|
|
75
|
+
if (alert.target && includeTargets) {
|
|
76
|
+
return `<a class="btn btn-outline ${level.css}" tabindex= "0" href='${ alert.target.link }' type="button">${alert.target.name}</a>`;
|
|
77
|
+
}
|
|
78
|
+
return '';
|
|
79
|
+
}
|
|
80
|
+
const alertQuery = function() {
|
|
81
|
+
if (alert.target && alert.target.type === 'Agency') {
|
|
82
|
+
return `?agency=${alert.target.id}`;
|
|
83
|
+
}
|
|
84
|
+
return '';
|
|
85
|
+
}
|
|
86
|
+
$(`<div id="alert-${alert.id}" class="slm-alert-item ${level.css} d-flex gap-3 py-3 mt-1" aria-current="true" data-slm-alert=${alert.id}>` +
|
|
87
|
+
`<div class="d-flex gap-2 w-100 justify-content-between">` +
|
|
88
|
+
`<div>` +
|
|
89
|
+
`<h3 class="mb-2 slm-alert-header"><a href="${slm.urls.reverse('slm:alert', {kwargs: {alert: alert.id}})}${alertQuery()}">${alert.header}</a></h3>` +
|
|
90
|
+
`<div class="opacity-75 slm-alert-detail">${alert.detail}</div>` +
|
|
91
|
+
targetButton() +
|
|
92
|
+
`</div>` +
|
|
93
|
+
`</div>` +
|
|
94
|
+
`<div class="opacity-75 slm-alert-time">` +
|
|
95
|
+
`<small class="text-nowrap">${timestamp.toLocaleString()}</small>` +
|
|
96
|
+
`</div>` +
|
|
97
|
+
deleteButton() +
|
|
98
|
+
`</div>`
|
|
99
|
+
).insertBefore(position);
|
|
100
|
+
}
|
|
101
|
+
if (data.length === 0 && scrollDiv.data('slmPage') === 0 ) {
|
|
102
|
+
$(
|
|
103
|
+
`<h3 class="text-center text-secondary">{% trans 'No Alerts' %}</h3>`
|
|
104
|
+
).insertBefore(position);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const init = function() {
|
|
109
|
+
reinitialize = true;
|
|
110
|
+
slm.initInfiniteScroll(
|
|
111
|
+
scrollDiv,
|
|
112
|
+
scrollDiv,
|
|
113
|
+
$('#slm-alert-scroll .slm-loader'),
|
|
114
|
+
"slm_edit_api:alerts-list",
|
|
115
|
+
{},
|
|
116
|
+
{% if station %}{site: '{{ station|safe }}'}{% else %}{}{% endif %},
|
|
117
|
+
(position, data) => { drawAlerts(position, data); }
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
const stationsFiltered = function(queryParams) {
|
|
121
|
+
scrollDiv.data('slmPage', 0);
|
|
122
|
+
scrollDiv.data('slmQuery', queryParams);
|
|
123
|
+
init();
|
|
124
|
+
}
|
|
125
|
+
/* this is a little clunky - avoid double init when station
|
|
126
|
+
* filter is present on the page
|
|
127
|
+
*/
|
|
128
|
+
if ($('#filter-stations').length === 0) {
|
|
129
|
+
init();
|
|
130
|
+
} else {
|
|
131
|
+
slm.stationFilterCallbacks.push(stationsFiltered);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
</script>
|
|
135
|
+
{% endcompress %}
|