source: admin/WebConsole/asistentes/jscripts/asistentes.js @ 4e51cb0

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 4e51cb0 was eb9424f, checked in by ramon <ramongomez@…>, 14 years ago

branches/version1.0: aplicar cambios de la rama trunk para desarrollar version 1.0.1

git-svn-id: https://opengnsys.es/svn/branches/version1.0@1920 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 3.7 KB
Line 
1// ***********************************************************************************************************
2// Libreria de scripts de Javascript
3// Autor:
4// Fecha Creación: 2011
5// Fecha Última modificación: enero-2011
6// Nombre del fichero: asistentes.js
7// Descripción :
8//              Este fichero implementa las funciones javascript del fichero AsistentesEjecutarScripts.php (Comandos)
9// ***********************************************************************************************************
10
11function codeCloneRemotePartition(form){
12switch (form.idmetodo.value)
13{
14        case "MULTICAST":
15                protocol="MULTICAST " + form.mcastpuerto.value  + ":" + form.mcastmodo.value + ":" + form.mcastdireccion.value + ":" + form.mcastvelocidad.value + "M:" + form.mcastnclien.value + ":" + form.mcastseg.value + " ";
16                break;
17        case "UNICAST":
18                protocol="UNICAST " +  form.ucastport.value + ":" + form.ucastclient.value + " ";
19                break;
20}
21//form.codigo.value="cloneRemoteFromMaster " + form.ipMaster.value + " 1 " + form.PartOrigen.value + "  " + form.mcastpuerto.value  + ":" + form.mcastmodo.value + ":" + form.mcastdireccion.value + ":" + form.mcastvelocidad.value + "M:" + form.mcastnclien.value + ":" + form.mcastseg.value + " 1 " + form.PartOrigen.value + " " + form.tool.value + " " + form.compresor.value;
22form.codigo.value="cloneRemoteFromMaster " + form.ipMaster.value + " " + form.source.value + "  " + protocol  + " " + form.targetpart.value + " " + form.tool.value + " " + form.compresor.value;
23
24}
25
26function codeDeployImage(form){
27switch (form.idmetodo.value)
28{
29        case "MULTICAST":
30                protocol="MULTICAST " + form.mcastpuerto.value  + ":" + form.mcastmodo.value + ":" + form.mcastdireccion.value + ":" + form.mcastvelocidad.value + "M:" + form.mcastnclien.value + ":" + form.mcastseg.value + " ";
31                break;
32        case "TORRENT":
33                protocol=" TORRENT " +  form.modp2p.value + ":" + form.timep2p.value;
34                break;
35}
36//form.codigo.value="deployImage REPO /";
37form.codigo.value="deployImage REPO /" + form.idimagen.value + " 1 " + form.idparticion.value + " " + protocol  ;
38}
39
40function codeParticionado(form){
41var value1;
42var value2;
43var value3;
44var precache;
45if (form.check1.checked) {
46        if (form.part1.value == "CUSTOM" ) {value1 = form.part1custom.value}
47        else {value1 = form.part1.value};
48        if (form.size1.value == "CUSTOM")  {value1 += ":" + form.size1custom.value}
49        else {value1 += ":" + form.size1.value};
50}
51else
52{
53   value1 = "EMPTY:0"
54}
55if (form.check2.checked) {
56        if (form.part2.value == "CUSTOM" ) {value2 = form.part2custom.value}
57        else {value2 = form.part2.value};
58        if (form.size2.value == "CUSTOM")  {value2 += ":" + form.size2custom.value}
59        else {value2 += ":" + form.size2.value};
60}
61else
62{
63   value2 = "EMPTY:0"
64}
65if (form.check3.checked) {
66        if (form.part3.value == "CUSTOM" ) {value3 = form.part3custom.value}
67        else {value3 = form.part3.value};
68        if (form.size3.value == "CUSTOM")  {value3 += ":" + form.size3custom.value}
69        else {value3 += ":" + form.size3.value};
70}
71else
72{
73   value3 = "EMPTY:0"
74}
75
76if (form.size4.value == "0") {
77precache="ogUnmountCache \n ogUnmountAll 1 \n sizecache=`ogGetPartitionSize 1 4` \n ogDeletePartitionTable 1  \n ogUpdatePartitionTable 1 \n initCache $sizecache ";
78//alert(precache);
79}
80else
81{
82        if (form.size4.value == "CUSTOM") 
83        {
84                cachesize = form.size4custom.value;
85        }
86        else
87        {
88                cachesize = form.size4.value;
89        }
90        precache="ogUnmountCache \n ogUnmountAll 1 \n ogDeletePartitionTable 1  \n ogUpdatePartitionTable 1 \n initCache "  + cachesize + " ";
91        //alert(precache);
92}
93
94
95form.codigo.value="\
96" + precache + " \n \
97ogListPartitions 1 \n \
98ogCreatePartitions 1 " + value1 + " " + value2 + " " + value3 + " \n \
99ogSetPartitionActive 1 1 \n \
100ogUpdatePartitionTable 1 \n \
101ogListPartitions 1 \n";
102}
Note: See TracBrowser for help on using the repository browser.