Commit 1021fff0 authored by Otto Jonassen Wittner's avatar Otto Jonassen Wittner
Browse files

Added mouseover titels for popup table values

parent 76a69da0
Pipeline #143792 passed with stages
in 57 seconds
......@@ -277,14 +277,12 @@ var points_cache=[];
event_desc[e] = conffile[parms.net].event_type[e].title
event_index[e] = conffile[parms.net].event_type[e].index
for (const f in conffile[parms.net].event_type[e].field) {
// Add only numeric properties/variables
//if (conffile[parms.net].event_type[e].field[f].type == "number") {
prop_names_list[e].push(f);
var unit = conffile[parms.net].event_type[e].field[f].unit
var title = conffile[parms.net].event_type[e].field[f].title
prop_desc[f] = title + ( unit ? " (" + unit + ")" : "") ;
prop_aggr[f] = conffile[parms.net].event_type[e].field[f].aggr;
//}
// Add properties/variables
prop_names_list[e].push(f);
var unit = conffile[parms.net].event_type[e].field[f].unit
var title = conffile[parms.net].event_type[e].field[f].title
prop_desc[f] = title + ( unit ? " (" + unit + ")" : "") ;
prop_aggr[f] = conffile[parms.net].event_type[e].field[f].aggr;
}
// Store event type and properties for summary info
event_sum_type[e] = conffile[parms.net].event_type[e].summary_event_type;
......@@ -292,18 +290,20 @@ var points_cache=[];
// New property/variable.
prop_names_list[event_sum_type[e]]=[];
for (const f in conffile[parms.net].event_type[e].summary_field) {
// Add only numeric properties/variables
//if (conffile[parms.net].event_type[e].summary_field[f].type == "number") {
if( prop_names_list[event_sum_type[e]].indexOf(f) == -1) {
// Field not yet added. Add.
prop_names_list[event_sum_type[e]].push(f);
var unit = conffile[parms.net].event_type[e].summary_field[f].unit
var title = conffile[parms.net].event_type[e].summary_field[f].title
var descr = title + ( unit ? " (" + unit + ")" : "") ;
prop_desc[f] = descr;
prop_aggr[f] = conffile[parms.net].event_type[e].summary_field[f].aggr;
// Add properties/variables
if( prop_names_list[event_sum_type[e]].indexOf(f) == -1) {
// Field not yet added. Add.
prop_names_list[event_sum_type[e]].push(f);
var unit = conffile[parms.net].event_type[e].summary_field[f].unit
var title = conffile[parms.net].event_type[e].summary_field[f].title
var descr = title + ( unit ? " (" + unit + ")" : "") ;
prop_desc[f] = descr;
prop_aggr[f] = conffile[parms.net].event_type[e].summary_field[f].aggr;
if (! jQuery.isEmptyObject(conffile[parms.net].event_type[e].summary_field[f].threshold_low) && ! jQuery.isEmptyObject(conffile[parms.net].event_type[e].summary_field[f].threshold_high ) ) {
// Add/update thresholds values for property/variable.
thresholds[f] = [ Number(conffile[parms.net].event_type[e].summary_field[f].threshold_low), Number(conffile[parms.net].event_type[e].summary_field[f].threshold_high) ];
}
//}
}
}
}
}
......@@ -1070,7 +1070,17 @@ function gap_list( from, to){
// Config from file available. Add table row.
html += "<tr><td>" + tid;
for (const col in conffile[parms.net].event_type[etype].popup.table) {
html += "<td align=right>" + gap[conffile[parms.net].event_type[etype].popup.table[col]];
if (typeof gap[conffile[parms.net].event_type[etype].popup.table[col]] != "undefined" ) {
var value_tooltip_field = conffile[parms.net].event_type[etype].field[ conffile[parms.net].event_type[etype].popup.table[col] ].mouseover;
var value_tooltip = "";
if (typeof value_tooltip_field != "undefined" ) {
// Get value of other field for mouse-over tooltip in current field.
value_tooltip = gap[ value_tooltip_field ];
}
html += "<td align=right title='" + value_tooltip + "' >" + gap[conffile[parms.net].event_type[etype].popup.table[col]];
} else {
html += "<td align=right>-";
}
}
html += "<td>" + tail + "\n";
} else {
......
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