2 /* $Id: column.js Panos $ */
4 var filtered_color = "grey";
5 var normal_color = "black";
7 //Descriptions overriding the default ones set in Accessors_site.py and configuration
9 var sourceComon = '<a target="source_window" href="http://comon.cs.princeton.edu/">CoMon</a>';
10 var sourceTophat = '<b><a target="source_window" href="http://www.top-hat.info/">TopHat</a></b>';
11 var sourceTophatAPI = '<b><a target="source_window" href="http://www.top-hat.info/API/">TopHat API</a></b>';
12 var sourceMySlice = '<b><a target="source_window" href="http://myslice.info/">MySlice</a></b>';
13 var sourceCymru = '<b><a target="source_window" href="http://www.team-cymru.org/">Team Cymru</a></b>';
14 var sourceMyPLC = '<b><a target="source_window" href="https://www.planet-lab.eu/db/doc/PLCAPI.php">MyPLC API</a></b>';
15 var sourceManiacs = '<b><a target="source_window" href="http://www.ece.gatech.edu/research/labs/MANIACS/as_taxonomy/">MANIACS</a></b>';
16 var sourceMaxmind = '<b><a target="source_window" href="http://www.maxmind.com/app/geolitecity">MaxMind</a></b>';
17 var sourceMonitor = '<b><a target="source_window" href="http://monitor.planet-lab.org/">Monitor</a></b>';
18 var selectReferenceNode ='Select reference node: <select id="reference_node" onChange="updateDefaultConf(this.value)"><option value=planetlab-europe-07.ipv6.lip6.fr>planetlab-europe-07.ipv6.lip6.fr</option></select>';
19 var addButton = '<input id="addButton" type="button" value="Add" onclick=addColumnAjax(document.getElementById("list1").value)></input>';
20 var deleteButton = '<input id="deleteButton" type="button" value="Delete" onclick=deleteColumn(window.document.getElementById("list1").value)></input>';
22 var descHOSTNAME = "test";
24 var titleA = 'Architecture name';
25 var detailA = '<i>The node architecture.</i>';
26 var sourceA = '<b>Source:</b> '+sourceMyPLC;
27 var valuesA = 'Values: <b>x86_64</b>, <b>i386</b>';
28 var descA = '<span class="myslice title">'+titleA+'</span><p>'+detailA+'<p>'+valuesA+'<p>'+sourceA;
30 var titlef = 'Operating system';
31 var detailf = '<i>Fedora or CentOS distribution to use for node or slivers.</i>';
32 var sourcef = '<b>Source:</b> '+sourceMyPLC;
33 var descf = '<span class="myslice title">'+titlef+'</span><p>'+detailf+'<p>'+sourcef;
35 var titleAU = 'Authority';
36 var detailAU = '<i>The authority of the global PlanetLab federation that the site of the node belongs to.</i>';
37 var valuesAU = 'Values: <b>PLC</b> (PlanetLab Central), <b>PLE</b> (PlanetLab Europe)';
38 var sourceAU = '<b>Source:</b> '+sourceMyPLC;
39 var descAU = '<span class="myslice title">'+titleAU+'</span><p>'+detailAU+'<p>'+valuesAU+'<p>'+sourceAU;
41 var titleAS = 'Autonomous system ID';
42 var sourceAS = 'Source: '+sourceCymru+' (via '+sourceTophat+')';
43 var valuesAS = 'Unit: <b>Integer between 0 and 65535</b>';
44 var descAS = '<span class="myslice title">'+titleAS+'</span><p>'+valuesAS+'<p>' + sourceAS;
46 var titleAST = 'Autonomous system type';
47 var sourceAST = 'Source: '+sourceManiacs;
48 var valuesAST = 'Values: <b>t1</b> (tier-1), <b>t2</b> (tier-2), <b>edu</b> (university), <b>comp</b> (company), <b>nic</b> (network information centre -- old name for a domain name registry operator), <b>ix</b> (IXP), <b>n/a</b>';
49 var descAST = '<span class="myslice title">'+titleAST+'</span><p>'+valuesAST+'<p>'+sourceAST;
51 var titleASN = 'Autonomous system name';
52 var sourceASN = 'Source: '+sourceTophat;
53 var descASN = '<span class="myslice title">'+titleASN+'</span><p>'+sourceASN;
55 var selectPeriodBU = 'Select period: <select id="selectperiodBU" onChange=updatePeriod("BU",this.value)><option value="">Latest</option><option value=w>Week</option><option value=m>Month</option><option value=y>Year</option></select>';
56 var titleBU = 'Bandwidth utilization ';
57 var sourceBU = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
58 var valuesBU ='Unit: <b>Kbps</b>';
59 var detailBU = '<i>The average transmited bandwidh over the selected period. The period is the most recent for which data is available, with CoMon data being collected by MySlice daily.</i>'
60 var descBU = '<span class="myslice title">'+titleBU+'</span><p>'+detailBU+'<p>'+selectPeriodBU+'<p>'+valuesBU+'<p>'+sourceBU;
62 var titleBW= 'Bandwidth limit';
63 var sourceBW = 'Source: '+sourceComon;
64 var valuesBW = 'Unit: <b>Kbps</b>';
65 var detailBW = '<i>The bandwidth limit is a cap on the total outbound bandwidth usage of a node. It is set by the site administrator (PI). For more details see <a targe="source_window" href="http://www.planet-lab.org/doc/BandwidthLimits">Bandwidth Limits (planet-lab.org)</a></i>.';
66 var descBW = '<span class="myslice title">'+titleBW+'</span><p>'+detailBW+'<p>'+valuesBW+'<p>'+sourceBW;
68 var titleCC = 'Number of CPU cores';
69 var sourceCC = 'Source: '+sourceComon;
70 var valuesCC = 'Current PlanetLab hardware requirements: 4 cores min. <br><i>(Older nodes may have fewer cores)</i>.';
71 var descCC = '<span class="myslice title">'+titleCC+'</span><p>'+valuesCC+'<p>'+sourceCC;
73 var titleCN = 'Number of CPUs';
74 var sourceCN = 'Source: '+sourceComon;
75 var valuesCN = 'Current PlanetLab hardware requirements: <b>1 (if quad core) or 2 (if dual core)</b>';
76 var descCN = '<span class="myslice title">'+titleCN+'</span><p>'+valuesCN+'<p>'+sourceCN;
78 var titleCR = 'CPU clock rate';
79 var sourceCR = 'Source: '+sourceComon;
80 var valuesCR = 'Unit: <b>GHz</b><p>Current PlanetLab hardware requirements: <b>2.4 GHz</b>';
81 var descCR = '<span class="myslice title">'+titleCR+'</span><p>'+valuesCR+'<p>'+sourceCR;
83 var selectPeriodCF = 'Select period: <select id="selectperiodCF" onChange=updatePeriod("CF",this.value)><option value="">Latest</option><option value=w>Week</option><option value=m>Month</option><option value=y>Year</option></select>';
84 var titleCF = 'Free CPU';
85 var sourceCF = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
86 var valuesCF = 'Unit: <b>%</b>';
87 var detailCF = '<i> The average CPU percentage that gets allocated to a test slice named burb that is periodically run by CoMon.</i>';
88 var descCF = '<span class="myslice title">'+titleCF+'</span><p>'+detailCF+'<p>'+selectPeriodCF+'<p>'+valuesCF+'<p>'+sourceCF;
90 var titleDN = 'Toplevel domain name';
91 var sourceDN = 'Source: '+sourceMyPLC;
92 var descDN = '<span class="myslice title">'+titleDN+'</span><p>'+sourceDN;
94 var titleDS = 'Disk size';
95 var sourceDS = 'Source: '+sourceComon;
96 var valuesDS = 'Unit: <b>GB</b><p>Current PlanetLab hardware requirements: <b>500 GB</b>';
97 var descDS = '<span class="myslice title">'+titleDS+'</span><p>'+valuesDS+'<p>'+sourceDS;
99 var titleDU = 'Current disk utilization';
100 var sourceDU = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
101 var valuesDU = 'Unit: <b>GB</b>';
102 var detailDU = '<i> The amount of disk space currently consumed (checked daily).</i>';
103 var descDU = '<span class="myslice title">'+titleDU+'</span><p>'+detailDU+'<p>'+valuesDU+'<p>'+sourceDU;
105 var titleDF = 'Disk space free';
106 var sourceDF = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
107 var valuesDF = 'Unit: <b>GB</b>';
108 var detailDF = '<i> The amount of disk space currently available (checked daily).</i>';
109 var descDF = '<span class="myslice title">'+titleDF+'</span><p>'+detailDF+'<p>'+valuesDF+'<p>'+sourceDF;
111 var titleHC = 'Hop count (pairwise)';
112 var sourceHC = 'Source: '+sourceTophat;
113 var detailHC = '<i>TopHat conducts traceroutes every five minutes in a full mesh between all PlanetLab nodes. The hop count is the length of the traceroute from the node to the reference node, based upon the most recently reported traceroute</i>.';
114 var descHC = '<span class="myslice title">'+titleHC+'</span><p>'+detailHC+'<p>'+selectReferenceNode+'<p>'+sourceHC;
116 var titleIP = 'IP address';
117 var sourceIP = 'Source: '+sourceMyPLC;
118 var descIP = '<span class="myslice title">'+titleIP+'</span><p>'+sourceIP;
120 var selectPeriodL = 'Select period: <select id="selectperiodL" onChange=updatePeriod("L",this.value)><option value="">Latest</option><option value=w>Week</option><option value=m>Month</option><option value=y>Year</option></select>';
122 var sourceL = 'Source: '+sourceComon;
123 var valuesL = 'Unit: <b>5-minute load</b>';
124 var detailL = '<i>The average 5-minute load (as reported by the Unix uptime command) over the selected period.</i>';
125 var descL = '<span class="myslice title">'+titleL+'</span><p>'+detailL+'<p>'+selectPeriodL+'<p>'+valuesL+'<p>'+sourceL;
127 var titleLON= 'Longitude';
128 var sourceLON = 'Source: '+sourceTophat;
129 var descLON = '<span class="myslice title">'+titleLON+'</span><p>'+sourceLON;
131 var titleLAT= 'Latitude';
132 var sourceLAT = 'Source: '+sourceTophat;
133 var descLAT = '<span class="myslice title">'+titleLAT+'</span><p>'+sourceLAT;
135 var titleLCN= 'Location (Country)';
136 var sourceLCN = 'Source: '+sourceMaxmind+' (via '+sourceTophat+')';
137 var detailLCN = '<i>Based on the latitude and longitude information.</i>';
138 var descLCN = '<span class="myslice title">'+titleLCN+'</span><p>'+detailLCN+'<p>'+sourceLCN;
140 var titleLCT= 'Location (Continent)';
141 var sourceLCT = 'Source: '+sourceMaxmind+' (via '+sourceTophat+')';
142 var detailLCT = '<i>Based on the latitude and longitude information.</i>';
143 var descLCT = '<span class="myslice title">'+titleLCT+'</span><p>'+detailLCT+'<p>'+sourceLCT;
145 var titleLCY= 'Location (City)';
146 var sourceLCY = 'Source: '+sourceMaxmind+' (via '+sourceTophat+')';
147 var detailLCY = '<i>Based on the latitude and longitude information.</i>';
148 var descLCY = '<span class="myslice title">'+titleLCY+'</span><p>'+detailLCY+'<p>'+sourceLCY;
150 var titleLPR= 'Location precision radius';
151 var sourceLPR = 'Source: '+sourceTophat;
152 var valuesLPR = 'Unit: <b>float</b>';
153 var detailLPR = '<i>The radius of the circle corresponding to the error in precision of the geolocalization estimate.</i>';
154 var descLPR = '<span class="myslice title">'+titleLPR+'</span><p>'+detailLPR+'<p>'+valuesLPR+'<p>'+sourceLPR;
156 var titleLRN= 'Location (Region)';
157 var sourceLRN = 'Source: '+sourceMaxmind+' (via '+sourceTophat+')';
158 var detailLRN = '<i>Based on the latitude and longitude information.</i>';
159 var descLRN = '<span class="myslice title">'+titleLRN+'</span><p>'+detailLRN+'<p>'+sourceLRN;
161 var titleMS= 'Memory size';
162 var sourceMS = 'Source: '+sourceComon;
163 var valuesMS = 'Unit: <b>GB</b><p>Current PlanetLab hardware requirements: <b>4 GB</b>.';
164 var descMS = '<span class="myslice title">'+titleMS+'</span><p>'+valuesMS+'<p>'+sourceMS;
166 var selectPeriodMU = 'Select period: <select id="selectperiodMU" onChange=updatePeriod("MU",this.value)><option value="">Latest</option><option value=w>Week</option><option value=m>Month</option><option value=y>Year</option></select>';
167 var titleMU = 'Memory utilization';
168 var sourceMU = 'Source: '+sourceComon;
169 var valuesMU = '<p>Unit: <b>%</b>';
170 var detailMU = '<i>The average active memory utilization as reported by CoMon.</i>';
171 var descMU = '<span class="myslice title">'+titleMU+'</span><p>'+detailMU+'<p>'+selectPeriodMU+'<p>'+valuesMU+'<p>'+sourceMU;
173 var titleNEC= 'Network information (ETOMIC)';
174 var sourceNEC = 'Source: '+sourceTophat;
175 var valuesNEC = 'Values: <b>yes/no</b>';
176 var detailNEC = '<i>The existence of a colocated ETOMIC box. When an ETOMIC box is present, you have the possibility to conduct high-precision measurements through the '+sourceTophatAPI+'.</i>';
177 var descNEC = '<span class="myslice title">'+titleNEC+'</span><p>'+detailNEC+'<p>'+valuesNEC+'<p>'+sourceNEC;
179 var titleNSN= 'Network information (SONoMA)';
180 var sourceNSN = 'Source: '+sourceTophat;
181 var valuesNSN = 'Values: <b>yes/no</b>';
182 var detailNSN = '<i>The existence of a SONoMA agent. When an SONoMA is present, you have the possibility to have access to high-precision measurements through the '+sourceTophatAPI+'.</i>';
183 var descNSN = '<span class="myslice title">'+titleNSN+'</span><p>'+detailNSN+'<p>'+valuesNSN+'<p>'+sourceNSN;
185 var titleNTH= 'Network information (TopHat)';
186 var sourceNTH = 'Source: '+sourceTophat;
187 var valuesNTH = 'Values: <b>yes/no</b>';
188 var detailNTH = '<i>The existence of a colocated TDMI (TopHat Dedicated Measurement Infrastructure) agent. When a TDMI agent is present, you have access to a wide variety of network topology measurements through the '+sourceTophatAPI+'.</i>';
189 var descNTH = '<span class="myslice title">'+titleNTH+'</span><p>'+detailNTH+'<p>'+valuesNTH+'<p>'+sourceNTH;
191 var titleNDS= 'Network information (DIMES)';
192 var sourceNDS = 'Source: '+sourceTophat;
193 var valuesNDS = 'Values: <b>yes/no</b>';
194 var detailNDS = '<i>The existence of a colocated DIMES agent. When a DIMES agent is present, you have access to DIMES measurements through the '+sourceTophatAPI+'.</i>';
195 var descNDS = '<span class="myslice title">'+titleNDS+'</span><p>'+detailNDS+'<p>'+valuesNDS+'<p>'+sourceNDS;
197 var titleNSF= 'Network information (spoof)';
198 var sourceNSF = 'Source: '+sourceTophat;
199 var valuesNSF = '<p>Values: <b>yes/no</b>';
200 var detailNSF = '<i> Whether the node can send packets successfully (or not) with a spoofed IP source address.</i>';
201 var descNSF = '<span class="myslice title">'+titleNSF+'</span><p>'+detailNSF+'<p>'+valuesNSF+'<p>'+sourceNSF;
203 var titleNSR= 'Network information (source route)';
204 var sourceNSR = 'Source: '+sourceTophat;
205 var valuesNSR = '<p>Values: <b>yes/no</b>';
206 var detailNSR = '<i> Whether the node can send packets packets using the IP source route option. See <a target="info_window" href="http://www.networksorcery.com/enp/protocol/ip/option003.htm">here</a>for more info.</i>';
207 var descNSR = '<span class="myslice title">'+titleNSR+'</span><p>'+detailNSR+'<p>'+valuesNSR+'<p>'+sourceNSR;
209 var titleNTP= 'Network information (timestamp)';
210 var sourceNTP = 'Source: '+sourceTophat;
211 var valuesNTP = '<p>Values: <b>yes/no</b>';
212 var detailNTP = '<i> Whether the node can send packets packets using the IP timestamp option. See <a target="info_window" href="http://www.networksorcery.com/enp/protocol/ip/option004.htm">here</a>for more info.</i>';
213 var descNTP = '<span class="myslice title">'+titleNTP+'</span><p>'+detailNTP+'<p>'+valuesNTP+'<p>'+sourceNTP;
215 var titleNRR= 'Network information (record route)';
216 var sourceNRR = 'Source: '+sourceTophat;
217 var valuesNRR = '<p>Values: <b>yes/no</b>';
218 var detailNRR = '<i> Whether the node can send packets packets using the IP record route option. See <a target="info_window" href="http://www.networksorcery.com/enp/protocol/ip/option007.htm">here</a>for more info.</i>';
219 var descNRR = '<span class="myslice title">'+titleNRR+'</span><p>'+detailNRR+'<p>'+valuesNRR+'<p>'+sourceNRR;
221 var titleOS = 'Operating system';
222 var sourceOS = 'Source: '+sourceMyPLC;
223 var valuesOS = 'Values: <b>Fedora, Cent/OS, other, n/a</b>';
224 var descOS = '<span class="myslice title">'+titleOS+'</span><p>'+valuesOS+'<p>'+sourceOS;
226 var selectPeriodR = 'Select period: <select id="selectperiodR" onChange=updatePeriod("R",this.value)><option value="">Latest</option><option value=w>Week</option><option value=m>Month</option><option value=y>Year</option></select>';
227 var titleR = 'Reliability';
228 var sourceR = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
229 var detailR = '<i>CoMon queries nodes every 5 minutes, for 255 queries per day. The average reliability is the percentage of queries over the selected period for which CoMon reports a value. The period is the most recent for which data is available, with CoMon data being collected by MySlice daily.</i>';
230 var valuesR = 'Unit: <b>%</b>';
231 var descR = '<span class="myslice title">'+titleR+'</span><p>'+detailR+'<p>'+selectPeriodR+'<p>'+valuesR+'<p>'+sourceR;
233 var titleRES = 'Reservation capabilities';
234 var sourceRES = 'Source: '+sourceMyPLC;
235 //var valuesRES = 'Values: <b>yes/no</b>';
236 var valuesRES = 'Values: <b>-R-</b> (if yes)';
237 var detailRES = '<i> Whether the node can be reserved for a certain duration.<br>Your slivers will be available <span class=bold>only during timeslots where you have obtained leases (see tab above)</span></i>. <p>Please note that as of August 2010 this feature is experimental. Feedback is appreciated at <a href="mailto:devel@planet-lab.org">devel@planet-lab.org</a>';
238 var descRES = '<span class="myslice title">'+titleRES+'</span><p>'+detailRES+'<p>'+valuesRES+'<p>'+sourceRES;
240 var selectPeriodS = 'Select period: <select id="selectperiodS" onChange=updatePeriod("S",this.value)><option value="">Latest</option><option value=w>Week</option><option value=m>Month</option><option value=y>Year</option></select>';
241 var titleS = 'Active slices';
242 var sourceS = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
243 var valuesS = 'Unit: <b>%</b>';
244 var detailS = '<i>Average number of active slices over the selected period for which CoMon reports a value. The period is the most recent for which data is available, with CoMon data being collected by MySlice daily.</i>';
245 var descS = '<span class="myslice title">'+titleS+'</span><p>'+detailS+'<p>'+selectPeriodS+'<p>'+valuesS+'<p>'+sourceS;
247 var titleSN = 'Site name';
248 var sourceSN = 'Source: '+sourceMyPLC;
249 var descSN = '<span class="myslice title">'+titleSN+'</span><p>'+sourceSN;
251 var selectPeriodSSH = 'Select period: <select id="selectperiodSSH" onChange=updatePeriod("SSH",this.value)><option value="">Latest</option><option value=w>Week</option><option value=m>Month</option><option value=y>Year</option></select>';
252 var titleSSH = 'Average SSH response delay';
253 var valuesSSH = 'Unit: <b>%</b>';
254 var detailSSH = '<i>The average response delay of the node to SSH logins over the selected period for which CoMon reports a value. The period is the most recent for which data is available, with CoMon data being collected by MySlice daily.</i>';
255 var sourceSSH ='Source: '+sourceComon+' (via '+sourceMySlice+')';
256 var descSSH = '<span class="myslice title">'+titleSSH+'</span><p>'+detailSSH+'<p>'+selectPeriodSSH+'<p>'+valuesSSH+'<p>'+sourceSSH;
258 var titleST = 'Status';
259 var sourceST = 'Source: '+sourceMonitor;
260 var valuesST = 'Values: <b>online</b> (up and running), <b>good</b> (up and running recently), <b>offline</b> (unreachable today), <b>down</b> (node unreachable for more than one day), <b>failboot</b> (reachable, but only by administrators for debugging purposes).';
261 var descST = '<span class="myslice title">'+titleST+'</span><p>'+valuesST+'<p>'+sourceST;
264 //Categorization of columns in different types, useful for filtering
266 function inTypeA(header_name) {
267 var typeA = ['ST','SN','RES','OS','NRR','NTP','NSR','NSF','NDS','NTH','NEC','LRN','LCY','LPR','LCN','LAT','LON','IP','ASN','AST'];
268 return typeA.indexOf(header_name);
271 function inTypeB(header_name) {
272 var typeB = ['BW','DS','MS','CC','CR','AS','MU','DU','CN'];
273 return typeB.indexOf(header_name);
276 function inTypeC(header_name) {
277 var typeC = ['Rw','Rm','Ry','BWw','BWm','BWy','Lw','Lm','Ly','Sw','Sm','Sy','CFw','CFm','CFy','BUw','BUm','BUy','MUw','MUm','MUy','SSHw','SSHm','SSHy'];
278 return typeC.indexOf(header_name);
281 function inTypeD(header_name) {
283 return typeD.indexOf(header_name);
288 function debugfilter(s) {
289 document.getElementById('debug').innerHTML+=s;
293 //Called when a column is selected. It displays the detailed description
296 function highlightOption(divid) {
298 //debugfilter("highlighting option "+divid);
300 var columns = document.getElementsByName('columnlist');
301 for(var j = 0; j < columns.length; j++)
302 columns[j].className = 'out';
304 document.getElementById(divid).className = 'selected';
306 showDescription(divid);
309 if (document.getElementById('selectperiod'+divid))
310 document.getElementById('selectperiod'+divid).value = document.getElementById('period'+divid).value;
315 //Displays the detailed column description
317 function showDescription(h) {
319 //debugfilter("showing description "+h);
321 //Checks if the detailed description div exists
322 if (document.getElementById('selectdescr'))
324 //Checks if there is a detailed description defined
325 if (window['desc'+h])
326 document.getElementById('selectdescr').innerHTML = ""+window['desc'+h];
327 //else if (document.getElementById('fdesc'+h))
328 //document.getElementById('selectdescr').innerHTML = document.getElementById('fdesc'+h).value;
330 document.getElementById('selectdescr').innerHTML = "No detailed description provided";
335 //Overrides the titles of the columns as they are shown in the column selection panel.
336 //If no overriding variable exists the tag's description is used
337 function overrideTitles() {
339 var columns = document.getElementsByName('columnlist');
341 for(var j = 0; j < columns.length; j++)
343 var kk = columns[j].id;
344 if (window['title'+kk])
345 document.getElementById('htitle'+kk).innerHTML = window['title'+kk];
349 //When the checkbox is clicked. Adds/removes column respectively
350 function changeCheckStatus(column) {
352 if (document.getElementById('selectdescr'))
353 showDescription(document.getElementById(column).value);
355 if (document.getElementById(column).checked)
356 addColumn(document.getElementById(column).value, true);
358 deleteColumn(document.getElementById(column).value);
361 function removeSelectHandler(object)
364 object.onclick = null;
368 //This function is used when the alternative "quick" selection list is used
369 function changeSelectStatus(column) {
371 var optionClass = "";
372 var selected_index = document.getElementById('quicklist').selectedIndex;
374 if (document.getElementById('quicklist') && selected_index != 0)
377 optionClass = document.getElementById('quicklist').options[selected_index].className;
379 if (optionClass == "in")
381 deleteColumn(document.getElementById('quicklist').value);
382 document.getElementById('quicklist').options[selected_index].className = "out";
383 document.getElementById('quicklist').value="0";
387 addColumn(document.getElementById('quicklist').value, true);
388 document.getElementById('quicklist').options[selected_index].className = "in";
389 document.getElementById('quicklist').value="0";
394 //When the period of an already selected column is changed
395 function updatePeriod(h, new_period) {
397 var old_period = document.getElementById('period'+h).value;
398 document.getElementById('period'+h).value=new_period;
400 //debugfilter(h+''+old_period+'-'+h+''+new_period);
401 if (document.getElementById('check'+h).checked)
403 deleteColumnCells(h+''+old_period);
404 addColumnCells(h+''+new_period);
405 addColumnAjax(h, h+''+new_period);
407 replaceColumnConfiguration(h+''+old_period,h+''+new_period);
413 RESET/SAVE CONFIGURATION
416 function getHTTPObject()
418 if (typeof XMLHttpRequest != 'undefined')
419 { return new XMLHttpRequest(); }
422 { return new ActiveXObject("Msxml2.XMLHTTP"); }
425 try { return new ActiveXObject("Microsoft.XMLHTTP"); }
431 function closeMessage(tab)
433 var current_conf = document.getElementById('show_configuration').value;
436 if (current_conf != "")
439 if (tab == 'reservable') {
440 document.getElementById('note_reservable_div').style.display = "none";
441 if (current_conf.indexOf('reservable') != -1)
443 value = current_conf+'reservable';
446 if (tab == 'columns') {
447 document.getElementById('note_columns_div').style.display = "none";
448 if (current_conf.indexOf('columns') != -1)
450 value = current_conf+'columns';
453 var slice_id = document.getElementById('slice_id').value;
454 var person_id = document.getElementById('person_id').value;
455 var tag_id = document.getElementById('show_tag_id').value;
457 var url = "/plekit/php/updateConfiguration.php?value="+value+"&slice_id="+slice_id+"&person_id="+person_id+"&tag_id="+tag_id;
458 //debugfilter("updating conf with "+url);
459 document.getElementById('show_configuration').value = value;
461 var req = getHTTPObject();
462 req.open('GET', url, true);
463 req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
464 req.onreadystatechange =
466 if (req.readyState == 4)
467 { debugfilter(req.responseText); }
474 function updateColumnConfiguration(value, reload)
476 var person_id = document.getElementById('person_id').value;
477 var slice_id = document.getElementById('slice_id').value;
478 var tag_id = document.getElementById('conf_tag_id').value;
479 var full_column_configuration = document.getElementById('full_column_configuration').value;
481 //debugfilter("<br>OLD = "+full_column_configuration);
482 //debugfilter("<br>value = "+value);
485 var old_columns = full_column_configuration.split(";");
486 var new_columns = new Array();
488 for (var column_index = 0; column_index < old_columns.length ; column_index++) {
489 new_columns.push(old_columns[column_index]);
490 if (old_columns[column_index] != slice_id)
491 new_columns.push(old_columns[++column_index]);
495 new_columns.push(value);
497 new_columns.push("default");
503 var new_configuration = new_columns.join(";");
504 //debugfilter("<br>NEW = "+new_configuration);
506 if (window.XMLHttpRequest)
507 {// code for IE7+, Firefox, Chrome, Opera, Safari
508 xmlhttp=new XMLHttpRequest();
511 {// code for IE6, IE5
512 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
514 xmlhttp.onreadystatechange=function()
516 if (xmlhttp.readyState==4) // && xmlhttp.status==200)
518 //value=xmlhttp.responseText;
519 //debugfilter(value+"-----"+new_configuration);
520 document.getElementById('column_configuration').value=value;
521 document.getElementById('full_column_configuration').value=new_configuration;
524 window.location.reload(true);
528 xmlhttp.open("GET","/plekit/php/updateConfiguration.php?value="+new_configuration+"&slice_id="+slice_id+"&person_id="+person_id+"&tag_id="+tag_id,true);
529 //xmlhttp.open("GET","/plekit/php/updateConf.php?value="+value+"&slice_id="+slice_id+"&person_id="+person_id+"&tagName=Columnconf",true);
534 function logSortingAction(person_id, slice_id, value)
538 var req = getHTTPObject();
539 var url = "/plekit/php/logSorting.php?value="+value+"&slice_id="+slice_id+"&person_id="+person_id;
541 req.open('GET', url, true);
542 req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
543 req.onreadystatechange =
545 if (req.readyState == 4)
546 { debugfilter(req.responseText); }
551 function sortCompleteCallback(tableid) {
553 var slice_id = document.getElementById('slice_id').value;
554 var person_id = document.getElementById('person_id').value;
556 var ths = document.getElementById(tableid).getElementsByTagName("th");
557 for(var i = 0, th; th = ths[i]; i++) {
558 if (th.className.indexOf("Sort") != -1)
560 var hclass = th.className;
561 var column = hclass.substr(hclass.indexOf("column"),hclass.indexOf("column")+1);
562 var sortdirection = hclass.substr(hclass.indexOf("Sort")-8,hclass.indexOf("Sort"));
563 if (column.indexOf("column-1")==-1 && column.indexOf("column-0")==-1)
564 logSortingAction(person_id, slice_id, tableid+"|"+column+"|"+sortdirection);
570 function addColumnToConfiguration(column) {
572 var old_configuration = document.getElementById('column_configuration').value;
574 var new_configuration = "";
576 if (old_configuration != "")
577 new_configuration = old_configuration += "|"+column;
579 new_configuration = column;
581 //debugfilter("new configuration = "+new_configuration);
583 updateColumnConfiguration(new_configuration, false);
587 function deleteColumnFromConfiguration(column) {
589 var old_configuration = document.getElementById('column_configuration').value;
591 var old_columns = old_configuration.split("|");
592 var new_columns = new Array();
594 for (var column_index = 0; column_index < old_columns.length ; column_index++) {
595 var conf = old_columns[column_index].split(':');
596 if (conf[0] != column)
597 new_columns.push(old_columns[column_index]);
600 var new_configuration = new_columns.join("|");
601 updateColumnConfiguration(new_configuration, false);
605 function replaceColumnConfiguration(column_old, column_new) {
607 var old_configuration = document.getElementById('column_configuration').value;
609 var old_columns = old_configuration.split("|");
610 var new_columns = new Array();
612 for (var column_index = 0; column_index < old_columns.length ; column_index++) {
613 var conf = old_columns[column_index].split(':');
614 if (conf[0] != column_old)
615 new_columns.push(old_columns[column_index]);
617 new_columns.push(column_new);
620 var new_configuration = new_columns.join("|");
622 updateColumnConfiguration(new_configuration);
634 function load_data(column, header, url) {
636 //debugfilter("<br>loading "+url);
637 var req = getHTTPObject();
639 req.open('GET', url, true);
640 req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
641 req.onreadystatechange =
643 if (req.readyState == 4)
644 { updateColumnData(column, header, req.responseText); }
650 function updateColumnData(column, header, data) {
652 var headers = header.split("|");
653 var data_table = data.split("|");
655 //debugfilter("<p>headers[0] = "+headers[0]);
656 //debugfilter("<p>data[2] = "+data_table[2]);
658 //debugfilter("data = "+data);
665 var table_id1 = 'nodes';
666 var table=$(table_id1);
667 var css='#'+table_id1+'>tbody';
668 var rows = $$(css)[0].rows;
670 var data_array1 = new Array();
672 //debugfilter("COLUMN "+column+"<p>");
674 for (var node_index = 1; node_index < data_table.length; node_index++) {
675 if (data_table[node_index] == '---potential---')
677 node_data = data_table[node_index].split(':');
679 data_array1[node_data[0]] = new Array();
681 for (var h_index=0; h_index < headers.length; h_index++) {
683 if (node_data[h_index+1] == "")
684 data_array1[node_data[0]][h_index] = "n/a";
686 data_array1[node_data[0]][h_index] = node_data[h_index+1];
693 for (var row_index = 0; row_index < rows.length ; row_index++) {
694 var tr=rows[row_index];
696 for (var column_index=0; column_index < tr.cells.length; column_index++) {
697 //debugfilter("<p>node id = "+tr.cells[0].innerHTML+" - "+tr.cells[column_index].getAttribute('name'));
698 if (tr.cells[column_index].getAttribute('name'))
700 var found_index = headers.indexOf(tr.cells[column_index].getAttribute('name'));
701 if (found_index != -1)
702 //debugfilter(tr.cells[0].innerHTML+"-"+found_index);
703 tr.cells[column_index].innerHTML = data_array1[tr.cells[0].innerHTML][found_index];
708 fdTableSort.init(table_id1);
709 tablePaginater.init(table_id1);
712 if (data_table[node_index] == '---potential---')
715 var table_id2 = 'add_nodes';
716 var table2=$(table_id2);
717 var css2='#'+table_id2+'>tbody';
718 var rows2 = $$(css2)[0].rows;
720 var data_array2 = new Array();
722 //debugfilter("COLUMN "+column+"<p>");
724 for (; node_index < data_table.length; node_index++) {
725 if (data_table[node_index] == '')
727 node_data = data_table[node_index].split(':');
729 data_array2[node_data[0]] = new Array();
731 for (var h_index=0; h_index < headers.length; h_index++) {
733 if (node_data[h_index+1] == "")
734 data_array2[node_data[0]][h_index] = "n/a";
736 data_array2[node_data[0]][h_index] = node_data[h_index+1];
741 for (var row_index = 0; row_index < rows2.length ; row_index++) {
742 var tr=rows2[row_index];
744 for (var column_index=0; column_index < tr.cells.length; column_index++) {
745 if (tr.cells[column_index].getAttribute('name'))
747 var found_index = headers.indexOf(tr.cells[column_index].getAttribute('name'));
748 if (found_index != -1)
749 tr.cells[column_index].innerHTML = data_array2[tr.cells[0].innerHTML][found_index];
754 //fdTableSort.removeTableCache(table_id2);
755 fdTableSort.init(table_id2);
756 tablePaginater.init(table_id2);
761 document.getElementById('loading'+column).innerHTML = "";
766 function addColumnCells(header) {
768 var cells = document.getElementsByName(header);
770 //debugfilter("got cells -"+cells+"- for "+header);
771 for(var j = 0; j < cells.length; j++)
772 cells[j].style.display = "table-cell";
775 function addSampleCells(column) {
777 var cellsheader = document.getElementsByName("confheader"+column);
778 for(var j = 0; j < cellsheader.length; j++)
779 cellsheader[j].style.display = "table-cell";
783 function addColumnAjax(column, header) {
785 //var t = document.getElementById('check'+column).name;
786 var t = document.getElementById('tagname'+header).value;
787 var slice_id = document.getElementById('slice_id').value;
789 var selectedperiod = document.getElementById('period'+column).value;
791 var fetched = document.getElementById('fetched'+column).value;
794 //debugfilter("<br>adding "+column+","+header+','+fetched+','+t);
796 if (fetched.indexOf("false")!=-1)
799 document.getElementById('fetched'+column).value = ','+selectedperiod+',true';
801 else if (fetched.indexOf(','+selectedperiod+',')==-1)
804 document.getElementById('fetched'+column).value = ','+selectedperiod+''+fetched;
809 var url = "/plekit/php/updateColumn.php?slice_id="+slice_id+"&tagName="+t;
810 load_data(column, header, url);
816 function addColumn(column, fetch) {
818 var selectedperiod="";
821 document.getElementById('loading'+column).innerHTML = "<img width=10 src=/plekit/icons/ajax-loader.gif>";
823 if (inTypeC(column)!=-1)
825 column = column.substring(0,column.length-1);
828 selectedperiod = document.getElementById('period'+column).value;
829 header = column+""+selectedperiod;
831 //debugfilter("adding column "+column+" and header "+header);
833 addColumnCells(header);
836 addColumnAjax(column, header);
838 document.getElementById('loading'+column).innerHTML = "";
840 addColumnToConfiguration(header);
845 function deleteColumnCells(header) {
847 var cells = document.getElementsByName(header);
848 for(var j = 0; j < cells.length; j++)
849 cells[j].style.display = "none";
855 function deleteColumn(column) {
857 var selectedperiod="";
860 selectedperiod = document.getElementById('period'+column).value;
861 header = column+""+selectedperiod;
863 //debugfilter("deleting "+column+","+header);
865 deleteColumnCells(header);
867 deleteColumnFromConfiguration(header);
869 //document.getElementById('check'+column).checked = false;
872 function scrollList() {
873 debugfilter("here "+document.getElementById('scrolldiv').focused);
874 if (event.keyCode == 40)
876 else if (event.keyCode == 38)
884 //to be used for scrolling the column list with down/up arrows
887 function resetColumns() {
889 for (var kk in column_table) {
891 if (column_table[kk]['visible'] == true && column_table[kk]['fetch'] == false)
893 else if (column_table[kk]['visible'] == false && column_table[kk]['fetch'] == true)
899 function resetCols(which_conf) {
901 var target_configuration = "|"+document.getElementById(which_conf).value+"|";
903 //debugfilter("<p>Target configuration = "+target_configuration);
905 for (var kk in column_table) {
906 //debugfilter("in "+kk+" ");
908 if (target_configuration.indexOf("|"+kk+"|")>=0)
910 if (document.getElementById('check'+kk))
911 if (document.getElementById('check'+kk).checked == false)
913 debugfilter("<p>Adding "+kk);
919 if (document.getElementById('check'+kk))
920 if (document.getElementById('check'+kk).checked == true)
922 debugfilter("<p>Deleting "+kk);
929 function filterByType(selectedtype) {
931 var notselectedyet = true;
933 for (var kk in column_headers) {
935 if (document.getElementById(kk))
937 if (window['type'+kk] == selectedtype)
939 document.getElementById(kk).className = 'in';
942 notselectedyet = false;
945 document.getElementById(kk).className = 'out';
951 function deleteColumnSample() {
952 var cellsheader = document.getElementsByName("confheader"+column);
953 for(var j = 0; j < cellsheader.length; j++)
954 cellsheader[j].style.display = "none";
958 function checkDataToFetch() {
960 var dataExist = false;
962 for (var kk in column_table) {
964 if (document.getElementById(kk))
966 if (column_table[kk]['visible'] == true && column_table[kk]['fetch'] == false)
968 document.getElementById('fetchbutton').disabled = false;
969 document.getElementById('fetchbutton').style.color = 'red';
977 document.getElementById('fetchbutton').disabled = true;
978 document.getElementById('fetchbutton').style.color = 'grey';
984 function fetchData() {
989 for (var kk in column_table) {
991 if (column_table[kk]['visible'] == true && column_table[kk]['fetch'] == false)
994 tagnames = column_table[kk]['tagname'];
999 tagnames += "|"+column_table[kk]['tagname'];
1004 //debugfilter("fetching these columns: "+tagnames+ "("+headers+")");
1006 var slice_id = document.getElementById('slice_id').value;
1007 document.getElementById('loadingDiv').innerHTML = " <img src=/plekit/icons/ajax-loader.gif> Loading data. Please wait ...";
1008 var url = "/plekit/php/updateColumn.php?slice_id="+slice_id+"&tagName="+tagnames;
1009 load_data(headers, url);
1020 function updateColumnThreshold(column, minT, maxT) {
1022 debugfilter("updating threshold for "+column+" with "+minT+" and "+maxT);
1024 var cells = document.getElementsByName(column);
1026 for(var j = 0; j < cells.length; j++)
1028 var val = parseFloat(cells[j].innerHTML);
1030 if (val >= minT && val <= maxT)
1031 cells[j].style.color = filtered_color;
1033 cells[j].style.color = normal_color;
1036 var old_configuration = document.getElementById('column_configuration').value;
1037 var slice_id = document.getElementById('slice_id').value;
1039 var old_columns = old_configuration.split("|");
1040 var new_columns = new Array();
1042 for (var column_index = 0; column_index < old_columns.length ; column_index++) {
1043 var conf = old_columns[column_index].split(':');
1044 if (conf[0] != column)
1045 new_columns.push(old_columns[column_index]);
1047 new_columns.push(column+":"+minT+","+maxT);
1050 var new_configuration = new_columns.join("|");
1052 updateColumnConfiguration(slice_id, new_configuration);
1056 function updateExcludeList(column, excludeList) {
1058 //debugfilter("updating list");
1059 debugfilter("updating list for "+column+" with "+excludeList);
1061 var cells = document.getElementsByName(column);
1063 for(var j = 1; j < cells.length; j++)
1065 var val = cells[j].innerHTML;
1067 if (excludeList == val)
1068 cells[j].style.color = filtered_color;
1070 cells[j].style.color = normal_color;
1073 var old_configuration = document.getElementById('column_configuration').value;
1074 var slice_id = document.getElementById('slice_id').value;
1076 var old_columns = old_configuration.split("|");
1077 var new_columns = new Array();
1079 for (var column_index = 0; column_index < old_columns.length ; column_index++) {
1080 var conf = old_columns[column_index].split(':');
1081 if (conf[0] != column)
1082 new_columns.push(old_columns[column_index]);
1084 new_columns.push(column+":"+excludeList);
1087 var new_configuration = new_columns.join("|");
1089 updateColumnConfiguration(slice_id, new_configuration);
1100 function plekit_table_showAll (slicetable_id) {
1102 var table=$(slicetable_id);
1103 var css='#'+slicetable_id+'>tbody';
1104 var rows = $$(css)[0].rows;
1106 // scan rows, elaborate 'visible'
1107 for (var row_index = 0; row_index < rows.length ; row_index++) {
1108 var tr=rows[row_index];
1110 plekit_table_row_visible(tr,visible);
1113 plekit_table_count_filtered(slicetable_id);
1115 tablePaginater.init(slicetable_id);
1119 function plekit_table_count_filtered (slicetable_id) {
1120 var table=$(slicetable_id);
1121 var css='#'+slicetable_id+'>tbody';
1122 var rows = $$(css)[0].rows;
1126 // scan rows, elaborate 'visible'
1127 for (var row_index = 0; row_index < rows.length ; row_index++) {
1128 var tr=rows[row_index];
1129 var filtered = false;
1131 for (var column_index=0; column_index < tr.cells.length; column_index++)
1132 if (tr.cells[column_index].style.color == "red")
1140 debugfilter(no_filtered+' nodes do not satisfy the requested threshold');
1144 function plekit_table_hide_filtered (slicetable_id) {
1145 var table=$(slicetable_id);
1146 var css='#'+slicetable_id+'>tbody';
1147 var rows = $$(css)[0].rows;
1149 var reg = /(^|\s)invisibleRow(\s|$)/;
1152 if (!document.getElementById('filtercheck').checked)
1154 plekit_table_showAll(slicetable_id);
1160 // scan rows, elaborate 'visible'
1161 for (var row_index = 0; row_index < rows.length ; row_index++) {
1162 var tr=rows[row_index];
1165 for (var column_index=0; column_index < tr.cells.length; column_index++) {
1166 if (tr.cells[column_index].style.color == filtered_color)
1172 plekit_table_row_visible(tr,visible);
1175 //debugfilter('hidden '+hidden+' nodes');
1176 debugfilter(hidden+' nodes do not satisfy the requested threshold (hidden)');
1178 tablePaginater.init(slicetable_id);
1184 function plekit_table_apply_config(slicetable_id, configuration) {
1186 var new_configuration = document.getElementById('new_conf').value;
1187 var all_columns = new_configuration.split("|");
1189 var min_values = new Array();
1190 var max_values = new Array();
1193 for (var column_index = 0; column_index < all_columns.length ; column_index++) {
1195 var conf = all_columns[column_index].split(':');
1197 if (inTypeB(conf[0]) != -1)
1199 var threshold = conf[1].split(',');
1200 if (threshold.length == 2)
1202 min_values.push(parseFloat(threshold[0]));
1203 max_values.push(parseFloat(threshold[1]));
1206 else if (inTypeC(conf[0]) == -1)
1208 var threshold = conf[2].split(',');
1209 if (threshold.length == 2)
1211 min_values.push(parseInt(threshold[0]));
1212 max_values.push(parseInt(threshold[1]));
1217 min_values.push(-1);
1218 max_values.push(-1);
1223 var table=$(slicetable_id);
1224 var css='#'+slicetable_id+'>tbody';
1225 var rows = $$(css)[0].rows;
1230 for (var row_index = 0; row_index < rows.length ; row_index++) {
1232 var tr=rows[row_index];
1234 var filtered = false;
1236 for (var column_index = 0; column_index < all_columns.length ; column_index++)
1237 if (min_values[column_index]!=-1)
1239 var val = parseFloat(tr.cells[3+column_index].innerHTML);
1241 if (val >= min_values[column_index] && val <= max_values[column_index])
1243 tr.cells[3+column_index].style.color = filtered_color;
1247 tr.cells[3+column_index].style.color = normal_color;
1250 if (tr.cells[3+column_index].style.color == filtered_color)
1258 debugfilter(no_filtered+' nodes do not satisfy the requested threshold');
1260 //tablePaginater.init(slicetable_id);
1265 function reset_select () {
1266 var table=$(slicetable_id);
1267 var css='#'+slicetable_id+'>tbody';
1268 var rows = $$(css)[0].rows;
1270 var action = document.getElementById('onlyselected');
1271 action.checked=false;
1273 // scan rows, elaborate 'visible'
1274 for (var row_index = 0; row_index < rows.length ; row_index++) {
1275 var tr=rows[row_index];
1277 document.getElementById("check"+tr.id).checked=false;
1281 plekit_table_count_nodes();
1287 function plekit_table_select_filter () {
1288 var table=$(slicetable_id);
1289 var css='#'+slicetable_id+'>tbody';
1290 var rows = $$(css)[0].rows;
1292 var reg = /(^|\s)invisibleRow(\s|$)/;
1294 var action = document.getElementById('onlyselected');
1295 if (!action.checked)
1296 plekit_table_reset_filter();
1298 // scan rows, elaborate 'visible'
1299 for (var row_index = 0; row_index < rows.length ; row_index++) {
1300 var tr=rows[row_index];
1305 if(tr.className.search(reg) == -1)
1306 if(!document.getElementById("check"+tr.id).checked)
1310 if(tr.className.search(reg) != -1)
1313 plekit_table_row_visible(tr,visible);
1316 tablePaginater.init(slicetable_id);
1317 plekit_table_count_nodes();
1320 function plekit_table_select_filter2 () {
1321 var table=$(slicetable_id);
1322 var css='#'+slicetable_id+'>tbody';
1323 var rows = $$(css)[0].rows;
1325 var reg = /(^|\s)invisibleRow(\s|$)/;
1327 var action = document.getElementById('onlyselected');
1329 // scan rows, elaborate 'visible'
1330 for (var row_index = 0; row_index < rows.length ; row_index++) {
1331 var tr=rows[row_index];
1336 if(tr.className.search(reg) == -1)
1337 if(!document.getElementById("check"+tr.id).checked)
1341 if(tr.className.search(reg) != -1)
1344 plekit_table_row_visible(tr,visible);
1347 tablePaginater.init(slicetable_id);
1348 plekit_table_count_nodes();
1351 function CheckTopNodes(n) {
1352 var table=$(slicetable_id);
1353 var css='#'+slicetable_id+'>tbody';
1354 var rows = $$(css)[0].rows;
1355 var reg = /(^|\s)invisibleRow(\s|$)/;
1359 for (var row_index = 0; row_index < rows.length ; row_index++) {
1360 var tr=rows[row_index];
1362 if(tr.className.search(reg) == -1) {
1365 document.getElementById("check"+tr.id).checked=true;
1370 document.getElementById("check"+tr.id).checked=false;
1377 function CheckRandomNodes(n) {
1378 var table=$(slicetable_id);
1379 var css='#'+slicetable_id+'>tbody';
1380 var rows = $$(css)[0].rows;
1381 var reg = /(^|\s)invisibleRow(\s|$)/;
1383 var r = n/plekit_table_visible_count();
1386 for (var row_index = 0; row_index < rows.length ; row_index++) {
1387 var tr=rows[row_index];
1389 if(tr.className.search(reg) == -1) {
1390 if(Math.random() < r) {
1391 document.getElementById("check"+tr.id).checked=true;
1401 function plekit_table_visible_count() {
1402 var table=$(slicetable_id);
1403 var css='#'+slicetable_id+'>tbody';
1404 var rows = $$(css)[0].rows;
1405 var reg = /(^|\s)invisibleRow(\s|$)/;
1408 for (var row_index = 0; row_index < rows.length ; row_index++) {
1409 var tr=rows[row_index];
1411 if(tr.className.search(reg) == -1)
1421 function plekit_table_count_nodes() {
1422 var table=$(slicetable_id);
1423 var css='#'+slicetable_id+'>tbody';
1424 var rows = $$(css)[0].rows;
1425 var reg = /(^|\s)invisibleRow(\s|$)/;
1430 for (var row_index = 0; row_index < rows.length ; row_index++) {
1431 var tr=rows[row_index];
1434 var ch = document.getElementById("check"+tr.id);
1436 if(tr.className.search(reg) == -1)
1449 var dd = document.getElementById('node_statistics');
1450 dd.innerHTML = "Total: "+n+" - Shown: "+v+" - Selected: "+s;
1453 function AutoSelect()
1455 var a = document.getElementById('automatic').value;
1456 var n = parseInt(document.getElementById('no_nodes').value);
1462 CheckRandomNodes(n);
1463 else if (a == "top")
1466 plekit_table_select_filter2();
1467 plekit_table_count_nodes();