This commit is contained in:
Virtuworks 2015-05-15 11:59:48 -04:00
commit df88b36378
34 changed files with 458 additions and 289 deletions

View file

@ -943,6 +943,32 @@ namespace WebsitePanel.EnterpriseServer {
return ((System.Data.DataSet)(results[0]));
}
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSearchTableByColumns", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public System.Data.DataSet GetSearchTableByColumns(string PagedStored, string FilterValue, int MaximumRows,
bool Recursive, int PoolID, int ServerID, int StatusID, int PlanID, int OrgID,
string ItemTypeName, string GroupName, int PackageID, string VPSType, int RoleID, int UserID,
string FilterColumns)
{
object[] results = this.Invoke("GetSearchTableByColumns", new object[] {
PagedStored,
FilterValue,
MaximumRows,
Recursive,
PoolID,
ServerID,
StatusID,
PlanID,
OrgID,
ItemTypeName,
GroupName,
PackageID,
VPSType,
RoleID,
UserID,
FilterColumns
});
return ((System.Data.DataSet)(results[0]));
}
//TODO END
/// <remarks/>

View file

@ -160,6 +160,31 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@FullType", fullType),
new SqlParameter("@OnlyFind", onlyFind));
}
public static DataSet GetSearchTableByColumns(string PagedStored, string FilterValue, int MaximumRows,
bool Recursive, int PoolID, int ServerID, int ActorID, int StatusID, int PlanID, int OrgID,
string ItemTypeName, string GroupName, int PackageID, string VPSType, int RoleID, int UserID,
string FilterColumns)
{
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "GetSearchTableByColumns",
new SqlParameter("@PagedStored", PagedStored),
new SqlParameter("@FilterValue", FilterValue),
new SqlParameter("@MaximumRows", MaximumRows),
new SqlParameter("@Recursive", Recursive),
new SqlParameter("@PoolID", PoolID),
new SqlParameter("@ServerID", ServerID),
new SqlParameter("@ActorID", ActorID),
new SqlParameter("@StatusID", StatusID),
new SqlParameter("@PlanID", PlanID),
new SqlParameter("@OrgID", OrgID),
new SqlParameter("@ItemTypeName", ItemTypeName),
new SqlParameter("@GroupName", GroupName),
new SqlParameter("@PackageID", PackageID),
new SqlParameter("@VPSType", VPSType),
new SqlParameter("@RoleID", RoleID),
new SqlParameter("@UserID", UserID),
new SqlParameter("@FilterColumns", FilterColumns));
}
//TODO END

View file

@ -326,6 +326,15 @@ namespace WebsitePanel.EnterpriseServer
filterColumn, filterValue, statusId, roleId, sortColumn, startRow,
maximumRows, colType, fullType, false, onlyFind);
}
public static DataSet GetSearchTableByColumns(string PagedStored, string FilterValue, int MaximumRows,
bool Recursive, int PoolID, int ServerID, int StatusID, int PlanID, int OrgID,
string ItemTypeName, string GroupName, int PackageID, string VPSType, int RoleID, int UserID,
string FilterColumns)
{
return DataProvider.GetSearchTableByColumns(PagedStored, FilterValue, MaximumRows,
Recursive, PoolID, ServerID, SecurityContext.User.UserId, StatusID, PlanID, OrgID, ItemTypeName, GroupName,
PackageID, VPSType, RoleID, UserID, FilterColumns);
}
//TODO END
public static DataSet GetPackageQuotas(int packageId)

View file

@ -149,6 +149,17 @@ namespace WebsitePanel.EnterpriseServer
{
return PackageController.GetSearchObject(userId, filterColumn, filterValue, statusId, roleId, sortColumn, 0, maximumRows, colType, fullType, true);
}
[WebMethod]
public DataSet GetSearchTableByColumns(string PagedStored, string FilterValue, int MaximumRows,
bool Recursive, int PoolID, int ServerID, int StatusID, int PlanID, int OrgID,
string ItemTypeName, string GroupName, int PackageID, string VPSType, int RoleID, int UserID,
string FilterColumns)
{
return PackageController.GetSearchTableByColumns(PagedStored, FilterValue, MaximumRows,
Recursive, PoolID, ServerID, StatusID, PlanID, OrgID, ItemTypeName, GroupName,
PackageID, VPSType, RoleID, UserID, FilterColumns);
}
//TODO END
[WebMethod]

View file

@ -73,28 +73,31 @@ namespace WebsitePanel.WebPortal
public string EditUrl(string keyName, string keyValue, string controlKey, params string[] additionalParams)
{
List<string> url = new List<string>();
return EditUrlStat(Request[DefaultPage.PAGE_ID_PARAM], ModuleID, keyName, keyValue, controlKey, additionalParams);
}
string pageId = Request[DefaultPage.PAGE_ID_PARAM];
public static string EditUrlStat(string pageId, int ModuleID, string keyName, string keyValue, string controlKey, string[] additionalParams)
{
List<string> url = new List<string>();
if (!String.IsNullOrEmpty(pageId))
url.Add(String.Concat(DefaultPage.PAGE_ID_PARAM, "=", pageId));
url.Add(String.Concat(DefaultPage.PAGE_ID_PARAM, "=", pageId));
url.Add(String.Concat(DefaultPage.MODULE_ID_PARAM, "=", ModuleID));
url.Add(String.Concat(DefaultPage.CONTROL_ID_PARAM, "=", controlKey));
url.Add(String.Concat(DefaultPage.MODULE_ID_PARAM, "=", ModuleID));
url.Add(String.Concat(DefaultPage.CONTROL_ID_PARAM, "=", controlKey));
if (!String.IsNullOrEmpty(keyName) && !String.IsNullOrEmpty(keyValue))
{
url.Add(String.Concat(keyName, "=", keyValue));
}
if (!String.IsNullOrEmpty(keyName) && !String.IsNullOrEmpty(keyValue))
{
url.Add(String.Concat(keyName, "=", keyValue));
}
if (additionalParams != null)
{
foreach(string additionalParam in additionalParams)
url.Add(additionalParam);
}
if (additionalParams != null)
{
foreach (string additionalParam in additionalParams)
url.Add(additionalParam);
}
return "~/Default.aspx?" + String.Join("&", url.ToArray());
}
return "~/Default.aspx?" + String.Join("&", url.ToArray());
}
}
}

View file

