Commit d3d7d7a9 authored by delanoe's avatar delanoe

[FIX] Progression bar at startup non empty + user can not see corpus if workflow is not over yet.

parent 9212848b
......@@ -61,7 +61,11 @@ def parse_extract_indexhyperdata(corpus):
# apply actions
print('CORPUS #%d' % (corpus.id))
corpus.status('Docs', progress=1)
corpus.save_hyperdata()
parse(corpus)
docs = corpus.children("DOCUMENT").count()
print('CORPUS #%d: parsed %d' % (corpus.id, docs))
extract_ngrams(corpus)
......
......@@ -95,7 +95,6 @@ def parse(corpus):
try:
print("PARSING")
# print("DETECT_LANG?", DETECT_LANG)
corpus.status('Docs', progress=0)
#1 corpus => 1 or multi resources.path (for crawlers)
resources = corpus.resources()
if len(resources) == 0:
......
......@@ -110,17 +110,17 @@
</a>
</div>
<div class="col-md-3 content">
<a href="/projects/{{project.id}}/corpora/{{corpus.id}}"
title="View the corpus">
<button type="button" class="btn btn-default" aria-label="Left Align">
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
</button>
</a>
<!-- -->
{% for state in corpus.hyperdata.statuses %}
{% ifequal state.action "Workflow" %}
{% if state.complete %}
<a href="/projects/{{project.id}}/corpora/{{corpus.id}}" title="View the corpus">
<button type="button" class="btn btn-default" aria-label="Left Align">
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
</button>
</a>
<button type="button" class="btn btn-default yopla" data-container="body" data-toggle="popover" data-placement="bottom" data-trigger="focus"
data-content="
<ul>
......@@ -168,8 +168,17 @@
{{ state.error }}
{% else %}
<div class="progress">
<div class=" progress-bar progress-bar-striped
progress-bar-success
"
role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
<span>
Upload
</span>
</div>
{% for state in corpus.hyperdata.statuses %}
{% if state.action != "Workflow" %}
<!-- {% if state.action != "Workflow" %} --!>
<div class=" progress-bar progress-bar-striped
{% if state.complete %}
progress-bar-success
......@@ -177,7 +186,7 @@
active
{% endif %}
"
role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 25%">
role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
<span>
{{ state.action }}
{% if state.complete %}
......@@ -188,7 +197,7 @@
</span>
</div>
{% endif %}
<!-- {% endif %} --!>
{% endfor %}
</div>
{% endif %}
......
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