mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-05 11:11:13 +00:00
- Also added linter configuration, and make linter fail on error - fixing ES6 errors and added ES6 transformer - gulp target to try local build - linted gulpfile - cant hook into gulp lint yet, because gulp does currently not support ES6 which some rules demand, since gulp cant transpile itself, we have a chicken and egg problem. - ES6 transpiler for test runner - removed old linter config - adapted editorconfig to reflect linter config
32 lines
1.0 KiB
JavaScript
32 lines
1.0 KiB
JavaScript
const React = require('react');
|
|
|
|
const NodeDetailsTable = React.createClass({
|
|
|
|
render: function() {
|
|
const isNumeric = this.props.isNumeric;
|
|
|
|
return (
|
|
<div className="node-details-table">
|
|
<h4 className="node-details-table-title">
|
|
{this.props.title}
|
|
</h4>
|
|
|
|
{this.props.rows.map(function(row) {
|
|
return (
|
|
<div className="node-details-table-row">
|
|
<div className="node-details-table-row-key">{row.key}</div>
|
|
{isNumeric && <div className="node-details-table-row-value-scalar">{row.value_major}</div>}
|
|
{isNumeric && <div className="node-details-table-row-value-unit">{row.value_minor}</div>}
|
|
{!isNumeric && <div className="node-details-table-row-value-major">{row.value_major}</div>}
|
|
{!isNumeric && row.value_minor && <div className="node-details-table-row-value-minor">{row.value_minor}</div>}
|
|
</div>
|
|
);
|
|
})}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
});
|
|
|
|
module.exports = NodeDetailsTable;
|