Send Netdot-devel mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-devel digest..."
Today's Topics:
1. [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.5-rc1-7-g5750cf6 ([email protected])
2. [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.5-rc1-8-g85243da ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Tue, 4 Feb 2014 13:03:56 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.5-rc1-7-g5750cf6
To: [email protected]
Message-ID: <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".
The branch, netdot-1.0 has been updated
via 5750cf60dc7005d7a54196683a9aab599d996995 (commit)
via 0210d31fbbc5a19f572ed17fca19d1b390b9488a (commit)
from 41a9d2bdc11b84d970c105c5afbcd313fef0019f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5750cf60dc7005d7a54196683a9aab599d996995
Merge: 0210d31 41a9d2b
Author: Carlos Vicente <[email protected]>
Date: Tue Feb 4 16:03:48 2014 -0500
Merge branch 'netdot-1.0' of
ssh://netdot.uoregon.edu//home/netdot/git/netdot into netdot-1.0
commit 0210d31fbbc5a19f572ed17fca19d1b390b9488a
Author: Carlos Vicente <[email protected]>
Date: Tue Feb 4 16:03:04 2014 -0500
Fix error when trying to use 'BGP' or 'All' view options on a device
without BGP peers in device.html
diff --git a/htdocs/management/device.html b/htdocs/management/device.html
index 91474f2..5f068fd 100644
--- a/htdocs/management/device.html
+++ b/htdocs/management/device.html
@@ -1207,6 +1207,8 @@ if ( $editips || $add_ip ) {
% if ( $view eq "BGP" || $view eq "All"){
+% if ( $o->bgppeers ){
+
% my (@field_headers, @cell_data);
% push( @field_headers, "BGP ID: " );
% push( @cell_data, $ui->form_field(object=>$o, column=>"bgpid",
edit=>$editdevbgp, returnValOnly=>1) );
@@ -1343,6 +1345,8 @@ if ( $ipeers ){
% }
% }
+
+%}
<!-- End BGP Peers Section -->
%#######################################################################
-----------------------------------------------------------------------
Summary of changes:
htdocs/management/device.html | 4 ++++
1 file changed, 4 insertions(+)
hooks/post-receive
--
Netdot
------------------------------
Message: 2
Date: Wed, 5 Feb 2014 11:58:05 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.5-rc1-8-g85243da
To: [email protected]
Message-ID: <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".
The branch, netdot-1.0 has been updated
via 85243da281a7b41f3baf4ae4e0fd7a2531a09320 (commit)
from 5750cf60dc7005d7a54196683a9aab599d996995 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 85243da281a7b41f3baf4ae4e0fd7a2531a09320
Author: Carlos Vicente <[email protected]>
Date: Wed Feb 5 14:57:54 2014 -0500
Remove references to old BinFile table. Fix audit log problem when
inserting pictures
diff --git a/lib/Netdot/Model.pm b/lib/Netdot/Model.pm
index f736d9b..345b90f 100644
--- a/lib/Netdot/Model.pm
+++ b/lib/Netdot/Model.pm
@@ -28,7 +28,12 @@ my $db_type = __PACKAGE__->config->get('DB_TYPE');
my %EXCLUDE_AUDIT = (
'audit' => 1,
'datacache' => 1,
- 'hostaudit' => 1
+ 'hostaudit' => 1,
+ );
+
+# Columns to exclude from audit
+my %EXCLUDE_AUDIT_COL = (
+ 'bindata' => 1,
);
BEGIN {
@@ -139,6 +144,7 @@ BEGIN {
if ( $args{operation} eq 'insert' ){
my (@fields, @values);
foreach my $col ( $self->columns ){
+ next if exists $EXCLUDE_AUDIT_COL{$col};
if ( defined $self->$col ){
push @fields, $col;
if ( $self->$col && blessed($self->$col) ){
@@ -158,6 +164,7 @@ BEGIN {
return if ( $data{fields} eq 'modified' );
my @values;
foreach my $col ( @$changed_columns ){
+ next if exists $EXCLUDE_AUDIT_COL{$col};
if ( $self->$col && blessed($self->$col) ){
push @values, $self->$col->get_label();
}else{
diff --git a/lib/Netdot/Model/Picture.pm b/lib/Netdot/Model/Picture.pm
index 6317637..1979583 100644
--- a/lib/Netdot/Model/Picture.pm
+++ b/lib/Netdot/Model/Picture.pm
@@ -87,14 +87,15 @@ sub _decode_bindata{
return 1 unless ( $self->config->get('DB_TYPE') eq 'Pg' );
my $id = $self->id;
my $dbh = $self->db_Main;
- my $encoded = ($dbh->selectrow_array("SELECT bindata FROM binfile WHERE id
= $id"))[0];
+ my $table = lc($self->table);
+ my $encoded = ($dbh->selectrow_array("SELECT bindata FROM $table WHERE id
= $id"))[0];
unless ( $encoded ){
- $logger->error("BinFile::_decode_bindata: No bindata available for
BinFile id $id");
+ $logger->error("Picture::_decode_bindata: No bindata available for
$table id $id");
return 1;
}
my $decoded = APR::Base64::decode($encoded);
unless ( $decoded ){
- $logger->error("BinFile::_decode_bindata: Problem decoding bindata for
BinFile id $id");
+ $logger->error("Picture::_decode_bindata: Problem decoding bindata for
$table id $id");
return 1;
}
$self->_attribute_store( bindata => $decoded );
diff --git a/lib/Netdot/UI.pm b/lib/Netdot/UI.pm
index 70ee933..5ba9098 100644
--- a/lib/Netdot/UI.pm
+++ b/lib/Netdot/UI.pm
@@ -31,9 +31,11 @@ Netdot::UI groups common methods and variables related to
Netdot's user interfac
# Some tables have a specific view page.
#
-my %VIEWPAGE = ( BinFile => "../generic/display_bin.html",
+my %VIEWPAGE = ( ClosetPicture => "../generic/display_bin.html",
+ FloorPicture => "../generic/display_bin.html",
+ SitePicture => "../generic/display_bin.html",
BackboneCable => "../cable_plant/cable_backbone.html",
- CableStrand => "../cable_plant/cable_strand.html",
+ CableStrand => "../cable_plant/cable_strand.html",
Closet => "../cable_plant/closet.html",
Circuit => "../cable_plant/circuit.html",
ContactList => "contactlist.html",
@@ -913,7 +915,7 @@ the value from the DB (if any).
or False if failure
Examples:
- $ui->text_field(object=>$pic->binfile, table=>"BinFile",
column=>"filename", edit=>$editPictures);
+ $ui->text_field(object=>$o, table=>"Site", column=>"name");
=cut
-----------------------------------------------------------------------
Summary of changes:
lib/Netdot/Model.pm | 9 ++++++++-
lib/Netdot/Model/Picture.pm | 7 ++++---
lib/Netdot/UI.pm | 8 +++++---
3 files changed, 17 insertions(+), 7 deletions(-)
hooks/post-receive
--
Netdot
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 83, Issue 4
*******************************************