2 var filtered_color = "grey";
3 var normal_color = "black";
5 //Descriptions overriding the default ones set in Accessors_site.py and configuration
7 var sourceComon = '<a class="source-url" target="source_window" href="http://comon.cs.princeton.edu/">CoMon</a>';
8 var sourceTophat = '<a class="source-url" target="source_window" href="http://www.top-hat.info/">TopHat</a>';
9 var sourceTophatAPI = '<a class="source-url" target="source_window" href="http://www.top-hat.info/API/">TopHat API</a>';
10 var sourceMySlice = '<a class="source-url" target="source_window" href="http://myslice.info/">MySlice</a>';
11 var sourceCymru = '<a class="source-url" target="source_window" href="http://www.team-cymru.org/">Team Cymru</a>';
12 var sourceSonoma = '<a class="source-url" target="source_window" href="http://sonoma.etomic.org/">SONoMA</a>';
13 var sourceMyPLC = '<a class="source-url" target="source_window" href="https://www.planet-lab.eu/db/doc/PLCAPI.php">MyPLC API</a>';
14 var sourceManiacs = '<a class="source-url" target="source_window" href="http://www.ece.gatech.edu/research/labs/MANIACS/as_taxonomy/">MANIACS</a>';
15 var sourceMaxmind = '<a class="source-url" target="source_window" href="http://www.maxmind.com/app/geolitecity">MaxMind</a>';
16 var sourceMonitor = '<a class="source-url" target="source_window" href="http://monitor.planet-lab.org/">Monitor</a>';
17 var hardwareReqs = 'current <a class="info-url" target="info_window" href="http://www.planet-lab.org/hardware">PlanetLab hardware requirement</a>';
18 var selectReferenceNode ='<div id="refnodes_div"></div>';
19 var selectReferenceNodeRTT ='<div id="refnodes_rtt_div"></div>';
21 var descHOSTNAME = "test";
23 var titleAU = 'Authority';
24 var detailAU = 'The authority of the global PlanetLab federation that the site of the node belongs to.';
25 var valuesAU = '<span class="bold">PLC</span> (PlanetLab Central), <span class="bold">PLE</span> (PlanetLab Europe)';
26 var sourceAU = 'Source: '+sourceMyPLC;
27 var descAU = '<span class="gray"><span class="column-title">'+titleAU+'</span><p><span class="column-detail">'+detailAU+'</span></p><p>Values: '+valuesAU+'</p><p>Source: '+sourceMyPLC+'</p></span>';
29 var titleST = 'Status';
30 var sourceST = 'Source: '+sourceMonitor;
31 var valuesST = 'Values: <span class="bold">online</span> (up and running), <span class="bold">good</span> (up and running recently), <span class="bold">offline</span> (unreachable today), <span class="bold">down</span> (node unreachable for more than one day), <span class="bold">failboot</span> (reachable, but only by administrators for debugging purposes).';
32 var descST = '<span class="gray"><span class="column-title">'+titleST+'</span><p>'+valuesST+'</p><p>'+sourceST+'</p></span>';
34 var titleA = 'Architecture name';
35 var detailA = 'The node architecture.';
36 var sourceA = 'Source: '+sourceMyPLC;
37 var valuesA = '<span class="bold">x86_64</span>, <span class="bold">i386</span>, <span class="bold">n/a</span>';
38 var descA = '<span class="gray"><span class="column-title">'+titleA+'</span><p><span class="column-detail">'+detailA+'</span></p><p>Values: '+valuesA+'</p><p>'+sourceA+'</p></span>';
40 var titleAS = 'Autonomous system ID';
41 var sourceAS = 'Source: '+sourceCymru+' (via '+sourceTophat+')';
42 var valuesAS = 'Values: <span class="bold">Integer between 0 and 65535</span>, <span class="bold">n/a</span>';
43 var descAS = '<span class="gray"><span class="column-title">'+titleAS+'</span><p>'+valuesAS+'</p><p>' + sourceAS+'</p></span>';
45 var titleAST = 'Autonomous system type';
46 var sourceAST = 'Source: '+sourceManiacs;
47 var valuesAST = 'Values: <span class="bold">t1</span> (tier-1), <span class="bold">t2</span> (tier-2), <span class="bold">edu</span> (university), <span class="bold">comp</span> (company), <span class="bold">nic</span> (network information centre -- old name for a domain name registry operator), <span class="bold">ix</span> (IXP), <span class="bold">n/a</span>';
48 var descAST = '<span class="gray"><span class="column-title">'+titleAST+'</span><p>'+valuesAST+'</p><p>'+sourceAST+'</p></span>';
50 var titleASN = 'Autonomous system name';
51 var sourceASN = 'Source: '+sourceTophat;
52 var descASN = '<span class="gray"><span class="column-title">'+titleASN+'</span><p>'+sourceASN+'</p></span>';
54 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>';
55 var titleBU = 'Bandwidth utilization ';
56 var sourceBU = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
57 var valuesBU ='Unit: <span class="bold">Kbps</span>';
58 var detailBU = '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.'
59 var descBU = '<span class="gray"><span class="column-title">'+titleBU+'</span><p><span class="column-detail">'+detailBU+'</span></p><p>'+selectPeriodBU+'</p><p>'+valuesBU+'</p><p>'+sourceBU+'</p></span>';
61 var titleBW= 'Bandwidth limit';
62 var sourceBW = 'Source: '+sourceComon;
63 var valuesBW = 'Unit: <span class="bold">Kbps</span>';
64 var detailBW = '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>.';
65 var descBW = '<span class="gray"><span class="column-title">'+titleBW+'</span><p><span class="column-detail">'+detailBW+'</span></p><p>'+valuesBW+'</p><p>'+sourceBW+'</p></span>';
67 var titleCC = 'Number of CPU cores';
68 var sourceCC = 'Source: '+sourceComon;
69 var detailCC = 'The number of CPU cores on the node. For reference, the '+hardwareReqs+' is <span class="bold">4 cores min.</span> (Older nodes may have fewer cores).';
70 var descCC = '<span class="gray"><span class="column-title">'+titleCC+'</span><p><span class="column-detail">'+detailCC+'</span></p><p>'+sourceCC+'</p></span>';
72 var titleCN = 'Number of CPUs';
73 var sourceCN = 'Source: '+sourceComon;
74 var detailCN = 'The number of CPUs on the node. For eeference, the '+hardwareReqs+' is <span class="bold">1 (if quad core) or 2 (if dual core)</span>.';
75 var descCN = '<span class="gray"><span class="column-title">'+titleCN+'</span><p><span class="column-detail">'+detailCN+'</detail></p><p>'+sourceCN+'</p></span>';
77 var titleCPC = 'Number of cores per CPU';
78 var sourceCPC = 'Source: '+sourceComon;
79 var detailCPC = 'The number of cores per CPU on the node.';
80 var descCPC = '<span class="gray"><span class="column-title">'+titleCPC+'</span><p><span class="column-detail">'+detailCPC+'</span></p><p>'+sourceCPC+'</p></span>';
82 var titleCR = 'CPU clock rate';
83 var detailCR = 'The clock rate for the CPUs on the node. For reference, the '+hardwareReqs+' is <span class="bold">2.4 GHz</span>.';
84 var sourceCR = 'Source: '+sourceComon;
85 var valuesCR = 'Unit: <span class="bold">GHz</span>';
86 var descCR = '<span class="gray"><span class="column-title">'+titleCR+'</span><p><span class="column-detail">'+detailCR+'</span></p><p>'+valuesCR+'</p><p>'+sourceCR+'</p></span>';
88 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>';
89 var titleCF = 'Free CPU';
90 var sourceCF = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
91 var valuesCF = 'Unit: <span class="bold">%</span>';
92 var detailCF = 'The average CPU percentage that gets allocated to a test slice named burb that is periodically run by CoMon.';
93 var descCF = '<span class="gray"><span class="column-title">'+titleCF+'</span><p><span class="column-detail">'+detailCF+'</span></p><p>'+selectPeriodCF+'</p><p>'+valuesCF+'</p><p>'+sourceCF+'</p></span>';
95 var titleDN = 'Toplevel domain name';
96 var sourceDN = 'Source: '+sourceMyPLC;
97 var descDN = '<span class="gray"><span class="column-title">'+titleDN+'</span><p>'+sourceDN+'</p></span>';
99 var titleDA = 'Date added';
100 var sourceDA = 'Source: '+sourceMyPLC;
101 var detailDA = 'The date that the node was added to PlanetLab.';
102 var descDA = '<span class="gray"><span class="column-title">'+titleDA+'</span><p><span class="column-detail">'+detailDA+'</span></p><p>'+sourceDA+'</p></span>';
104 var titleDL = 'Deployment';
105 var detailDL = 'The deployment status.';
106 var valuesDL = 'Values: <span class="bold">alpha</span>, <span class="bold">beta</span>, <span class="bold">production</span>, <span class="bold">n/a</span>';
107 var sourceDL = 'Source: '+sourceMyPLC;
108 var descDL = '<span class="gray"><span class="column-title">'+titleDL+'</span><p><span class="column-detail">'+detailDL+'</span></p><p>'+valuesDL+'</p><p>'+sourceDL+'</p></span>';
110 var titleDS = 'Disk size';
111 var detailDS = 'The size of the hard disk available on the node. For reference, the '+hardwareReqs+' is <span class="bold">500 GB</span>.';
112 var sourceDS = 'Source: '+sourceComon;
113 var valuesDS = 'Unit: <span class="bold">GB</span>';
114 var descDS = '<span class="gray"><span class="column-title">'+titleDS+'</span><p><span class="column-detail">'+detailDS+'</span></p><p>'+valuesDS+'</p><p>'+sourceDS+'</p></span>';
116 var titleDU = 'Current disk utilization';
117 var sourceDU = 'Source: '+sourceComon;
118 var valuesDU = 'Unit: <span class="bold">GB</span>';
119 var detailDU = 'The amount of disk space currently consumed.';
120 var descDU = '<span class="gray"><span class="column-title">'+titleDU+'</span><p><span class="column-detail">'+detailDU+'</span></p><p>'+valuesDU+'</p><p>'+sourceDU+'</p></span>';
122 var titleDF = 'Disk space free';
123 var sourceDF = 'Source: '+sourceComon;
124 var valuesDF = 'Unit: <span class="bold">GB</span>.';
125 var detailDF = 'The amount of disk space currently available.';
126 var descDF = '<span class="gray"><span class="column-title">'+titleDF+'</span><p><span class="column-detail">'+detailDF+'</span></p><p>'+valuesDF+'</p><p>'+sourceDF+'</p></span>';
128 var titleHC = 'Hop count (pairwise)';
129 var sourceHC = 'Source: '+sourceTophat;
130 var detailHC = '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.';
131 var descHC = '<span class="gray"><span class="column-title">'+titleHC+'</span><p><span class="column-detail">'+detailHC+'</span></p><p>'+selectReferenceNode+'</p><p>'+sourceHC+'</p></span>';
133 var titleIP = 'IP address';
134 var sourceIP = 'Source: '+sourceMyPLC;
135 var descIP = '<span class="gray"><span class="column-title">'+titleIP+'</span><p>'+sourceIP+'</p></span>';
137 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>';
139 var sourceL = 'Source: '+sourceComon;
140 var valuesL = 'Unit: <span class="bold">5-minute load</span>';
141 var detailL = 'The average 5-minute load (as reported by the Unix uptime command) over the selected period.';
142 var descL = '<span class="gray"><span class="column-title">'+titleL+'</span><p><span class="column-detail">'+detailL+'</span></p><p>'+selectPeriodL+'</p><p>'+valuesL+'</p><p>'+sourceL+'</p></span>';
144 var titleLON= 'Longitude';
145 var sourceLON = 'Source: '+sourceTophat;
146 var descLON = '<span class="gray"><span class="column-title">'+titleLON+'</span><p>'+sourceLON+'</p></span>';
148 var titleLAT= 'Latitude';
149 var sourceLAT = 'Source: '+sourceTophat;
150 var descLAT = '<span class="gray"><span class="column-title">'+titleLAT+'</span><p>'+sourceLAT+'</p></span>';
152 var titleLCN= 'Location (Country)';
153 var sourceLCN = 'Source: '+sourceMaxmind+' (via '+sourceTophat+')';
154 var detailLCN = 'Based on the latitude and longitude information.';
155 var descLCN = '<span class="gray"><span class="column-title">'+titleLCN+'</span><p><span class="column-detail">'+detailLCN+'</span></p><p>'+sourceLCN+'</p></span>';
157 var titleLCT= 'Location (Continent)';
158 var sourceLCT = 'Source: '+sourceMaxmind+' (via '+sourceTophat+')';
159 var detailLCT = 'Based on the latitude and longitude information.';
160 var descLCT = '<span class="gray"><span class="column-title">'+titleLCT+'</span><p><span class="column-detail">'+detailLCT+'</span></p><p>'+sourceLCT+'</p></span>';
162 var titleLCY= 'Location (City)';
163 var sourceLCY = 'Source: '+sourceMaxmind+' (via '+sourceTophat+')';
164 var detailLCY = 'Based on the latitude and longitude information.';
165 var descLCY = '<span class="gray"><span class="column-title">'+titleLCY+'</span><p><span class="column-detail">'+detailLCY+'</span></p><p>'+sourceLCY+'</p></span>';
167 var titleLPR= 'Location precision radius';
168 var sourceLPR = 'Source: '+sourceTophat;
169 var valuesLPR = 'Unit: <span class="bold">float</span>.';
170 var detailLPR = 'The radius of the circle corresponding to the error in precision of the geolocalization estimate.';
171 var descLPR = '<span class="gray"><span class="column-title">'+titleLPR+'</span><p><span class="column-detail">'+detailLPR+'</span></p><p>'+valuesLPR+'</p><p>'+sourceLPR+'</p></span>';
173 var titleLRN= 'Location (Region)';
174 var sourceLRN = 'Source: '+sourceMaxmind+' (via '+sourceTophat+')';
175 var detailLRN = 'Based on the latitude and longitude information.';
176 var descLRN = '<span class="gray"><span class="column-title">'+titleLRN+'</span><p><span class="column-detail">'+detailLRN+'</span></p><p>'+sourceLRN+'</p></span>';
178 var titleMS= 'Memory size';
179 var detailMS = 'The memory size (RAM) available on the node. For reference, the '+hardwareReqs+' is <span class="bold">4 GB</span>.';
180 var sourceMS = 'Source: '+sourceComon;
181 var valuesMS = 'Unit: <span class="bold">GB</span>.';
182 var descMS = '<span class="gray"><span class="column-title">'+titleMS+'</span><p><span class="column-detail">'+detailMS+'</span></p><p>'+valuesMS+'</p><p>'+sourceMS+'</p></span>';
184 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>';
185 var titleMU = 'Memory utilization';
186 var sourceMU = 'Source: '+sourceComon;
187 var valuesMU = 'Unit: <span class="bold">%</span>';
188 var detailMU = 'The average active memory utilization as reported by CoMon.';
189 var descMU = '<span class="gray"><span class="column-title">'+titleMU+'</span><p><span class="column-detail">'+detailMU+'</span></p><p>'+selectPeriodMU+'</p><p>'+valuesMU+'</p><p>'+sourceMU+'</p></span>';
191 var titleMA= 'Measurement agents';
192 var sourceMA = 'Source: '+sourceTophat;
193 var valuesMA = 'Values: <span class="bold">ETOMIC</span>, <span class="bold">SONoMA</span>, <span class="bold">TDMI</span>, <span class="bold">DIMES</span>.';
194 var detailMA = 'Co-located measurement agents.';
195 var descMA = '<span class="gray"><span class="column-title">'+titleMA+'</span><p><span class="column-detail">'+detailMA+'</span></p><p>'+valuesMA+'</p><p>'+sourceMA+'</p></span>';
197 var titleMAS= 'Measurement agent SONoMA';
198 var sourceMAS = 'Source: '+sourceTophat;
199 var valuesMAS = 'Values: <span class="bold">Node type</span> (e.g., PLE, APE)';
200 var detailMAS = '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+'.';
201 var descMAS = '<span class="gray"><span class="column-title">'+titleMAS+'</span><p><span class="column-detail">'+detailMAS+'</span></p><p>'+valuesMAS+'</p><p>'+sourceMAS+'</p></span>';
203 var titleMAE= 'Measurement agent ETOMIC';
204 var sourceMAE = 'Source: '+sourceTophat;
205 var valuesMAE = 'Values: <span class="bold">yes/no</span>';
206 var detailMAE = '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+'.';
207 var descMAE = '<span class="gray"><span class="column-title">'+titleMAE+'</span><p><span class="column-detail">'+detailMAE+'</span></p><p>'+valuesMAE+'</p><p>'+sourceMAE+'</p></span>';
209 var titleMAT= 'Measurement agent TDMI';
210 var sourceMAT = 'Source: '+sourceTophat;
211 var valuesMAT = 'Values: <span class="bold">yes/no</span>';
212 var detailMAT = '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+'.';
213 var descMAT = '<span class="gray"><span class="column-title">'+titleMAT+'</span><p><span class="column-detail">'+detailMAT+'</span></p><p>'+valuesMAT+'</p><p>'+sourceMAT+'</p></span>';
215 var titleMAD= 'Measurement agent DIMES';
216 var sourceMAD = 'Source: '+sourceTophat;
217 var valuesMAD = 'Values: <span class="bold">yes/no</span>';
218 var detailMAD = 'The existence of a colocated DIMES agent. When a DIMES agent is present, you have access to DIMES measurements through the '+sourceTophatAPI+'.';
219 var descMAD = '<span class="gray"><span class="column-title">'+titleMAD+'</span><p><span class="column-detail">'+detailMAD+'</span></p><p>'+valuesMAD+'</p><p>'+sourceMAD+'</p></span>';
221 var titleNSF= 'Network information (spoof)';
222 var sourceNSF = 'Source: '+sourceTophat;
223 var valuesNSF = 'Values: <span class="bold">yes/no</span>';
224 var detailNSF = 'Whether the node can send packets successfully (or not) with a spoofed IP source address.';
225 var descNSF = '<span class="gray"><span class="column-title">'+titleNSF+'</span><p><span class="column-detail">'+detailNSF+'</span></p><p>'+valuesNSF+'</p><p>'+sourceNSF+'</p></span>';
227 var titleNSR= 'Network information (source route)';
228 var sourceNSR = 'Source: '+sourceTophat;
229 var valuesNSR = 'Values: <span class="bold">yes/no</span>';
230 var detailNSR = '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.';
231 var descNSR = '<span class="gray"><span class="column-title">'+titleNSR+'</span><p><span class="column-detail">'+detailNSR+'</span></p><p>'+valuesNSR+'</p><p>'+sourceNSR+'</p></span>';
233 var titleNTP= 'Network information (timestamp)';
234 var sourceNTP = 'Source: '+sourceTophat;
235 var valuesNTP = 'Values: <span class="bold">yes/no</span>';
236 var detailNTP = '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.';
237 var descNTP = '<span class="gray"><span class="column-title">'+titleNTP+'</span><p><span class="column-detail">'+detailNTP+'</span></p><p>'+valuesNTP+'</p><p>'+sourceNTP+'</p></span>';
239 var titleNRR= 'Network information (record route)';
240 var sourceNRR = 'Source: '+sourceTophat;
241 var valuesNRR = 'Values: <span class="bold">yes/no</span>';
242 var detailNRR = '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.';
243 var descNRR = '<span class="gray"><span class="column-title">'+titleNRR+'</span><p><span class="column-detail">'+detailNRR+'</span></p><p>'+valuesNRR+'</p><p>'+sourceNRR+'</p></span>';
245 var titleOS = 'Operating system';
246 var detailOS = 'Fedora or CentOS distribution to use for node or slivers.';
247 var sourceOS = 'Source: '+sourceMyPLC;
248 var valuesOS = 'Values: <span class="bold">f8, f12, Cent/OS, other, n/a</span>';
249 var descOS = '<span class="gray"><span class="column-title">'+titleOS+'</span><p><span class="column-detail">'+detailOS+'</span></p><p>'+valuesOS+'</p><p>'+sourceOS+'</p></span>';
251 var titleRTT = 'Round Trip Time (pairwise)';
252 var detailRTT = 'The round trip time between a selected SONoMA agent and PlanetLab nodes.';
253 var sourceRTT = 'Source: '+sourceSonoma+' (via '+sourceTophat+ ')';
254 var descRTT = '<span class="gray"><span class="column-title">'+titleRTT+'</span><p><span class="column-detail">'+detailRTT+'</span></p><p>'+selectReferenceNodeRTT+'</p><p>'+sourceRTT+'</p></span>';
256 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>';
257 var titleR = 'Reliability';
258 var sourceR = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
259 var detailR = '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.';
260 var valuesR = 'Unit: <span class="bold">%</span>';
261 var descR = '<span class="gray"><span class="column-title">'+titleR+'</span><p><span class="column-detail">'+detailR+'</span></p><p>'+selectPeriodR+'</p><p>'+valuesR+'</p><p>'+sourceR+'</p></span>';
263 var titleRES = 'Reservation capabilities';
264 var sourceRES = 'Source: '+sourceMyPLC;
265 //var valuesRES = 'Values: <span class="bold">yes/no</span>';
266 var valuesRES = 'Values: <span class="bold">-R-</span> (if yes)';
267 var detailRES = 'Whether the node can be reserved for a certain duration. Your slivers will be available <span class=bold>only during timeslots where you have obtained leases (see tab above)</span>. <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></p>';
268 var descRES = '<span class="gray"><span class="column-title">'+titleRES+'</span><p><span class="column-detail">'+detailRES+'</span></p><p>'+valuesRES+'</p><p>'+sourceRES+'</p></span>';
270 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>';
271 var titleS = 'Active slices';
272 var sourceS = 'Source: '+sourceComon+' (via '+sourceMySlice+')';
273 var valuesS = 'Unit: <span class="bold">%</span>';
274 var detailS = '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.';
275 var descS = '<span class="gray"><span class="column-title">'+titleS+'</span><p><span class="column-detail">'+detailS+'</span></p><p>'+selectPeriodS+'</p><p>'+valuesS+'</p><p>'+sourceS+'</p></span>';
277 var titleSM= 'Slices in memory';
278 var detailSM = 'The total number of slices in memory (both active and inactive).';
279 var sourceSM = 'Source: '+sourceComon;
280 var descSM = '<span class="gray"><span class="column-title">'+titleSM+'</span><p><span class="column-detail">'+detailSM+'</span></p><p>'+sourceSM+'</p></span>';
282 var titleSN = 'Site name';
283 var sourceSN = 'Source: '+sourceMyPLC;
284 var descSN = '<span class="gray"><span class="column-title">'+titleSN+'</span><p>'+sourceSN+'</p></span>';
286 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>';
287 var titleSSH = 'Average SSH response delay';
288 var valuesSSH = 'Unit: <span class="bold">msecs</span>';
289 var detailSSH = '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.';
290 var sourceSSH ='Source: '+sourceComon+' (via '+sourceMySlice+')';
291 var descSSH = '<span class="gray"><span class="column-title">'+titleSSH+'</span><p><span class="column-detail">'+detailSSH+'</span></p><p>'+selectPeriodSSH+'</p><p>'+valuesSSH+'</p><p>'+sourceSSH+'</p></span>';
294 var titleUT = 'Uptime';
295 var sourceUT = 'Source: '+sourceComon;
296 var valuesUT = 'Unit: <span class="bold">days</span>';
297 var detailUT = 'The continuous uptime until the moment that the page is loaded, as reported by the CoMon html query API.';
298 var descUT = '<span class="gray"><span class="column-title">'+titleUT+'</span><p><span class="column-detail">'+detailUT+'</span></p><p>'+valuesUT+'</p><p>'+sourceUT+'</p></span>';
302 //Categorization of columns in different types, useful for filtering
304 function inTypeA(header_name) {
305 var typeA = ['ST','SN','RES','OS','NRR','NTP','NSR','NSF','NDS','NTH','NEC','LRN','LCY','LPR','LCN','LAT','LON','IP','ASN','AST'];
306 return typeA.indexOf(header_name);
309 function inTypeB(header_name) {
310 var typeB = ['BW','DS','MS','CC','CR','AS','MU','DU','CN'];
311 return typeB.indexOf(header_name);
314 function inTypeC(header_name) {
315 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'];
316 return typeC.indexOf(header_name);
319 function inTypeD(header_name) {
321 return typeD.indexOf(header_name);
326 function debugfilter(s) {
327 document.getElementById('debug').innerHTML+=s;
331 //Called when a column is selected. It displays the detailed description
334 function highlightOption(divid) {
336 var columns = document.getElementsByName('columnlist');
337 for(var j = 0; j < columns.length; j++)
338 columns[j].className = 'out';
340 document.getElementById(divid).className = 'selected';
342 showDescription(divid);
345 if (document.getElementById('selectperiod'+divid))
346 document.getElementById('selectperiod'+divid).value = document.getElementById('period'+divid).value;
351 //Displays the detailed column description
353 function showDescription(h) {
355 if (document.getElementById('selectdescr'))
357 //Checks if there is a detailed description defined
358 if (window['desc'+h])
359 document.getElementById('selectdescr').innerHTML = ""+window['desc'+h];
361 document.getElementById('selectdescr').innerHTML = "No detailed description provided";
364 if (document.getElementById('refnodes_div'))
365 document.getElementById('refnodes_div').innerHTML = ref_nodes_select;
367 if (document.getElementById('refnodes_rtt_div'))
368 document.getElementById('refnodes_rtt_div').innerHTML = ref_nodes_select_rtt;
372 //Overrides the titles of the columns as they are shown in the column selection panel.
373 //If no overriding variable exists the tag's description is used
374 function overrideTitles() {
376 var columns = document.getElementsByName('columnlist');
378 for(var j = 0; j < columns.length; j++)
380 var kk = columns[j].id;
381 if (window['title'+kk])
382 document.getElementById('htitle'+kk).innerHTML = window['title'+kk];
388 //When the checkbox is clicked. Adds/removes column respectively
389 function changeCheckStatus(column) {
391 var h = document.getElementById(column).value;
393 if (document.getElementById('selectdescr'))
396 //debugfilter("HERE: "+column+" - "+document.getElementById('type '+column).value);
397 //debugfilter("HERE: "+column);
400 if (document.getElementById(column).checked)
401 addColumn(h, true, document.getElementById('type'+h).value);
408 //This function is used when the alternative "quick" selection list is used
409 function changeSelectStatus(column) {
411 var optionClass = "";
412 var selected_index = document.getElementById('quicklist').selectedIndex;
414 if (document.getElementById('quicklist') && selected_index != 0)
417 optionClass = document.getElementById('quicklist').options[selected_index].className;
419 if (optionClass == "in")
421 deleteColumn(document.getElementById('quicklist').value);
422 document.getElementById('quicklist').options[selected_index].className = "out";
423 document.getElementById('quicklist').value="0";
427 addColumn(document.getElementById('quicklist').value, true);
428 document.getElementById('quicklist').options[selected_index].className = "in";
429 document.getElementById('quicklist').value="0";
435 //When the period of an already selected column is changed
436 function updatePeriod(h, new_period) {
438 var old_period = document.getElementById('period'+h).value;
439 document.getElementById('period'+h).value=new_period;
441 //debugfilter(h+''+old_period+'-'+h+''+new_period);
442 if (document.getElementById('check'+h).checked)
444 deleteColumnCells(h+''+old_period);
445 addColumnCells(h+''+new_period);
446 addColumnAjax(h, h+''+new_period);
448 replaceColumnConfiguration(h+''+old_period,h+''+new_period);
454 RESET/SAVE CONFIGURATION
458 function getHTTPObject()
460 if (typeof XMLHttpRequest != 'undefined')
461 { return new XMLHttpRequest(); }
464 { return new ActiveXObject("Msxml2.XMLHTTP"); }
467 try { return new ActiveXObject("Microsoft.XMLHTTP"); }
473 function closeMessage(tab)
475 var current_conf = document.getElementById('show_configuration').value;
478 if (current_conf != "")
481 if (tab == 'reservable') {
482 document.getElementById('note_reservable_div').style.display = "none";
483 if (current_conf.indexOf('reservable') != -1)
485 value = current_conf+'reservable';
488 if (tab == 'columns') {
489 document.getElementById('note_columns_div').style.display = "none";
490 if (current_conf.indexOf('columns') != -1)
492 value = current_conf+'columns';
495 var slice_id = document.getElementById('slice_id').value;
496 var person_id = document.getElementById('person_id').value;
497 var tag_id = document.getElementById('show_tag_id').value;
499 var url = "/plekit/php/updateConfiguration.php?value="+value+"&slice_id="+slice_id+"&person_id="+person_id+"&tag_name=showconf&tag_id="+tag_id;
500 //debugfilter("updating conf with "+url);
501 document.getElementById('show_configuration').value = value;
503 var req = getHTTPObject();
504 req.open('GET', url, true);
505 req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
506 req.onreadystatechange =
508 if (req.readyState == 4)
509 { debugfilter(req.responseText); }
516 function updateColumnConfiguration(value, reload)
518 var person_id = document.getElementById('person_id').value;
519 var slice_id = document.getElementById('slice_id').value;
520 var tag_id = document.getElementById('conf_tag_id').value;
521 var full_column_configuration = document.getElementById('full_column_configuration').value;
523 //debugfilter("<br>OLD = "+full_column_configuration);
524 //debugfilter("<br>value = "+value);
527 var old_columns = full_column_configuration.split(";");
528 var new_columns = new Array();
530 for (var column_index = 0; column_index < old_columns.length ; column_index++) {
531 new_columns.push(old_columns[column_index]);
532 if (old_columns[column_index] != slice_id)
533 new_columns.push(old_columns[++column_index]);
537 new_columns.push(value);
539 new_columns.push("default");
545 var new_configuration = new_columns.join(";");
546 //debugfilter("<br>NEW = "+new_configuration);
548 if (window.XMLHttpRequest)
549 {// code for IE7+, Firefox, Chrome, Opera, Safari
550 xmlhttp=new XMLHttpRequest();
553 {// code for IE6, IE5
554 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
556 xmlhttp.onreadystatechange=function()
558 if (xmlhttp.readyState==4) // && xmlhttp.status==200)
560 //value=xmlhttp.responseText;
561 //debugfilter(value+"-----"+new_configuration);
562 document.getElementById('column_configuration').value=value;
563 document.getElementById('full_column_configuration').value=new_configuration;
566 window.location.reload(true);
570 xmlhttp.open("GET","/plekit/php/updateConfiguration.php?value="+new_configuration+"&slice_id="+slice_id+"&person_id="+person_id+"&tag_name=columnconf&tag_id="+tag_id,true);
571 //xmlhttp.open("GET","/plekit/php/updateConf.php?value="+value+"&slice_id="+slice_id+"&person_id="+person_id+"&tagName=Columnconf",true);
576 function logSortingAction(person_id, slice_id, value)
580 var req = getHTTPObject();
581 var url = "/plekit/php/logSorting.php?value="+value+"&slice_id="+slice_id+"&person_id="+person_id;
583 req.open('GET', url, true);
584 req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
585 req.onreadystatechange =
587 if (req.readyState == 4)
588 { debugfilter(req.responseText); }
593 function sortCompleteCallback(tableid) {
595 var slice_id = document.getElementById('slice_id').value;
596 var person_id = document.getElementById('person_id').value;
598 var ths = document.getElementById(tableid).getElementsByTagName("th");
599 for(var i = 0, th; th = ths[i]; i++) {
600 if (th.className.indexOf("Sort") != -1)
602 //debugfilter("sorted"+th.getAttribute("name"));
604 var column_name = th.getAttribute("name");
605 var hclass = th.className;
606 var column = hclass.substr(hclass.indexOf("column"),hclass.indexOf("column")+1);
607 var sortdirection = "forward";
608 if (hclass.indexOf("reverse")!=-1)
609 sortdirection = "reverse";
611 if (column.indexOf("column-1")==-1 && column.indexOf("column-0")==-1)
612 logSortingAction(person_id, slice_id, tableid+"|"+column_name+"|"+sortdirection);
618 function addColumnToConfiguration(column) {
620 var old_configuration = document.getElementById('column_configuration').value;
622 var new_configuration = "";
624 if (old_configuration != "")
625 new_configuration = old_configuration += "|"+column;
627 new_configuration = column;
629 //debugfilter("new configuration = "+new_configuration);
631 updateColumnConfiguration(new_configuration, false);
635 function deleteColumnFromConfiguration(column) {
637 var old_configuration = document.getElementById('column_configuration').value;
639 var old_columns = old_configuration.split("|");
640 var new_columns = new Array();
642 for (var column_index = 0; column_index < old_columns.length ; column_index++) {
643 var conf = old_columns[column_index].split(':');
644 if (conf[0] != column)
645 new_columns.push(old_columns[column_index]);
648 var new_configuration = new_columns.join("|");
649 updateColumnConfiguration(new_configuration, false);
653 function replaceColumnConfiguration(column_old, column_new) {
655 var old_configuration = document.getElementById('column_configuration').value;
657 var old_columns = old_configuration.split("|");
658 var new_columns = new Array();
660 var olds = column_old.split(':');
662 for (var column_index = 0; column_index < old_columns.length ; column_index++) {
663 var conf = old_columns[column_index].split(':');
664 if (conf[0] != olds[0])
665 new_columns.push(old_columns[column_index]);
667 new_columns.push(column_new);
670 var new_configuration = new_columns.join("|");
672 updateColumnConfiguration(new_configuration);
681 function convert_data(value, data_source, data_type, tagname) {
683 //debugfilter("v["+tagname+"]="+value+"-");
685 if (value == "" || value == "n/a" || value == null || value == "NaN" || value == "None")
688 if (tagname == "uptime") {
689 return parseInt((parseFloat(value) / 86400));
692 if (data_type == "date") {
694 var date = new Date(value*1000);
696 var year = date.getFullYear();
697 var month = date.getMonth()+1;
700 var day = date.getDate();
704 return year + '-' + month + '-' + day;
711 function load_data(column, header, url, data_source, data_type, tagname) {
713 //debugfilter("<br>loading "+url);
714 var req = getHTTPObject();
716 req.open('GET', url, true);
717 req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
718 req.onreadystatechange =
720 if (req.readyState == 4)
721 { updateColumnData(column, header, req.responseText, data_source, data_type, tagname); }
727 function updateColumnData(column, header, data, data_source, data_type, tagname) {
729 var headers = header.split("|");
730 var data_table = data.split("|");
732 //debugfilter("<p>headers[0] = "+headers[0]);
733 //debugfilter("<p>data[2] = "+data_table[2]);
735 //debugfilter("data = "+data + " with type "+data_type + " and source "+data_source);
736 //debugfilter("<p>data table length = "+data_table.length);
738 if (data_table.length > 1)
743 var table_id1 = 'nodes';
744 var table=$(table_id1);
745 var css='#'+table_id1+'>tbody';
746 var rows = $$(css)[0].rows;
748 var data_array1 = new Array();
750 //debugfilter("COLUMN "+column+"<p>");
752 for (var node_index = 1; node_index < data_table.length; node_index++) {
753 if (data_table[node_index] == '---potential---')
755 node_data = data_table[node_index].split(':');
757 data_array1[node_data[0]] = new Array();
759 for (var h_index=0; h_index < headers.length; h_index++) {
761 if (node_data[h_index+1] == "" || node_data[h_index+1] == "None")
762 data_array1[node_data[0]][h_index] = "n/a";
764 data_array1[node_data[0]][h_index] = convert_data(node_data[h_index+1], data_source, data_type, tagname);
771 for (var row_index = 0; row_index < rows.length ; row_index++) {
772 var tr=rows[row_index];
774 for (var column_index=0; column_index < tr.cells.length; column_index++) {
775 //debugfilter("<p>node id = "+tr.cells[0].innerHTML+" - "+tr.cells[column_index].getAttribute('name'));
776 if (tr.cells[column_index].getAttribute('name'))
778 var found_index = headers.indexOf(tr.cells[column_index].getAttribute('name'));
779 if (found_index != -1)
780 //debugfilter(tr.cells[0].innerHTML+"-"+found_index);
781 tr.cells[column_index].innerHTML = data_array1[tr.cells[0].innerHTML][found_index];
786 //debugfilter("Reset sorting .....");
787 //tablePaginater.init(table_id1);
788 fdTableSort.init(table_id1);
791 if (data_table[node_index] == '---potential---')
794 var table_id2 = 'add_nodes';
795 var table2=$(table_id2);
796 var css2='#'+table_id2+'>tbody';
797 var rows2 = $$(css2)[0].rows;
799 var data_array2 = new Array();
801 //debugfilter("COLUMN "+column+"<p>");
803 for (; node_index < data_table.length; node_index++) {
804 if (data_table[node_index] == '')
806 node_data = data_table[node_index].split(':');
808 data_array2[node_data[0]] = new Array();
810 for (var h_index=0; h_index < headers.length; h_index++) {
812 if (node_data[h_index+1] == "")
813 data_array2[node_data[0]][h_index] = "n/a";
815 data_array2[node_data[0]][h_index] = convert_data(node_data[h_index+1], data_source, data_type, tagname);
820 for (var row_index = 0; row_index < rows2.length ; row_index++) {
821 var tr=rows2[row_index];
823 for (var column_index=0; column_index < tr.cells.length; column_index++) {
824 if (tr.cells[column_index].getAttribute('name'))
826 var found_index = headers.indexOf(tr.cells[column_index].getAttribute('name'));
827 if (found_index != -1)
828 tr.cells[column_index].innerHTML = data_array2[tr.cells[0].innerHTML][found_index];
832 fdTableSort.init(table_id2);
833 //tablePaginater.init(table_id2);
837 //fdTableSort.removeTableCache(table_id2);
838 //document.getElementById('loading'+column).innerHTML = "";
843 document.getElementById('loading'+column).innerHTML = "";
848 function addColumnCells(header) {
850 var cells = document.getElementsByName(header);
852 //debugfilter("got cells -"+cells+"- for "+header);
853 for(var j = 0; j < cells.length; j++)
854 cells[j].style.display = "table-cell";
857 function addSampleCells(column) {
859 var cellsheader = document.getElementsByName("confheader"+column);
860 for(var j = 0; j < cellsheader.length; j++)
861 cellsheader[j].style.display = "table-cell";
865 function addColumnAjax(column, header) {
867 //var t = document.getElementById('check'+column).name;
868 var t = document.getElementById('tagname'+header).value;
869 var slice_id = document.getElementById('slice_id').value;
871 var selectedperiod = document.getElementById('period'+column).value;
872 var fetched = document.getElementById('fetched'+column).value;
873 var data_source = document.getElementById('source'+column).value;
874 var data_type = document.getElementById('type'+column).value;
877 //debugfilter("<br>adding "+column+","+header+','+fetched+','+t+','+data_source+','+data_type);
879 if (fetched.indexOf("false")!=-1)
882 document.getElementById('fetched'+column).value = ','+selectedperiod+',true';
884 else if (fetched.indexOf(','+selectedperiod+',')==-1)
887 document.getElementById('fetched'+column).value = ','+selectedperiod+''+fetched;
892 //debugfilter("ready to load ... ");
893 document.getElementById('loading'+column).innerHTML = "<img width=10 src=/plekit/icons/ajax-loader.gif>";
894 var url = "/plekit/php/updateColumn.php?slice_id="+slice_id+"&tagName="+t+"&data_type="+data_type+"&data_source="+data_source;
895 //debugfilter("calling "+url);
896 load_data(column, header, url, data_source, data_type, t);
902 function addColumn(column, fetch) {
904 var selectedperiod="";
909 if (inTypeC(column)!=-1)
911 column = column.substring(0,column.length-1);
914 selectedperiod = document.getElementById('period'+column).value;
915 header = column+""+selectedperiod;
919 //debugfilter("adding column "+column+" and header "+header+" and conf = "+conf);
921 addColumnCells(header);
924 addColumnAjax(column, header);
926 addColumnToConfiguration(conf);
930 function deleteColumnCells(header) {
932 var cells = document.getElementsByName(header);
933 for(var j = 0; j < cells.length; j++)
934 cells[j].style.display = "none";
939 function deleteColumn(column) {
941 var selectedperiod="";
944 selectedperiod = document.getElementById('period'+column).value;
945 header = column+""+selectedperiod;
947 //debugfilter("deleting "+column+","+header);
949 deleteColumnCells(header);
951 deleteColumnFromConfiguration(header);