preston/bittorious

View on GitHub
app/views/welcome/status.html.slim

Summary

Maintainability
Test Coverage
- content_for :title do 'Network Status' end
        
#network_status ng-controller="PeerController"

    #map_canvas

    h1 Network Status
    p Locations are approximated based on registered client IP address.
    table.table.table-condensed.table-striped
        thead
            tr
                th
                    a ng-click="reverse = !reverse; predicate = 'user.name'; " User
                th
                    a ng-click="reverse = !reverse; predicate = 'peer_id'; " Peer ID
                th Torrent
                th IP Address
                th Port
                th Uploaded
                th Downloaded
                th Last Registered
        tbody
            tr.peer ng-repeat="peer in peers | orderBy:predicate:reverse"
                td ng-bind="peer.user.name"
                td ng-bind="peer.peer_id"
                td ng-bind="peer.torrent.name"
                td ng-bind="peer.ip"
                td ng-bind="peer.port"
                td ng-bind="peer.uploaded | humanizeBytes"
                td ng-bind="peer.downloaded | humanizeBytes"
                td ng-bind="peer.updated_at | relativeDate"