Merge Changes from Helicon for WebPI 4.0
This commit is contained in:
commit
d40318256a
23 changed files with 182 additions and 74 deletions
|
@ -187,7 +187,7 @@
|
|||
<value>Applications Installer</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.WebApplicationsGallery" xml:space="preserve">
|
||||
<value>Microsoft Web Application Gallery</value>
|
||||
<value>Web Application Gallery</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.AuditLog" xml:space="preserve">
|
||||
<value>Audit Log</value>
|
||||
|
|
|
@ -445,7 +445,7 @@
|
|||
<value>{user} - {space} - Web Site IP Addresses</value>
|
||||
</data>
|
||||
<data name="PageTitle.SpaceWebApplicationsGallery" xml:space="preserve">
|
||||
<value>{user} - {space} - Microsoft Web Application Gallery</value>
|
||||
<value>{user} - {space} - Web Application Gallery</value>
|
||||
</data>
|
||||
<data name="PageName.SpaceWeb" xml:space="preserve">
|
||||
<value>Web</value>
|
||||
|
|
|
@ -327,7 +327,10 @@ namespace WebsitePanel.Portal
|
|||
if (string.IsNullOrEmpty(wpiLogsDir))
|
||||
{
|
||||
wpiLogsDir = ES.Services.Servers.WpiGetLogFileDirectory(PanelRequest.ServerId);
|
||||
ViewState[_wpiLogsDirViewStateKey] = wpiLogsDir;
|
||||
if (!string.IsNullOrEmpty(wpiLogsDir))
|
||||
{
|
||||
ViewState[_wpiLogsDirViewStateKey] = wpiLogsDir;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
@ -532,37 +535,51 @@ namespace WebsitePanel.Portal
|
|||
protected void ShowLogsButton_OnClick(object sender, EventArgs e)
|
||||
{
|
||||
//show logs
|
||||
|
||||
string wpiLogsDir = null;
|
||||
object[] logsEntrys = null;
|
||||
try
|
||||
{
|
||||
string wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
|
||||
wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
|
||||
|
||||
if (!string.IsNullOrEmpty(wpiLogsDir))
|
||||
{
|
||||
//Get logs !!!
|
||||
object[] logsEntrys = ES.Services.Servers.WpiGetLogsInDirectory(PanelRequest.ServerId, wpiLogsDir);
|
||||
logsEntrys = ES.Services.Servers.WpiGetLogsInDirectory(PanelRequest.ServerId, wpiLogsDir);
|
||||
|
||||
WpiLogsPanel.Visible = true;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
foreach (SettingPair entry in logsEntrys)
|
||||
if (null == logsEntrys)
|
||||
{
|
||||
string fileName = (string)entry.Name;
|
||||
string fileContent = (string)entry.Value;
|
||||
sb.AppendLine().AppendFormat("<h3>{0}</h3>", fileName).AppendLine().Append(fileContent).AppendLine();
|
||||
WpiLogsPanel.Visible = true;
|
||||
string msg = string.Format("Could not get logs files. Log files folder:\n{0}", wpiLogsDir);
|
||||
WpiLogsPre.InnerText = msg;
|
||||
}
|
||||
else
|
||||
{
|
||||
WpiLogsPanel.Visible = true;
|
||||
|
||||
WpiLogsPre.InnerHtml = sb.ToString();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
ShowLogsButton.Visible = false;
|
||||
ProgressTimer.Enabled = false;
|
||||
foreach (SettingPair entry in logsEntrys)
|
||||
{
|
||||
string fileName = (string) entry.Name;
|
||||
string fileContent = (string) entry.Value;
|
||||
sb.AppendLine().AppendFormat("<h3>{0}</h3>", fileName).AppendLine().Append(fileContent).
|
||||
AppendLine();
|
||||
}
|
||||
|
||||
WpiLogsPre.InnerHtml = sb.ToString();
|
||||
|
||||
ShowLogsButton.Visible = false;
|
||||
ProgressTimer.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
WpiLogsPanel.Visible = true;
|
||||
WpiLogsPre.InnerText = ex.ToString();
|
||||
string msg = string.Format("wpiLogsDir: {0}\nlogsEntrys is null: {1}\n{2}", wpiLogsDir, logsEntrys == null, ex);
|
||||
WpiLogsPre.InnerText = msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ ul.WPIKeywordList>li {
|
|||
<asp:hyperlink NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
|
||||
runat="server" ID="Hyperlink3" ToolTip='<%# Eval("Title") %>'>
|
||||
<asp:Image runat="server" ID="Image1" Width="120" Height="120"
|
||||
ImageUrl='<%# "~/DesktopModules/WebsitePanel/ResizeImage.ashx?width=120&height=120&url=" + Server.UrlEncode((string)Eval("IconUrl")) %>'
|
||||
ImageUrl='<%# GetIconUrlOrDefault((string)Eval("IconUrl")) %>'
|
||||
AlternateText='<%# Eval("Title") %>'>
|
||||
</asp:Image>
|
||||
</asp:hyperlink>
|
||||
|
|
|
@ -178,5 +178,15 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
ES.Services.WebApplicationGallery.SetResourceLanguage(PanelSecurity.PackageId, lang);
|
||||
}
|
||||
|
||||
protected string GetIconUrlOrDefault(string url)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
{
|
||||
return "/App_Themes/Default/icons/sphere_128.png";
|
||||
}
|
||||
|
||||
return "~/DesktopModules/WebsitePanel/ResizeImage.ashx?width=120&height=120&url=" + Server.UrlEncode(url);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue