providing some totals via the code, and fudging numbers to show how many keep/del due to auto rules, and how many manual choices left
This commit is contained in:
@@ -67,6 +67,7 @@
|
|||||||
{% set page=namespace(cnt=0) %}
|
{% set page=namespace(cnt=0) %}
|
||||||
{% set pref=namespace(have="") %}
|
{% set pref=namespace(have="") %}
|
||||||
{% set count=namespace( del=0, keep=0 ) %}
|
{% set count=namespace( del=0, keep=0 ) %}
|
||||||
|
{% set all_count=namespace( d_files=0, k_files=0, sets=0 ) %}
|
||||||
{# for each hash in ip_to_sp_dups_*, auto keep the _keep, auto delete the _del, only need hidden input #}
|
{# for each hash in ip_to_sp_dups_*, auto keep the _keep, auto delete the _del, only need hidden input #}
|
||||||
{% for h in DD.ip_to_sp_dups_keep %}
|
{% for h in DD.ip_to_sp_dups_keep %}
|
||||||
<input type="hidden" name="kfhash-{{outer_loop}}" value="{{h}}">
|
<input type="hidden" name="kfhash-{{outer_loop}}" value="{{h}}">
|
||||||
@@ -75,6 +76,9 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if count.keep %}
|
{% if count.keep %}
|
||||||
{% set auto.str = auto.str + "<li>Keeping {} files in storage path and deleting {} from import path</li>".format(count.keep, count.del) %}
|
{% set auto.str = auto.str + "<li>Keeping {} files in storage path and deleting {} from import path</li>".format(count.keep, count.del) %}
|
||||||
|
{% set all_count.sets = all_count.sets + count.keep %}
|
||||||
|
{% set all_count.k_files = all_count.k_files + count.keep %}
|
||||||
|
{% set all_count.d_files = all_count.d_files + count.del %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h5 class="col-lg-12">Choose between these files:</h5>
|
<h5 class="col-lg-12">Choose between these files:</h5>
|
||||||
{% set count=namespace( del=0, keep=0 ) %}
|
{% set count=namespace( del=0, keep=0 ) %}
|
||||||
@@ -125,6 +129,9 @@
|
|||||||
|
|
||||||
{% if count.keep %}
|
{% if count.keep %}
|
||||||
{% set auto.str = auto.str + "<li>Keeping {} files inside storage path, Deleting {} duplicates files from storage path</li>".format(count.keep, count.del) %}
|
{% set auto.str = auto.str + "<li>Keeping {} files inside storage path, Deleting {} duplicates files from storage path</li>".format(count.keep, count.del) %}
|
||||||
|
{% set all_count.sets = all_count.sets + count.keep %}
|
||||||
|
{% set all_count.k_files = all_count.k_files + count.keep %}
|
||||||
|
{% set all_count.d_files = all_count.d_files + count.del %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set count=namespace( keep_d=0, keep_f=0 ) %}
|
{% set count=namespace( keep_d=0, keep_f=0 ) %}
|
||||||
@@ -169,6 +176,9 @@
|
|||||||
{% if count.keep_d %}
|
{% if count.keep_d %}
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% set auto.str = auto.str + "<li>Keeping {} files in {} paths, Deleting={} file in {} paths</li>".format( count.keep_f, count.keep_d, count.keep_f, count.keep_d) %}
|
{% set auto.str = auto.str + "<li>Keeping {} files in {} paths, Deleting={} file in {} paths</li>".format( count.keep_f, count.keep_d, count.keep_f, count.keep_d) %}
|
||||||
|
{% set all_count.sets = all_count.sets + count.keep_d %}
|
||||||
|
{% set all_count.k_files = all_count.k_files + count.keep_f %}
|
||||||
|
{% set all_count.d_files = all_count.d_files + count.keep_f %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if auto.str|length %}
|
{% if auto.str|length %}
|
||||||
@@ -176,6 +186,8 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{{auto.str|safe}}
|
{{auto.str|safe}}
|
||||||
</ul>
|
</ul>
|
||||||
|
Automatically Keeping {{all_count.k_files}} files and deleting {{all_count.d_files}} files<br>
|
||||||
|
Leaving {{DD.overall_dup_sets-all_count.sets}} manual choices to make (to delete a further {{DD.overall_dup_cnt-all_count.d_files}} files)
|
||||||
</alert>
|
</alert>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="col-lg-12"></div>
|
<div class="col-lg-12"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user