-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: now using keyed services (#168)
* feat: changed header logo to go to self-assessment (#153) Co-authored-by: Tom Whittington <[email protected]> * Fix/bleeding links (#154) * fix: feedback link fixed * Fix: Fixed bleeding links --------- Co-authored-by: Tom Whittington <[email protected]> * fix: added missing span from feedback banner * chore: Simplify hiding js-only elements * feature: setup to use plantechs head and cookies when ran with it (#156) * feature: setup to use plantechs head and cookies when ran with it * fix: added a title to the gtm iframe * chore: using index reference rather than .First --------- Co-authored-by: Tom Whittington <[email protected]> * docs: added basic readme file (#160) * docs: added basic readme file * docs: added testing instruction to README.md --------- Co-authored-by: Tom Whittington <[email protected]> * Fix: fixed contentful fail on first attempt (#159) * Using plantech contentful connection * chore: cleaned up contentful reshuffle --------- Co-authored-by: Tom Whittington <[email protected]> * feat: vertical navigation changes (#161) * feat: made urls use new slug value instead of internal name * chore: cleanedup lint issues * chore: linter issue * fix: updated tests for slug change * fix: updated tests for slug change * feat: now uses csPage heading when no page available or when new useParentHero option is selected in contentful * feat: added unsupported element when item type isn't recognised * Removed tests for removed endpoints * Update src/Dfe.ContentSupport.Web/Views/Shared/_VerticalNavigation.cshtml Co-authored-by: jimwashbrook <[email protected]> * chore: fixed formatting in test * chore: removed redundant case * changes method back to not static and removed Privacy.cshtml --------- Co-authored-by: Tom Whittington <[email protected]> Co-authored-by: jimwashbrook <[email protected]> * remove unnused variables from cypress config * "Bits and Bats". Required changes for plantech integration (#158) (#165) * feat: changed header logo to go to self-assessment (#153) * Fix/bleeding links (#154) * fix: feedback link fixed * Fix: Fixed bleeding links --------- * fix: added missing span from feedback banner * feature: setup to use plantechs head and cookies when ran with it (#156) * feature: setup to use plantechs head and cookies when ran with it * fix: added a title to the gtm iframe * chore: using index reference rather than .First --------- --------- Co-authored-by: jimwashbrook <[email protected]> Co-authored-by: Tom Whittington <[email protected]> * Feat: now using keyed services (#167) * Feat: now using keyed services * chore: ran cleanup on new code --------- Co-authored-by: Tom Whittington <[email protected]> --------- Co-authored-by: Tom Whittington <[email protected]> Co-authored-by: katie-gardner-AND <[email protected]> Co-authored-by: jimwashbrook <[email protected]> Co-authored-by: jack.coggin <[email protected]> Co-authored-by: Katie Gardner <[email protected]> Co-authored-by: jack-coggin <[email protected]>
- Loading branch information
1 parent
8886e15
commit fa97efa
Showing
12 changed files
with
185 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/Dfe.ContentSupport.Web/Extensions/CsHttpClientPolicyExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Net; | ||
using Polly; | ||
using Polly.Extensions.Http; | ||
|
||
namespace Dfe.ContentSupport.Web.Extensions; | ||
|
||
public static class CsHttpClientPolicyExtensions | ||
{ | ||
public static void AddRetryPolicy(IHttpClientBuilder builder) | ||
{ | ||
builder | ||
.SetHandlerLifetime(TimeSpan.FromMinutes(5)) | ||
.AddPolicyHandler(GetRetryPolicy()); | ||
} | ||
|
||
public static IAsyncPolicy<HttpResponseMessage> GetRetryPolicy() | ||
{ | ||
return HttpPolicyExtensions.HandleTransientHttpError() | ||
.OrResult(msg => msg.StatusCode == HttpStatusCode.NotFound) | ||
.WaitAndRetryAsync(6, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.