mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-24 04:41:01 +00:00
New code for import routine, part 3
This commit is contained in:
@@ -1085,10 +1085,6 @@ return [
|
||||
// import status page:
|
||||
'import_status_bread_crumb' => 'Import status',
|
||||
'import_status_sub_title' => 'Import status',
|
||||
'import_status_wait_title' => 'Please hold...',
|
||||
'import_status_wait_text' => 'This box will disappear in a moment.',
|
||||
'import_status_ready_title' => 'Import is ready to start',
|
||||
'import_status_ready_text' => 'The import is ready to start. All the configuration you needed to do has been done. Please download the configuration file. It will help you with the import should it not go as planned. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.',
|
||||
'import_status_ready_config' => 'Download configuration',
|
||||
'import_status_ready_start' => 'Start the import',
|
||||
'import_status_ready_share' => 'Please consider downloading your configuration and sharing it at the <strong><a href="https://github.com/firefly-iii/import-configurations/wiki">import configuration center</a></strong>. This will allow other users of Firefly III to import their files more easily.',
|
||||
@@ -1097,9 +1093,6 @@ return [
|
||||
'import_status_errors_title' => 'Errors during the import',
|
||||
'import_status_errors_single' => 'An error has occured during the import. It does not appear to be fatal.',
|
||||
'import_status_errors_multi' => 'Some errors occured during the import. These do not appear to be fatal.',
|
||||
'import_status_fatal_title' => 'A fatal error occurred',
|
||||
'import_status_fatal_text' => 'A fatal error occurred, which the import-routine cannot recover from. Please see the explanation in red below.',
|
||||
'import_status_fatal_more' => 'If the error is a time-out, the import will have stopped half-way. For some server configurations, it is merely the server that stopped while the import keeps running in the background. To verify this, check out the log files. If the problem persists, consider importing over the command line instead.',
|
||||
'import_status_finished_title' => 'Import routine finished',
|
||||
'import_status_finished_text' => 'The import routine has imported your file.',
|
||||
'import_status_finished_job' => 'The transactions imported can be found in tag <a href=":link" class="label label-success" style="font-size:100%;font-weight:normal;">:tag</a>.',
|
||||
|
||||
@@ -17,6 +17,15 @@ return [
|
||||
//
|
||||
// // import configuration routine:
|
||||
|
||||
// status of import:
|
||||
'status_wait_title' => 'Please hold...',
|
||||
'status_wait_text' => 'This box will disappear in a moment.',
|
||||
'status_fatal_title' => 'A fatal error occurred',
|
||||
'status_fatal_text' => 'A fatal error occurred, which the import-routine cannot recover from. Please see the explanation in red below.',
|
||||
'status_fatal_more' => 'If the error is a time-out, the import will have stopped half-way. For some server configurations, it is merely the server that stopped while the import keeps running in the background. To verify this, check out the log files. If the problem persists, consider importing over the command line instead.',
|
||||
'status_ready_title' => 'Import is ready to start',
|
||||
'status_ready_text' => 'The import is ready to start. All the configuration you needed to do has been done. Please download the configuration file. It will help you with the import should it not go as planned. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.',
|
||||
'status_ready_noconfig_text' => 'The import is ready to start. All the configuration you needed to do has been done. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.',
|
||||
|
||||
// file: upload something:
|
||||
'file_upload_title' => 'Import setup (1/4) - Upload your file',
|
||||
@@ -61,12 +70,12 @@ return [
|
||||
'csv_roles_warning' => 'At the very least, mark one column as the amount-column. It is advisable to also select a column for the description, date and the opposing account.',
|
||||
|
||||
|
||||
// map data
|
||||
// file: map data
|
||||
'file_map_title' => 'Import setup (4/4) - Connect import data to Firefly III data',
|
||||
'file_map_text' => 'In the following tables, the left value shows you information found in your uploaded file. It is your task to map this value, if possible, to a value already present in your database. Firefly will stick to this mapping. If there is no value to map to, or you do not wish to map the specific value, select nothing.',
|
||||
'file_map_field_value' => 'Field value',
|
||||
'file_map_field_mapped_to' => 'Mapped to',
|
||||
'map_do_not_map' => '(do not map)',
|
||||
'map_do_not_map' => '(do not map)',
|
||||
'file_map_submit' => 'Start the import',
|
||||
|
||||
// map things.
|
||||
|
||||
158
resources/views/import/status.twig
Normal file
158
resources/views/import/status.twig
Normal file
@@ -0,0 +1,158 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.renderIfExists }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{# Initial display. Will refresh (and disappear almost immediately. #}
|
||||
<div class="row status_initial statusbox">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('import.status_wait_title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ trans('import.status_wait_text') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Fatal error display. Will be shown (duh) when something goes horribly wrong. #}
|
||||
<div class="row fatal_error" style="display:none;">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('import.status_fatal_title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ trans('import.status_fatal_text') }}
|
||||
</p>
|
||||
<p class="text-danger fatal_error_txt">
|
||||
|
||||
</p>
|
||||
<p>
|
||||
{{ trans('import.status_fatal_more') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Box for when the job is ready to start #}
|
||||
<div class="row status_configured statusbox" style="display:none;">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('import.status_ready_title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{% if job.configuration['has-config-file'] == false %}
|
||||
{{ trans('import.status_ready_noconfig_text') }}
|
||||
{% else %}
|
||||
{{ trans('import.status_ready_text') }}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
<code>php artisan firefly:start-import {{ job.key }}</code>
|
||||
</p>
|
||||
<div class="row">
|
||||
{% if job.configuration['has-config-file'] != false %}
|
||||
<div class="col-lg-4">
|
||||
<a href="{{ route('import.download', [job.key]) }}" class="btn btn-default"><i
|
||||
class="fa fa-fw fa-download"></i> {{ 'import_status_ready_config'|_ }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-lg-4">
|
||||
<button class="btn btn-success start-job"><i class="fa fa-fw fa-gears"></i> {{ 'import_status_ready_start'|_ }}</button>
|
||||
</div>
|
||||
</div>
|
||||
{% if job.configuration['has-config-file'] != false %}
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<p class="text-info">
|
||||
{{ 'import_status_ready_share'|_ }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Box for when the job is running! #}
|
||||
<div class="row status_running statusbox" style="display: none;">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" id="import-status-title">{{ 'import_status_running_title'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div id="import-status-holder">
|
||||
<div class="progress" id="import-status-holder">
|
||||
<div id="import-status-bar" class="progress-bar progress-bar-info active progress-bar-striped" role="progressbar"
|
||||
aria-valuenow="100" aria-valuemin="0"
|
||||
aria-valuemax="100" style="width: 100%;min-width:40px;">
|
||||
</div>
|
||||
</div>
|
||||
<p id="import-status-txt">{{ 'import_status_running_placeholder'|_ }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# displays the finished status of the import #}
|
||||
<div class="row status_finished statusbox" style="display:none;">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'import_status_finished_title'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p id="import-status-intro">
|
||||
{{ 'import_status_finished_text'|_ }}
|
||||
</p>
|
||||
<p id="import-status-more-info"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# box to show error information. #}
|
||||
<div class="row info_errors" style="display:none;">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'import_status_errors_title'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p id="import-status-error-intro">
|
||||
</p>
|
||||
<div id="import-status-error-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
|
||||
// some useful translations.
|
||||
var langImportSingleError = '{{ trans('firefly.import_status_errors_single')|escape('js') }}';
|
||||
var langImportMultiError = '{{ trans('firefly.import_status_errors_multi')|escape('js') }}';
|
||||
var jobStatusUri = '{{ route('import.status.json', [job.key]) }}';
|
||||
var jobStartUri = '{{ route('import.start', [job.key]) }}';
|
||||
var token = '{{ csrf_token() }}';
|
||||
var job = {{ job|json_encode|raw }};
|
||||
</script>
|
||||
<script type="text/javascript" src="js/ff/import/status.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user