@ -9,12 +9,71 @@ namespace WebsitePanel.WebPortal
{
public class WebsitePanelAjaxHandler : IHttpHandler
{
public bool IsReusable { get { return true; } }
public void ProcessRequest(HttpContext context)
{
String filterValue = context.Request.Params["term"];
String fullType = context.Request.Params["fullType"];
if (fullType == "TableSearch")
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
string PagedStored = context.Request.Params["PagedStored"];
string FilterValue = context.Request.Params["FilterValue"];
string strMaximumRows = context.Request.Params["MaximumRows"];
int MaximumRows = strMaximumRows != null ? Int32.Parse(strMaximumRows) : 15;
string strRecursive = context.Request.Params["Recursive"];
bool Recursive = strRecursive != null ? serializer.Deserialize<Boolean>(strRecursive) : false;
string strPoolID = context.Request.Params["PoolID"];
int PoolID = strPoolID != null ? Int32.Parse(strPoolID) : 0;
string strServerID = context.Request.Params["ServerID"];
int ServerID = !String.IsNullOrEmpty(strServerID) ? Int32.Parse(strServerID) : 0;
string strStatusID = context.Request.Params["StatusID"];
int StatusID = !String.IsNullOrEmpty(strStatusID) ? Int32.Parse(strStatusID) : 0;
string strPlanID = context.Request.Params["PlanID"];
int PlanID = !String.IsNullOrEmpty(strPlanID) ? Int32.Parse(strPlanID) : 0;
string strOrgID = context.Request.Params["OrgID"];
int OrgID = !String.IsNullOrEmpty(strOrgID) ? Int32.Parse(strOrgID) : 0;
string ItemTypeName = context.Request.Params["ItemTypeName"];
string GroupName = context.Request.Params["GroupName"];
string strPackageID = context.Request.Params["PackageID"];
int PackageID = !String.IsNullOrEmpty(strPackageID) ? Int32.Parse(strPackageID) : -1;
string VPSType = context.Request.Params["VPSType"];
string strRoleID = context.Request.Params["RoleID"];
int RoleID = !String.IsNullOrEmpty(strRoleID) ? Int32.Parse(strRoleID) : 0;
string strUserID = context.Request.Params["UserID"];
int UserID = !String.IsNullOrEmpty(strUserID) ? Int32.Parse(strUserID) : 0;
string FilterColumns = context.Request.Params["FilterColumns"];
string RedirectUrl = context.Request.Params["RedirectUrl"];
DataSet dsObjectItems = ES.Services.Packages.GetSearchTableByColumns(PagedStored,
String.Format("%{0}%", FilterValue), MaximumRows, Recursive, PoolID, ServerID,
StatusID, PlanID, OrgID, ItemTypeName, GroupName, PackageID, VPSType, RoleID, UserID,
FilterColumns);
DataTable dt = dsObjectItems.Tables[0];
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
string Redirect = context.Request.Params["Redirect"];
for (int i = 0; i < dt.Rows.Count; ++i)
{
DataRow row = dt.Rows[i];
Dictionary<string, string> obj = new Dictionary<string, string>();
if (!String.IsNullOrEmpty(RedirectUrl) && ((int)row["Count"] == 1))
obj["url"] = String.Format(RedirectUrl, row["ItemID"].ToString());
obj["TextSearch"] = row["TextSearch"].ToString();
obj["ColumnType"] = row["ColumnType"].ToString();
dataList.Add(obj);
}
var jsonSerialiser = new JavaScriptSerializer();
var json = jsonSerialiser.Serialize(dataList);
context.Response.ContentType = "text/plain";
context.Response.Write(json);
return;
}
String filterValue = context.Request.Params["term"];
String columnType = context.Request.Params["columnType"];
String numResults = context.Request.Params["itemCount"];
int iNumResults = 15;

View file

@ -40,6 +40,7 @@ using System.Linq;
using WebsitePanel.EnterpriseServer;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Portal
{
@ -71,10 +72,14 @@ namespace WebsitePanel.Portal
|| PackagesHelper.CheckGroupQuotaEnabled(PanelSecurity.PackageId, ResourceGroups.Os, Quotas.OS_DOMAINPOINTERS);
searchBox.AddCriteria("DomainName", GetLocalizedString("SearchField.DomainName"));
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
searchBox.AddCriteria("FullName", GetLocalizedString("SearchField.FullName"));
searchBox.AddCriteria("Email", GetLocalizedString("SearchField.Email"));
if ((PanelSecurity.SelectedUser.Role != UserRole.User) && chkRecursive.Checked)
{
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
searchBox.AddCriteria("FullName", GetLocalizedString("SearchField.FullName"));
searchBox.AddCriteria("Email", GetLocalizedString("SearchField.Email"));
}
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
}
public string GetItemEditUrl(object packageId, object itemId)
@ -113,7 +118,7 @@ namespace WebsitePanel.Portal
{
var expirationDate = expirationDateObject as DateTime?;
var lastUpdateDate = LastUpdateDateObject as DateTime?;
if (expirationDate != null && expirationDate < DateTime.Now)
{
return GetLocalizedString("DomainExpirationDate.Expired");
@ -239,5 +244,16 @@ namespace WebsitePanel.Portal
//gvDomains.DataBind();
}
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'Domains'");
res.Append(", RedirectUrl: '" + GetItemEditUrl(Request["SpaceID"] ?? "-1", "{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "-1" : Request["SpaceID"]));
res.Append(", ServerID: " + (String.IsNullOrEmpty(Request["ServerID"]) ? "0" : Request["ServerID"]));
res.Append(", Recursive: ($('#" + chkRecursive.ClientID + "').val() == 'on')");
return res.ToString();
}
}
}

View file

@ -65,8 +65,9 @@ namespace WebsitePanel.Portal
searchBox.AddCriteria("DefaultGateway", GetLocalizedString("SearchField.DefaultGateway"));
searchBox.AddCriteria("ServerName", GetLocalizedString("SearchField.Server"));
searchBox.AddCriteria("ItemName", GetLocalizedString("SearchField.ItemName"));
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
// toggle columns
bool vps = ddlPools.SelectedIndex > 1;
@ -177,5 +178,15 @@ namespace WebsitePanel.Portal
return items.ToArray();
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'IPAddresses'");
res.Append(", RedirectUrl: '" + EditUrl("AddressID", "{0}", "edit_ip", "ReturnUrl=" + GetReturnUrl()).Substring(2) + "'");
res.Append(", PoolID: $('#" + ddlPools.ClientID + "').val()");
res.Append(", ServerID: 0");
return res.ToString();
}
}
}

View file

@ -1,38 +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.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

View file

@ -58,8 +58,9 @@ namespace WebsitePanel.Portal
searchBox.AddCriteria("ExternalIP", GetLocalizedString("SearchField.ExternalIP"));
searchBox.AddCriteria("ServerName", GetLocalizedString("SearchField.Server"));
searchBox.AddCriteria("ItemName", GetLocalizedString("SearchField.ItemName"));
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
}
protected void odsIPAddresses_Selected(object sender, ObjectDataSourceStatusEventArgs e)
@ -153,5 +154,15 @@ namespace WebsitePanel.Portal
return items.ToArray();
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'IPAddresses'");
res.Append(", RedirectUrl: '" + EditUrl("AddressID", "{0}", "edit_phone").Substring(2) + "'");
res.Append(", PoolID: 'PhoneNumbers'");
res.Append(", ServerID: 0");
return res.ToString();
}
}
}

View file

@ -1,38 +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.
// Runtime Version:2.0.50727.3074
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -47,7 +18,6 @@ namespace WebsitePanel.Portal {
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
@ -57,7 +27,6 @@ namespace WebsitePanel.Portal {
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnAddItem;
@ -67,7 +36,6 @@ namespace WebsitePanel.Portal {
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.SearchBox searchBox;
@ -77,7 +45,6 @@ namespace WebsitePanel.Portal {
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvIPAddresses;
@ -87,7 +54,6 @@ namespace WebsitePanel.Portal {
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsIPAddresses;
@ -97,7 +63,6 @@ namespace WebsitePanel.Portal {
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnEditSelected;
@ -107,7 +72,6 @@ namespace WebsitePanel.Portal {
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnDeleteSelected;
@ -117,7 +81,6 @@ namespace WebsitePanel.Portal {
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblItemsPerPage;
@ -127,7 +90,6 @@ namespace WebsitePanel.Portal {
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlItemsPerPage;
}

View file

@ -38,6 +38,7 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
using System.Text;
namespace WebsitePanel.Portal
{
@ -67,6 +68,7 @@ namespace WebsitePanel.Portal
gvSchedules.Columns[gvSchedules.Columns.Count - 1].Visible = !isUser;
gvSchedules.Columns[gvSchedules.Columns.Count - 2].Visible = !isUser;
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
}
protected void odsSchedules_Selected(object sender, ObjectDataSourceStatusEventArgs e)
@ -163,5 +165,15 @@ namespace WebsitePanel.Portal
{
RedirectToBrowsePage();
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'Schedules'");
res.Append(", RedirectUrl: '" + EditUrl("ScheduleID", "{0}", "edit", "SpaceID=" + PanelSecurity.PackageId).Substring(2) + "'");
res.Append(", PackageID: " + PanelSecurity.PackageId.ToString());
res.Append(", Recursive: ($('#" + chkRecursive.ClientID + "').val() == 'on')");
return res.ToString();
}
}
}

View file

@ -1,31 +1,3 @@
// 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.

View file

@ -36,6 +36,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace WebsitePanel.Portal
{
@ -60,6 +61,7 @@ namespace WebsitePanel.Portal
if (Request["StatusID"] != null)
Utils.SelectListItem(ddlStatus, Request["StatusID"]);
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
}
public string GetUserHomePageUrl(int userId)
@ -87,5 +89,18 @@ namespace WebsitePanel.Portal
e.ExceptionHandled = true;
}
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'NestedPackages'");
res.Append(", RedirectUrl: '" + NavigateURL(PortalUtils.SPACE_ID_PARAM, "{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "0" : Request["SpaceID"]));
res.Append(", StatusID: $('#" + ddlStatus.ClientID + "').val()");
res.Append(", PlanID: " + (String.IsNullOrEmpty(Request["PlanID"]) ? "0" : Request["PlanID"]));
res.Append(", ServerID: " + (String.IsNullOrEmpty(Request["ServerID"]) ? "0" : Request["ServerID"]));
return res.ToString();
}
}
}

View file

@ -1,48 +1,60 @@
// 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.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class SpaceNestedSpaces {
protected WebsitePanel.Portal.SearchBox searchBox;
protected System.Web.UI.WebControls.Label lblStatus;
protected System.Web.UI.WebControls.DropDownList ddlStatus;
protected System.Web.UI.WebControls.GridView gvPackages;
protected System.Web.UI.WebControls.ObjectDataSource odsNestedPackages;
/// <summary>
/// searchBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.SearchBox searchBox;
/// <summary>
/// lblStatus 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 lblStatus;
/// <summary>
/// ddlStatus 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.DropDownList ddlStatus;
/// <summary>
/// gvPackages 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.GridView gvPackages;
/// <summary>
/// odsNestedPackages 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.ObjectDataSource odsNestedPackages;
}
}

View file

@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
@ -87,6 +88,7 @@ namespace WebsitePanel.Portal.UserControls
searchBox.AddCriteria("ItemName", GetLocalizedString("SearchField.ItemName"));
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
bool isUserSelected = PanelSecurity.SelectedUser.Role == WebsitePanel.EnterpriseServer.UserRole.User;
bool isUserLogged = PanelSecurity.EffectiveUser.Role == WebsitePanel.EnterpriseServer.UserRole.User;
@ -177,5 +179,17 @@ namespace WebsitePanel.Portal.UserControls
{
e.InputParameters["pool"] = Pool;
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'PackageIPAddresses'");
res.Append(", RedirectUrl: '" + GetItemEditUrl("{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "0" : Request["SpaceID"]));
res.Append(", OrgID: 0");
res.Append(", PoolID: " + Pool != null ? Pool.ToString() : "0");
res.Append(", Recursive: true");
return res.ToString();
}
}
}

View file

@ -1,38 +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.
// Runtime Version:2.0.50727.1434
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

View file

@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
@ -82,6 +83,7 @@ namespace WebsitePanel.Portal.UserControls
searchBox.AddCriteria("ItemName", GetLocalizedString("SearchField.ItemName"));
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
bool isUserSelected = PanelSecurity.SelectedUser.Role == WebsitePanel.EnterpriseServer.UserRole.User;
bool isUserLogged = PanelSecurity.EffectiveUser.Role == WebsitePanel.EnterpriseServer.UserRole.User;
@ -169,5 +171,17 @@ namespace WebsitePanel.Portal.UserControls
{
e.InputParameters["pool"] = Pool;
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'PackageIPAddresses'");
res.Append(", RedirectUrl: '" + GetItemEditUrl("{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "0" : Request["SpaceID"]));
res.Append(", OrgID: " + (String.IsNullOrEmpty(Request["ItemID"]) ? "0" : Request["ItemID"]));
res.Append(", PoolID: " + Pool != null ? Pool.ToString() : "0");
res.Append(", Recursive: true");
return res.ToString();
}
}
}

View file

@ -1,31 +1,3 @@
// 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.
@ -35,7 +7,6 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.UserControls {

View file

@ -19,15 +19,21 @@
type: "post",
dataType: "json",
data: {
term: request.term,
fullType: 'Users'
// columnType: "'" + $("#ddlFilterColumn").val() + "'"
fullType: "TableSearch",
FilterValue: request.term,
FilterColumns: "<%= GetCriterias() %>",
<%= AjaxData %>
},
url: "AjaxHandler.ashx",
success: function (data) {
response($.map(data, function (item) {
var type = $('#<%= ddlFilterColumn.ClientID %> option[value="' + item.ColumnType + '"]').text();
if (type == null) {
type = item.ColumnType;
}
$('#<%= ddlFilterColumn.ClientID %> :selected').removeAttr('selected')
return {
label: item.TextSearch + " [" + item.ColumnType + "]",
label: item.TextSearch + " [" + type + "]",
code: item
};
}));
@ -36,13 +42,13 @@
},
select: function (event, ui) {
var item = ui.item;
$("#ddlFilterColumn").val(item.code.ColumnType);
$("#tbSearchFullType").val(item.code.FullType);
$("#tbSearchText").val(item.code.TextSearch);
$("#tbObjectId").val(item.code.ItemID);
$("#tbPackageId").val(item.code.PackageID);
$("#tbAccountId").val(item.code.AccountID);
$("#<%= cmdSearch.ClientID %>").trigger("click");
if (item.code.url != null)
window.location.href = item.code.url;
else {
$("#ddlFilterColumn").val(item.code.ColumnType);
$("#tbSearchText").val(item.code.TextSearch);
$("#<%= cmdSearch.ClientID %>").trigger("click");
}
}
});
});//]]>
@ -111,8 +117,8 @@
runat="server"
SkinID="SearchButton"
CausesValidation="false"
OnClick="cmdSearch_Click"
style="vertical-align: middle;"
meta:resourcekey="cmdSearch"
/>
</div>
</td>

