      1 /*
      2 Script: Deluge.Keys.js
      3     The torrent status keys that are commonly used around the UI.
      4
      5 Copyright:
      6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
      7 	This program is free software; you can redistribute it and/or modify
      8 	it under the terms of the GNU General Public License as published by
      9 	the Free Software Foundation; either version 3, or (at your option)
     10 	any later version.
     11
     12 	This program is distributed in the hope that it will be useful,
     13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 	GNU General Public License for more details.
     16
     17 	You should have received a copy of the GNU General Public License
     18 	along with this program.  If not, write to:
     19 		The Free Software Foundation, Inc.,
     20 		51 Franklin Street, Fifth Floor
     21 		Boston, MA  02110-1301, USA.
     22
     23     In addition, as a special exception, the copyright holders give
     24     permission to link the code of portions of this program with the OpenSSL
     25     library.
     26     You must obey the GNU General Public License in all respects for all of
     27     the code used other than OpenSSL. If you modify file(s) with this
     28     exception, you may extend this exception to your version of the file(s),
     29     but you are not obligated to do so. If you do not wish to do so, delete
     30     this exception statement from your version. If you delete this exception
     31     statement from all source files in the program, then also delete it here.
     32 */
     33
     34 /**
     35  * @description The torrent status keys that are commonly used around the UI.
     36  * @namespace Deluge.Keys
     37  */
     38 Deluge.Keys = {
     39 	/**
     40 	 * @static
     41 	 */
     42     Grid: [
     43         'queue', 'name', 'total_size', 'state', 'progress', 'num_seeds',
     44         'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
     45         'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
     46         'is_auto_managed', 'time_added', 'tracker_host'
     47     ],
     48
     49     /**
     50      * @description Keys used in the status tab of the statistics panel.
     51      * These get extended
     52      * by {@link Deluge.Keys.Grid}.
     53 	 * @static
     54 	 */
     55     Status: [
     56         'total_done', 'total_payload_download', 'total_uploaded',
     57         'total_payload_upload', 'next_announce', 'tracker_status', 'num_pieces',
     58         'piece_length', 'is_auto_managed', 'active_time', 'seeding_time',
     59         'seed_rank'
     60     ],
     61
     62     /**
     63 	 * @static
     64      * @description Keys used in the files tab of the statistics panel.
     65      * <pre>['files', 'file_progress', 'file_priorities']</pre>
     66 	 */
     67     Files: [
     68         'files', 'file_progress', 'file_priorities'
     69     ],
     70
     71     /**
     72      * @description Keys used in the peers tab of the statistics panel.
     73      * <pre>['peers', 'seed']</pre>
     74 	 * @static
     75 	 */
     76     Peers: [
     77         'peers', 'seeds'
     78     ],
     79
     80     /**
     81      * @description Keys used in the details tab of the statistics panel.
     82 	 * @static
     83 	 */
     84     Details: [
     85         'name', 'save_path', 'total_size', 'num_files', 'tracker_status',
     86         'tracker', 'comment'
     87     ],
     88
     89     /**
     90 	 * @static
     91 	 * @description Keys used in the options tab of the statistics panel.
     92 	 * <pre>['max_download_speed', 'max_upload_speed', 'max_connections', 'max_upload_slots',
     93 	 *  'is_auto_managed', 'stop_at_ratio', 'stop_ratio', 'remove_at_ratio', 'private',
     94 	 *  'prioritize_first_last']</pre>
     95 	 */
     96     Options: [
     97         'max_download_speed', 'max_upload_speed', 'max_connections',
     98         'max_upload_slots','is_auto_managed', 'stop_at_ratio', 'stop_ratio',
     99         'remove_at_ratio', 'private', 'prioritize_first_last'
    100     ]
    101 };
    102
    103 // Merge the grid and status keys together as the status keys contain all the
    104 // grid ones.
    105 Ext.each(Deluge.Keys.Grid, function(key) {
    106     Deluge.Keys.Status.push(key);
    107 });
    108