<!-- Faraday Penetration Test IDE -->
<!-- Copyright (C) 2013  Infobyte LLC (http://www.infobytesec.com/) -->
<!-- See the file 'doc/LICENSE' for the license information -->

<div class="modal-header" hotkey="{enter:ok}">
    <h3>Services for <a ng-href="#/host/ws/{{workspace}}/hid/{{host._id}}" class="ng-binding"  ng-click="ok()">{{name}} </a>({{services.length}} total)</h3>
</div>

<div class="modal-body">
    <table class="table-v3 services-list table table-responsive" style="margin-top: 15px">
        <thead>
            <tr class="ui-grid-header">
                <th class="ui-grid-cell-contents ui-grid-header-cell">
                    <span ng-click="toggleSort('name')">Name</span>
                </th>
                <th class="ui-grid-cell-contents ui-grid-header-cell">
                    <span href="" ng-click="toggleSort('version')">Version</span>
                </th>
                <th class="ui-grid-cell-contents ui-grid-header-cell">
                    <span href="" ng-click="toggleSort('port')">Port</span>
                </th>
                <th class="ui-grid-cell-contents ui-grid-header-cell">
                    <span href="" ng-click="toggleSort('protocol')">Protocol</span>
                </th>
                <th class="ui-grid-cell-contents ui-grid-header-cell">
                    <span href="" ng-click="toggleSort('status')">Status</span>
                </th>
            </tr>
        </thead>
        <tbody>
            <tr class="ui-grid-row" ng-repeat="srv in services | orderBy:sortField:sortReverse">
                <td class="ui-grid-cell-contents">
                    {{srv.name}}
                </td>
                <td class="ui-grid-cell-contents">
                    {{srv.version}}
                </td>
                <td class="ui-grid-cell-contents">
                    {{srv.ports.toString().replace("[]", "")}}
                    <osint-link query="srv.ports.toString().replace('[]', '')" osint="osint"></osint-link>
                </td>
                <td class="ui-grid-cell-contents">
                    {{srv.protocol}}
                </td>
                <td class="ui-grid-cell-contents">
                    {{srv.status}}
                </td>
            </tr>
        </tbody>
            <div class="col md-12" style="border-top:0px solid #e5e5e5">
                    <div>
                        <i class="fa fa-laptop"></i><span> OS: {{host.os | limitTo: 40}}</span>
                        <div class="pull-right">
                            <i class="glyphicon glyphicon-user"></i> Created by {{host.metadata.owner}} <span am-time-ago="host.metadata.create_time"></span>

                        </div>
                    </div>
            </div><!-- .col md-12 -->
    </table>
</div>
<div class="modal-footer">
    <button class="btn btn-success" ng-click="ok()">OK</button>`
</div>
