r3787 - in trunk/varnish-tools/webgui: Varnish css templates

petter at projects.linpro.no petter at projects.linpro.no
Thu Feb 19 15:10:35 CET 2009


Author: petter
Date: 2009-02-19 15:10:35 +0100 (Thu, 19 Feb 2009)
New Revision: 3787

Modified:
   trunk/varnish-tools/webgui/Varnish/DB.pm
   trunk/varnish-tools/webgui/Varnish/RequestHandler.pm
   trunk/varnish-tools/webgui/css/web.css
   trunk/varnish-tools/webgui/templates/node_management.tmpl
Log:
Some minor cosmetics and bugs discovered during documentation writing.


Modified: trunk/varnish-tools/webgui/Varnish/DB.pm
===================================================================
--- trunk/varnish-tools/webgui/Varnish/DB.pm	2009-02-18 15:36:25 UTC (rev 3786)
+++ trunk/varnish-tools/webgui/Varnish/DB.pm	2009-02-19 14:10:35 UTC (rev 3787)
@@ -131,7 +131,7 @@
 		my $sth = $dbh->prepare($sql);
 		$sth->execute($node->get_id());
 
-		$sql = "DELETE FROM parameters WHERE node_id = ?";
+		$sql = "DELETE FROM stat WHERE node_id = ?";
 		$sth = $dbh->prepare($sql);
 		$sth->execute($node->get_id());
 	

Modified: trunk/varnish-tools/webgui/Varnish/RequestHandler.pm
===================================================================
--- trunk/varnish-tools/webgui/Varnish/RequestHandler.pm	2009-02-18 15:36:25 UTC (rev 3786)
+++ trunk/varnish-tools/webgui/Varnish/RequestHandler.pm	2009-02-19 14:10:35 UTC (rev 3787)
@@ -837,11 +837,13 @@
 				Varnish::NodeManager->add_node($node, $inherit_settings);
 				$status .= "Node " . $node->get_name() . " added successfully.";
 				
+				my $group = Varnish::NodeManager->get_group($param{'group_id'});
+				my $group_name = ($group ? $group->get_name() : "");
 				log_info("[" . $node->get_name() . "] [Added node]"
 					. " [name=" . $node->get_name() . "]"
 					. " [address=" . $node->get_address() . "]"
 					. " [port=" . $node->get_port() . "]"
-					. " [group=" . $param{'group_name'} . "]"
+					. " [group=" . $group_name . "]"
 					. " [management_port=" . $node->get_management_port() . "]");
 			}
 			else {
@@ -864,11 +866,15 @@
 				
 				Varnish::NodeManager->update_node($node);
 
+				$status .= "Node " . $node->get_name() . " updated successfully.";
+
+				my $group = Varnish::NodeManager->get_group($param{'node_group_id'});
+				my $group_name = ($group ? $group->get_name() : "");
 				log_info("[" . $node->get_name() . "] [Updated node]"
 					. " [name=" . $node->get_name() . "]"
 					. " [address=" . $node->get_address() . "]"
 					. " [port=" . $node->get_port() . "]"
-					. " [group=" . $param{'group_name'} . "]"
+					. " [group=" . $group_name . "]"
 					. " [management_port=" . $node->get_management_port() . "]");
 			}
 		}

Modified: trunk/varnish-tools/webgui/css/web.css
===================================================================
--- trunk/varnish-tools/webgui/css/web.css	2009-02-18 15:36:25 UTC (rev 3786)
+++ trunk/varnish-tools/webgui/css/web.css	2009-02-19 14:10:35 UTC (rev 3787)
@@ -189,10 +189,6 @@
 	padding: 5px;
 }
 
-td.addNodeBorder {
-	margin: 15px;
-}
-
 img.goToNodeManagement {
 	border-width: 0 0 1px 0;
 }

Modified: trunk/varnish-tools/webgui/templates/node_management.tmpl
===================================================================
--- trunk/varnish-tools/webgui/templates/node_management.tmpl	2009-02-18 15:36:25 UTC (rev 3786)
+++ trunk/varnish-tools/webgui/templates/node_management.tmpl	2009-02-19 14:10:35 UTC (rev 3787)
@@ -42,7 +42,7 @@
 </TMPL_IF>
 <td class="header">Address</td>
 <td class="header">Port</td>
-<td class="header">Management port</td>
+<td class="header">Management<br/>port</td>
 <td></td></tr>
 <TMPL_LOOP NAME=NODE_INFOS>
 <TMPL_IF NAME=__ODD__>
@@ -155,7 +155,7 @@
 <td><input type="text" name="port" size=5/></td>
 <td><input type="text" name="management_port" value="<TMPL_VAR NAME=DEFAULT_MANAGEMENT_PORT>"/></td>
 <TMPL_IF NAME=SHOW_INHERIT_SETTINGS>
-<td><input type="checkbox" name="inherit_settings" value="true" <TMPL_IF NAME=INHERIT_SETTINGS>checked</TMPL_IF>></td><td>Group inherit settings</td>
+<td colspan=3> <input type="checkbox" name="inherit_settings" value="true" <TMPL_IF NAME=INHERIT_SETTINGS>checked</TMPL_IF>>Group inherit<br/> settings</td>
 </TMPL_IF>
 <td>
 <input type="hidden" name="group_id" value="<TMPL_VAR NAME=GROUP_ID>"/>



More information about the varnish-commit mailing list