foreach ($hosts as $host)
{
- echo " <tr><th>$host</th></tr>";
+ echo " <tr><th>$host</th>";
+ echo "<td><input type='submit' value='Update $host' /></td></tr>";
$result = $db_handle->query("SELECT DISTINCT attribute FROM MEASUREMENTS WHERE host='$host'");
$attributes = Array();
while($attribute = $result->fetchArray(SQLITE3_ASSOC))
if ( $attribute['attribute'] )
array_push($attributes, $attribute['attribute']);
- echo " <tr>";
- echo " <td>$attribute</td>";
- echo " <td><input type='text' name='$host-$attribute-name' value='' /></td>";
- echo " <td><input type='checkbox' name='$host-$attribute-graph' /></td>";
- echo " <td><input type='text' name='$host-$attribute-min' value='' />".
- ."<input type='text' name='$host-$attribute-max' value='' /></td>";
- echo " <td><input type='text' name='$host-$attribute-duration' value='' /></td>";
- echo " </tr>";
+ foreach($attributes as $attribute)
+ {
+ echo " <tr>";
+ echo " <td>$attribute</td>";
+ echo " <td><input type='text' name='$host-$attribute-name' value='' /></td>";
+ echo " <td><input type='checkbox' name='$host-$attribute-graph' /></td>";
+ echo " <td><input type='text' name='$host-$attribute-min' value='' />".
+ "<input type='text' name='$host-$attribute-max' value='' /></td>";
+ echo " <td><input type='text' name='$host-$attribute-duration' value='' /></td>";
+ echo " </tr>";
+ }
}
?>
</table>