Browse Source

Merge branch 'dev' into features/UpgradePackageVersions

pull/975/head
jmanuelcorral 5 years ago
parent
commit
f7d9fc9cde
22 changed files with 189 additions and 11 deletions
  1. +15
    -0
      build/azure-devops/apigws/azure-pipelines.yml
  2. +10
    -0
      build/azure-devops/basket-api/azure-pipelines.yml
  3. +10
    -0
      build/azure-devops/catalog-api/azure-pipelines.yml
  4. +10
    -0
      build/azure-devops/identity-api/azure-pipelines.yml
  5. +10
    -0
      build/azure-devops/location-api/azure-pipelines.yml
  6. +10
    -0
      build/azure-devops/marketing-api/azure-pipelines.yml
  7. +9
    -0
      build/azure-devops/mobile-shopping-agg/azure-pipelines.yml
  8. +12
    -0
      build/azure-devops/ordering-api/azure-pipelines.yml
  9. +10
    -0
      build/azure-devops/payment-api/azure-pipelines.yml
  10. +9
    -0
      build/azure-devops/web-shopping-agg/azure-pipelines.yml
  11. +10
    -0
      build/azure-devops/webhooks-api/azure-pipelines.yml
  12. +10
    -0
      build/azure-devops/webhooks-client/azure-pipelines.yml
  13. +10
    -0
      build/azure-devops/webmvc/azure-pipelines.yml
  14. +10
    -0
      build/azure-devops/webspa/azure-pipelines.yml
  15. +10
    -0
      build/azure-devops/webstatus/azure-pipelines.yml
  16. +12
    -4
      src/Web/WebhookClient/Pages/Index.cshtml
  17. +4
    -3
      src/Web/WebhookClient/Pages/RegisterWebhook.cshtml
  18. +3
    -1
      src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs
  19. +3
    -3
      src/Web/WebhookClient/Pages/Shared/_Layout.cshtml
  20. +12
    -0
      src/Web/WebhookClient/wwwroot/css/site.css
  21. BIN
      src/Web/WebhookClient/wwwroot/images/brand.png
  22. BIN
      src/Web/WebhookClient/wwwroot/images/main_banner.png

+ 15
- 0
build/azure-devops/apigws/azure-pipelines.yml View File

@ -2,6 +2,21 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/ApiGateways/*
- k8s/helm/apigwmm/*
- k8s/helm/apigwms/*
- k8s/helm/apigwwm/*
- k8s/helm/apigwws/*
exclude:
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build apigws displayName: Compose build apigws


+ 10
- 0
build/azure-devops/basket-api/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Services/Basket/*
- k8s/helm/basket-api/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build basket displayName: Compose build basket


+ 10
- 0
build/azure-devops/catalog-api/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Services/Catalog/*
- k8s/helm/catalog-api/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build catalog displayName: Compose build catalog


+ 10
- 0
build/azure-devops/identity-api/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Services/Identity/*
- k8s/helm/identity-api/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build identity displayName: Compose build identity


+ 10
- 0
build/azure-devops/location-api/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Services/Location/*
- k8s/helm/locations-api/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build locations displayName: Compose build locations


+ 10
- 0
build/azure-devops/marketing-api/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Services/Marketing/*
- k8s/helm/marketing-api/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build marketing displayName: Compose build marketing


+ 9
- 0
build/azure-devops/mobile-shopping-agg/azure-pipelines.yml View File

@ -2,6 +2,15 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
- k8s/helm/mobileshoppingagg/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build mobileshoppingagg displayName: Compose build mobileshoppingagg


+ 12
- 0
build/azure-devops/ordering-api/azure-pipelines.yml View File

@ -2,6 +2,18 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Services/Ordering/*
- k8s/helm/ordering-api/*
- k8s/helm/ordering-backgroundtasks/*
- k8s/helm/ordering-signalrhub/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build ordering displayName: Compose build ordering


+ 10
- 0
build/azure-devops/payment-api/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Services/Payment/*
- k8s/helm/payment-api/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build payment displayName: Compose build payment


+ 9
- 0
build/azure-devops/web-shopping-agg/azure-pipelines.yml View File

@ -2,6 +2,15 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
- k8s/helm/webshoppingagg/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build webshoppingagg displayName: Compose build webshoppingagg


+ 10
- 0
build/azure-devops/webhooks-api/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Services/Webhooks/*
- k8s/helm/webhooks-api/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build webhooks displayName: Compose build webhooks


+ 10
- 0
build/azure-devops/webhooks-client/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Web/WebhookClient/*
- k8s/helm/webhooks-web/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build webhooks.client displayName: Compose build webhooks.client


+ 10
- 0
build/azure-devops/webmvc/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Web/WebMVC/*
- k8s/helm/webmvc/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build webmvc displayName: Compose build webmvc


+ 10
- 0
build/azure-devops/webspa/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Web/WebSPA/*
- k8s/helm/webspa/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build webspa displayName: Compose build webspa


+ 10
- 0
build/azure-devops/webstatus/azure-pipelines.yml View File

@ -2,6 +2,16 @@ pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-16.04'
variables: variables:
registryEndpoint: eshop-registry registryEndpoint: eshop-registry
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/BuildingBlocks/*
- src/Web/WebStatus/*
- k8s/helm/webstatus/*
steps: steps:
- task: DockerCompose@0 - task: DockerCompose@0
displayName: Compose build webstatus displayName: Compose build webstatus


+ 12
- 4
src/Web/WebhookClient/Pages/Index.cshtml View File

@ -4,9 +4,17 @@
ViewData["Title"] = "Home page"; ViewData["Title"] = "Home page";
} }
<section class="esh-catalog-hero">
</section>
<div class="text-center"> <div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>eShopOnContainers - Webhook client</p>
<p>&nbsp;</p>
<img class="esh-app-footer-brand" src="~/images/brand.png" />
<h2>eShopOnContainers - Order Management</h2>
<p>
This is a <bold>sample</bold> web client that uses the Webhooks API to show you all orders that reached the "paid" status. This is accomplished by creating a Webhook
that will be called by eShopOnContainers core when the order reached this "paid" status. If not created you can create this webhook going to <a asp-page="RegisterWebhook">webhook registration</a>.
</p>
@if (!User.Identity.IsAuthenticated) @if (!User.Identity.IsAuthenticated)
{ {
<a class="btn-primary btn" href="@Url.Action("SignIn", "Account")">Login</a> <a class="btn-primary btn" href="@Url.Action("SignIn", "Account")">Login</a>
@ -15,8 +23,8 @@
</div> </div>
<div class="table"> <div class="table">
<h3>Current webhooks received</h3>
<p>(Data since last time web started up)<p>
<h3>Current webhooks received (orders paid)</h3>
<p>(Data since last time web started up). <strong>Note: </strong>Must manually refresh this page.<p>
<table class="table"> <table class="table">
@foreach (var webhook in Model.WebHooksReceived) @foreach (var webhook in Model.WebHooksReceived)
{ {


+ 4
- 3
src/Web/WebhookClient/Pages/RegisterWebhook.cshtml View File

@ -4,9 +4,9 @@
ViewData["Title"] = "RegisterWebhook"; ViewData["Title"] = "RegisterWebhook";
} }
<h3>Register webhook</h3>
<h3>Register a new webhook</h3>
<p>This page registers the "OrderPaid" Webhook by sending a POST to webhooks.</p>
<p>This page registers the "OrderPaid" Webhook by sending a POST to the WebHooks API. Once the Webhook is set, you will be able to see new paid orders from the <a asp-page="Index">Index</a> page.</p>
<form method="post"> <form method="post">
<p>Token: <input type="text" asp-for="Token" /></p> <p>Token: <input type="text" asp-for="Token" /></p>
@ -15,5 +15,6 @@
@if (Model.ResponseCode != (int)System.Net.HttpStatusCode.OK) @if (Model.ResponseCode != (int)System.Net.HttpStatusCode.OK)
{ {
<p>Error @Model.ResponseCode (@Model.ResponseMessage) when calling the Webhooks API (@Model.RequestUrl) with GrantUrl: @Model.GrantUrl):(</p>
<p>Error @Model.ResponseCode (@Model.ResponseMessage) when calling the Webhooks API (@Model.RequestUrl) with GrantUrl: @Model.GrantUrl)</p>
<p>Data sent to the webhooks API was <raw>@Model.RequestBodyJson</raw></p>
} }

+ 3
- 1
src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs View File

@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using WebhookClient.Models; using WebhookClient.Models;
namespace WebhookClient.Pages namespace WebhookClient.Pages
@ -27,7 +28,7 @@ namespace WebhookClient.Pages
public string RequestUrl { get; set; } public string RequestUrl { get; set; }
public string GrantUrl { get; set; } public string GrantUrl { get; set; }
public string ResponseMessage { get; set; } public string ResponseMessage { get; set; }
public string RequestBodyJson { get; set; }
public RegisterWebhookModel(IOptions<Settings> settings, IHttpClientFactory httpClientFactory) public RegisterWebhookModel(IOptions<Settings> settings, IHttpClientFactory httpClientFactory)
{ {
@ -69,6 +70,7 @@ namespace WebhookClient.Pages
} }
else else
{ {
RequestBodyJson = JsonConvert.SerializeObject(payload);
ResponseCode = (int)response.StatusCode; ResponseCode = (int)response.StatusCode;
ResponseMessage = response.ReasonPhrase; ResponseMessage = response.ReasonPhrase;
GrantUrl = granturl; GrantUrl = granturl;


+ 3
- 3
src/Web/WebhookClient/Pages/Shared/_Layout.cshtml View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - WebhookClient</title>
<title>@ViewData["Title"] - Order Management</title>
<environment include="Development"> <environment include="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" /> <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
@ -21,7 +21,7 @@
<header> <header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"> <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container"> <div class="container">
<a class="navbar-brand" asp-area="" asp-page="/Index">WebhookClient</a>
<a class="navbar-brand" asp-area="" asp-page="/Index">Order Management</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent" <button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation"> aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
@ -50,7 +50,7 @@
<footer class="border-top footer text-muted"> <footer class="border-top footer text-muted">
<div class="container"> <div class="container">
&copy; 2019 - WebhookClient - <a asp-area="" asp-page="/RegisterWebhook">Register Webhook</a> | <a asp-area="" asp-page="/WebhooksList">Webhooks registered in API</a>
&copy; 2019 - Order Management - <a asp-area="" asp-page="/RegisterWebhook">Register Webhook</a> | <a asp-area="" asp-page="/WebhooksList">Webhooks registered in API</a>
</div> </div>
</footer> </footer>


+ 12
- 0
src/Web/WebhookClient/wwwroot/css/site.css View File

@ -54,3 +54,15 @@ body {
height: 60px; height: 60px;
line-height: 60px; /* Vertically center the text there */ line-height: 60px; /* Vertically center the text there */
} }
.esh-catalog-hero {
background-image: url("../images/main_banner.png");
background-size: cover;
height: 260px;
width: 100%;
}
.esh-app-footer-brand {
height: 50px;
width: 230px;
}

BIN
src/Web/WebhookClient/wwwroot/images/brand.png View File

Before After
Width: 201  |  Height: 44  |  Size: 3.9 KiB

BIN
src/Web/WebhookClient/wwwroot/images/main_banner.png View File

Before After
Width: 1920  |  Height: 258  |  Size: 851 KiB

Loading…
Cancel
Save