Author: jfthomps
Date: Tue Apr 24 20:18:34 2012
New Revision: 1329989
URL: http://svn.apache.org/viewvc?rev=1329989&view=rev
Log:
VCL-545
changed references to vmware_mac_eth[0/1]_generated to eth[0/1]generated
utils.php: modified getVMProfiles
vm.php:
-modified editVMInfo
-modified AJupdateVMprofileItem
vm.js:
-modified getVMprofileDataCB
-modified delProfile
Modified:
incubator/vcl/trunk/web/.ht-inc/utils.php
incubator/vcl/trunk/web/.ht-inc/vm.php
incubator/vcl/trunk/web/js/vm.js
Modified: incubator/vcl/trunk/web/.ht-inc/utils.php
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/utils.php?rev=1329989&r1=1329988&r2=1329989&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/utils.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/utils.php Tue Apr 24 20:18:34 2012
@@ -9303,8 +9303,12 @@ function generateString($length=8) {
/// \b virtualswitch1 - name of second virtual switch\n
/// \b vmdisk - "localdisk" or "networkdisk" - whether or not vm files are
/// stored on local disk or network attached storage\n
-/// \b username - vmware username associated with this profile\n
-/// \b password - vmware password associated with this profile
+/// \b username - username associated with this profile\n
+/// \b password - password associated with this profile\n
+/// \b eth0generated - boolean telling if the MAC address for eth0 should be
+/// autogenerated\n
+/// \b eth1generated - boolean telling if the MAC address for eth1 should be
+/// autogenerated
///
/// \brief gets information about vm profiles and returns it as an array
///
@@ -9323,8 +9327,8 @@ function getVMProfiles($id="") {
. "vp.vmdisk, "
. "vp.username, "
. "vp.password, "
- . "vp.vmware_mac_eth0_generated, "
- . "vp.vmware_mac_eth1_generated "
+ . "vp.eth0generated, "
+ . "vp.eth1generated "
. "FROM vmprofile vp "
. "LEFT JOIN image i ON (vp.imageid = i.id)";
if(! empty($id))
Modified: incubator/vcl/trunk/web/.ht-inc/vm.php
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/vm.php?rev=1329989&r1=1329988&r2=1329989&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/vm.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/vm.php Tue Apr 24 20:18:34 2012
@@ -244,14 +244,14 @@ function editVMInfo() {
print " </tr>\n";
print " <tr>\n";
print " <th align=right>Generate eth0 MAC:</th>\n";
- print " <td><select id=pgenmac0 dojoType=\"dijit.form.Select\"
searchAttr=\"name\" onchange=\"updateProfile('pgenmac0',
'vmware_mac_eth0_generated');\">\n";
+ print " <td><select id=pgenmac0 dojoType=\"dijit.form.Select\"
searchAttr=\"name\" onchange=\"updateProfile('pgenmac0',
'eth0generated');\">\n";
print " <option value=\"1\">Yes</option>\n";
print " <option value=\"0\">No</option>\n";
print " </select></td>\n";
print " </tr>\n";
print " <tr>\n";
print " <th align=right>Generate eth1 MAC:</th>\n";
- print " <td><select id=pgenmac1 dojoType=\"dijit.form.Select\"
searchAttr=\"name\" onchange=\"updateProfile('pgenmac1',
'vmware_mac_eth1_generated');\">\n";
+ print " <td><select id=pgenmac1 dojoType=\"dijit.form.Select\"
searchAttr=\"name\" onchange=\"updateProfile('pgenmac1',
'eth1generated');\">\n";
print " <option value=\"1\">Yes</option>\n";
print " <option value=\"0\">No</option>\n";
print " </select></td>\n";
@@ -801,7 +801,7 @@ function AJupdateVMprofileItem() {
}
$profileid = processInputVar('profileid', ARG_NUMERIC);
$item = processInputVar('item', ARG_STRING);
- if(!
preg_match('/^(profilename|imageid|repositorypath|datastorepath|vmpath|virtualswitch0|virtualswitch1|vmdisk|username|password|vmware_mac_eth0_generated|vmware_mac_eth1_generated)$/',
$item)) {
+ if(!
preg_match('/^(profilename|imageid|repositorypath|datastorepath|vmpath|virtualswitch0|virtualswitch1|vmdisk|username|password|eth0generated|eth1generated)$/',
$item)) {
print "alert('Invalid data submitted.');";
return;
}
Modified: incubator/vcl/trunk/web/js/vm.js
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/vm.js?rev=1329989&r1=1329988&r2=1329989&view=diff
==============================================================================
--- incubator/vcl/trunk/web/js/vm.js (original)
+++ incubator/vcl/trunk/web/js/vm.js Tue Apr 24 20:18:34 2012
@@ -596,8 +596,8 @@ function getVMprofileDataCB(data, ioArgs
dijit.byId('pvs0').setValue(curprofile.virtualswitch0);
dijit.byId('pvs1').setValue(curprofile.virtualswitch1);
dijit.byId('pusername').setValue(curprofile.username);
- dijit.byId('pgenmac0').setValue(curprofile.vmware_mac_eth0_generated);
- dijit.byId('pgenmac1').setValue(curprofile.vmware_mac_eth1_generated);
+ dijit.byId('pgenmac0').setValue(curprofile.eth0generated);
+ dijit.byId('pgenmac1').setValue(curprofile.eth1generated);
document.getElementById('ppassword').value = curprofile.password;
document.getElementById('ppwdconfirm').value = curprofile.password;
checkProfilePassword();
@@ -687,14 +687,14 @@ function delProfile(cont) {
content += "</tr>";
content += "<tr>";
content += "<th align=right>Generate eth0 MAC:</th>";
- if(curprofile.vmware_mac_eth0_generated == 0)
+ if(curprofile.eth0generated == 0)
content += "<td>No</td>";
else
content += "<td>Yes</td>";
content += "</tr>";
content += "<tr>";
content += "<th align=right>Generate eth1 MAC:</th>";
- if(curprofile.vmware_mac_eth1_generated == 0)
+ if(curprofile.eth1generated == 0)
content += "<td>No</td>";
else
content += "<td>Yes</td>";