diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs index f076cc89..db0481d5 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs @@ -270,6 +270,7 @@ namespace WebsitePanel.EnterpriseServer // x => MatchGalleryAppDependencies(x.Dependency, appsFilter.ToArray()) // || MatchMenaltoGalleryApp(x, appsFilter.ToArray()))); + { FilterResultApplications(packageId, result); @@ -293,14 +294,33 @@ namespace WebsitePanel.EnterpriseServer int userId = SecurityContext.User.UserId; // SecurityContext.SetThreadSupervisorPrincipal(); + + //get filter mode + int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Web); + StringDictionary serviceSettings = ServerController.GetServiceSettings(serviceId); + bool bExclude = (Utils.ParseInt(serviceSettings["GalleryAppsFilterMode"], 0) != 1); //0 - Exclude apps, 1- Include apps + // string[] filteredApps = GetServiceAppsCatalogFilter(packageId); // + + + if (filteredApps != null) { - result.Value = new List(Array.FindAll(result.Value.ToArray(), - x => !Array.Exists(filteredApps, - z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase)))); + if (bExclude) + { + result.Value = new List(Array.FindAll(result.Value.ToArray(), + x => !Array.Exists(filteredApps, + z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase)))); + } + else + { + result.Value = new List(Array.FindAll(result.Value.ToArray(), + x => Array.Exists(filteredApps, + z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase)))); + + } } // SecurityContext.SetThreadPrincipal(userId); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS60_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS60_Settings.ascx.resx index 09d656ce..720490cc 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS60_Settings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS60_Settings.ascx.resx @@ -200,7 +200,7 @@ Shared SSL Web Sites: - Microsoft Web Appication Gallery + Web Appication Gallery Web Farms Support: @@ -226,9 +226,6 @@ Web Extensions - - Please select items from the feed you would like to remove from the list of apps available to end-users. - ASP.NET 4.0 Library Path: diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS70_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS70_Settings.ascx.resx index 385036f5..7e0ca9e5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS70_Settings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS70_Settings.ascx.resx @@ -178,7 +178,7 @@ Gallery feed URL: - Microsoft Web Appication Gallery + Web Appication Gallery You could overwrite default Web App Gallery ATOM feed located at Microsoft web site by your own to provide your own applications to your customers. Leave this field blank to use default feed. @@ -214,7 +214,7 @@ Module Assembly: - Click to modify the filter... + Select applications Click to create a filter... @@ -225,9 +225,6 @@ Gallery feed filter: - - Please select items from the feed you would like to remove from the list of apps available to end-users. - ASP.NET 4.0 Classic: diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx index 8224cfdf..a914ecae 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx @@ -4,6 +4,7 @@ <%@ Register Src="../UserControls/EditDomainsList.ascx" TagName="EditDomainsList" TagPrefix="uc5" %> <%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %> <%@ Register Src="../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %> +<%@ Register src="../UserControls/EditFeedsList.ascx" tagname="EditFeedsList" tagprefix="uc6" %>
@@ -116,30 +117,33 @@  
- - - - - - +
- - - -

-
+ + - - + + + + + + +
+ - + + Exclude selected applications + Include only selected applications + +
+ +

+
- -
Custom feeds:


@@ -149,7 +153,6 @@
-
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.cs index 69e30d79..553fc007 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.cs @@ -109,7 +109,6 @@ namespace WebsitePanel.Portal.ProviderControls txtAspNet11Pool.Text = settings["AspNet11Pool"]; txtAspNet20Pool.Text = settings["AspNet20Pool"]; txtAspNet40Pool.Text = settings["AspNet40Pool"]; - txtGalleryFeedUrl.Text = settings["GalleryXmlFeedUrl"]; txtAspPath.Text = settings["AspPath"]; txtAspNet11Path.Text = settings["AspNet11Path"]; txtAspNet20Path.Text = settings["AspNet20Path"]; @@ -130,8 +129,11 @@ namespace WebsitePanel.Portal.ProviderControls sharedSslSites.Value = settings[PackageSettings.SHARED_SSL_SITES]; ActiveDirectoryIntegration.BindSettings(settings); - // + + // + wpiEditFeedsList.Value = settings["FeedUrls"]; FilteredAppIds = settings["GalleryAppsFilter"]; + radioFilterAppsList.SelectedIndex = Utils.ParseInt(settings["GalleryAppsFilterMode"], 0); chkGalleryAppsAlwaysIgnoreDependencies.Checked = Utils.ParseBool(settings["GalleryAppsAlwaysIgnoreDependencies"], false); } @@ -148,7 +150,6 @@ namespace WebsitePanel.Portal.ProviderControls settings["AspNet11Path"] = txtAspNet11Path.Text.Trim(); settings["AspNet20Path"] = txtAspNet20Path.Text.Trim(); settings["AspNet40Path"] = txtAspNet40Path.Text.Trim(); - settings["GalleryXmlFeedUrl"] = txtGalleryFeedUrl.Text.Trim(); settings["Php4Path"] = txtPhp4Path.Text.Trim(); settings["Php5Path"] = txtPhp5Path.Text.Trim(); settings["PerlPath"] = txtPerlPath.Text.Trim(); @@ -166,7 +167,9 @@ namespace WebsitePanel.Portal.ProviderControls ActiveDirectoryIntegration.SaveSettings(settings); // + settings["FeedUrls"] = wpiEditFeedsList.Value; settings["GalleryAppsFilter"] = GetAppsCatalogFilter(); + settings["GalleryAppsFilterMode"] = radioFilterAppsList.SelectedIndex.ToString(); settings["GalleryAppsAlwaysIgnoreDependencies"] = chkGalleryAppsAlwaysIgnoreDependencies.Checked.ToString(); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.designer.cs index 4eb363b2..aac665aa 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.designer.cs @@ -219,24 +219,6 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::System.Web.UI.WebControls.Label lblWebAppGallery; - /// - /// lblGalleryFeed control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblGalleryFeed; - - /// - /// txtGalleryFeedUrl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtGalleryFeedUrl; - /// /// Label1 control. /// @@ -246,6 +228,15 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::System.Web.UI.WebControls.Label Label1; + /// + /// radioFilterAppsList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList radioFilterAppsList; + /// /// FilterDialogButton control. /// @@ -253,7 +244,7 @@ namespace WebsitePanel.Portal.ProviderControls { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.LinkButton FilterDialogButton; + protected global::System.Web.UI.WebControls.Button FilterDialogButton; /// /// chkGalleryAppsAlwaysIgnoreDependencies control. @@ -264,6 +255,15 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::System.Web.UI.WebControls.CheckBox chkGalleryAppsAlwaysIgnoreDependencies; + /// + /// wpiEditFeedsList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.EditFeedsList wpiEditFeedsList; + /// /// FilterDialogPanel control. /// @@ -273,15 +273,6 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::System.Web.UI.WebControls.Panel FilterDialogPanel; - /// - /// Localize1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Localize Localize1; - /// /// WebAppGalleryList control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx index 52198e79..b96c38f1 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx @@ -188,39 +188,35 @@ - - - -<%-- - - - - - - - - ---%> - + + + -
+ - + + Exclude selected applications + Include only selected applications + +
+ +

