/[H9]/trunk/tntnet/dynamic/installationdetails.ecpp
ViewVC logotype

Diff of /trunk/tntnet/dynamic/installationdetails.ecpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 122 by torben, Sun Dec 2 16:56:14 2007 UTC revision 159 by torben, Wed Dec 5 14:39:35 2007 UTC
# Line 74  if (res.size() >0 ) Line 74  if (res.size() >0 )
74          </tr>          </tr>
75          <tr>          <tr>
76                  <td>Comm. status: </td>                  <td>Comm. status: </td>
77                  <td><img src="bullet.php?rgb=<$ (res[0].getBool(6) ? "ff0000" : "00ff00") $>" alt="Status Indicator"></td>                  <td><img src="bullet?rgb=<$ (res[0].getBool(6) ? "ff0000" : "00ff00") $>" alt="Status Indicator"></td>
78          </tr>          </tr>
79    
80    
# Line 88  if (res.size() >0 ) Line 88  if (res.size() >0 )
88          query << "SELECT messagenr, date_trunc('second', logtime) AS logtime, temperature, flamedetector, solidfuelempty, conveyorerror,powerfailure ";          query << "SELECT messagenr, date_trunc('second', logtime) AS logtime, temperature, flamedetector, solidfuelempty, conveyorerror,powerfailure ";
89          query << "FROM logtable ";          query << "FROM logtable ";
90          query << "WHERE installationnr = " << id;          query << "WHERE installationnr = " << id;
91          query << "ORDER BY messagenr DESC";          query << "ORDER BY messagenr DESC, logtime DESC ";
92          res = conn.select(query.str());          res = conn.select(query.str());
93    
94    
95          out << "<table border=1 cellspacing=0 align='center'>\n";          out << "<table border=1 cellspacing=0 align='center'>\n";
96          out << "<tr><th>&nbsp;Message#&nbsp;</th><th>&nbsp;Logtime&nbsp;</th><th>&nbsp;Temperature&nbsp;</th><th>&nbsp;Flamedetector&nbsp;</th><th>&nbsp;Solidfuel empty&nbsp;</th><th>&nbsp;Conveyor error&nbsp;</th><th>&nbsp;Power failure&nbsp;</th></tr>\n";          out << "<tr><th>&nbsp;Message#&nbsp;</th><th>&nbsp;Logtime&nbsp;</th><th>&nbsp;Temperature&nbsp;</th><th>&nbsp;Flamedetector&nbsp;</th><th>&nbsp;Solidfuel empty&nbsp;</th><th>&nbsp;Conveyor error&nbsp;</th><th>&nbsp;Power failure&nbsp;</th></tr>\n";
97    
98          for (int i=0; i<res.size(); ++i)          for (unsigned int i=0; i<res.size(); ++i)
99          {          {
100                  int messagenr = res[i].getInt(0);                  int messagenr = res[i].getInt(0);
101                  std::string logtime = res[i].getString(1);                  std::string logtime = res[i].getString(1);

Legend:
Removed from v.122  
changed lines
  Added in v.159

  ViewVC Help
Powered by ViewVC 1.1.20