forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Date format when importing international timestamps (apache#25113)
- Loading branch information
1 parent
e642361
commit 00550d7
Showing
3 changed files
with
120 additions
and
115 deletions.
There are no files selected for viewing
229 changes: 114 additions & 115 deletions
229
superset/templates/superset/form_view/csv_to_database_view/edit.html
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,142 +1,141 @@ | ||
{# | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
#} | ||
{% extends "appbuilder/base.html" %} | ||
{% import 'appbuilder/general/lib.html' as lib %} | ||
{% import "superset/macros.html" as macros %} | ||
{% set begin_sep_label = '<td class="col-sm-2" style="border-left: 0; border-top: 0;">' %} | ||
{% set end_sep_label = '</td>' %} | ||
{% set begin_sep_field = '<td style="border-right: 0; border-top: 0;">' %} | ||
{% set end_sep_field = '</td>' %} | ||
{% import 'superset/form_view/database_schemas_selector.html' as schemas_selector %} | ||
{% import 'superset/form_view/csv_scripts.html' as csv_scripts %} | ||
{% import 'superset/form_view/csv_macros.html' as csv_macros %} | ||
{% block content %} | ||
{{ lib.panel_begin(title, "edit") }} | ||
{# Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with this work | ||
for additional information regarding copyright ownership. The ASF licenses this | ||
file to you under the Apache License, Version 2.0 (the "License"); you may not | ||
use this file except in compliance with the License. You may obtain a copy of | ||
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by | ||
applicable law or agreed to in writing, software distributed under the License | ||
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. #} {% extends | ||
"appbuilder/base.html" %} {% import 'appbuilder/general/lib.html' as lib %} {% | ||
import "superset/macros.html" as macros %} {% set begin_sep_label = ' | ||
<td class="col-sm-2" style="border-left: 0; border-top: 0"> | ||
' %} {% set end_sep_label = ' | ||
</td> | ||
' %} {% set begin_sep_field = ' | ||
<td style="border-right: 0; border-top: 0">' %} {% set end_sep_field = '</td> | ||
' %} {% import 'superset/form_view/database_schemas_selector.html' as | ||
schemas_selector %} {% import 'superset/form_view/csv_scripts.html' as | ||
csv_scripts %} {% import 'superset/form_view/csv_macros.html' as csv_macros %} | ||
{% block content %} {{ lib.panel_begin(title, "edit") }} | ||
<div id="Home" class="tab-pane active"> | ||
<form id="model_form" action="" method="post" enctype="multipart/form-data"> | ||
{{form.hidden_tag()}} | ||
<div class="form-group"> | ||
<div class="col-md-12" style="padding: 0;"> | ||
<div class="col-md-12" style="padding: 0"> | ||
<table class="table table-bordered"> | ||
<tbody> | ||
<tr> | ||
{{ lib.render_field(form.csv_file, begin_sep_label, end_sep_label, begin_sep_field, end_sep_field) }} | ||
{{ lib.render_field(form.csv_file, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.table_name, begin_sep_label, end_sep_label, begin_sep_field, end_sep_field) }} | ||
{{ lib.render_field(form.table_name, begin_sep_label, | ||
end_sep_label, begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.database, begin_sep_label, end_sep_label, begin_sep_field, end_sep_field) }} | ||
{{ lib.render_field(form.database, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.schema, begin_sep_label, end_sep_label, begin_sep_field, end_sep_field) }} | ||
{{ lib.render_field(form.schema, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ csv_macros.render_delimiter_field(form.delimiter, begin_sep_label, end_sep_label, begin_sep_field, end_sep_field) }} | ||
{{ csv_macros.render_delimiter_field(form.delimiter, | ||
begin_sep_label, end_sep_label, begin_sep_field, end_sep_field) }} | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
{% call csv_macros.render_collapsable_form_group("accordion1", "File Settings") %} | ||
<tr> | ||
{{ lib.render_field(form.if_exists, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.skip_initial_space, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.skip_blank_lines, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.parse_dates, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.infer_datetime_format, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.decimal, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.null_values, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
{% endcall %} | ||
{% call csv_macros.render_collapsable_form_group("accordion2", "Columns") %} | ||
<tr> | ||
{{ lib.render_field(form.index_col, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.dataframe_index, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.index_label, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.use_cols, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.overwrite_duplicate, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.dtype, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
{% endcall %} | ||
{% call csv_macros.render_collapsable_form_group("accordion3", "Rows") %} | ||
<tr> | ||
{{ lib.render_field(form.header, begin_sep_label, end_sep_label, begin_sep_field, end_sep_field) | ||
}} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.nrows, begin_sep_label, end_sep_label, begin_sep_field, end_sep_field) | ||
}} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.skiprows, begin_sep_label, end_sep_label, begin_sep_field, | ||
end_sep_field) }} | ||
</tr> | ||
{% call csv_macros.render_collapsable_form_group("accordion1", "File | ||
Settings") %} | ||
<tr> | ||
{{ lib.render_field(form.if_exists, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.skip_initial_space, begin_sep_label, | ||
end_sep_label, begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.skip_blank_lines, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.parse_dates, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.infer_datetime_format, begin_sep_label, | ||
end_sep_label, begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.day_first, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.decimal, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.null_values, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
{% endcall %} {% call csv_macros.render_collapsable_form_group("accordion2", | ||
"Columns") %} | ||
<tr> | ||
{{ lib.render_field(form.index_col, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.dataframe_index, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.index_label, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.use_cols, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.overwrite_duplicate, begin_sep_label, | ||
end_sep_label, begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.dtype, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
{% endcall %} {% call csv_macros.render_collapsable_form_group("accordion3", | ||
"Rows") %} | ||
<tr> | ||
{{ lib.render_field(form.header, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.nrows, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
<tr> | ||
{{ lib.render_field(form.skiprows, begin_sep_label, end_sep_label, | ||
begin_sep_field, end_sep_field) }} | ||
</tr> | ||
{% endcall %} | ||
<div class="form-group"> | ||
<div class="col-xs-12" style="padding: 0;"> | ||
<div class="col-xs-12" style="padding: 0"> | ||
{{ lib.render_form_controls() }} | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} | ||
{% block add_tail_js %} | ||
<script src="{{url_for('appbuilder.static',filename='js/ab_keep_tab.js')}}" nonce="{{ macros.get_nonce() }}"></script> | ||
{% endblock %} | ||
{% block tail_js %} | ||
{{ super() }} | ||
{{ schemas_selector }} | ||
{{ csv_scripts }} | ||
{% endblock %} | ||
{% endblock %} {% block add_tail_js %} | ||
<script | ||
src="{{url_for('appbuilder.static',filename='js/ab_keep_tab.js')}}" | ||
nonce="{{ macros.get_nonce() }}" | ||
></script> | ||
{% endblock %} {% block tail_js %} {{ super() }} {{ schemas_selector }} {{ | ||
csv_scripts }} {% endblock %} |
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