View file

@ -41,6 +41,8 @@ namespace WebsitePanel.Portal
{
public partial class SearchBox : WebsitePanelControlBase
{
public string AjaxData { get; set; }
public string FilterColumn
{
get
@ -90,6 +92,18 @@ namespace WebsitePanel.Portal
ddlFilterColumn.Items.Add(new ListItem(columnTitle, columnName));
}
public string GetCriterias()
{
string res = null;
foreach (ListItem itm in ddlFilterColumn.Items)
{
if (res != null)
res += ", ";
res = res + "'" + itm.Value + "'";
}
return res;
}
public override void Focus()
{
base.Focus();

View file

@ -38,6 +38,7 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
using System.Text;
namespace WebsitePanel.Portal.UserControls
{
@ -130,6 +131,7 @@ namespace WebsitePanel.Portal.UserControls
searchBox.AddCriteria("FullName", GetLocalizedString("SearchField.FullName"));
searchBox.AddCriteria("Email", GetLocalizedString("SearchField.EMail"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
}
public string GetUrl(object param1, object param2)
@ -236,5 +238,19 @@ namespace WebsitePanel.Portal.UserControls
}
}
public string GetSearchBoxAjaxData()
{
String spaceId = (String.IsNullOrEmpty(Request["SpaceID"]) ? "-1" : Request["SpaceID"]);
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'ServiceItems'");
res.Append(", RedirectUrl: '" + GetItemEditUrl(spaceId, "{0}").Substring(2) + "'");
res.Append(", PackageID: " + spaceId);
res.Append(", ItemTypeName: $('#" + litTypeName.ClientID + "').val()");
res.Append(", GroupName: $('#" + litGroupName.ClientID + "').val()");
res.Append(", ServerID: " + (String.IsNullOrEmpty(Request["ServerID"]) ? "0" : Request["ServerID"]));
res.Append(", Recursive: ($('#" + chkRecursive.ClientID + "').val() == 'on')");
return res.ToString();
}
}
}

View file

@ -36,6 +36,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace WebsitePanel.Portal
{
@ -71,6 +72,7 @@ namespace WebsitePanel.Portal
if (!AllowEmptySelection)
RemoveMenuItem("switch_empty");
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
}
private void RemoveMenuItem(string name)
@ -140,5 +142,16 @@ namespace WebsitePanel.Portal
{
ToggleSearchPanel(false);
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'Users'");
res.Append(", UserID: " + PanelSecurity.EffectiveUserId.ToString());
res.Append(", StatusID: 0");
res.Append(", RoleID: 0");
res.Append(", Recursive: true");
return res.ToString();
}
}
}

View file

@ -38,6 +38,8 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.WebPortal;
using System.Text;
namespace WebsitePanel.Portal
{
@ -68,7 +70,8 @@ namespace WebsitePanel.Portal
gvUsers.Sort("Username", System.Web.UI.WebControls.SortDirection.Ascending);
}
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
searchBox.Focus();
}
@ -125,5 +128,18 @@ namespace WebsitePanel.Portal
return GetThemedImage("Exchange/" + imgName);
}
public string GetSearchBoxAjaxData()
{
string userHomePageId = PortalConfiguration.SiteSettings["UserHomePage"];
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'Users'");
res.Append(", RedirectUrl: '" + NavigatePageURL(userHomePageId, PortalUtils.USER_ID_PARAM, "{0}").Substring(2) + "'");
res.Append(", UserID: " + (String.IsNullOrEmpty(Request["UserID"]) ? "0" : Request["UserID"]));
res.Append(", StatusID: $('#" + ddlStatus.ClientID + "').val()");
res.Append(", RoleID: $('#" + ddlRole.ClientID + "').val()");
res.Append(", Recursive: false");
return res.ToString();
}
}
}

View file

@ -9,9 +9,9 @@
runat="server" CssClass="Button1"></asp:Button>
</div>
<div class="Right">
<asp:Panel ID="tblSearch" runat="server" CssClass="NormalBold">
<%-- <asp:Panel ID="tblSearch" runat="server" CssClass="NormalBold">
<uc1:SearchBox ID="searchBox" runat="server" />
</asp:Panel>
</asp:Panel> --%>
</div>
</div>
<div class="FormBody">

View file

@ -47,11 +47,11 @@ namespace WebsitePanel.Portal
if (!IsPostBack)
{
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
/*searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
searchBox.AddCriteria("FullName", GetLocalizedString("SearchField.Name"));
searchBox.AddCriteria("Email", GetLocalizedString("SearchField.EMail"));
searchBox.AddCriteria("CompanyName", GetLocalizedString("SearchField.CompanyName"));
searchBox.Focus();
searchBox.Focus();*/
}
}

View file

@ -21,24 +21,6 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCreate;
/// <summary>
/// tblSearch 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.Panel tblSearch;
/// <summary>
/// searchBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.SearchBox searchBox;
/// <summary>
/// allCustomers control.
/// </summary>

View file

@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
@ -46,6 +47,7 @@ namespace WebsitePanel.Portal.VPS
searchBox.AddCriteria("ExternalIP", GetLocalizedString("SearchField.ExternalIP"));
searchBox.AddCriteria("IPAddress", GetLocalizedString("SearchField.IPAddress"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
// toggle columns
bool isUserSelected = PanelSecurity.SelectedUser.Role == WebsitePanel.EnterpriseServer.UserRole.User;
@ -134,5 +136,16 @@ namespace WebsitePanel.Portal.VPS
"ItemID=" + itemId));
}
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'VirtualMachines'");
res.Append(", RedirectUrl: '" + GetServerEditUrl("{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "0" : Request["SpaceID"]));
res.Append(", Recursive: true");
res.Append(", VPSTypeID: 'VPS'");
return res.ToString();
}
}
}

View file

@ -1,38 +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.
// Runtime Version:2.0.50727.3074
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -202,14 +173,5 @@ namespace WebsitePanel.Portal.VPS {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota hddQuota;
/// <summary>
/// FormComments 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.Localize FormComments;
}
}

View file

@ -34,6 +34,7 @@ using System.Web.UI.WebControls;
using WebsitePanel.Providers.Virtualization;
using WebsitePanel.WebPortal;
using WebsitePanel.EnterpriseServer;
using System.Text;
namespace WebsitePanel.Portal.VPS
{
@ -46,6 +47,7 @@ namespace WebsitePanel.Portal.VPS
searchBox.AddCriteria("IPAddress", GetLocalizedString("SearchField.IPAddress"));
searchBox.AddCriteria("ItemName", GetLocalizedString("SearchField.ItemName"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
}
public string GetServerEditUrl(string itemID)
@ -62,5 +64,15 @@ namespace WebsitePanel.Portal.VPS
e.ExceptionHandled = true;
}
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'PackagePrivateIPAddresses'");
res.Append(", RedirectUrl: '" + GetServerEditUrl("{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "0" : Request["SpaceID"]));
res.Append(", VPSTypeID: 'VPS'");
return res.ToString();
}
}
}

View file

@ -28,9 +28,10 @@
using System;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.Virtualization;
using WebsitePanel.Providers.Virtualization;
namespace WebsitePanel.Portal.VPS2012
{
@ -45,6 +46,7 @@ namespace WebsitePanel.Portal.VPS2012
searchBox.AddCriteria("ExternalIP", GetLocalizedString("SearchField.ExternalIP"));
searchBox.AddCriteria("IPAddress", GetLocalizedString("SearchField.IPAddress"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
// toggle columns
bool isUserSelected = PanelSecurity.SelectedUser.Role == WebsitePanel.EnterpriseServer.UserRole.User;
@ -153,5 +155,16 @@ namespace WebsitePanel.Portal.VPS2012
"ItemID=" + itemId));
}
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'VirtualMachines'");
res.Append(", RedirectUrl: '" + GetServerEditUrl("{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "0" : Request["SpaceID"]));
res.Append(", Recursive: true");
res.Append(", VPSTypeID: 'VPS2012'");
return res.ToString();
}
}
}

View file

@ -34,6 +34,7 @@ using System.Web.UI.WebControls;
using WebsitePanel.Providers.Virtualization;
using WebsitePanel.WebPortal;
using WebsitePanel.EnterpriseServer;
using System.Text;
namespace WebsitePanel.Portal.VPS2012
{
@ -46,6 +47,7 @@ namespace WebsitePanel.Portal.VPS2012
searchBox.AddCriteria("IPAddress", GetLocalizedString("SearchField.IPAddress"));
searchBox.AddCriteria("ItemName", GetLocalizedString("SearchField.ItemName"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
}
public string GetServerEditUrl(string itemID)
@ -62,5 +64,15 @@ namespace WebsitePanel.Portal.VPS2012
e.ExceptionHandled = true;
}
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'PackagePrivateIPAddresses'");
res.Append(", RedirectUrl: '" + GetServerEditUrl("{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "0" : Request["SpaceID"]));
res.Append(", VPSTypeID: 'VPS2012'");
return res.ToString();
}
}
}

View file

@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
@ -46,6 +47,7 @@ namespace WebsitePanel.Portal.VPSForPC
searchBox.AddCriteria("ExternalIP", GetLocalizedString("SearchField.ExternalIP"));
searchBox.AddCriteria("IPAddress", GetLocalizedString("SearchField.IPAddress"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
// toggle columns
bool isUserSelected = PanelSecurity.SelectedUser.Role == WebsitePanel.EnterpriseServer.UserRole.User;
@ -138,5 +140,16 @@ namespace WebsitePanel.Portal.VPSForPC
"ItemID=" + itemId));
}
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'VirtualMachines'");
res.Append(", RedirectUrl: '" + GetServerEditUrl("{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "0" : Request["SpaceID"]));
res.Append(", Recursive: true");
res.Append(", VPSTypeID: 'VPSForPC'");
return res.ToString();
}
}
}

View file

@ -34,6 +34,7 @@ using System.Web.UI.WebControls;
using WebsitePanel.Providers.Virtualization;
using WebsitePanel.WebPortal;
using WebsitePanel.EnterpriseServer;
using System.Text;
namespace WebsitePanel.Portal.VPSForPC
{
@ -46,6 +47,7 @@ namespace WebsitePanel.Portal.VPSForPC
searchBox.AddCriteria("IPAddress", GetLocalizedString("SearchField.IPAddress"));
searchBox.AddCriteria("ItemName", GetLocalizedString("SearchField.ItemName"));
}
searchBox.AjaxData = this.GetSearchBoxAjaxData();
}
public string GetServerEditUrl(string itemID)
@ -62,5 +64,15 @@ namespace WebsitePanel.Portal.VPSForPC
e.ExceptionHandled = true;
}
}
public string GetSearchBoxAjaxData()
{
StringBuilder res = new StringBuilder();
res.Append("PagedStored: 'PackagePrivateIPAddresses'");
res.Append(", RedirectUrl: '" + GetServerEditUrl("{0}").Substring(2) + "'");
res.Append(", PackageID: " + (String.IsNullOrEmpty(Request["SpaceID"]) ? "0" : Request["SpaceID"]));
res.Append(", VPSTypeID: 'VPSForPC'");
return res.ToString();
}
}
}