Skip to content

Fix displaying Logic Apps as Function Apps#332

Merged
alexweininger merged 4 commits intomainfrom
alex/logicapps
Jul 13, 2022
Merged

Fix displaying Logic Apps as Function Apps#332
alexweininger merged 4 commits intomainfrom
alex/logicapps

Conversation

@alexweininger
Copy link
Copy Markdown
Member

Fixes #246

  • Adds logic app icon and display name
  • Won't show up in App Service or Functions resource type groups

@alexweininger alexweininger requested a review from a team as a code owner July 12, 2022 21:37
Comment thread src/utils/azureUtils.ts Outdated
}

export function isAppServiceApp(resource: GenericResource): boolean {
return !isFunctionApp(resource) && !isLogicApp(resource);
Copy link
Copy Markdown
Contributor

@bwateratmsft bwateratmsft Jul 13, 2022

Choose a reason for hiding this comment

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

This should include a resource type check, or else it would return true for everything that is not a function or logic app (e.g., true for a storage account).

Something like:

Suggested change
return !isFunctionApp(resource) && !isLogicApp(resource);
return resource.type.toLowerCase() === 'microsoft.web/sites' &&
!isFunctionApp(resource) &&
!isLogicApp(resource);

Also, doesn't need to be in this PR but it's increasingly clear we need to define our own resource type enumeration--which has separate entries for App Service, Functions, and Logic Apps--and have a single function in utils (or azureutils?) to normalize GenericResource -> that type. Then we can stop needing all these toLowerCase() and type/kind checks all over.

Comment thread src/utils/azureUtils.ts Outdated
alexweininger and others added 2 commits July 13, 2022 11:06
Co-authored-by: Brandon Waterloo [MSFT] <36966225+bwateratmsft@users.noreply.github.com>
@alexweininger alexweininger merged commit 79882b7 into main Jul 13, 2022
@alexweininger alexweininger deleted the alex/logicapps branch July 13, 2022 18:18
@microsoft microsoft locked and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion] Show Logic Apps using Logic App Icon rather than Function App Icon

2 participants