Changeset 2943
- Timestamp:
- Nov 29, 2016, 1:44:33 PM (4 years ago)
- Location:
- llx-netinstall/trunk/fuentes
- Files:
-
- 1 added
- 1 deleted
- 8 edited
- 11 copied
- 11 moved
Legend:
- Unmodified
- Added
- Removed
-
llx-netinstall/trunk/fuentes/admin-center-llx-netinstall.install/lliurex-netinstall/src/i18n/ca-ES@valencia/messages.json
r2841 r2943 8 8 "lliurex_netinstall_enable_netinstall":["Habilita la instal·lació per xarxa"], 9 9 "lliurex_netinstall_enable_unattended":["Fes una instal·lació desatesa"], 10 "lliurex_netinstall_enable_stats": ["Habilita l'enviament d'estadistiques als desenvolupadors"], 11 "lliurex_netinstall_force_classroom": ["Habilita l'enviament d'estadistiques als clients d'aula"], 10 12 "lliurex_netinstall_username":["Usuari"], 11 13 "lliurex_netinstall_pass":["Contrassenya"], -
llx-netinstall/trunk/fuentes/admin-center-llx-netinstall.install/lliurex-netinstall/src/i18n/en-US/messages.json
r2841 r2943 8 8 "lliurex_netinstall_enable_netinstall":["Enable network installation"], 9 9 "lliurex_netinstall_enable_unattended":["Enable unattended install"], 10 "lliurex_netinstall_enable_stats": ["Enable send stats to developers"], 11 "lliurex_netinstall_force_classroom": ["Enable clasroom clients send stats"], 10 12 "lliurex_netinstall_username":["Username"], 11 13 "lliurex_netinstall_pass":["Password"], -
llx-netinstall/trunk/fuentes/admin-center-llx-netinstall.install/lliurex-netinstall/src/i18n/es-ES/messages.json
r2841 r2943 8 8 "lliurex_netinstall_enable_netinstall":["Habilita la instalación por red"], 9 9 "lliurex_netinstall_enable_unattended":["Realiza una instalación desatendida"], 10 "lliurex_netinstall_enable_stats": ["Habilita envio de estadisticas al equipo de desarrollo"], 11 "lliurex_netinstall_force_classroom": ["Habilita envio de estadisticas en clientes de aula"], 10 12 "lliurex_netinstall_username":["Usuario"], 11 13 "lliurex_netinstall_pass":["Contraseña"], -
llx-netinstall/trunk/fuentes/admin-center-llx-netinstall.install/lliurex-netinstall/src/js/lliurex-netinstall.js
r2841 r2943 4 4 this.netinstall=undefined; 5 5 this.unattended_netinstall=false; 6 7 } 6 this.netinstall_stats=true; 7 this.netinstall_force_class=true; 8 } 9 8 10 LlxNetinstall.prototype._=function _(text){ 9 11 return ( i18n.gettext("lliurex-netinstall", text)); … … 23 25 self.netinstall=response.netinstall; 24 26 self.unattended_netinstall=response.unattended; 27 self.netinstall_stats=response.stats; 28 self.netinstall_force_class=response.force_class; 25 29 //console.log(self.netinstall); 26 30 //console.log(self.unattended_netinstall); … … 40 44 var netinstallunattended=""; 41 45 var netinstallunattendeddisabled=""; 42 43 if (self.netinstall===true) 46 var netinstall_stats=""; 47 var netinstall_force_classroom=""; 48 49 if (self.netinstall_stats===true){ 50 netinstall_stats="checked"; 51 } 52 if (self.netinstall_force_class===true){ 53 netinstall_force_classroom="checked"; 54 } 55 56 if (self.netinstall===true){ 44 57 netinstallchecked="checked"; 45 else netinstallunattendeddisabled="disabled"; 58 }else{ 59 netinstallunattendeddisabled="disabled"; 60 } 46 61 47 62 if (self.unattended_netinstall===true) { … … 61 76 "disabled": netinstallunattendeddisabled, 62 77 "help":self._("lliurex_netinstall_enable_unattended")}); 63 78 79 content+=Utils.formFactory.createCheckbox({"id":"llx_netinstall_do_stats", 80 "label":self._("lliurex_netinstall_enable_stats"), 81 "default":netinstall_stats, 82 "disabled": "", 83 "help":self._("lliurex_netinstall_enable_stats")}); 84 85 content+=Utils.formFactory.createCheckbox({"id":"llx_netinstall_force_classroom", 86 "label":self._("lliurex_netinstall_force_classroom"), 87 "default":netinstall_force_classroom, 88 "disabled": "", 89 "help":self._("lliurex_netinstall_force_classroom")}); 90 64 91 content+=Utils.formFactory.createText({"id":"llx_netinstall_setnetinstall_user", 65 92 "label": self._("lliurex_netinstall_username"), … … 90 117 $("#llx_netinstall_apply_config").show(); 91 118 119 $("#llx_netinstall_do_stats").off("click"); 120 $("#llx_netinstall_do_stats").on("click", function(){ 121 self.netinstall_stats=!self.netinstall_stats; 122 } 123 ); 124 125 $("#llx_netinstall_force_classroom").off("click"); 126 $("#llx_netinstall_force_classroom").on("click", function(){ 127 self.netinstall_force_class=!self.netinstall_force_class; 128 } 129 ); 92 130 $("#llx_netinstall_setnetinstall").off("click"); 93 131 $("#llx_netinstall_setnetinstall").on("click", function(){ … … 140 178 var password=($("#llx_netinstall_setnetinstall_pass").val()); 141 179 var rootpassword=($("#llx_netinstall_setnetinstall_pass_root").val()); 142 180 143 181 144 182 var credentials=[sessionStorage.username, sessionStorage.password]; 145 183 var n4dclass="NetinstallManager"; 146 184 var n4dmethod="setNetinstall"; 147 var arglist=[self.netinstall.toString(), self.unattended_netinstall.toString() ];185 var arglist=[self.netinstall.toString(), self.unattended_netinstall.toString(), self.netinstall_stats.toString(), self.netinstall_force_class.toString()]; 148 186 149 187 -
llx-netinstall/trunk/fuentes/debian/changelog
r2849 r2943 1 llx-netinstall (0.50) xenial; urgency=medium 2 3 * Clean templates 4 * Add stats to netinstall 5 6 -- M.Angel Juan <m.angel.juan@gmail.com> Tue, 29 Nov 2016 13:43:33 +0100 7 1 8 llx-netinstall (0.49) xenial; urgency=high 2 9 -
llx-netinstall/trunk/fuentes/install.llx-netinstall/usr/share/llx-netinstall/templates/client-with-stats.cfg
r2938 r2943 2 2 ldap-auth-config ldap-auth-config/ldapns/ldap-server string ldap://server/ 3 3 d-i pkgsel/include string lliurex-meta-client 4 lliurex-stats lliurex-stats/unnatended bool true 5 lliurex-stats lliurex-stats/acknowledge select true 6 -
llx-netinstall/trunk/fuentes/install.llx-netinstall/usr/share/llx-netinstall/templates/desktop-with-stats.cfg
r2938 r2943 2 2 ldap-auth-config ldap-auth-config/ldapns/ldap-server string ldap://127.0.0.1/ 3 3 d-i pkgsel/include string lliurex-meta-desktop 4 lliurex-stats lliurex-stats/unnatended bool true 5 lliurex-stats lliurex-stats/acknowledge select true 4 6 -
llx-netinstall/trunk/fuentes/install.llx-netinstall/usr/share/llx-netinstall/templates/infantil-with-stats.cfg
r2938 r2943 2 2 ldap-auth-config ldap-auth-config/ldapns/ldap-server string ldap://127.0.0.1/ 3 3 d-i pkgsel/include string lliurex-meta-infantil 4 lliurex-stats lliurex-stats/unnatended bool true 5 lliurex-stats lliurex-stats/acknowledge select true 6 -
llx-netinstall/trunk/fuentes/install.llx-netinstall/usr/share/llxbootmanager/www-boot/pxemenu.d/90-netinstall.php
r2841 r2943 26 26 $put_amd64=true; 27 27 } 28 29 30 $str_pxelinux=""; 31 if (strtolower($json["netinstall_stats"])=="true"){ 32 $str_pxelinux="pxelinux-stats.cfg"; 33 }else{ 34 $str_pxelinux="pxelinux.cfg"; 35 } 28 36 29 37 if ($put_x86){ … … 32 40 MENU LABEL Instal.la LliureX en aquest ordinador x86 33 41 KERNEL pxe-ltsp/netinstall/ubuntu-installer/i386/boot-screens/vesamenu.c32 34 CONFIG pxe-ltsp/netinstall/ubuntu-installer/i386/ pxelinux.cfg/default pxe-ltsp/netinstall/\n";42 CONFIG pxe-ltsp/netinstall/ubuntu-installer/i386/$str_pxelinux/default pxe-ltsp/netinstall/\n"; 35 43 } 36 44 … … 40 48 MENU LABEL Instal.la LliureX en aquest ordinador amd64 41 49 KERNEL pxe-ltsp/netinstall/ubuntu-installer/amd64/boot-screens/vesamenu.c32 42 CONFIG pxe-ltsp/netinstall/ubuntu-installer/amd64/ pxelinux.cfg/default pxe-ltsp/netinstall/\n";50 CONFIG pxe-ltsp/netinstall/ubuntu-installer/amd64/$str_pxelinux/default pxe-ltsp/netinstall/\n"; 43 51 } 44 52 -
llx-netinstall/trunk/fuentes/install.llx-netinstall/usr/share/n4d/python-plugins/NetinstallManager.py
r2841 r2943 109 109 else: 110 110 unattended=False; 111 112 return {"netinstall":netinstall, "unattended":unattended} 111 112 if(data["netinstall_stats"].lower()!="false"): 113 do_stats=True; 114 else: 115 do_stats=False; 116 117 var_status=self.get_force_classroom_stats() 118 json_status=data["netinstall_force_class"].lower() 119 120 ret=True 121 if (var_status == '1'): 122 if json_status == 'false': 123 ret=self.setNetinstall(data["netinstall_boot"].lower(),data["netinstall_unattended"].lower(),data["netinstall_stats"].lower(),var_status) 124 force_class=True; 125 126 if (var_status == '0'): 127 if json_status == 'true': 128 ret=self.setNetinstall(data["netinstall_boot"].lower(),data["netinstall_unattended"].lower(),data["netinstall_stats"].lower(),var_status) 129 force_class=False 130 131 if ret['status'].lower() == 'true': 132 return {"netinstall":netinstall, "unattended":unattended, "stats": do_stats, "force_class":force_class} 133 else: 134 raise Exception('Error setting json file') 113 135 114 136 115 137 # END def GetNetInstall 116 138 117 def setNetinstall(self, status, unattended ):139 def setNetinstall(self, status, unattended,stats,force_class): 118 140 ''' 119 141 sets option for netinstall int bootopt.json (status and unattended install) … … 125 147 path_to_write = os.path.join(self.imagepath,"netinstall.json") 126 148 f = open(path_to_write,'w') 127 data='{"netinstall_boot":"'+str(status)+'", "netinstall_unattended":"'+str(unattended)+'"}' 149 if force_class == '1': 150 bool_force = 'true' 151 else: 152 bool_force = 'false' 153 data='{"netinstall_boot":"'+str(status)+'", "netinstall_unattended":"'+str(unattended)+'", "netinstall_stats":"'+str(stats)+'", "netinstall_force_class":"'+str(bool_force)+'"}' 128 154 f.writelines(data) 129 155 f.close() … … 138 164 self.setNetinstallUnattended(status, "", "", "") 139 165 166 # Set force_classroom stats 167 self.set_force_classroom_stats(bool_force) 168 140 169 return {"status":"true", "msg":"all ok"} 141 170 … … 150 179 151 180 # END def getListTemplate(self, image) 152 181 182 def set_force_classroom_stats(self,stats): 183 var_name='STATS_ENABLED' 184 manager = objects['VariablesManager'] 185 stats_value = manager.get_variable(var_name) 186 187 if stats_value == None: 188 # Register new variable 189 ret,msg=manager.add_variable(var_name,'0','','Stats enabled','lliurex-statistics') 190 if ret==True: 191 ret,msg=manager.init_variable(var_name,'0'); 192 if ret!=True: 193 raise Exception('Error initalizing variable') 194 else: 195 raise Exception('Error adding variable') 196 if stats.lower() == 'true' or stats == '1': 197 # Enable 198 ret,msg=manager.set_variable(var_name,'1') 199 else: 200 # Disable 201 ret,msg=manager.set_variable(var_name,'0') 202 if ret != True: 203 raise Exception('Error setting variable') 204 else: 205 return True 206 #END def set_force_classroom_stats(self,status) 207 208 def get_force_classroom_stats(self): 209 var_name='STATS_ENABLED' 210 manager = objects['VariablesManager'] 211 stats_value = manager.get_variable(var_name) 212 213 if stats_value == None: 214 # Register new variable 215 ret,msg=manager.add_variable(var_name,'0','','Stats enabled','lliurex-statistics') 216 if ret==True: 217 ret,msg=manager.init_variable(var_name,'0'); 218 if ret!=True: 219 raise Exception('Error initalizing variable') 220 else: 221 raise Exception('Error adding variable') 222 else: 223 return stats_value 224 225 226 #END def get_force_classroom_stats(self): 227 153 228 def setNetinstallUnattended(self, status, username, password, rootpassword): 154 229 ''' -
llx-netinstall/trunk/fuentes/install.llx-netinstall/var/lib/tftpboot/ltsp/netinstall/ubuntu-installer/amd64/boot-screens/menu-stats.cfg
r2938 r2943 5 5 menu title Installer boot menu 6 6 include ubuntu-installer/amd64/boot-screens/stdmenu.cfg 7 include ubuntu-installer/amd64/boot-screens/txt .cfg7 include ubuntu-installer/amd64/boot-screens/txt-stats.cfg 8 8 include ubuntu-installer/amd64/boot-screens/gtk.cfg 9 9 menu begin advanced -
llx-netinstall/trunk/fuentes/install.llx-netinstall/var/lib/tftpboot/ltsp/netinstall/ubuntu-installer/amd64/boot-screens/syslinux-stats.cfg
r2938 r2943 1 1 # D-I config version 2.0 2 include ubuntu-installer/amd64/boot-screens/menu .cfg2 include ubuntu-installer/amd64/boot-screens/menu-stats.cfg 3 3 default ubuntu-installer/amd64/boot-screens/vesamenu.c32 4 4 prompt 0 -
llx-netinstall/trunk/fuentes/install.llx-netinstall/var/lib/tftpboot/ltsp/netinstall/ubuntu-installer/amd64/boot-screens/txt-stats.cfg
r2938 r2943 4 4 menu label ^Install Client 5 5 kernel ubuntu-installer/amd64/linux 6 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/amd64/initrd.lz auto=true priority=critical preseed/url=http://preseed/client .cfg net.ifnames=0 biosdevname=06 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/amd64/initrd.lz auto=true priority=critical preseed/url=http://preseed/client-with-stats.cfg net.ifnames=0 biosdevname=0 7 7 8 8 label install Desktop 9 9 menu label ^Install Desktop 10 10 kernel ubuntu-installer/amd64/linux 11 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/amd64/initrd.lz auto=true priority=critical preseed/url=http://preseed/desktop .cfg net.ifnames=0 biosdevname=011 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/amd64/initrd.lz auto=true priority=critical preseed/url=http://preseed/desktop-with-stats.cfg net.ifnames=0 biosdevname=0 12 12 13 13 label install Infantil 14 14 menu label ^Install Infantil 15 15 kernel ubuntu-installer/amd64/linux 16 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/amd64/initrd.lz auto=true priority=critical preseed/url=http://preseed/infantil .cfg net.ifnames=0 biosdevname=016 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/amd64/initrd.lz auto=true priority=critical preseed/url=http://preseed/infantil-with-stats.cfg net.ifnames=0 biosdevname=0 17 17 18 18 #label install gva -
llx-netinstall/trunk/fuentes/install.llx-netinstall/var/lib/tftpboot/ltsp/netinstall/ubuntu-installer/amd64/pxelinux-stats.cfg/default
r239 r2943 1 link ../boot-screens/syslinux .cfg1 link ../boot-screens/syslinux-stats.cfg -
llx-netinstall/trunk/fuentes/install.llx-netinstall/var/lib/tftpboot/ltsp/netinstall/ubuntu-installer/i386/boot-screens/menu-stats.cfg
r2938 r2943 5 5 menu title Installer boot menu 6 6 include ubuntu-installer/i386/boot-screens/stdmenu.cfg 7 include ubuntu-installer/i386/boot-screens/txt .cfg7 include ubuntu-installer/i386/boot-screens/txt-stats.cfg 8 8 include ubuntu-installer/i386/boot-screens/gtk.cfg 9 9 menu begin advanced -
llx-netinstall/trunk/fuentes/install.llx-netinstall/var/lib/tftpboot/ltsp/netinstall/ubuntu-installer/i386/boot-screens/syslinux-stats.cfg
r2938 r2943 1 1 # D-I config version 2.0 2 include ubuntu-installer/i386/boot-screens/menu .cfg2 include ubuntu-installer/i386/boot-screens/menu-stats.cfg 3 3 default ubuntu-installer/i386/boot-screens/vesamenu.c32 4 4 prompt 0 -
llx-netinstall/trunk/fuentes/install.llx-netinstall/var/lib/tftpboot/ltsp/netinstall/ubuntu-installer/i386/boot-screens/txt-stats.cfg
r2938 r2943 4 4 menu label ^Install Client 5 5 kernel ubuntu-installer/i386/linux 6 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/i386/initrd.lz auto=true priority=critical preseed/url=http://preseed/client .cfg net.ifnames=0 biosdevname=06 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/i386/initrd.lz auto=true priority=critical preseed/url=http://preseed/client-stats.cfg net.ifnames=0 biosdevname=0 7 7 8 8 label install Desktop 9 9 menu label ^Install Desktop 10 10 kernel ubuntu-installer/i386/linux 11 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/i386/initrd.lz auto=true priority=critical preseed/url=http://preseed/desktop .cfg net.ifnames=0 biosdevname=011 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/i386/initrd.lz auto=true priority=critical preseed/url=http://preseed/desktop-stats.cfg net.ifnames=0 biosdevname=0 12 12 13 13 label install Infantil 14 14 menu label ^Install Infantil 15 15 kernel ubuntu-installer/i386/linux 16 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/i386/initrd.lz auto=true priority=critical preseed/url=http://preseed/infantil .cfg net.ifnames=0 biosdevname=016 append video=vesa:ywrap,mtrr vga=788 initrd=ubuntu-installer/i386/initrd.lz auto=true priority=critical preseed/url=http://preseed/infantil-stats.cfg net.ifnames=0 biosdevname=0 17 17 18 18 #label install gva
Note: See TracChangeset
for help on using the changeset viewer.