mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 00:28:22 +00:00
Optimized create_plot and removed test commemts
This commit is contained in:
parent
30ae561426
commit
7e5ce0f17f
5 changed files with 9 additions and 13 deletions
|
@ -133,19 +133,20 @@ if __name__ == '__main__':
|
|||
today = datetime.date.today()
|
||||
year = today.year
|
||||
month = today.month
|
||||
print 'b1'
|
||||
|
||||
lib_words.create_curve_with_word_file(r_serv1, csv_path_proto,
|
||||
protocolsfile_path, year,
|
||||
month)
|
||||
print 'b2'
|
||||
|
||||
lib_words.create_curve_with_word_file(r_serv1, csv_path_tld,
|
||||
tldsfile_path, year,
|
||||
month)
|
||||
print 'b3'
|
||||
|
||||
lib_words.create_curve_with_list(r_serv2, csv_path_domain,
|
||||
to_plot, year,
|
||||
month)
|
||||
print 'end building'
|
||||
|
||||
publisher.debug("{} queue is empty, waiting".format(config_section))
|
||||
print 'sleeping'
|
||||
time.sleep(5)
|
||||
|
@ -161,5 +162,3 @@ if __name__ == '__main__':
|
|||
analyse(r_serv1, 'scheme') #Scheme analysis
|
||||
analyse(r_serv1, 'tld') #Tld analysis
|
||||
analyse_and_progression(r_serv2, 'domain') #Domain analysis
|
||||
print "to_plot:"
|
||||
print to_plot
|
||||
|
|
|
@ -120,11 +120,11 @@ function Graph(id_pannel, path, header_size){
|
|||
the_heading = headings[i];
|
||||
//console.log('heading='+the_heading+' tab['+(today-1)+']['+(parseInt(i)+1)+']='+g.getValue(today-1, parseInt(i)+1));
|
||||
sorted_list.push({dom: the_heading, val: this.graph.getValue(today-1, parseInt(i)+1), index: parseInt(i)});
|
||||
sorted_list.sort(function(a,b) {
|
||||
return b.val - a.val;
|
||||
});
|
||||
|
||||
}
|
||||
sorted_list.sort(function(a,b) {
|
||||
return b.val - a.val;
|
||||
});
|
||||
|
||||
var display_list = sorted_list.slice(0, max_display);
|
||||
for( i=0; i<display_list.length; i++){
|
||||
this.graph.setVisibility(display_list[i].index, true);
|
||||
|
|
|
@ -90,7 +90,6 @@
|
|||
<button type="button" class="btn btn-primary" onclick="take_top(5);">5</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(10);">10</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(15);">15</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(0);">...</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -99,7 +99,6 @@
|
|||
<button type="button" class="btn btn-primary" onclick="take_top(5);">5</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(10);">10</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(15);">15</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(0);">...</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -139,7 +138,6 @@
|
|||
<button type="button" class="btn btn-primary" onclick="take_top(5);">5</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(10);">10</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(15);">15</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(0);">...</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -185,6 +183,7 @@
|
|||
create_and_plot("TldsTrending", '../static//csv/tldstrendingdata.csv')
|
||||
});
|
||||
|
||||
// Used when we modify the number of displayed curves
|
||||
function take_top(new_display){
|
||||
current_displayed_graph.set_Visibility_andHide(new_display, default_display);
|
||||
default_display = new_display;
|
||||
|
|
|
@ -90,7 +90,6 @@
|
|||
<button type="button" class="btn btn-primary" onclick="take_top(5);">5</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(10);">10</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(15);">15</button>
|
||||
<button type="button" class="btn btn-primary" onclick="take_top(0);">...</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue