ispman/ispman-web/cgi-bin/tmpl/hosts addHost.tmpl, NONE, 1.1 editHost.tmpl, 1.10, 1.11 manageHosts.tmpl, 1.10, 1.11
Joerg Delker <[email protected]> Mon, 02 Oct 2006 22:23:58 +0000
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/hosts
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv32090/ispman-web/cgi-bin/tmpl/hosts
Modified Files:
editHost.tmpl manageHosts.tmpl
Added Files:
addHost.tmpl
Log Message:
fixed [ 1553409 ] Web UI: Configure->Hosts and Configure->HostGroups
Index: editHost.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/hosts/editHost.tmpl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- editHost.tmpl 30 May 2004 22:25:59 -0000 1.10
+++ editHost.tmpl 2 Oct 2006 22:23:55 -0000 1.11
@@ -9,30 +9,29 @@
<perl>_("Editing host")</perl> <B><perl>$host->{'ispmanHostName'}</perl></b>
<form>
-<table>
-<tr>
- <td><perl>_("Host Aliases")</perl></td>
- <td><textarea rows="3" cols="18" name=ispmanHostAlias><perl>join "\n", $ispman->as_array($host->{'ispmanHostAlias'})</perl></textarea></td>
-</tr>
-<tr>
- <td><perl>_("IP address")</perl></td>
- <td><input type=text name=ispmanHostIp value="<perl>$host->{'ispmanHostIp'}</perl>"></td>
-</tr>
-<tr>
- <td><perl>_("Description")</perl></td>
- <td><input type=text name=ispmanHostInfo value="<perl>$host->{'ispmanHostInfo'}</perl>"></td>
-</tr>
-
-
-<input type=hidden name="mode" value="modifyHost">
-<input type=hidden name="ispmanHostName" value="<perl>$host->{'ispmanHostName'}</perl>">
- <tr><td align=left colspan=2>
- <input type=button class="button" onClick="document.forms[0].reset()" value="<perl>_("Reset")</perl>">
- <input type=button class="button" onClick="self.location='<perl>$r->url</perl>?mode=deleteHost&hostname=<perl>$host->{'ispmanHostName'}</perl>'" value="<perl>_("Delete")</perl>">
- <input type=button class="button" onClick="document.forms[0].submit()" value="<perl>_("Update")</perl>">
-
- </td></tr>
- </form></table>
-
+ <table>
+ <tr>
+ <td><perl>_("Host Aliases")</perl></td>
+ <td><textarea rows="3" cols="18" name=ispmanHostAlias><perl>join "\n", $ispman->as_array($host->{'ispmanHostAlias'})</perl></textarea></td>
+ </tr>
+ <tr>
+ <td><perl>_("IP address")</perl></td>
+ <td><input type=text name=ispmanHostIp value="<perl>$host->{'ispmanHostIp'}</perl>"></td>
+ </tr>
+ <tr>
+ <td><perl>_("Description")</perl></td>
+ <td><input type=text name=ispmanHostInfo value="<perl>$host->{'ispmanHostInfo'}</perl>"></td>
+ </tr>
+ <tr>
+ <td align=left colspan=2>
+ <input type=hidden name="mode" value="modifyHost">
+ <input type=hidden name="ispmanHostName" value="<perl>$host->{'ispmanHostName'}</perl>">
+ <input type=button class="button" onClick="self.location='<perl>$ENV{'SCRIPT_NAME'}</perl>?mode=manageHosts'" value="<perl>_("Cancel")</perl>">
+ <input type=button class="button" onClick="document.forms[0].reset()" value="<perl>_("Reset")</perl>">
+ <input type=button class="button" onClick="document.forms[0].submit()" value="<perl>_("Update")</perl>">
+ </td>
+ </tr>
+ </table>
+</form>
--- NEW FILE: addHost.tmpl ---
<script language="Javascript">
function checkHostName(str){
if (str.indexOf(" ")!=-1) {
alert("You cannot have spaces in a hostname");
return false;
} else {
return true;
}
}
</script>
<perl>_("Adding new host")</perl>
<form onsubmit="return checkHostName(this.ispmanHostName.value)">
<table>
<tr>
<td><perl>_("Machine hostname")</perl></td>
<td><input type=text name=ispmanHostName value=""></td>
<td><a href="javascript:alert('<perl>_("This is the hostname of the machine. You can find the correct hostname as ispman-agent sees it with the command ispman.myhostname")</perl>')">?</a></td>
</tr>
<tr>
<td><perl>_("Host Aliases")</perl></td>
<td><textarea rows="3" cols="18" name=ispmanHostAlias></textarea></td>
</tr>
<tr>
<td><perl>_("IP Address")</perl></td>
<td><input type=text name=ispmanHostIp value=""></td>
</tr>
<tr>
<td><perl>_("Description")</perl></td>
<td><input type=text name=ispmanHostInfo value=""></td>
</tr>
<tr>
<td align=left colspan=2>
<input type=hidden name="mode" value="addHost">
<input type=button class="button" onClick="self.location='<perl>$ENV{'SCRIPT_NAME'}</perl>?mode=manageHosts'" value="<perl>_("Cancel")</perl>">
<input type=button class="button" onClick="document.forms[0].reset()" value="<perl>_("Reset")</perl>">
<input type=button class="button" onClick="document.forms[0].submit()" value="<perl>_("Add host")</perl>">
</td>
</tr>
</table>
</form>
Index: manageHosts.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/hosts/manageHosts.tmpl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- manageHosts.tmpl 30 May 2004 22:25:59 -0000 1.10
+++ manageHosts.tmpl 2 Oct 2006 22:23:56 -0000 1.11
@@ -1,26 +1,9 @@
-<script language="Javascript">
-function checkHostName(str){
- if (str.indexOf(" ")!=-1) {
- alert("You cannot have spaces in a hostname");
- return false;
- } else {
- return true;
- }
-
-
-}
-</script>
-
-<BR><BR>
-<B><perl>_("Please use the form below to add a new HOST")</perl></b>
-<BR><BR>
-<TABLE class=table width=100% border=0 cellpadding=1 cellspacing=2>
-<TR>
-<TH class=menuheader><perl>_("Hostname")</perl></th>
-<TH class=menuheader><perl>_("IP Address")</perl></th>
-<TH class=menuheader><perl>_("Description")</perl></th>
-<th class=menuheader> </th>
-<th class=menuheader> </th>
+<table class=table border=0 cellpadding=1 cellspacing=2>
+<tr>
+<th class=menuheader><perl>_("Hostname")</perl></th>
+<th class=menuheader><perl>_("IP Address")</perl></th>
+<th class=menuheader><perl>_("Description")</perl></th>
+<th class=menuheader><perl>_("Actions")</perl></th>
</tr>
<perl>
@@ -42,13 +25,13 @@
$text.= "<TR>";
$text.=join "\n", map{"<TD bgcolor=WHITE>$_</TD>"} ($name, $ip, $description);
- $text.="<TD><A HREF='@{[$r->url]}?mode=editHost&hostname=$hostname'>";
- $text.=_("Edit");
- $text.="</a></td>";
- $text.="<TD><A HREF='@{[$r->url]}?mode=deleteHost&hostname=$hostname'>";
- $text.=_("Delete");
- $text.="</a></td>";
- $text.= "</TR>";
+ $text.=" <td><a href='".$ENV{'SCRIPT_NAME'}."?mode=editHost&hostname=$hostname'>".
+ "<img src='".$ispman->getConfig("ispmanUrlPrefix")."/gfx/modify.gif' border=0>".
+ "</a>";
+ $text.="<a href='".$ENV{'SCRIPT_NAME'}."?mode=deleteHost&hostname=$hostname'>".
+ "<img src='".$ispman->getConfig('ispmanUrlPrefix')."/gfx/delete.gif' border=0>".
+ "</a></td>\n";
+ $text.= "</TR>\n";
}
$text
@@ -58,34 +41,10 @@
<HR>
-
-
-<A NAME="addHost"></a>
-<form onsubmit="return checkHostName(this.ispmanHostName.value)">
-<table>
-<tr>
- <td><perl>_("Machine hostname")</perl></td>
- <td><input type=text name=ispmanHostName value=""></td>
- <td><a href="javascript:alert('<perl>_("This is the hostname of the machine. You can find the correct hostname as ispman-agent sees it with the command ispman.myhostname")</perl>')">?</a></td>
-</tr>
-<tr>
- <td><perl>_("Host Aliases")</perl></td>
- <td><textarea rows="3" cols="18" name=ispmanHostAlias></textarea></td>
-</tr>
-<tr><td><perl>_("IP Address")</perl></td>
- <td><input type=text name=ispmanHostIp value=""></td>
-</tr>
-<tr>
- <td><perl>_("Description")</perl></td>
- <td><input type=text name=ispmanHostInfo value=""></td>
-</tr>
-
-<input type=hidden name="mode" value="addHost">
- <tr><td align=right colspan=2>
- <input type=button class="button" onClick="document.forms[0].reset()" value="<perl>_("Reset")</perl>">
- <input type=button class="button" onClick="document.forms[0].submit()" value="<perl>_("Add host")</perl>">
- </td></tr>
- </form></table>
+<form>
+ <input type=button class="button" onClick="self.location='<perl>$ENV{'SCRIPT_NAME'}</perl>?mode=configure'" value="<perl>_("Back")</perl>">
+ <input type=button class="button" onClick="self.location='<perl>$ENV{'SCRIPT_NAME'}</perl>?mode=addHostForm'" value="<perl>_("Add host")</perl>">
+</form>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV