-
Notifications
You must be signed in to change notification settings - Fork 902
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(aws): Fixing bugs related to clone CX when instance types are inc…
…ompatible with image/region (#9901) * fix(aws): Fixing bugs related to clone UX when instance types are incompatible with image/region Displaying warnings when incompatible instance types are removed spinnaker/spinnaker#6734 * fix(aws): PR feedback Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit d7290c4)
- Loading branch information
1 parent
c3ea5bc
commit 57a73f4
Showing
10 changed files
with
177 additions
and
48 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
44 changes: 44 additions & 0 deletions
44
packages/amazon/src/serverGroup/configure/wizard/instanceType/InstanceTypeWarning.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 type { IAmazonServerGroupCommandDirty } from '../../serverGroupConfiguration.service'; | ||
|
||
export function InstanceTypeWarning(props: { dirty: IAmazonServerGroupCommandDirty; clearWarnings: () => void }) { | ||
if ( | ||
props.dirty.instanceType || | ||
(props.dirty.launchTemplateOverridesForInstanceType && | ||
props.dirty.launchTemplateOverridesForInstanceType.length > 0) | ||
) { | ||
return ( | ||
<div className="col-md-12"> | ||
<div className="alert alert-warning"> | ||
<p> | ||
<i className="fa fa-exclamation-triangle" /> | ||
{props.dirty.instanceType && | ||
'The following instance type was found incompatible with the selected image/region and was removed:'} | ||
{props.dirty.launchTemplateOverridesForInstanceType && | ||
props.dirty.launchTemplateOverridesForInstanceType.length > 0 && | ||
'The following instance type(s) were found incompatible with the selected image/region and were removed:'} | ||
</p> | ||
<ul> | ||
{props.dirty.instanceType && <li key={props.dirty.instanceType}>{props.dirty.instanceType}</li>} | ||
{props.dirty.launchTemplateOverridesForInstanceType && | ||
props.dirty.launchTemplateOverridesForInstanceType.length > 0 && | ||
props.dirty.launchTemplateOverridesForInstanceType.map((it) => ( | ||
<li key={it.instanceType}> | ||
{it.instanceType} | ||
{it.weightedCapacity ? ' with weight ' + it.weightedCapacity : ''} | ||
</li> | ||
))} | ||
</ul> | ||
<p className="text-right"> | ||
<a className="btn btn-sm btn-default dirty-flag-dismiss clickable" onClick={() => props.clearWarnings()}> | ||
Okay | ||
</a> | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
} else { | ||
return null; | ||
} | ||
} |
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.