Changeset 2095 for lliurex-mirror


Ignore:
Timestamp:
Jul 4, 2016, 3:00:48 PM (3 years ago)
Author:
kbut
Message:

wip

Location:
lliurex-mirror/trunk/fuentes/admin-center-lliurex-mirror.install/lliurex-mirror
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • lliurex-mirror/trunk/fuentes/admin-center-lliurex-mirror.install/lliurex-mirror/module.json

    r2011 r2095  
    44  "name": "LliureX Mirror",
    55  "description": "Mirror Manager",
    6   "main":"main2.html",
     6  "main":"main.html",
    77  "icon":"lliurex-mirror.png",
    88  "components": []
  • lliurex-mirror/trunk/fuentes/admin-center-lliurex-mirror.install/lliurex-mirror/src/js/lliurex-mirror.js

    r2085 r2095  
    120120  var labellocalpath = document.createElement('input');
    121121  internet.type = 'radio';
     122  internet.addEventListener('change',function(){
     123    self.setOrig('lliurex.net/xenial');
     124    self.showOrigin();
     125  });
    122126  url.type = 'radio';
     127  url.addEventListener('change',function(){
     128    self.setOrig(labelurl.value);
     129    self.showOrigin();
     130  });
    123131  localpath.type = 'radio';
    124132  internet.name = 'orig';
     
    127135  labelinternet.innerHTML = 'Lliurex.net';
    128136  labelurl.type = 'text';
    129   labelurl.id = 'perro';
     137  labelurl.id = 'origurl';
    130138  labelurl.addEventListener('input',function(){
    131139    self.modifyGuiOrig();
     
    159167  var self = this;
    160168  clearTimeout(self.urlorig);
    161   self.urlorig = setTimeout(function(){console.log(document.querySelector('#perro').value)},1500);
     169  self.urlorig = setTimeout(function(){
     170    self.setOrig(document.querySelector('#origurl').value);
     171    self.showOrigin();}
     172    ,1500);
    162173}
    163174
     
    223234}
    224235
     236LliurexMirror.prototype.setOrig = function setOrig(orig){
     237  var self = this;
     238  var credentials=[sessionStorage.username , sessionStorage.password];
     239  var n4dclass="MirrorManager";
     240  var n4dmethod="set_mirror_orig";
     241  var distro = self.distros[self.defaultdistro];
     242  var arglist = [distro,orig];
     243  Utils.n4d(credentials, n4dclass, n4dmethod, arglist, function(){});
     244}
    225245
    226246
  • lliurex-mirror/trunk/fuentes/admin-center-lliurex-mirror.install/lliurex-mirror/src/main.html

    r1964 r2095  
    11
    2 <h1 i18n>Mirror Manager</h1>
    3 
    4 <div id="lliurex_mirror_first_run" style="display:none;" class="lliurex_mirror_div panel panel-primary col-lg-8 col-lg-offset-2">
    5   <div class="panel-body">
    6   <div class="lliurex_mirror_status_icon lliurex_mirror_no_mirror col-lg-3"></div>
    7   <div class="lliurex_mirror_description_div col-lg-9">
    8     <div class="lliurex_mirror_description_title" i18n>LliureX Mirror not configured</div>
    9     <div class="lliurex_mirror_description_text" i18n>There is no any LliureX mirror configured on system. What do you want to do?</div>
    10     <ul class="lliurex_mirror_option_list">
    11       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_create_32_bit_mirror">Create 32 bit mirror</span></li>
    12       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_create_64_bit_mirror">Create 64 bit mirror</span></li>
    13       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_create_full_mirror">Create 32 bit and 64 bit mirror</span></li>
    14       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_import_mirror">Import Mirror</span></li>
    15     </ul>
    16   </div>
    17   </div>
    18 </div>
    19 
    20 
    21 <div id="lliurex_mirror_32_installed" style="display:none;"  class="lliurex_mirror_div panel panel-primary col-lg-8 col-lg-offset-2">
    22   <div class="panel-body">
    23   <div class="lliurex_mirror_status_icon lliurex_mirror_32  col-lg-3" id="lliurex_mirror_status_icon_installed"></div>
    24   <div class="lliurex_mirror_description_div col-lg-9">
    25     <div class="lliurex_mirror_description_title" i18n>32 bit Mirror</div>
    26     <div class="lliurex_mirror_description_text" i18n>There is a 32 bit mirror configured. You can update it or perform additional stuff.</div>
    27     <ul class="lliurex_mirror_option_list">
    28       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_add_64_bit_mirror">Add 64 bit mirror</span></li>
    29       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_remove_mirror">Remove Mirror</span></li>
    30       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_export_mirror">Export Mirror</span></li>
    31       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_update_from_server">Update from any server</span></li>
    32     </ul>
    33   </div>
    34   <div class="col-md-1"><button id="lliurex-mirror-update-32" class="btn btn-primary btn-lg" stle="clear: both;" value="UpdateMirror32"><span i18n>Update</span></button></div>
    35   </div>
    36 </div>
    37 
    38 
    39 <div id="lliurex_mirror_64_installed" style="display:none;"  class="lliurex_mirror_div panel panel-primary col-lg-8 col-lg-offset-2">
    40   <div class="panel-body">
    41   <div class="lliurex_mirror_status_icon lliurex_mirror_64  col-lg-3" id="lliurex_mirror_status_icon_installed"></div>
    42   <div class="lliurex_mirror_description_div col-lg-9">
    43     <div class="lliurex_mirror_description_title" i18n>64 bit Mirror</div>
    44     <div class="lliurex_mirror_description_text" i18n>There is a 64 bit mirror configured. You can update it or perform additional stuff.</div>
    45     <ul class="lliurex_mirror_option_list">
    46       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_add_32_bit_mirror">Add 32 bit mirror</span></li>
    47       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_remove_mirror">Remove Mirror</span></li>
    48       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_export_mirror">Export Mirror</span></li>
    49       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_update_from_server">Update from any server</span></li>
    50     </ul>
    51   </div>
    52   <div class="col-md-1"><button id="lliurex-mirror-update-64" class="btn btn-primary btn-lg" stle="clear: both;" value="UpdateMirror64"><span i18n>Update</span></button></div>
    53   </div>
    54 </div>
    55 
    56 
    57 <div id="lliurex_mirror_full_installed" style="display:none;"  class="lliurex_mirror_div panel panel-primary col-lg-8 col-lg-offset-2">
    58   <div class="panel-body">
    59   <div class="lliurex_mirror_status_icon lliurex_mirror_full col-lg-3" id="lliurex_mirror_status_icon_installed"></div>
    60   <div class="lliurex_mirror_description_div col-lg-8">
    61     <div class="lliurex_mirror_description_title" i18n>LliureX Mirror 32 and 64 bit</div>
    62     <div class="lliurex_mirror_description_text" i18n>There is a complete mirror configured. You can update it or perform additional stuff.</div>
    63     <ul class="lliurex_mirror_option_list">
    64       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_remove_mirror">Remove Mirror</span></li>
    65       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_export_mirror">Export Mirror</span></li>
    66       <li><span class="lliurex_mirror_il" i18n target="lliurex_mirror_update_from_server">Update from any server</span></li>
    67     </ul>
    68   </div>
    69   <div class="col-md-1"><button id="lliurex-mirror-update-full" class="btn btn-primary btn-lg" stle="clear: both;" value="UpdateMirrorFull"><span i18n>Update</span></button></div>
    70   </div>
    71 </div>
    72 
    73 
    74 <div id="lliurex_mirror_update_mirror_process" style="display:none;"  class="lliurex_mirror_div panel panel-primary col-lg-8 col-lg-offset-2">
    75   <div class="panel-body">
    76     <div class="lliurex_mirror_description_title" i18n>Update mirror process</div>
    77     <div id="llx-mirror-progress">
    78     <div class="progress progress-striped active" style="height: 16px; width: 100%">
    79       <div id="llx-mirror-progress-percent" class="progress-bar" style="width: 0%; height: 30px !important;"></div>
    80       </div>
    81    
    82     <div class="col-md-1 col-md-offset-10"><button id="lliurex-mirror-close_update" class="btn btn-disabled btn-raised" stle="clear: both;" value="UpdateMirror64"><span i18n>Update</span></button></div>
    83 </div>
    84    
    85  
    86  
    87 </div>
    88 
    89 <!--Status:<div id="llx-mirror-status"></div>
    90 
    91 Progress:<div id="llx-mirror-progress">
    92   <div class="progress progress-striped active" style="height: 16px; width: 300px;">
    93       <div id="llx-mirror-progress-percent" class="progress-bar" style="width: 0%; height: 30px !important;"></div>
    94       </div>
    95 </div>
    96 
    97 Config:<div id="llx-mirror-config"></div>
    98 
    99 <button id="llxMirror_updateMirror">Update</button>
    100 -->
     2        <div class="row text-center">
     3                <div class="col-xs-4 "></div>
     4                <div class="col-xs-4 text-center panel">
     5                        <div id="llxmirrorprogress"></div>
     6                        <div id="llxmirrorsize"></div>
     7                </div>
     8                <div class="col-xs-4"></div>
     9        </div>
     10        <div class="row">
     11                <div class="col-md-6 col-xs-12">
     12                        <div class="panel panel-info">
     13                                <div class="panel-heading"><h3 class="panel-title" i18n >Arquitectura</h3><i class="menu" id="llxmirrormenuarch"></i></div>
     14                                <div class="panel-body" id="llxmirrorarchitecture"></div>
     15                        </div>
     16                </div>
     17                <div class="col-md-6 col-xs-12">
     18                        <div class="panel panel-info">
     19                                <div class="panel-heading"><h3 class="panel-title" i18n >Origen</h3><i class="menu" id="llxmirrormenuorig"></i></div>
     20                                <div class="panel-body" id="llxmirrororig">lliurex.net</div>
     21                        </div>
     22                </div>
     23        </div>
     24        <div class="row" >
     25        <div id="llxmirrorconfiguration" class='llxmirrordisable' >
     26                <h1>LliureX</h1>
     27        </div>
     28        </div>
     29        <div class="row text-right">
     30               
     31                        <a href="http://www.google.es" class="btn btn-success btn-raised">Exportar</a>
     32                        <a href="http://www.google.es" class="btn btn-success btn-raised">Actualizar</a>
     33               
     34        </div>
Note: See TracChangeset for help on using the changeset viewer.