diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js b/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js new file mode 100644 index 00000000000..a86379e256d --- /dev/null +++ b/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js @@ -0,0 +1,28 @@ +import React from 'react'; +import PermissionsHeader from './permissions-header'; +import PermissionTemplate from './permission-template'; + +export default React.createClass({ + propTypes:{ + permissionTemplates: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, + permissions: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, + topQualifiers: React.PropTypes.array.isRequired, + refresh: React.PropTypes.func.isRequired + }, + + render() { + let permissionTemplates = this.props.permissionTemplates.map(p => { + return <PermissionTemplate + key={p.id} + permissionTemplate={p} + topQualifiers={this.props.topQualifiers} + refresh={this.props.refresh}/>; + }); + return ( + <table id="permission-templates" className="data zebra"> + <PermissionsHeader permissions={this.props.permissions}/> + <tbody>{permissionTemplates}</tbody> + </table> + ); + } +}); |