-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] Azure or other cloud Resources (#288)
- Loading branch information
Showing
11 changed files
with
257 additions
and
185 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import OpenInNewIcon from '@mui/icons-material/OpenInNew' | ||
import { Button, ButtonProps, ButtonTypeMap } from '@mui/material' | ||
import { ElementType } from 'react' | ||
|
||
type ExternalLinkButtonProps<RootComponent extends ElementType, AdditionalProps> = ButtonProps<RootComponent, AdditionalProps> & { | ||
href: string | ||
} | ||
|
||
export function ExternalLinkButton<RootComponent extends ElementType = ButtonTypeMap['defaultComponent'], AdditionalProps = unknown>({ | ||
href, | ||
children, | ||
...props | ||
}: ExternalLinkButtonProps<RootComponent, AdditionalProps>) { | ||
return ( | ||
<Button href={href} target="_blank" rel="noopener noreferrer" endIcon={<OpenInNewIcon fontSize="small" />} {...props}> | ||
{children || href} | ||
</Button> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { ExternalLinkButton } from './ExternalLinkButton' | ||
export { ExternalLinkLoadingButton } from './ExternalLinkLoadingButton' | ||
export { InternalLink } from './InternalLink' | ||
export { InternalLinkButton } from './InternalLinkButton' |
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,16 @@ | ||
import { AccountCloud } from 'src/shared/types/server-shared' | ||
|
||
export const getAccountCloudName = (cloud: AccountCloud) => { | ||
switch (cloud.toLowerCase()) { | ||
case 'aws': | ||
return 'AWS' | ||
case 'azure': | ||
return 'Azure' | ||
case 'fix': | ||
return 'FIX' | ||
case 'gcp': | ||
return 'GCP' | ||
default: | ||
return cloud | ||
} | ||
} |