Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add multiple function support #1919

Open
wants to merge 1 commit into
base: feature/lambdatesttool-v2
Choose a base branch
from

Conversation

philasmar
Copy link
Contributor

Issue #, if available:
DOTNET-7864

Description of changes:

  • Added a drop down that displays the default function as well as any other registered lambda functions.
  • Switching the Lambda function also switches the underlying DataStore which updates the entire UI accordingly.
  • Updated the Events Modal and leveraged bootstrap instead of a 3rd party library (Blazored.Modal)
  • Added other UI updates to enhance the user experience

No function registered or default function registered:
image

Multiple functions registered:
image

Active event UI update:
image

History/Queued events list UI update:
image

Event modal UI update:
image

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

<div class="d-flex align-items-center mb-2">
<h3 class="me-auto">Lambda Function Tester</h3>
<div class="form-floating @(_availableLambdaFunctions.Count <= 1 ? "d-none" : "")" style="min-width: 300px;">
<select class="form-select" id="selectedFunctionName" @bind="SelectedFunctionName">
Copy link

@gcbeattyAWS gcbeattyAWS Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No function registered or default function registered - in this case for default function registered - Is the picture in the PR for this correct? Based on the code it seems like it will still show the drop down with "default lambda" as the value, which i think should be the correct behavior. But i just wanted to double check.

For no function registered - wondering if we should still show the dropdown menu, but then have an error/message saying a function needs to be registered or something to let the user know?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally, having the default function registered or no function registered, they are the same from a UI perspective. I don't want to show the dropdown because it serves no purpose. I want it to behave similar to how the old test tool behaves. As soon as another function is registered, the drop down will pop-up and allow the users to switch. In the code, @(_availableLambdaFunctions.Count <= 1 ? "d-none" : "") the drop down will disappear if _availableLambdaFunctions has 1 function or less. This is the default case, since at least the default function will always get registered.

Copy link
Member

@normj normj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tool is looking really good. My approval is from a basic scan and running the tool. I can do a deeper review of the tool's current state when I get back but don't want you to be held up while people are out of the office.

One thing I am noticing but not necessary caused by this change but if you run the tool outside of an environment like an IDE that has the environment variable ASPNETCORE_ENVIRONMENT set to Development I get errors running the tool. Basically if I do dotnet run in the project directory I get errors.

@philasmar
Copy link
Contributor Author

Tool is looking really good. My approval is from a basic scan and running the tool. I can do a deeper review of the tool's current state when I get back but don't want you to be held up while people are out of the office.

One thing I am noticing but not necessary caused by this change but if you run the tool outside of an environment like an IDE that has the environment variable ASPNETCORE_ENVIRONMENT set to Development I get errors running the tool. Basically if I do dotnet run in the project directory I get errors.

Yes I have noticed this behavior when ASPNETCORE_ENVIRONMENT is not set. This is unrelated to my change and has been there since we started working on the tool, but I was planning on looking into it separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants