Changeset 2136
- Timestamp:
- Jul 8, 2016, 6:07:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-mirror/trunk/fuentes/admin-center-lliurex-mirror.install/lliurex-mirror/src/js/lliurex-mirror.js
r2118 r2136 6 6 this.edit = null; 7 7 this.progressoptionsdefault = {color:this.progresscolors['ok'], trailcolor:'#9f9f9f', trailWidth:3, strokeWidth: 3, easing: 'easeInOut', text: {value:''}}; 8 this.intervalupdate = null; 8 9 } 9 10 … … 39 40 var n4dmethod="update"; 40 41 var arglist=[self.distros[self.defaultdistro]]; 41 Utils.n4d(credentials, n4dclass, n4dmethod, arglist, function getmirrororig(response){42 Utils.n4d(credentials, n4dclass, n4dmethod, arglist, function updatemirror(response){ 42 43 if(response['status']){ 43 setTimeout(function(){ 44 Utils.n4d('', n4dclass, 'get_percentage', arglist, function getpercentage(response){ 45 self.bars[self.defaultdistro].animate(1 - (100 - response[self.defaultdistro]) / 100 ); 44 self.intervalupdate = setInterval(function(){ 45 console.log('pasa'); 46 Utils.n4d(credentials,n4dclass,'is_alive',[],function check_alive(response){ 47 console.log(response); 48 if (response['status']){ 49 self.bars[self.distros[self.defaultdistro]].path.setAttribute('color',self.progresscolors['working']); 50 Utils.n4d('', n4dclass, 'get_percentage', arglist, function getpercentage(response){ 51 self.bars[self.distros[self.defaultdistro]].animate(1 - (100 - response['msg']) / 100 ); 52 }); 53 } 54 else{ 55 if(response['msg'] == 0){ 56 self.bars[self.distros[self.defaultdistro]].path.setArchitecture('color',self.progresscolors['ok']); 57 } 58 else{ 59 self.bars[self.distros[self.defaultdistro]].path.setArchitecture('color',self.progresscolors['error']); 60 } 61 clearInterval(self.intervalupdate); 62 } 46 63 }); 47 64 }
Note: See TracChangeset
for help on using the changeset viewer.