Add hostname to the variable list.

This commit is contained in:
Mark Crane
2015-03-25 20:30:17 +00:00
parent 9e6e1ee6e2
commit d8144b48ff
3 changed files with 18 additions and 16 deletions

View File

@@ -70,15 +70,15 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "var_value";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "var_hostname";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(255)";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "var_value";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "var_cat";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";

View File

@@ -222,17 +222,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-hostname']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='var_hostname' maxlength='255' value=\"$var_hostname\">\n";
echo "<br />\n";
echo $text['description-hostname']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " ".$text['label-value']."\n";
@@ -244,6 +233,17 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-hostname']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='var_hostname' maxlength='255' value=\"$var_hostname\">\n";
echo "<br />\n";
echo $text['description-hostname']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-category']."\n";

View File

@@ -97,6 +97,7 @@ else {
$tmp_var_header .= "<tr>\n";
$tmp_var_header .= th_order_by('var_name', $text['label-name'], $order_by, $order);
$tmp_var_header .= th_order_by('var_value', $text['label-value'], $order_by, $order);
$tmp_var_header .= th_order_by('var_hostname', $text['label-hostname'], $order_by, $order);
$tmp_var_header .= th_order_by('var_enabled', $text['label-enabled'], $order_by, $order);
$tmp_var_header .= "<th>".$text['label-description']."</th>\n";
$tmp_var_header .= "<td class='list_control_icons'>";
@@ -151,6 +152,7 @@ else {
echo " <td valign='top' align='left' class='".$row_style[$c]."'>";
echo " <a href='?id=".$row['var_uuid']."&enabled=".(($row['var_enabled'] == 'true') ? 'false' : 'true')."'>".(($row['var_enabled'] == 'true') ? $text['option-true'] : $text['option-false'])."</a>";
echo " </td>\n";
echo " <td valign='top' align='left' class='row_stylebg'>".$var_hostname."&nbsp;</td>\n";
$var_description = str_replace("\n", "<br />", trim(substr(base64_decode($row['var_description']),0,40)));
$var_description = str_replace(" ", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", $var_description);
echo " <td valign='top' align='left' class='row_stylebg'>".$var_description."&nbsp;</td>\n";
@@ -192,4 +194,4 @@ else {
//include the footer
require_once "resources/footer.php";
?>
?>