/** @jsx h */
import { Component, h } from 'preact';
class ProcessDetailsView extends Component {
render() {
return (
{this.renderBeforeItems()}
- User and group
{this.props.spec.user_info}
- Ulimits
{this.props.spec.ulimits}
- Environment variables
{this.props.spec.envvars}
{this.renderAfterItems()}
);
}
renderBeforeItems() {
var result = [];
if (this.props.spec.pid) {
result.push(PID);
result.push({this.props.spec.pid});
}
if (this.props.spec.stdout_and_err) {
result.push(Stdout and stderr output);
result.push({this.props.spec.stdout_and_err}
);
}
if (this.props.spec.backtrace) {
result.push(Backtrace);
result.push({this.props.spec.backtrace}
);
}
return result;
}
renderAfterItems() {
var result = [];
if (this.props.spec.annotations) {
for (var key of Object.keys(this.props.spec.annotations)) {
var value = this.props.spec.annotations[key];
result.push({key});
result.push({value}
);
}
}
return result;
}
}
export default ProcessDetailsView;