Merge
This commit is contained in:
commit
4564bff8cd
44 changed files with 4282 additions and 144 deletions
|
@ -56,15 +56,15 @@ namespace WebsitePanel.Portal
|
|||
set { ViewState["DisplayText"] = value; }
|
||||
}
|
||||
|
||||
public int Progress
|
||||
public long Progress
|
||||
{
|
||||
get { return (ViewState["Progress"] != null) ? (int)ViewState["Progress"] : 0; }
|
||||
get { return (ViewState["Progress"] != null) ? (long)ViewState["Progress"] : 0; }
|
||||
set { ViewState["Progress"] = value; }
|
||||
}
|
||||
|
||||
public int Total
|
||||
public long Total
|
||||
{
|
||||
get { return (ViewState["Total"] != null) ? (int)ViewState["Total"] : 0; }
|
||||
get { return (ViewState["Total"] != null) ? (long)ViewState["Total"] : 0; }
|
||||
set { ViewState["Total"] = value; }
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ namespace WebsitePanel.Portal
|
|||
string bkgSrc = Page.ResolveUrl(PortalUtils.GetThemedImage("gauge_bkg.gif"));
|
||||
|
||||
// calculate the width of the gauge
|
||||
int fTotal = Total;
|
||||
long fTotal = Total;
|
||||
int percent = (fTotal > 0) ? Convert.ToInt32(Math.Round((double)Progress / (double)fTotal * 100)) : 0;
|
||||
|
||||
double fFilledWidth = (fTotal > 0) ? ((double)Progress / (double)fTotal * Width) : 0;
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace WebsitePanel.Portal
|
|||
|
||||
private void UpdateControl()
|
||||
{
|
||||
int total = gauge.Total;
|
||||
long total = gauge.Total;
|
||||
if (QuotaTypeId == 1)
|
||||
{
|
||||
litValue.Text = (total == 0) ? GetLocalizedString("Text.Disabled") : GetLocalizedString("Text.Enabled");
|
||||
|
|
|
@ -211,18 +211,24 @@ namespace WebsitePanel.Portal.UserControls
|
|||
|
||||
private void ShowActionList()
|
||||
{
|
||||
var checkboxColumn = gvItems.Columns[0];
|
||||
websiteActions.Visible = false;
|
||||
mailActions.Visible = false;
|
||||
checkboxColumn.Visible = false;
|
||||
|
||||
switch (QuotaName)
|
||||
{
|
||||
case "Web.Sites":
|
||||
websiteActions.Visible = true;
|
||||
checkboxColumn.Visible = true;
|
||||
break;
|
||||
case "Mail.Accounts":
|
||||
ProviderInfo provider = ES.Services.Servers.GetPackageServiceProvider(PanelSecurity.PackageId, "Mail");
|
||||
if (provider.EditorControl == "SmarterMail100")
|
||||
{
|
||||
mailActions.Visible = true;
|
||||
checkboxColumn.Visible = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -213,6 +213,9 @@
|
|||
<data name="Heartbeat.OK" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Heartbeat.Paused" xml:space="preserve">
|
||||
<value>Paused</value>
|
||||
</data>
|
||||
<data name="locChangeHostname.Text" xml:space="preserve">
|
||||
<value>Change VPS Host Name</value>
|
||||
</data>
|
||||
|
@ -273,6 +276,9 @@
|
|||
<data name="State.Starting" xml:space="preserve">
|
||||
<value>Starting</value>
|
||||
</data>
|
||||
<data name="State.Running" xml:space="preserve">
|
||||
<value>Running</value>
|
||||
</data>
|
||||
<data name="State.Stopping" xml:space="preserve">
|
||||
<value>Stopping</value>
|
||||
</data>
|
||||
|
|
|
@ -98,9 +98,9 @@ namespace WebsitePanel.Portal.VPS
|
|||
TimeSpan uptime = TimeSpan.FromMilliseconds(vm.Uptime);
|
||||
uptime = uptime.Subtract(TimeSpan.FromMilliseconds(uptime.Milliseconds));
|
||||
litUptime.Text = uptime.ToString();
|
||||
litStatus.Text = GetLocalizedString("State." + vm.State.ToString());
|
||||
litStatus.Text = GetLocalizedString("State." + vm.State);
|
||||
litCreated.Text = vm.CreatedDate.ToString();
|
||||
litHeartbeat.Text = GetLocalizedString("Heartbeat." + vm.Heartbeat.ToString());
|
||||
litHeartbeat.Text = GetLocalizedString("Heartbeat." + vm.Heartbeat);
|
||||
|
||||
// CPU
|
||||
cpuGauge.Progress = vm.CpuUsage;
|
||||
|
@ -155,7 +155,7 @@ namespace WebsitePanel.Portal.VPS
|
|||
|| vm.State == VirtualMachineState.Saved))
|
||||
buttons.Add(CreateActionButton("Start", "start.png"));
|
||||
|
||||
if (vm.State == VirtualMachineState.Started)
|
||||
if (vm.State == VirtualMachineState.Running)
|
||||
{
|
||||
if(vmi.RebootAllowed)
|
||||
buttons.Add(CreateActionButton("Reboot", "reboot.png"));
|
||||
|
@ -165,12 +165,12 @@ namespace WebsitePanel.Portal.VPS
|
|||
}
|
||||
|
||||
if (vmi.StartTurnOffAllowed
|
||||
&& (vm.State == VirtualMachineState.Started
|
||||
&& (vm.State == VirtualMachineState.Running
|
||||
|| vm.State == VirtualMachineState.Paused))
|
||||
buttons.Add(CreateActionButton("TurnOff", "turnoff.png"));
|
||||
|
||||
if (vmi.PauseResumeAllowed
|
||||
&& vm.State == VirtualMachineState.Started)
|
||||
&& vm.State == VirtualMachineState.Running)
|
||||
buttons.Add(CreateActionButton("Pause", "pause.png"));
|
||||
|
||||
if (vmi.PauseResumeAllowed
|
||||
|
@ -178,7 +178,7 @@ namespace WebsitePanel.Portal.VPS
|
|||
buttons.Add(CreateActionButton("Resume", "start2.png"));
|
||||
|
||||
if (vmi.ResetAllowed
|
||||
&& (vm.State == VirtualMachineState.Started
|
||||
&& (vm.State == VirtualMachineState.Running
|
||||
|| vm.State == VirtualMachineState.Paused))
|
||||
buttons.Add(CreateActionButton("Reset", "reset2.png"));
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
</asp:DropDownList>
|
||||
</div>
|
||||
</fieldset>
|
||||
</asp:PlaceHolder>
|
||||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder runat="server" ID="ChooseDatabaseUserPanel">
|
||||
<fieldset>
|
||||
<legend>
|
||||
|
@ -120,6 +120,7 @@
|
|||
<td>
|
||||
<asp:Panel ID="sharedIP" runat="server">
|
||||
<asp:Localize ID="locSharedIPAddress" runat="server" meta:resourcekey="locSharedIPAddress" Text="IP address: Shared" />
|
||||
<asp:Label ID="lblSharedIP" runat="server"/>
|
||||
|
||||
<asp:LinkButton ID="cmdSwitchToDedicatedIP" meta:resourcekey="cmdSwitchToDedicatedIP" runat="server" Text="Switch to dedicated IP" OnClick="cmdSwitchToDedicatedIP_Click"></asp:LinkButton>
|
||||
</asp:Panel>
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace WebsitePanel.Portal
|
|||
new Tab { Id = "webman", ResourceKey = "Tab.WebManagement", Quota = Quotas.WEB_REMOTEMANAGEMENT, ViewId = "tabWebManagement" },
|
||||
new Tab { Id = "SSL", ResourceKey = "Tab.SSL", Quota = Quotas.WEB_SSL, ViewId = "SSL" },
|
||||
};
|
||||
|
||||
protected string SharedIdAddres { get; set; }
|
||||
private int PackageId
|
||||
{
|
||||
get { return (int)ViewState["PackageId"]; }
|
||||
|
@ -198,6 +198,16 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
litIPAddress.Text = site.SiteIPAddress;
|
||||
}
|
||||
else
|
||||
{
|
||||
IPAddressInfo[] ipsGeneral = ES.Services.Servers.GetIPAddresses(IPAddressPool.General, PanelRequest.ServerId);
|
||||
bool generalIPExists = ipsGeneral.Any() && !string.IsNullOrEmpty(ipsGeneral[0].ExternalIP);
|
||||
if (generalIPExists)
|
||||
{
|
||||
lblSharedIP.Text = string.Format("({0})", ipsGeneral[0].ExternalIP);
|
||||
}
|
||||
lblSharedIP.Visible = generalIPExists;
|
||||
}
|
||||
|
||||
dedicatedIP.Visible = site.IsDedicatedIP;
|
||||
sharedIP.Visible = !site.IsDedicatedIP;
|
||||
|
@ -312,7 +322,7 @@ namespace WebsitePanel.Portal
|
|||
// AppPool
|
||||
AppPoolState appPoolState = ES.Services.WebServers.GetAppPoolState(PanelRequest.ItemID);
|
||||
BindAppPoolState(appPoolState);
|
||||
|
||||
|
||||
// bind pointers
|
||||
BindPointers();
|
||||
|
||||
|
|
|
@ -1,37 +1,9 @@
|
|||
// Copyright (c) 2015, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -238,6 +210,15 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locSharedIPAddress;
|
||||
|
||||
/// <summary>
|
||||
/// lblSharedIP control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblSharedIP;
|
||||
|
||||
/// <summary>
|
||||
/// cmdSwitchToDedicatedIP control.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue