-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlmtablepage.html
136 lines (104 loc) · 3.5 KB
/
lmtablepage.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pixie-Net List Mode Table</title>
<style type="text/css">
body { background-color:#d0d0d0; font-family:sans-serif; }
h1 { margin:0; font-size:24px }
h2 { margin-top:15px; font-size:20px; font-weight:normal; border-bottom:1px solid #ff9040 }
p { font-size:14px }
li { font-size:14px }
a { color:#6060d0; text-decoration:none }
a:hover { text-decoration:underline }
.header { padding: 20px; text-align: center; background: #1e73be; color: white; }
.header h1 { font-size: 40px; }
/* Ensure proper sizing */
* { box-sizing: border-box; }
/* Column container */
.row { display: flex; flex-wrap: wrap; }
/* Sidebar/left column */
.side { height: 100%; width: 180px; position: fixed; background-color: white; padding: 20px; }
.side a { float: left; display: block; color: #002b80; text-align: left; padding: 10px 10px; text-decoration: none; }
.side a:hover { background-color: #ddd; color: #1e73be; }
/* bottom help section */
.fixed_bot { position: fixed; bottom: 0; left: 0; width: 180px; padding: 20px }
.fixed_bot p {font-size: 11px; }
.fixed_bot a {font-size: 12px; }
/* Main column */
.main { margin-left: 180px; padding: 20px; }
.w3-card-2{
background-color:white;
border-radius:3px;
padding: 10px;
margin-bottom: 20px;
box-shadow:0 4px 10px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)
}
table { border-collapse: collapse; }
th { border-bottom: 2px solid #ddd; padding: 8px; font-weight: bold; font-size: 12px; }
td { padding: 8px; border-top: 1px solid #ddd; font-size: 12px; }
#chart { padding: 0px; }
.xaxislabel { font-size: 9px; }
</style>
<!-- load the d3.js library -->
<script src="d3.v3.min.js"></script>
</head>
<body>
<body>
<div class="header">
<h1>Pixie-Net List Mode Table</h1>
</div>
<div class="row">
<div class="side">
<img src="xialogo.jpg" width="140" height=auto alt="XIA Logo">
<p> </p>
<a href="/index.html"> Home </a>
<a href="cgitraces.cgi"> Current ADC traces </a>
<a href="cgistats.cgi"> Current run statistics </a>
<a href="mcapage.html">Most recent <br> MCA spectra</a>
<a href="/webops/webopsindex.html"> Web interface </a>
<div class="fixed_bot">
<h2>Help</h2>
<i style="font-size: 11px"><p>This page extracts the data from the file LMdata.dat created
in runtype 0x501 and presents it as a table. </p></i>
</div>
</div>
<div class="main">
<div class="w3-card-2">
<div class=box id="datatable">
</div>
</div>
</div>
</div>
<script>
var rows = []
var formatdate = d3.time.format("%b %d %Y");
d3.csv("LMdata.dat", function(error, csv) {
csv.forEach(function(row) {
rows.push(row);
});
var table = d3.select("#datatable").append("table");
thead = table.append("thead");
tbody = table.append("tbody");
thead.append("th").text("Module");
thead.append("th").text("Run Type");
thead.append("th").text("Run Start (ticks)");
thead.append("th").text("Run Start (s)");
thead.append("th").text(" ");
thead.append("th").text(" ");
var tr = tbody.selectAll("tr")
.data(rows)
.enter().append("tr");
var td = tr.selectAll("td")
.data(function(d) { return [d.Module, d.RunType, d.Run_Start_ticks, d.Run_Start_sec, d.Unused1, d.Unused2]; })
.enter().append("td")
.text(function(d) { return d; });
var width = 80,
height = d3.select("table")[0][0].clientHeight,
mx = 10,
radius = 2;
});
</script>
</body>
</html>