mirror of
https://github.com/reactos/developer-web-interface.git
synced 2024-11-23 03:49:43 +00:00
removing logics
This commit is contained in:
parent
f9bdada9cc
commit
638721e07e
@ -12,51 +12,10 @@ class Commits extends React.Component {
|
||||
this.props.loadBuildSets();
|
||||
}
|
||||
|
||||
renderBsid = id => {
|
||||
return <p key={id.bsid}>{id.bsid}</p>;
|
||||
};
|
||||
|
||||
renderCommits = commit => {
|
||||
let filteredBs = this.props.buildData
|
||||
.map(obj => {
|
||||
return obj;
|
||||
})
|
||||
.filter(item => item.sourcestamps[0].revision === commit.sha);
|
||||
let BSID = filteredBs.map(id => {
|
||||
return id.bsid;
|
||||
});
|
||||
console.log(BSID);
|
||||
if (BSID) {
|
||||
var filterBReq = [];
|
||||
BSID.forEach(val => {
|
||||
filterBReq.push(
|
||||
this.props.bsid
|
||||
.map(obj => {
|
||||
return obj;
|
||||
})
|
||||
.filter(item => item.buildsetid === val)
|
||||
);
|
||||
});
|
||||
var mergedBsID = [].concat.apply([], filterBReq);
|
||||
var filterBuild = [];
|
||||
mergedBsID.forEach(val => {
|
||||
filterBuild.push(
|
||||
this.props.build
|
||||
.map(obj => {
|
||||
return obj;
|
||||
})
|
||||
.filter(item => item.buildrequestid === val.buildrequestid)
|
||||
);
|
||||
});
|
||||
var mergedBuild = [].concat.apply([], filterBuild);
|
||||
console.log(mergedBsID);
|
||||
console.log(mergedBuild);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='panel-margin' key={commit.sha}>
|
||||
<CommitsCard commit={commit} />
|
||||
{filteredBs.map(this.renderBsid)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@ -117,16 +76,12 @@ class Commits extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
// prettier-ignore
|
||||
const mapStateToProps = ({ isLoading, commits, error, branch,page,buildData,bsid,build}) => ({
|
||||
isLoading,
|
||||
commits,
|
||||
error,
|
||||
branch,
|
||||
page,
|
||||
buildData,
|
||||
bsid,
|
||||
build
|
||||
const mapStateToProps = ({ isLoading, commits, error, branch, page }) => ({
|
||||
isLoading,
|
||||
commits,
|
||||
error,
|
||||
branch,
|
||||
page
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
|
Loading…
Reference in New Issue
Block a user