├── src
├── requests-frontend
│ ├── .gitignore
│ ├── Shared
│ │ ├── MainLayout.razor
│ │ ├── FetchSummaryRequests.razor
│ │ └── NewSummaryRequest.razor
│ ├── wwwroot
│ │ ├── favicon.png
│ │ └── css
│ │ │ └── site.css
│ ├── appsettings.json
│ ├── appsettings.Development.json
│ ├── Pages
│ │ ├── Index.razor
│ │ ├── Error.cshtml.cs
│ │ ├── _Host.cshtml
│ │ └── Error.cshtml
│ ├── Frontend.csproj
│ ├── App.razor
│ ├── _Imports.razor
│ ├── Dockerfile
│ ├── Properties
│ │ └── launchSettings.json
│ ├── Data
│ │ ├── SummaryRequest.cs
│ │ ├── AppSettings.cs
│ │ └── SummaryRequestService.cs
│ └── Program.cs
├── requests-api
│ ├── requirements.txt
│ ├── Dockerfile
│ ├── settings.py
│ ├── request_entities.py
│ ├── app.py
│ └── request_state.py
├── requests-processor
│ ├── requirements.txt
│ ├── Dockerfile
│ ├── app.py
│ ├── request_entities.py
│ ├── request_handler.py
│ └── settings.py
└── job
│ ├── Dockerfile
│ ├── Cargo.toml
│ └── src
│ └── main.rs
├── docs
├── .gitignore
├── assets
│ └── images
│ │ ├── aca-banner.png
│ │ ├── summarizer-web.png
│ │ ├── summarizer-assets.png
│ │ └── summarizer-dapr-aca.png
├── lab
│ ├── 2-dapr-components
│ │ ├── images
│ │ │ ├── queue.png
│ │ │ ├── dapr-local.png
│ │ │ ├── redis-keys.png
│ │ │ ├── blazor-summary.png
│ │ │ └── dapr-overview.png
│ │ ├── index.md
│ │ ├── 2-2-summarizer-overview.md
│ │ ├── 2-1-dapr-overview.md
│ │ ├── 2-5-requests-processor.md
│ │ ├── 2-4-blazor-app.md
│ │ └── 2-3-requests-api.md
│ ├── 1-get-ready
│ │ ├── images
│ │ │ ├── open-codespaces-1.png
│ │ │ ├── open-codespaces-2.png
│ │ │ ├── open-codespaces-3.png
│ │ │ ├── open-codespaces-4.png
│ │ │ └── open-codespaces-5.png
│ │ ├── index.md
│ │ ├── 1-1-prerequisites.md
│ │ ├── 1-2-codespaces.md
│ │ └── 1-3-connectivity.md
│ ├── 3-container-apps
│ │ ├── images
│ │ │ ├── aca-components.jpg
│ │ │ ├── aca-provisioned.png
│ │ │ ├── container-apps.png
│ │ │ ├── aca-example-scenarios.png
│ │ │ └── request-processor-logs.png
│ │ ├── index.md
│ │ ├── 3-2-aca-deployment.md
│ │ ├── 3-1-aca-overview.md
│ │ └── 3-3-apps-deployment.md
│ └── 4-learn-more
│ │ └── index.md
├── _sass
│ └── color_schemes
│ │ └── lab.scss
├── 404.html
├── _includes
│ └── text-expand.html
├── Gemfile
├── _layouts
│ └── default.html
├── index.markdown
├── _config.yml
└── Gemfile.lock
├── dapr
├── summarizer-secrets-sample.json
├── local
│ └── components
│ │ ├── summarizer-pubsub.yaml
│ │ ├── summarizer-secretstore.yaml
│ │ ├── summarizer-smtp.yaml
│ │ └── summarizer-statestore.yaml
└── azure
│ └── components
│ └── summarizer-statestore-cosmos.yaml
├── .gitignore
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── suggestion_report.md
└── workflows
│ ├── brokenlinks.yml
│ └── jekyll-gh-pages.yml
├── infra
├── modules
│ ├── infra
│ │ ├── service-bus.bicep
│ │ ├── openai.bicep
│ │ ├── webmail.bicep
│ │ ├── cosmos-db.bicep
│ │ ├── container-registry.bicep
│ │ ├── container-apps-env.bicep
│ │ └── keyvault.bicep
│ ├── dapr
│ │ ├── smtp.bicep
│ │ ├── pubsub.bicep
│ │ ├── secretstore.bicep
│ │ └── statestore.bicep
│ └── apps
│ │ ├── requests-api.bicep
│ │ ├── requests-frontend.bicep
│ │ └── requests-processor.bicep
├── setup.sh
├── naming-rules.json
├── apps.bicep
└── infra.bicep
├── .devcontainer
├── on-setup.sh
└── devcontainer.json
├── dapr.yaml
└── README.md
/src/requests-frontend/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | _site
2 | .sass-cache
3 | .jekyll-cache
4 | .jekyll-metadata
5 | vendor
6 |
--------------------------------------------------------------------------------
/src/requests-frontend/Shared/MainLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 |
Sorry, there's nothing at this address.
9 |Page not found :(
24 |The requested page could not be found.
25 |Loading...
12 | } 13 | else 14 | { 15 | @foreach (var request in requests) 16 | { 17 |@request.Summary
20 |
23 | Request ID: @Model.RequestId
24 |
29 | Swapping to the Development environment displays detailed information about the error that occurred. 30 |
31 |32 | The Development environment shouldn't be enabled for deployed applications. 33 | It can result in displaying sensitive information from exceptions to end users. 34 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 35 | and restarting the app. 36 |
37 |Hi,
118 |Here is the summary for the article you requested:
119 | 120 |{summary}
121 |Thanks for using our service!
122 | 123 | 124 | """.format(url=request.get_url(), summary=request.get_summary()) 125 | 126 | self.dapr_client.invoke_binding( 127 | binding_name=self.settings.binding_smtp, 128 | operation='create', 129 | data=json.dumps(email_contents), 130 | binding_metadata={ 131 | "emailTo": request.get_email(), 132 | "subject": f"🎉 New Summary for {request.get_url()}!" 133 | } 134 | ) -------------------------------------------------------------------------------- /docs/lab/2-dapr-components/2-5-requests-processor.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Requests Processor 3 | parent: Implement Dapr Components 4 | has_children: false 5 | permalink: /lab2/requests-processor 6 | nav_order: 4 7 | --- 8 | 9 | # Requests Processor 10 | 11 | {: .no_toc } 12 | 13 |Hi,
195 |Here is the summary for the article you requested:
196 | 197 |{summary}
198 |Thanks for using our service!
199 | 200 | 201 | """.format(url=request.get_url(), summary=request.get_summary()) 202 | self.dapr_client.invoke_binding( 203 | binding_name=self.settings.binding_smtp, 204 | operation='create', 205 | data=json.dumps(email_contents), 206 | binding_metadata={ 207 | "emailTo": request.get_email(), 208 | "subject": f"🎉 New Summary for {request.get_url()}!" 209 | } 210 | ) 211 | ``` 212 | {% endraw %} 213 |