<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
    <ol class="breadcrumb">
        <li><a href="#/realms/{{realm.realm}}/users">Users</a></li>
        <li>{{user.username}}</li>
    </ol>

    <h1>{{user.username|capitalize}}</h1>

    <kc-tabs-user></kc-tabs-user>

    <table class="table table-striped table-bordered">
        <thead>
        <tr>
            <th class="kc-table-actions" colspan="6">
                <div class="pull-right">
                    <a class="btn btn-primary" ng-click="logoutAll()">Logout All Sessions</a>
                </div>
            </th>
        </tr>
        <tr>
            <th>IP Address</th>
            <th>Started</th>
            <th>Last Access</th>
            <th>Clients</th>
            <th>Action</th>
        </tr>
        </thead>
        <tbody>
        <tr data-ng-repeat="session in sessions">
            <td>{{session.ipAddress}}</td>
            <td>{{session.start | date:'medium'}}</td>
            <td>{{session.lastAccess | date:'medium'}}</td>
            <td>
                <div data-ng-repeat="(id, clientId) in session.clients">
                    <a href="#/realms/{{realm.realm}}/clients/{{id}}">{{clientId}}</a>
                </div>
            </ul>
            </td>
            <td><a href="" ng-click="logoutSession(session.id)">logout</a> </td>
        </tr>
        </tbody>
    </table>
</div>

<kc-menu></kc-menu>
