Skip to content

Commit

Permalink
fix(provider/cf): handle different success/error cases to display che…
Browse files Browse the repository at this point in the history
…cksum
  • Loading branch information
Jammy Louie authored and jkschneider committed Nov 12, 2018
1 parent 5413003 commit c8cb9da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ export interface ICloudFoundryDroplet {
space: ICloudFoundrySpace;
stack: string;
buildpacks: ICloudFoundryBuildpack[];
sourcePackage: ICloudFoundryPackage;
packageChecksum: string;
sourcePackage?: ICloudFoundryPackage;
}

export interface ICloudFoundryBuildpack {
Expand All @@ -18,5 +17,6 @@ export interface ICloudFoundryBuildpack {
}

export interface ICloudFoundryPackage {
checksum: string;
downloadUrl: string;
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { IServerGroup } from '@spinnaker/core';

import { ICloudFoundrySpace, ICloudFoundryDroplet } from 'cloudfoundry/domain';
import { ICloudFoundryInstance } from 'cloudfoundry/domain/ICloudFoundryInstance';

export interface ICloudFoundryServerGroup extends IServerGroup {
appsManagerUri: string;
memory: number;
diskQuota: number;
state: 'STARTED' | 'STOPPED';
instances: ICloudFoundryInstance[];
space: ICloudFoundrySpace;
droplet: ICloudFoundryDroplet;
droplet?: ICloudFoundryDroplet;
serviceInstances: ICloudFoundryServiceInstance[];
env: ICloudFoundryEnvVar[];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,15 @@ export class CloudFoundryInfoDetailsSection extends React.Component<ICloudFoundr
<dd>{serverGroup.memory}</dd>
</dl>
</CollapsibleSection>
<CollapsibleSection heading="Package" defaultExpanded={true}>
<dl className="dl-horizontal dl-flex">
<dt>Checksum</dt>
<dd>{serverGroup.droplet.packageChecksum}</dd>
</dl>
</CollapsibleSection>
{serverGroup.droplet &&
serverGroup.droplet.sourcePackage && (
<CollapsibleSection heading="Package" defaultExpanded={true}>
<dl className="dl-horizontal dl-flex">
<dt>Checksum</dt>
<dd>{serverGroup.droplet.sourcePackage.checksum}</dd>
</dl>
</CollapsibleSection>
)}
{!isEmpty(serverGroup.serviceInstances) && (
<CollapsibleSection heading="Bound Services" defaultExpanded={true}>
<dl className="dl-horizontal dl-flex">
Expand Down

0 comments on commit c8cb9da

Please sign in to comment.