forked from spinnaker/deck
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cf): Share / unshare execution details (spinnaker#6710)
spinnaker/spinnaker#4135 Co-Authored-By: Stu Pollock <spollock@pivotal.io>
- Loading branch information
1 parent
8c4104f
commit b4ca2b8
Showing
5 changed files
with
114 additions
and
4 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
57 changes: 57 additions & 0 deletions
57
...loudfoundry/src/presentation/pipeline/stages/CloudfoundryShareServiceExecutionDetails.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,57 @@ | ||
import * as React from 'react'; | ||
import { get } from 'lodash'; | ||
|
||
import { | ||
AccountTag, | ||
ExecutionDetailsSection, | ||
IExecutionDetailsSectionProps, | ||
StageExecutionLogs, | ||
StageFailureMessage, | ||
} from '@spinnaker/core'; | ||
|
||
export function CloudfoundryShareServiceExecutionDetails(props: IExecutionDetailsSectionProps) { | ||
const { stage } = props; | ||
const { context } = stage; | ||
const account = get(context, 'service.account', undefined); | ||
const region = get(context, 'service.region', undefined); | ||
const serviceInstanceName = get(context, 'serviceInstanceName', undefined); | ||
const shareToRegions = get(context, 'shareToRegions', undefined); | ||
return ( | ||
<ExecutionDetailsSection name={props.name} current={props.current}> | ||
<div className="step-section-details"> | ||
<div className="row"> | ||
<div className="col-md-12"> | ||
<dl className="dl-horizontal"> | ||
<dt>Account</dt> | ||
<dd> | ||
<AccountTag account={account} /> | ||
</dd> | ||
<dt>Region</dt> | ||
<dd> | ||
{region} | ||
<br /> | ||
</dd> | ||
<dt>Service Instance Name</dt> | ||
<dd> | ||
{serviceInstanceName} | ||
<br /> | ||
</dd> | ||
<dt>Sharing Regions</dt> | ||
<dd> | ||
{shareToRegions.join(', ')} | ||
<br /> | ||
</dd> | ||
</dl> | ||
</div> | ||
</div> | ||
</div> | ||
<StageFailureMessage stage={stage} message={stage.failureMessage} /> | ||
<StageExecutionLogs stage={stage} /> | ||
</ExecutionDetailsSection> | ||
); | ||
} | ||
|
||
// eslint-disable-next-line | ||
export namespace CloudfoundryShareServiceExecutionDetails { | ||
export const title = 'cloudfoundryShareServiceConfig'; | ||
} |
51 changes: 51 additions & 0 deletions
51
...udfoundry/src/presentation/pipeline/stages/CloudfoundryUnshareServiceExecutionDetails.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,51 @@ | ||
import * as React from 'react'; | ||
import { get } from 'lodash'; | ||
|
||
import { | ||
AccountTag, | ||
ExecutionDetailsSection, | ||
IExecutionDetailsSectionProps, | ||
StageExecutionLogs, | ||
StageFailureMessage, | ||
} from '@spinnaker/core'; | ||
|
||
export function CloudfoundryUnshareServiceExecutionDetails(props: IExecutionDetailsSectionProps) { | ||
const { stage } = props; | ||
const { context } = stage; | ||
const account = get(context, 'service.account', undefined); | ||
const serviceInstanceName = get(context, 'serviceInstanceName', undefined); | ||
const unshareFromRegions = get(context, 'unshareFromRegions', undefined); | ||
return ( | ||
<ExecutionDetailsSection name={props.name} current={props.current}> | ||
<div className="step-section-details"> | ||
<div className="row"> | ||
<div className="col-md-12"> | ||
<dl className="dl-horizontal"> | ||
<dt>Account</dt> | ||
<dd> | ||
<AccountTag account={account} /> | ||
</dd> | ||
<dt>Service Instance Name</dt> | ||
<dd> | ||
{serviceInstanceName} | ||
<br /> | ||
</dd> | ||
<dt>Unsharing Regions</dt> | ||
<dd> | ||
{unshareFromRegions.join(', ')} | ||
<br /> | ||
</dd> | ||
</dl> | ||
</div> | ||
</div> | ||
</div> | ||
<StageFailureMessage stage={stage} message={stage.failureMessage} /> | ||
<StageExecutionLogs stage={stage} /> | ||
</ExecutionDetailsSection> | ||
); | ||
} | ||
|
||
// eslint-disable-next-line | ||
export namespace CloudfoundryUnshareServiceExecutionDetails { | ||
export const title = 'cloudfoundryUnshareServiceConfig'; | ||
} |
2 changes: 2 additions & 0 deletions
2
app/scripts/modules/cloudfoundry/src/presentation/pipeline/stages/index.ts
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 +1,3 @@ | ||
export * from './CloudfoundryServiceExecutionDetails'; | ||
export * from './CloudfoundryShareServiceExecutionDetails'; | ||
export * from './CloudfoundryUnshareServiceExecutionDetails'; |