source: admin/WebConsole/asistentes/jscripts/asistentes.js @ a25cc03

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 a25cc03 was 62ccd9b, checked in by adv <adv@…>, 14 years ago

cloneRemoteFromMaster (engine,asistenteweb) ademas de multicast por unicast ticket:315

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

  • Property mode set to 100644
File size: 3.5 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 + " 1 " + form.PartOrigen.value + "  " + protocol  + " 1 " + form.PartOrigen.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:1"
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:1"
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:1"
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{
82precache="ogUnmountCache \n ogUnmountAll 1 \n ogDeletePartitionTable 1  \n ogUpdatePartitionTable 1 \n initCache "  + form.size4.value + " ";
83//alert(precache);
84}
85
86
87form.codigo.value="\
88" + precache + " \n \
89ogListPartitions 1 \n \
90ogCreatePartitions 1 " + value1 + " " + value2 + " " + value3 + " \n \
91ogSetPartitionActive 1 1 \n \
92ogUpdatePartitionTable 1 \n \
93ogListPartitions 1 \n";
94}
Note: See TracBrowser for help on using the repository browser.