Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI support for absent deploy field #1207

Merged
merged 3 commits into from
Aug 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions SingularityUI/app/components/deployDetail/DeployDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ class DeployDetail extends React.Component {
const breadcrumbs = [
{
label: 'Request',
text: deploy.deploy.requestId,
link: `request/${deploy.deploy.requestId}`
text: this.props.params.requestId,
link: `request/${this.props.params.requestId}`
},
{
label: 'Deploy',
text: deploy.deploy.id
text: this.props.params.deployId
}
];
if (this.props.group) {
Expand All @@ -123,7 +123,7 @@ class DeployDetail extends React.Component {
<div className="col-md-8">
<h1>
<OverlayTrigger trigger={['hover', 'focus', 'click']} placement="left" overlay={copyLinkPopover}>
<span className="copy-btn" data-clipboard-text={deploy.deploy.id}>{deploy.deploy.id}</span>
<span className="copy-btn" data-clipboard-text={this.props.params.deployId}>{this.props.params.deployId}</span>
</OverlayTrigger>
<DeployState state={deploy.deployResult && deploy.deployResult.deployState || 'PENDING'} />
</h1>
Expand Down Expand Up @@ -162,7 +162,7 @@ class DeployDetail extends React.Component {
keyGetter={(task) => task.taskId.id}
rowChunkSize={5}
paginated={true}
fetchDataFromApi={(page, numberPerPage) => this.props.fetchTaskHistoryForDeploy(deploy.deploy.requestId, deploy.deploy.id, numberPerPage, page)}
fetchDataFromApi={(page, numberPerPage) => this.props.fetchTaskHistoryForDeploy(this.props.params.requestId, this.props.params.deployId, numberPerPage, page)}
isFetching={this.props.isTaskHistoryFetching}
>
<Column
Expand Down Expand Up @@ -323,13 +323,15 @@ class DeployDetail extends React.Component {

render() {
const { deploy, activeTasks, taskHistory, latestHealthchecks } = this.props;
const emptyMessage = !deploy.deploy && <div className="empty-table-message">Deploy data not found</div>;
return (
<div>
{this.renderHeader(deploy)}
{this.renderActiveTasks(deploy, activeTasks)}
{this.renderTaskHistory(deploy, taskHistory)}
{this.renderInfo(deploy)}
{this.renderHealthchecks(deploy, latestHealthchecks)}
{emptyMessage}
{deploy.deploy && this.renderInfo(deploy)}
{deploy.deploy && this.renderHealthchecks(deploy, latestHealthchecks)}
</div>
);
}
Expand Down