<article class='panel left-big-box' ng-controller="lastVulnsCtrl" id="last-vuln-panel">
    <header>
        <h2>Last Vulnerabilities
            <span class="glyphicon glyphicon-info-sign" uib-tooltip="Last vulnerabilities added"></span>
        </h2>
    </header>
    <div ng-if="vulns.length === 0" class="no-info-overlay">
        <p class="no-info-text">No vulnerabilities found yet.</p>
    </div>
    <div class="ph-xl">
        <table ng-if="vulns.length > 0" class="tablesorter table table-striped last-vuln text-left">
            <thead>
                <tr>
                    <th class="text-left"><span>Severity</span></th>
                    <th class="text-left"><span>Target</span></th>
                    <th class="text-left"><span>Name</span></th>
                    <th class="text-left"><span>Owner</span></th>
                    <th class="text-left"><span>Date</span></th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="vuln in vulns | limitTo:settings.pageLimit:settings.offset">
                    <td><a href="" ng-click="navigate('/status/ws/'+workspace+'/search/severity='+vuln.severity)"><span class="label vuln fondo-{{vuln.severity}}">{{vuln.severity | uppercase}}</span></a></td>
                    <td>
                        <a href="" ng-click="navigate('/status/ws/'+workspace+'/search/target='+vuln.target)">{{vuln.target}}</a>
                    </td>
                    <td class="wrapword"><a href="" ng-click="navigate('/status/ws/'+workspace+'/search/name='+vuln.name)">{{vuln.name}}</a></td>

                    <td><a href="" ng-click="navigate('/status/ws/'+workspace+'/search/owner='+vuln.owner)">{{vuln.owner}}</a></td>
                    <td><span am-time-ago="vuln.metadata.create_time" am-preprocess="utc"></span></td>
                </tr>
            </tbody>
        </table>

        <simple-pagination
            current-page="settings.currentPage"
            offset="settings.offset"
            page-limit="settings.pageLimit"
            page-limits="settings.pageLimits"
            total="vulns.length">
        </simple-pagination>

    </div>
</article>
