Commit 87f4e9fb authored by pm22d12's avatar pm22d12
Browse files

Add-in for the Grib plugin

parent 57626244
......@@ -471,17 +471,14 @@ def save_data_source(file_data, submitted_data):
parent_de.attrib['plugin'] = submitted_data['data_reader']
if submitted_data['data_reader'] != "GribDataReader":
if submitted_data['data_reader'] != "NetCDFDataReader":
file_data.data_source.date_extraction.regexp = submitted_data['regexp_date']
file_data.data_source.date_extraction.format = submitted_data['date_format']
parent_de.regexp = submitted_data['regexp_date']
parent_de.format = submitted_data['date_format']
else:
file_data.data_source.date_extraction.regexp = submitted_data['regexp_date2']
file_data.data_source.date_extraction.format = submitted_data['date_format2']
parent_de.regexp = submitted_data['regexp_date2']
parent_de.format = submitted_data['date_format2']
else:
if parent_de.find("regexp") is not None:
parent_de.remove(regexp)
if parent_de.find("format") is not None:
parent_de.remove(format)
pass
parent_de.regexp = ""
parent_de.format = ""
# selection
if file_data.data_source.find("selection") is None:
......
......@@ -1271,14 +1271,15 @@
var repos_remote = false;
var repos_local = false;
var date_regexp = false;
var tree_date_format = false;
var number = getLocalTypeValue();
var tree_date_format = false;
var number = getLocalTypeValue();
var reader = getDataReaderValue();
server_remote = getServerRemote();
repos_remote = getReposRemote();
repos_local = getReposLocal();
date_regexp = getDateRegexp();
tree_date_format = getTreeDateFormat();
tree_date_format = getTreeDateFormat();
if (isTypeRemoteFtpChecked()) {
if (!server_remote) {
......@@ -1294,14 +1295,16 @@
valid = false;
}
if (!date_regexp) {
valid = false;
}
if (!date_regexp) {
if (!(reader == _GRIB_DATA_READER_)) {
valid = false;
}
}
if (!tree_date_format) {
if (!(number == _SPOOL_)) {
valid = false;
}
if (!tree_date_format) {
if (!(number == _SPOOL_)) {
valid = false;
}
}
return valid;
......@@ -1323,10 +1326,11 @@
var repos_remote = false;
var repos_local = false;
var date_regexp = false;
var tree_date_format = false;
var tree_date_format = false;
var loop_delay = getLoopDelayValue();
var listing_delay = getListingDelayValue();
var number = getLocalTypeValue();
var reader = getDataReaderValue();
repos_remote = getReposRemote();
repos_local = getReposLocal();
......@@ -1348,13 +1352,15 @@
}
if (!date_regexp) {
valid = false;
if (!(reader == _GRIB_DATA_READER_)) {
valid = false;
}
}
if (!tree_date_format) {
if (!(number == _SPOOL_)) {
valid = false;
}
if (!tree_date_format) {
if (!(number == _SPOOL_)) {
valid = false;
}
}
if (loop_delay > listing_delay) {
......@@ -1382,6 +1388,7 @@
var date_regexp = false;
var tree_date_format = false;
var number = getLocalTypeValue();
var reader = getDataReaderValue();
server_remote = getServerRemote();
repos_remote = getReposRemote();
......@@ -1404,14 +1411,15 @@
}
if (!date_regexp) {
missingValue = addMissingValue(missingValue,
DATE_REGEXP_LABEL);
if (!(reader == _GRIB_DATA_READER_)) {
missingValue = addMissingValue(missingValue,DATE_REGEXP_LABEL);
}
}
if (!tree_date_format) {
if (!tree_date_format) {
if (!(number == _SPOOL_)) {
missingValue = addMissingValue(missingValue, TREE_DATE_FORMAT_LABEL);
}
missingValue = addMissingValue(missingValue, TREE_DATE_FORMAT_LABEL);
}
}
alertMissedMandatoryValue(missingValue);
......@@ -1464,6 +1472,10 @@
return $('input[name=type_remote]:checked').val();
}
function getDataReaderValue() {
return $('input[name=data_reader]:checked').val();
}
function submitEditForm() {
$("#wizard").submit();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment