Merge
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>3.7</ProductVersion>
|
||||
<ProductVersion>3.9</ProductVersion>
|
||||
<ProjectGuid>3f3f1c39-6719-4862-bb45-4c227f13b821</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>WebsitePanel.LocalizationToolkit</OutputName>
|
||||
|
@ -63,4 +63,4 @@
|
|||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.34209
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.34014
|
||||
' Runtime Version:4.0.30319.34209
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
|
|
|
@ -113,6 +113,15 @@
|
|||
public const string INSERT_DVD_DISK_ERROR = "VPS_INSERT_DVD_DISK_ERROR";
|
||||
public const string EJECT_DVD_DISK_ERROR = "VPS_EJECT_DVD_DISK_ERROR";
|
||||
|
||||
// Replication
|
||||
public const string SET_REPLICA_SERVER_ERROR = "VPS_SET_REPLICA_SERVER_ERROR";
|
||||
public const string UNSET_REPLICA_SERVER_ERROR = "VPS_UNSET_REPLICA_SERVER_ERROR";
|
||||
public const string NO_REPLICA_SERVER_ERROR = "VPS_NO_REPLICA_SERVER_ERROR";
|
||||
public const string SET_REPLICATION_ERROR = "VPS_SET_REPLICATION_ERROR";
|
||||
public const string DISABLE_REPLICATION_ERROR = "VPS_DISABLE_REPLICATION_ERROR";
|
||||
public const string PAUSE_REPLICATION_ERROR = "VPS_PAUSE_REPLICATION_ERROR";
|
||||
public const string RESUME_REPLICATION_ERROR = "VPS_RESUME_REPLICATION_ERROR";
|
||||
|
||||
|
||||
public const string HOST_NAMER_IS_ALREADY_USED = "HOST_NAMER_IS_ALREADY_USED";
|
||||
public const string CANNOT_CHECK_HOST_EXISTS = "CANNOT_CHECK_HOST_EXISTS";
|
||||
|
|
|
@ -906,7 +906,29 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((System.Data.DataSet)(results[0]));
|
||||
}
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
/// //TODO START
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSearchObject", 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 GetSearchObject(int userId, string filterColumn, string filterValue, int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
|
||||
{
|
||||
object[] results = this.Invoke("GetSearchObject", new object[] {
|
||||
userId,
|
||||
filterColumn,
|
||||
filterValue,
|
||||
statusId,
|
||||
roleId,
|
||||
sortColumn,
|
||||
startRow,
|
||||
maximumRows,
|
||||
colType,
|
||||
fullType
|
||||
});
|
||||
return ((System.Data.DataSet)(results[0]));
|
||||
}
|
||||
|
||||
//TODO END
|
||||
|
||||
/// <remarks/>
|
||||
public void SearchServiceItemsPagedAsync(int userId, int itemTypeId, string filterValue, string sortColumn, int startRow, int maximumRows) {
|
||||
this.SearchServiceItemsPagedAsync(userId, itemTypeId, filterValue, sortColumn, startRow, maximumRows, null);
|
||||
|
|
|
@ -11,6 +11,12 @@
|
|||
//
|
||||
// This source code was auto-generated by wsdl, Version=2.0.50727.42.
|
||||
//
|
||||
|
||||
using WebsitePanel.Providers;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers.Virtualization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer {
|
||||
using System.Xml.Serialization;
|
||||
using System.Web.Services;
|
||||
|
@ -18,10 +24,7 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
using System.Web.Services.Protocols;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using WebsitePanel.Providers;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.Virtualization;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
|
@ -141,6 +144,26 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
|
||||
private System.Threading.SendOrPostCallback SendVirtualMachineSummaryLetterOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetCertificatesOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetReplicaServerOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback UnsetReplicaServerOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetReplicaServerOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetReplicationOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetReplicationInfoOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetVmReplicationOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DisableVmReplicationOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback PauseReplicationOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback ResumeReplicationOperationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public esVirtualizationServer2012() {
|
||||
this.Url = "http://127.0.0.1:9012/esVirtualizationServer2012.asmx";
|
||||
|
@ -311,6 +334,36 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
/// <remarks/>
|
||||
public event SendVirtualMachineSummaryLetterCompletedEventHandler SendVirtualMachineSummaryLetterCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetCertificatesCompletedEventHandler GetCertificatesCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SetReplicaServerCompletedEventHandler SetReplicaServerCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event UnsetReplicaServerCompletedEventHandler UnsetReplicaServerCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetReplicaServerCompletedEventHandler GetReplicaServerCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetReplicationCompletedEventHandler GetReplicationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetReplicationInfoCompletedEventHandler GetReplicationInfoCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SetVmReplicationCompletedEventHandler SetVmReplicationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DisableVmReplicationCompletedEventHandler DisableVmReplicationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event PauseReplicationCompletedEventHandler PauseReplicationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event ResumeReplicationCompletedEventHandler ResumeReplicationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetVirtualMachines", 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 VirtualMachineMetaItemsPaged GetVirtualMachines(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive) {
|
||||
|
@ -3121,6 +3174,437 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetCertificates", 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 CertificateInfo[] GetCertificates(int serviceId, string remoteServer) {
|
||||
object[] results = this.Invoke("GetCertificates", new object[] {
|
||||
serviceId,
|
||||
remoteServer});
|
||||
return ((CertificateInfo[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetCertificates(int serviceId, string remoteServer, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetCertificates", new object[] {
|
||||
serviceId,
|
||||
remoteServer}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public CertificateInfo[] EndGetCertificates(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((CertificateInfo[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetCertificatesAsync(int serviceId, string remoteServer) {
|
||||
this.GetCertificatesAsync(serviceId, remoteServer, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetCertificatesAsync(int serviceId, string remoteServer, object userState) {
|
||||
if ((this.GetCertificatesOperationCompleted == null)) {
|
||||
this.GetCertificatesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCertificatesOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetCertificates", new object[] {
|
||||
serviceId,
|
||||
remoteServer}, this.GetCertificatesOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetCertificatesOperationCompleted(object arg) {
|
||||
if ((this.GetCertificatesCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetCertificatesCompleted(this, new GetCertificatesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetReplicaServer", 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 ResultObject SetReplicaServer(int serviceId, string remoteServer, string thumbprint, string storagePath) {
|
||||
object[] results = this.Invoke("SetReplicaServer", new object[] {
|
||||
serviceId,
|
||||
remoteServer,
|
||||
thumbprint,
|
||||
storagePath});
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSetReplicaServer(int serviceId, string remoteServer, string thumbprint, string storagePath, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SetReplicaServer", new object[] {
|
||||
serviceId,
|
||||
remoteServer,
|
||||
thumbprint,
|
||||
storagePath}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject EndSetReplicaServer(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetReplicaServerAsync(int serviceId, string remoteServer, string thumbprint, string storagePath) {
|
||||
this.SetReplicaServerAsync(serviceId, remoteServer, thumbprint, storagePath, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetReplicaServerAsync(int serviceId, string remoteServer, string thumbprint, string storagePath, object userState) {
|
||||
if ((this.SetReplicaServerOperationCompleted == null)) {
|
||||
this.SetReplicaServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetReplicaServerOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SetReplicaServer", new object[] {
|
||||
serviceId,
|
||||
remoteServer,
|
||||
thumbprint,
|
||||
storagePath}, this.SetReplicaServerOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSetReplicaServerOperationCompleted(object arg) {
|
||||
if ((this.SetReplicaServerCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SetReplicaServerCompleted(this, new SetReplicaServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UnsetReplicaServer", 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 ResultObject UnsetReplicaServer(int serviceId, string remoteServer) {
|
||||
object[] results = this.Invoke("UnsetReplicaServer", new object[] {
|
||||
serviceId,
|
||||
remoteServer});
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginUnsetReplicaServer(int serviceId, string remoteServer, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("UnsetReplicaServer", new object[] {
|
||||
serviceId,
|
||||
remoteServer}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject EndUnsetReplicaServer(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void UnsetReplicaServerAsync(int serviceId, string remoteServer) {
|
||||
this.UnsetReplicaServerAsync(serviceId, remoteServer, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void UnsetReplicaServerAsync(int serviceId, string remoteServer, object userState) {
|
||||
if ((this.UnsetReplicaServerOperationCompleted == null)) {
|
||||
this.UnsetReplicaServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUnsetReplicaServerOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("UnsetReplicaServer", new object[] {
|
||||
serviceId,
|
||||
remoteServer}, this.UnsetReplicaServerOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnUnsetReplicaServerOperationCompleted(object arg) {
|
||||
if ((this.UnsetReplicaServerCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.UnsetReplicaServerCompleted(this, new UnsetReplicaServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetReplicaServer", 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 ReplicationServerInfo GetReplicaServer(int serviceId, string remoteServer) {
|
||||
object[] results = this.Invoke("GetReplicaServer", new object[] {
|
||||
serviceId,
|
||||
remoteServer});
|
||||
return ((ReplicationServerInfo)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetReplicaServer(int serviceId, string remoteServer, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetReplicaServer", new object[] {
|
||||
serviceId,
|
||||
remoteServer}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ReplicationServerInfo EndGetReplicaServer(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ReplicationServerInfo)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetReplicaServerAsync(int serviceId, string remoteServer) {
|
||||
this.GetReplicaServerAsync(serviceId, remoteServer, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetReplicaServerAsync(int serviceId, string remoteServer, object userState) {
|
||||
if ((this.GetReplicaServerOperationCompleted == null)) {
|
||||
this.GetReplicaServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetReplicaServerOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetReplicaServer", new object[] {
|
||||
serviceId,
|
||||
remoteServer}, this.GetReplicaServerOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetReplicaServerOperationCompleted(object arg) {
|
||||
if ((this.GetReplicaServerCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetReplicaServerCompleted(this, new GetReplicaServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetReplication", 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 VmReplication GetReplication(int itemId) {
|
||||
object[] results = this.Invoke("GetReplication", new object[] {
|
||||
itemId});
|
||||
return ((VmReplication)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetReplication(int itemId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetReplication", new object[] {
|
||||
itemId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public VmReplication EndGetReplication(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((VmReplication)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetReplicationAsync(int itemId) {
|
||||
this.GetReplicationAsync(itemId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetReplicationAsync(int itemId, object userState) {
|
||||
if ((this.GetReplicationOperationCompleted == null)) {
|
||||
this.GetReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetReplicationOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetReplication", new object[] {
|
||||
itemId}, this.GetReplicationOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetReplicationOperationCompleted(object arg) {
|
||||
if ((this.GetReplicationCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetReplicationCompleted(this, new GetReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetReplicationInfo", 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 ReplicationDetailInfo GetReplicationInfo(int itemId) {
|
||||
object[] results = this.Invoke("GetReplicationInfo", new object[] {
|
||||
itemId});
|
||||
return ((ReplicationDetailInfo)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetReplicationInfo(int itemId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetReplicationInfo", new object[] {
|
||||
itemId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ReplicationDetailInfo EndGetReplicationInfo(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ReplicationDetailInfo)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetReplicationInfoAsync(int itemId) {
|
||||
this.GetReplicationInfoAsync(itemId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetReplicationInfoAsync(int itemId, object userState) {
|
||||
if ((this.GetReplicationInfoOperationCompleted == null)) {
|
||||
this.GetReplicationInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetReplicationInfoOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetReplicationInfo", new object[] {
|
||||
itemId}, this.GetReplicationInfoOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetReplicationInfoOperationCompleted(object arg) {
|
||||
if ((this.GetReplicationInfoCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetReplicationInfoCompleted(this, new GetReplicationInfoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetVmReplication", 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 ResultObject SetVmReplication(int itemId, VmReplication replication) {
|
||||
object[] results = this.Invoke("SetVmReplication", new object[] {
|
||||
itemId,
|
||||
replication});
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSetVmReplication(int itemId, VmReplication replication, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SetVmReplication", new object[] {
|
||||
itemId,
|
||||
replication}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject EndSetVmReplication(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetVmReplicationAsync(int itemId, VmReplication replication) {
|
||||
this.SetVmReplicationAsync(itemId, replication, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetVmReplicationAsync(int itemId, VmReplication replication, object userState) {
|
||||
if ((this.SetVmReplicationOperationCompleted == null)) {
|
||||
this.SetVmReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetVmReplicationOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SetVmReplication", new object[] {
|
||||
itemId,
|
||||
replication}, this.SetVmReplicationOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSetVmReplicationOperationCompleted(object arg) {
|
||||
if ((this.SetVmReplicationCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SetVmReplicationCompleted(this, new SetVmReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableVmReplication", 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 ResultObject DisableVmReplication(int itemId) {
|
||||
object[] results = this.Invoke("DisableVmReplication", new object[] {
|
||||
itemId});
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginDisableVmReplication(int itemId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("DisableVmReplication", new object[] {
|
||||
itemId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject EndDisableVmReplication(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DisableVmReplicationAsync(int itemId) {
|
||||
this.DisableVmReplicationAsync(itemId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DisableVmReplicationAsync(int itemId, object userState) {
|
||||
if ((this.DisableVmReplicationOperationCompleted == null)) {
|
||||
this.DisableVmReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableVmReplicationOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("DisableVmReplication", new object[] {
|
||||
itemId}, this.DisableVmReplicationOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnDisableVmReplicationOperationCompleted(object arg) {
|
||||
if ((this.DisableVmReplicationCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.DisableVmReplicationCompleted(this, new DisableVmReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/PauseReplication", 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 ResultObject PauseReplication(int itemId) {
|
||||
object[] results = this.Invoke("PauseReplication", new object[] {
|
||||
itemId});
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginPauseReplication(int itemId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("PauseReplication", new object[] {
|
||||
itemId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject EndPauseReplication(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void PauseReplicationAsync(int itemId) {
|
||||
this.PauseReplicationAsync(itemId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void PauseReplicationAsync(int itemId, object userState) {
|
||||
if ((this.PauseReplicationOperationCompleted == null)) {
|
||||
this.PauseReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPauseReplicationOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("PauseReplication", new object[] {
|
||||
itemId}, this.PauseReplicationOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnPauseReplicationOperationCompleted(object arg) {
|
||||
if ((this.PauseReplicationCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.PauseReplicationCompleted(this, new PauseReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ResumeReplication", 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 ResultObject ResumeReplication(int itemId) {
|
||||
object[] results = this.Invoke("ResumeReplication", new object[] {
|
||||
itemId});
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginResumeReplication(int itemId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("ResumeReplication", new object[] {
|
||||
itemId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject EndResumeReplication(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void ResumeReplicationAsync(int itemId) {
|
||||
this.ResumeReplicationAsync(itemId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void ResumeReplicationAsync(int itemId, object userState) {
|
||||
if ((this.ResumeReplicationOperationCompleted == null)) {
|
||||
this.ResumeReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnResumeReplicationOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("ResumeReplication", new object[] {
|
||||
itemId}, this.ResumeReplicationOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnResumeReplicationOperationCompleted(object arg) {
|
||||
if ((this.ResumeReplicationCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.ResumeReplicationCompleted(this, new ResumeReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public new void CancelAsync(object userState) {
|
||||
base.CancelAsync(userState);
|
||||
|
@ -4556,4 +5040,264 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetCertificatesCompletedEventHandler(object sender, GetCertificatesCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetCertificatesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetCertificatesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public CertificateInfo[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((CertificateInfo[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void SetReplicaServerCompletedEventHandler(object sender, SetReplicaServerCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SetReplicaServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SetReplicaServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((ResultObject)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void UnsetReplicaServerCompletedEventHandler(object sender, UnsetReplicaServerCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class UnsetReplicaServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal UnsetReplicaServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((ResultObject)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetReplicaServerCompletedEventHandler(object sender, GetReplicaServerCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetReplicaServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetReplicaServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ReplicationServerInfo Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((ReplicationServerInfo)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetReplicationCompletedEventHandler(object sender, GetReplicationCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public VmReplication Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((VmReplication)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetReplicationInfoCompletedEventHandler(object sender, GetReplicationInfoCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetReplicationInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetReplicationInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ReplicationDetailInfo Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((ReplicationDetailInfo)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void SetVmReplicationCompletedEventHandler(object sender, SetVmReplicationCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SetVmReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SetVmReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((ResultObject)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void DisableVmReplicationCompletedEventHandler(object sender, DisableVmReplicationCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class DisableVmReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal DisableVmReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((ResultObject)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void PauseReplicationCompletedEventHandler(object sender, PauseReplicationCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class PauseReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal PauseReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((ResultObject)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void ResumeReplicationCompletedEventHandler(object sender, ResumeReplicationCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class ResumeReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal ResumeReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((ResultObject)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,6 +139,28 @@ namespace WebsitePanel.EnterpriseServer
|
|||
new SqlParameter("@recursive", recursive));
|
||||
}
|
||||
|
||||
//TODO START
|
||||
public static DataSet GetSearchObject(int actorId, int userId, string filterColumn, string filterValue,
|
||||
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType, bool recursive)
|
||||
{
|
||||
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
|
||||
ObjectQualifier + "GetSearchObject",
|
||||
new SqlParameter("@actorId", actorId),
|
||||
new SqlParameter("@UserID", userId),
|
||||
new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)),
|
||||
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
|
||||
new SqlParameter("@statusId", statusId),
|
||||
new SqlParameter("@roleId", roleId),
|
||||
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)),
|
||||
new SqlParameter("@startRow", startRow),
|
||||
new SqlParameter("@maximumRows", maximumRows),
|
||||
new SqlParameter("@recursive", recursive),
|
||||
new SqlParameter("@ColType", colType),
|
||||
new SqlParameter("@FullType", fullType));
|
||||
}
|
||||
|
||||
//TODO END
|
||||
|
||||
public static DataSet GetUsersSummary(int actorId, int userId)
|
||||
{
|
||||
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
|
||||
|
|
|
@ -1650,12 +1650,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
public static ResultObject DeleteMappedDrive(int itemId, string driveLetter)
|
||||
public static ResultObject DeleteMappedDrive(int itemId, string folderName)
|
||||
{
|
||||
return DeleteMappedDriveInternal(itemId, driveLetter);
|
||||
return DeleteMappedDriveInternal(itemId, folderName);
|
||||
}
|
||||
|
||||
protected static ResultObject DeleteMappedDriveInternal(int itemId, string driveLetter)
|
||||
protected static ResultObject DeleteMappedDriveInternal(int itemId, string folderName)
|
||||
{
|
||||
ResultObject result = TaskManager.StartResultTask<ResultObject>("ENTERPRISE_STORAGE", "DELETE_MAPPED_DRIVE", itemId);
|
||||
|
||||
|
@ -1670,9 +1670,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
var webDavSetting = ObjectUtils.FillObjectFromDataReader<WebDavSetting>(DataProvider.GetEnterpriseFolder(itemId, folderName));
|
||||
|
||||
string path = string.Format(@"\\{0}@SSL\{1}\{2}", webDavSetting.Domain.Split('.')[0], org.OrganizationId, folderName);
|
||||
|
||||
Organizations orgProxy = OrganizationController.GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
orgProxy.DeleteMappedDrive(org.OrganizationId, driveLetter);
|
||||
orgProxy.DeleteMappedDriveByPath(org.OrganizationId, path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -317,6 +317,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
//TODO START
|
||||
public static DataSet GetSearchObject(int userId, string filterColumn, string filterValue,
|
||||
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
|
||||
{
|
||||
return DataProvider.GetSearchObject(SecurityContext.User.UserId, userId,
|
||||
filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType, false);
|
||||
}
|
||||
//TODO END
|
||||
|
||||
public static DataSet GetPackageQuotas(int packageId)
|
||||
{
|
||||
return DataProvider.GetPackageQuotas(SecurityContext.User.UserId, packageId);
|
||||
|
|
|
@ -42,6 +42,7 @@ using System.Net.Mail;
|
|||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using WebsitePanel.Providers.Virtualization2012;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
|
@ -84,7 +85,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
public static VirtualMachine[] GetVirtualMachinesByServiceId(int serviceId)
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vps = GetVirtualizationProxy(serviceId);
|
||||
VirtualizationServer2012 vps = GetVirtualizationProxy(serviceId);
|
||||
|
||||
// load details
|
||||
return vps.GetVirtualMachines();
|
||||
|
@ -166,7 +167,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
string path = settings["OsTemplatesPath"];
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(serviceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
|
||||
|
||||
return vs.GetLibraryItems(path);
|
||||
}
|
||||
|
@ -176,7 +177,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
public static int GetMaximumCpuCoresNumber(int packageId)
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxyByPackageId(packageId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxyByPackageId(packageId);
|
||||
|
||||
return vs.GetProcessorCoresNumber();
|
||||
}
|
||||
|
@ -556,7 +557,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// asynchronous process starts here
|
||||
CreateServerAsyncWorker worker = new CreateServerAsyncWorker();
|
||||
CreateServerAsyncWorker2012 worker = new CreateServerAsyncWorker2012();
|
||||
|
||||
worker.TaskId = vm.CurrentTaskId; // async task ID
|
||||
worker.ThreadUserId = SecurityContext.User.UserId;
|
||||
|
@ -619,7 +620,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
vm.ProvisioningStatus = VirtualMachineProvisioningStatus.Error;
|
||||
|
||||
// load proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// load service settings
|
||||
StringDictionary settings = ServerController.GetServiceSettings(vm.ServiceId);
|
||||
|
@ -1199,7 +1200,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
StringDictionary settings = ServerController.GetServiceSettings(serviceId);
|
||||
|
||||
// load virtual machine info from service
|
||||
VirtualizationServer vs = GetVirtualizationProxy(serviceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
|
||||
VirtualMachine vm = vs.GetVirtualMachineEx(vmId);
|
||||
|
||||
// set VM properties
|
||||
|
@ -1461,7 +1462,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
JobResult result = null;
|
||||
|
||||
// load proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -1540,7 +1541,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
// create switch
|
||||
// load proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(item.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(item.ServiceId);
|
||||
|
||||
// create switch
|
||||
VirtualSwitch sw = vs.CreateSwitch(name);
|
||||
|
@ -1591,7 +1592,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return null;
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vps = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vps = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// load jobs
|
||||
ConcreteJob[] jobs = vps.GetVirtualMachineJobs(vm.VirtualMachineId);
|
||||
|
@ -1617,7 +1618,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return null;
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vps = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vps = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// return thumbnail
|
||||
return vps.GetVirtualMachineThumbnailImage(vm.VirtualMachineId, size);
|
||||
|
@ -1632,7 +1633,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return null;
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vps = GetVirtualizationProxy(machine.ServiceId);
|
||||
VirtualizationServer2012 vps = GetVirtualizationProxy(machine.ServiceId);
|
||||
|
||||
// load details
|
||||
VirtualMachine vm = vps.GetVirtualMachine(machine.VirtualMachineId);
|
||||
|
@ -1649,7 +1650,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
public static VirtualMachine GetVirtualMachineExtendedInfo(int serviceId, string vmId)
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vps = GetVirtualizationProxy(serviceId);
|
||||
VirtualizationServer2012 vps = GetVirtualizationProxy(serviceId);
|
||||
|
||||
// load details
|
||||
return vps.GetVirtualMachineEx(vmId);
|
||||
|
@ -1692,7 +1693,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// update virtual machine name
|
||||
JobResult result = vs.RenameVirtualMachine(vm.VirtualMachineId, hostname);
|
||||
|
@ -1812,7 +1813,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
TaskManager.WriteParameter("New state", state);
|
||||
|
||||
// load proxy
|
||||
VirtualizationServer vps = GetVirtualizationProxy(machine.ServiceId);
|
||||
VirtualizationServer2012 vps = GetVirtualizationProxy(machine.ServiceId);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -1935,7 +1936,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// change administrator password
|
||||
JobResult result = SendAdministratorPasswordKVP(itemId, password);
|
||||
|
@ -2044,7 +2045,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
JobResult result = null;
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// stop VPS if required
|
||||
VirtualMachine vps = vs.GetVirtualMachine(vm.VirtualMachineId);
|
||||
|
@ -2183,7 +2184,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
string isoPath = vs.GetInsertedDVD(vm.VirtualMachineId);
|
||||
|
||||
if (String.IsNullOrEmpty(isoPath))
|
||||
|
@ -2212,7 +2213,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
string path = settings["DvdLibraryPath"];
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
return vs.GetLibraryItems(path);
|
||||
}
|
||||
|
@ -2252,7 +2253,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
string fullPath = Path.Combine(libPath, isoPath);
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// insert DVD
|
||||
JobResult result = vs.InsertDVD(vm.VirtualMachineId, fullPath);
|
||||
|
@ -2301,7 +2302,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// insert DVD
|
||||
JobResult result = vs.EjectDVD(vm.VirtualMachineId);
|
||||
|
@ -2332,7 +2333,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return null;
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
return vs.GetVirtualMachineSnapshots(vm.VirtualMachineId);
|
||||
}
|
||||
|
||||
|
@ -2344,7 +2345,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return null;
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
return vs.GetSnapshot(snaphostId);
|
||||
}
|
||||
|
||||
|
@ -2376,7 +2377,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
#region Check Quotas
|
||||
// check quotas
|
||||
|
@ -2448,7 +2449,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
JobResult result = null;
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// check VM state
|
||||
VirtualMachine vps = vs.GetVirtualMachine(vm.VirtualMachineId);
|
||||
|
@ -2512,7 +2513,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// take snapshot
|
||||
JobResult result = vs.RenameSnapshot(vm.VirtualMachineId, snapshotId, newName);
|
||||
|
@ -2561,7 +2562,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// take snapshot
|
||||
JobResult result = vs.DeleteSnapshot(snapshotId);
|
||||
|
@ -2617,7 +2618,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// take snapshot
|
||||
JobResult result = vs.DeleteSnapshotSubtree(snapshotId);
|
||||
|
@ -2653,7 +2654,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return null;
|
||||
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
return vs.GetSnapshotThumbnailImage(snapshotId, size);
|
||||
}
|
||||
|
@ -3328,7 +3329,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
#region Virtual Switches
|
||||
public static VirtualSwitch[] GetExternalSwitches(int serviceId, string computerName)
|
||||
{
|
||||
VirtualizationServer vs = new VirtualizationServer();
|
||||
VirtualizationServer2012 vs = new VirtualizationServer2012();
|
||||
ServiceProviderProxy.Init(vs, serviceId);
|
||||
return vs.GetExternalSwitches(computerName);
|
||||
}
|
||||
|
@ -3363,7 +3364,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// get proxy
|
||||
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// check VM state
|
||||
VirtualMachine vps = vs.GetVirtualMachine(vm.VirtualMachineId);
|
||||
|
@ -3628,7 +3629,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return serviceId;
|
||||
}
|
||||
|
||||
private static VirtualizationServer GetVirtualizationProxyByPackageId(int packageId)
|
||||
private static VirtualizationServer2012 GetVirtualizationProxyByPackageId(int packageId)
|
||||
{
|
||||
// get service
|
||||
int serviceId = GetServiceId(packageId);
|
||||
|
@ -3636,9 +3637,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return GetVirtualizationProxy(serviceId);
|
||||
}
|
||||
|
||||
private static VirtualizationServer GetVirtualizationProxy(int serviceId)
|
||||
private static VirtualizationServer2012 GetVirtualizationProxy(int serviceId)
|
||||
{
|
||||
VirtualizationServer ws = new VirtualizationServer();
|
||||
VirtualizationServer2012 ws = new VirtualizationServer2012();
|
||||
ServiceProviderProxy.Init(ws, serviceId);
|
||||
return ws;
|
||||
}
|
||||
|
@ -3686,7 +3687,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
res.ErrorCodes.Add(VirtualizationErrorCodes.JOB_FAILED_ERROR + ":" + job.ErrorDescription);
|
||||
}
|
||||
|
||||
private static bool JobCompleted(VirtualizationServer vs, ConcreteJob job)
|
||||
private static bool JobCompleted(VirtualizationServer2012 vs, ConcreteJob job)
|
||||
{
|
||||
TaskManager.IndicatorMaximum = 100;
|
||||
bool jobCompleted = true;
|
||||
|
@ -3715,5 +3716,239 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Replication
|
||||
|
||||
#region IsReplicaServer Part
|
||||
|
||||
public static CertificateInfo[] GetCertificates(int serviceId, string remoteServer)
|
||||
{
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
|
||||
return vs.GetCertificates(remoteServer);
|
||||
}
|
||||
|
||||
public static ResultObject SetReplicaServer(int serviceId, string remoteServer, string thumbprint, string storagePath)
|
||||
{
|
||||
ResultObject result = new ResultObject();
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(storagePath))
|
||||
throw new Exception("Please enter replication path");
|
||||
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
|
||||
vs.SetReplicaServer(remoteServer, thumbprint, storagePath);
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.AddError(VirtualizationErrorCodes.SET_REPLICA_SERVER_ERROR, ex);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ResultObject UnsetReplicaServer(int serviceId, string remoteServer)
|
||||
{
|
||||
ResultObject result = new ResultObject();
|
||||
try
|
||||
{
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
|
||||
vs.UnsetReplicaServer(remoteServer);
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.AddError(VirtualizationErrorCodes.UNSET_REPLICA_SERVER_ERROR, ex);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ReplicationServerInfo GetReplicaServer(int serviceId, string remoteServer)
|
||||
{
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
|
||||
return vs.GetReplicaServer(remoteServer);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static VmReplication GetReplication(int itemId)
|
||||
{
|
||||
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
return vs.GetReplication(vm.VirtualMachineId);
|
||||
}
|
||||
|
||||
public static ReplicationDetailInfo GetReplicationInfo(int itemId)
|
||||
{
|
||||
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
return vs.GetReplicationInfo(vm.VirtualMachineId);
|
||||
}
|
||||
|
||||
public static ResultObject SetVmReplication(int itemId, VmReplication replication)
|
||||
{
|
||||
TaskManager.StartTask("VPS2012", "SetVmReplication");
|
||||
|
||||
ResultObject result = new ResultObject();
|
||||
try
|
||||
{
|
||||
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
|
||||
// Get replica server
|
||||
var replicaServerInfo = GetReplicaInfoForService(vm.ServiceId, ref result);
|
||||
if (result.ErrorCodes.Count > 0)
|
||||
return result;
|
||||
|
||||
// We should use enable replication or set replication?
|
||||
var vmReplica = vs.GetReplication(vm.VirtualMachineId);
|
||||
if (vmReplica == null) // need enable
|
||||
{
|
||||
vs.EnableVmReplication(vm.VirtualMachineId, replicaServerInfo.ComputerName, replication);
|
||||
vs.StartInitialReplication(vm.VirtualMachineId);
|
||||
}
|
||||
else // need set
|
||||
{
|
||||
vs.SetVmReplication(vm.VirtualMachineId, replicaServerInfo.ComputerName, replication);
|
||||
}
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw TaskManager.WriteError(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
TaskManager.CompleteTask();
|
||||
}
|
||||
TaskManager.WriteWarning("Organization with itemId '{0}' not found", itemId.ToString());
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ResultObject DisableVmReplication(int itemId)
|
||||
{
|
||||
ResultObject result = new ResultObject();
|
||||
try
|
||||
{
|
||||
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
vs.DisableVmReplication(vm.VirtualMachineId);
|
||||
|
||||
CleanUpReplicaServer(vm);
|
||||
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.AddError(VirtualizationErrorCodes.DISABLE_REPLICATION_ERROR, ex);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ResultObject PauseReplication(int itemId)
|
||||
{
|
||||
ResultObject result = new ResultObject();
|
||||
try
|
||||
{
|
||||
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
vs.PauseReplication(vm.VirtualMachineId);
|
||||
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.AddError(VirtualizationErrorCodes.PAUSE_REPLICATION_ERROR, ex);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ResultObject ResumeReplication(int itemId)
|
||||
{
|
||||
ResultObject result = new ResultObject();
|
||||
try
|
||||
{
|
||||
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
|
||||
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
|
||||
vs.ResumeReplication(vm.VirtualMachineId);
|
||||
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.AddError(VirtualizationErrorCodes.RESUME_REPLICATION_ERROR, ex);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#region Private methods
|
||||
|
||||
private static void CleanUpReplicaServer(VirtualMachine originalVm)
|
||||
{
|
||||
try
|
||||
{
|
||||
ResultObject result = new ResultObject();
|
||||
|
||||
// Get replica server
|
||||
var replicaServer = GetReplicaForService(originalVm.ServiceId, ref result);
|
||||
|
||||
// Clean up replica server
|
||||
var replicaVm = replicaServer.GetVirtualMachines().FirstOrDefault(m => m.Name == originalVm.Name);
|
||||
if (replicaVm != null)
|
||||
{
|
||||
replicaServer.DisableVmReplication(replicaVm.VirtualMachineId);
|
||||
replicaServer.ShutDownVirtualMachine(replicaVm.VirtualMachineId, true, "ReplicaDelete");
|
||||
replicaServer.DeleteVirtualMachine(replicaVm.VirtualMachineId);
|
||||
}
|
||||
}
|
||||
catch { /* skip */ }
|
||||
}
|
||||
|
||||
private static ReplicationServerInfo GetReplicaInfoForService(int serviceId, ref ResultObject result)
|
||||
{
|
||||
// Get service id of replica server
|
||||
StringDictionary vsSesstings = ServerController.GetServiceSettings(serviceId);
|
||||
string replicaServiceId = vsSesstings["ReplicaServerId"];
|
||||
|
||||
if (string.IsNullOrEmpty(replicaServiceId))
|
||||
{
|
||||
result.ErrorCodes.Add(VirtualizationErrorCodes.NO_REPLICA_SERVER_ERROR);
|
||||
return null;
|
||||
}
|
||||
|
||||
// get replica server info for replica service id
|
||||
VirtualizationServer2012 vsReplica = GetVirtualizationProxy(Convert.ToInt32(replicaServiceId));
|
||||
StringDictionary vsReplicaSesstings = ServerController.GetServiceSettings(Convert.ToInt32(replicaServiceId));
|
||||
string computerName = vsReplicaSesstings["ServerName"];
|
||||
var replicaServerInfo = vsReplica.GetReplicaServer(computerName);
|
||||
|
||||
if (!replicaServerInfo.Enabled)
|
||||
{
|
||||
result.ErrorCodes.Add(VirtualizationErrorCodes.NO_REPLICA_SERVER_ERROR);
|
||||
return null;
|
||||
}
|
||||
|
||||
return replicaServerInfo;
|
||||
}
|
||||
|
||||
private static VirtualizationServer2012 GetReplicaForService(int serviceId, ref ResultObject result)
|
||||
{
|
||||
// Get service id of replica server
|
||||
StringDictionary vsSesstings = ServerController.GetServiceSettings(serviceId);
|
||||
string replicaServiceId = vsSesstings["ReplicaServerId"];
|
||||
|
||||
if (string.IsNullOrEmpty(replicaServiceId))
|
||||
{
|
||||
result.ErrorCodes.Add(VirtualizationErrorCodes.NO_REPLICA_SERVER_ERROR);
|
||||
return null;
|
||||
}
|
||||
|
||||
// get replica server for replica service id
|
||||
return GetVirtualizationProxy(Convert.ToInt32(replicaServiceId));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,6 +134,16 @@ namespace WebsitePanel.EnterpriseServer
|
|||
sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
//TODO START
|
||||
|
||||
[WebMethod]
|
||||
public DataSet GetSearchObject(int userId, string filterColumn, string filterValue,
|
||||
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
|
||||
{
|
||||
return PackageController.GetSearchObject(userId, filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType);
|
||||
}
|
||||
//TODO END
|
||||
|
||||
[WebMethod]
|
||||
public DataSet GetPackagesPaged(int userId, string filterColumn, string filterValue,
|
||||
string sortColumn, int startRow, int maximumRows)
|
||||
|
|
|
@ -472,5 +472,70 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return VirtualizationServerController2012.SendVirtualMachineSummaryLetter(itemId, to, bcc, false);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region Replication
|
||||
|
||||
[WebMethod]
|
||||
public CertificateInfo[] GetCertificates(int serviceId, string remoteServer)
|
||||
{
|
||||
return VirtualizationServerController2012.GetCertificates(serviceId, remoteServer);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject SetReplicaServer(int serviceId, string remoteServer, string thumbprint, string storagePath)
|
||||
{
|
||||
return VirtualizationServerController2012.SetReplicaServer(serviceId, remoteServer, thumbprint, storagePath);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject UnsetReplicaServer(int serviceId, string remoteServer)
|
||||
{
|
||||
return VirtualizationServerController2012.UnsetReplicaServer(serviceId, remoteServer);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ReplicationServerInfo GetReplicaServer(int serviceId, string remoteServer)
|
||||
{
|
||||
return VirtualizationServerController2012.GetReplicaServer(serviceId, remoteServer);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public VmReplication GetReplication(int itemId)
|
||||
{
|
||||
return VirtualizationServerController2012.GetReplication(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ReplicationDetailInfo GetReplicationInfo(int itemId)
|
||||
{
|
||||
return VirtualizationServerController2012.GetReplicationInfo(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject SetVmReplication(int itemId, VmReplication replication)
|
||||
{
|
||||
return VirtualizationServerController2012.SetVmReplication(itemId, replication);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject DisableVmReplication(int itemId)
|
||||
{
|
||||
return VirtualizationServerController2012.DisableVmReplication(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject PauseReplication(int itemId)
|
||||
{
|
||||
return VirtualizationServerController2012.PauseReplication(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject ResumeReplication(int itemId)
|
||||
{
|
||||
return VirtualizationServerController2012.ResumeReplication(itemId);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
// 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.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public interface IVirtualizationServer2012
|
||||
{
|
||||
// Virtual Machines
|
||||
VirtualMachine GetVirtualMachine(string vmId);
|
||||
VirtualMachine GetVirtualMachineEx(string vmId);
|
||||
List<VirtualMachine> GetVirtualMachines();
|
||||
byte[] GetVirtualMachineThumbnailImage(string vmId, ThumbnailSize size);
|
||||
VirtualMachine CreateVirtualMachine(VirtualMachine vm);
|
||||
VirtualMachine UpdateVirtualMachine(VirtualMachine vm);
|
||||
JobResult ChangeVirtualMachineState(string vmId, VirtualMachineRequestedState newState);
|
||||
ReturnCode ShutDownVirtualMachine(string vmId, bool force, string reason);
|
||||
List<ConcreteJob> GetVirtualMachineJobs(string vmId);
|
||||
JobResult RenameVirtualMachine(string vmId, string name);
|
||||
JobResult ExportVirtualMachine(string vmId, string exportPath);
|
||||
JobResult DeleteVirtualMachine(string vmId);
|
||||
|
||||
// Snapshots
|
||||
List<VirtualMachineSnapshot> GetVirtualMachineSnapshots(string vmId);
|
||||
VirtualMachineSnapshot GetSnapshot(string snapshotId);
|
||||
JobResult CreateSnapshot(string vmId);
|
||||
JobResult RenameSnapshot(string vmId, string snapshotId, string name);
|
||||
JobResult ApplySnapshot(string vmId, string snapshotId);
|
||||
JobResult DeleteSnapshot(string snapshotId);
|
||||
JobResult DeleteSnapshotSubtree(string snapshotId);
|
||||
byte[] GetSnapshotThumbnailImage(string snapshotId, ThumbnailSize size);
|
||||
|
||||
// Virtual Switches
|
||||
List<VirtualSwitch> GetExternalSwitches(string computerName);
|
||||
List<VirtualSwitch> GetSwitches();
|
||||
bool SwitchExists(string switchId);
|
||||
VirtualSwitch CreateSwitch(string name);
|
||||
ReturnCode DeleteSwitch(string switchId);
|
||||
|
||||
// DVD operations
|
||||
string GetInsertedDVD(string vmId);
|
||||
JobResult InsertDVD(string vmId, string isoPath);
|
||||
JobResult EjectDVD(string vmId);
|
||||
|
||||
// KVP items
|
||||
List<KvpExchangeDataItem> GetKVPItems(string vmId);
|
||||
List<KvpExchangeDataItem> GetStandardKVPItems(string vmId);
|
||||
JobResult AddKVPItems(string vmId, KvpExchangeDataItem[] items);
|
||||
JobResult RemoveKVPItems(string vmId, string[] itemNames);
|
||||
JobResult ModifyKVPItems(string vmId, KvpExchangeDataItem[] items);
|
||||
|
||||
// Library
|
||||
LibraryItem[] GetLibraryItems(string path);
|
||||
|
||||
// Storage
|
||||
VirtualHardDiskInfo GetVirtualHardDiskInfo(string vhdPath);
|
||||
MountedDiskInfo MountVirtualHardDisk(string vhdPath);
|
||||
ReturnCode UnmountVirtualHardDisk(string vhdPath);
|
||||
JobResult ExpandVirtualHardDisk(string vhdPath, UInt64 sizeGB);
|
||||
JobResult ConvertVirtualHardDisk(string sourcePath, string destinationPath, VirtualHardDiskType diskType);
|
||||
void ExpandDiskVolume(string diskAddress, string volumeName);
|
||||
void DeleteRemoteFile(string path);
|
||||
string ReadRemoteFile(string path);
|
||||
void WriteRemoteFile(string path, string content);
|
||||
|
||||
// Jobs
|
||||
ConcreteJob GetJob(string jobId);
|
||||
List<ConcreteJob> GetAllJobs();
|
||||
ChangeJobStateReturnCode ChangeJobState(string jobId, ConcreteJobRequestedState newState);
|
||||
|
||||
// Configuration
|
||||
int GetProcessorCoresNumber();
|
||||
|
||||
// Replication
|
||||
List<CertificateInfo> GetCertificates(string remoteServer);
|
||||
void SetReplicaServer(string remoteServer, string thumbprint, string storagePath);
|
||||
void UnsetReplicaServer(string remoteServer);
|
||||
ReplicationServerInfo GetReplicaServer(string remoteServer);
|
||||
void EnableVmReplication(string vmId, string replicaServer, VmReplication replication);
|
||||
void SetVmReplication(string vmId, string replicaServer, VmReplication replication);
|
||||
void TestReplicationServer(string vmId, string replicaServer, string localThumbprint);
|
||||
void StartInitialReplication(string vmId);
|
||||
VmReplication GetReplication(string vmId);
|
||||
void DisableVmReplication(string vmId);
|
||||
ReplicationDetailInfo GetReplicationInfo(string vmId);
|
||||
void PauseReplication(string vmId);
|
||||
void ResumeReplication(string vmId);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public class CertificateInfo
|
||||
{
|
||||
public string Thumbprint { get; set; }
|
||||
public string Subject { get; set; }
|
||||
public string Title { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public enum ReplicaFrequency
|
||||
{
|
||||
Seconds30 = 30,
|
||||
Minutes5 = 300,
|
||||
Minutes15 = 900,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public enum ReplicaMode
|
||||
{
|
||||
None = 0,
|
||||
ReplicationEnabled = 1,
|
||||
IsReplicaServer = 2,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public class ReplicationDetailInfo
|
||||
{
|
||||
public VmReplicationMode Mode { get; set; }
|
||||
public ReplicationState State { get; set; }
|
||||
public ReplicationHealth Health { get; set; }
|
||||
public string HealthDetails { get; set; }
|
||||
public string PrimaryServerName { get; set; }
|
||||
public string ReplicaServerName { get; set; }
|
||||
public DateTime FromTime { get; set; }
|
||||
public DateTime ToTime { get; set; }
|
||||
public string AverageSize { get; set; }
|
||||
public string MaximumSize { get; set; }
|
||||
public TimeSpan AverageLatency { get; set; }
|
||||
public int Errors { get; set; }
|
||||
public int SuccessfulReplications { get; set; }
|
||||
public int MissedReplicationCount { get; set; }
|
||||
public string PendingSize { get; set; }
|
||||
public DateTime LastSynhronizedAt { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public enum ReplicationHealth
|
||||
{
|
||||
Critical,
|
||||
Warning,
|
||||
Normal,
|
||||
NotApplicable,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public class ReplicationServerInfo
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public string ComputerName { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public enum ReplicationState
|
||||
{
|
||||
Disabled,
|
||||
Error,
|
||||
FailOverWaitingCompletion,
|
||||
FailedOver,
|
||||
NotApplicable,
|
||||
ReadyForInitialReplication,
|
||||
InitialReplicationInProgress,
|
||||
Replicating,
|
||||
Resynchronizing,
|
||||
ResynchronizeSuspended,
|
||||
Suspended,
|
||||
SyncedReplicationComplete,
|
||||
WaitingForInitialReplication,
|
||||
WaitingForStartResynchronize,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
[Persistent]
|
||||
public class VmReplication
|
||||
{
|
||||
[Persistent]
|
||||
public string Thumbprint { get; set; }
|
||||
|
||||
[Persistent]
|
||||
public string[] VhdToReplicate { get; set; }
|
||||
|
||||
[Persistent]
|
||||
public ReplicaFrequency ReplicaFrequency { get; set; }
|
||||
|
||||
[Persistent]
|
||||
public int AdditionalRecoveryPoints { get; set; }
|
||||
|
||||
[Persistent]
|
||||
public int VSSSnapshotFrequencyHour { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public enum VmReplicationMode
|
||||
{
|
||||
None,
|
||||
Primary,
|
||||
Replica,
|
||||
TestReplica,
|
||||
}
|
||||
}
|
|
@ -134,8 +134,7 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
[Persistent]
|
||||
public string Status { get; set; }
|
||||
|
||||
[Persistent]
|
||||
public string ReplicationState { get; set; }
|
||||
public ReplicationState ReplicationState { get; set; }
|
||||
|
||||
[Persistent]
|
||||
public int Generation { get; set; }
|
||||
|
|
|
@ -314,6 +314,7 @@
|
|||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Virtualization\ControllerType.cs" />
|
||||
<Compile Include="Virtualization\IVirtualizationServer2012.cs" />
|
||||
<Compile Include="Virtualization\IVirtualizationServer.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
@ -330,6 +331,15 @@
|
|||
<Compile Include="Virtualization\MountedDiskInfo.cs" />
|
||||
<Compile Include="Virtualization\OperationalStatus.cs" />
|
||||
<Compile Include="Virtualization\PerformanceObject.cs" />
|
||||
<Compile Include="Virtualization\Replication\CertificateInfo.cs" />
|
||||
<Compile Include="Virtualization\Replication\ReplicaFrequency.cs" />
|
||||
<Compile Include="Virtualization\Replication\ReplicationHealth.cs" />
|
||||
<Compile Include="Virtualization\Replication\ReplicationServerInfo.cs" />
|
||||
<Compile Include="Virtualization\Replication\VmReplicationMode.cs" />
|
||||
<Compile Include="Virtualization\Replication\ReplicaMode.cs" />
|
||||
<Compile Include="Virtualization\Replication\ReplicationState.cs" />
|
||||
<Compile Include="Virtualization\Replication\ReplicationDetailInfo.cs" />
|
||||
<Compile Include="Virtualization\Replication\VmReplication.cs" />
|
||||
<Compile Include="Virtualization\ReturnCode.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
|
|
@ -1730,12 +1730,46 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
internal void DeleteMappedDriveByPathInternal(string organizationId, string path)
|
||||
{
|
||||
MappedDrive drive = GetDriveMaps(organizationId).Where(x => x.Path == path).FirstOrDefault();
|
||||
HostedSolutionLog.LogStart("DeleteMappedDriveInternal");
|
||||
HostedSolutionLog.DebugInfo("path : {0}:", path);
|
||||
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
|
||||
|
||||
if (drive != null)
|
||||
{
|
||||
DeleteMappedDriveInternal(organizationId, drive.DriveLetter);
|
||||
}
|
||||
if (string.IsNullOrEmpty(organizationId))
|
||||
throw new ArgumentNullException("organizationId");
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
throw new ArgumentNullException("path");
|
||||
|
||||
string gpoId;
|
||||
|
||||
if (!CheckMappedDriveGpoExists(organizationId, out gpoId))
|
||||
{
|
||||
CreateAndLinkMappedDrivesGPO(organizationId, out gpoId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(gpoId))
|
||||
{
|
||||
string filePath = string.Format("{0}\\{1}",
|
||||
string.Format(GROUP_POLICY_MAPPED_DRIVES_FILE_PATH_TEMPLATE, RootDomain, gpoId),
|
||||
"Drives.xml");
|
||||
|
||||
// open xml document
|
||||
XmlDocument xml = new XmlDocument();
|
||||
xml.Load(filePath);
|
||||
|
||||
XmlNode drive = xml.SelectSingleNode(string.Format("./Drives/Drive[contains(Properties/@path,'{0}')]", path));
|
||||
|
||||
if (drive != null)
|
||||
{
|
||||
drive.ParentNode.RemoveChild(drive);
|
||||
}
|
||||
|
||||
xml.Save(filePath);
|
||||
|
||||
IncrementGPOVersion(organizationId, gpoId);
|
||||
}
|
||||
|
||||
HostedSolutionLog.LogEnd("DeleteMappedDriveInternal");
|
||||
}
|
||||
|
||||
public void DeleteMappedDrive(string organizationId, string drive)
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
|
||||
public const Int64 Size1G = 0x40000000;
|
||||
public const Int64 Size1M = 0x100000;
|
||||
public const Int64 Size1K = 1024;
|
||||
|
||||
public const string KVP_RAM_SUMMARY_KEY = "VM-RAM-Summary";
|
||||
public const string KVP_HDD_SUMMARY_KEY = "VM-HDD-Summary";
|
||||
|
|
|
@ -20,9 +20,17 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
{
|
||||
return (T)obj.Members[name].Value;
|
||||
}
|
||||
public static T GetEnum<T>(this PSObject obj, string name) where T : struct
|
||||
public static T GetEnum<T>(this PSObject obj, string name, T? defaultValue = null) where T : struct
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), GetProperty(obj, name).ToString());
|
||||
try
|
||||
{
|
||||
return (T) Enum.Parse(typeof (T), GetProperty(obj, name).ToString());
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (defaultValue.HasValue) return defaultValue.Value;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
public static int GetInt(this PSObject obj, string name)
|
||||
{
|
||||
|
@ -40,6 +48,25 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
{
|
||||
return Convert.ToBoolean(obj.Members[name].Value);
|
||||
}
|
||||
|
||||
public static string GetMb(this PSObject obj, string name)
|
||||
{
|
||||
var bytes = GetLong(obj, name);
|
||||
|
||||
if (bytes == 0)
|
||||
return "0";
|
||||
|
||||
if (bytes > Constants.Size1G)
|
||||
return string.Format("{0:0.0} GB", bytes / Constants.Size1G);
|
||||
|
||||
if (bytes > Constants.Size1M)
|
||||
return string.Format("{0:0.0} MB", bytes / Constants.Size1M);
|
||||
|
||||
if (bytes > Constants.Size1K)
|
||||
return string.Format("{0:0.0} KB", bytes / Constants.Size1K);
|
||||
|
||||
return string.Format("{0} b", bytes);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
cmd.Parameters.Add("DynamicMemoryEnabled", false);
|
||||
}
|
||||
|
||||
powerShell.Execute(cmd, true);
|
||||
powerShell.Execute(cmd, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
using System.Management.Automation.Runspaces;
|
||||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public static class ReplicaHelper
|
||||
{
|
||||
public static void SetReplicaServer(PowerShellManager powerShell, bool enabled, string remoteServer, string thumbprint, string storagePath)
|
||||
{
|
||||
Command cmd = new Command("Set-VMReplicationServer");
|
||||
cmd.Parameters.Add("ReplicationEnabled", enabled);
|
||||
|
||||
if (!string.IsNullOrEmpty(remoteServer))
|
||||
{
|
||||
cmd.Parameters.Add("ComputerName", remoteServer);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(thumbprint))
|
||||
{
|
||||
cmd.Parameters.Add("AllowedAuthenticationType", "Certificate");
|
||||
cmd.Parameters.Add("CertificateThumbprint", thumbprint);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(storagePath))
|
||||
{
|
||||
cmd.Parameters.Add("ReplicationAllowedFromAnyServer", true);
|
||||
cmd.Parameters.Add("DefaultStorageLocation", storagePath);
|
||||
}
|
||||
|
||||
powerShell.Execute(cmd, false);
|
||||
}
|
||||
|
||||
public static void SetFirewallRule(PowerShellManager powerShell, bool enabled)
|
||||
{
|
||||
Command cmd = new Command("Enable-Netfirewallrule");
|
||||
cmd.Parameters.Add("DisplayName", "Hyper-V Replica HTTPS Listener (TCP-In)");
|
||||
|
||||
powerShell.Execute(cmd, false);
|
||||
}
|
||||
|
||||
public static void RemoveVmReplication(PowerShellManager powerShell, string vmName, string server)
|
||||
{
|
||||
Command cmd = new Command("Remove-VMReplication");
|
||||
cmd.Parameters.Add("VmName", vmName);
|
||||
if (!string.IsNullOrEmpty(server)) cmd.Parameters.Add("ComputerName", server);
|
||||
|
||||
powerShell.Execute(cmd, false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -61,5 +61,25 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
|
||||
powerShell.Execute(cmd, true);
|
||||
}
|
||||
|
||||
public static void Delete(PowerShellManager powerShell, string vmName, string server)
|
||||
{
|
||||
Command cmd = new Command("Remove-VM");
|
||||
cmd.Parameters.Add("Name", vmName);
|
||||
if (!string.IsNullOrEmpty(server)) cmd.Parameters.Add("ComputerName", server);
|
||||
cmd.Parameters.Add("Force");
|
||||
powerShell.Execute(cmd, false, true);
|
||||
}
|
||||
public static void Stop(PowerShellManager powerShell, string vmName, bool force, string server)
|
||||
{
|
||||
Command cmd = new Command("Stop-VM");
|
||||
|
||||
cmd.Parameters.Add("Name", vmName);
|
||||
if (force) cmd.Parameters.Add("Force");
|
||||
if (!string.IsNullOrEmpty(server)) cmd.Parameters.Add("ComputerName", server);
|
||||
//if (!string.IsNullOrEmpty(reason)) cmd.Parameters.Add("Reason", reason);
|
||||
|
||||
powerShell.Execute(cmd, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ using System.Configuration;
|
|||
|
||||
namespace WebsitePanel.Providers.Virtualization
|
||||
{
|
||||
public class HyperV2012R2 : HostingServiceProviderBase, IVirtualizationServer
|
||||
public class HyperV2012R2 : HostingServiceProviderBase, IVirtualizationServer2012
|
||||
{
|
||||
#region Provider Settings
|
||||
protected string ServerNameSettings
|
||||
|
@ -98,6 +98,20 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
{
|
||||
get { return ProviderSettings.GetInt("CpuWeight"); }
|
||||
}
|
||||
|
||||
|
||||
public ReplicaMode ReplicaMode
|
||||
{
|
||||
get { return (ReplicaMode) Enum.Parse(typeof(ReplicaMode) , ProviderSettings["ReplicaMode"]); }
|
||||
}
|
||||
protected string ReplicaServerPath
|
||||
{
|
||||
get { return ProviderSettings["ReplicaServerPath"]; }
|
||||
}
|
||||
protected string ReplicaServerThumbprint
|
||||
{
|
||||
get { return ProviderSettings["ReplicaServerThumbprint"]; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
|
@ -157,12 +171,12 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
vm.RamSize = Convert.ToInt32(ConvertNullableToInt64(result[0].GetProperty("MemoryStartup")) / Constants.Size1M);
|
||||
vm.Uptime = Convert.ToInt64(result[0].GetProperty<TimeSpan>("UpTime").TotalMilliseconds);
|
||||
vm.Status = result[0].GetProperty("Status").ToString();
|
||||
vm.ReplicationState = result[0].GetProperty("ReplicationState").ToString();
|
||||
vm.Generation = result[0].GetInt("Generation");
|
||||
vm.ProcessorCount = result[0].GetInt("ProcessorCount");
|
||||
vm.ParentSnapshotId = result[0].GetString("ParentSnapshotId");
|
||||
vm.Heartbeat = VirtualMachineHelper.GetVMHeartBeatStatus(PowerShell, vm.Name);
|
||||
vm.CreatedDate = DateTime.Now;
|
||||
vm.ReplicationState = result[0].GetEnum<ReplicationState>("ReplicationState");
|
||||
|
||||
if (extendedInfo)
|
||||
{
|
||||
|
@ -222,9 +236,10 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
VirtualMachine vm = new VirtualMachine
|
||||
{
|
||||
VirtualMachineId = current.GetProperty("Id").ToString(),
|
||||
Name = current.GetProperty("Name").ToString(),
|
||||
State = (VirtualMachineState)Enum.Parse(typeof(VirtualMachineState), current.GetProperty("State").ToString()),
|
||||
Uptime = Convert.ToInt64(current.GetProperty<TimeSpan>("UpTime").TotalMilliseconds)
|
||||
Name = current.GetString("Name"),
|
||||
State = current.GetEnum<VirtualMachineState>("State"),
|
||||
Uptime = Convert.ToInt64(current.GetProperty<TimeSpan>("UpTime").TotalMilliseconds),
|
||||
ReplicationState = current.GetEnum<ReplicationState>("ReplicationState")
|
||||
};
|
||||
vmachines.Add(vm);
|
||||
}
|
||||
|
@ -443,30 +458,11 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
|
||||
public ReturnCode ShutDownVirtualMachine(string vmId, bool force, string reason)
|
||||
{
|
||||
HostedSolutionLog.LogStart("ShutDownVirtualMachine");
|
||||
ReturnCode returnCode = ReturnCode.OK;
|
||||
|
||||
var vm = GetVirtualMachine(vmId);
|
||||
|
||||
try
|
||||
{
|
||||
Command cmd = new Command("Stop-VM");
|
||||
VirtualMachineHelper.Stop(PowerShell, vm.Name, force, ServerNameSettings);
|
||||
|
||||
cmd.Parameters.Add("Name", vm.Name);
|
||||
if (force) cmd.Parameters.Add("Force");
|
||||
//if (!string.IsNullOrEmpty(reason)) cmd.Parameters.Add("Reason", reason);
|
||||
|
||||
PowerShell.Execute(cmd, true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
HostedSolutionLog.LogError("ShutDownVirtualMachine", ex);
|
||||
throw;
|
||||
}
|
||||
|
||||
HostedSolutionLog.LogEnd("ShutDownVirtualMachine");
|
||||
|
||||
return returnCode;
|
||||
return ReturnCode.OK;
|
||||
}
|
||||
|
||||
public List<ConcreteJob> GetVirtualMachineJobs(string vmId)
|
||||
|
@ -517,10 +513,7 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
//DeleteSwitch(networkAdapter.SwitchName);
|
||||
}
|
||||
|
||||
Command cmdSet = new Command("Remove-VM");
|
||||
cmdSet.Parameters.Add("Name", vm.Name);
|
||||
cmdSet.Parameters.Add("Force");
|
||||
PowerShell.Execute(cmdSet, true, true);
|
||||
VirtualMachineHelper.Delete(PowerShell, vm.Name, ServerNameSettings);
|
||||
|
||||
return JobHelper.CreateSuccessResult(ReturnCode.JobStarted);
|
||||
}
|
||||
|
@ -787,10 +780,10 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
Command cmd = new Command("Get-VMSwitch");
|
||||
|
||||
// Not needed as the PowerShellManager adds the computer name
|
||||
//if (!string.IsNullOrEmpty(computerName)) cmd.Parameters.Add("ComputerName", computerName);
|
||||
if (!string.IsNullOrEmpty(computerName)) cmd.Parameters.Add("ComputerName", computerName);
|
||||
if (!string.IsNullOrEmpty(type)) cmd.Parameters.Add("SwitchType", type);
|
||||
|
||||
Collection<PSObject> result = PowerShell.Execute(cmd, true, true);
|
||||
Collection<PSObject> result = PowerShell.Execute(cmd, false, true);
|
||||
|
||||
foreach (PSObject current in result)
|
||||
{
|
||||
|
@ -1963,6 +1956,285 @@ namespace WebsitePanel.Providers.Virtualization
|
|||
return !String.IsNullOrEmpty(connString);
|
||||
}
|
||||
#endregion Hyper-V Cloud
|
||||
|
||||
|
||||
#region Replication
|
||||
|
||||
public List<CertificateInfo> GetCertificates(string remoteServer)
|
||||
{
|
||||
// we cant get certificates from remote server
|
||||
if (!string.IsNullOrEmpty(remoteServer))
|
||||
return null;
|
||||
|
||||
Command cmd = new Command("Get-ChildItem");
|
||||
cmd.Parameters.Add("Path", @"cert:\LocalMachine\My");
|
||||
|
||||
Collection<PSObject> result = PowerShell.Execute(cmd, false);
|
||||
|
||||
return result
|
||||
.Select(
|
||||
cert => new CertificateInfo
|
||||
{
|
||||
Subject = cert.GetString("Subject"),
|
||||
Thumbprint = cert.GetString("Thumbprint"),
|
||||
Title = string.Format("{0} ({1})", cert.GetString("Thumbprint"), cert.GetString("Subject")),
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public void SetReplicaServer(string remoteServer, string thumbprint, string storagePath)
|
||||
{
|
||||
// we cant enable firewall rules on remote server
|
||||
if (string.IsNullOrEmpty(remoteServer))
|
||||
ReplicaHelper.SetFirewallRule(PowerShell, true);
|
||||
|
||||
if (GetReplicaServer(remoteServer) != null)
|
||||
UnsetReplicaServer(remoteServer);
|
||||
|
||||
ReplicaHelper.SetReplicaServer(PowerShell, true, remoteServer, thumbprint, storagePath);
|
||||
}
|
||||
|
||||
public void UnsetReplicaServer(string remoteServer)
|
||||
{
|
||||
ReplicaHelper.SetReplicaServer(PowerShell, false, remoteServer, null, null);
|
||||
}
|
||||
|
||||
public ReplicationServerInfo GetReplicaServer(string remoteServer)
|
||||
{
|
||||
ReplicationServerInfo replicaServer = null;
|
||||
Command cmd = new Command("Get-VMReplicationServer");
|
||||
|
||||
if (!string.IsNullOrEmpty(remoteServer))
|
||||
{
|
||||
cmd.Parameters.Add("ComputerName", remoteServer);
|
||||
}
|
||||
|
||||
Collection<PSObject> result = PowerShell.Execute(cmd, false);
|
||||
|
||||
if (result != null && result.Count > 0)
|
||||
{
|
||||
replicaServer = new ReplicationServerInfo();
|
||||
replicaServer.Enabled = result[0].GetBool("RepEnabled");
|
||||
replicaServer.ComputerName = result[0].GetString("ComputerName");
|
||||
}
|
||||
|
||||
return replicaServer;
|
||||
}
|
||||
|
||||
public void EnableVmReplication(string vmId, string replicaServer, VmReplication replication)
|
||||
{
|
||||
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
|
||||
throw new Exception("Server does not allow replication by settings");
|
||||
|
||||
var vm = GetVirtualMachineEx(vmId);
|
||||
|
||||
Command cmd = new Command("Enable-VMReplication");
|
||||
cmd.Parameters.Add("VmName", vm.Name);
|
||||
cmd.Parameters.Add("ReplicaServerName", replicaServer);
|
||||
cmd.Parameters.Add("ReplicaServerPort", 443);
|
||||
cmd.Parameters.Add("AuthenticationType", "Cert");
|
||||
cmd.Parameters.Add("CertificateThumbprint", replication.Thumbprint);
|
||||
cmd.Parameters.Add("ReplicationFrequencySec", (int)replication.ReplicaFrequency);
|
||||
|
||||
var excludes = vm.Disks
|
||||
.Select(d => d.Path)
|
||||
.Where(p => replication.VhdToReplicate.All(vp => !p.Equals(vp, StringComparison.OrdinalIgnoreCase)))
|
||||
.ToArray();
|
||||
if (excludes.Any())
|
||||
cmd.Parameters.Add("ExcludedVhdPath", excludes);
|
||||
|
||||
// recovery points
|
||||
cmd.Parameters.Add("RecoveryHistory", replication.AdditionalRecoveryPoints);
|
||||
if (replication.AdditionalRecoveryPoints > 0)
|
||||
{
|
||||
if (replication.AdditionalRecoveryPoints > 24)
|
||||
throw new Exception("AdditionalRecoveryPoints can not be greater than 24");
|
||||
|
||||
if (replication.VSSSnapshotFrequencyHour > 0)
|
||||
{
|
||||
if (replication.VSSSnapshotFrequencyHour > 12)
|
||||
throw new Exception("VSSSnapshotFrequencyHour can not be greater than 12");
|
||||
|
||||
cmd.Parameters.Add("VSSSnapshotFrequencyHour", replication.VSSSnapshotFrequencyHour);
|
||||
}
|
||||
}
|
||||
|
||||
PowerShell.Execute(cmd, true, true);
|
||||
}
|
||||
|
||||
public void SetVmReplication(string vmId, string replicaServer, VmReplication replication)
|
||||
{
|
||||
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
|
||||
throw new Exception("Server does not allow replication by settings");
|
||||
|
||||
var vm = GetVirtualMachineEx(vmId);
|
||||
|
||||
Command cmd = new Command("Set-VMReplication");
|
||||
cmd.Parameters.Add("VmName", vm.Name);
|
||||
cmd.Parameters.Add("ReplicaServerName", replicaServer);
|
||||
cmd.Parameters.Add("ReplicaServerPort", 443);
|
||||
cmd.Parameters.Add("AuthenticationType", "Cert");
|
||||
cmd.Parameters.Add("CertificateThumbprint", replication.Thumbprint);
|
||||
cmd.Parameters.Add("ReplicationFrequencySec", (int)replication.ReplicaFrequency);
|
||||
|
||||
// recovery points
|
||||
cmd.Parameters.Add("RecoveryHistory", replication.AdditionalRecoveryPoints);
|
||||
if (replication.AdditionalRecoveryPoints > 0)
|
||||
{
|
||||
if (replication.AdditionalRecoveryPoints > 24)
|
||||
throw new Exception("AdditionalRecoveryPoints can not be greater than 24");
|
||||
|
||||
if (replication.VSSSnapshotFrequencyHour > 0)
|
||||
{
|
||||
if (replication.VSSSnapshotFrequencyHour > 12)
|
||||
throw new Exception("VSSSnapshotFrequencyHour can not be greater than 12");
|
||||
|
||||
cmd.Parameters.Add("VSSSnapshotFrequencyHour", replication.VSSSnapshotFrequencyHour);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd.Parameters.Add("DisableVSSSnapshotReplication");
|
||||
}
|
||||
}
|
||||
|
||||
PowerShell.Execute(cmd, true, true);
|
||||
}
|
||||
|
||||
public void TestReplicationServer(string vmId, string replicaServer, string localThumbprint)
|
||||
{
|
||||
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
|
||||
throw new Exception("Server does not allow replication by settings");
|
||||
|
||||
var vm = GetVirtualMachine(vmId);
|
||||
|
||||
Command cmd = new Command("Test-VMReplicationConnection");
|
||||
cmd.Parameters.Add("VmName", vm.Name);
|
||||
cmd.Parameters.Add("ReplicaServerName", replicaServer);
|
||||
cmd.Parameters.Add("ReplicaServerPort", 443);
|
||||
cmd.Parameters.Add("AuthenticationType", "Cert");
|
||||
cmd.Parameters.Add("CertificateThumbprint", localThumbprint);
|
||||
|
||||
PowerShell.Execute(cmd, true);
|
||||
}
|
||||
|
||||
public void StartInitialReplication(string vmId)
|
||||
{
|
||||
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
|
||||
throw new Exception("Server does not allow replication by settings");
|
||||
|
||||
var vm = GetVirtualMachine(vmId);
|
||||
|
||||
Command cmd = new Command("Start-VMInitialReplication");
|
||||
cmd.Parameters.Add("VmName", vm.Name);
|
||||
|
||||
PowerShell.Execute(cmd, true);
|
||||
}
|
||||
|
||||
public VmReplication GetReplication(string vmId)
|
||||
{
|
||||
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
|
||||
throw new Exception("Server does not allow replication by settings");
|
||||
|
||||
VmReplication replica = null;
|
||||
var vm = GetVirtualMachineEx(vmId);
|
||||
|
||||
Command cmd = new Command("Get-VMReplication");
|
||||
cmd.Parameters.Add("VmName", vm.Name);
|
||||
|
||||
Collection<PSObject> result = PowerShell.Execute(cmd, true);
|
||||
|
||||
if (result != null && result.Count > 0)
|
||||
{
|
||||
replica = new VmReplication();
|
||||
replica.ReplicaFrequency = result[0].GetEnum<ReplicaFrequency>("FrequencySec", ReplicaFrequency.Seconds30);
|
||||
replica.Thumbprint = result[0].GetString("CertificateThumbprint");
|
||||
replica.AdditionalRecoveryPoints = result[0].GetInt("RecoveryHistory");
|
||||
replica.VSSSnapshotFrequencyHour = result[0].GetInt("VSSSnapshotFrequencyHour");
|
||||
|
||||
List<string> excludes = new List<string>();
|
||||
foreach (dynamic item in (IEnumerable) result[0].GetProperty("ExcludedDisks"))
|
||||
excludes.Add(item.Path.ToString());
|
||||
replica.VhdToReplicate = vm.Disks
|
||||
.Select(d => d.Path)
|
||||
.Where(p => excludes.All(ep => !p.Equals(ep, StringComparison.OrdinalIgnoreCase)))
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
return replica;
|
||||
}
|
||||
|
||||
public void DisableVmReplication(string vmId)
|
||||
{
|
||||
if (ReplicaMode == ReplicaMode.None)
|
||||
throw new Exception("Server does not allow replication by settings");
|
||||
|
||||
var vm = GetVirtualMachine(vmId);
|
||||
|
||||
ReplicaHelper.RemoveVmReplication(PowerShell, vm.Name, ServerNameSettings);
|
||||
}
|
||||
|
||||
|
||||
public ReplicationDetailInfo GetReplicationInfo(string vmId)
|
||||
{
|
||||
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
|
||||
throw new Exception("Server does not allow replication by settings");
|
||||
|
||||
ReplicationDetailInfo replica = null;
|
||||
var vm = GetVirtualMachine(vmId);
|
||||
|
||||
Command cmd = new Command("Measure-VMReplication");
|
||||
cmd.Parameters.Add("VmName", vm.Name);
|
||||
|
||||
Collection<PSObject> result = PowerShell.Execute(cmd, true);
|
||||
|
||||
if (result != null && result.Count > 0)
|
||||
{
|
||||
replica = new ReplicationDetailInfo();
|
||||
replica.AverageLatency = result[0].GetProperty<TimeSpan?>("AverageReplicationLatency") ?? new TimeSpan();
|
||||
replica.AverageSize = result[0].GetMb("AverageReplicationSize");
|
||||
replica.Errors = result[0].GetInt("ReplicationErrors");
|
||||
replica.FromTime = result[0].GetProperty<DateTime>("MonitoringStartTime");
|
||||
replica.Health = result[0].GetEnum<ReplicationHealth>("ReplicationHealth");
|
||||
replica.HealthDetails = string.Join(" ", result[0].GetProperty<string[]>("ReplicationHealthDetails"));
|
||||
replica.LastSynhronizedAt = result[0].GetProperty<DateTime?>("LastReplicationTime") ?? new DateTime();
|
||||
replica.MaximumSize = result[0].GetMb("MaximumReplicationSize");
|
||||
replica.Mode = result[0].GetEnum<VmReplicationMode>("ReplicationMode");
|
||||
replica.PendingSize = result[0].GetMb("PendingReplicationSize");
|
||||
replica.PrimaryServerName = result[0].GetString("PrimaryServerName");
|
||||
replica.ReplicaServerName = result[0].GetString("CurrentReplicaServerName");
|
||||
replica.State = result[0].GetEnum<ReplicationState>("ReplicationState");
|
||||
replica.SuccessfulReplications = result[0].GetInt("SuccessfulReplicationCount");
|
||||
replica.MissedReplicationCount = result[0].GetInt("MissedReplicationCount");
|
||||
replica.ToTime = result[0].GetProperty<DateTime>("MonitoringEndTime");
|
||||
}
|
||||
|
||||
return replica;
|
||||
}
|
||||
|
||||
public void PauseReplication(string vmId)
|
||||
{
|
||||
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
|
||||
throw new Exception("Server does not allow replication by settings");
|
||||
|
||||
var vm = GetVirtualMachine(vmId);
|
||||
|
||||
Command cmd = new Command("Suspend-VMReplication");
|
||||
cmd.Parameters.Add("VmName", vm.Name);
|
||||
|
||||
PowerShell.Execute(cmd, true);
|
||||
}
|
||||
|
||||
public void ResumeReplication(string vmId)
|
||||
{
|
||||
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
|
||||
throw new Exception("Server does not allow replication by settings");
|
||||
|
||||
var vm = GetVirtualMachine(vmId);
|
||||
|
||||
Command cmd = new Command("Resume-VMReplication");
|
||||
cmd.Parameters.Add("VmName", vm.Name);
|
||||
|
||||
PowerShell.Execute(cmd, true);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -56,6 +56,7 @@
|
|||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="Extensions\PSObjectExtension.cs" />
|
||||
<Compile Include="Extensions\StringExtensions.cs" />
|
||||
<Compile Include="Helpers\ReplicaHelper.cs" />
|
||||
<Compile Include="Helpers\BiosHelper.cs" />
|
||||
<Compile Include="Helpers\MemoryHelper.cs" />
|
||||
<Compile Include="Helpers\VdsHelper.cs" />
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
<Compile Include="VirtualizationServerProxy.cs">
|
||||
<SubType>code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VirtualizationServerProxy2012.cs" />
|
||||
<Compile Include="WebServerProxy.cs" />
|
||||
<Compile Include="WindowsServerProxy.cs" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<%@ WebService Language="C#" CodeBehind="VirtualizationServer2012.asmx.cs" Class="WebsitePanel.Server.VirtualizationServer2012" %>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<!-- Custom configuration sections -->
|
||||
<configSections>
|
||||
|
@ -7,34 +7,34 @@
|
|||
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/>
|
||||
</configSections>
|
||||
<appSettings>
|
||||
<add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false" />
|
||||
<add key="WebsitePanel.Exchange.ClearQueryBaseDN" value="false" />
|
||||
<add key="WebsitePanel.Exchange.enableSP2abp" value="false" />
|
||||
<add key="SCVMMServerName" value="" />
|
||||
<add key="SCVMMServerPort" value="" />
|
||||
<add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false"/>
|
||||
<add key="WebsitePanel.Exchange.ClearQueryBaseDN" value="false"/>
|
||||
<add key="WebsitePanel.Exchange.enableSP2abp" value="false"/>
|
||||
<add key="SCVMMServerName" value=""/>
|
||||
<add key="SCVMMServerPort" value=""/>
|
||||
</appSettings>
|
||||
<system.diagnostics>
|
||||
<switches>
|
||||
<add name="Log" value="2" />
|
||||
<add name="Log" value="2"/>
|
||||
<!-- 0 - Off, 1 - Error, 2 - Warning, 3 - Info, 4 - Verbose -->
|
||||
</switches>
|
||||
<trace autoflush="true">
|
||||
<listeners>
|
||||
<add name="DefaultListener" type="WebsitePanel.Server.Utils.EventLogTraceListener, WebsitePanel.Server.Utils" initializeData="WebsitePanel" />
|
||||
<add name="DefaultListener" type="WebsitePanel.Server.Utils.EventLogTraceListener, WebsitePanel.Server.Utils" initializeData="WebsitePanel"/>
|
||||
<!-- Writes log to the file
|
||||
<add name="DefaultListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="WebsitePanel.Server.log" />
|
||||
-->
|
||||
<remove name="Default" />
|
||||
<remove name="Default"/>
|
||||
</listeners>
|
||||
</trace>
|
||||
</system.diagnostics>
|
||||
<!-- Caching Configuration -->
|
||||
<cachingConfiguration defaultCacheManager="Default Cache Manager">
|
||||
<backingStores>
|
||||
<add name="inMemory" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching" />
|
||||
<add name="inMemory" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching"/>
|
||||
</backingStores>
|
||||
<cacheManagers>
|
||||
<add name="Default Cache Manager" expirationPollFrequencyInSeconds="43200" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="inMemory" />
|
||||
<add name="Default Cache Manager" expirationPollFrequencyInSeconds="43200" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="inMemory"/>
|
||||
</cacheManagers>
|
||||
</cachingConfiguration>
|
||||
<!-- WebsitePanel Configuration -->
|
||||
|
@ -42,127 +42,72 @@
|
|||
<!-- Security settings -->
|
||||
<security>
|
||||
<!-- Perform security check -->
|
||||
<enabled value="true" />
|
||||
<enabled value="true"/>
|
||||
<!-- Server password -->
|
||||
<password value="+uxnDOdf55yuH6iZYXgYAxsfIBw=" />
|
||||
<password value="+uxnDOdf55yuH6iZYXgYAxsfIBw="/>
|
||||
</security>
|
||||
</websitepanel.server>
|
||||
<system.web>
|
||||
<!-- Disable any authentication -->
|
||||
<authentication mode="None" />
|
||||
<authentication mode="None"/>
|
||||
<!-- Correct HTTP runtime settings -->
|
||||
<httpRuntime executionTimeout="3600" maxRequestLength="16384" />
|
||||
<httpRuntime executionTimeout="3600" maxRequestLength="16384"/>
|
||||
<!-- Set globalization settings -->
|
||||
<globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" />
|
||||
<globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8"/>
|
||||
<!-- Web Services settings -->
|
||||
<webServices>
|
||||
<protocols>
|
||||
<remove name="HttpPost" />
|
||||
<remove name="HttpPostLocalhost" />
|
||||
<remove name="HttpGet" />
|
||||
<remove name="HttpPost"/>
|
||||
<remove name="HttpPostLocalhost"/>
|
||||
<remove name="HttpGet"/>
|
||||
</protocols>
|
||||
<soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3" />
|
||||
<soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3"/>
|
||||
</webServices>
|
||||
<compilation debug="true">
|
||||
<assemblies>
|
||||
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<pages>
|
||||
<controls>
|
||||
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</controls>
|
||||
</pages>
|
||||
<httpHandlers>
|
||||
<remove verb="*" path="*.asmx" />
|
||||
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</httpHandlers>
|
||||
<httpModules>
|
||||
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</httpModules>
|
||||
<compilation debug="true" targetFramework="4.0"/>
|
||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
|
||||
</system.web>
|
||||
<!-- WSE 3.0 settings -->
|
||||
<microsoft.web.services3>
|
||||
<diagnostics>
|
||||
<trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo" />
|
||||
<trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo"/>
|
||||
</diagnostics>
|
||||
<messaging>
|
||||
<maxMessageLength value="-1" />
|
||||
<mtom serverMode="optional" clientMode="On" />
|
||||
<maxMessageLength value="-1"/>
|
||||
<mtom serverMode="optional" clientMode="On"/>
|
||||
</messaging>
|
||||
<security>
|
||||
<securityTokenManager>
|
||||
<add type="WebsitePanel.Server.ServerUsernameTokenManager, WebsitePanel.Server" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" />
|
||||
<add type="WebsitePanel.Server.ServerUsernameTokenManager, WebsitePanel.Server" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken"/>
|
||||
</securityTokenManager>
|
||||
<timeToleranceInSeconds value="86400" />
|
||||
<timeToleranceInSeconds value="86400"/>
|
||||
</security>
|
||||
<policy fileName="WsePolicyCache.Config" />
|
||||
<policy fileName="WsePolicyCache.Config"/>
|
||||
</microsoft.web.services3>
|
||||
<system.serviceModel>
|
||||
<bindings>
|
||||
<wsHttpBinding>
|
||||
<binding name="WSHttpBinding_IVirtualMachineManagementService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
|
||||
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
|
||||
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
|
||||
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
|
||||
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
|
||||
<security mode="Message">
|
||||
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
|
||||
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
|
||||
<transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
|
||||
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
|
||||
</security>
|
||||
</binding>
|
||||
<binding name="WSHttpBinding_IMonitoringService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
|
||||
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
|
||||
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
|
||||
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
|
||||
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
|
||||
<security mode="Message">
|
||||
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
|
||||
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
|
||||
<transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
|
||||
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
|
||||
</security>
|
||||
</binding>
|
||||
</wsHttpBinding>
|
||||
</bindings>
|
||||
</system.serviceModel>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
|
||||
<providerOption name="CompilerVersion" value="v3.5" />
|
||||
<providerOption name="WarnAsError" value="false" />
|
||||
</compiler>
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules>
|
||||
<remove name="ScriptModule" />
|
||||
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</modules>
|
||||
<handlers>
|
||||
<remove name="WebServiceHandlerFactory-Integrated" />
|
||||
<remove name="ScriptHandlerFactory" />
|
||||
<remove name="ScriptHandlerFactoryAppServices" />
|
||||
<remove name="ScriptResource" />
|
||||
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
<runtime>
|
||||
<assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012;bin/IceWarp;bin/IIs80;bin/HyperV2012R2;bin/Crm2015" />
|
||||
<probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012;bin/IceWarp;bin/IIs80;bin/HyperV2012R2;bin/Crm2015"/>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -17,7 +17,7 @@
|
|||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
|
@ -80,6 +80,7 @@
|
|||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
|
@ -235,18 +236,12 @@
|
|||
<Content Include="bin\WebsitePanel.Providers.OS.Windows2012.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.RemoteDesktopServices.Windows2012.dll" />
|
||||
<Content Include="bin\WebsitePanel.Providers.RemoteDesktopServices.Windows2012.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps20.dll" />
|
||||
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps20.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps30.dll" />
|
||||
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps30.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Statistics.AWStats.dll" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Statistics.AWStats.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Statistics.SmarterStats.dll" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Statistics.SmarterStats.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV.dll" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV2012R2.dll" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV2012R2.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.VirtualizationForPC.HyperVForPC.dll" />
|
||||
<Content Include="bin\WebsitePanel.Providers.VirtualizationForPC.HyperVForPC.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Web.HeliconZoo.dll" />
|
||||
|
@ -259,8 +254,6 @@
|
|||
<Content Include="bin\WebsitePanel.Providers.Web.IIs80.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Web.WebDav.dll" />
|
||||
<Content Include="bin\WebsitePanel.Providers.Web.WebDav.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Server.Client.dll" />
|
||||
<Content Include="bin\WebsitePanel.Server.Client.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Server.dll" />
|
||||
<Content Include="bin\WebsitePanel.Server.pdb" />
|
||||
<Content Include="bin\WebsitePanel.Server.Utils.dll" />
|
||||
|
@ -292,6 +285,7 @@
|
|||
<Content Include="ServiceProvider.asmx" />
|
||||
<Content Include="SharePointServer.asmx" />
|
||||
<Content Include="StatisticsServer.asmx" />
|
||||
<Content Include="VirtualizationServer2012.asmx" />
|
||||
<Content Include="VirtualizationServer.asmx" />
|
||||
<Content Include="VirtualizationServerForPrivateCloud.asmx" />
|
||||
<Content Include="bin\WebsitePanel.Server.dll.config" />
|
||||
|
@ -406,6 +400,10 @@
|
|||
<DependentUpon>StatisticsServer.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VirtualizationServer2012.asmx.cs">
|
||||
<DependentUpon>VirtualizationServer2012.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VirtualizationServer.asmx.cs">
|
||||
<DependentUpon>VirtualizationServer.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
|
@ -428,10 +426,6 @@
|
|||
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
|
||||
<Name>WebsitePanel.Providers.Base</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Server.Client\WebsitePanel.Server.Client.csproj">
|
||||
<Project>{990c4a2a-34a5-4be0-9546-e10abdfffd0e}</Project>
|
||||
<Name>WebsitePanel.Server.Client</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
|
||||
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
|
||||
<Name>WebsitePanel.Server.Utils</Name>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<%@ WebHandler Language="C#" Class="WebsitePanel.WebPortal.WebsitePanelAjaxHandler,WebsitePanel.Portal.Modules" %>
|
|
@ -124,7 +124,7 @@
|
|||
</Group>
|
||||
<Group pageID="SpaceHome" titleresourcekey="VPS" disabled="True">
|
||||
<Icon pageID="SpaceVPS" resourceGroup="VPS" imageUrl="icons/vps_48.png" />
|
||||
<Icon pageID="SpaceVPS2012" resourceGroup="VPS2012" imageUrl="icons/vps_48.png" />
|
||||
<Icon pageID="SpaceVPS2012" resourceGroup="VPS2012" imageUrl="icons/vps2012_48.png" />
|
||||
<Icon pageID="SpaceVPSForPC" resourceGroup="VPSForPC" imageUrl="icons/vpsforpc_48.png" />
|
||||
</Group>
|
||||
<!--
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
<FromEmail>
|
||||
</FromEmail>
|
||||
<!-- Pages -->
|
||||
<!--TODO START-->
|
||||
<SearchObjectPage>SearchObject</SearchObjectPage>
|
||||
<!--TODO END-->
|
||||
<DefaultPage>Home</DefaultPage>
|
||||
<LoginPage>Login</LoginPage>
|
||||
<UserHomePage>Home</UserHomePage>
|
||||
|
|
|
@ -13,6 +13,15 @@
|
|||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
||||
|
||||
<!--TODO START-->
|
||||
<ModuleDefinition id="SearchObject">
|
||||
<Controls>
|
||||
<Control key="" src="WebsitePanel/SearchObject.ascx" title="SearchObject" type="View" />
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
<!--TODO END-->
|
||||
|
||||
<!-- Common Modules -->
|
||||
<ModuleDefinition id="SearchUsers">
|
||||
<Controls>
|
||||
|
@ -645,32 +654,33 @@
|
|||
|
||||
<ModuleDefinition id="VPS2012">
|
||||
<Controls>
|
||||
<Control key="" src="WebsitePanel/VPS2012/VdcHome.ascx" title="VdcHome" type="View" />
|
||||
<Control key="vdc_create_server" src="WebsitePanel/VPS2012/VdcCreateServer.ascx" title="VdcCreateServer" type="View" />
|
||||
<Control key="vdc_import_server" src="WebsitePanel/VPS2012/VdcImportServer.ascx" title="VdcImportServer" type="View" />
|
||||
<Control key="vdc_external_network" src="WebsitePanel/VPS2012/VdcExternalNetwork.ascx" title="VdcExternalNetwork" type="View" />
|
||||
<Control key="vdc_management_network" src="WebsitePanel/VPS2012/VdcManagementNetwork.ascx" title="VdcManagementNetwork" type="View" />
|
||||
<Control key="vdc_allocate_external_ip" src="WebsitePanel/VPS2012/VdcAddExternalAddress.ascx" title="VdcAddExternalAddress" type="View" />
|
||||
<Control key="vdc_private_network" src="WebsitePanel/VPS2012/VdcPrivateNetwork.ascx" title="VdcPrivateNetwork" type="View" />
|
||||
<Control key="vdc_permissions" src="WebsitePanel/VPS2012/VdcPermissions.ascx" title="VdcPermissions" type="View" />
|
||||
<Control key="vdc_audit_log" src="WebsitePanel/VPS2012/VdcAuditLog.ascx" title="VdcAuditLog" type="View" />
|
||||
<Control key="" src="WebsitePanel/VPS2012/VdcHome.ascx" title="VdcHome" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vdc_create_server" src="WebsitePanel/VPS2012/VdcCreateServer.ascx" title="VdcCreateServer" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vdc_import_server" src="WebsitePanel/VPS2012/VdcImportServer.ascx" title="VdcImportServer" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vdc_external_network" src="WebsitePanel/VPS2012/VdcExternalNetwork.ascx" title="VdcExternalNetwork" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vdc_management_network" src="WebsitePanel/VPS2012/VdcManagementNetwork.ascx" title="VdcManagementNetwork" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vdc_allocate_external_ip" src="WebsitePanel/VPS2012/VdcAddExternalAddress.ascx" title="VdcAddExternalAddress" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vdc_private_network" src="WebsitePanel/VPS2012/VdcPrivateNetwork.ascx" title="VdcPrivateNetwork" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vdc_permissions" src="WebsitePanel/VPS2012/VdcPermissions.ascx" title="VdcPermissions" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vdc_audit_log" src="WebsitePanel/VPS2012/VdcAuditLog.ascx" title="VdcAuditLog" type="View" icon="vps2012_48.png" />
|
||||
|
||||
<Control key="vps_general" src="WebsitePanel/VPS2012/VpsDetailsGeneral.ascx" title="VpsDetailsGeneral" type="View" />
|
||||
<Control key="vps_config" src="WebsitePanel/VPS2012/VpsDetailsConfiguration.ascx" title="VpsDetailsConfiguration" type="View" />
|
||||
<Control key="vps_edit_config" src="WebsitePanel/VPS2012/VpsDetailsEditConfiguration.ascx" title="VpsDetailsEditConfiguration" type="View" />
|
||||
<Control key="vps_dvd" src="WebsitePanel/VPS2012/VpsDetailsDvd.ascx" title="VpsDetailsDvd" type="View" />
|
||||
<Control key="vps_insert_dvd" src="WebsitePanel/VPS2012/VpsDetailsInsertDvd.ascx" title="VpsDetailsInsertDvd" type="View" />
|
||||
<Control key="vps_snapshots" src="WebsitePanel/VPS2012/VpsDetailsSnapshots.ascx" title="VpsDetailsSnapshots" type="View" />
|
||||
<Control key="vps_network" src="WebsitePanel/VPS2012/VpsDetailsNetwork.ascx" title="VpsDetailsNetwork" type="View" />
|
||||
<Control key="vps_add_external_ip" src="WebsitePanel/VPS2012/VpsDetailsAddExternalAddress.ascx" title="VpsDetailsAddExternalAddress" type="View" />
|
||||
<Control key="vps_add_private_ip" src="WebsitePanel/VPS2012/VpsDetailsAddPrivateAddress.ascx" title="VpsDetailsAddPrivateAddress" type="View" />
|
||||
<Control key="vps_permissions" src="WebsitePanel/VPS2012/VpsDetailsPermissions.ascx" title="VpsDetailsNetworking" type="View" />
|
||||
<Control key="vps_tools" src="WebsitePanel/VPS2012/VpsDetailsTools.ascx" title="VpsDetailsTools" type="View" />
|
||||
<Control key="vps_audit_log" src="WebsitePanel/VPS2012/VpsDetailsAuditLog.ascx" title="VpsDetailsAuditLog" type="View" />
|
||||
<Control key="vps_help" src="WebsitePanel/VPS2012/VpsDetailsHelp.ascx" title="VpsDetailsHelp" type="View" />
|
||||
<Control key="vps_tools_delete" src="WebsitePanel/VPS2012/VpsToolsDeleteServer.ascx" title="VpsToolsDeleteServer" type="View" />
|
||||
<Control key="vps_tools_move" src="WebsitePanel/VPS2012/VpsMoveServer.ascx" title="VpsMoveServer" type="View" />
|
||||
<Control key="vps_tools_reinstall" src="WebsitePanel/VPS2012/VpsToolsReinstallServer.ascx" title="VpsToolsReinstallServer" type="View" />
|
||||
<Control key="vps_general" src="WebsitePanel/VPS2012/VpsDetailsGeneral.ascx" title="VpsDetailsGeneral" type="View" icon="vps2012_48.png"/>
|
||||
<Control key="vps_config" src="WebsitePanel/VPS2012/VpsDetailsConfiguration.ascx" title="VpsDetailsConfiguration" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_edit_config" src="WebsitePanel/VPS2012/VpsDetailsEditConfiguration.ascx" title="VpsDetailsEditConfiguration" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_dvd" src="WebsitePanel/VPS2012/VpsDetailsDvd.ascx" title="VpsDetailsDvd" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_insert_dvd" src="WebsitePanel/VPS2012/VpsDetailsInsertDvd.ascx" title="VpsDetailsInsertDvd" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_snapshots" src="WebsitePanel/VPS2012/VpsDetailsSnapshots.ascx" title="VpsDetailsSnapshots" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_replication" src="WebsitePanel/VPS2012/VpsDetailsReplications.ascx" title="VpsDetailReplications" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_network" src="WebsitePanel/VPS2012/VpsDetailsNetwork.ascx" title="VpsDetailsNetwork" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_add_external_ip" src="WebsitePanel/VPS2012/VpsDetailsAddExternalAddress.ascx" title="VpsDetailsAddExternalAddress" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_add_private_ip" src="WebsitePanel/VPS2012/VpsDetailsAddPrivateAddress.ascx" title="VpsDetailsAddPrivateAddress" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_permissions" src="WebsitePanel/VPS2012/VpsDetailsPermissions.ascx" title="VpsDetailsNetworking" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_tools" src="WebsitePanel/VPS2012/VpsDetailsTools.ascx" title="VpsDetailsTools" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_audit_log" src="WebsitePanel/VPS2012/VpsDetailsAuditLog.ascx" title="VpsDetailsAuditLog" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_help" src="WebsitePanel/VPS2012/VpsDetailsHelp.ascx" title="VpsDetailsHelp" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_tools_delete" src="WebsitePanel/VPS2012/VpsToolsDeleteServer.ascx" title="VpsToolsDeleteServer" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_tools_move" src="WebsitePanel/VPS2012/VpsMoveServer.ascx" title="VpsMoveServer" type="View" icon="vps2012_48.png" />
|
||||
<Control key="vps_tools_reinstall" src="WebsitePanel/VPS2012/VpsToolsReinstallServer.ascx" title="VpsToolsReinstallServer" type="View" icon="vps2012_48.png" />
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
||||
|
@ -727,4 +737,11 @@
|
|||
<Control key="" src="WebsitePanel/OrganizationMenu.ascx" title="OrganizationMenu" type="View" />
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
||||
<!-- Virtual Personal Servers -->
|
||||
<ModuleDefinition id="VpsMenu">
|
||||
<Controls>
|
||||
<Control key="" src="WebsitePanel/VpsMenu.ascx" title="VpsMenu" type="View" />
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
</ModuleDefinitions>
|
|
@ -26,6 +26,14 @@
|
|||
</Content>
|
||||
</Page>
|
||||
|
||||
<!--TODO START-->
|
||||
<Page name="SearchObject" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="Browse1.ascx">
|
||||
<Content id="ContentPane">
|
||||
<Module moduleDefinitionID="SearchObject" title="SearchObject" icon="sphere_zoom_48.png" container="Edit.ascx" />
|
||||
</Content>
|
||||
</Page>
|
||||
<!--TODO END-->
|
||||
|
||||
<Page name="SearchSpaces" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="Browse1.ascx">
|
||||
<Content id="ContentPane">
|
||||
<Module moduleDefinitionID="SearchSpaces" title="SearchSpaces" icon="sphere_zoom_48.png" container="Edit.ascx" />
|
||||
|
@ -652,7 +660,7 @@
|
|||
</Content>
|
||||
</Page>
|
||||
|
||||
<Page name="SpaceVPS2012" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="VPS.ascx" adminskin="VPS.ascx">
|
||||
<Page name="SpaceVPS2012" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True">
|
||||
<Content id="LeftPane">
|
||||
<Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx">
|
||||
<ModuleData ref="UserMenu"/>
|
||||
|
@ -660,9 +668,11 @@
|
|||
<Module moduleDefinitionID="SpaceMenu" title="SpaceMenu" container="Clear.ascx">
|
||||
<ModuleData ref="SpaceMenu"/>
|
||||
</Module>
|
||||
<Module moduleDefinitionID="VpsMenu" title="VpsMenu" container="Clear.ascx">
|
||||
</Module>
|
||||
</Content>
|
||||
<Content id="ContentPane">
|
||||
<Module moduleDefinitionID="VPS2012" title="VirtualPrivateServers2012" icon="" container="VPS2012.ascx" admincontainer="VPS2012.ascx" readOnlyRoles="PlatformCSR,ResellerCSR"/>
|
||||
<Module moduleDefinitionID="VPS2012" title="VirtualPrivateServers2012" icon="vps2012_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
|
||||
</Content>
|
||||
</Page>
|
||||
|
||||
|
|
|
@ -711,6 +711,9 @@
|
|||
<data name="ModuleTitle.SearchSpaces" xml:space="preserve">
|
||||
<value>Search Hosting Spaces</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.SearchObject" xml:space="preserve">
|
||||
<value>Search Objects</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.SearchUsers" xml:space="preserve">
|
||||
<value>Search User Accounts</value>
|
||||
</data>
|
||||
|
@ -813,4 +816,83 @@
|
|||
<data name="ModuleTitle.RDSServersEditServer" xml:space="preserve">
|
||||
<value>Edit RDS Server</value>
|
||||
</data>
|
||||
|
||||
<data name="ModuleTitle.VirtualPrivateServers2012" xml:space="preserve">
|
||||
<value>Virtual Private Servers</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VdcCreateServer" xml:space="preserve">
|
||||
<value>Create New VPS</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VdcImportServer" xml:space="preserve">
|
||||
<value>Import VPS</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VdcExternalNetwork" xml:space="preserve">
|
||||
<value>External Network</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VdcManagementNetwork" xml:space="preserve">
|
||||
<value>Management Network</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VdcAddExternalAddress" xml:space="preserve">
|
||||
<value>Allocate IP Addresses</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VdcPrivateNetwork" xml:space="preserve">
|
||||
<value>Private Network</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VdcPermissions" xml:space="preserve">
|
||||
<value>User Permissions</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VdcAuditLog" xml:space="preserve">
|
||||
<value>Audit Log</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsGeneral" xml:space="preserve">
|
||||
<value>General</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsConfiguration" xml:space="preserve">
|
||||
<value>Configuration</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsEditConfiguration" xml:space="preserve">
|
||||
<value>Edit Configuration</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsDvd" xml:space="preserve">
|
||||
<value>DVD</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsInsertDvd" xml:space="preserve">
|
||||
<value>DVD</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsSnapshots" xml:space="preserve">
|
||||
<value>Snapshots</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailReplications" xml:space="preserve">
|
||||
<value>Replication</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsNetwork" xml:space="preserve">
|
||||
<value>Network</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsAddExternalAddress" xml:space="preserve">
|
||||
<value>Network</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsAddPrivateAddress" xml:space="preserve">
|
||||
<value>Network</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsNetworking" xml:space="preserve">
|
||||
<value>Permissions</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsTools" xml:space="preserve">
|
||||
<value>Tools</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsAuditLog" xml:space="preserve">
|
||||
<value>Audit Log</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsDetailsHelp" xml:space="preserve">
|
||||
<value>Help</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsToolsDeleteServer" xml:space="preserve">
|
||||
<value>Delete Server</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsMoveServer" xml:space="preserve">
|
||||
<value>Move VPS</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.VpsToolsReinstallServer" xml:space="preserve">
|
||||
<value>Re-install Server</value>
|
||||
</data>
|
||||
</root>
|
|
@ -141,6 +141,12 @@
|
|||
<data name="PageTitle.SearchSpaces" xml:space="preserve">
|
||||
<value>{user} - Search Hosting Spaces</value>
|
||||
</data>
|
||||
<data name="PageName.SearchObject" xml:space="preserve">
|
||||
<value>Search Objects</value>
|
||||
</data>
|
||||
<data name="PageTitle.SearchObject" xml:space="preserve">
|
||||
<value>{user} - Search Objects</value>
|
||||
</data>
|
||||
<data name="PageName.Home" xml:space="preserve">
|
||||
<value>Account Home</value>
|
||||
</data>
|
||||
|
|
|
@ -4075,6 +4075,53 @@
|
|||
<data name="Error.VPS_ERROR_TAKE_SNAPSHOT" xml:space="preserve">
|
||||
<value>Cannot take virtual machine snapshot</value>
|
||||
</data>
|
||||
<data name="Error.VPS_ERROR_SET_VM_REPLICATION" xml:space="preserve">
|
||||
<value>Cannot enable/set replication for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Error.VPS_ERROR_DISABLE_VM_REPLICATION" xml:space="preserve">
|
||||
<value>Cannot disable replication for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Error.VPS_ERROR_GET_VM_REPLICATION" xml:space="preserve">
|
||||
<value>Cannot get replication for the virtual machine</value>
|
||||
</data>
|
||||
|
||||
<data name="Error.VPS_SET_REPLICA_SERVER_ERROR" xml:space="preserve">
|
||||
<value>Cannot set replication for the server</value>
|
||||
</data>
|
||||
<data name="Error.VPS_UNSET_REPLICA_SERVER_ERROR" xml:space="preserve">
|
||||
<value>Cannot unset replication for the server</value>
|
||||
</data>
|
||||
<data name="Error.VPS_NO_REPLICA_SERVER_ERROR" xml:space="preserve">
|
||||
<value>Cannot find replication server</value>
|
||||
</data>
|
||||
<data name="Error.VPS_SET_REPLICATION_ERROR" xml:space="preserve">
|
||||
<value>Cannot enable\set replication for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Success.VPS_SET_REPLICATION_ERROR" xml:space="preserve">
|
||||
<value>Replication set\enabled for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Error.VPS_DISABLE_REPLICATION_ERROR" xml:space="preserve">
|
||||
<value>Cannot disable replication for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Success.VPS_DISABLE_REPLICATION_ERROR" xml:space="preserve">
|
||||
<value>Replication disabled for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Error.VPS_PAUSE_REPLICATION_ERROR" xml:space="preserve">
|
||||
<value>Cannot pause replication for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Success.VPS_PAUSE_REPLICATION_ERROR" xml:space="preserve">
|
||||
<value>Replication paused for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Error.VPS_RESUME_REPLICATION_ERROR" xml:space="preserve">
|
||||
<value>Cannot resume replication for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Success.VPS_RESUME_REPLICATION_ERROR" xml:space="preserve">
|
||||
<value>Replication resumed for the virtual machine</value>
|
||||
</data>
|
||||
<data name="Error.VPS_REQUIRED" xml:space="preserve">
|
||||
<value>Please fill required fields</value>
|
||||
</data>
|
||||
|
||||
<data name="VPS.VPS_JOB_FAILED_ERROR" xml:space="preserve">
|
||||
<value>Job execution failed with the following code: {1}</value>
|
||||
</data>
|
||||
|
|
|
@ -41,4 +41,5 @@ Default skin template. The following skins are provided as examples only.
|
|||
<asp:ImageButton SkinID="ApplySmall" runat="server" ImageUrl="Images/apply_16.png" ImageAlign="AbsMiddle" Width="16" Height="16"/>
|
||||
|
||||
|
||||
<asp:ImageButton SkinID="VpsDelete" runat="server" ImageUrl="Images/VPS/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16"/>
|
||||
<asp:ImageButton SkinID="VpsDelete" runat="server" ImageUrl="Images/VPS/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16"/>
|
||||
<asp:ImageButton SkinID="VpsDelete2012" runat="server" ImageUrl="Images/VPS2012/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16"/>
|
After Width: | Height: | Size: 242 B |
|
@ -44,6 +44,8 @@ Default skin template. The following skins are provided as examples only.
|
|||
|
||||
<asp:Image runat="server" SkinID="OptionEnabled" ImageUrl="images/Exchange/checkbox.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
|
||||
<asp:Image runat="server" SkinID="OptionDisabled" ImageUrl="images/VPS/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
|
||||
<asp:Image runat="server" SkinID="OptionDisabled2012" ImageUrl="images/VPS2012/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
|
||||
|
||||
<asp:Image runat="server" SkinID="Vps16" ImageUrl="images/VPS/server.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
|
||||
<asp:Image runat="server" SkinID="Vps2012_16" ImageUrl="images/VPS2012/server.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
|
||||
<asp:Image runat="server" SkinID="Rdc16" ImageUrl="images/VPS/rdc16.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
|
After Width: | Height: | Size: 313 B |
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 284 B |
After Width: | Height: | Size: 284 B |
After Width: | Height: | Size: 284 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 167 B |
After Width: | Height: | Size: 361 B |
After Width: | Height: | Size: 361 B |
After Width: | Height: | Size: 241 B |
After Width: | Height: | Size: 163 B |
After Width: | Height: | Size: 247 B |
After Width: | Height: | Size: 373 B |
After Width: | Height: | Size: 291 B |
After Width: | Height: | Size: 291 B |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 741 B |
|
@ -293,6 +293,10 @@ UL.ActionButtons LI {margin-bottom: 12px;}
|
|||
.ActionButtonRename {padding: 3px 2px 3px 20px; background: transparent url(../images/VPS/rename.gif) left center no-repeat;}
|
||||
.ActionButtonDeleteSnapshot {padding: 3px 2px 3px 20px; background: transparent url(../images/VPS/delete3.png) left center no-repeat;}
|
||||
.ActionButtonDeleteSnapshotTree {padding: 3px 2px 3px 20px; background: transparent url(../images/VPS/delete4.png) left center no-repeat;}
|
||||
.ActionButtonApplySnapshot2012 {padding: 3px 2px 3px 20px; background: transparent url(../images/VPS2012/apply.png) left center no-repeat;}
|
||||
.ActionButtonRename2012 {padding: 3px 2px 3px 20px; background: transparent url(../images/VPS2012/rename.png) left center no-repeat;}
|
||||
.ActionButtonDeleteSnapshot2012 {padding: 3px 2px 3px 20px; background: transparent url(../images/VPS2012/delete3.png) left center no-repeat;}
|
||||
.ActionButtonDeleteSnapshotTree2012 {padding: 3px 2px 3px 20px; background: transparent url(../images/VPS2012/delete4.png) left center no-repeat;}
|
||||
.CodeEditor {width: 100%; height: 360px; font-size: 13px; white-space: pre; line-height: 16px; font-family: Consolas, Monospace;}
|
||||
.pnlControl {height:20px; margin:5px 5px; text-align:left;}
|
||||
.pnlControl span {display:inline-block; width:100px;}
|
||||
|
@ -303,4 +307,76 @@ p.warningText {font-size:14px; color:Red; text-align:center;}
|
|||
.Hidden {display: none;}
|
||||
.LinkText {color:#428bca;}
|
||||
.WrapText { white-space: normal;}
|
||||
.chosen-container { margin-top: -30px; }
|
||||
.chosen-container { margin-top: -30px; }
|
||||
|
||||
.ui-autocomplete {z-index: 200 !important; }
|
||||
|
||||
.ui-button {
|
||||
padding: 5px 5px;
|
||||
margin: 3px;
|
||||
background: #20A0D0;
|
||||
color: white;
|
||||
border: 1px solid #2080A0;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ui-button:hover {
|
||||
background: #20B0E0;
|
||||
}
|
||||
|
||||
.ui-popupdialog {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #FFF;
|
||||
border: 1px solid #C0C0C0;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.176);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.ui-popupdialog .title {
|
||||
padding: 5px;
|
||||
background: #F8F8F8;
|
||||
}
|
||||
|
||||
.ui-popupdialog .content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.ui-popupdialog .actions {
|
||||
padding: 5px;
|
||||
border-top: 1px solid #C0C0C0;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.ui-menu {
|
||||
background-color: #FFF;
|
||||
border: 1px solid #C0C0C0;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.176);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.ui-menu-item {
|
||||
}
|
||||
.ui-widget-content {
|
||||
background: #FFF;
|
||||
}
|
||||
.ui-corner-all {
|
||||
border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
}
|
||||
.ui-menu-item .ui-state-hover
|
||||
{
|
||||
background: #f0f0f0;
|
||||
border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
border-color: #f0f0f0;
|
||||
color: #000;
|
||||
}
|
||||
.ui-menu-item:hover {
|
||||
background-color: #f0f0f0;
|
||||
}
|
|
@ -842,6 +842,13 @@ namespace WebsitePanel.Portal
|
|||
return PortalConfiguration.SiteSettings["SpacesSearchPage"];
|
||||
}
|
||||
|
||||
//TODO START
|
||||
public static string GetObjectSearchPageId()
|
||||
{
|
||||
return PortalConfiguration.SiteSettings["SearchObjectPage"];
|
||||
}
|
||||
//TODO END
|
||||
|
||||
public static string GetNestedSpacesPageId()
|
||||
{
|
||||
return PortalConfiguration.SiteSettings["NestedSpacesPage"];
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="gvType.Header" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="gvText.Header" xml:space="preserve">
|
||||
<value>Search text</value>
|
||||
</data>
|
||||
<data name="gvFullType.Header" xml:space="preserve">
|
||||
<value>Full Type</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,138 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="locMenuTitle.Text" xml:space="preserve">
|
||||
<value>VPS Menu</value>
|
||||
</data>
|
||||
<data name="Text.VPSHome" xml:space="preserve">
|
||||
<value>Virtual Personal Servers</value>
|
||||
</data>
|
||||
<data name="Text.AuditLog" xml:space="preserve">
|
||||
<value>Audit Log</value>
|
||||
</data>
|
||||
<data name="Text.ExternalNetwork" xml:space="preserve">
|
||||
<value>External Network</value>
|
||||
</data>
|
||||
<data name="Text.ManagementNetwork" xml:space="preserve">
|
||||
<value>Management Network</value>
|
||||
</data>
|
||||
<data name="Text.PrivateNetwork" xml:space="preserve">
|
||||
<value>Private Network</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using WebsitePanel.Portal;
|
||||
|
||||
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"];
|
||||
String columnType = context.Request.Params["columnType"];
|
||||
|
||||
if (fullType == "Spaces")
|
||||
{
|
||||
String strItemType = context.Request.Params["itemType"];
|
||||
int itemType = Int32.Parse(strItemType);
|
||||
DataSet dsObjectItems = ES.Services.Packages.SearchServiceItemsPaged(PanelSecurity.EffectiveUserId, itemType,
|
||||
String.Format("%{0}%", filterValue),
|
||||
"",0, 100);
|
||||
DataTable dt = dsObjectItems.Tables[1];
|
||||
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
|
||||
for (int i = 0; i < dt.Rows.Count; ++i)
|
||||
{
|
||||
DataRow row = dt.Rows[i];
|
||||
Dictionary<string, string> obj = new Dictionary<string, string>();
|
||||
obj["ColumnType"] = "PackageName";
|
||||
obj["TextSearch"] = row["PackageName"].ToString();
|
||||
obj["ItemID"] = row["ItemID"].ToString();
|
||||
obj["PackageID"] = row["PackageID"].ToString();
|
||||
obj["FullType"] = "Space";
|
||||
dataList.Add(obj);
|
||||
}
|
||||
|
||||
var jsonSerialiser = new JavaScriptSerializer();
|
||||
var json = jsonSerialiser.Serialize(dataList);
|
||||
context.Response.ContentType = "text/plain";
|
||||
context.Response.Write(json);
|
||||
}
|
||||
else
|
||||
{
|
||||
DataSet dsObjectItems = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, null,
|
||||
String.Format("%{0}%", filterValue),
|
||||
0, 0, "", 0, 100, columnType,fullType);
|
||||
DataTable dt = dsObjectItems.Tables[2];
|
||||
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
|
||||
for (int i = 0; i < dt.Rows.Count; ++i)
|
||||
{
|
||||
DataRow row = dt.Rows[i];
|
||||
if ((fullType == null) || (fullType.Length == 0) || (fullType == row["FullType"].ToString()))
|
||||
{
|
||||
Dictionary<string, string> obj = new Dictionary<string, string>();
|
||||
obj["ColumnType"] = row["ColumnType"].ToString();
|
||||
obj["TextSearch"] = row["TextSearch"].ToString();
|
||||
obj["ItemID"] = row["ItemID"].ToString();
|
||||
obj["PackageID"] = row["PackageID"].ToString();
|
||||
obj["FullType"] = row["FullType"].ToString();
|
||||
dataList.Add(obj);
|
||||
}
|
||||
}
|
||||
|
||||
var jsonSerialiser = new JavaScriptSerializer();
|
||||
var json = jsonSerialiser.Serialize(dataList);
|
||||
context.Response.ContentType = "text/plain";
|
||||
context.Response.Write(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
|
@ -36,6 +36,7 @@ using System.Web.Caching;
|
|||
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
|
@ -244,5 +245,33 @@ namespace WebsitePanel.Portal
|
|||
return dsServiceItemsPaged.Tables[1];
|
||||
}
|
||||
#endregion
|
||||
|
||||
//TODO START
|
||||
#region Service Items Paged Search
|
||||
DataSet dsObjectItemsPaged;
|
||||
|
||||
public int SearchObjectItemsPagedCount(string filterColumn, string filterValue, string fullType, string colType)
|
||||
{
|
||||
return (int)dsObjectItemsPaged.Tables[0].Rows[0][0];
|
||||
}
|
||||
|
||||
public DataTable SearchObjectItemsPaged(int maximumRows, int startRowIndex, string sortColumn,
|
||||
string filterColumn, string filterValue, string colType, string fullType)
|
||||
{
|
||||
dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn,
|
||||
String.Format("%{0}%", filterValue),
|
||||
0, 0, sortColumn, startRowIndex, maximumRows, colType, fullType);
|
||||
return dsObjectItemsPaged.Tables[2];
|
||||
}
|
||||
|
||||
public DataTable SearchObjectTypes(string filterColumn, string filterValue, string fullType, string sortColumn)
|
||||
{
|
||||
dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn,
|
||||
String.Format("%{0}%", filterValue),
|
||||
0, 0, sortColumn, 0, 0, "",fullType);
|
||||
return dsObjectItemsPaged.Tables[1];
|
||||
}
|
||||
//TODO END
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
using WebsitePanel.Providers.Virtualization;
|
||||
using System.Web;
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
|
@ -125,5 +126,30 @@ namespace WebsitePanel.Portal
|
|||
return privateAddresses.Count;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static StringDictionary ConvertArrayToDictionary(string[] settings)
|
||||
{
|
||||
StringDictionary r = new StringDictionary();
|
||||
foreach (string setting in settings)
|
||||
{
|
||||
int idx = setting.IndexOf('=');
|
||||
r.Add(setting.Substring(0, idx), setting.Substring(idx + 1));
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
public static bool IsReplicationEnabled(int packageId)
|
||||
{
|
||||
var vmsMeta = (new VirtualMachines2012Helper()).GetVirtualMachines(packageId, null, null, null, 1, 0);
|
||||
if (vmsMeta.Length == 0) return false;
|
||||
|
||||
var packageVm = ES.Services.VPS2012.GetVirtualMachineItem(vmsMeta[0].ItemID);
|
||||
if (packageVm == null) return false;
|
||||
|
||||
var serviceSettings = ConvertArrayToDictionary(ES.Services.Servers.GetServiceSettings(packageVm.ServiceId));
|
||||
if (serviceSettings == null) return false;
|
||||
|
||||
return serviceSettings["ReplicaMode"] == ReplicaMode.ReplicationEnabled.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,16 +75,16 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
ddlLetters.Items.Add(new ListItem(Convert.ToChar(i).ToString() + ":", Convert.ToChar(i).ToString()));// Add uppercase letters to possible drive letters
|
||||
}
|
||||
|
||||
string[] usedLetters = ES.Services.EnterpriseStorage.GetUsedDriveLetters(PanelRequest.ItemID);
|
||||
//string[] usedLetters = ES.Services.EnterpriseStorage.GetUsedDriveLetters(PanelRequest.ItemID);
|
||||
|
||||
foreach (string elem in usedLetters)
|
||||
{
|
||||
ListItem item = new ListItem(elem + ":", elem);
|
||||
if (ddlLetters.Items.Contains(item))
|
||||
{
|
||||
ddlLetters.Items.Remove(item);
|
||||
}
|
||||
}
|
||||
//foreach (string elem in usedLetters)
|
||||
//{
|
||||
// ListItem item = new ListItem(elem + ":", elem);
|
||||
// if (ddlLetters.Items.Contains(item))
|
||||
// {
|
||||
// ddlLetters.Items.Remove(item);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
protected void btnCreate_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgDelDriveMap" runat="server" Text="Delete" SkinID="ExchangeDelete"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("DriveLetter") %>'
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("Folder.Name") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected map drive?')"></asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -401,4 +401,46 @@ The following substitution variables can be used in the pattern:<br/>
|
|||
<data name="locHyperVCloud.Text" xml:space="preserve">
|
||||
<value>Hyper-V Cloud</value>
|
||||
</data>
|
||||
<data name="btnSetReplicaServer.Text" xml:space="preserve">
|
||||
<value>Set</value>
|
||||
</data>
|
||||
<data name="CertificateThumbnailValidator.ErrorMessage" xml:space="preserve">
|
||||
<value>Enter the thumbnail of a SSL certificate</value>
|
||||
</data>
|
||||
<data name="locCertThumbnail.Text" xml:space="preserve">
|
||||
<value>SSL Certificate Thumbprint:</value>
|
||||
</data>
|
||||
<data name="locErrorSetReplica.Text" xml:space="preserve">
|
||||
<value>Can not to set server as a replication server with the entered server name, replication path and SSL certificate</value>
|
||||
</data>
|
||||
<data name="locReplicaPath.Text" xml:space="preserve">
|
||||
<value>Path for Replications:</value>
|
||||
</data>
|
||||
<data name="locReplication.Text" xml:space="preserve">
|
||||
<value>Replication</value>
|
||||
</data>
|
||||
<data name="ReplicaPathValidator.ErrorMessage" xml:space="preserve">
|
||||
<value>Enter path to replication virtual machines</value>
|
||||
</data>
|
||||
<data name="ReplicaServerValidator.ErrorMessage" xml:space="preserve">
|
||||
<value>Enter a replication server</value>
|
||||
</data>
|
||||
<data name="ReplicationModeDisabled.Text" xml:space="preserve">
|
||||
<value>No Hyper-v Replication</value>
|
||||
</data>
|
||||
<data name="ReplicationModeEnabled.Text" xml:space="preserve">
|
||||
<value>Enable Hyper-V Replication</value>
|
||||
</data>
|
||||
<data name="ReplicationModeIsReplicaServer.Text" xml:space="preserve">
|
||||
<value>This is a Replica Server</value>
|
||||
</data>
|
||||
<data name="locEnableReplicaError.Text" xml:space="preserve">
|
||||
<value>Please add a server with the enabled replication and select it from list</value>
|
||||
</data>
|
||||
<data name="locErrorPathReplica.Text" xml:space="preserve">
|
||||
<value>Please enter replication path</value>
|
||||
</data>
|
||||
<data name="locReplicaServer.Text" xml:space="preserve">
|
||||
<value>Replication Server:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -82,6 +82,16 @@
|
|||
Text="*" meta:resourcekey="ExportedVpsPathValidator" Display="Dynamic" SetFocusOnError="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" style="width:200px;">
|
||||
<asp:Localize ID="locDvdIsoPath" runat="server" meta:resourcekey="locDvdIsoPath" Text="Path to DVD ISO files:"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox Width="300px" CssClass="NormalTextBox" Runat="server" ID="txtDvdLibraryPath"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="DvdLibraryPathValidator" runat="server" ControlToValidate="txtDvdLibraryPath"
|
||||
Text="*" meta:resourcekey="DvdLibraryPathValidator" Display="Dynamic" SetFocusOnError="true" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<br />
|
||||
|
@ -129,19 +139,89 @@
|
|||
|
||||
<fieldset>
|
||||
<legend>
|
||||
<asp:Localize ID="locMediaLibrary" runat="server" meta:resourcekey="locMediaLibrary" Text="DVD Media Library"></asp:Localize>
|
||||
<asp:Localize ID="locReplication" runat="server" meta:resourcekey="locReplication" Text="Replication"></asp:Localize>
|
||||
</legend>
|
||||
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
|
||||
<tr>
|
||||
<td class="SubHead" style="width:200px;">
|
||||
<asp:Localize ID="locDvdIsoPath" runat="server" meta:resourcekey="locDvdIsoPath" Text="Path to DVD ISO files:"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox Width="300px" CssClass="NormalTextBox" Runat="server" ID="txtDvdLibraryPath"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="DvdLibraryPathValidator" runat="server" ControlToValidate="txtDvdLibraryPath"
|
||||
Text="*" meta:resourcekey="DvdLibraryPathValidator" Display="Dynamic" SetFocusOnError="true" />
|
||||
<table cellpadding="2" cellspacing="0" style="margin: 10px;">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:RadioButtonList ID="ReplicationModeList" runat="server" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="radioServer_SelectedIndexChanged">
|
||||
<asp:ListItem Value="None" meta:resourcekey="ReplicationModeDisabled" Selected="True">No Hyper-v Replication</asp:ListItem>
|
||||
<asp:ListItem Value="ReplicationEnabled" meta:resourcekey="ReplicationModeEnabled">Enable Hyper-V Replication</asp:ListItem>
|
||||
<asp:ListItem Value="IsReplicaServer" meta:resourcekey="ReplicationModeIsReplicaServer">This is a Replica Server</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="EnableReplicaRow" runat="server">
|
||||
<td class="SubHead" style="padding-left: 20px;" colspan="2">
|
||||
<table cellpadding="2" cellspacing="0" style="margin: 10px;">
|
||||
<tr>
|
||||
<td style="width: 180px">
|
||||
<asp:Localize ID="locReplicaServer" runat="server" meta:resourcekey="locReplicaServer" Text="Replication Server:"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddlReplicaServer" runat="server" Width="300px"></asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="ReplicaServerValidator" runat="server" ControlToValidate="ddlReplicaServer"
|
||||
Text="*" meta:resourcekey="ReplicaServerValidator" Display="Dynamic" SetFocusOnError="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="EnableReplicaErrorTr" runat="server" visible="False">
|
||||
<td colspan="2">
|
||||
<asp:Label ID="locEnableReplicaError" runat="server" meta:resourcekey="locEnableReplicaError" ForeColor="Red"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="IsReplicaServerRow" runat="server">
|
||||
<td class="SubHead" style="padding-left: 20px;" colspan="2">
|
||||
<table cellpadding="2" cellspacing="0" style="margin: 10px;">
|
||||
<tr>
|
||||
<td style="width: 200px;">
|
||||
<asp:Localize ID="locReplicaPath" runat="server" meta:resourcekey="locReplicaPath" Text="Path to Replications:"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox Width="300px" CssClass="NormalTextBox" runat="server" ID="txtReplicaPath"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="ReplicaPathValidator" runat="server" ControlToValidate="txtReplicaPath"
|
||||
Text="*" meta:resourcekey="ReplicaPathValidator" Display="Dynamic" SetFocusOnError="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 200px">
|
||||
<asp:Localize ID="locCertThumbnail" runat="server" meta:resourcekey="locCertThumbnail" Text="SSL Certificate Thumbnail:"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddlCertThumbnail" runat="server" Width="500px"></asp:DropDownList>
|
||||
<asp:TextBox Width="400px" CssClass="NormalTextBox" runat="server" ID="txtCertThumbnail"></asp:TextBox>
|
||||
|
||||
<asp:Button ID="btnSetReplicaServer" runat="server" meta:resourcekey="btnSetReplicaServer"
|
||||
CssClass="Button1" Text="Set" CausesValidation="false"
|
||||
OnClick="btnSetReplicaServer_Click" />
|
||||
|
||||
<asp:RequiredFieldValidator ID="CertificateThumbnailValidator" runat="server" ControlToValidate="txtCertThumbnail"
|
||||
Text="*" meta:resourcekey="CertificateThumbnailValidator" Display="Dynamic" SetFocusOnError="true" />
|
||||
<asp:RequiredFieldValidator ID="CertificateDdlThumbnailValidator" runat="server" ControlToValidate="ddlCertThumbnail"
|
||||
Text="*" meta:resourcekey="CertificateThumbnailValidator" Display="Dynamic" SetFocusOnError="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ReplicaPathErrorTr" runat="server" Visible="False">
|
||||
<td colspan="2">
|
||||
<asp:Label ID="locErrorPathReplica" runat="server"
|
||||
meta:resourcekey="locErrorPathReplica" ForeColor="Red"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ReplicaErrorTr" runat="server" Visible="False">
|
||||
<td colspan="2">
|
||||
<asp:Label ID="locErrorSetReplica" runat="server"
|
||||
meta:resourcekey="locErrorSetReplica" ForeColor="Red"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</fieldset>
|
||||
<br />
|
||||
|
|
|
@ -26,21 +26,15 @@
|
|||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Collections.Specialized;
|
||||
using WebsitePanel.Providers.Virtualization;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using System.Web.UI.MobileControls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.Virtualization;
|
||||
|
||||
namespace WebsitePanel.Portal.ProviderControls
|
||||
{
|
||||
|
@ -50,6 +44,13 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
{
|
||||
}
|
||||
|
||||
public bool IsRemoteServer { get { return radioServer.SelectedIndex > 0; } }
|
||||
public string RemoteServerName { get { return IsRemoteServer ? txtServerName.Text.Trim() : ""; } }
|
||||
public string CertificateThumbprint { get { return IsRemoteServer ? txtCertThumbnail.Text.Trim() : ddlCertThumbnail.SelectedValue; } }
|
||||
public bool IsReplicaServer { get { return ReplicationModeList.SelectedValue == ReplicaMode.IsReplicaServer.ToString(); } }
|
||||
public bool EnabledReplica { get { return ReplicationModeList.SelectedValue == ReplicaMode.ReplicationEnabled.ToString(); } }
|
||||
public string ReplicaServerId { get; set; }
|
||||
|
||||
void IHostingServiceProviderSettings.BindSettings(StringDictionary settings)
|
||||
{
|
||||
txtServerName.Text = settings["ServerName"];
|
||||
|
@ -104,7 +105,25 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
// stop
|
||||
radioStopAction.SelectedValue = settings["StopAction"];
|
||||
|
||||
// replica
|
||||
ReplicationModeList.SelectedValue = settings["ReplicaMode"] ?? ReplicaMode.None.ToString();
|
||||
txtReplicaPath.Text = settings["ReplicaServerPath"];
|
||||
ReplicaServerId = settings["ReplicaServerId"];
|
||||
|
||||
ToggleControls();
|
||||
|
||||
// replica
|
||||
txtCertThumbnail.Text = settings["ReplicaServerThumbprint"];
|
||||
ddlCertThumbnail.SelectedValue = settings["ReplicaServerThumbprint"];
|
||||
ddlReplicaServer.SelectedValue = settings["ReplicaServerId"];
|
||||
|
||||
if (IsReplicaServer)
|
||||
{
|
||||
var realReplica = ES.Services.VPS2012.GetReplicaServer(PanelRequest.ServiceId, RemoteServerName);
|
||||
|
||||
if (realReplica == null)
|
||||
ReplicaErrorTr.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
void IHostingServiceProviderSettings.SaveSettings(StringDictionary settings)
|
||||
|
@ -156,13 +175,21 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
|
||||
// stop
|
||||
settings["StopAction"] = radioStopAction.SelectedValue;
|
||||
|
||||
// replication
|
||||
settings["ReplicaMode"] = ReplicationModeList.SelectedValue;
|
||||
settings["ReplicaServerId"] = ddlReplicaServer.SelectedValue;
|
||||
settings["ReplicaServerPath"] = txtReplicaPath.Text;
|
||||
settings["ReplicaServerThumbprint"] = CertificateThumbprint;
|
||||
|
||||
SetUnsetReplication();
|
||||
}
|
||||
|
||||
private void BindNetworksList()
|
||||
{
|
||||
try
|
||||
{
|
||||
VirtualSwitch[] switches = ES.Services.VPS.GetExternalSwitches(PanelRequest.ServiceId, txtServerName.Text.Trim());
|
||||
VirtualSwitch[] switches = ES.Services.VPS2012.GetExternalSwitches(PanelRequest.ServiceId, txtServerName.Text.Trim());
|
||||
|
||||
ddlExternalNetworks.DataSource = switches;
|
||||
ddlExternalNetworks.DataBind();
|
||||
|
@ -181,6 +208,74 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
}
|
||||
}
|
||||
|
||||
private void BindCertificates()
|
||||
{
|
||||
CertificateInfo[] certificates = ES.Services.VPS2012.GetCertificates(PanelRequest.ServiceId, RemoteServerName);
|
||||
|
||||
if (certificates != null)
|
||||
{
|
||||
ddlCertThumbnail.Items.Clear();
|
||||
certificates.ToList().ForEach(c => ddlCertThumbnail.Items.Add(new ListItem(c.Title, c.Thumbprint)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void BindReplicaServices()
|
||||
{
|
||||
ddlReplicaServer.Items.Clear();
|
||||
|
||||
ServiceInfo serviceInfo = ES.Services.Servers.GetServiceInfo(PanelRequest.ServiceId);
|
||||
DataView dvServices = ES.Services.Servers.GetRawServicesByGroupName(ResourceGroups.VPS2012).Tables[0].DefaultView;
|
||||
|
||||
List<ServiceInfo> services = GetServices(ReplicaServerId);
|
||||
|
||||
foreach (DataRowView dr in dvServices)
|
||||
{
|
||||
int serviceId = (int)dr["ServiceID"];
|
||||
|
||||
ServiceInfo currentServiceInfo = ES.Services.Servers.GetServiceInfo(serviceId);
|
||||
if (currentServiceInfo == null || currentServiceInfo.ProviderId != serviceInfo.ProviderId)
|
||||
continue;
|
||||
|
||||
var currentServiceSettings = ConvertArrayToDictionary(ES.Services.Servers.GetServiceSettings(serviceId));
|
||||
if (currentServiceSettings["ReplicaMode"] != ReplicaMode.IsReplicaServer.ToString())
|
||||
continue;
|
||||
|
||||
var exists = false;
|
||||
if (services != null)
|
||||
exists = services.Any(current => current != null && current.ServiceId == serviceId);
|
||||
|
||||
var listItem = new ListItem(dr["FullServiceName"].ToString(), serviceId.ToString()) {Selected = exists};
|
||||
ddlReplicaServer.Items.Add(listItem);
|
||||
}
|
||||
}
|
||||
|
||||
private List<ServiceInfo> GetServices(string data)
|
||||
{
|
||||
if (string.IsNullOrEmpty(data))
|
||||
return null;
|
||||
List<ServiceInfo> list = new List<ServiceInfo>();
|
||||
string[] servicesIds = data.Split(',');
|
||||
foreach (string current in servicesIds)
|
||||
{
|
||||
ServiceInfo serviceInfo = ES.Services.Servers.GetServiceInfo(Utils.ParseInt(current));
|
||||
list.Add(serviceInfo);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private StringDictionary ConvertArrayToDictionary(string[] settings)
|
||||
{
|
||||
StringDictionary r = new StringDictionary();
|
||||
foreach (string setting in settings)
|
||||
{
|
||||
int idx = setting.IndexOf('=');
|
||||
r.Add(setting.Substring(0, idx), setting.Substring(idx + 1));
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
private void ToggleControls()
|
||||
{
|
||||
ServerNameRow.Visible = (radioServer.SelectedIndex == 1);
|
||||
|
@ -197,6 +292,15 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
ManageNicConfigRow.Visible = (ddlManagementNetworks.SelectedIndex > 0);
|
||||
ManageAlternateNameServerRow.Visible = ManageNicConfigRow.Visible && (ddlManageNicConfig.SelectedIndex == 0);
|
||||
ManagePreferredNameServerRow.Visible = ManageNicConfigRow.Visible && (ddlManageNicConfig.SelectedIndex == 0);
|
||||
|
||||
// Replica
|
||||
EnableReplicaRow.Visible = EnabledReplica;
|
||||
IsReplicaServerRow.Visible = IsReplicaServer;
|
||||
ddlCertThumbnail.Visible = CertificateDdlThumbnailValidator.Visible = !IsRemoteServer;
|
||||
txtCertThumbnail.Visible = CertificateThumbnailValidator.Visible = IsRemoteServer;
|
||||
ReplicaPathErrorTr.Visible = ReplicaErrorTr.Visible = false;
|
||||
if (IsReplicaServer) BindCertificates();
|
||||
if (EnabledReplica) BindReplicaServices();
|
||||
}
|
||||
|
||||
protected void radioServer_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
@ -223,5 +327,32 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
{
|
||||
ToggleControls();
|
||||
}
|
||||
|
||||
protected void btnSetReplicaServer_Click(object sender, EventArgs e)
|
||||
{
|
||||
ToggleControls();
|
||||
SetUnsetReplication();
|
||||
}
|
||||
|
||||
private void SetUnsetReplication()
|
||||
{
|
||||
if (!IsReplicaServer)
|
||||
{
|
||||
ES.Services.VPS2012.UnsetReplicaServer(PanelRequest.ServiceId, RemoteServerName);
|
||||
return;
|
||||
}
|
||||
|
||||
if (txtReplicaPath.Text == "")
|
||||
{
|
||||
ReplicaPathErrorTr.Visible = true;
|
||||
return;
|
||||
}
|
||||
|
||||
var thumbprint = IsRemoteServer ? txtCertThumbnail.Text : ddlCertThumbnail.SelectedValue;
|
||||
ResultObject result = ES.Services.VPS2012.SetReplicaServer(PanelRequest.ServiceId, RemoteServerName, thumbprint, txtReplicaPath.Text);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
ReplicaErrorTr.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,6 +201,33 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator ExportedVpsPathValidator;
|
||||
|
||||
/// <summary>
|
||||
/// locDvdIsoPath 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 locDvdIsoPath;
|
||||
|
||||
/// <summary>
|
||||
/// txtDvdLibraryPath 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.TextBox txtDvdLibraryPath;
|
||||
|
||||
/// <summary>
|
||||
/// DvdLibraryPathValidator 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.RequiredFieldValidator DvdLibraryPathValidator;
|
||||
|
||||
/// <summary>
|
||||
/// locProcessorSettings control.
|
||||
/// </summary>
|
||||
|
@ -292,40 +319,202 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
protected global::System.Web.UI.WebControls.RequiredFieldValidator CpuWeightValidator;
|
||||
|
||||
/// <summary>
|
||||
/// locMediaLibrary control.
|
||||
/// locReplication 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 locMediaLibrary;
|
||||
protected global::System.Web.UI.WebControls.Localize locReplication;
|
||||
|
||||
/// <summary>
|
||||
/// locDvdIsoPath control.
|
||||
/// ReplicationModeList 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 locDvdIsoPath;
|
||||
protected global::System.Web.UI.WebControls.RadioButtonList ReplicationModeList;
|
||||
|
||||
/// <summary>
|
||||
/// txtDvdLibraryPath control.
|
||||
/// EnableReplicaRow 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.TextBox txtDvdLibraryPath;
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow EnableReplicaRow;
|
||||
|
||||
/// <summary>
|
||||
/// DvdLibraryPathValidator control.
|
||||
/// locReplicaServer 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.RequiredFieldValidator DvdLibraryPathValidator;
|
||||
protected global::System.Web.UI.WebControls.Localize locReplicaServer;
|
||||
|
||||
/// <summary>
|
||||
/// ddlReplicaServer 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 ddlReplicaServer;
|
||||
|
||||
/// <summary>
|
||||
/// ReplicaServerValidator 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.RequiredFieldValidator ReplicaServerValidator;
|
||||
|
||||
/// <summary>
|
||||
/// EnableReplicaErrorTr control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow EnableReplicaErrorTr;
|
||||
|
||||
/// <summary>
|
||||
/// locEnableReplicaError 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 locEnableReplicaError;
|
||||
|
||||
/// <summary>
|
||||
/// IsReplicaServerRow control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow IsReplicaServerRow;
|
||||
|
||||
/// <summary>
|
||||
/// locReplicaPath 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 locReplicaPath;
|
||||
|
||||
/// <summary>
|
||||
/// txtReplicaPath 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.TextBox txtReplicaPath;
|
||||
|
||||
/// <summary>
|
||||
/// ReplicaPathValidator 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.RequiredFieldValidator ReplicaPathValidator;
|
||||
|
||||
/// <summary>
|
||||
/// locCertThumbnail 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 locCertThumbnail;
|
||||
|
||||
/// <summary>
|
||||
/// ddlCertThumbnail 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 ddlCertThumbnail;
|
||||
|
||||
/// <summary>
|
||||
/// txtCertThumbnail 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.TextBox txtCertThumbnail;
|
||||
|
||||
/// <summary>
|
||||
/// btnSetReplicaServer 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.Button btnSetReplicaServer;
|
||||
|
||||
/// <summary>
|
||||
/// CertificateThumbnailValidator 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.RequiredFieldValidator CertificateThumbnailValidator;
|
||||
|
||||
/// <summary>
|
||||
/// CertificateDdlThumbnailValidator 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.RequiredFieldValidator CertificateDdlThumbnailValidator;
|
||||
|
||||
/// <summary>
|
||||
/// ReplicaPathErrorTr control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow ReplicaPathErrorTr;
|
||||
|
||||
/// <summary>
|
||||
/// locErrorPathReplica 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 locErrorPathReplica;
|
||||
|
||||
/// <summary>
|
||||
/// ReplicaErrorTr control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow ReplicaErrorTr;
|
||||
|
||||
/// <summary>
|
||||
/// locErrorSetReplica 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 locErrorSetReplica;
|
||||
|
||||
/// <summary>
|
||||
/// locVhd control.
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchObject.ascx.cs" Inherits="WebsitePanel.Portal.SearchObject" %>
|
||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||
|
||||
<script>
|
||||
var estop = function (e) {
|
||||
if (!e) e = window.event;
|
||||
e.cancelBubble = true;
|
||||
if (e.stopPropagation) e.stopPropagation();
|
||||
return e;
|
||||
}
|
||||
|
||||
var CPopupDialog = function (el, e) {
|
||||
if (typeof el == 'string')
|
||||
el = document.getElementById(el);
|
||||
e = estop(e);
|
||||
|
||||
var oldclick = document.body.onclick;
|
||||
el.onclick = estop;
|
||||
|
||||
function close() {
|
||||
el.style.display = "none";
|
||||
document.body.onclick = oldclick;
|
||||
}
|
||||
|
||||
function show(x, y) {
|
||||
el.style.left = x ? x : e.clientX + document.documentElement.scrollLeft + "px";
|
||||
el.style.top = y ? y : e.clientY + document.documentElement.scrollTop + "px";
|
||||
el.style.display = "block";
|
||||
document.body.onclick = close;
|
||||
}
|
||||
|
||||
show();
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
var loadFilters = function()
|
||||
{
|
||||
var typesSelected = JSON.parse($("#tbFilters").val());
|
||||
$("#mydialog input[rel]").each(function () {
|
||||
var rel = $(this).attr('rel');
|
||||
if (typesSelected.indexOf(rel) >= 0)
|
||||
$(this).val("1");
|
||||
})
|
||||
}
|
||||
|
||||
$("#btnSelectFilter").click(function(e)
|
||||
{
|
||||
var typesSelected = [];
|
||||
$("#mydialog input[rel]").each(function () {
|
||||
var val = $(this).attr("checked");
|
||||
if (val) typesSelected.push($(this).attr('rel'));
|
||||
});
|
||||
$("#tbFilters").val(JSON.stringify(typesSelected));
|
||||
document.forms[0].submit();
|
||||
})
|
||||
|
||||
loadFilters();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<asp:GridView id="gvObjects" runat="server" AutoGenerateColumns="False"
|
||||
AllowPaging="True" AllowSorting="True"
|
||||
CssSelectorClass="NormalGridView"
|
||||
DataSourceID="odsObjectsPaged" EnableViewState="False"
|
||||
EmptyDataText="gvObjects">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvType" SortExpression="ColumnType">
|
||||
<HeaderTemplate>
|
||||
<a href="javascript: void(0)" onclick="CPopupDialog('mydialog',event)">Type</a>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<%# Eval("ColumnType") %>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField SortExpression="TextSearch" HeaderText="gvText" HeaderStyle-Wrap="false">
|
||||
<ItemTemplate>
|
||||
<asp:hyperlink id=lnkUser runat="server" NavigateUrl='<%# GetItemPageUrl((string)Eval("FullType"), (string)Eval("ColumnType"), (int)Eval("ItemID"), (int)Eval("PackageID")) %>'>
|
||||
<%# Eval("TextSearch") %>
|
||||
</asp:hyperlink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FullType" HtmlEncode="false" SortExpression="FullType" HeaderText="gvFullType">
|
||||
<HeaderStyle Wrap="false" />
|
||||
</asp:BoundField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<asp:ObjectDataSource ID="odsObjectsPaged" runat="server" EnablePaging="True" SelectCountMethod="SearchObjectItemsPagedCount"
|
||||
SelectMethod="SearchObjectItemsPaged" SortParameterName="sortColumn" TypeName="WebsitePanel.Portal.PackagesHelper" OnSelected="odsObjectPaged_Selected" OnSelecting="odsObjectPaged_Selecting">
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="filterColumn" QueryStringField="Criteria" />
|
||||
<asp:QueryStringParameter Name="filterValue" QueryStringField="Query" />
|
||||
<asp:QueryStringParameter Name="fullType" QueryStringField="FullType" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
|
||||
<asp:ObjectDataSource ID="odsObjectTypes" runat="server" EnablePaging="false"
|
||||
SelectMethod="SearchObjectTypes" SortParameterName="sortColumn" TypeName="WebsitePanel.Portal.PackagesHelper">
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="filterColumn" QueryStringField="Criteria" />
|
||||
<asp:QueryStringParameter Name="filterValue" QueryStringField="Query" />
|
||||
<asp:QueryStringParameter Name="fullType" QueryStringField="FullType" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
|
||||
<div id="mydialog" class="ui-popupdialog">
|
||||
<div class="title">Select filter</div>
|
||||
<div class="content">
|
||||
<asp:GridView runat="server" DataSourceID="odsObjectTypes" SortParameterName="sortColumn" ShowHeader="false" AutoGenerateColumns="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<input type="checkbox" runat="server" rel='<%# Eval("ColumnType") %>'></input>
|
||||
<%# Eval("ColumnType") %>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a id="btnSelectFilter" href="javascript: void(0)" class="ui-button">Apply</a>
|
||||
<a onclick="document.body.onclick.apply(event)" href="javascript: void(0)" class="ui-button">Close</a>
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
<asp:TextBox ClientIDMode="Static" ID="tbFilters" type="hidden" runat="server"></asp:TextBox>
|
||||
</div>
|
|
@ -0,0 +1,86 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.Script.Serialization;
|
||||
using WebsitePanel.WebPortal;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
public partial class SearchObject : WebsitePanelModuleBase
|
||||
{
|
||||
const string TYPE_WEBSITE = "WebSite";
|
||||
const string TYPE_DOMAIN = "Domain";
|
||||
const string TYPE_ORGANIZATION = "Organization";
|
||||
const string PID_SPACE_WEBSITES = "SpaceWebSites";
|
||||
const string PID_SPACE_DIMAINS = "SpaceDomains";
|
||||
const string PID_SPACE_EXCHANGESERVER = "SpaceExchangeServer";
|
||||
|
||||
String m_strColTypes = "";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (IsPostBack)
|
||||
{
|
||||
var jsonSerialiser = new JavaScriptSerializer();
|
||||
String[] aTypes = jsonSerialiser.Deserialize<String[]>(tbFilters.Text);
|
||||
if ((aTypes != null) && (aTypes.Length > 0))
|
||||
m_strColTypes = "'" + String.Join("','", aTypes) + "'";
|
||||
else
|
||||
m_strColTypes = "";
|
||||
}
|
||||
}
|
||||
|
||||
protected void odsObjectPaged_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
|
||||
{
|
||||
e.InputParameters["colType"] = m_strColTypes;
|
||||
}
|
||||
|
||||
protected void odsObjectPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
if (e.Exception != null)
|
||||
{
|
||||
ProcessException(e.Exception.InnerException);
|
||||
e.ExceptionHandled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetItemPageUrl(string fullType, string itemType, int itemId, int spaceId)
|
||||
{
|
||||
string res = "";
|
||||
if (fullType.Equals("Users"))
|
||||
{
|
||||
res = PortalUtils.GetUserHomePageUrl(itemId);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (itemType)
|
||||
{
|
||||
case TYPE_WEBSITE:
|
||||
res = PortalUtils.NavigatePageURL(PID_SPACE_WEBSITES, "ItemID", itemId.ToString(),
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, DefaultPage.CONTROL_ID_PARAM + "=" + "edit_item",
|
||||
"moduleDefId=websites");
|
||||
break;
|
||||
case TYPE_DOMAIN:
|
||||
res = PortalUtils.NavigatePageURL(PID_SPACE_DIMAINS, "DomainID", itemId.ToString(),
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, DefaultPage.CONTROL_ID_PARAM + "=" + "edit_item",
|
||||
"moduleDefId=domains");
|
||||
break;
|
||||
case TYPE_ORGANIZATION:
|
||||
res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(),
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, DefaultPage.CONTROL_ID_PARAM + "=" + "organization_home",
|
||||
"moduleDefId=ExchangeServer");
|
||||
break;
|
||||
default:
|
||||
res = PortalUtils.GetSpaceHomePageUrl(itemId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
||||
|
||||
public partial class SearchObject {
|
||||
|
||||
/// <summary>
|
||||
/// gvObjects 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 gvObjects;
|
||||
|
||||
/// <summary>
|
||||
/// odsObjectsPaged 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 odsObjectsPaged;
|
||||
|
||||
/// <summary>
|
||||
/// odsObjectTypes 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 odsObjectTypes;
|
||||
|
||||
/// <summary>
|
||||
/// tbFilters 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.TextBox tbFilters;
|
||||
}
|
||||
}
|
|
@ -3,13 +3,94 @@
|
|||
<%@ Register Src="UserControls/ServerDetails.ascx" TagName="ServerDetails" TagPrefix="uc3" %>
|
||||
<%@ Register Src="UserControls/Comments.ascx" TagName="Comments" TagPrefix="uc4" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(document).ready(function () {
|
||||
$("#tbSearch").autocomplete({
|
||||
zIndex: 100,
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
term: request.term,
|
||||
fullType: 'Spaces',
|
||||
itemType: $("#ddlItemType").val()
|
||||
},
|
||||
url: "AjaxHandler.ashx",
|
||||
success: function (data) {
|
||||
response($.map(data, function (item) {
|
||||
return {
|
||||
label: item.TextSearch,
|
||||
code: item
|
||||
};
|
||||
}));
|
||||
}
|
||||
})
|
||||
},
|
||||
select: function (event, ui) {
|
||||
var item = ui.item;
|
||||
$("#ddlItemType").val(item.code.ColumnType);
|
||||
$("#tbSearchFullType").val(item.code.FullType);
|
||||
$("#tbSearchText").val(item.code.TextSearch);
|
||||
}
|
||||
});
|
||||
});//]]>
|
||||
</script>
|
||||
|
||||
<div class="FormButtonsBar">
|
||||
<asp:Panel ID="tblSearch" runat="server" DefaultButton="cmdSearch" CssClass="NormalBold">
|
||||
<asp:Label ID="lblSearch" runat="server" meta:resourcekey="lblSearch"></asp:Label>
|
||||
<asp:DropDownList ID="ddlItemType" runat="server" CssClass="NormalTextBox">
|
||||
</asp:DropDownList><asp:TextBox ID="txtFilterValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" SkinID="SearchButton" meta:resourcekey="cmdSearch"
|
||||
CausesValidation="false" OnClick="cmdSearch_Click" />
|
||||
<asp:Panel ID="tblSearch" runat="server" DefaultButton="ImageButton1" CssClass="NormalBold">
|
||||
<asp:Label ID="lblSearch" runat="server" meta:resourcekey="lblSearch"></asp:Label>
|
||||
<div align="center">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:DropDownList ClientIDMode="Static" ID="ddlItemType" runat="server" CssClass="NormalTextBox">
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" align="right">
|
||||
<tr>
|
||||
<td align="left" class="SearchQuery">
|
||||
<div class="ui-widget">
|
||||
<asp:TextBox
|
||||
ID="tbSearch"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
CssClass="NormalTextBox"
|
||||
Width="120px"
|
||||
style="vertical-align: middle; z-index: 100;"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbSearchFullType"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbSearchText"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
|
||||
<asp:ImageButton
|
||||
ID="ImageButton1"
|
||||
runat="server"
|
||||
SkinID="SearchButton"
|
||||
OnClick="cmdSearch_Click"
|
||||
CausesValidation="false"
|
||||
style="vertical-align: middle;"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace WebsitePanel.Portal
|
|||
|
||||
// bind filter
|
||||
Utils.SelectListItem(ddlItemType, Request["ItemTypeID"]);
|
||||
txtFilterValue.Text = Request["Query"];
|
||||
tbSearch.Text = Request["Query"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,9 @@ namespace WebsitePanel.Portal
|
|||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
string query = txtFilterValue.Text.Trim().Replace("%", "");
|
||||
string query = tbSearchText.Text.Trim().Replace("%", "");
|
||||
if (query.Length == 0)
|
||||
query = tbSearch.Text.Trim().Replace("%", "");
|
||||
|
||||
Response.Redirect(NavigateURL(
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
|
|
|
@ -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.
|
||||
|
@ -68,22 +40,40 @@ namespace WebsitePanel.Portal {
|
|||
protected global::System.Web.UI.WebControls.DropDownList ddlItemType;
|
||||
|
||||
/// <summary>
|
||||
/// txtFilterValue control.
|
||||
/// tbSearch 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.TextBox txtFilterValue;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbSearch;
|
||||
|
||||
/// <summary>
|
||||
/// cmdSearch control.
|
||||
/// tbSearchFullType 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.ImageButton cmdSearch;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbSearchFullType;
|
||||
|
||||
/// <summary>
|
||||
/// tbSearchText 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.TextBox tbSearchText;
|
||||
|
||||
/// <summary>
|
||||
/// ImageButton1 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.ImageButton ImageButton1;
|
||||
|
||||
/// <summary>
|
||||
/// gvPackages control.
|
||||
|
|
|
@ -5,16 +5,100 @@
|
|||
<%@ Register Src="UserControls/UserDetails.ascx" TagName="UserDetails" TagPrefix="uc2" %>
|
||||
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(document).ready(function () {
|
||||
$("#tbSearch").autocomplete({
|
||||
zIndex: 100,
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
term: request.term,
|
||||
fullType: 'Users',
|
||||
columnType: "'" + $("#ddlFilterColumn").val() + "'"
|
||||
},
|
||||
url: "AjaxHandler.ashx",
|
||||
success: function (data) {
|
||||
response($.map(data, function (item) {
|
||||
return {
|
||||
label: item.TextSearch,
|
||||
code: item
|
||||
};
|
||||
}));
|
||||
}
|
||||
})
|
||||
},
|
||||
select: function (event, ui) {
|
||||
var item = ui.item;
|
||||
$("#ddlFilterColumn").val(item.code.ColumnType);
|
||||
$("#tbSearchFullType").val(item.code.FullType);
|
||||
$("#tbSearchText").val(item.code.TextSearch);
|
||||
}
|
||||
});
|
||||
});//]]>
|
||||
</script>
|
||||
|
||||
<div class="FormButtonsBar">
|
||||
<asp:Panel ID="tblSearch" runat="server" DefaultButton="cmdSearch" CssClass="NormalBold">
|
||||
<asp:Panel ID="tblSearch" runat="server" CssClass="NormalBold" DefaultButton="ImageButton1">
|
||||
<asp:Label ID="lblSearch" runat="server" meta:resourcekey="lblSearch"></asp:Label>
|
||||
<asp:DropDownList ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" resourcekey="ddlFilterColumn">
|
||||
<asp:ListItem Value="Username">Username</asp:ListItem>
|
||||
<asp:ListItem Value="Email">Email</asp:ListItem>
|
||||
<asp:ListItem Value="FullName">FullName</asp:ListItem>
|
||||
<asp:ListItem Value="CompanyName">CompanyName</asp:ListItem>
|
||||
</asp:DropDownList><asp:TextBox ID="txtFilterValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" SkinID="SearchButton" meta:resourcekey="cmdSearch"
|
||||
CausesValidation="false" OnClick="cmdSearch_Click" />
|
||||
<div align="center">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:DropDownList ClientIDMode="Static" ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" resourcekey="ddlFilterColumn">
|
||||
<asp:ListItem Value="Username">Username</asp:ListItem>
|
||||
<asp:ListItem Value="Email">Email</asp:ListItem>
|
||||
<asp:ListItem Value="FullName">FullName</asp:ListItem>
|
||||
<asp:ListItem Value="CompanyName">CompanyName</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" align="right">
|
||||
<tr>
|
||||
<td align="left" class="SearchQuery">
|
||||
<div class="ui-widget">
|
||||
<asp:TextBox
|
||||
ID="tbSearch"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
CssClass="NormalTextBox"
|
||||
Width="120px"
|
||||
style="vertical-align: middle; z-index: 100;"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbSearchFullType"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbSearchText"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
|
||||
<asp:ImageButton
|
||||
ID="ImageButton1"
|
||||
runat="server"
|
||||
SkinID="SearchButton"
|
||||
OnClick="cmdSearch_Click"
|
||||
CausesValidation="false"
|
||||
style="vertical-align: middle;"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace WebsitePanel.Portal
|
|||
if (!IsPostBack)
|
||||
{
|
||||
Utils.SelectListItem(ddlFilterColumn, Request["Criteria"]);
|
||||
txtFilterValue.Text = Request["Query"];
|
||||
tbSearch.Text = Request["Query"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,9 @@ namespace WebsitePanel.Portal
|
|||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
string query = txtFilterValue.Text.Trim().Replace("%", "");
|
||||
string query = tbSearchText.Text.Trim().Replace("%", "");
|
||||
if (query.Length == 0)
|
||||
query = tbSearch.Text.Trim().Replace("%", "");
|
||||
|
||||
Response.Redirect(NavigateURL(
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
|
|
|
@ -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.
|
||||
|
@ -68,22 +40,40 @@ namespace WebsitePanel.Portal {
|
|||
protected global::System.Web.UI.WebControls.DropDownList ddlFilterColumn;
|
||||
|
||||
/// <summary>
|
||||
/// txtFilterValue control.
|
||||
/// tbSearch 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.TextBox txtFilterValue;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbSearch;
|
||||
|
||||
/// <summary>
|
||||
/// cmdSearch control.
|
||||
/// tbSearchFullType 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.ImageButton cmdSearch;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbSearchFullType;
|
||||
|
||||
/// <summary>
|
||||
/// tbSearchText 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.TextBox tbSearchText;
|
||||
|
||||
/// <summary>
|
||||
/// ImageButton1 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.ImageButton ImageButton1;
|
||||
|
||||
/// <summary>
|
||||
/// gvUsers control.
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="gvType.Header" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="gvText.Header" xml:space="preserve">
|
||||
<value>Search text</value>
|
||||
</data>
|
||||
<data name="gvFullType.Header" xml:space="preserve">
|
||||
<value>Full Type</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,54 +1,110 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GlobalSearch.ascx.cs" Inherits="WebsitePanel.Portal.SkinControls.GlobalSearch" %>
|
||||
<asp:UpdatePanel runat="server" ID="updatePanelUsers" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<table cellpadding="0" cellspacing="0" align="right">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<asp:DataList ID="dlTabs" runat="server" RepeatDirection="Horizontal"
|
||||
OnSelectedIndexChanged="dlTabs_SelectedIndexChanged" RepeatLayout="Table">
|
||||
<ItemStyle Wrap="false" VerticalAlign="Top" />
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkTab" runat="server" CommandName="select"
|
||||
CausesValidation="false" CssClass="SearchMethod">
|
||||
<%# Eval("Name") %>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<SelectedItemStyle Wrap="false" />
|
||||
<SelectedItemTemplate>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="SearchMethodSide" valign="top"></td>
|
||||
<td class="SearchMethodSelected" valign="top"><%# Eval("Name")%></td>
|
||||
<td class="SearchMethodSide" valign="top"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</SelectedItemTemplate>
|
||||
</asp:DataList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="SearchQuery">
|
||||
<asp:MultiView ID="tabs" runat="server" ActiveViewIndex="0">
|
||||
<asp:View ID="tabSearchUsers" runat="server">
|
||||
<asp:Panel ID="pnlSearchUsers" runat="server" DefaultButton="btnSearchUsers">
|
||||
<asp:DropDownList ID="ddlUserFields" runat="server" resourcekey="ddlUserFields" CssClass="NormalTextBox" Width="150px" style="vertical-align: middle;">
|
||||
<asp:ListItem Value="Username">Username</asp:ListItem>
|
||||
<asp:ListItem Value="Email">Email</asp:ListItem>
|
||||
<asp:ListItem Value="FullName">FullName</asp:ListItem>
|
||||
<asp:ListItem Value="CompanyName">CompanyName</asp:ListItem>
|
||||
</asp:DropDownList><asp:TextBox ID="txtUsersQuery" runat="server" CssClass="NormalTextBox" Width="120px" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="btnSearchUsers" runat="server" SkinID="SearchButton" OnClick="btnSearchUsers_Click" CausesValidation="false" style="vertical-align: middle;" />
|
||||
</asp:Panel>
|
||||
</asp:View>
|
||||
<asp:View ID="tabSearchSpaces" runat="server">
|
||||
<asp:Panel ID="pnlSearchSpaces" runat="server" DefaultButton="btnSearchSpaces">
|
||||
<asp:DropDownList ID="ddlItemType" runat="server" Width="150px" CssClass="NormalTextBox" style="vertical-align: middle;">
|
||||
</asp:DropDownList><asp:TextBox ID="txtSpacesQuery" runat="server" CssClass="NormalTextBox" Width="120px" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="btnSearchSpaces" runat="server" SkinID="SearchButton" OnClick="btnSearchSpaces_Click" CausesValidation="false" style="vertical-align: middle;" />
|
||||
</asp:Panel>
|
||||
</asp:View>
|
||||
</asp:MultiView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<style>
|
||||
.ui-menu-item a {white-space: nowrap; }
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$("#<%= tbSearch.ClientID %>").keypress(function (e) {
|
||||
if (e.keyCode != 13) { // VK_RETURN
|
||||
$("#<%= tbSearchText.ClientID %>").val('');
|
||||
$("#<%= tbObjectId.ClientID %>").val('');
|
||||
$("#<%= tbPackageId.ClientID %>").val('');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#<%= tbSearch.ClientID %>").autocomplete({
|
||||
zIndex: 100,
|
||||
source: function(request, response) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
term: request.term
|
||||
},
|
||||
url: "AjaxHandler.ashx",
|
||||
success: function(data)
|
||||
{
|
||||
response($.map(data, function (item) {
|
||||
return {
|
||||
label: item.TextSearch + " [" + item.FullType + "]",
|
||||
code: item
|
||||
};
|
||||
}));
|
||||
}
|
||||
})
|
||||
},
|
||||
select: function (event, ui) {
|
||||
var item = ui.item;
|
||||
$("#<%= tbSearchColumnType.ClientID %>").val(item.code.ColumnType);
|
||||
$("#<%= tbSearchFullType.ClientID %>").val(item.code.FullType);
|
||||
$("#<%= tbSearchText.ClientID %>").val(item.code.TextSearch);
|
||||
$("#<%= tbObjectId.ClientID %>").val(item.code.ItemID);
|
||||
$("#<%= tbPackageId.ClientID %>").val(item.code.PackageID);
|
||||
$("#<%= ImageButton1.ClientID %>").trigger("click");
|
||||
}
|
||||
});
|
||||
});//]]>
|
||||
</script>
|
||||
|
||||
<asp:Panel runat="server" ID="updatePanelUsers" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<table cellpadding="0" cellspacing="0" align="right">
|
||||
<tr>
|
||||
<td align="left" class="SearchQuery">
|
||||
<div class="ui-widget">
|
||||
<asp:TextBox
|
||||
ID="tbSearch"
|
||||
runat="server"
|
||||
CssClass="NormalTextBox"
|
||||
Width="120px"
|
||||
style="vertical-align: middle; z-index: 100;"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbSearchColumnType"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbSearchFullType"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbSearchText"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbObjectId"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbPackageId"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
|
||||
<asp:ImageButton
|
||||
ID="ImageButton1"
|
||||
runat="server"
|
||||
SkinID="SearchButton"
|
||||
OnClick="btnSearchObject_Click"
|
||||
CausesValidation="false"
|
||||
style="vertical-align: middle;"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
|
|
|
@ -44,6 +44,13 @@ namespace WebsitePanel.Portal.SkinControls
|
|||
{
|
||||
public partial class GlobalSearch : WebsitePanelControlBase
|
||||
{
|
||||
const string TYPE_WEBSITE = "WebSite";
|
||||
const string TYPE_DOMAIN = "Domain";
|
||||
const string TYPE_ORGANIZATION = "Organization";
|
||||
const string PID_SPACE_WEBSITES = "SpaceWebSites";
|
||||
const string PID_SPACE_DIMAINS = "SpaceDomains";
|
||||
const string PID_SPACE_EXCHANGESERVER = "SpaceExchangeServer";
|
||||
|
||||
class Tab
|
||||
{
|
||||
int index;
|
||||
|
@ -70,32 +77,20 @@ namespace WebsitePanel.Portal.SkinControls
|
|||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if(!IsPostBack)
|
||||
ClientScriptManager cs = Page.ClientScript;
|
||||
cs.RegisterClientScriptInclude("jquery",ResolveUrl("~/JavaScript/jquery-1.4.4.min.js"));
|
||||
cs.RegisterClientScriptInclude("jqueryui",ResolveUrl("~/JavaScript/jquery-ui-1.8.9.min.js"));
|
||||
// cs.RegisterClientScriptBlock(this.GetType(), "jquerycss",
|
||||
// "<link rel='stylesheet' type='text/css' href='" + ResolveUrl("~/App_Themes/Default/Styles/jquery-ui-1.8.9.css") + "' />");
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindTabs();
|
||||
BindItemTypes();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindTabs()
|
||||
{
|
||||
List<Tab> tabsList = new List<Tab>();
|
||||
if (PanelSecurity.EffectiveUser.Role != UserRole.User)
|
||||
tabsList.Add(new Tab(0, GetLocalizedString("Users.Text")));
|
||||
|
||||
tabsList.Add(new Tab(1, GetLocalizedString("Spaces.Text")));
|
||||
|
||||
if(dlTabs.SelectedIndex == -1)
|
||||
dlTabs.SelectedIndex = 0;
|
||||
dlTabs.DataSource = tabsList.ToArray();
|
||||
dlTabs.DataBind();
|
||||
|
||||
tabs.ActiveViewIndex = tabsList[dlTabs.SelectedIndex].Index;
|
||||
}
|
||||
|
||||
private void BindItemTypes()
|
||||
{
|
||||
// bind item types
|
||||
/* // bind item types
|
||||
DataTable dtItemTypes = ES.Services.Packages.GetSearchableServiceItemTypes().Tables[0];
|
||||
foreach (DataRow dr in dtItemTypes.Rows)
|
||||
{
|
||||
|
@ -108,28 +103,119 @@ namespace WebsitePanel.Portal.SkinControls
|
|||
}
|
||||
//
|
||||
ddlItemType.Items.Add(new ListItem(localizedStr, dr["ItemTypeID"].ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
protected void dlTabs_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindTabs();
|
||||
} */
|
||||
}
|
||||
|
||||
protected void btnSearchUsers_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetUsersSearchPageId(),
|
||||
/* Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetUsersSearchPageId(),
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
"Query=" + Server.UrlEncode(txtUsersQuery.Text),
|
||||
"Criteria=" + ddlUserFields.SelectedValue));
|
||||
"Criteria=" + ddlUserFields.SelectedValue)); */
|
||||
}
|
||||
|
||||
protected void btnSearchSpaces_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetSpacesSearchPageId(),
|
||||
/* Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetSpacesSearchPageId(),
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
"Query=" + Server.UrlEncode(txtSpacesQuery.Text),
|
||||
"ItemTypeID=" + ddlItemType.SelectedValue));
|
||||
"ItemTypeID=" + ddlItemType.SelectedValue)); */
|
||||
}
|
||||
|
||||
public string GetItemPageUrl(string fullType, string itemType, int itemId, int spaceId)
|
||||
{
|
||||
string res = "";
|
||||
if (fullType.Equals("Users"))
|
||||
{
|
||||
res = PortalUtils.GetUserHomePageUrl(itemId);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (itemType)
|
||||
{
|
||||
case TYPE_WEBSITE:
|
||||
res = PortalUtils.NavigatePageURL(PID_SPACE_WEBSITES, "ItemID", itemId.ToString(),
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_item",
|
||||
"moduleDefId=websites");
|
||||
break;
|
||||
case TYPE_DOMAIN:
|
||||
res = PortalUtils.NavigatePageURL(PID_SPACE_DIMAINS, "DomainID", itemId.ToString(),
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_item",
|
||||
"moduleDefId=domains");
|
||||
break;
|
||||
case TYPE_ORGANIZATION:
|
||||
res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(),
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_item",
|
||||
"moduleDefId=ExchangeServer");
|
||||
break;
|
||||
default:
|
||||
res = PortalUtils.GetSpaceHomePageUrl(itemId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
//TODO START
|
||||
protected void btnSearchObject_Click(object sender, EventArgs e)
|
||||
{
|
||||
String strColumnType = tbSearchColumnType.Text;
|
||||
String strFullType = tbSearchFullType.Text;
|
||||
String strText = tbSearchText.Text;
|
||||
if (strText.Length > 0)
|
||||
{
|
||||
if (strFullType == "Users")
|
||||
{
|
||||
if (tbObjectId.Text.Length > 0)
|
||||
{
|
||||
Response.Redirect(PortalUtils.GetUserHomePageUrl(Int32.Parse(tbObjectId.Text)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetUsersSearchPageId(),
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
"Query=" + Server.UrlEncode(strText),
|
||||
"Criteria=" + Server.UrlEncode(strColumnType)
|
||||
));
|
||||
}
|
||||
}
|
||||
else if (strFullType == "Space")
|
||||
{
|
||||
if (tbObjectId.Text.Length > 0)
|
||||
{
|
||||
Response.Redirect(GetItemPageUrl(strFullType,tbSearchColumnType.Text,Int32.Parse(tbObjectId.Text),Int32.Parse(tbPackageId.Text)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetSpacesSearchPageId(),
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
"Query=" + Server.UrlEncode(strText),
|
||||
"Criteria=" + Server.UrlEncode(strColumnType)
|
||||
));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tbObjectId.Text.Length > 0)
|
||||
{
|
||||
Response.Redirect(GetItemPageUrl(strFullType, tbSearchColumnType.Text, Int32.Parse(tbObjectId.Text), Int32.Parse(tbPackageId.Text)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetObjectSearchPageId(),
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
"Query=" + Server.UrlEncode(strText)));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetObjectSearchPageId(),
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
"Query=" + Server.UrlEncode(tbSearch.Text)));
|
||||
}
|
||||
}
|
||||
//TODO END
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
@ -47,114 +19,69 @@ namespace WebsitePanel.Portal.SkinControls {
|
|||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel updatePanelUsers;
|
||||
protected global::System.Web.UI.WebControls.Panel updatePanelUsers;
|
||||
|
||||
/// <summary>
|
||||
/// dlTabs control.
|
||||
/// tbSearch 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.DataList dlTabs;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbSearch;
|
||||
|
||||
/// <summary>
|
||||
/// tabs control.
|
||||
/// tbSearchColumnType 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.MultiView tabs;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbSearchColumnType;
|
||||
|
||||
/// <summary>
|
||||
/// tabSearchUsers control.
|
||||
/// tbSearchFullType 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.View tabSearchUsers;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbSearchFullType;
|
||||
|
||||
/// <summary>
|
||||
/// pnlSearchUsers control.
|
||||
/// tbSearchText 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 pnlSearchUsers;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbSearchText;
|
||||
|
||||
/// <summary>
|
||||
/// ddlUserFields control.
|
||||
/// tbObjectId 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 ddlUserFields;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbObjectId;
|
||||
|
||||
/// <summary>
|
||||
/// txtUsersQuery control.
|
||||
/// tbPackageId 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.TextBox txtUsersQuery;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbPackageId;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearchUsers control.
|
||||
/// ImageButton1 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.ImageButton btnSearchUsers;
|
||||
|
||||
/// <summary>
|
||||
/// tabSearchSpaces 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.View tabSearchSpaces;
|
||||
|
||||
/// <summary>
|
||||
/// pnlSearchSpaces 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 pnlSearchSpaces;
|
||||
|
||||
/// <summary>
|
||||
/// ddlItemType 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 ddlItemType;
|
||||
|
||||
/// <summary>
|
||||
/// txtSpacesQuery 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.TextBox txtSpacesQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearchSpaces 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.ImageButton btnSearchSpaces;
|
||||
protected global::System.Web.UI.WebControls.ImageButton ImageButton1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,115 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchBox.ascx.cs" Inherits="WebsitePanel.Portal.SearchBox" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(document).ready(function () {
|
||||
$("#tbSearch").keypress(function (e) {
|
||||
if (e.keyCode != 13) { // VK_RETURN
|
||||
$("#tbSearchText").val('');
|
||||
$("#tbObjectId").val('');
|
||||
$("#tbPackageId").val('');
|
||||
}
|
||||
});
|
||||
|
||||
$("#tbSearch").autocomplete({
|
||||
zIndex: 100,
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
term: request.term,
|
||||
fullType: 'Users'
|
||||
// columnType: "'" + $("#ddlFilterColumn").val() + "'"
|
||||
},
|
||||
url: "AjaxHandler.ashx",
|
||||
success: function (data) {
|
||||
response($.map(data, function (item) {
|
||||
return {
|
||||
label: item.TextSearch + " [" + item.ColumnType + "]",
|
||||
code: item
|
||||
};
|
||||
}));
|
||||
}
|
||||
})
|
||||
},
|
||||
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);
|
||||
$("#<%= cmdSearch.ClientID %>").trigger("click");
|
||||
}
|
||||
});
|
||||
});//]]>
|
||||
</script>
|
||||
|
||||
<asp:Panel ID="tblSearch" runat="server" DefaultButton="cmdSearch" CssClass="NormalBold">
|
||||
<asp:Label ID="lblSearch" runat="server" meta:resourcekey="lblSearch" Visible="false"></asp:Label>
|
||||
<asp:DropDownList ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" style="vertical-align: middle;">
|
||||
</asp:DropDownList><asp:TextBox ID="txtFilterValue" runat="server" CssClass="NormalTextBox" Width="100" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
|
||||
CausesValidation="false" style="vertical-align: middle;"/>
|
||||
</asp:Panel>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:DropDownList ClientIDMode="Static" ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" resourcekey="ddlFilterColumn" style="display:none">
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" align="right">
|
||||
<tr>
|
||||
<td align="left" class="SearchQuery">
|
||||
<div class="ui-widget">
|
||||
<asp:TextBox
|
||||
ID="tbSearch"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
CssClass="NormalTextBox"
|
||||
Width="120px"
|
||||
style="vertical-align: middle; z-index: 100;"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbSearchFullType"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbSearchText"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbObjectId"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:TextBox
|
||||
ID="tbPackageId"
|
||||
ClientIDMode="Static"
|
||||
runat="server"
|
||||
type="hidden"
|
||||
>
|
||||
</asp:TextBox>
|
||||
<asp:ImageButton
|
||||
ID="cmdSearch"
|
||||
runat="server"
|
||||
SkinID="SearchButton"
|
||||
CausesValidation="false"
|
||||
OnClick="cmdSearch_Click"
|
||||
style="vertical-align: middle;"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
|
|
@ -60,13 +60,23 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
get
|
||||
{
|
||||
string val = txtFilterValue.Text.Trim();
|
||||
string val = tbSearchText.Text.Trim();
|
||||
string valText = tbSearch.Text.Trim();
|
||||
if (valText.Length == 0)
|
||||
val = valText;
|
||||
if (val.Length == 0)
|
||||
val = tbSearch.Text.Trim();
|
||||
val = val.Replace("%", "");
|
||||
return "%" + val + "%";
|
||||
}
|
||||
set
|
||||
{
|
||||
txtFilterValue.Text = value;
|
||||
if (value != null)
|
||||
{
|
||||
value = value.Replace("%", "");
|
||||
tbSearch.Text = value;
|
||||
tbSearchText.Text = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +93,32 @@ namespace WebsitePanel.Portal
|
|||
public override void Focus()
|
||||
{
|
||||
base.Focus();
|
||||
txtFilterValue.Focus();
|
||||
tbSearch.Focus();
|
||||
}
|
||||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
if (tbObjectId.Text.Length > 0)
|
||||
{
|
||||
Response.Redirect(PortalUtils.GetUserHomePageUrl(Int32.Parse(tbObjectId.Text)));
|
||||
}
|
||||
else
|
||||
{
|
||||
String strText = tbSearchText.Text;
|
||||
if (strText.Length > 0)
|
||||
{
|
||||
Response.Redirect(NavigatePageURL(PortalUtils.GetUserCustomersPageId(),
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
"FilterColumn=" + ddlFilterColumn.SelectedValue,
|
||||
"FilterValue=" + Server.UrlEncode(FilterValue)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetObjectSearchPageId(),
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
|
||||
"Query=" + Server.UrlEncode(tbSearch.Text),"FullType=Users"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -69,13 +40,49 @@ namespace WebsitePanel.Portal {
|
|||
protected global::System.Web.UI.WebControls.DropDownList ddlFilterColumn;
|
||||
|
||||
/// <summary>
|
||||
/// txtFilterValue control.
|
||||
/// tbSearch 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.TextBox txtFilterValue;
|
||||
protected global::System.Web.UI.WebControls.TextBox tbSearch;
|
||||
|
||||
/// <summary>
|
||||
/// tbSearchFullType 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.TextBox tbSearchFullType;
|
||||
|
||||
/// <summary>
|
||||
/// tbSearchText 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.TextBox tbSearchText;
|
||||
|
||||
/// <summary>
|
||||
/// tbObjectId 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.TextBox tbObjectId;
|
||||
|
||||
/// <summary>
|
||||
/// tbPackageId 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.TextBox tbPackageId;
|
||||
|
||||
/// <summary>
|
||||
/// cmdSearch control.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserCustomersSummary.ascx.cs" Inherits="WebsitePanel.Portal.UserCustomersSummary" %>
|
||||
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %>
|
||||
<%@ Register Src="UserControls/SearchBox.ascx" TagName="SearchBox" TagPrefix="uc1" %>
|
||||
|
||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||
<div class="FormButtonsBar">
|
||||
<div class="Left">
|
||||
|
@ -7,14 +9,8 @@
|
|||
runat="server" CssClass="Button1"></asp:Button>
|
||||
</div>
|
||||
<div class="Right">
|
||||
<asp:Panel ID="tblSearch" runat="server" DefaultButton="cmdSearch" CssClass="NormalBold">
|
||||
<asp:DropDownList ID="ddlFilterColumn" runat="server" resourcekey="ddlFilterColumn" CssClass="NormalTextBox" style="vertical-align: middle;">
|
||||
<asp:ListItem Value="Username">Username</asp:ListItem>
|
||||
<asp:ListItem Value="Email">E-mail</asp:ListItem>
|
||||
<asp:ListItem Value="FullName">FullName</asp:ListItem>
|
||||
<asp:ListItem Value="CompanyName">CompanyName</asp:ListItem>
|
||||
</asp:DropDownList><asp:TextBox ID="txtFilterValue" runat="server" CssClass="NormalTextBox" Width="100" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
|
||||
CausesValidation="false" OnClick="cmdSearch_Click" style="vertical-align: middle;"/>
|
||||
<asp:Panel ID="tblSearch" runat="server" CssClass="NormalBold">
|
||||
<uc1:SearchBox ID="searchBox" runat="server" />
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
|
|