Files
weave-scope/client/app/scripts/components/plugins.js
Paul Bellamy 7632e0b3c5 Adding support for plugins, with basic example of iowait, and ebpf
Squash of:
* Include plugins in the report
* show plugin list in the UI
* moving metric and metadata templates into the probe reports
* update js for prime -> priority
* added retry to plugin handshake
* added iowait plugin
* review feedback
* plugin documentation
2016-04-12 17:22:14 +01:00

23 lines
554 B
JavaScript

import React from 'react';
export default class Plugins extends React.Component {
renderPlugin(plugin) {
return (
<div className="plugin" key={plugin.id} title={plugin.description}>
{plugin.label || plugin.id}
</div>
);
}
render() {
if (!this.props.plugins || this.props.plugins.length === 0) {
return <div className="plugins">No plugins loaded</div>;
}
return (
<div className="plugins">
Plugins: {this.props.plugins.map(plugin => this.renderPlugin(plugin))}
</div>
);
}
}