123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="generator" content="GitLab Pages">
- <title>KATRIN remote analysis shift</title>
- <link rel="shortcut icon" href="https://iap-neu-katrin.iap.kit.edu/routine/pics/KATRINlogo.ico" />
- <link rel="stylesheet" href="style.css">
- </head>
- <body>
- <iframe src="navbar.html" onload="this.before((this.contentDocument.body||this.contentDocument).children[0]);this.remove()"></iframe>
- <br>
- <center>
- <h1>Checklist for remote analysis shifts (2023-09-07-B02)</h1>
- <p style="color:#eb4670"> If you have questions, problems, or findings regarding the remote analysis shift, write into the <a href="https://iap-katrin-chat.iap.kit.edu/channel/remote.monitoring" target="_blank">#remote.monitoring</a> group on RocketChat</p>
- <p> To summarise the week for the general KATRIN call you can find a presentation template <a href="https://docs.google.com/presentation/d/1Fj3TjNkry1fAC94sEvml2LyvrICDhh_e7i75_7pimqk/template/preview" target="_blank">here</a></p>
- </center>
- <hr>
- <h2 style="text-align:right">Step 1/3</h2>
- <center>
- <h3>Please enter your name:</h3>
- <table id="table" align="center">
- <tr>
- <th>Author name:</th>
- <th><input type="text" placeholder ="Author" id="author"></th>
- </tr>
- <tr>
- <th>Measurement type:</th>
- <th><select name="Measurement type" id="measurement">
- <option value="Tritium">Tritium</option>
- <option value="Krypton">Krypton</option>
- <option value="Other">Other</option>
- </select></th>
- </tr>
- </table>
- <br><br>
- <button type="submit" onclick="submitName()" id="Next">Next</button>
- <script type="text/javascript">
- function submitName() {
- var author = document.getElementById('author');
- if(author.value == ""){
- alert("Please provide a name.")
- }
- else {
- localStorage.setItem('author', author.value);
- localStorage.setItem('measurement', measurement.value);
- window.location.href="checklist.php";
- }
- }
- </script>
- <br><br>
- <hr>
- <br><br>
- <style type="text/css">
- table th#normal {font-weight:normal}
- table th#red {font-weight:normal; background-color:#ffbdce;}
- table th#green {font-weight:normal; background-color:#bdffce;}
- </style>
- <?php
- $Campaigns = ["KNM11", "KNM10", "KNM9", "KNM8", "KNM7", "KNM6"];
- for ($index=0; $index < count($Campaigns); $index++)
- {
- // $file = "recentSQLName.txt";
- // $f = fopen($file, 'r');
- // $tableName = fgets($f);
- // fclose($f);
- $tableName = $Campaigns[$index];
- echo "<h1>Checklist history - $tableName</h1>";
- $db= new SQLite3("data/mydb.sqlite");
- $db->exec("CREATE TABLE IF NOT EXISTS $tableName(id INTEGER PRIMARY KEY NOT NULL, Run_Range Text, Mode Text, Submitted Text, Author Text, webtrium text, HV_K65 Text, HV_tank_potential Text, U_MTD_discrepancy Text, Missing_K35 Text, BIXS Text, LARA Text, LARA_crosscheck Text, FBM Text, RW Text, Run_length Text, Data_size Text, FPD_energy Text, Grid_sync Text, Rate_300 Text, Rate_90 Text, Tritium_purity Text, Summary Text )");
- $sql_select="SELECT * FROM $tableName ORDER BY ID DESC";
- $result=$db->query($sql_select);
- echo "<table width='100%'>";
- echo "<tr>";
- $numColumns=$result->numColumns();
- for ($i = 1; $i < $numColumns; $i++)
- {
- $colname=$result->columnName($i);
- $colname = str_replace('_', ' ', $colname);
- if (strlen($tableName) < 5 || $i != 11) // column 11 = LARA, which is skipped since KNM10 (length 5, KNM9 and before length 4)
- {
- if ($i < 5){
- echo "<th>$colname</th>";
- }
- else {
- echo "<th class='vertical'><div class='vertical'>$colname</div></th>";
- }
- }
- }
- echo "</tr>";
- $rowCount = 0;
- $lastChecked = '';
- while($row = $result->fetchArray(SQLITE3_NUM))
- {
- echo "<tr>";
- for ($i = 1; $i < $numColumns-1; $i++)
- {
- $value=$row[$i];
- if ($rowCount == 0 && $i == 1){
- $lastChecked = "runs ($value) <br>";
- }
- if($rowCount == 0 && $i == 3){
- $lastChecked = "$lastChecked $value (UTC)";
- if ($index == 0) echo "<script>localStorage.setItem('lastChecked', '$lastChecked')</script>";
- // store most recent entry (row=0) of latest campaign (index=0) for display in checklist.php
- }
- if (strlen($tableName) < 5 || $i != 11) // skip column 11 = LARA, which is true since KNM10 (length 5, KNM9 and before length 4)
- {
- if ($value == "good"){
- echo "<th id='green'>$value</th>";
- }
- elseif ($value == "bad") {
- echo "<th id='red'>$value</th>";
- }
- else {
- echo "<th id='normal'>$value</th>";
- }
- }
- }
- $value=$row[$numColumns-1];
- echo "<th><button type='submit' onclick='detailedInfo(\"$value\")' id='details'>details</button><th>";
- #echo "<th id='normal'>$value</th>";
- echo "</tr>";
- $rowCount += 1;
- }
- echo "</table>";
- }
- ?>
- <script type="text/javascript">
- function detailedInfo(message) {
- var str = message;
- var alert_string = str.replace(/<br?>/gi, "\n").replace(/<pre?>/gi, "").replace(/<\/pre?>/gi, "");
- alert(alert_string);
- }
- </script>
- <br><br>
- <hr>
- <br>
- <p style="color:grey">
- If you have any suggestions for improvement, please give feedback via <a href="mailto:thuemmler@kit.edu">email</a>.
- </p>
- <br>
- <br>
- </center>
- </body>
- </html>
|