-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP: Add selector and info display for availability zones * further attempts at getting the availability zone to post * Push for Spencer * default the availability zone in the hosting environment card itself * Remove commented out code that didn't work * Update hosting env snapshot * add support to pull version manifest without token. remove ability to fetch and engagement by customer / project in path. * feature map availability zone * remove console.log Co-authored-by: Jacob See <[email protected]>
- Loading branch information
Showing
22 changed files
with
125 additions
and
74 deletions.
There are no files selected for viewing
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
44 changes: 44 additions & 0 deletions
44
src/components/engagement_data_cards/hosting_environment_card/availability_zone_tooltip.tsx
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,44 @@ | ||
import React from 'react'; | ||
import { InfoCircleIcon } from '@patternfly/react-icons'; | ||
import { Tooltip, TooltipPosition } from '@patternfly/react-core'; | ||
import { EngagementFormConfig } from '../../../schemas/engagement_config'; | ||
import { useEngagement } from '../../../context/engagement_context/engagement_hook'; | ||
|
||
export function AvailabilityZoneTooltip() { | ||
const { engagementFormConfig } = useEngagement(); | ||
|
||
function createTooltipText(engagementFormConfig: EngagementFormConfig) { | ||
let text = [<div key={'tooltipText'} />]; | ||
(engagementFormConfig?.cloud_options?.availability_zones?.options ?? []).map( | ||
(option: any, index: number) => { | ||
return text.push(<div key={index}>{descriptionText(option)}</div>); | ||
} | ||
); | ||
return text; | ||
} | ||
|
||
function descriptionText(option?: any) { | ||
return ( | ||
<> | ||
<b style={{ color: '#73BCF7' }}> {option.label} </b> | ||
<br /> {option.description} | ||
<br /> | ||
</> | ||
); | ||
} | ||
|
||
return ( | ||
<> | ||
<Tooltip | ||
content={createTooltipText(engagementFormConfig)} | ||
entryDelay={0} | ||
exitDelay={10} | ||
maxWidth={'45rem'} | ||
isContentLeftAligned={true} | ||
position={TooltipPosition.top} | ||
> | ||
<InfoCircleIcon style={{ fontSize: 'small', marginLeft: '1rem' }} /> | ||
</Tooltip> | ||
</> | ||
); | ||
} |
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
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
Oops, something went wrong.