blob: a86379e256d05ef653e998ef2a68b7cf35465101 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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>
);
}
});
|