+
Enable Microsoft feed - -
Enable HeliconTech feed - -
Custom feeds:
- + +
+ -
- + + + + @@ -233,7 +229,6 @@ DefaultButton="OkButton">
-
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs index 3ecffe9e..3f455aae 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs @@ -130,10 +130,7 @@ namespace WebsitePanel.Portal.ProviderControls - // WPI - //wpiMicrosoftFeed.Checked = Utils.ParseBool(settings["FeedEnableMicrosoft"], true); - //wpiHeliconTechFeed.Checked = Utils.ParseBool(settings["FeedEnableHelicon"], true); - wpiEditFeedsList.Value = settings["FeedUrls"]; + txtAspPath.Text = settings["AspPath"]; @@ -187,7 +184,7 @@ namespace WebsitePanel.Portal.ProviderControls // Utils.SelectListItem(ddlWmSvcCredentialsMode, settings["WmSvc.CredentialsMode"]); // - FilteredAppIds = settings["GalleryAppsFilter"]; + // if (String.IsNullOrEmpty(settings[WDeployEnabled]) == false) { @@ -201,6 +198,12 @@ namespace WebsitePanel.Portal.ProviderControls } } + // WPI + //wpiMicrosoftFeed.Checked = Utils.ParseBool(settings["FeedEnableMicrosoft"], true); + //wpiHeliconTechFeed.Checked = Utils.ParseBool(settings["FeedEnableHelicon"], true); + wpiEditFeedsList.Value = settings["FeedUrls"]; + FilteredAppIds = settings["GalleryAppsFilter"]; + radioFilterAppsList.SelectedIndex = Utils.ParseInt(settings["GalleryAppsFilterMode"], 0); chkGalleryAppsAlwaysIgnoreDependencies.Checked = Utils.ParseBool(settings["GalleryAppsAlwaysIgnoreDependencies"], false); } @@ -253,10 +256,6 @@ namespace WebsitePanel.Portal.ProviderControls - //settings["FeedEnableMicrosoft"] = wpiMicrosoftFeed.Checked.ToString(); - //settings["FeedEnableHelicon"] = wpiHeliconTechFeed.Checked.ToString(); - settings["FeedUrls"] = wpiEditFeedsList.Value; - settings["GalleryAppsFilter"] = GetAppsCatalogFilter(); if (WDeployEnabledCheckBox.Checked) { @@ -272,6 +271,11 @@ namespace WebsitePanel.Portal.ProviderControls settings[WDeployEnabled] = Boolean.FalseString; } + //settings["FeedEnableMicrosoft"] = wpiMicrosoftFeed.Checked.ToString(); + //settings["FeedEnableHelicon"] = wpiHeliconTechFeed.Checked.ToString(); + settings["FeedUrls"] = wpiEditFeedsList.Value; + settings["GalleryAppsFilter"] = GetAppsCatalogFilter(); + settings["GalleryAppsFilterMode"] = radioFilterAppsList.SelectedIndex.ToString(); settings["GalleryAppsAlwaysIgnoreDependencies"] = chkGalleryAppsAlwaysIgnoreDependencies.Checked.ToString(); } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.designer.cs index a7e2bed9..a61aab10 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.designer.cs @@ -1,31 +1,3 @@ -// Copyright (c) 2012, 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. - //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -319,6 +291,15 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::System.Web.UI.WebControls.Label lblWebAppGallery; + /// + /// radioFilterAppsList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList radioFilterAppsList; + /// /// FilterDialogButton control. /// @@ -326,16 +307,7 @@ namespace WebsitePanel.Portal.ProviderControls { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.LinkButton FilterDialogButton; - - /// - /// wpiEditFeedsList control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::WebsitePanel.Portal.UserControls.EditFeedsList wpiEditFeedsList; + protected global::System.Web.UI.WebControls.Button FilterDialogButton; /// /// chkGalleryAppsAlwaysIgnoreDependencies control. @@ -346,6 +318,15 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::System.Web.UI.WebControls.CheckBox chkGalleryAppsAlwaysIgnoreDependencies; + /// + /// wpiEditFeedsList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.EditFeedsList wpiEditFeedsList; + /// /// FilterDialogPanel control. ///