diff --git a/.github/workflows/build-and-stage.yml b/.github/workflows/build-and-stage.yml index a694484..decff1c 100644 --- a/.github/workflows/build-and-stage.yml +++ b/.github/workflows/build-and-stage.yml @@ -1,71 +1,100 @@ -name: Build and stage - -env: - AZURE_WEBAPP_PACKAGE_PATH: '.' - DOTNET_VERSION: '8.0' - SLOT_NAME: staging - -on: - push: - branches: [ "main" ] - -permissions: - contents: read - -jobs: - build: - name: Build and publish app - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - name: Set up dependency caching for faster builds - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} - restore-keys: | - ${{ runner.os }}-nuget- - - name: Build with dotnet - run: dotnet build src/Client --configuration Release - - name: dotnet publish - run: dotnet publish src/Client -c Release -o ${{ env.DOTNET_ROOT }}/mainsite - - name: Upload artifact for deployment job - uses: actions/upload-artifact@v4 - with: - name: Steeltoe-MainSite - path: ${{ env.DOTNET_ROOT }}/mainsite - - deploy-to-staging: - name: Deploy to staging environment - permissions: - contents: none - runs-on: ubuntu-latest - needs: build - environment: - name: 'Staging' - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v4 - with: - name: Steeltoe-MainSite - - - name: Log into Azure CLI with service principal - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Deploy to Azure Web App - id: deploy-to-webapp - uses: azure/webapps-deploy@v3 - with: - app-name: ${{ vars.AZURE_WEBAPP_NAME }} - package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} - slot-name: ${{ env.SLOT_NAME }} +name: Build and stage + +env: + AZURE_WEBAPP_PACKAGE_PATH: '.' + DOTNET_VERSION: '8.0' + +on: + push: + branches: [ "main" ] + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + pull-requests: 'write' + +jobs: + build: + name: Build and publish app + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Set up dependency caching for faster builds + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - name: dotnet build + run: dotnet build src/Client --configuration Release + + - name: dotnet publish + run: dotnet publish src/Client -c Release -o ${{ env.DOTNET_ROOT }}/mainsite + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: Steeltoe-MainSite + path: ${{ env.DOTNET_ROOT }}/mainsite + + deploy-to-staging: + name: Deploy to staging environment + runs-on: ubuntu-latest + needs: build + environment: + name: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || vars.STAGING_SLOT_NAME }} + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + env: + SLOT_NAME: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || vars.STAGING_SLOT_NAME }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: Steeltoe-MainSite + + - name: Log into Azure CLI with service principal + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - name: If PR, create a new staging slot + if: ${{ github.event_name == 'pull_request' }} + run: az webapp deployment slot create --resource-group ${{ vars.AZURE_RESOURCE_GROUP }} --name ${{ vars.AZURE_WEBAPP_NAME}} --slot ${{ env.SLOT_NAME }} + # Need to pair a PR slot with a custom docs site address? + # az webapp config appsettings set -g steeltoe --name www-steeltoe --slot pr-141 --settings DocsSite__BaseAddress=https://docs-steeltoe-pr-310.azurewebsites.net + + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v3 + with: + app-name: ${{ vars.AZURE_WEBAPP_NAME }} + package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} + slot-name: ${{ env.SLOT_NAME }} + + - name: If PR, comment with the preview link + if: ${{ github.event_name == 'pull_request' }} + uses: mshick/add-pr-comment@v2 + with: + message: | + ## Preview link: https://${{ vars.AZURE_WEBAPP_NAME }}-${{ env.SLOT_NAME }}.azurewebsites.net + + - Your changes have been deployed to the preview site. The preview site will update as you add more commits to this branch. + - The preview link is shareable, but will be deleted when the pull request is merged or closed. + + > *This is an automated message.* + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-cleanup.yml b/.github/workflows/pr-cleanup.yml index 1fc73b2..7a85805 100644 --- a/.github/workflows/pr-cleanup.yml +++ b/.github/workflows/pr-cleanup.yml @@ -1,4 +1,3 @@ - name: Delete a preview environment on: diff --git a/.github/workflows/pr-deploy.yml b/.github/workflows/pr-deploy.yml deleted file mode 100644 index 63f3326..0000000 --- a/.github/workflows/pr-deploy.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Deploy a preview environment - -on: - pull_request: - branches: - - main - - v4 - -concurrency: ci-${{ github.event.number }} - -env: - AZURE_WEBAPP_PACKAGE_PATH: '.' - DOTNET_VERSION: '8.0' - SLOT_NAME: preview-${{ github.event.number }} - -jobs: - build: - name: Build and publish app - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - name: Set up dependency caching for faster builds - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} - restore-keys: | - ${{ runner.os }}-nuget- - - name: Build with dotnet - run: dotnet build src/Client --configuration Release - - name: dotnet publish - run: dotnet publish src/Client -c Release -o ${{ env.DOTNET_ROOT }}/mainsite - - name: Upload artifact for deployment job - uses: actions/upload-artifact@v4 - with: - name: Steeltoe-MainSite - path: ${{ env.DOTNET_ROOT }}/mainsite - - set-up-test-env: - name: Create a staging slot for this PR - runs-on: ubuntu-latest - - steps: - - name: Log into Azure CLI with service principal - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Create slot on staging site - run: az webapp deployment slot create --resource-group ${{ vars.AZURE_RESOURCE_GROUP }} --name ${{ vars.AZURE_WEBAPP_NAME}} --slot $SLOT_NAME - - deploy: - name: Deploy to new staging slot - runs-on: ubuntu-latest - needs: [build, set-up-test-env] - environment: - name: "PR #${{ github.event.number }}" - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - permissions: - pull-requests: write - - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v4 - with: - name: Steeltoe-MainSite - - - name: Log into Azure CLI with service principal - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Deploy to slot on staging site - uses: azure/webapps-deploy@v3 - id: deploy-to-webapp - with: - app-name: ${{ vars.AZURE_WEBAPP_NAME }} - package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} - slot-name: ${{ env.SLOT_NAME }} - - - name: Comment on PR with the preview link - uses: mshick/add-pr-comment@v2 - with: - message: | - ## Preview link: https://${{ vars.AZURE_WEBAPP_NAME }}-${{ env.SLOT_NAME }}.azurewebsites.net - - - Your changes have been deployed to the preview site. The preview site will update as you add more commits to this branch. - - The preview link is shareable, but will be deleted when the pull request is merged or closed. - - > *This is an automated message.* - repo-token: ${{ secrets.GITHUB_TOKEN }} - \ No newline at end of file diff --git a/src/Client/Components/App.razor b/src/Client/Components/App.razor index 27b99f2..bc5283c 100644 --- a/src/Client/Components/App.razor +++ b/src/Client/Components/App.razor @@ -3,10 +3,10 @@ + - @@ -41,14 +41,13 @@ - + Steeltoe OSS - - + @@ -70,14 +69,6 @@ - - - - - - - - - + diff --git a/src/Client/Components/AppSettingsTab/Azure.razor b/src/Client/Components/AppSettingsTab/Azure.razor deleted file mode 100644 index 9db50e7..0000000 --- a/src/Client/Components/AppSettingsTab/Azure.razor +++ /dev/null @@ -1,45 +0,0 @@ - - Replace localhost with the @ServiceName instance info -
{
-...
- "@ParentSettingsParamName": {
-	"@ChildSettingsParamName": {
-		@(string.IsNullOrEmpty(ServiceServer) ? "" : "\"server\": \""+ServiceServer+"\",")
-		@(string.IsNullOrEmpty(ServiceHost) ? "" : "\"host\": \""+ServiceHost+"\",")
-		@(string.IsNullOrEmpty(ServicePort) ? "" : "\"port\": \""+ServicePort+"\",")
-		@(string.IsNullOrEmpty(ServiceUsername) ? "" : "\"username\": \""+ServiceUsername+"\",")
-		@(string.IsNullOrEmpty(ServicePassword) ? "" : "\"password\": \""+ServicePassword+"\",")
-		@(string.IsNullOrEmpty(ServiceDatabase) ? "" : "\"database\": \""+ServiceDatabase+"\",")
-	}
- }
-...
-}
-
-
-@ChildContent - -@code { - [Parameter] - public string InstanceName { get; set; } = ""; - [Parameter] - public string ServiceName { get; set; } = ""; - [Parameter] - public string ServiceServer { get; set; } = null; - [Parameter] - public string ServiceHost { get; set; } = null; - [Parameter] - public string ServicePort { get; set; } = null; - [Parameter] - public string ServiceUsername { get; set; } = null; - [Parameter] - public string ServicePassword { get; set; } = null; - [Parameter] - public string ServiceDatabase { get; set; } = null; - [Parameter] - public string ParentSettingsParamName { get; set; } = ""; - [Parameter] - public string ChildSettingsParamName { get; set; } = ""; - - [Parameter] - public RenderFragment ChildContent { get; set; } -} \ No newline at end of file diff --git a/src/Client/Components/AppSettingsTab/CloudFoundry.razor b/src/Client/Components/AppSettingsTab/CloudFoundry.razor deleted file mode 100644 index db81629..0000000 --- a/src/Client/Components/AppSettingsTab/CloudFoundry.razor +++ /dev/null @@ -1,142 +0,0 @@ - - @if (string.IsNullOrEmpty(ServiceName)) - { - It's already set, continue to next step. - } - else - { - Update with the @ServiceName info -
{
-...
-
-	@if (!string.IsNullOrEmpty(SpringApplicationName)) {
-	"spring": {
-		"application": {
-			"name": "@SpringApplicationName"
-		}
-}
-@if (!string.IsNullOrEmpty(SpringServerUri)){
-		,"cloud": {
-			"config": {
-				"uri": "@SpringServerUri"
-				"validate_certifates": false
-			}
-		}
-
-}
-@if (!string.IsNullOrEmpty(SpringApplicationName)) {
-	},
-}
-@if(!string.IsNullOrEmpty(ZipkinEndpoint)){
-		"management": {
-		"tracing": {
-			"alwaysSample": true,
-			"useShortTraceIds ": true,
-			"exporter": {
-				"zipkin": {
-					"endpoint": "@(ZipkinEndpoint)",
-					"validateCertificates": false,
-					"useShortTraceIds ": true
-				}
-			}
-		}
-	},
-}
-@if(!string.IsNullOrEmpty(ManagementEndpointPath)){
-
-"management": {
-	"endpoints": {
-		"path": "@ManagementEndpointPath",
-		"cloudfoundry": {
-			"validateCertificates": false
-		}
-	},
-	"metrics": {
-		"exporter": {
-			"cloudfoundry": {
-				"validateCertificates": false
-			}
-		}
-	}
-}
-}
-@if(!string.IsNullOrEmpty(ShouldRegisterWithEureka)){
-	"eureka": {
-		"client": {
-			"shouldRegisterWithEureka": @ShouldRegisterWithEureka
-		}
-	}
-}
-@if(!string.IsNullOrEmpty(ConsulHostAddress)){
-	"consul": {
-		"host": "@ConsulHostAddress",
-		"port": @ConsulHostPort,
-		"discovery": {
-		"register": @ConsulShouldRegister,
-		"serviceName": "@ProjectName"
-		}
-	}
-}
-@if(!string.IsNullOrEmpty(OAuthClient)){
-	"security": {
-		"oauth2": {
-			"client": {
-				"validateCertificates": false,
-			}
-		}
-	}
-}
-@if(!string.IsNullOrEmpty(OpenIDClient)){
-	"security": {
-		"oauth2": {
-			"client": {
-				"validateCertificates": false,
-			@(string.IsNullOrEmpty(OpenIDAuthDomain) ? "" : "\"authDomain\": \"" + OpenIDAuthDomain + "\",")
-			@(string.IsNullOrEmpty(OpenIDClientId) ? "" : "\"clientId\": \"" + OpenIDClientId + "\",")
-			@(string.IsNullOrEmpty(OpenIDClientSecret) ? "" : "\"clientSecret\": \"" + OpenIDClientSecret + "\",")
-			}
-		}
-	}
-}
-
-...
-}
- } - @ChildContent -
- -@code { - [Parameter] - public string ServiceName { get; set; } = ""; - [Parameter] - public string SpringApplicationName { get; set; } = null; - [Parameter] - public string SpringServerUri { get; set; } = null; - [Parameter] - public string ZipkinEndpoint { get; set; } = null; - [Parameter] - public string ManagementEndpointPath { get; set; } = null; - [Parameter] - public string ShouldRegisterWithEureka { get; set; } = null; - [Parameter] - public string ConsulHostAddress { get; set; } = null; - [Parameter] - public string ConsulHostPort { get; set; } = null; - [Parameter] - public string ConsulShouldRegister { get; set; } = "false"; - [Parameter] - public string ProjectName { get; set; } = ""; - [Parameter] - public string OAuthClient { get; set; } = null; - [Parameter] - public string OpenIDClient { get; set; } = null; - [Parameter] - public string OpenIDAuthDomain { get; set; } = null; - [Parameter] - public string OpenIDClientId { get; set; } = null; - [Parameter] - public string OpenIDClientSecret { get; set; } = null; - - [Parameter] - public RenderFragment ChildContent { get; set; } -} \ No newline at end of file diff --git a/src/Client/Components/AppSettingsTab/Initiallizr.razor b/src/Client/Components/AppSettingsTab/Initiallizr.razor deleted file mode 100644 index 2c91e8d..0000000 --- a/src/Client/Components/AppSettingsTab/Initiallizr.razor +++ /dev/null @@ -1,26 +0,0 @@ -
Create a new ASP.NET Core WebAPI app with the Steeltoe Initializr
- - -@ChildContent - -@code { - [Parameter] - public string ImageName { get; set; } = ""; - [Parameter] - public string ProjectName { get; set; } = ""; - [Parameter] - public string DependencyName { get; set; } = null; - - [Parameter] - public RenderFragment ChildContent { get; set; } - -} \ No newline at end of file diff --git a/src/Client/Components/AppSettingsTab/Kubernetes.razor b/src/Client/Components/AppSettingsTab/Kubernetes.razor deleted file mode 100644 index da5bea8..0000000 --- a/src/Client/Components/AppSettingsTab/Kubernetes.razor +++ /dev/null @@ -1,46 +0,0 @@ - - Replace localhost with the @InstanceName instance info -
{
-...
-
-	"@ParentSettingsParamName": {
-		"@ChildSettingsParamName": {
-		@(string.IsNullOrEmpty(ServiceServer) ? "" : "\"server\": \""+ServiceServer+"\",")
-		@(string.IsNullOrEmpty(ServiceHost) ? "" : "\"host\": \""+ServiceHost+"\",")
-		@(string.IsNullOrEmpty(ServicePort) ? "" : "\"port\": \""+ServicePort+"\",")
-		@(string.IsNullOrEmpty(ServiceUsername) ? "" : "\"username\": \""+ServiceUsername+"\",")
-		@(string.IsNullOrEmpty(ServicePassword) ? "" : "\"password\": \""+ServicePassword+"\",")
-		@(string.IsNullOrEmpty(ServiceDatabase) ? "" : "\"database\": \""+ServiceDatabase+"\",")
-		}
-	}
-
-...
-}
-
-@ChildContent - -@code { - [Parameter] - public string InstanceName { get; set; } = ""; - [Parameter] - public string ServiceName { get; set; } = ""; - [Parameter] - public string ServiceServer { get; set; } = null; - [Parameter] - public string ServiceHost { get; set; } = null; - [Parameter] - public string ServicePort { get; set; } = null; - [Parameter] - public string ServiceUsername { get; set; } = null; - [Parameter] - public string ServicePassword { get; set; } = null; - [Parameter] - public string ServiceDatabase { get; set; } = null; - [Parameter] - public string ParentSettingsParamName { get; set; } = ""; - [Parameter] - public string ChildSettingsParamName { get; set; } = ""; - - [Parameter] - public RenderFragment ChildContent { get; set; } -} \ No newline at end of file diff --git a/src/Client/Components/AppSettingsTab/Local.razor b/src/Client/Components/AppSettingsTab/Local.razor deleted file mode 100644 index 9ce3c02..0000000 --- a/src/Client/Components/AppSettingsTab/Local.razor +++ /dev/null @@ -1,237 +0,0 @@ - - @if (string.IsNullOrEmpty(ServiceName)) - { - It's already set, continue to next step. - } - else - { - Update with the @ServiceName info -
{
-...
-@if (!string.IsNullOrEmpty(ParentSettingsParamName)) {
-  "@ParentSettingsParamName": {
-    "@ChildSettingsParamName": {
-      if (!string.IsNullOrEmpty(ServiceServer))
-      {
-      "server": "@ServiceServer",
-			}
-			if (!string.IsNullOrEmpty(ServiceHost))
-			{
-      "host": "@ServiceHost",
-			}
-			if (!string.IsNullOrEmpty(ServicePort))
-			{
-      "port": "@ServicePort",
-			}
-			if (!string.IsNullOrEmpty(ServiceUsername))
-			{
-      "username": "@ServiceUsername",
-			}
-			if (!string.IsNullOrEmpty(ServicePassword))
-			{
-      "password": "@ServicePassword",
-			}
-			if (!string.IsNullOrEmpty(ServiceDatabase))
-			{
-      "database": "@ServiceDatabase"
-			}
-
-    }
-  }
-}
-@if (!string.IsNullOrEmpty(SpringApplicationName)) {
-  "spring": {
-    "application": {
-      "name": "@SpringApplicationName"
-    }
-}
-@if (!string.IsNullOrEmpty(SpringServerUri)){
-,
-    "cloud": {
-      "config": {
-        "uri": "@SpringServerUri",
-        "validateCertificates": false
-      }
-    }
-}
-@if (!string.IsNullOrEmpty(SpringApplicationName)) {
-
-  },
-}
-@if(!string.IsNullOrEmpty(ZipkinEndpoint))
-{
-  "management": {
-    "tracing": {
-      "alwaysSample": true,
-      "useShortTraceIds ": true,
-      "exporter": {
-        "zipkin": {
-          "endpoint": "@(ZipkinEndpoint)",
-          "validateCertificates": false,
-          "useShortTraceIds ": true
-        }
-      }
-    }
-  },
-}
-@if(!string.IsNullOrEmpty(ManagementEndpointPath))
-{  "management": {
-    "endpoints": {
-      "path": "@ManagementEndpointPath",
-      "cloudfoundry": {
-        "validateCertificates": false
-      }
-    },
-    "metrics": {
-      "exporter": {
-        "cloudfoundry": {
-          "validateCertificates": false
-        }
-      }
-    }
-  }
-}
-@if(!string.IsNullOrEmpty(ShouldRegisterWithEureka))
-{
-  "eureka": {
-    "client": {
-		if (!string.IsNullOrEmpty(EurekaServerUrl))
-		{
-      "serviceUrl": "@EurekaServerUrl",
-		}
-		if (!string.IsNullOrEmpty(ShouldFetchEurekaRegistry))
-		{
-      "shouldFetchRegistry": "@ShouldFetchEurekaRegistry",
-		}
-      "shouldRegisterWithEureka": @ShouldRegisterWithEureka,
-      "validateCertificates": false
-    },
-    "instance": {
-		if (!string.IsNullOrEmpty(EurekaAppPort))
-		{
-      "port": "@EurekaAppPort",
-		}
-		if (!string.IsNullOrEmpty(EurekaAppIP))
-		{
-      "ipAddress": "@EurekaAppIP",
-		}
-		if (!string.IsNullOrEmpty(EurekaAppIP))
-		{
-      "preferIpAddress": true
-		}
-    }
-  }
-}
-@if(!string.IsNullOrEmpty(ConsulShouldRegister))
-{
-  "consul": {
-    "host": "@ConsulHostAddress",
-    "port": @ConsulHostPort,
-    "discovery": {
-      "enabled": true,
-      "register": @ConsulShouldRegister,
-		if (!string.IsNullOrEmpty(ConsulAppPort))
-		{
-      "port": "@ConsulAppPort",
-		}
-		if (!string.IsNullOrEmpty(ConsulAppIP))
-		{
-      "ipAddress": "@ConsulAppIP",
-		}
-		if (!string.IsNullOrEmpty(ConsulAppIP))
-		{
-      "preferIpAddress": true
-	  }
-    }
-  }
-}
-@if(!string.IsNullOrEmpty(OAuthClient)){
-  "security": {
-    "oauth2": {
-      "client": {
-        "validateCertificates": false,
-      }
-    }
-  }
-}
-@if(!string.IsNullOrEmpty(OpenIdClient)){
-	"security": {
-		"oauth2": {
-			"client": {
-				"validateCertificates": false,
-			@(string.IsNullOrEmpty(OpenIdAuthDomain) ? "" : "\"authDomain\": \"" + OpenIdAuthDomain + "\",")
-			@(string.IsNullOrEmpty(OpenIdClientId) ? "" : "\"clientId\": \"" + OpenIdClientId + "\",")
-			@(string.IsNullOrEmpty(OpenIdClientSecret) ? "" : "\"clientSecret\": \"" + OpenIdClientSecret + "\",")
-			}
-		}
-	}
-}
-...
-}
-} -@ChildContent -
- -@code { - [Parameter] - public string ServiceName { get; set; } = ""; - [Parameter] - public string SpringApplicationName { get; set; } = null; - [Parameter] - public string SpringServerUri { get; set; } = null; - [Parameter] - public string ZipkinEndpoint { get; set; } = null; - [Parameter] - public string ManagementEndpointPath { get; set; } = null; - [Parameter] - public string ShouldRegisterWithEureka { get; set; } = null; - [Parameter] - public string ConsulHostAddress { get; set; } = null; - [Parameter] - public string ConsulHostPort { get; set; } = null; - [Parameter] - public string ConsulShouldRegister { get; set; } = null; - [Parameter] - public string ConsulAppPort { get; set; } = null; - [Parameter] - public string ConsulAppIP { get; set; } = null; - [Parameter] - public string ProjectName { get; set; } = ""; - [Parameter] - public string ServiceServer { get; set; } = null; - [Parameter] - public string ServiceHost { get; set; } = null; - [Parameter] - public string ServicePort { get; set; } = null; - [Parameter] - public string ServiceUsername { get; set; } = null; - [Parameter] - public string ServicePassword { get; set; } = null; - [Parameter] - public string ServiceDatabase { get; set; } = null; - [Parameter] - public string ParentSettingsParamName { get; set; } = ""; - [Parameter] - public string ChildSettingsParamName { get; set; } = null; - [Parameter] - public string EurekaServerUrl { get; set; } = null; - [Parameter] - public string EurekaAppPort { get; set; } = null; - [Parameter] - public string ShouldFetchEurekaRegistry { get; set; } = null; - [Parameter] - public string EurekaAppIP { get; set; } = null; - [Parameter] - public string OAuthClient { get; set; } = null; - [Parameter] - public string OpenIdClient { get; set; } = null; - [Parameter] - public string OpenIdAuthDomain { get; set; } = null; - [Parameter] - public string OpenIdClientId { get; set; } = null; - [Parameter] - public string OpenIdClientSecret { get; set; } = null; - - [Parameter] - public RenderFragment ChildContent { get; set; } -} diff --git a/src/Client/Components/IISSettingsTab/Local.razor b/src/Client/Components/IISSettingsTab/Local.razor deleted file mode 100644 index 532cdde..0000000 --- a/src/Client/Components/IISSettingsTab/Local.razor +++ /dev/null @@ -1,19 +0,0 @@ - -
"iisSettings": {
-		"windowsAuthentication": false, 
-		"anonymousAuthentication": true, 
-		"iisExpress": {
-			"applicationUrl": "@(ApplicationUrl)",
-			"sslPort": 0
-		}
-	}
-@ChildContent -
- -@code { - - [Parameter] - public RenderFragment ChildContent { get; set; } - [Parameter] - public string ApplicationUrl { get; set; } = "http://localhost:8080"; -} \ No newline at end of file diff --git a/src/Client/Components/Layout/SiteFooter.razor b/src/Client/Components/Layout/SiteFooter.razor index 9b8e640..1b6dd82 100644 --- a/src/Client/Components/Layout/SiteFooter.razor +++ b/src/Client/Components/Layout/SiteFooter.razor @@ -1,175 +1,174 @@ -@using Microsoft.Extensions.Options - -@inject IOptionsSnapshot DocsSiteOptions - -
- -
- -@code { - - private DocsSiteOptions docsSite; - - protected override void OnInitialized() - { - docsSite = DocsSiteOptions?.Value ?? throw new ArgumentNullException(nameof(docsSite)); - } -} +@using Microsoft.Extensions.Options + +@inject IOptionsSnapshot DocsSiteOptions + +
+ +
+ +@code { + + private DocsSiteOptions _docsSite; + + protected override void OnInitialized() + { + _docsSite = DocsSiteOptions?.Value ?? throw new ArgumentNullException(nameof(_docsSite)); + } +} diff --git a/src/Client/Components/Layout/SiteHeader.razor b/src/Client/Components/Layout/SiteHeader.razor index 99580ec..f2612c0 100644 --- a/src/Client/Components/Layout/SiteHeader.razor +++ b/src/Client/Components/Layout/SiteHeader.razor @@ -1,76 +1,75 @@ -@using Microsoft.Extensions.Options - -@inject IOptions DocsSiteOptions - - - -@code { - private DocsSiteOptions _docsSite; - - protected override void OnInitialized() - { - _docsSite = DocsSiteOptions?.Value ?? throw new ArgumentNullException(nameof(_docsSite)); - } -} +@using Microsoft.Extensions.Options + +@inject IOptionsSnapshot DocsSiteOptions + + + +@code { + private DocsSiteOptions _docsSite; + + protected override void OnInitialized() + { + _docsSite = DocsSiteOptions?.Value ?? throw new ArgumentNullException(nameof(_docsSite)); + } +} diff --git a/src/Client/Components/Pages/Community.razor b/src/Client/Components/Pages/Community.razor index a11c0f1..5a4b2be 100644 --- a/src/Client/Components/Pages/Community.razor +++ b/src/Client/Components/Pages/Community.razor @@ -1,58 +1,51 @@ -@page "/community" - - - -@code{ -} +@page "/community" + + + +@code{ +} diff --git a/src/Client/Components/Pages/DynamicLogging/GettingStarted.razor b/src/Client/Components/Pages/DynamicLogging/GettingStarted.razor deleted file mode 100644 index d1e772a..0000000 --- a/src/Client/Components/Pages/DynamicLogging/GettingStarted.razor +++ /dev/null @@ -1,24 +0,0 @@ -@page "/logging/get-started" -@inject IHttpContextAccessor HttpContextAccessor -@inject IOptionsSnapshot DocsSiteOptions - - - Logging - -

This page has moved, find the new location here

-
-
- -@code -{ - protected override void OnInitialized() - { - if (HttpContextAccessor.HttpContext != null) - { - var uri = new Uri(DocsSiteOptions.Value.BaseAddress + "/guides/").ToString(); - HttpContextAccessor.HttpContext.Response.Redirect(uri, true); - } - } -} diff --git a/src/Client/Components/Pages/DynamicLogging/Index.razor b/src/Client/Components/Pages/DynamicLogging/Index.razor index b515818..999fbfa 100644 --- a/src/Client/Components/Pages/DynamicLogging/Index.razor +++ b/src/Client/Components/Pages/DynamicLogging/Index.razor @@ -1,38 +1,27 @@ -@page "/dynamic-logging" -@page "/steeltoe-logging" - - - -@code{ - private Feature[] features = new[] { - new Feature() { - Title = (MarkupString)"", - Description = (b => { - b.AddMarkupContent(1,""); - }), - Img = "" - } - }; -} \ No newline at end of file +@page "/logging/get-started" +@page "/dynamic-logging" +@page "/steeltoe-logging" + +@inject IHttpContextAccessor HttpContextAccessor +@inject IOptionsSnapshot DocsSiteOptions + + + Logging + +

This page has moved, find the new location here

+
+
+ +@code +{ + protected override void OnInitialized() + { + if (HttpContextAccessor.HttpContext != null) + { + var uri = new Uri(DocsSiteOptions.Value.DynamicLoggingHome).ToString(); + HttpContextAccessor.HttpContext.Response.Redirect(uri, true); + } + } +} diff --git a/src/Client/Components/Pages/Event-Driven.razor b/src/Client/Components/Pages/Event-Driven.razor index 67bae28..c198964 100644 --- a/src/Client/Components/Pages/Event-Driven.razor +++ b/src/Client/Components/Pages/Event-Driven.razor @@ -1,4 +1,4 @@ -@page "/event-driven" +@page "/event-driven"