From: Matt <mat...@us...> - 2007-06-29 10:14:12
|
Update of /cvsroot/openqrm/plugins/linuxcoe/web/secure In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12016/plugins/linuxcoe/web/secure Modified Files: linuxcoe_manage_int.jsp linuxcoe_install_int.jsp Log Message: bit nicer Index: linuxcoe_manage_int.jsp =================================================================== RCS file: /cvsroot/openqrm/plugins/linuxcoe/web/secure/linuxcoe_manage_int.jsp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** linuxcoe_manage_int.jsp 26 Jun 2007 11:51:54 -0000 1.6 --- linuxcoe_manage_int.jsp 29 Jun 2007 10:14:06 -0000 1.7 *************** *** 47,61 **** LinuxCoeProfileManager manager = new LinuxCoeProfileManager(); manager.remove(profile); ! out.println("--> removed profile number : " +profile+ "!"); } else if(cmd.equals("clean")) { LinuxCoeProfileManager manager = new LinuxCoeProfileManager(); manager.clean(); ! out.println("--> cleaned scratch dir !"); } else { ! out.println("--> No such command !"); } } %> --- 47,92 ---- LinuxCoeProfileManager manager = new LinuxCoeProfileManager(); manager.remove(profile); ! // out.println("--> removed profile number : " +profile+ "!"); } else if(cmd.equals("clean")) { LinuxCoeProfileManager manager = new LinuxCoeProfileManager(); manager.clean(); ! // out.println("--> cleaned scratch dir !"); } else { ! out.println("--> No such command !<br>"); ! } ! } ! ! ! // check for iso's to unpack ! ! String linuxcoe_profile_dir = System.getenv("QRM_SERVER_BASE_DIR") + "/qrm/plugins/linuxcoe/web/secure/scratch_monkey/systemdesigner/"; ! File dir = new File(linuxcoe_profile_dir); ! String[] children = dir.list(); ! Boolean profile_exists = false; ! if (children != null) { ! // find .iso images to unpack ! for (int i=0; i<children.length; i++) { ! String filename = children[i]; ! if (filename.endsWith(".iso")) { ! // out.println("linuxcoe profile --> : " +filename+ "<br>"); ! profile_exists=true; ! // check if the profile was already unpacked ! String specific_linuxcoe_profile_dir = System.getenv("QRM_SERVER_BASE_DIR") + "/qrm/plugins/linuxcoe/web/secure/scratch_monkey/systemdesigner/" +filename+ "_unpacked"; ! File check_profile_exists = new File(specific_linuxcoe_profile_dir); ! if (!check_profile_exists.isDirectory()) { ! LinuxCoeProfileManager manager = new LinuxCoeProfileManager(); ! manager.unpack(filename); ! out.println("<b>Unpacked " +filename+ "</b><br>"); ! %> ! <b>Please <a href="javascript:location.reload()">reload</a> this page!</b><br> ! <% ! ! } } } + + %> *************** *** 82,124 **** <tr> - - - - <% - String linuxcoe_profile_dir = System.getenv("QRM_SERVER_BASE_DIR") + "/qrm/plugins/linuxcoe/web/secure/scratch_monkey/systemdesigner/"; - File dir = new File(linuxcoe_profile_dir); - String[] children = dir.list(); - Boolean profile_exists = false; - if (children != null) { - // find .iso images to unpack - for (int i=0; i<children.length; i++) { - String filename = children[i]; - if (filename.endsWith(".iso")) { - // out.println("linuxcoe profile --> : " +filename+ "<br>"); - profile_exists=true; - - // check if the profile was already unpacked - String specific_linuxcoe_profile_dir = System.getenv("QRM_SERVER_BASE_DIR") + "/qrm/plugins/linuxcoe/web/secure/scratch_monkey/systemdesigner/" +filename+ "_unpacked"; - File check_profile_exists = new File(specific_linuxcoe_profile_dir); - if (!check_profile_exists.isDirectory()) { - - out.println("<td>"); - out.println("--> : " +filename+ " needs to be unpacked<br>"); - LinuxCoeProfileManager manager = new LinuxCoeProfileManager(); - manager.unpack(filename); - out.println("--> : " +filename+ " unpacked now<br>"); - out.println("<br><b>Please reload this page now !</b><br>"); - out.println("</td><td></td><td></td>"); - out.println("</tr><tr>"); - - } - } - } - - - out.println("</tr><tr>"); - // get new list to find .iso images to unpack for (int i=0; i<children.length; i++) { --- 113,118 ---- *************** *** 136,140 **** out.println("</td>"); - profile_exists=true; --- 130,133 ---- Index: linuxcoe_install_int.jsp =================================================================== RCS file: /cvsroot/openqrm/plugins/linuxcoe/web/secure/linuxcoe_install_int.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** linuxcoe_install_int.jsp 26 Jun 2007 18:20:45 -0000 1.2 --- linuxcoe_install_int.jsp 29 Jun 2007 10:14:06 -0000 1.3 *************** *** 66,75 **** String install_method[] = request.getParameterValues("install_method"); method = install_method[0]; - - - if(cmd.equals("install")) { - - out.println("--> installing profile number : " +profile+ " install method " +method +" !"); } else if(cmd.equals("install_resource")) { --- 66,73 ---- String install_method[] = request.getParameterValues("install_method"); method = install_method[0]; + if(cmd.equals("install")) { + //out.println("--> selected profile number : " +profile+ " install method " +method +" !"); + cmd = "install"; } else if(cmd.equals("install_resource")) { *************** *** 80,87 **** LinuxCoeProfileManager manager = new LinuxCoeProfileManager(); manager.install(profile, method, id, ip); ! out.println("NOW installing profile number : " +profile+ " install method " +method+ "id " +id+ " ip " +ip+ " !"); } else { ! out.println("--> No such command !"); } } --- 78,85 ---- LinuxCoeProfileManager manager = new LinuxCoeProfileManager(); manager.install(profile, method, id, ip); ! out.println("<b>Installing profile number : " +profile+ " on node " +id+ "/" +ip+ " !</b><br>"); } else { ! out.println("--> No such command !<br>"); } } *************** *** 127,131 **** out.println("<td>"); ! out.print("node " +resource1.getId()); out.println("</td><td>"); out.print(resource1.getIpString()); --- 125,129 ---- out.println("<td>"); ! out.print("node " +resource1.getExternalId()); out.println("</td><td>"); out.print(resource1.getIpString()); |