diff options
Diffstat (limited to 'web')
| -rwxr-xr-x | web/api/read/switches-management | 2 | ||||
| -rw-r--r-- | web/js/nms-info-box.js | 4 | 
2 files changed, 3 insertions, 3 deletions
diff --git a/web/api/read/switches-management b/web/api/read/switches-management index 2dd329c..8d899b7 100755 --- a/web/api/read/switches-management +++ b/web/api/read/switches-management @@ -12,7 +12,7 @@ use Data::Dumper;  $nms::web::cc{'max-age'} = "60"; -my $q2 = $nms::web::dbh->prepare('select switch,sysname,mgmt_v4_addr,subnet4,subnet6,mgmt_v6_addr,mgmt_v4_gw,mgmt_v6_gw,mgmt_vlan,traffic_vlan,last_config_fetch,current_mac,poll_frequency,last_updated,distro_phy_port from switches where placement is not null'); +my $q2 = $nms::web::dbh->prepare('select sysname,mgmt_v4_addr,subnet4,subnet6,mgmt_v6_addr,mgmt_v4_gw,mgmt_v6_gw,mgmt_vlan,traffic_vlan,last_config_fetch,current_mac,poll_frequency,last_updated,distro_phy_port,community from switches where placement is not null');  $q2->execute();  while (my $ref = $q2->fetchrow_hashref()) { diff --git a/web/js/nms-info-box.js b/web/js/nms-info-box.js index 8ed1f2a..9efff37 100644 --- a/web/js/nms-info-box.js +++ b/web/js/nms-info-box.js @@ -766,7 +766,7 @@ var switchEditPanel = function () {  			var tmpsw = '\'' + this.sw + '\'';  			var tmpv = '\'' + v + '\'';  			var tmphandler = '"nmsInfoBox._editChange(' + tmpsw + ',' + tmpv + ');"'; -			var html = '<input type="text" class="form-control" value="' + template[v] + '" id="edit-' + this.sw + '-' + v + '" onchange=' + tmphandler + ' oninput=' + tmphandler + '>'; +			var html = '<input type="text" class="form-control" value="' + template[v] + '" id="edit-' + this.sw + '-' + v + '" onchange=' + tmphandler + ' oninput=' + tmphandler + ' ' + (v == 'sysname' ? "readonly" : "") + '>';  			content.push([v, html]);  		} @@ -786,6 +786,7 @@ var switchEditPanel = function () {  		output.id = "edit-output";  		domObj.appendChild(output); +		this._render(domObj);  		if (place) {  			var pval = document.getElementById("edit-" + this.sw + "-placement");  			if (pval) { @@ -793,7 +794,6 @@ var switchEditPanel = function () {  			}  		} -		this._render(domObj);  	};  	this.save = function () {  		var myData = nmsInfoBox._editStringify(this.sw);  | 
