diff options
| -rw-r--r-- | build/test/playbook-test.yml | 2 | ||||
| -rw-r--r-- | extras/misc/apache2.conf | 24 | ||||
| -rwxr-xr-x | include/config.pm.dist | 8 | ||||
| -rwxr-xr-x | web/api/public/dhcp | 2 | ||||
| -rwxr-xr-x | web/api/public/dhcp-summary | 2 | ||||
| -rwxr-xr-x | web/api/public/location | 2 | ||||
| -rwxr-xr-x | web/api/public/ping | 2 | ||||
| -rwxr-xr-x | web/api/public/switch-state | 2 | ||||
| -rwxr-xr-x | web/api/public/switches | 2 | ||||
| -rwxr-xr-x | web/api/read/comments | 2 | ||||
| -rwxr-xr-x | web/api/read/snmp | 2 | ||||
| -rwxr-xr-x | web/api/read/switches-management | 2 | ||||
| -rwxr-xr-x | web/api/write/comment-add | 2 | ||||
| -rwxr-xr-x | web/api/write/comment-change | 2 | ||||
| -rwxr-xr-x | web/api/write/switch-add | 2 | ||||
| -rwxr-xr-x | web/api/write/switch-update | 2 | 
16 files changed, 30 insertions, 30 deletions
| diff --git a/build/test/playbook-test.yml b/build/test/playbook-test.yml index 0cac807..2794b21 100644 --- a/build/test/playbook-test.yml +++ b/build/test/playbook-test.yml @@ -36,7 +36,7 @@          name: nms-front          image: nms-front-test          docker_api_version: 1.18 -        state: started +        state: reloaded          net: bridge          links:          - "nms-db:db" diff --git a/extras/misc/apache2.conf b/extras/misc/apache2.conf index 572e232..a2b1e83 100644 --- a/extras/misc/apache2.conf +++ b/extras/misc/apache2.conf @@ -3,36 +3,36 @@          ServerName nms.example.com          ServerAlias nms.example.com -        DocumentRoot /opt/tgnms/web -	ScriptAlias /api/write/ /opt/tgnms/web/api/write/ -	ScriptAlias /api/read/ /opt/tgnms/web/api/read/ -	ScriptAlias /api/public/ /opt/tgnms/web/api/public/ -	<Directory "/opt/tgnms/web/api/write/"> +        DocumentRoot /opt/nms/web +	ScriptAlias /api/write/ /opt/nms/web/api/write/ +	ScriptAlias /api/read/ /opt/nms/web/api/read/ +	ScriptAlias /api/public/ /opt/nms/web/api/public/ +	<Directory "/opt/nms/web/api/write/">  		AllowOverride None  		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch  		<RequireAny> -			AuthUserFile /opt/tgnms/etc/htpasswd-write -	                AuthName "Demo/test of tgnms write" +			AuthUserFile /opt/nms/etc/htpasswd-write +	                AuthName "Demo/test of nms write"          	        AuthType Basic  			Require valid-user  		</RequireAny>  	</Directory> -	<Directory "/opt/tgnms/web/api/read/"> +	<Directory "/opt/nms/web/api/read/">  		AllowOverride None  		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch  		<RequireAny> -			AuthUserFile /opt/tgnms/etc/htpasswd-read -	                AuthName "Demo/test of tgnms read" +			AuthUserFile /opt/nms/etc/htpasswd-read +	                AuthName "Demo/test of nms read"          	        AuthType Basic  			Require valid-user  		</RequireAny>  	</Directory> -	<Directory "/opt/tgnms/web/api/public/"> +	<Directory "/opt/nms/web/api/public/">  		AllowOverride None  		Options +ExecCGI -MultiViews +Indexes +SymLinksIfOwnerMatch  		Require all granted  	</Directory> -        <Directory "/opt/tgnms/web"> +        <Directory "/opt/nms/web">                  AllowOverride None                  Options Indexes FollowSymLinks MultiViews                  AddDefaultCharset UTF-8 diff --git a/include/config.pm.dist b/include/config.pm.dist index ff17111..9987d05 100755 --- a/include/config.pm.dist +++ b/include/config.pm.dist @@ -4,10 +4,10 @@ use warnings;  package nms::config;  # DB -our $db_name = "{ db_name }"; -our $db_host = "{ db_host }"; -our $db_username = "{ db_user }"; -our $db_password = "{ db_password }"; +our $db_name = "nms"; +our $db_host = "db"; +our $db_username = "nms"; +our $db_password = "risbrod";  # Max SNMP polls to fire off at the same time.  our $snmp_max = 20; diff --git a/web/api/public/dhcp b/web/api/public/dhcp index 7b048d1..d998c59 100755 --- a/web/api/public/dhcp +++ b/web/api/public/dhcp @@ -1,7 +1,7 @@  #! /usr/bin/perl  # vim:ts=8:sw=8 -use lib '../../../../include'; +use lib '/opt/nms/include';  use nms::web qw (%json finalize_output);  use strict;  use warnings; diff --git a/web/api/public/dhcp-summary b/web/api/public/dhcp-summary index a0e5609..73460e7 100755 --- a/web/api/public/dhcp-summary +++ b/web/api/public/dhcp-summary @@ -1,5 +1,5 @@  #! /usr/bin/perl -use lib '../../../../include'; +use lib '/opt/nms/include';  use strict;  use warnings;  use nms::web; diff --git a/web/api/public/location b/web/api/public/location index b940007..70b6ffd 100755 --- a/web/api/public/location +++ b/web/api/public/location @@ -1,7 +1,7 @@  #! /usr/bin/perl  # vim:ts=8:sw=8 -use lib '../../../../include'; +use lib '/opt/nms/include';  use nms::web;  use strict;  use warnings; diff --git a/web/api/public/ping b/web/api/public/ping index 811708d..27a8933 100755 --- a/web/api/public/ping +++ b/web/api/public/ping @@ -1,5 +1,5 @@  #! /usr/bin/perl -use lib '../../../../include'; +use lib '/opt/nms/include';  use strict;  use warnings;  use nms::web; diff --git a/web/api/public/switch-state b/web/api/public/switch-state index a6caea9..5cc7e73 100755 --- a/web/api/public/switch-state +++ b/web/api/public/switch-state @@ -1,7 +1,7 @@  #! /usr/bin/perl  # vim:ts=8:sw=8 -use lib '../../../../include'; +use lib '/opt/nms/include';  use nms::web qw (%json finalize_output);  use strict;  use warnings; diff --git a/web/api/public/switches b/web/api/public/switches index 890b7d7..1322ba6 100755 --- a/web/api/public/switches +++ b/web/api/public/switches @@ -3,7 +3,7 @@  use CGI qw(fatalsToBrowser);  use DBI; -use lib '../../../../include'; +use lib '/opt/nms/include';  use nms;  use nms::web;  use strict; diff --git a/web/api/read/comments b/web/api/read/comments index 4adfb2b..eb3b45a 100755 --- a/web/api/read/comments +++ b/web/api/read/comments @@ -1,7 +1,7 @@  #! /usr/bin/perl  # vim:ts=8:sw=8 -use lib '../../../../include'; +use lib '/opt/nms/include';  use nms::web;  use strict;  use warnings; diff --git a/web/api/read/snmp b/web/api/read/snmp index f69ca62..711de65 100755 --- a/web/api/read/snmp +++ b/web/api/read/snmp @@ -3,7 +3,7 @@  use CGI qw(fatalsToBrowser);  use DBI; -use lib '../../../../include'; +use lib '/opt/nms/include';  use nms;  use nms::web;  use strict; diff --git a/web/api/read/switches-management b/web/api/read/switches-management index 4461a90..94ab5f5 100755 --- a/web/api/read/switches-management +++ b/web/api/read/switches-management @@ -3,7 +3,7 @@  use CGI qw(fatalsToBrowser);  use DBI; -use lib '../../../../include'; +use lib '/opt/nms/include';  use nms;  use nms::web;  use strict; diff --git a/web/api/write/comment-add b/web/api/write/comment-add index bcea6dc..8d4899c 100755 --- a/web/api/write/comment-add +++ b/web/api/write/comment-add @@ -1,6 +1,6 @@  #! /usr/bin/perl  # vim:ts=8:sw=8 -use lib '../../../../include'; +use lib '/opt/nms/include';  use utf8;  use nms::web qw($dbh db_safe_quote get_input finalize_output);  use strict; diff --git a/web/api/write/comment-change b/web/api/write/comment-change index 0bdabc0..91b9824 100755 --- a/web/api/write/comment-change +++ b/web/api/write/comment-change @@ -1,6 +1,6 @@  #! /usr/bin/perl  # vim:ts=8:sw=8 -use lib '../../../../include'; +use lib '/opt/nms/include';  use utf8;  use nms;  use nms::web qw($dbh db_safe_quote get_input finalize_output); diff --git a/web/api/write/switch-add b/web/api/write/switch-add index 0051111..3950b10 100755 --- a/web/api/write/switch-add +++ b/web/api/write/switch-add @@ -3,7 +3,7 @@  #use CGI qw(fatalsToBrowser);  use DBI; -use lib '../../../../include'; +use lib '/opt/nms/include';  use nms;  use nms::web qw(%get_params %json finalize_output get_input $dbh);  use nms::util qw(guess_placement); diff --git a/web/api/write/switch-update b/web/api/write/switch-update index 14c8773..a463390 100755 --- a/web/api/write/switch-update +++ b/web/api/write/switch-update @@ -3,7 +3,7 @@  #use CGI qw(fatalsToBrowser);  use DBI; -use lib '../../../../include'; +use lib '/opt/nms/include';  use nms;  use nms::web qw(%get_params %json finalize_output get_input $dbh);  use nms::util qw(guess_placement); | 
