From e21761c5e8dbb012f6ed68cb8683390ea188df87 Mon Sep 17 00:00:00 2001 From: Jim Przybylinski Date: Mon, 13 Aug 2018 15:55:12 -0700 Subject: [PATCH 1/3] Add a link to the Kubernetes code lab. (#1062) * Add a link to the Kubernetes codelab as in informational icon link to the Kubernetes Engine Cloud Console link. --- .../CloudExplorerToolWindowControl.xaml | 13 +++- .../CloudConsoleLinks/ConsoleLink.cs | 47 +++++++----- .../CloudConsoleLinks/ConsoleLinkGroup.cs | 2 +- .../CloudConsoleLinks/ConsoleLinksRoot.cs | 19 ++++- .../Resources.Designer.cs | 9 +++ .../GoogleCloudExtension/Resources.resx | 4 + .../CloudConsoleLinksSourceTests.cs | 2 +- .../ConsoleLinkGroupTests.cs | 2 +- .../CloudConsoleLinks/ConsoleLinkTests.cs | 73 ++++++++++++++----- .../ConsoleLinksRootTests.cs | 2 +- 10 files changed, 129 insertions(+), 44 deletions(-) diff --git a/GoogleCloudExtension/GoogleCloudExtension/CloudExplorer/CloudExplorerToolWindowControl.xaml b/GoogleCloudExtension/GoogleCloudExtension/CloudExplorer/CloudExplorerToolWindowControl.xaml index 2f7772214..ad83c9aee 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/CloudExplorer/CloudExplorerToolWindowControl.xaml +++ b/GoogleCloudExtension/GoogleCloudExtension/CloudExplorer/CloudExplorerToolWindowControl.xaml @@ -9,6 +9,8 @@ x:Class="GoogleCloudExtension.CloudExplorer.CloudExplorerToolWindowControl" xmlns:ext="clr-namespace:GoogleCloudExtension" xmlns:consoleLinks="clr-namespace:GoogleCloudExtension.CloudExplorerSources.CloudConsoleLinks" + xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging" + xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog" Background="{DynamicResource {x:Static vsshell:VsBrushes.WindowKey}}" Foreground="{DynamicResource {x:Static vsshell:VsBrushes.WindowTextKey}}" mc:Ignorable="d" @@ -90,8 +92,17 @@ - + + + + + + + diff --git a/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLink.cs b/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLink.cs index 3d3b0158e..69a56d9b5 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLink.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLink.cs @@ -13,9 +13,9 @@ // limitations under the License. using GoogleCloudExtension.CloudExplorer; +using GoogleCloudExtension.Services; using GoogleCloudExtension.Utils; using System; -using System.Diagnostics; namespace GoogleCloudExtension.CloudExplorerSources.CloudConsoleLinks { @@ -26,46 +26,59 @@ public class ConsoleLink : TreeLeaf { private readonly LinkInfo _linkFormatInfo; private readonly ICloudSourceContext _context; - private readonly Func _startProcess; + private readonly Lazy _browserService = + GoogleCloudExtensionPackage.Instance.GetMefServiceLazy(); /// /// The command to execute when the link is pressed. /// public ProtectedCommand NavigateCommand { get; } + /// + /// The link info for the help link, if any. + /// + public LinkInfo InfoLinkInfo { get; } + + /// + /// The command to navigate to the info link. + /// + public ProtectedCommand NavigateInfoCommand { get; } + + private IBrowserService BrowserService => _browserService.Value; + /// /// Creates a new Console Link tree leaf node. /// + /// The . /// /// The link info with the caption and the ready url format. /// - /// The . - public ConsoleLink(LinkInfo linkFormatInfo, ICloudSourceContext context) : this( - linkFormatInfo, context, Process.Start) - { } + /// The link info for the help section of the console link. + public ConsoleLink(ICloudSourceContext context, LinkInfo linkFormatInfo, LinkInfo infoLinkInfo) : this(context, linkFormatInfo) + { + InfoLinkInfo = infoLinkInfo; + NavigateInfoCommand.CanExecuteCommand = true; + } /// - /// Internal constructor for testing. + /// Creates a new Console Link tree leaf node. /// + /// The . /// /// The link info with the caption and the ready url format. /// - /// The . - /// - /// Dependency injecion of the static function . - /// - internal ConsoleLink(LinkInfo linkFormatInfo, ICloudSourceContext context, Func startProcess) + public ConsoleLink(ICloudSourceContext context, LinkInfo linkFormatInfo) { - _startProcess = startProcess; _context = context; _linkFormatInfo = linkFormatInfo; Caption = _linkFormatInfo.Caption; NavigateCommand = new ProtectedCommand(OnNavigateCommand); + NavigateInfoCommand = new ProtectedCommand(OnNavigateHelpCommand, false); } - private void OnNavigateCommand() - { - _startProcess(string.Format(_linkFormatInfo.NavigateUrl, _context.CurrentProject?.ProjectId)); - } + private void OnNavigateCommand() => BrowserService.OpenBrowser( + string.Format(_linkFormatInfo.NavigateUrl, _context.CurrentProject?.ProjectId)); + + private void OnNavigateHelpCommand() => BrowserService.OpenBrowser(InfoLinkInfo.NavigateUrl); } } diff --git a/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkGroup.cs b/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkGroup.cs index 5920d2417..7614cf690 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkGroup.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkGroup.cs @@ -22,7 +22,7 @@ namespace GoogleCloudExtension.CloudExplorerSources.CloudConsoleLinks public class ConsoleLinkGroup : TreeHierarchy { public ConsoleLinkGroup(string caption, ICloudSourceContext context, IEnumerable groupLinks) : base( - groupLinks.Select(l => new ConsoleLink(l, context))) + groupLinks.Select(l => new ConsoleLink(context, l))) { Caption = caption; } diff --git a/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLinksRoot.cs b/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLinksRoot.cs index f9171cd85..0b25ace7f 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLinksRoot.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/CloudExplorerSources/CloudConsoleLinks/ConsoleLinksRoot.cs @@ -61,10 +61,13 @@ public class ConsoleLinksRoot : TreeHierarchy, ISourceRootViewModelBase private const string PubSubPath = "cloudpubsub"; private const string MachineLearningEnginePath = "mlengine"; + private const string KubernetesCodelabLink = + "https://codelabs.developers.google.com/codelabs/cloud-kubernetes-aspnetcore/"; + internal static readonly LinkInfo s_consoleHomeFormatInfo = new LinkInfo( HomeUrl, Resources.CloudExplorerConsoleLinkCaption); - private static readonly IReadOnlyList<(string, string)> s_primaryConsoleLinkPaths = new[] + private static readonly IReadOnlyList<(string path, string caption)> s_primaryConsoleLinkPaths = new[] { (AppEnginePath, Resources.CloudLinkAppEngineCaption), (ComputeEnginePath, Resources.CloudLinkComputeEngineCaption), @@ -129,6 +132,11 @@ public class ConsoleLinksRoot : TreeHierarchy, ISourceRootViewModelBase }) }; + private static readonly IReadOnlyDictionary s_helpLinks = new Dictionary + { + [KubernetesEnginePath] = new LinkInfo(KubernetesCodelabLink, Resources.ConsoleLinksKubernetesInfoTooltip) + }; + private readonly Func _startProcess; private readonly ICloudSourceContext _context; @@ -163,9 +171,14 @@ internal ConsoleLinksRoot(ICloudSourceContext context, Func sta Caption = s_consoleHomeFormatInfo.Caption; NavigateCommand = new ProtectedCommand(OnNavigateCommand); - foreach (LinkInfo formatLinkInfo in PrimaryConsoleLinkFormats) + foreach ((string path, string caption) tuple in s_primaryConsoleLinkPaths) { - Children.Add(new ConsoleLink(formatLinkInfo, _context)); + LinkInfo linkInfo = PathTupleToLinkInfo(tuple); + ConsoleLink consoleLink = s_helpLinks.ContainsKey(tuple.path) ? + new ConsoleLink(_context, linkInfo, s_helpLinks[tuple.path]) : + new ConsoleLink(_context, linkInfo); + + Children.Add(consoleLink); } foreach ((string groupCaption, IEnumerable linkInfos) in GroupedConsoleLinkFormats) diff --git a/GoogleCloudExtension/GoogleCloudExtension/Resources.Designer.cs b/GoogleCloudExtension/GoogleCloudExtension/Resources.Designer.cs index 84d95c037..38ceac478 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/Resources.Designer.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/Resources.Designer.cs @@ -2157,6 +2157,15 @@ public static string ConsoleLinkProjectGroupCaption { } } + /// + /// Looks up a localized string similar to Kubernetes Engine Code Lab. + /// + public static string ConsoleLinksKubernetesInfoTooltip { + get { + return ResourceManager.GetString("ConsoleLinksKubernetesInfoTooltip", resourceCulture); + } + } + /// /// Looks up a localized string similar to Stackdriver. /// diff --git a/GoogleCloudExtension/GoogleCloudExtension/Resources.resx b/GoogleCloudExtension/GoogleCloudExtension/Resources.resx index 7b1b8c95c..a161a36ff 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/Resources.resx +++ b/GoogleCloudExtension/GoogleCloudExtension/Resources.resx @@ -2507,4 +2507,8 @@ Delete corrupted file? Don't show this warning again + + Kubernetes Engine Code Lab + The tooltip of the info link of the kubernetes console link. + \ No newline at end of file diff --git a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/CloudConsoleLinksSourceTests.cs b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/CloudConsoleLinksSourceTests.cs index e5cdd502b..4f9c7dbd4 100644 --- a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/CloudConsoleLinksSourceTests.cs +++ b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/CloudConsoleLinksSourceTests.cs @@ -20,7 +20,7 @@ namespace GoogleCloudExtensionUnitTests.CloudExplorerSources.CloudConsoleLinks { [TestClass] - public class CloudConsoleLinksSourceTests + public class CloudConsoleLinksSourceTests : ExtensionTestBase { [TestMethod] public void TestConstructor_SetsRoot() diff --git a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkGroupTests.cs b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkGroupTests.cs index a0face552..5cccf095f 100644 --- a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkGroupTests.cs +++ b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkGroupTests.cs @@ -22,7 +22,7 @@ namespace GoogleCloudExtensionUnitTests.CloudExplorerSources.CloudConsoleLinks { [TestClass] - public class ConsoleLinkGroupTests + public class ConsoleLinkGroupTests : ExtensionTestBase { private static readonly ICloudSourceContext s_mockedContext = Mock.Of(); private const string DefaultCaption = "DefaultCaption"; diff --git a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkTests.cs b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkTests.cs index 7b7155821..5a3078dbe 100644 --- a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkTests.cs +++ b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinkTests.cs @@ -14,32 +14,35 @@ using GoogleCloudExtension.CloudExplorer; using GoogleCloudExtension.CloudExplorerSources.CloudConsoleLinks; +using GoogleCloudExtension.Services; using GoogleCloudExtension.Utils; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -using System; -using System.Diagnostics; +using TestingHelpers; namespace GoogleCloudExtensionUnitTests.CloudExplorerSources.CloudConsoleLinks { [TestClass] - public class ConsoleLinkTests + public class ConsoleLinkTests : ExtensionTestBase { private const string DefaultCaption = "Default Caption"; private const string DefaultUrl = "url://default"; private static readonly LinkInfo s_defaultLinkInfo = new LinkInfo(DefaultUrl, DefaultCaption); - private Mock> _startProcessMock; + private Mock _browserServiceMock; [TestInitialize] public void BeforeEach() { - _startProcessMock = new Mock>(); + _browserServiceMock = new Mock(); + + PackageMock.Setup(p => p.GetMefServiceLazy()).Returns(_browserServiceMock.ToLazy()); } + [TestMethod] public void TestConstructor_SetsCaption() { const string testCaption = "Test Caption"; - var objectUnderTest = new ConsoleLink(new LinkInfo(DefaultUrl, testCaption), Mock.Of()); + var objectUnderTest = new ConsoleLink(Mock.Of(), new LinkInfo(DefaultUrl, testCaption)); Assert.AreEqual(testCaption, objectUnderTest.Caption); } @@ -47,24 +50,60 @@ public void TestConstructor_SetsCaption() [TestMethod] public void TestConstructor_CreatesNavigateCommand() { - var objectUnderTest = new ConsoleLink(s_defaultLinkInfo, Mock.Of()); + var objectUnderTest = new ConsoleLink(Mock.Of(), s_defaultLinkInfo); Assert.IsTrue(objectUnderTest.NavigateCommand.CanExecuteCommand); } + [TestMethod] + public void TestConstructor_SetsHelpLinkInfo() + { + var expectedHelpLinkInfo = new LinkInfo("url://test/url", "Test Caption"); + var objectUnderTest = new ConsoleLink( + Mock.Of(), + new LinkInfo(DefaultUrl, DefaultCaption), + expectedHelpLinkInfo); + + Assert.AreEqual(expectedHelpLinkInfo, objectUnderTest.InfoLinkInfo); + } + + [TestMethod] + public void TestConstructor_EnablesNavigateHelpCommand() + { + var objectUnderTest = new ConsoleLink( + Mock.Of(), + new LinkInfo(DefaultUrl, DefaultCaption), + new LinkInfo(DefaultUrl, DefaultCaption)); + + Assert.IsTrue(objectUnderTest.NavigateInfoCommand.CanExecute(null)); + } + + [TestMethod] + public void TestNavigateHelpCommand_NavigatesToUrl() + { + const string testUrl = "url://test/url"; + + var objectUnderTest = new ConsoleLink( + Mock.Of(), + new LinkInfo(DefaultUrl, DefaultCaption), + new LinkInfo(testUrl, "Test Caption")); + objectUnderTest.NavigateInfoCommand.Execute(null); + + _browserServiceMock.Verify(b => b.OpenBrowser(testUrl)); + } + [TestMethod] public void TestNavigateCommand_NavigatesToUrlMissingProject() { const string testUrlFormat = "url://default?project={0}"; const string expectedUrl = "url://default?project="; var objectUnderTest = new ConsoleLink( - new LinkInfo(testUrlFormat, DefaultCaption), Mock.Of(), - _startProcessMock.Object); + new LinkInfo(testUrlFormat, DefaultCaption)); objectUnderTest.NavigateCommand.Execute(null); - _startProcessMock.Verify(f => f(expectedUrl), Times.Once); + _browserServiceMock.Verify(b => b.OpenBrowser(expectedUrl), Times.Once); } [TestMethod] @@ -74,13 +113,12 @@ public void TestNavigateCommand_NavigatesToUrl() const string testProjectId = "testProjectId"; const string expectedUrl = "url://project/testProjectId/default"; var objectUnderTest = new ConsoleLink( - new LinkInfo(testUrlFormat, DefaultCaption), Mock.Of(c => c.CurrentProject.ProjectId == testProjectId), - _startProcessMock.Object); + new LinkInfo(testUrlFormat, DefaultCaption)); objectUnderTest.NavigateCommand.Execute(null); - _startProcessMock.Verify(f => f(expectedUrl), Times.Once); + _browserServiceMock.Verify(b => b.OpenBrowser(expectedUrl), Times.Once); } [TestMethod] @@ -93,17 +131,14 @@ public void TestNavigateCommand_NavigatesToUpdatedUrl() const string secondExpectedUrl = "url://project/secondProjectId/default"; var contextMock = new Mock(); contextMock.Setup(c => c.CurrentProject.ProjectId).Returns(firstProjectId); - var objectUnderTest = new ConsoleLink( - new LinkInfo(testUrlFormat, DefaultCaption), - contextMock.Object, - _startProcessMock.Object); + var objectUnderTest = new ConsoleLink(contextMock.Object, new LinkInfo(testUrlFormat, DefaultCaption)); objectUnderTest.NavigateCommand.Execute(null); contextMock.Setup(c => c.CurrentProject.ProjectId).Returns(secondProjectId); objectUnderTest.NavigateCommand.Execute(null); - _startProcessMock.Verify(f => f(firstExpectedUrl), Times.Once); - _startProcessMock.Verify(f => f(secondExpectedUrl), Times.Once); + _browserServiceMock.Verify(b => b.OpenBrowser(firstExpectedUrl), Times.Once); + _browserServiceMock.Verify(b => b.OpenBrowser(secondExpectedUrl), Times.Once); } } } diff --git a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinksRootTests.cs b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinksRootTests.cs index 934afe5e3..038d474ea 100644 --- a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinksRootTests.cs +++ b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/CloudExplorerSources/CloudConsoleLinks/ConsoleLinksRootTests.cs @@ -24,7 +24,7 @@ namespace GoogleCloudExtensionUnitTests.CloudExplorerSources.CloudConsoleLinks { [TestClass] - public class ConsoleLinksRootTests + public class ConsoleLinksRootTests : ExtensionTestBase { [TestMethod] public void TestConstructor_SetsCaption() From 86bfaecc1b4d2dff4fca218abd719d581edbfee2 Mon Sep 17 00:00:00 2001 From: Jim Przybylinski Date: Fri, 12 Oct 2018 14:17:38 -0700 Subject: [PATCH 2/3] Update the ASP.NET Core on GCE warning message. (#1066) * Update the ASP.NET Core on GCE warning message. --- .../CoreGceWarningStepContent.xaml | 24 ++++++++++---- .../CoreGceWarningStepViewModel.cs | 9 +++++ .../Resources.Designer.cs | 33 +++++++++++++++++-- .../GoogleCloudExtension/Resources.resx | 18 ++++++++-- .../CoreGceWarningStepViewModelTests.cs | 8 +++++ 5 files changed, 80 insertions(+), 12 deletions(-) diff --git a/GoogleCloudExtension/GoogleCloudExtension/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepContent.xaml b/GoogleCloudExtension/GoogleCloudExtension/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepContent.xaml index ef374f26e..dbff00a3e 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepContent.xaml +++ b/GoogleCloudExtension/GoogleCloudExtension/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepContent.xaml @@ -28,7 +28,7 @@ d:DesignHeight="247" d:DesignWidth="476" d:DataContext="{d:DesignInstance local:CoreGceWarningStepViewModel}"> - + - - - + + + + + + + + + + + + + + + - + - + diff --git a/GoogleCloudExtension/GoogleCloudExtension/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepViewModel.cs b/GoogleCloudExtension/GoogleCloudExtension/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepViewModel.cs index b240b450b..27a4c18b0 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepViewModel.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepViewModel.cs @@ -27,6 +27,9 @@ public class CoreGceWarningStepViewModel : ValidatingViewModelBase, IPublishDial { public const string AspNetCoreIisDocsLink = "https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/"; + public const string AspNetMarketplaceImageLink = + "https://console.cloud.google.com/marketplace/details/click-to-deploy-images/aspnet"; + private readonly IPublishDialog _publishDialog; private readonly GceStepContent _nextStepContent; private readonly Lazy _browserService; @@ -57,16 +60,22 @@ public class CoreGceWarningStepViewModel : ValidatingViewModelBase, IPublishDial public ProtectedCommand BrowseAspNetCoreIisDocs { get; } private IBrowserService BrowserService => _browserService.Value; + public ProtectedCommand BrowseAspNetMarketplaceImage { get; } + public CoreGceWarningStepViewModel(IPublishDialog publishDialog) { _publishDialog = publishDialog; BrowseAspNetCoreIisDocs = new ProtectedCommand(OnBrowseAspNetCoreIisDocs); + BrowseAspNetMarketplaceImage = new ProtectedCommand(OnBrowseAspNeMarketplaceImage); Title = string.Format(Resources.GcePublishStepTitle, publishDialog.Project.Name); ActionCommand = new ProtectedCommand(OnNextCommand); _nextStepContent = new GceStepContent(_publishDialog); _browserService = GoogleCloudExtensionPackage.Instance.GetMefServiceLazy(); } + private void OnBrowseAspNeMarketplaceImage() => + BrowserService.OpenBrowser(AspNetMarketplaceImageLink); + private void OnBrowseAspNetCoreIisDocs() => BrowserService.OpenBrowser(AspNetCoreIisDocsLink); diff --git a/GoogleCloudExtension/GoogleCloudExtension/Resources.Designer.cs b/GoogleCloudExtension/GoogleCloudExtension/Resources.Designer.cs index 38ceac478..2883506ae 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/Resources.Designer.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/Resources.Designer.cs @@ -4679,7 +4679,7 @@ public static string PublishGceWarningStepLine2AfterLink { } /// - /// Looks up a localized string similar to Hosting ASP.NET Core applications on Compute Engine requires . + /// Looks up a localized string similar to Hosting ASP.NET Core applications on Compute Engine should use the . /// public static string PublishGceWarningStepLine2BeforeLink { get { @@ -4687,12 +4687,39 @@ public static string PublishGceWarningStepLine2BeforeLink { } } + /// + /// Looks up a localized string similar to ASP.NET Framework Marketplace Image. + /// + public static string PublishGceWarningStepLine2MarketplaceLink { + get { + return ResourceManager.GetString("PublishGceWarningStepLine2MarketplaceLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .. + /// + public static string PublishGceWarningStepLine3AfterLink { + get { + return ResourceManager.GetString("PublishGceWarningStepLine3AfterLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The default windows image will require . + /// + public static string PublishGceWarningStepLine3BeforeLink { + get { + return ResourceManager.GetString("PublishGceWarningStepLine3BeforeLink", resourceCulture); + } + } + /// /// Looks up a localized string similar to manual configuration of IIS. /// - public static string PublishGceWarningStepLine2HyperLink { + public static string PublishGceWarningStepLine3DocsLink { get { - return ResourceManager.GetString("PublishGceWarningStepLine2HyperLink", resourceCulture); + return ResourceManager.GetString("PublishGceWarningStepLine3DocsLink", resourceCulture); } } diff --git a/GoogleCloudExtension/GoogleCloudExtension/Resources.resx b/GoogleCloudExtension/GoogleCloudExtension/Resources.resx index a161a36ff..3112940da 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/Resources.resx +++ b/GoogleCloudExtension/GoogleCloudExtension/Resources.resx @@ -2489,14 +2489,26 @@ Delete corrupted file? The first line of the ASP.NET Core on GCE warning dialog. - Hosting ASP.NET Core applications on Compute Engine requires + Hosting ASP.NET Core applications on Compute Engine should use the The first part of the second line of the ASP.NET Core on GCE warning dialog. - + + ASP.NET Framework Marketplace Image + The text of the link to the ASP.NET Framework Marketplace + + + . + The text after the link of the second line of the ASP.NET Core on GCE warning dialog. + + + The default windows image will require + The part between the links of the second line of the ASP.NET Core on GCE warning dialog. + + manual configuration of IIS The text of the hyperlink on the ASP.NET Core on GCE Warning dialog. - + . The end part of the second line of the ASP.NET Core on GCE warning dialog. diff --git a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepViewModelTests.cs b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepViewModelTests.cs index 82a2370b2..ac2a1bc09 100644 --- a/GoogleCloudExtension/GoogleCloudExtensionUnitTests/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepViewModelTests.cs +++ b/GoogleCloudExtension/GoogleCloudExtensionUnitTests/PublishDialog/Steps/CoreGceWarning/CoreGceWarningStepViewModelTests.cs @@ -192,5 +192,13 @@ public void TestBrowseAspNetCoreIisDocs_OpensBrowser() _browserServiceMock.Verify(b => b.OpenBrowser(CoreGceWarningStepViewModel.AspNetCoreIisDocsLink)); } + + [TestMethod] + public void TestBrowsAspNetMarketplaceImage_OpensBrowser() + { + _objectUnderTest.BrowseAspNetMarketplaceImage.Execute(null); + + _browserServiceMock.Verify(b => b.OpenBrowser(CoreGceWarningStepViewModel.AspNetMarketplaceImageLink)); + } } } From 708d0f0255e733df69efbd2608d631af0067cbab Mon Sep 17 00:00:00 2001 From: Jim Przybylinski Date: Mon, 3 Dec 2018 12:36:56 -0800 Subject: [PATCH 3/3] Update version to 2.0.2 --- .../GoogleCloudExtension/Properties/AssemblyInfo.cs | 4 ++-- .../GoogleCloudExtension/source.extension.vsixmanifest | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GoogleCloudExtension/GoogleCloudExtension/Properties/AssemblyInfo.cs b/GoogleCloudExtension/GoogleCloudExtension/Properties/AssemblyInfo.cs index 5078d534e..f56b2bf51 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/Properties/AssemblyInfo.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/Properties/AssemblyInfo.cs @@ -35,8 +35,8 @@ // This version number matches the version in the .vsixmanifest. Please update both versions at the // same time. -[assembly: AssemblyVersion("2.0.1.0")] -[assembly: AssemblyFileVersion("2.0.1.0")] +[assembly: AssemblyVersion("2.0.2.0")] +[assembly: AssemblyFileVersion("2.0.2.0")] [assembly: InternalsVisibleTo( "GoogleCloudExtensionUnitTests," + diff --git a/GoogleCloudExtension/GoogleCloudExtension/source.extension.vsixmanifest b/GoogleCloudExtension/GoogleCloudExtension/source.extension.vsixmanifest index 59efe4cb6..e8fbb9cdb 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/source.extension.vsixmanifest +++ b/GoogleCloudExtension/GoogleCloudExtension/source.extension.vsixmanifest @@ -5,7 +5,7 @@ The Version attribute of the Identity element *must* match the version number in Properties\AssemblyInfo.cs, to ensure accurate metrics. --> - + Google Cloud Tools for Visual Studio Tools to develop applications for Google Cloud Platform. https://cloud.google.com/visual-studio/