mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-26 15:57:16 +00:00
Added comments
This commit is contained in:
parent
494980c48e
commit
4cb3b672be
2 changed files with 13 additions and 3 deletions
|
@ -227,6 +227,12 @@ function create_queue_table() {
|
|||
td.appendChild(document.createTextNode(glob_tabvar.row1[i][j] + moduleNum));
|
||||
tr.appendChild(td)
|
||||
}
|
||||
// Used to decide the color of the row
|
||||
// We have glob_tabvar.row1[][j] with:
|
||||
// - j=0: ModuleName
|
||||
// - j=1: queueLength
|
||||
// - j=2: LastProcessedPasteTime
|
||||
// - j=3: Number of the module belonging in the same category
|
||||
if (parseInt(glob_tabvar.row1[i][2]) > 60*2 && parseInt(glob_tabvar.row1[i][1]) > 2)
|
||||
tr.className += " danger";
|
||||
else if (parseInt(glob_tabvar.row1[i][2]) > 60*1)
|
||||
|
|
|
@ -96,6 +96,9 @@ var all_data = [];
|
|||
var provider_already_loaded = [];
|
||||
var totNumGraph = 0;
|
||||
|
||||
// Query all providers name then launch the query and plot process for each of them.
|
||||
// When everything is terminated, plot the widgets (Gauge, canvasJS, table)
|
||||
// input: all - set to 'True' if you take all providers
|
||||
function draw_page(all) {
|
||||
$.getJSON("/sentiment_analysis_getplotdata/?getProviders=True&all="+all,
|
||||
function(data) {
|
||||
|
@ -130,7 +133,9 @@ function draw_page(all) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
// Query data and plot it for a given provider
|
||||
// input - provider: The povider name to be plotted
|
||||
// input - graphNum: The number of the graph (Use to plot on correct div)
|
||||
function query_and_plot(provider, graphNum) {
|
||||
var query_plot = $.getJSON("/sentiment_analysis_getplotdata/?provider="+provider,
|
||||
function(data) {
|
||||
|
@ -186,8 +191,7 @@ function query_and_plot(provider, graphNum) {
|
|||
max_value = Math.abs(pos-neg) > max_value ? Math.abs(pos-neg) : max_value;
|
||||
|
||||
if(curr_date >= dateStart+oneWeek-23*oneHour){
|
||||
max_value_day = Math.abs(pos-neg) > max_value_day ? Math.abs(pos-neg) : max_value_day;
|
||||
day_sum += (pos-neg);
|
||||
max_value_day = Math.abs(pos-neg) > max_value_day ? Math.abs(pos-neg) : max_value_day; day_sum += (pos-neg);
|
||||
day_sum_elem++;
|
||||
}
|
||||
if(curr_date > dateStart+oneWeek-2*oneHour && curr_date <=dateStart+oneWeek-oneHour){
|
||||
|
|
Loading…
Reference in a new issue