-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement auto ingesting from NetCDF format
- Loading branch information
1 parent
1eaa2e0
commit 25f134f
Showing
12 changed files
with
175 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
watchmedo shell-command --patterns="*.tif" --ignore-directories --recursive \ | ||
watchmedo shell-command --patterns="*.nc;*.tif" --ignore-directories --recursive \ | ||
--command='python manage.py ingest_geomanager_raster "${watch_event_type}" "${watch_src_path}" --dst "${watch_dest_path}" --overwrite' \ | ||
/path/to/direcory/to/watch |
18 changes: 18 additions & 0 deletions
18
geomanager/migrations/0032_rasterfilelayer_auto_ingest_nc_data_variable.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.1.10 on 2023-11-14 10:38 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('geomanager', '0031_remove_geomanagersettings_cap_auto_refresh_interval_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='rasterfilelayer', | ||
name='auto_ingest_nc_data_variable', | ||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='Data variable for netCDF data auto ingest'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
geomanager/static/geomanager/js/raster-file-conditional.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
$(document).ready(function () { | ||
const $autoIngestCheck = $('#id_auto_ingest_from_directory') | ||
const $panelDataVariable = $('#panel-auto_ingest_nc_data_variable-section') | ||
|
||
if ($autoIngestCheck.is(':checked')) { | ||
$panelDataVariable.show() | ||
} else { | ||
$panelDataVariable.hide() | ||
} | ||
|
||
|
||
$autoIngestCheck.change(function () { | ||
if ($(this).is(':checked')) { | ||
$panelDataVariable.show() | ||
} else { | ||
$panelDataVariable.hide() | ||
} | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.