341 lines
15 KiB
HTML
341 lines
15 KiB
HTML
<!doctype>
|
|
<html>
|
|
|
|
<!-- {{{ head -->
|
|
<head>
|
|
<link rel="icon" href="favicon.ico" />
|
|
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>aria2 web client</title>
|
|
|
|
<link rel="stylesheet" href="css/bootstrap.css">
|
|
<link rel="stylesheet" href="css/font-awesome.css">
|
|
|
|
<link rel="stylesheet" href="css/style.css">
|
|
<link rel="stylesheet" href="css/download.css">
|
|
<link rel="stylesheet" href="css/modals.css">
|
|
|
|
|
|
<!-- external javascript dependencies -->
|
|
<script src="js/libs/jquery-1.8.3.js"></script>
|
|
<script src="js/libs/underscore.js"></script>
|
|
|
|
<script src="js/libs/angular.js"></script>
|
|
|
|
<script src="js/libs/bootstrap.js"></script>
|
|
<script src="js/libs/angularui-bootstrap.js"></script>
|
|
|
|
|
|
<script src="js/libs/jquery.flot.js"></script>
|
|
<!-- We do manual resize currently
|
|
<script src="js/libs/jquery.flot.resize.js"></script>
|
|
-->
|
|
|
|
<!-- webui core -->
|
|
<script src="js/init.js"></script>
|
|
|
|
<script src="js/directives/chunkbar.js"></script>
|
|
<script src="js/directives/dgraph.js"></script>
|
|
|
|
<script src="js/filters/bytes.js"></script>
|
|
<script src="js/filters/path.js"></script>
|
|
|
|
<script src="js/services/constants.js"></script>
|
|
<script src="js/services/deps.js"></script>
|
|
<script src="js/services/base64.js"></script>
|
|
<script src="js/services/utils.js"></script>
|
|
|
|
<script src="js/services/rpc/jsoncall.js"></script>
|
|
<script src="js/services/rpc/sockcall.js"></script>
|
|
<script src="js/services/rpc/syscall.js"></script>
|
|
<script src="js/services/rpc/rpc.js"></script>
|
|
|
|
|
|
<script src="js/ctrls/nav.js"></script>
|
|
<script src="js/ctrls/modal.js"></script>
|
|
<script src="js/ctrls/download.js"></script>
|
|
|
|
|
|
</head>
|
|
<!-- }}} -->
|
|
|
|
<body>
|
|
|
|
<!-- {{{ header -->
|
|
<div class="navbar navbar-inverse navbar-fixed-top" ng-controller="NavCtrl">
|
|
<div class="navbar-inner">
|
|
<div class="container">
|
|
<!-- using a span for collapse rather than a to fix the angular majic on anchors -->
|
|
<span class="btn btn-navbar"
|
|
ng-click="collapsed = !collapsed">
|
|
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</span>
|
|
|
|
<a class="brand">{{ name }}</a>
|
|
|
|
<div class="nav-collapse" collapse="collapsed">
|
|
<ul class="nav">
|
|
<li class="dropdown">
|
|
<a class="dropdown-toggle" href="#">
|
|
Add <b class="caret"></b>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li>
|
|
<a href="#" data-toggle="modal" data-target=".modal-adduris">
|
|
<i class="icon-download"></i> By URIs
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="#"><i class="icon-file"></i> By Metalinks</a>
|
|
</li>
|
|
<li>
|
|
<a href="#"><i class="icon-file"></i> By Torrents</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown" ng-show="false">
|
|
<a class="dropdown-toggle" href="#">
|
|
Manage <b class="caret"></b>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="#"><i class="icon-pause"></i> Pause All</a></li>
|
|
<li><a href="#"><i class="icon-play"></i> Resume Paused</a></li>
|
|
<li><a href="#"><i class="icon-remove"></i> Purge Completed</a></li>
|
|
<li><a href="#"><i class="icon-fire"></i> Remove All</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<ul class="nav" ng-show="false">
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" >
|
|
Settings <b class="caret"></b>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="#">
|
|
<i class="icon-wrench"></i> Connection Settings</a>
|
|
</li>
|
|
<li><a href="#">
|
|
<i class="icon-wrench"></i> Global Settings</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="nav pull-right" ng-show="false">
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" >
|
|
About <b class="caret"></b>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="#">
|
|
<i class="icon-list-alt"></i> Global Statistics</a></li>
|
|
<li><a href="#">
|
|
<i class="icon-info-sign"></i> About</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div><!--/.nav-collapse -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- }}} -->
|
|
|
|
<!-- {{{ downloads -->
|
|
<div role="main" class="container" ng-controller="DownloadCtrl">
|
|
|
|
<div ng-show="!getDownloads().length" class="hero-unit">
|
|
<h3>Currently no downloads in line to display, use the Add download button to start downloading files!</h3>
|
|
</div>
|
|
|
|
<!-- {{{ download template -->
|
|
<table ng-repeat="download in getDownloads()" class="download" data-gid="{{download.gid}}">
|
|
<tbody>
|
|
<tr>
|
|
<td ng-click="download.collapsed = !download.collapsed" class="download-overview">
|
|
<b class="download-name">{{getName(download)}}</b>
|
|
</td>
|
|
<td class="download-controls" rowspan="2">
|
|
<div class="btn-group">
|
|
|
|
<button ng-show="hasStatus(download, 'active')" class="btn download_pause" ng-click="pause(download)"><i class="icon-pause"></i></button>
|
|
<button ng-show="hasStatus(download, 'paused')" class="btn download_play" ng-click="resume(download)"><i class="icon-play"></i></button>
|
|
<button ng-show="canRestart(download)" class="btn download_restart" ng-click="restart(download)"><i class="icon-repeat"></i></button>
|
|
|
|
<button class="btn download_remove hidden-phone" ng-click="remove(download)"><i class="icon-stop"></i></button>
|
|
|
|
<button class="btn download_settings hidden-phone"><i class="icon-cog"></i></button>
|
|
|
|
<button class="btn dropdown-toggle">
|
|
<i class="caret"></i>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
|
|
<li class="visible-phone"><a href="#"><i class="icon-cog"></i> Settings</a></li>
|
|
|
|
<li ng-show="download.bittorrent"><a href="#" class="torrent_info"><i class="icon-list-alt"></i> Peers</a></li>
|
|
|
|
<li><a href="#" ng-click="download.collapsed = !download.collapsed"><i class="icon-info-sign"></i> More Info</a></li>
|
|
|
|
<li class="visible-phone"><a href="#" ng-click="remove(download)"><i class="icon-remove"></i> Remove</a></li>
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td ng-click="download.collapsed = !download.collapsed" class="download-overview">
|
|
<ul class="stats pull-left">
|
|
|
|
<li ng-show="hasStatus(download, 'active')" class="label label-success hidden-phone hidden-tablet">Status: <span class="download-status">{{download.status}}</span></li>
|
|
<li ng-show="hasStatus(download, 'active')" class="label label-success">ETA: <span class="download-eta">{{getEta(download) | time}}</span></li>
|
|
<li ng-show="hasStatus(download, 'active')" class="label label-success hidden-phone">Size: <span class="download-totalLength">{{download.totalLength | blength}}</span></li>
|
|
<li ng-show="hasStatus(download, 'active')" class="label label-success hidden-phone">Downloaded: <span class="download-completedLength">{{download.completedLength | blength}}</span></li>
|
|
<li ng-show="hasStatus(download, 'active')" class="label label-success hidden-phone hidden-tablet">Progress: <span class="download-percentage">{{getProgress(download)}}</span>%</li>
|
|
<li ng-show="hasStatus(download, 'active')" class="label label-success">Speed: <span class="download-downloadSpeed">{{download.downloadSpeed | bspeed}}</span></li>
|
|
<!-- TODO: figure out how to do multiple ng-show
|
|
<li ng-show="download.bittorrent" class="label label-success hidden-phone">Upload Speed: <span class="download-uploadSpeed">{{download.uploadSpeed | bspeed}}</span></li>
|
|
-->
|
|
|
|
|
|
<li ng-show="hasStatus(download, 'paused')" class="label label-info">Status: <span class="download-status">{{download.status}}</span></li>
|
|
<li ng-show="hasStatus(download, 'paused')" class="label label-info">Size: <span class="download-totalLength">{{download.totalLength | blength}}</span></li>
|
|
<li ng-show="hasStatus(download, 'paused')" class="label label-info hidden-phone">Downloaded: <span class="download-completedLength">{{download.completedLength | blength}}</span></li>
|
|
<li ng-show="hasStatus(download, 'paused')" class="label label-info hidden-phone">Path: <span class="download-dir">{{download.dir}}</span></li>
|
|
|
|
<li ng-show="hasStatus(download, 'complete')" class="label">Status: <span class="download-status">{{download.status}}</span></li>
|
|
<li ng-show="hasStatus(download, 'complete')" class="label hidden-phone">Path: <span class="download-dir">{{download.dir}}</span></li>
|
|
<li ng-show="hasStatus(download, 'complete')" class="label">Size: <span class="download-totalLength">{{download.totalLength | blength}}</span></li>
|
|
|
|
<li ng-show="hasStatus(download, 'removed')" class="label label-warning">Status: <span class="download-status">{{download.status}}</span></li>
|
|
<li ng-show="hasStatus(download, 'removed')" class="label label-warning hidden-phone">Path: <span class="download-dir">{{download.dir}}</span></li>
|
|
<li ng-show="hasStatus(download, 'removed')" class="label label-warning">Size: <span class="download-totalLength">{{download.totalLength | blength}}</span></li>
|
|
|
|
<li ng-show="hasStatus(download, 'error')" class="label label-important">Status: <span class="download-status">{{download.status}}</span></li>
|
|
<li ng-show="hasStatus(download, 'error')" class="label label-important hidden-phone">Path: <span class="download-dir">{{download.dir}}</span></li>
|
|
<li ng-show="hasStatus(download, 'error')" class="label label-important">Size: <span class="download-totalLength">{{download.totalLength | blength}}</span></li>
|
|
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="download-progress" colspan="2" ng-click="download.collapsed = !download.collapsed">
|
|
|
|
<div ng-show="hasStatus(download, 'active')" class="progress progress-striped" style="width: 100%; margin: 0; padding: 0;">
|
|
<div class="bar" style="width: {{getProgress(download)}}%;"></div>
|
|
</div>
|
|
|
|
<div ng-show="hasStatus(download, 'paused')" class="progress progress-info progress-striped" style="width: 100%; margin: 0; padding: 0;">
|
|
<div class="bar" style="width: {{getProgress(download)}}%;"></div>
|
|
</div>
|
|
|
|
<div ng-show="hasStatus(download, 'error')" class="progress progress-danger progress-striped" style="width: 100%; margin: 0; padding: 0;">
|
|
<div class="bar" style="width: {{getProgress(download)}}%;"></div>
|
|
</div>
|
|
|
|
<div ng-show="hasStatus(download, 'removed')" class="progress progress-warning progress-striped" style="width: 100%; margin: 0; padding: 0;">
|
|
<div class="bar" style="width: {{getProgress(download)}}%;"></div>
|
|
</div>
|
|
|
|
<div ng-show="hasStatus(download, 'complete')" class="progress progress-success progress-striped" style="width: 100%; margin: 0; padding: 0;">
|
|
<div class="bar" style="width: {{getProgress(download)}}%;"></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr ng-click="download.collapsed = !download.collapsed" class="download-detail">
|
|
<td colspan="2">
|
|
<div class="more_info" collapse="download.collapsed">
|
|
<canvas bitfield="download.bitfield" draw="!download.collapsed" pieces="download.numPieces" class="progress chunk-canvas" width="1400" style="width: 100%; margin: 5px;" chunkbar></canvas>
|
|
<ul class="stats">
|
|
<li class="label">Status: <span class="download-status">{{download.status}}</span></li>
|
|
<li class="label">GID: <span class="download-gid">{{download.gid}}</span></li>
|
|
<li class="label">Dir: <span class="download-dir">{{download.dir}}</span></li>
|
|
<li class="label">Size: <span class="download-totalLength">{{download.totalLength | blength}}</span></li>
|
|
<li class="label">Downloaded: <span class="download-completedLength">{{download.completedLength | blength}}</span></li>
|
|
<li class="label">Num of Pieces: <span class="download-numPieces">{{download.numPieces}}</span></li>
|
|
<li class="label">Piece Length: <span class="download-pieceLength">{{download.pieceLength | blength}}</span></li>
|
|
<li class="label">ETA: <span class="download-eta">{{getEta(download) | time}}</span></li>
|
|
<li class="label">Down Speed: <span class="download-downloadSpeed">{{download.downloadSpeed | bspeed}}</span></li>
|
|
|
|
<li class="label" ng-show="download.bittorrent">Upload Speed: <span class="download-uploadSpeed">{{download.uploadSpeed | bspeed}}</span></li>
|
|
<li class="label" ng-show="download.bittorrent">Upload Length: <span class="download-uploadLength">{{download.uploadLength | blength}}</span></li>
|
|
|
|
<li class="label">Connections: <span class="download-connections">{{download.connections}}</span></li>
|
|
</ul>
|
|
|
|
<h4 class="hidden-phone">Download Files</h4>
|
|
<ul class="download-files hidden-phone">
|
|
<li class="label" ng-repeat="file in download.files">{{file.path | prelative:download.dir}} ({{file.length | blength}})</li>
|
|
</ul>
|
|
|
|
<div ng-show="hasStatus(download, 'active')">
|
|
<div class="download-graph" dspeed="download.downloadSpeed" uspeed="download.uploadSpeed" dgraph draw="!download.collapsed"></div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<!-- }}} -->
|
|
|
|
</div>
|
|
<!-- }}} -->
|
|
|
|
<!-- {{{ modals -->
|
|
<div ng-controller="ModalCtrl">
|
|
|
|
<!--{{{ add new Download template -->
|
|
<div class="modal hide modal-adduris">
|
|
<div class="modal-header">
|
|
<button class="close" data-dismiss="modal">x</button>
|
|
<h3>Add Downloads By URIs</h3>
|
|
</div>
|
|
<form class="modal-body">
|
|
<fieldset>
|
|
<legend>Download URIs</legend>
|
|
<textarea rows="6" ng-model="uris"></textarea>
|
|
<p class="help-block">
|
|
{{ uris }} <br>
|
|
You can add multiple downloads (files)
|
|
at the same time by putting uris for each
|
|
file on a separate line.
|
|
<br>
|
|
You can also add multiple uris (mirrors) for the
|
|
*same* file. To do this separate the uris
|
|
by a space.
|
|
<br>
|
|
Aria2 will use multiple uris (or mirrors) to boost
|
|
the download speed for that file (download).
|
|
<br>
|
|
E.g. To add 2 files (downloads) f1.jpg
|
|
and f2.mp4 with 2 uris (mirrors) each,
|
|
add uris as following:
|
|
<br>
|
|
<!-- pre tags print tabs, so do not indent them! -->
|
|
<pre>
|
|
http://ex1.com/f1.jpg http://ex2.com/f1.jpg
|
|
http://ex1.com/f2.mp4 http://ex2.com/f2.mp4
|
|
</pre>
|
|
A URI can be HTTP(S)/FTP/BitTorrent Magnet URI.
|
|
</p>
|
|
</fieldset>
|
|
</form>
|
|
<div class="modal-footer">
|
|
<button class="btn" ng-click="addUris()">Add Downloads</button>
|
|
</div>
|
|
</div>
|
|
<!-- add new Download template end }}}-->
|
|
|
|
</div>
|
|
<!-- }}} -->
|
|
|
|
</body>
|
|
</html>
|