Skip to content

Commit

Permalink
fix(amazon/instance): Show instance type for amazon (#8592)
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyhebebrand committed Sep 24, 2020
1 parent 65dd935 commit 4a4285a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Expand Up @@ -21,6 +21,7 @@ export const AmazonInstanceInformation = ({ instance }: IAmazonInstanceInformati
provider={instance.provider}
region={instance.region}
serverGroup={instance.serverGroup}
showInstanceType={true}
/>
{serverGroup && <LabeledValue label="VPC" value={<VpcTag vpcId={vpcId} />} />}
{subnetId && <LabeledValue label="Subnet" value={<SubnetTag subnetId={subnetId} />} />}
Expand Down
Expand Up @@ -22,6 +22,7 @@ describe('InstanceInformation', () => {
provider={testInstance.provider}
region={testInstance.region}
serverGroup={testInstance.serverGroup}
showInstanceType={true}
/>,
);

Expand All @@ -43,6 +44,7 @@ describe('InstanceInformation', () => {
provider={testInstance.provider}
region={testInstance.region}
serverGroup={undefined}
showInstanceType={true}
/>,
);

Expand Down
Expand Up @@ -7,12 +7,12 @@ import { AccountTag, LabeledValue, timestamp } from '@spinnaker/core';
export interface IInstanceInformationProps {
account: string;
availabilityZone: string;
customInfo?: React.Component;
instanceType: string;
launchTime: number;
provider: string;
region: string;
serverGroup: string;
showInstanceType?: boolean;
}

export const InstanceInformation = ({
Expand All @@ -23,6 +23,7 @@ export const InstanceInformation = ({
provider,
region,
serverGroup,
showInstanceType,
}: IInstanceInformationProps) => (
<>
<LabeledValue label="Launched" value={launchTime ? timestamp(launchTime) : 'Unknown'} />
Expand All @@ -35,7 +36,7 @@ export const InstanceInformation = ({
</div>
}
/>
<LabeledValue label="Type" value={instanceType || 'Unknown'} />
{showInstanceType && <LabeledValue label="Type" value={instanceType || 'Unknown'} />}
{serverGroup && (
<LabeledValue
label="Server Group"
Expand Down

0 comments on commit 4a4285a

Please sign in to comment.