Commit 992acb7f authored by pm22d12's avatar pm22d12
Browse files

add tgz support

parent 13987315
......@@ -14,6 +14,7 @@ urlpatterns = [
url(r'^createdownload/(?P<download_id>\S+)$', views.create_and_edit_download, name='createdownload'),
url(r'^(?P<xml_filename>\S+)/(?P<download_id>\S+)/define_test_file$', views.define_test_file, name='define_test_file'),
url(r'^(?P<xml_filename>\S+)/(?P<download_id>\S+)/protocol_option$', views.define_test_file, name='define_test_file'),
url(r'^(?P<xml_filename>\S+)/(?P<download_id>\S+)/save_test_file$', views.save_test_file, name='save_test_file'),
url(r'^(?P<download_id>\S+)/testlog$', views.display_test_log, name='testlog'),
url(r'^(?P<download_id>\S+)/synchrolog$', views.display_synchro_log, name='synchrolog'),
......
......@@ -359,6 +359,14 @@ def save_data_source(file_data, submitted_data):
if parent_loc.find("password") is None:
dummy = etree.SubElement(parent_loc, "password")
parent_loc.password = submitted_data['passwd_remote']
if not submitted_data['protocol_option']:
if parent_loc.find("protocol_option") is not None:
parent_loc.remove(parent_loc.protocol_option)
elif parent_loc.protocol == "Https":
if parent_loc.find("protocol_option") is None:
dummy = etree.SubElement(parent_loc, "protocol_option")
parent_loc.protocol_option = submitted_data['protocol_option']
else:
if parent_loc.find("login") is not None:
parent_loc.remove(parent_loc.login)
......
......@@ -543,6 +543,7 @@ def help(request):
map_help["user_remote"] = _('user_remote.help')
map_help["passwd_remote"] = _('passwd_remote.help')
map_help["repos_remote"] = _('repos_remote.help')
map_help["protocol_option"] = _('protocol_option.help')
# date extraction
map_help["data_reader"] = _('data_reader.help')
map_help["regexp_date"] = _('regexp_date.help')
......
......@@ -51,6 +51,9 @@ msgstr "password (default anonymous)"
msgid "repos_remote.help"
msgstr "Base repository data path to crawl"
msgid "protocol_option.help"
msgstr "additional options for https protocol (FileExtractor, Redirector...)"
#: ====== tab Date extraction
#: ==========
......
......@@ -13,10 +13,12 @@
<xs:simpleType name="compressionTypeEnum">
<xs:restriction base="xs:string">
<xs:enumeration value='zip'/>
<xs:enumeration value='gz'/>
<xs:enumeration value='bz2'/>
<xs:enumeration value='Z'/>
<xs:enumeration value='tgz'/>
<xs:enumeration value='none'/>
</xs:restriction>
</xs:simpleType>
......@@ -118,6 +120,7 @@
<xs:complexType name="SourceLocation">
<xs:all>
<xs:element name="protocol" type="remoteTypeEnum" minOccurs="1" maxOccurs="1"/>
<xs:element name="protocol_option" minOccurs="0" maxOccurs="1"/>
<xs:element name="rootpath" type="non-empty-string" minOccurs="1" maxOccurs="1"/>
<xs:element name="server" minOccurs="0" maxOccurs="1"/>
<xs:element name="login" minOccurs="0" maxOccurs="1"/>
......
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