Commit ca2e9b39 authored by Romain Loth's avatar Romain Loth

Merge remote-tracking branch 'origin/unstable' into romain

parents ba026add e1ab38b1
......@@ -73,11 +73,14 @@ def test_page(request , project_id , corpus_id):
corpus = cache.Node[int(corpus_id)]
type_doc_id = cache.NodeType['Document'].id
number = session.query(func.count(Node.id)).filter(Node.parent_id==corpus_id, Node.type_id==type_doc_id).all()[0][0]
the_query = """ SELECT hyperdata FROM node_node WHERE id=%d """ % ( int(corpus_id) )
cursor = connection.cursor()
try:
processing = corpus.hyperdata['Processing']
except Exception as error:
print(error)
processing = 0
cursor.execute(the_query)
processing = cursor.fetchone()[0]["Processing"]
except:
processing = "Error"
html = t.render(Context({
'debug': settings.DEBUG,
......@@ -115,11 +118,13 @@ def get_ngrams(request , project_id , corpus_id ):
list_id = listIds(user_id=request.user.id, corpus_id=int(corpus_id), typeList=list_type)
lists["%s" % list_id[0][0]] = list_type
the_query = """ SELECT hyperdata FROM node_node WHERE id=%d """ % ( int(corpus_id) )
cursor = connection.cursor()
try:
processing = corpus.hyperdata['Processing']
except Exception as error:
print(error)
processing = 0
cursor.execute(the_query)
processing = cursor.fetchone()[0]["Processing"]
except:
processing = "Error"
html = t.render(Context({
'debug': settings.DEBUG,
......@@ -183,11 +188,13 @@ def get_journals(request , project_id , corpus_id ):
type_doc_id = cache.NodeType['Document'].id
number = session.query(func.count(Node.id)).filter(Node.parent_id==corpus_id, Node.type_id==type_doc_id).all()[0][0]
the_query = """ SELECT hyperdata FROM node_node WHERE id=%d """ % ( int(corpus_id) )
cursor = connection.cursor()
try:
processing = corpus.hyperdata['Processing']
except Exception as error:
print(error)
processing = 0
cursor.execute(the_query)
processing = cursor.fetchone()[0]["Processing"]
except:
processing = "Error"
html = t.render(Context({
'debug': settings.DEBUG,
......
#!/bin/bash
FILE=$(date +%Y%m%d-%H:%M:%S.log)
FILE="/var/log/gargantext/celery/$(date +%Y%m%d-%H:%M:%S).log"
source /srv/gargantext_env/bin/activate
touch /var/log/gargantext/celery/$FILE && ./manage.py celery worker --loglevel=info >> $FILE
./manage.py celery worker -f $FILE
#!/bin/bash
FILE=$(date +%Y%m%d-%H:%M:%S.log)
touch /var/log/gargantext/uwsgi/$FILE && uwsgi gargantext.ini >> $FILE
FILE="/var/log/gargantext/uwsgi/$(date +%Y%m%d-%H:%M:%S).log"
#touch /var/log/gargantext/uwsgi/$FILE && sudo
uwsgi gargantext.ini --logto $FILE
......@@ -519,12 +519,13 @@ function SearchFilters( elem ) {
$("#corpusdisplayer").hide()
// FIRST portion of code to be EXECUTED:
// (3) Get records and hyperdata for paginator
$.ajax({
url: '/tests/paginator/corpus/'+url_mainIDs["corpus"],
success: function(data){
$("#content_loader").remove()
for(var i in data.records) {
var orig_id = parseInt(data.records[i].id)
var arr_id = parseInt(i)
......@@ -536,6 +537,11 @@ $.ajax({
AjaxRecords = data.records; // backup-ing in global variable!
var result = Main_test(data.records , "filter_all")
$("#corpusdisplayer").show()
$("#content_loader").remove()
$("#corpusdisplayer").click()
console.log( result )
},
});
......
......@@ -495,6 +495,11 @@ function Main_test( data , initial) {
return "OK"
}
$("#corpusdisplayer").hide()
console.log(window.location.href+"/journals.json")
$.ajax({
url: window.location.href+"/journals.json",
......@@ -502,12 +507,14 @@ $.ajax({
console.log(data)
$("#content_loader").remove()
// // Initializing the Charts and Table
var result = Main_test( data , "FirstScore" )
console.log( result )
$("#corpusdisplayer").show()
$("#content_loader").remove()
$("#corpusdisplayer").click()
}
});
\ No newline at end of file
This diff is collapsed.
......@@ -56,10 +56,9 @@ th a {
<center>
Blue bars: all, Green line for zooming : select a time range to zoom in
<p align="center">
<a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a></p>
<a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a>
<a class="btn btn-xs btn-default" href="javascript:volumeChart.filterAll();dc.redrawAll();">Reset</a></p>
<a class="reset" href="javascript:volumeChart.filterAll();dc.redrawAll();"
style="display: none;">reset</a>
<div class="clearfix"></div>
</center>
</div>
......@@ -91,8 +90,7 @@ th a {
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
<p id="corpusdisplayer" onclick='Final_UpdateTable("click")'
class="btn btn-primary btn-lg" style="width:200px; margin:0 auto; display:block;">Open Folder</h2></p>
<p id="corpusdisplayer" onclick='Final_UpdateTable("click")' class="btn btn-primary btn-lg" style="width:200px; margin:0 auto; display:block;">Open Folder</h2></p>
</a>
</h4>
</div>
......
......@@ -122,10 +122,9 @@ input[type=radio]:checked + label {
<strong>Title</strong> (Blue bars: all, Green line: zoom)
Select a time range to zoom in
<p align="center">
<a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a></p>
<a class="reset" href="javascript:volumeChart.filterAll();dc.redrawAll();"
style="display: none;">reset</a>
<a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a>
<a class="btn btn-xs btn-default" href="javascript:volumeChart.filterAll();dc.redrawAll();">Reset</a></p>
<div class="clearfix"></div>
</center>
</div>
......
......@@ -137,10 +137,9 @@ input[type=radio]:checked + label {
<center>
Blue bars: all, Green line for zooming : select a time range to zoom in
<p align="center">
<a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a></p>
<a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a>
<a class="btn btn-xs btn-default" href="javascript:volumeChart.filterAll();dc.redrawAll();">Reset</a></p>
<a class="reset" href="javascript:volumeChart.filterAll();dc.redrawAll();"
style="display: none;">reset</a>
<div class="clearfix"></div>
</center>
</div>
......@@ -222,7 +221,7 @@ input[type=radio]:checked + label {
<label class="control-label">
Which list do you want?</label>
<label class="radio">
<input value="miam" name="whichlist" disabled type="radio">MiamList
<input value="miam" name="whichlist" type="radio">MiamList
</label>
<label class="radio">
<input value="stop" name="whichlist" checked type="radio">StopList
......@@ -239,12 +238,74 @@ input[type=radio]:checked + label {
</div>
</div>
</div>
</div>
</div>
<div id="pre_savechanges" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Do you want to apply these to the whole Project as well?:</h3>
</div>
<div class="modal-body">
<div id="stoplist_content">
</div>
<!--
<ul class="nav nav-tabs">
<li class="active"><a id="stoplist" href="#stoplist_content">Stop List</a></li>
<li><a id="maplist" href="#maplist_content">Map List</a></li>
<li><a id="grouplist" href="#grouplist_content">Group List</a></li>
</ul>
<div class="tab-content">
<div id="stoplist_content" class="tab-pane fade in active">
<ul>
<li>jiji01</li>
<li>jiji02</li>
<li>jiji03</li>
</ul>
</div>
<div id="maplist_content" class="tab-pane fade">
qowieuoqiwueowq
</div>
<div id="grouplist_content" class="tab-pane fade">
asdhasjkdhasjdh
</div>
</div>
-->
<div class="modal-footer">
<button onclick="SaveGlobalChanges(this.id)" id="nope" type="button" class="btn btn-default" data-dismiss="modal">No</button>
<button onclick="SaveGlobalChanges(this.id)" id="yep" type="button" class="btn btn-primary">Yes</button>
</div>
</div>
</div>
</div>
</div>
<div id="filter_search" style="visibility:hidden">
......@@ -264,9 +325,9 @@ input[type=radio]:checked + label {
<option id="filter_stop-list" value="filter_stop-list">Stop-List</option>
<!-- </optgroup> -->
</select>
<!--
<button id="ImportList" onclick="GetUserPortfolio(); $('#corpuses').modal('show');" class="btn btn-warning">Import a Corpus-List</button>
-->
<button id="ImportList" onclick="GetUserPortfolio();" class="btn btn-warning">Import a Corpus-List</button>
</div>
<script type="text/javascript" src="{% static "js/jquery/jquery.min.js" %}"></script>
......
......@@ -77,11 +77,14 @@ def get_ngrams(request , project_id , corpus_id ):
myamlist_type_id = cache.NodeType['MiamList'].id
miamlist = session.query(Node).filter(Node.user_id == request.user.id , Node.parent_id==corpus_id , Node.type_id == myamlist_type_id ).first()
t
the_query = """ SELECT hyperdata FROM node_node WHERE id=%d """ % ( int(corpus_id) )
cursor = connection.cursor()
try:
processing = corpus.hyperdata['Processing']
except Exception as error:
print(error)
processing = 0
cursor.execute(the_query)
processing = cursor.fetchone()[0]["Processing"]
except:
processing = "Error"
html = t.render(Context({
'debug': settings.DEBUG,
......@@ -116,11 +119,13 @@ def get_journals(request , project_id , corpus_id ):
type_doc_id = cache.NodeType['Document'].id
number = session.query(func.count(Node.id)).filter(Node.parent_id==corpus_id, Node.type_id==type_doc_id).all()[0][0]
the_query = """ SELECT hyperdata FROM node_node WHERE id=%d """ % ( int(corpus_id) )
cursor = connection.cursor()
try:
processing = corpus.hyperdata['Processing']
except Exception as error:
print(error)
processing = 0
cursor.execute(the_query)
processing = cursor.fetchone()[0]["Processing"]
except:
processing = "Error"
html = t.render(Context({
'debug': settings.DEBUG,
......
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