<rd-header>
  <rd-header-title title-text="Endpoint access"></rd-header-title>
  <rd-header-content>
    <a ui-sref="portainer.endpoints">Endpoints</a> &gt; <a ui-sref="portainer.endpoints.endpoint({id: ctrl.endpoint.Id})">{{ ctrl.endpoint.Name }}</a> &gt; Access management
  </rd-header-content>
</rd-header>

<div class="row" ng-if="ctrl.endpoint">
  <div class="col-sm-12">
    <rd-widget>
      <rd-widget-header icon="fa-plug" title-text="Endpoint"></rd-widget-header>
      <rd-widget-body classes="no-padding">
        <table class="table">
          <tbody>
            <tr>
              <td>Name</td>
              <td>
                {{ ctrl.endpoint.Name }}
              </td>
            </tr>
            <tr>
              <td>URL</td>
              <td>
                {{ ctrl.endpoint.URL | stripprotocol }}
              </td>
            </tr>
            <tr>
              <td>Group</td>
              <td>
                <a ui-sref="portainer.groups.group({ id: ctrl.group.Id })">{{ ctrl.group.Name }}</a>
              </td>
            </tr>
          </tbody>
        </table>
      </rd-widget-body>
    </rd-widget>
  </div>
</div>

<por-access-management
  ng-if="ctrl.endpoint && ctrl.group"
  access-controlled-entity="ctrl.endpoint"
  action-in-progress="ctrl.state.actionInProgress"
  entity-type="endpoint"
  inherit-from="ctrl.group"
  update-access="ctrl.updateAccess"
>
</por-access-management>
