Johny, the patch is good . can be committed.
Anil.
>>> <[EMAIL PROTECTED]> 04/02/07 11:30 PM >>>
Send ifolder- dev mailing list submissions to
ifolder- [EMAIL PROTECTED]
To subscribe or unsubscribe via the World Wide Web, visit
http://forge.novell.com/mailman/listinfo/ifolder- dev
or, via email, send a message with subject or body 'help' to
ifolder- dev- [EMAIL PROTECTED]
You can reach the person managing the list at
ifolder- dev- [EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of ifolder- dev digest..."
Today's Topics:
1. [PATCH] Dont ask pwd for downloading log/report files
(Jacob Johnny)
2. [PATCH] (Ravi Kumar)
3. [PATCH] (Ravi Kumar)
----------------------------------------------------------------------
Message: 1
Date: Sun, 01 Apr 2007 23:50:13 - 0600
From: "Jacob Johnny" <[EMAIL PROTECTED]>
Subject: [Ifolder- dev] [PATCH] Dont ask pwd for downloading log/report
files
To: <ifolder- [EMAIL PROTECTED]>
Message- ID: <[EMAIL PROTECTED]>
Content- Type: text/plain; charset="us- ascii"
Hi,
Patch Attached.
Please review. (would like to know if there is a better way of doing
it. :- ) )
Thanks,
Johnny
-------------- next part --------------
Index: ServerDetails.aspx.cs
===================================================================
--- ServerDetails.aspx.cs (revision 6784)
+++ ServerDetails.aspx.cs (working copy)
@@ - 398,7 +398,35 @@
return rm.GetString( key );
}
+
/// <summary>
+ ///
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ protected void DownloadFile( string url, string fileName )
+ {
+ string fileurl = url + fileName;
+ WebClient wc = new WebClient ();
+ wc.Credentials = web.Credentials;
+
+ Byte[] fileData = null;
+ fileData = wc.DownloadData ( fileurl );
+
+ Response.Clear();
+ Response.Cache.SetCacheability(
HttpCacheability.NoCache );
+ Response.BufferOutput = false;
+ Response.AddHeader(
+ "Content- Disposition",
+ String.Format("attachment;
filename={0}", fileName ) );
+ Response.ContentType = "text/plain";
+ Response.AddHeader("Content- Length",
fileData.Length.ToString() );
+ Response.OutputStream.Write( fileData , 0,
fileData.Length );
+
+ Response.Close();
+ }
+
+ /// <summary>
/// Event handler that gets called when the ViewReport Button
is clicked.
/// </summary>
/// <param name="sender"></param>
@@ - 410,7 +438,10 @@
// Send a request to the report/log file handler.
// TODO : use the public url of the system we are
displaying and redirect there .
if (reportFileName != null && reportFileName !=
string.Empty )
- Response.Redirect ( web.GetServer( ServerID
).PublicUrl + "/admindata/" +reportFileName );
+ {
+ string fileurl = web.GetServer( ServerID
).PrivateUrl + "/admindata/";
+ DownloadFile (fileurl, reportFileName);
+ }
}
/// <summary>
@@ - 435,7 +466,8 @@
}
// Send a request to the log file handler.
- Response.Redirect( web.GetServer( ServerID ).PublicUrl
+ "/admindata/" + logFileName );
+ string fileurl = web.GetServer( ServerID ).PrivateUrl +
"/admindata/";
+ DownloadFile (fileurl, logFileName);
}
#endregion
------------------------------
Message: 2
Date: Mon, 02 Apr 2007 04:01:01 - 0600
From: "Ravi Kumar" <[EMAIL PROTECTED]>
Subject: [Ifolder- dev] [PATCH]
To: <ifolder- [EMAIL PROTECTED]>
Message- ID: <[EMAIL PROTECTED]>
Content- Type: text/plain; charset="us- ascii"
Hi,
-------------- next part --------------
Index: TopNavigation.ascx.cs
===================================================================
--- TopNavigation.ascx.cs (revision 6757)
+++ TopNavigation.ascx.cs (working copy)
@@ - 37,7 +37,7 @@
using System.Xml;
/// <summary>
- /// Summary description for TopNavigation.
+ ///Summary description for TopNavigation.
/// </summary>
public class TopNavigation : System.Web.UI.UserControl
{
@@ - 228,11 +228,24 @@
}
else
{
- UserLink.HRef =
"Users.aspx";
- iFolderLinkHRef
= "iFolders.aspx";
- ServerLink.HRef
= "Servers.aspx";
- SystemLink.HRef
= "SystemInfo.aspx";
- ReportsLinkHRef
= null;
+
+ body =
Page.FindControl( "report" );
+ if ( body !=
null )
+ {
+
UserLink.HRef = "Users.aspx";
+
iFolderLink.HRef = "iFolders.aspx";
+
ServerLink.HRef = "Servers.aspx";
+
SystemLink.HRef = "SystemInfo.aspx";
+
ReportsLink.HRef = null;
+ }
+ else
+ {
+
UserLink.HRef = "Users.aspx";
+
iFolderLink.HRef = "iFolders.aspx";
+
ServerLink.HRef = "Servers.aspx";
+
SystemLink.HRef = "SystemInfo.aspx";
+
ReportsLink.HRef = "Reports.aspx";
+ }
}
}
}
@@ - 343,7 +356,8 @@
{
string type = e.GetType().Name;
- if ( e is SoapException )
+
+ if ( e is SoapException )
{
try
{
------------------------------
Message: 3
Date: Mon, 02 Apr 2007 04:19:54 - 0600
From: "Ravi Kumar" <[EMAIL PROTECTED]>
Subject: [Ifolder- dev] [PATCH]
To: <ifolder- [EMAIL PROTECTED]>
Message- ID: <[EMAIL PROTECTED]>
Content- Type: text/plain; charset="us- ascii"
Hi,
In Web - Admin Top Navigation bar, The reports tab was selected by default.
This Patch fixes that issue
Ravi
-------------- next part --------------
Index: TopNavigation.ascx.cs
===================================================================
--- TopNavigation.ascx.cs (revision 6757)
+++ TopNavigation.ascx.cs (working copy)
@@ - 37,7 +37,7 @@
using System.Xml;
/// <summary>
- /// Summary description for TopNavigation.
+ ///Summary description for TopNavigation.
/// </summary>
public class TopNavigation : System.Web.UI.UserControl
{
@@ - 228,11 +228,24 @@
}
else
{
- UserLink.HRef =
"Users.aspx";
- iFolderLinkHRef
= "iFolders.aspx";
- ServerLink.HRef
= "Servers.aspx";
- SystemLink.HRef
= "SystemInfo.aspx";
- ReportsLinkHRef
= null;
+
+ body =
Page.FindControl( "report" );
+ if ( body !=
null )
+ {
+
UserLink.HRef = "Users.aspx";
+
iFolderLink.HRef = "iFolders.aspx";
+
ServerLink.HRef = "Servers.aspx";
+
SystemLink.HRef = "SystemInfo.aspx";
+
ReportsLink.HRef = null;
+ }
+ else
+ {
+
UserLink.HRef = "Users.aspx";
+
iFolderLink.HRef = "iFolders.aspx";
+
ServerLink.HRef = "Servers.aspx";
+
SystemLink.HRef = "SystemInfo.aspx";
+
ReportsLink.HRef = "Reports.aspx";
+ }
}
}
}
@@ - 343,7 +356,8 @@
{
string type = e.GetType().Name;
- if ( e is SoapException )
+
+ if ( e is SoapException )
{
try
{
------------------------------
_______________________________________________
ifolder- dev mailing list
ifolder- [EMAIL PROTECTED]
http://forge.novell.com/mailman/listinfo/ifolder- dev
End of ifolder- dev Digest, Vol 34, Issue 1
******************************************
_______________________________________________
ifolder-dev mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/ifolder-dev