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

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 5269592 was eb3e2b8, checked in by adv <adv@…>, 14 years ago

branch 1.0 menu asistentes

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

  • Property mode set to 100644
File size: 3.0 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){
12form.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;
13}
14
15function codeDeployImage(form){
16switch (form.idmetodo.value)
17{
18        case "MULTICAST":
19                protocol="MULTICAST " + form.mcastpuerto.value  + ":" + form.mcastmodo.value + ":" + form.mcastdireccion.value + ":" + form.mcastvelocidad.value + "M:" + form.mcastnclien.value + ":" + form.mcastseg.value + " ";
20                break;
21        case "TORRENT":
22                protocol=" TORRENT " +  form.modp2p.value + ":" + form.timep2p.value;
23                break;
24}
25//form.codigo.value="deployImage REPO /";
26form.codigo.value="deployImage REPO /" + form.idimagen.value + " 1 " + form.idparticion.value + " " + protocol  ;
27}
28
29function codeParticionado(form){
30var value1;
31var value2;
32var value3;
33var precache;
34if (form.check1.checked) {
35        if (form.part1.value == "CUSTOM" ) {value1 = form.part1custom.value}
36        else {value1 = form.part1.value};
37        if (form.size1.value == "CUSTOM")  {value1 += ":" + form.size1custom.value}
38        else {value1 += ":" + form.size1.value};
39}
40else
41{
42   value1 = "EMPTY:1"
43}
44if (form.check2.checked) {
45        if (form.part2.value == "CUSTOM" ) {value2 = form.part2custom.value}
46        else {value2 = form.part2.value};
47        if (form.size2.value == "CUSTOM")  {value2 += ":" + form.size2custom.value}
48        else {value2 += ":" + form.size2.value};
49}
50else
51{
52   value2 = "EMPTY:1"
53}
54if (form.check3.checked) {
55        if (form.part3.value == "CUSTOM" ) {value3 = form.part3custom.value}
56        else {value3 = form.part3.value};
57        if (form.size3.value == "CUSTOM")  {value3 += ":" + form.size3custom.value}
58        else {value3 += ":" + form.size3.value};
59}
60else
61{
62   value3 = "EMPTY:1"
63}
64
65if (form.size4.value == "0") {
66precache="ogUnmountCache \n ogUnmountAll 1 \n sizecache=`ogGetPartitionSize 1 4` \n ogDeletePartitionTable 1  \n ogUpdatePartitionTable 1 \n initCache $sizecache ";
67//alert(precache);
68}
69else
70{
71precache="ogUnmountCache \n ogUnmountAll 1 \n ogDeletePartitionTable 1  \n ogUpdatePartitionTable 1 \n initCache "  + form.size4.value + " ";
72//alert(precache);
73}
74
75
76form.codigo.value="\
77" + precache + " \n \
78ogListPartitions 1 \n \
79ogCreatePartitions 1 " + value1 + " " + value2 + " " + value3 + " \n \
80ogSetPartitionActive 1 1 \n \
81ogUpdatePartitionTable 1 \n \
82ogListPartitions 1 \n";
83}
Note: See TracBrowser for help on using the repository browser.