Skip to content

Commit

Permalink
updating labels with "sense"
Browse files Browse the repository at this point in the history
  • Loading branch information
Patent2net committed Jan 11, 2021
1 parent 41dd200 commit 0d45620
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 42 deletions.
42 changes: 3 additions & 39 deletions Patent2Net/templates/Request_Form/Progress2.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,44 +50,8 @@
{
$(qi).css('width', sent_data[i]+'%').attr('aria-valuenow', sent_data[i]);
}
switch(parseInt (i)) {
// ['p2n_req','p2n_gather_biblio', "p2n_filtering", 'p2n_family','p2n_content','p2n_image','p2n_network','p2n_tables','p2n_carrot','p2n_iramuteq','p2n_cluster', ]

case 0:
lqi = "Gathering patent list"
break;
case 1:
lqi = "Gathering bibliographic metadata"
break;
case 2:
lqi = "Filtering patents"
break;
case 3:
lqi = "Gathering families"
break;
case 4:
lqi = "Gathering content"
break;
case 5:
lqi = "Gathering images"
break;
case 6:
lqi = "Processing networks"
break;
case 7:
lqi = "Processing tables"
break;
case 8:
lqi = "Preparing carrot2 files"
break;
case 9:
lqi = "Processing IRAMuTeQ files"
break;
case 10:
lqi = "Clustering"
break;
}
//lqi = qi+"_label"

lqi = qi+"_label"
$(lqi).text(sent_data[i]+'%');
if (somme < 999)
done = false
Expand Down Expand Up @@ -161,7 +125,7 @@ <h4 class="mb-2"> Gathering and processing steps as expected</h4>


<div id="info_{{bar}}" class="right" style="width: 53%; margin: 5px; overflow-y:scroll; height:50px;" >
Hello {{lqi}}
Hello {{label [bar]}}
<br/>
</div>

Expand Down
22 changes: 19 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,29 @@ def form():
#Single Request form confirmation route
@app.route('/confirmation', methods=['GET'])
def confirmation():
print (request.url)
# print (request.url)
form_result = request.args#dict(parse.parse_qsl(parse.urlsplit(request).query))

# ['p2n_req','p2n_gather_biblio', "p2n_filtering", 'p2n_family','p2n_content','p2n_image','p2n_network','p2n_tables','p2n_carrot','p2n_iramuteq','p2n_cluster', ]

labels = { 'p2n_req' : "Gathering patent list",
'p2n_gather_biblio' : "Gathering bibliographic metadata",
"p2n_filtering" : "Filtering patents",
'p2n_family' : "Gathering families",
'p2n_content' : "Gathering content",
'p2n_image' : "Gathering images",
'p2n_network' : "Processing networks",
'p2n_tables' : "Processing tables",
'p2n_carrot' : "Preparing carrot2 files",
'p2n_iramuteq' : "Processing IRAMuTeQ files",
'p2n_cluster' : "Clustering"
}


AppLab = [labels [lab] for lab in lstAppl if form_result [lab] and lab not in ['p2n_dir']]



AppLab = [lab for lab in lstAppl if form_result [lab] and lab not in ['p2n_dir']]

app_cfg.num_bars = len(AppLab) - len([truc for truc in AppLab if not form_result [truc]] )
return render_template('Patent2Net/templates/Request_Form/Progress2.html', num_bars = app_cfg.num_bars, label = AppLab)

Expand Down

0 comments on commit 0d45620

Please sign in to comment.