Sha256: 3a82f704dc9bc5748ac4719bf5f0f9766339e95b87990cc859451d3240d0e87b

Contents?: true

Size: 1001 Bytes

Versions: 1

Compression:

Stored size: 1001 Bytes

Contents

/** @jsx React.DOM */

var HostLink = React.createClass({
  hostId : function() {
    return this.props.data.split(':')[2];
  },
  
  hostUrl: function() {
    return "/ui/hosts/" + encodeURIComponent(this.hostId());
  },
  
  render: function() {
    return (
      <a href={this.hostUrl()}>
        {this.hostId()}
      </a>
    );
  }
});

var Host = React.createClass({
  render: function(){
    var host = this.props.data.host;
    return (
      <div className="host">
        <h2> Host {host.id} </h2>
        <dl>
          <dt> Owner </dt>
          <dd> <RoleLink id={host.ownerid}/> </dd>
          <dt> Created At </dt>
          <dd> <Time timestamp={host.created_at}/> </dd>
        </dl>
        <OwnedResources owned={this.props.data.owned} /> 
        <Permissions owned={this.props.data.owned} role={host.roleid}/>
        <div className="audit auditHost">
          <AuditBox roles={[host.roleid]} resources={[host.resource_identifier]}/>
        </div>
      </div>
    );
  }
})

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
conjur-asset-ui-api-1.2.0 public/js/views/host.js