mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
* better state visibility * pure state changes * state debug panel (show: crtl-h, move: ctrl-w)
31 lines
742 B
JavaScript
31 lines
742 B
JavaScript
import React from 'react';
|
|
import { connect } from 'react-redux';
|
|
|
|
import DetailsCard from './details-card';
|
|
|
|
class Details extends React.Component {
|
|
render() {
|
|
const { controlStatus, details } = this.props;
|
|
// render all details as cards, later cards go on top
|
|
return (
|
|
<div className="details">
|
|
{details.toIndexedSeq().map((obj, index) => <DetailsCard key={obj.id}
|
|
index={index} cardCount={details.size}
|
|
nodeControlStatus={controlStatus.get(obj.id)} {...obj} />
|
|
)}
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
function mapStateToProps(state) {
|
|
return {
|
|
controlStatus: state.get('controlStatus'),
|
|
details: state.get('nodeDetails')
|
|
};
|
|
}
|
|
|
|
export default connect(
|
|
mapStateToProps
|
|
)(Details);
|