/** @jsx React.DOM */
//var ReactBootstrap=root.ReactBootstrap;
var TabbedArea = ReactBootstrap.TabbedArea;
var TabPane = ReactBootstrap.TabPane;
var User = React.createClass({
mixins: [conjur.views.mixins.Tab],
render: function(){
var user = this.props.data.user;
// TODO: refactor
// TODO: show public keys
// TODO: actions menu (e.g. 'upload public key', 'add annotation')
// TODO: memberships panel
var overview_tab =
- Created by
- Owner
- Uidnumber
- {user.uidnumber}
;
var audit_tab=
;
var pubkeys_list = this.props.data.pubkeys.map(function(k) {
var tokens = k.split(" ");
return
{tokens[0]}
{tokens[tokens.length-1]}
});
var pubkeys_tab =
;
var permissions_tab = this.permissions_tab(user.roleid);
var memberships_tab = this.memberships_tab(user.roleid);
var annotations_tab = this.annotations_tab();
var owned_tab = this.owned_tab();
var tabs=_.compact([overview_tab, owned_tab, memberships_tab,
permissions_tab, annotations_tab, pubkeys_tab, audit_tab]);
return (
User {user.login}
{tabs}
);
}
});