vcl-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jftho...@apache.org
Subject svn commit: r1647571 - in /vcl/trunk/web: .ht-inc/computer.php .ht-inc/managementnode.php js/resources/computer.js js/resources/managementnode.js
Date Tue, 23 Dec 2014 13:28:48 GMT
Author: jfthomps
Date: Tue Dec 23 13:28:48 2014
New Revision: 1647571

URL: http://svn.apache.org/r1647571
Log:
VCL-174 - NAT - support for sites that have small IP address ranges

computer.php:
-modified fieldWidth: added natpublicIPaddress and natinternalIPaddress
-modified fieldDisplayName: added nathostenabled, natpublicIPaddress, and natinternalIPaddress

managementnode.php:
-modified fieldWidth: added natpublicIPaddress and natinternalIPaddress
-modified fieldDisplayName: added nathostenabled, natpublicIPaddress, and natinternalIPaddress

computer.js:
-modified colformatter: added nathostenabled
-modified saveResourceCB: when editing, added setValue calls for nathostenabled, natpublicIPaddress,
and natinternalIPaddress

managementnode.js:
-modified colformatter: added nathostenabled
-modified saveResourceCB: when editing, added setValue calls for nathostenabled, natpublicIPaddress,
and natinternalIPaddress

Modified:
    vcl/trunk/web/.ht-inc/computer.php
    vcl/trunk/web/.ht-inc/managementnode.php
    vcl/trunk/web/js/resources/computer.js
    vcl/trunk/web/js/resources/managementnode.js

Modified: vcl/trunk/web/.ht-inc/computer.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/computer.php?rev=1647571&r1=1647570&r2=1647571&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/computer.php (original)
+++ vcl/trunk/web/.ht-inc/computer.php Tue Dec 23 13:28:48 2014
@@ -86,6 +86,8 @@ class Computer extends Resource {
 				break;
 			case 'IPaddress':
 			case 'privateIPaddress':
+			case 'natpublicIPaddress':
+			case 'natinternalIPaddress':
 				$w = 8;
 				break;
 			case 'eth0macaddress':
@@ -165,6 +167,12 @@ class Computer extends Resource {
 				return 'Connect Using NAT';
 			case 'nathost':
 				return 'NAT Host';
+			case 'nathostenabled':
+				return 'Use as NAT Host';
+			case 'natpublicIPaddress':
+				return 'NAT Public IP Address';
+			case 'natinternalIPaddress':
+				return 'NAT Internal IP Address';
 		}
 		return ucfirst($field);
 	}

Modified: vcl/trunk/web/.ht-inc/managementnode.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/managementnode.php?rev=1647571&r1=1647570&r2=1647571&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/managementnode.php (original)
+++ vcl/trunk/web/.ht-inc/managementnode.php Tue Dec 23 13:28:48 2014
@@ -87,6 +87,8 @@ class ManagementNode extends Resource {
 			case 'publicIPconfig':
 			case 'publicnetmask':
 			case 'publicgateway':
+			case 'natpublicIPaddress':
+			case 'natinternalIPaddress':
 				$w = 8;
 				break;
 			case 'installpath':
@@ -166,6 +168,12 @@ class ManagementNode extends Resource {
 				return 'Federated Auth. Affiliations';
 			case 'timeservers':
 				return 'Time Servers';
+			case 'nathostenabled':
+				return 'Use as NAT Host';
+			case 'natpublicIPaddress':
+				return 'NAT Public IP Address';
+			case 'natinternalIPaddress':
+				return 'NAT Internal IP Address';
 		}
 		return ucfirst($field);
 	}

Modified: vcl/trunk/web/js/resources/computer.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/resources/computer.js?rev=1647571&r1=1647570&r2=1647571&view=diff
==============================================================================
--- vcl/trunk/web/js/resources/computer.js (original)
+++ vcl/trunk/web/js/resources/computer.js Tue Dec 23 13:28:48 2014
@@ -94,7 +94,8 @@ Computer.prototype.colformatter = functi
 		return value.replace('@', '<br>').replace(/\n/g, '<br>');
 	}
 	else if(obj.field == 'deleted' ||
-	        obj.field == 'natenabled') {
+	        obj.field == 'natenabled' ||
+	        obj.field == 'nathostenabled') {
 		if(value == "0")
 			return '<span class="rederrormsg">false</span>';
 		if(value == "1")
@@ -916,6 +917,9 @@ function saveResourceCB(data, ioArgs) {
 					resourcegrid.store.setValue(item, 'provisioning', data.items.data.provisioning);
 					resourcegrid.store.setValue(item, 'natenabled', data.items.data.natenabled);
 					resourcegrid.store.setValue(item, 'nathost', data.items.data.nathost);
+					resourcegrid.store.setValue(item, 'nathostenabled', data.items.data.nathostenabled);
+					resourcegrid.store.setValue(item, 'natpublicIPaddress', data.items.data.natpublicIPaddress);
+					resourcegrid.store.setValue(item, 'natinternalIPaddress', data.items.data.natinternalIPaddress);
 				},
 				onComplete: function(items, result) {
 					// when call resourcegrid.sort directly, the table contents disappear; not sure why

Modified: vcl/trunk/web/js/resources/managementnode.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/resources/managementnode.js?rev=1647571&r1=1647570&r2=1647571&view=diff
==============================================================================
--- vcl/trunk/web/js/resources/managementnode.js (original)
+++ vcl/trunk/web/js/resources/managementnode.js Tue Dec 23 13:28:48 2014
@@ -25,7 +25,8 @@ ManagementNode.prototype = new Resource(
 
 ManagementNode.prototype.colformatter = function(value, rowIndex, obj) {
 	if(obj.field == 'imagelibenable' ||
-	   obj.field == 'deleted') {
+	   obj.field == 'deleted' ||
+	   obj.field == 'nathostenabled') {
 		if(value == "0")
 			return '<span class="rederrormsg">false</span>';
 		if(value == "1")
@@ -287,6 +288,9 @@ function saveResourceCB(data, ioArgs) {
 					resourcegrid.store.setValue(item, 'state', data.items.data.state);
 					resourcegrid.store.setValue(item, 'sysadminemail', data.items.data.sysadminemail);
 					resourcegrid.store.setValue(item, 'timeservers', data.items.data.timeservers);
+					resourcegrid.store.setValue(item, 'nathostenabled', data.items.data.nathostenabled);
+					resourcegrid.store.setValue(item, 'natpublicIPaddress', data.items.data.natpublicIPaddress);
+					resourcegrid.store.setValue(item, 'natinternalIPaddress', data.items.data.natinternalIPaddress);
 				},
 				onComplete: function(items, result) {
 					// when call resourcegrid.sort directly, the table contents disappear; not sure why



Mime
View raw message