Updated Hosted Sharepoing Provider (Foundation 2010):
A) Powershell support added within the provider B) Now returns the actual deployed language packs C) The PeoplePicker points to the organization OU and shows only the users from the tentant organization. A requirement when used with Exchange 2010 SP2 Addressbook Policies D) Shared SSL root added to use wild card certificates as part of hosting plan. When enabled the host name is generated. E) Search fix: Provisioning of localhost file where the server component is active. This system expected to be the search server. Within the local hostfile the sites are listed with their local ip address so the search server can resolve the site and crawl through their data. This component needs to be compiled with .NET 2.0 together with Provers.Base, OS.Windows2003, OS.Windows2008, Server.Utils, and Server components. Out standing is to update the build and deployment package for a dedicated deployment packaged so this component is using .NET 2.0, all other should be using .NET 4.0. This will eliminate the configuration circus that was required to get the .NET 4.0 version of this component working previously.
This commit is contained in:
parent
38592df9e6
commit
a0d9e59db2
25 changed files with 3174 additions and 2256 deletions
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -95,6 +95,7 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
BindDomains();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void BindDomains()
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage() %>' ImageAlign="AbsMiddle" />
|
||||
<asp:LinkButton ID="cmdSelectAccount" CommandName="SelectAccount"
|
||||
CommandArgument='<%# Eval("AccountName").ToString() + "|" + Eval("DisplayName").ToString() + "|" + Eval("PrimaryEmailAddress")+ "|" + Eval("AccountId")%>'
|
||||
CommandArgument='<%# Eval("AccountName").ToString() + "|" + Eval("DisplayName").ToString() + "|" + Eval("PrimaryEmailAddress")+ "|" + Eval("AccountId")+ "|" + Eval("SamAccountName")%>'
|
||||
runat="server" Text='<%# Eval("DisplayName") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// Copyright (c) 2010, SMB SAAS Systems Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -11,7 +11,7 @@
|
|||
// 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
|
||||
// - Neither the name of the SMB SAAS Systems Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
|
@ -50,21 +50,82 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
ViewState["IncludeMailboxes"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IncludeMailboxesOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["IncludeMailboxesOnly"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["IncludeMailboxesOnly"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool ExcludeOCSUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["ExcludeOCSUsers"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ExcludeOCSUsers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ExcludeLyncUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["ExcludeLyncUsers"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ExcludeLyncUsers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool ExcludeBESUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["ExcludeBESUsers"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ExcludeBESUsers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int ExcludeAccountId
|
||||
{
|
||||
get { return PanelRequest.AccountID; }
|
||||
}
|
||||
{
|
||||
get { return PanelRequest.AccountID; }
|
||||
}
|
||||
|
||||
public void SetAccount(OrganizationUser account)
|
||||
{
|
||||
BindSelectedAccount(account);
|
||||
}
|
||||
public void SetAccount(OrganizationUser account)
|
||||
{
|
||||
BindSelectedAccount(account);
|
||||
}
|
||||
|
||||
public string GetAccount()
|
||||
{
|
||||
return (string)ViewState["AccountName"];
|
||||
}
|
||||
|
||||
public string GetSAMAccountName()
|
||||
{
|
||||
return (string)ViewState["SAMAccountName"];
|
||||
}
|
||||
|
||||
public string GetAccount()
|
||||
{
|
||||
return (string)ViewState["AccountName"];
|
||||
}
|
||||
|
||||
public string GetDisplayName()
|
||||
{
|
||||
|
@ -77,56 +138,93 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
|
||||
public int GetAccountId()
|
||||
{
|
||||
return Utils.ParseInt(ViewState["AccountId"], 0);
|
||||
{
|
||||
return Utils.ParseInt(ViewState["AccountId"], 0);
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void BindSelectedAccount(OrganizationUser account)
|
||||
{
|
||||
if (account != null)
|
||||
{
|
||||
txtDisplayName.Text = account.DisplayName;
|
||||
private void BindSelectedAccount(OrganizationUser account)
|
||||
{
|
||||
if (account != null)
|
||||
{
|
||||
txtDisplayName.Text = account.DisplayName;
|
||||
ViewState["AccountName"] = account.AccountName;
|
||||
ViewState["DisplayName"] = account.DisplayName;
|
||||
ViewState["PrimaryEmailAddress"] = account.PrimaryEmailAddress;
|
||||
ViewState["AccountId"] = account.AccountId;
|
||||
}
|
||||
else
|
||||
{
|
||||
txtDisplayName.Text = "";
|
||||
ViewState["AccountName"] = null;
|
||||
ViewState["AccountId"] = account.AccountId;
|
||||
ViewState["SAMAccountName"] = account.SamAccountName;
|
||||
}
|
||||
else
|
||||
{
|
||||
txtDisplayName.Text = "";
|
||||
ViewState["AccountName"] = null;
|
||||
ViewState["DisplayName"] = null;
|
||||
ViewState["PrimaryEmailAddress"] = null;
|
||||
ViewState["AccountId"] = null;
|
||||
|
||||
ViewState["AccountId"] = null;
|
||||
ViewState["SAMAccountName"] = null;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string GetAccountImage()
|
||||
{
|
||||
public string GetAccountImage()
|
||||
{
|
||||
return GetThemedImage("Exchange/admin_16.png");
|
||||
}
|
||||
}
|
||||
|
||||
private void BindPopupAccounts()
|
||||
{
|
||||
OrganizationUser[] accounts = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", IncludeMailboxes);
|
||||
private void BindPopupAccounts()
|
||||
{
|
||||
OrganizationUser[] accounts = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", IncludeMailboxes);
|
||||
|
||||
if (ExcludeAccountId > 0)
|
||||
{
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
if (account.AccountId != ExcludeAccountId)
|
||||
updatedAccounts.Add(account);
|
||||
if (ExcludeAccountId > 0)
|
||||
{
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
if (account.AccountId != ExcludeAccountId)
|
||||
updatedAccounts.Add(account);
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
|
||||
if (IncludeMailboxesOnly)
|
||||
{
|
||||
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
{
|
||||
bool addUser = false;
|
||||
if (account.ExternalEmail != string.Empty) addUser = true;
|
||||
if ((account.IsBlackBerryUser) & (ExcludeBESUsers)) addUser = false;
|
||||
if ((account.IsLyncUser) & (ExcludeLyncUsers)) addUser = false;
|
||||
|
||||
if (addUser) updatedAccounts.Add(account);
|
||||
}
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
else
|
||||
if ((ExcludeOCSUsers) | (ExcludeBESUsers) | (ExcludeLyncUsers))
|
||||
{
|
||||
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
{
|
||||
bool addUser = true;
|
||||
if ((account.IsOCSUser) & (ExcludeOCSUsers)) addUser = false;
|
||||
if ((account.IsLyncUser) & (ExcludeLyncUsers)) addUser = false;
|
||||
if ((account.IsBlackBerryUser) & (ExcludeBESUsers)) addUser = false;
|
||||
|
||||
if (addUser) updatedAccounts.Add(account);
|
||||
}
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
|
||||
Array.Sort(accounts, CompareAccount);
|
||||
if (Direction == SortDirection.Ascending)
|
||||
|
@ -136,15 +234,15 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
else
|
||||
Direction = SortDirection.Ascending;
|
||||
|
||||
|
||||
gvPopupAccounts.DataSource = accounts;
|
||||
gvPopupAccounts.DataBind();
|
||||
}
|
||||
gvPopupAccounts.DataBind();
|
||||
}
|
||||
|
||||
private SortDirection Direction
|
||||
{
|
||||
get { return ViewState[DirectionString] == null ? SortDirection.Descending : (SortDirection)ViewState[DirectionString]; }
|
||||
set {ViewState[DirectionString] = value;}
|
||||
set { ViewState[DirectionString] = value; }
|
||||
}
|
||||
|
||||
private static int CompareAccount(OrganizationUser user1, OrganizationUser user2)
|
||||
|
@ -152,57 +250,58 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
return string.Compare(user1.DisplayName, user2.DisplayName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
}
|
||||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
}
|
||||
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
}
|
||||
|
||||
protected void cmdClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindSelectedAccount(null);
|
||||
}
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
}
|
||||
|
||||
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
// bind all accounts
|
||||
BindPopupAccounts();
|
||||
protected void cmdClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindSelectedAccount(null);
|
||||
}
|
||||
|
||||
// show modal
|
||||
SelectAccountsModal.Show();
|
||||
}
|
||||
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
// bind all accounts
|
||||
BindPopupAccounts();
|
||||
|
||||
protected void gvPopupAccounts_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "SelectAccount")
|
||||
{
|
||||
string[] parts = e.CommandArgument.ToString().Split('|');
|
||||
OrganizationUser account = new OrganizationUser();
|
||||
account.AccountName = parts[0];
|
||||
account.DisplayName = parts[1];
|
||||
account.PrimaryEmailAddress = parts[2];
|
||||
account.AccountId = Utils.ParseInt(parts[3]);
|
||||
// show modal
|
||||
SelectAccountsModal.Show();
|
||||
}
|
||||
|
||||
// set account
|
||||
BindSelectedAccount(account);
|
||||
protected void gvPopupAccounts_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "SelectAccount")
|
||||
{
|
||||
string[] parts = e.CommandArgument.ToString().Split('|');
|
||||
OrganizationUser account = new OrganizationUser();
|
||||
account.AccountName = parts[0];
|
||||
account.DisplayName = parts[1];
|
||||
account.PrimaryEmailAddress = parts[2];
|
||||
account.AccountId = Utils.ParseInt(parts[3]);
|
||||
account.SamAccountName = parts[4];
|
||||
|
||||
// hide popup
|
||||
SelectAccountsModal.Hide();
|
||||
// set account
|
||||
BindSelectedAccount(account);
|
||||
|
||||
// update parent panel
|
||||
MainUpdatePanel.Update();
|
||||
}
|
||||
}
|
||||
// hide popup
|
||||
SelectAccountsModal.Hide();
|
||||
|
||||
// update parent panel
|
||||
MainUpdatePanel.Update();
|
||||
}
|
||||
}
|
||||
|
||||
protected void OnSorting(object sender, GridViewSortEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
BindPopupAccounts();
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -1,25 +1,18 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEditSiteCollection.ascx.cs"
|
||||
Inherits="WebsitePanel.Portal.HostedSharePointEditSiteCollection" %>
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEditSiteCollection.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointEditSiteCollection" %>
|
||||
<%@ Register Src="ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
|
||||
TagPrefix="wsp" %>
|
||||
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %>
|
||||
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
|
||||
<%@ Register Src="ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
|
||||
<%@ Register Src="ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb"
|
||||
TagPrefix="wsp" %>
|
||||
<%@ Register Src="ExchangeServer/UserControls/DomainSelector.ascx" TagName="DomainSelector" TagPrefix="wsp" %>
|
||||
<%@ Register Src="ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/AllocatePackageIPAddresses.ascx" TagName="SiteUrlBuilder" TagPrefix="wsp" %>
|
||||
<%@ Register Src="ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
|
||||
|
||||
|
||||
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
|
||||
TagPrefix="wsp" %>
|
||||
|
||||
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register src="UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
|
||||
<%@ Register Src="DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
|
||||
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Header">
|
||||
|
@ -39,13 +32,18 @@
|
|||
<wsp:SimpleMessageBox id="localMessageBox" runat="server">
|
||||
</wsp:SimpleMessageBox>
|
||||
<table id="tblEditItem" runat="server" cellspacing="0" cellpadding="5" width="100%">
|
||||
<tr>
|
||||
<tr id="rowUrl">
|
||||
<td class="SubHead" nowrap width="200">
|
||||
<asp:Label ID="lblSiteCollectionUrl" runat="server" meta:resourcekey="lblSiteCollectionUrl"
|
||||
Text="Url:"></asp:Label>
|
||||
</td>
|
||||
<td width="100%" class="NormalBold">
|
||||
<wsp:DomainSelector id="domain" runat="server" ShowAt="false"/>
|
||||
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64"></asp:TextBox>.<uc1:DomainsSelectDomainControl ID="domain" runat="server" HideWebSites="true" HideDomainPointers="true" />
|
||||
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
|
||||
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"
|
||||
ErrorMessage="Enter valid hostname" ControlToValidate="txtHostName" Display="Dynamic"
|
||||
meta:resourcekey="valRequireCorrectHostName" ValidationExpression="^([0-9a-zA-Z])*[0-9a-zA-Z]+$" SetFocusOnError="True"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -35,331 +35,378 @@ using WebsitePanel.Providers.DNS;
|
|||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.SharePoint;
|
||||
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
public partial class HostedSharePointEditSiteCollection : WebsitePanelModuleBase
|
||||
{
|
||||
SharePointSiteCollection item = null;
|
||||
public partial class HostedSharePointEditSiteCollection : WebsitePanelModuleBase
|
||||
{
|
||||
SharePointSiteCollection item = null;
|
||||
|
||||
private int OrganizationId
|
||||
{
|
||||
get
|
||||
{
|
||||
return PanelRequest.GetInt("ItemID");
|
||||
}
|
||||
}
|
||||
private int OrganizationId
|
||||
{
|
||||
get
|
||||
{
|
||||
return PanelRequest.GetInt("ItemID");
|
||||
}
|
||||
}
|
||||
|
||||
private int SiteCollectionId
|
||||
{
|
||||
get
|
||||
{
|
||||
return PanelRequest.GetInt("SiteCollectionID");
|
||||
}
|
||||
}
|
||||
private int SiteCollectionId
|
||||
{
|
||||
get
|
||||
{
|
||||
return PanelRequest.GetInt("SiteCollectionID");
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
domain.PackageId = PanelSecurity.PackageId;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
warningStorage.UnlimitedText = GetLocalizedString("WarningUnlimitedValue");
|
||||
editWarningStorage.UnlimitedText = GetLocalizedString("WarningUnlimitedValue");
|
||||
|
||||
|
||||
bool newItem = (this.SiteCollectionId == 0);
|
||||
|
||||
tblEditItem.Visible = newItem;
|
||||
tblViewItem.Visible = !newItem;
|
||||
tblEditItem.Visible = newItem;
|
||||
tblViewItem.Visible = !newItem;
|
||||
|
||||
//btnUpdate.Visible = newItem;
|
||||
btnDelete.Visible = !newItem;
|
||||
btnUpdate.Text = newItem ? GetLocalizedString("Text.Add") : GetLocalizedString("Text.Update");
|
||||
//btnUpdate.Visible = newItem;
|
||||
btnDelete.Visible = !newItem;
|
||||
btnUpdate.Text = newItem ? GetLocalizedString("Text.Add") : GetLocalizedString("Text.Update");
|
||||
btnUpdate.OnClientClick = newItem ? GetLocalizedString("btnCreate.OnClientClick") : GetLocalizedString("btnUpdate.OnClientClick");
|
||||
|
||||
btnBackup.Enabled = btnRestore.Enabled = !newItem;
|
||||
btnBackup.Enabled = btnRestore.Enabled = !newItem;
|
||||
|
||||
// bind item
|
||||
BindItem();
|
||||
// bind item
|
||||
BindItem();
|
||||
|
||||
//this.RegisterOwnerSelector();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void BindItem()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (!this.IsDnsServiceAvailable())
|
||||
{
|
||||
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_DNS");
|
||||
}
|
||||
private void BindItem()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (!this.IsDnsServiceAvailable())
|
||||
{
|
||||
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_DNS");
|
||||
}
|
||||
|
||||
// load item if required
|
||||
if (this.SiteCollectionId > 0)
|
||||
{
|
||||
// existing item
|
||||
item = ES.Services.HostedSharePointServers.GetSiteCollection(this.SiteCollectionId);
|
||||
if (item != null)
|
||||
{
|
||||
// save package info
|
||||
ViewState["PackageId"] = item.PackageId;
|
||||
}
|
||||
else
|
||||
RedirectToBrowsePage();
|
||||
}
|
||||
else
|
||||
{
|
||||
// new item
|
||||
ViewState["PackageId"] = PanelSecurity.PackageId;
|
||||
}
|
||||
|
||||
//this.gvUsers.DataBind();
|
||||
|
||||
List<CultureInfo> cultures = new List<CultureInfo>();
|
||||
foreach (int localeId in ES.Services.HostedSharePointServers.GetSupportedLanguages(PanelSecurity.PackageId))
|
||||
{
|
||||
cultures.Add(new CultureInfo(localeId, false));
|
||||
}
|
||||
|
||||
this.ddlLocaleID.DataSource = cultures;
|
||||
this.ddlLocaleID.DataBind();
|
||||
}
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// bind item to controls
|
||||
if (item != null)
|
||||
{
|
||||
// bind item to controls
|
||||
lnkUrl.Text = item.PhysicalAddress;
|
||||
lnkUrl.NavigateUrl = item.PhysicalAddress;
|
||||
litSiteCollectionOwner.Text = String.Format("{0} ({1})", item.OwnerName, item.OwnerEmail);
|
||||
litLocaleID.Text = new CultureInfo(item.LocaleId, false).DisplayName;
|
||||
litTitle.Text = item.Title;
|
||||
litDescription.Text = item.Description;
|
||||
editWarningStorage.QuotaValue = (int)item.WarningStorage;
|
||||
editMaxStorage.QuotaValue = (int)item.MaxSiteStorage;
|
||||
}
|
||||
|
||||
Organization org = ES.Services.Organizations.GetOrganization(OrganizationId);
|
||||
if (org != null)
|
||||
// load item if required
|
||||
if (this.SiteCollectionId > 0)
|
||||
{
|
||||
// existing item
|
||||
item = ES.Services.HostedSharePointServers.GetSiteCollection(this.SiteCollectionId);
|
||||
if (item != null)
|
||||
{
|
||||
maxStorage.ParentQuotaValue = org.MaxSharePointStorage;
|
||||
maxStorage.QuotaValue = org.MaxSharePointStorage;
|
||||
|
||||
editMaxStorage.ParentQuotaValue = org.MaxSharePointStorage;
|
||||
|
||||
|
||||
|
||||
warningStorage.ParentQuotaValue = org.WarningSharePointStorage;
|
||||
warningStorage.QuotaValue = org.WarningSharePointStorage;
|
||||
editWarningStorage.ParentQuotaValue = org.WarningSharePointStorage;
|
||||
// save package info
|
||||
ViewState["PackageId"] = item.PackageId;
|
||||
}
|
||||
|
||||
}
|
||||
OrganizationDomainName[] domains = ES.Services.Organizations.GetOrganizationDomains(PanelRequest.ItemID);
|
||||
else
|
||||
RedirectToBrowsePage();
|
||||
}
|
||||
else
|
||||
{
|
||||
// new item
|
||||
ViewState["PackageId"] = PanelSecurity.PackageId;
|
||||
if (UseSharedSLL(PanelSecurity.PackageId))
|
||||
{
|
||||
|
||||
rowUrl.Visible = false;
|
||||
valRequireHostName.Enabled = false;
|
||||
valRequireCorrectHostName.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
//this.gvUsers.DataBind();
|
||||
|
||||
List<CultureInfo> cultures = new List<CultureInfo>();
|
||||
foreach (int localeId in ES.Services.HostedSharePointServers.GetSupportedLanguages(PanelSecurity.PackageId))
|
||||
{
|
||||
cultures.Add(new CultureInfo(localeId, false));
|
||||
}
|
||||
|
||||
this.ddlLocaleID.DataSource = cultures;
|
||||
this.ddlLocaleID.DataBind();
|
||||
}
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// bind item to controls
|
||||
if (item != null)
|
||||
{
|
||||
// bind item to controls
|
||||
lnkUrl.Text = item.PhysicalAddress;
|
||||
lnkUrl.NavigateUrl = item.PhysicalAddress;
|
||||
litSiteCollectionOwner.Text = String.Format("{0} ({1})", item.OwnerName, item.OwnerEmail);
|
||||
litLocaleID.Text = new CultureInfo(item.LocaleId, false).DisplayName;
|
||||
litTitle.Text = item.Title;
|
||||
litDescription.Text = item.Description;
|
||||
editWarningStorage.QuotaValue = (int)item.WarningStorage;
|
||||
editMaxStorage.QuotaValue = (int)item.MaxSiteStorage;
|
||||
}
|
||||
|
||||
Organization org = ES.Services.Organizations.GetOrganization(OrganizationId);
|
||||
if (org != null)
|
||||
{
|
||||
maxStorage.ParentQuotaValue = org.MaxSharePointStorage;
|
||||
maxStorage.QuotaValue = org.MaxSharePointStorage;
|
||||
|
||||
editMaxStorage.ParentQuotaValue = org.MaxSharePointStorage;
|
||||
|
||||
|
||||
|
||||
warningStorage.ParentQuotaValue = org.WarningSharePointStorage;
|
||||
warningStorage.QuotaValue = org.WarningSharePointStorage;
|
||||
editWarningStorage.ParentQuotaValue = org.WarningSharePointStorage;
|
||||
}
|
||||
|
||||
}
|
||||
//OrganizationDomainName[] domains = ES.Services.Organizations.GetOrganizationDomains(PanelRequest.ItemID);
|
||||
|
||||
//DomainInfo[] domains = ES.Services.Servers.GetMyDomains(PanelSecurity.PackageId);
|
||||
|
||||
EnterpriseServer.DomainInfo[] domains = ES.Services.Servers.GetDomains(PanelSecurity.PackageId);
|
||||
|
||||
if (domains.Length == 0)
|
||||
{
|
||||
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_DOMAINS");
|
||||
DisableFormControls(this, btnCancel);
|
||||
return;
|
||||
}
|
||||
//if (this.gvUsers.Rows.Count == 0)
|
||||
//{
|
||||
// localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_USERS");
|
||||
// DisableFormControls(this, btnCancel);
|
||||
// return;
|
||||
//}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
if (domains.Length == 0)
|
||||
{
|
||||
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_DOMAINS");
|
||||
DisableFormControls(this, btnCancel);
|
||||
return;
|
||||
}
|
||||
//if (this.gvUsers.Rows.Count == 0)
|
||||
//{
|
||||
// localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_USERS");
|
||||
// DisableFormControls(this, btnCancel);
|
||||
// return;
|
||||
//}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
localMessageBox.ShowWarningMessage("INIT_SERVICE_ITEM_FORM");
|
||||
|
||||
DisableFormControls(this, btnCancel);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveItem()
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
DisableFormControls(this, btnCancel);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (this.SiteCollectionId == 0)
|
||||
{
|
||||
private void SaveItem()
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (this.SiteCollectionId == 0)
|
||||
{
|
||||
if (this.userSelector.GetAccount() == null)
|
||||
{
|
||||
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_USERS");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// new item
|
||||
try
|
||||
{
|
||||
SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue);
|
||||
foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections)
|
||||
{
|
||||
Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name);
|
||||
if (existentSiteCollection.Name == String.Format("{0}://{1}", existentSiteCollectionUri.Scheme, this.domain.DomainName))
|
||||
{
|
||||
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_DOMAIN_IN_USE");
|
||||
return;
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
item = new SharePointSiteCollection();
|
||||
|
||||
if (!UseSharedSLL(PanelSecurity.PackageId))
|
||||
{
|
||||
SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue);
|
||||
foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections)
|
||||
{
|
||||
Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name);
|
||||
if (existentSiteCollection.Name == String.Format("{0}://{1}", existentSiteCollectionUri.Scheme, this.txtHostName.Text.ToLower() + "." + this.domain.DomainName))
|
||||
{
|
||||
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_DOMAIN_IN_USE");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
item.Name = this.txtHostName.Text.ToLower() + "." + this.domain.DomainName;
|
||||
}
|
||||
else
|
||||
item.Name = string.Empty;
|
||||
|
||||
// get form data
|
||||
|
||||
item.OrganizationId = this.OrganizationId;
|
||||
item.Id = this.SiteCollectionId;
|
||||
item.PackageId = PanelSecurity.PackageId;
|
||||
|
||||
item.LocaleId = Int32.Parse(this.ddlLocaleID.SelectedValue);
|
||||
item.OwnerLogin = this.userSelector.GetSAMAccountName();
|
||||
item.OwnerEmail = this.userSelector.GetPrimaryEmailAddress();
|
||||
item.OwnerName = this.userSelector.GetDisplayName();
|
||||
item.Title = txtTitle.Text;
|
||||
item.Description = txtDescription.Text;
|
||||
|
||||
|
||||
// get form data
|
||||
item = new SharePointSiteCollection();
|
||||
item.OrganizationId = this.OrganizationId;
|
||||
item.Id = this.SiteCollectionId;
|
||||
item.PackageId = PanelSecurity.PackageId;
|
||||
item.Name = this.domain.DomainName;
|
||||
item.LocaleId = Int32.Parse(this.ddlLocaleID.SelectedValue);
|
||||
item.OwnerLogin = this.userSelector.GetAccount();
|
||||
item.OwnerEmail = this.userSelector.GetPrimaryEmailAddress();
|
||||
item.OwnerName = this.userSelector.GetDisplayName();
|
||||
item.Title = txtTitle.Text;
|
||||
item.Description = txtDescription.Text;
|
||||
|
||||
|
||||
item.MaxSiteStorage = maxStorage.QuotaValue;
|
||||
item.WarningStorage = warningStorage.QuotaValue;
|
||||
item.WarningStorage = warningStorage.QuotaValue;
|
||||
|
||||
int result = ES.Services.HostedSharePointServers.AddSiteCollection(item);
|
||||
if (result < 0)
|
||||
{
|
||||
localMessageBox.ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
localMessageBox.ShowErrorMessage("HOSTEDSHAREPOINT_ADD_SITECOLLECTION", ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
int result = ES.Services.HostedSharePointServers.AddSiteCollection(item);
|
||||
if (result < 0)
|
||||
{
|
||||
localMessageBox.ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
localMessageBox.ShowErrorMessage("HOSTEDSHAREPOINT_ADD_SITECOLLECTION", ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ES.Services.HostedSharePointServers.UpdateQuota(PanelRequest.ItemID, SiteCollectionId, editMaxStorage.QuotaValue, editWarningStorage.QuotaValue);
|
||||
}
|
||||
{
|
||||
ES.Services.HostedSharePointServers.UpdateQuota(PanelRequest.ItemID, SiteCollectionId, editMaxStorage.QuotaValue, editWarningStorage.QuotaValue);
|
||||
}
|
||||
|
||||
// return
|
||||
RedirectToSiteCollectionsList();
|
||||
}
|
||||
// return
|
||||
RedirectToSiteCollectionsList();
|
||||
}
|
||||
|
||||
private void AddDnsRecord(int domainId, string recordName, string recordData)
|
||||
{
|
||||
int result = ES.Services.Servers.AddDnsZoneRecord(domainId, recordName, DnsRecordType.A, recordData, 0);
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
}
|
||||
}
|
||||
private void AddDnsRecord(int domainId, string recordName, string recordData)
|
||||
{
|
||||
int result = ES.Services.Servers.AddDnsZoneRecord(domainId, recordName, DnsRecordType.A, recordData, 0);
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsDnsServiceAvailable()
|
||||
{
|
||||
ProviderInfo dnsProvider = ES.Services.Servers.GetPackageServiceProvider(PanelSecurity.PackageId, ResourceGroups.Dns);
|
||||
return dnsProvider != null;
|
||||
}
|
||||
private bool IsDnsServiceAvailable()
|
||||
{
|
||||
ProviderInfo dnsProvider = ES.Services.Servers.GetPackageServiceProvider(PanelSecurity.PackageId, ResourceGroups.Dns);
|
||||
return dnsProvider != null;
|
||||
}
|
||||
|
||||
private void DeleteItem()
|
||||
{
|
||||
// delete
|
||||
try
|
||||
{
|
||||
int result = ES.Services.HostedSharePointServers.DeleteSiteCollection(this.SiteCollectionId);
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
localMessageBox.ShowErrorMessage("HOSTEDSHAREPOINT_DELETE_SITECOLLECTION", ex);
|
||||
return;
|
||||
}
|
||||
private void DeleteItem()
|
||||
{
|
||||
// delete
|
||||
try
|
||||
{
|
||||
int result = ES.Services.HostedSharePointServers.DeleteSiteCollection(this.SiteCollectionId);
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
localMessageBox.ShowErrorMessage("HOSTEDSHAREPOINT_DELETE_SITECOLLECTION", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
// return
|
||||
RedirectToSiteCollectionsList();
|
||||
}
|
||||
// return
|
||||
RedirectToSiteCollectionsList();
|
||||
}
|
||||
|
||||
protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
if (e.Exception != null)
|
||||
{
|
||||
localMessageBox.ShowErrorMessage("ORGANIZATION_GET_USERS", e.Exception);
|
||||
e.ExceptionHandled = true;
|
||||
}
|
||||
}
|
||||
protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
if (e.Exception != null)
|
||||
{
|
||||
localMessageBox.ShowErrorMessage("ORGANIZATION_GET_USERS", e.Exception);
|
||||
e.ExceptionHandled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
// return
|
||||
RedirectToSiteCollectionsList();
|
||||
}
|
||||
protected void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
// return
|
||||
RedirectToSiteCollectionsList();
|
||||
}
|
||||
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
DeleteItem();
|
||||
}
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
DeleteItem();
|
||||
}
|
||||
|
||||
protected void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveItem();
|
||||
}
|
||||
protected void btnBackup_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId,"ItemID=" + PanelRequest.ItemID.ToString()));
|
||||
}
|
||||
protected void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveItem();
|
||||
}
|
||||
|
||||
protected void btnRestore_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
|
||||
}
|
||||
protected void btnBackup_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
|
||||
}
|
||||
|
||||
protected void btnRestore_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
|
||||
}
|
||||
|
||||
|
||||
private void RedirectToSiteCollectionsList()
|
||||
{
|
||||
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString()));
|
||||
}
|
||||
|
||||
//private void RegisterOwnerSelector()
|
||||
//{
|
||||
// // Define the name and type of the client scripts on the page.
|
||||
// String csname = "OwnerSelectorScript";
|
||||
// Type cstype = this.GetType();
|
||||
private void RedirectToSiteCollectionsList()
|
||||
{
|
||||
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString()));
|
||||
}
|
||||
|
||||
// // Get a ClientScriptManager reference from the Page class.
|
||||
// ClientScriptManager cs = Page.ClientScript;
|
||||
private bool UseSharedSLL(int packageID)
|
||||
{
|
||||
PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx != null)
|
||||
{
|
||||
foreach (QuotaValueInfo quota in cntx.QuotasArray)
|
||||
{
|
||||
switch (quota.QuotaId)
|
||||
{
|
||||
case 400:
|
||||
if (Convert.ToBoolean(quota.QuotaAllocatedValue))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// // Check to see if the client script is already registered.
|
||||
// if (!cs.IsClientScriptBlockRegistered(cstype, csname))
|
||||
// {
|
||||
// StringBuilder ownerSelector = new StringBuilder();
|
||||
// ownerSelector.Append("<script type=text/javascript> function DoSelectOwner(ownerId, ownerDisplayName, email) {");
|
||||
// ownerSelector.AppendFormat("{0}.{1}.value=ownerId;", this.Page.Form.ID, this.hdnSiteCollectionOwner.ClientID);
|
||||
// ownerSelector.AppendFormat("{0}.{1}.value=ownerDisplayName;", this.Page.Form.ID, this.txtSiteCollectionOwner.ClientID);
|
||||
// ownerSelector.AppendFormat("{0}.{1}.value=email;", this.Page.Form.ID, this.hdnSiteCollectionOwnerEmail.ClientID);
|
||||
// ownerSelector.Append("} </script>");
|
||||
// cs.RegisterClientScriptBlock(cstype, csname, ownerSelector.ToString(), false);
|
||||
// }
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
return false;
|
||||
}
|
||||
|
||||
//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 RegisterOwnerSelector()
|
||||
//{
|
||||
// // Define the name and type of the client scripts on the page.
|
||||
// String csname = "OwnerSelectorScript";
|
||||
// Type cstype = this.GetType();
|
||||
|
||||
// // Get a ClientScriptManager reference from the Page class.
|
||||
// ClientScriptManager cs = Page.ClientScript;
|
||||
|
||||
// // Check to see if the client script is already registered.
|
||||
// if (!cs.IsClientScriptBlockRegistered(cstype, csname))
|
||||
// {
|
||||
// StringBuilder ownerSelector = new StringBuilder();
|
||||
// ownerSelector.Append("<script type=text/javascript> function DoSelectOwner(ownerId, ownerDisplayName, email) {");
|
||||
// ownerSelector.AppendFormat("{0}.{1}.value=ownerId;", this.Page.Form.ID, this.hdnSiteCollectionOwner.ClientID);
|
||||
// ownerSelector.AppendFormat("{0}.{1}.value=ownerDisplayName;", this.Page.Form.ID, this.txtSiteCollectionOwner.ClientID);
|
||||
// ownerSelector.AppendFormat("{0}.{1}.value=email;", this.Page.Form.ID, this.hdnSiteCollectionOwnerEmail.ClientID);
|
||||
// ownerSelector.Append("} </script>");
|
||||
// cs.RegisterClientScriptBlock(cstype, csname, ownerSelector.ToString(), false);
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
//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;
|
||||
//}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.1433
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -76,6 +75,15 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTable tblEditItem;
|
||||
|
||||
/// <summary>
|
||||
/// rowUrl 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 rowUrl;
|
||||
|
||||
/// <summary>
|
||||
/// lblSiteCollectionUrl control.
|
||||
/// </summary>
|
||||
|
@ -85,6 +93,15 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblSiteCollectionUrl;
|
||||
|
||||
/// <summary>
|
||||
/// txtHostName 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 txtHostName;
|
||||
|
||||
/// <summary>
|
||||
/// domain control.
|
||||
/// </summary>
|
||||
|
@ -92,7 +109,25 @@ namespace WebsitePanel.Portal {
|
|||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.DomainSelector domain;
|
||||
protected global::WebsitePanel.Portal.DomainsSelectDomainControl domain;
|
||||
|
||||
/// <summary>
|
||||
/// valRequireHostName 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 valRequireHostName;
|
||||
|
||||
/// <summary>
|
||||
/// valRequireCorrectHostName 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.RegularExpressionValidator valRequireCorrectHostName;
|
||||
|
||||
/// <summary>
|
||||
/// lblSiteCollectionOwner control.
|
||||
|
|
|
@ -112,11 +112,14 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="chkLocalHostFile" xml:space="preserve">
|
||||
<value>Provision local hosts file</value>
|
||||
</data>
|
||||
<data name="lblBackupTempFolder.Text" xml:space="preserve">
|
||||
<value>SharePoint Backup Temporary Folder:</value>
|
||||
</data>
|
||||
|
@ -126,9 +129,15 @@
|
|||
<data name="lblRootWebApplicationIpAddress.Text" xml:space="preserve">
|
||||
<value>SharePoint Web Application IP:</value>
|
||||
</data>
|
||||
<data name="lblSharedSSLRoot.Text" xml:space="preserve">
|
||||
<value>Shared SSL Root:</value>
|
||||
</data>
|
||||
<data name="lblSharePointBackup.Text" xml:space="preserve">
|
||||
<value>SharePoint Backup</value>
|
||||
</data>
|
||||
<data name="lblWildCardRoot.Text" xml:space="preserve">
|
||||
<value>Wildcard Certificate Root</value>
|
||||
</data>
|
||||
<data name="lclTempBackupNote.Text" xml:space="preserve">
|
||||
<value>Please note that WebsitePanel Server account should have access to this folder. Leave this field blank to use default path.</value>
|
||||
</data>
|
||||
|
|
|
@ -17,7 +17,21 @@
|
|||
<td width="100%">
|
||||
<wsp:SelectIPAddress ID="ddlRootWebApplicationIpAddress" runat="server" ServerIdParam="ServerID" AllowEmptySelection="false" />
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:CheckBox ID="chkLocalHostFile" runat="server" meta:resourcekey="chkLocalHostFile" Text="Provision localhost file" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label ID="lblSharedSSLRoot" runat="server" meta:resourcekey="lblSharedSSLRoot" Text="Shared SSL Root:"></asp:Label>
|
||||
</td>
|
||||
<td width="100%">
|
||||
<asp:TextBox ID="txtSharedSSLRoot" runat="server" CssClass="NormalTextBox" Width="200px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<fieldset>
|
||||
|
@ -39,4 +53,5 @@
|
|||
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -41,54 +41,61 @@ using WebsitePanel.EnterpriseServer;
|
|||
|
||||
namespace WebsitePanel.Portal.ProviderControls
|
||||
{
|
||||
public partial class HostedSharePoint30_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
public partial class HostedSharePoint30_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void BindSettings(StringDictionary settings)
|
||||
{
|
||||
this.txtRootWebApplication.Text = settings["RootWebApplicationUri"];
|
||||
int selectedAddressid = this.FindAddressByText(settings["RootWebApplicationIpAddress"]);
|
||||
this.ddlRootWebApplicationIpAddress.AddressId = (selectedAddressid > 0) ? selectedAddressid : 0;
|
||||
txtBackupTempFolder.Text = settings["BackupTemporaryFolder"];
|
||||
}
|
||||
public void BindSettings(StringDictionary settings)
|
||||
{
|
||||
this.txtRootWebApplication.Text = settings["RootWebApplicationUri"];
|
||||
int selectedAddressid = this.FindAddressByText(settings["RootWebApplicationIpAddress"]);
|
||||
this.ddlRootWebApplicationIpAddress.AddressId = (selectedAddressid > 0) ? selectedAddressid : 0;
|
||||
chkLocalHostFile.Checked = Utils.ParseBool(settings["LocalHostFile"], false);
|
||||
this.txtSharedSSLRoot.Text = settings["SharedSSLRoot"];
|
||||
}
|
||||
|
||||
public void SaveSettings(StringDictionary settings)
|
||||
{
|
||||
settings["RootWebApplicationUri"] = this.txtRootWebApplication.Text;
|
||||
public void SaveSettings(StringDictionary settings)
|
||||
{
|
||||
settings["RootWebApplicationUri"] = this.txtRootWebApplication.Text;
|
||||
settings["LocalHostFile"] = chkLocalHostFile.Checked.ToString();
|
||||
settings["RootWebApplicationInteralIpAddress"] = String.Empty;
|
||||
settings["SharedSSLRoot"] = this.txtSharedSSLRoot.Text;
|
||||
|
||||
if (ddlRootWebApplicationIpAddress.AddressId > 0)
|
||||
{
|
||||
IPAddressInfo address = ES.Services.Servers.GetIPAddress(ddlRootWebApplicationIpAddress.AddressId);
|
||||
if (ddlRootWebApplicationIpAddress.AddressId > 0)
|
||||
{
|
||||
IPAddressInfo address = ES.Services.Servers.GetIPAddress(ddlRootWebApplicationIpAddress.AddressId);
|
||||
if (String.IsNullOrEmpty(address.ExternalIP))
|
||||
{
|
||||
{
|
||||
settings["RootWebApplicationIpAddress"] = address.InternalIP;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
settings["RootWebApplicationIpAddress"] = address.ExternalIP;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
settings["RootWebApplicationIpAddress"] = String.Empty;
|
||||
}
|
||||
settings["BackupTemporaryFolder"] = txtBackupTempFolder.Text;
|
||||
}
|
||||
}
|
||||
|
||||
private int FindAddressByText(string address)
|
||||
{
|
||||
foreach (IPAddressInfo addressInfo in ES.Services.Servers.GetIPAddresses(IPAddressPool.General, PanelRequest.ServerId))
|
||||
{
|
||||
if (addressInfo.InternalIP == address || addressInfo.ExternalIP == address)
|
||||
{
|
||||
return addressInfo.AddressId;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (!String.IsNullOrEmpty(address.InternalIP))
|
||||
settings["RootWebApplicationInteralIpAddress"] = address.InternalIP;
|
||||
}
|
||||
else
|
||||
{
|
||||
settings["RootWebApplicationIpAddress"] = String.Empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private int FindAddressByText(string address)
|
||||
{
|
||||
foreach (IPAddressInfo addressInfo in ES.Services.Servers.GetIPAddresses(IPAddressPool.General, PanelRequest.ServerId))
|
||||
{
|
||||
if (addressInfo.InternalIP == address || addressInfo.ExternalIP == address)
|
||||
{
|
||||
return addressInfo.AddressId;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.1434
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -49,6 +48,33 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.SelectIPAddress ddlRootWebApplicationIpAddress;
|
||||
|
||||
/// <summary>
|
||||
/// chkLocalHostFile 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.CheckBox chkLocalHostFile;
|
||||
|
||||
/// <summary>
|
||||
/// lblSharedSSLRoot 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 lblSharedSSLRoot;
|
||||
|
||||
/// <summary>
|
||||
/// txtSharedSSLRoot 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 txtSharedSSLRoot;
|
||||
|
||||
/// <summary>
|
||||
/// lblSharePointBackup control.
|
||||
/// </summary>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -80,7 +80,7 @@ namespace WebsitePanel.Portal
|
|||
? ParentQuotaValue
|
||||
: Math.Min(Utils.ParseInt(txtQuotaValue.Text, 0), ParentQuotaValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
|
@ -108,10 +108,10 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
get
|
||||
{
|
||||
return ViewState["ParentQuotaValue"] != null ? (int) ViewState["ParentQuotaValue"] : 0;
|
||||
return ViewState["ParentQuotaValue"] != null ? (int)ViewState["ParentQuotaValue"] : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
WriteScriptBlock();
|
||||
|
@ -122,19 +122,19 @@ namespace WebsitePanel.Portal
|
|||
// set textbox attributes
|
||||
txtQuotaValue.Style["display"] = (txtQuotaValue.Text == "-1") ? "none" : "inline";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
chkQuotaUnlimited.Attributes["onclick"] = String.Format("ToggleQuota('{0}', '{1}');",
|
||||
txtQuotaValue.ClientID, chkQuotaUnlimited.ClientID);
|
||||
|
||||
|
||||
|
||||
// call base handler
|
||||
base.OnPreRender(e);
|
||||
}
|
||||
|
||||
private void WriteScriptBlock()
|
||||
{
|
||||
string scriptKey = "QuataScript";
|
||||
string scriptKey = "QuataScript";
|
||||
if (!Page.ClientScript.IsClientScriptBlockRegistered(scriptKey))
|
||||
{
|
||||
Page.ClientScript.RegisterClientScriptBlock(GetType(), scriptKey, @"<script language='javascript' type='text/javascript'>
|
||||
|
@ -146,7 +146,7 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
</script>");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue