Skip to content
Open
5 changes: 5 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# If using nconf outside NEMS Linux, simply delete this file and rename the install file and folder to .php instead of .php_
AuthType Basic
AuthName "NEMS nConf"
AuthUserFile /var/www/htpasswd
Require valid-user
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
NConf README
============

**NConf is not dead.** It's just no longer developed by the original developer(s). Here is the most current NConf build, maintained by Robbie Ferguson for NEMS Linux.

NConf homepage:
http://www.nconf.org/

NEMS homepage:
http://baldnerd.com/nems/
https://nemslinux.com/

**THIS VERSION HAS BEEN RE-WORKED BY ROBBIE FERGUSON TO OPERATE UNDER PHP 7.0+ / mySQLi**

Expand Down
14 changes: 9 additions & 5 deletions bin/get_items.pl
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,25 @@
&logger(4,"Build the list of attributes to display");
my %attr_restrict;
if($opt_a){
# no strict 'refs';
&logger(5,"Reading attribute(s) selection");
my @attr_restrict = ();
if($opt_a eq "VISIBLE") {
&logger(5,"Keyword 'VISIBLE' found");
my %conf_attrs = getConfigAttrs();
foreach my $attr (keys(%{%conf_attrs->{$opt_c}})){
my $conf_attrs = getConfigAttrs();
foreach my $attr (keys(%{$conf_attrs->{$opt_c}})){
unless($attr){next}
my %conf_attrs = getConfigAttrs();
if($conf_attrs{$opt_c}->{$attr}->{'visible'} eq "yes"){
push(@attr_restrict, $attr);
}
}
}elsif($opt_a eq "NAGIOS") {
&logger(5,"Keyword 'NAGIOS' found");
my %conf_attrs = getConfigAttrs();
foreach my $attr (keys(%{%conf_attrs->{$opt_c}})){
my $conf_attrs = getConfigAttrs();
foreach my $attr (keys(%{$conf_attrs->{$opt_c}})){
unless($attr){next}
my %conf_attrs = getConfigAttrs();
if($conf_attrs{$opt_c}->{$attr}->{'write_to_conf'} eq "yes"){
push(@attr_restrict, $attr);
}
Expand Down Expand Up @@ -216,7 +219,8 @@
foreach my $item (@csv_items){
my $csv_record = undef;
foreach my $attr (keys(%csv_attrs)){
$csv_record = $csv_record.%{$item}->{$attr}.$csv_separator;
# $csv_record = $csv_record.%{$item}->{$attr}.$csv_separator;
$csv_record = $csv_record.$item->{$attr}.$csv_separator;
}
$csv_record =~ s/$csv_separator$//;
print "$csv_record\n";
Expand Down
9 changes: 5 additions & 4 deletions design_templates/nconf_fresh/new.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ text-align:left;
}

#logo {
background-image:url(nc-logo.gif);
background-image:url(/nconf/img/nconf_logo_sm.png);
background-repeat:no-repeat;
height:97px;
width:986px;
background-position: left center;
height:97px; /* these are the size of the wrapper */
width:986px; /* not the image */
}

#titlesub {
Expand Down Expand Up @@ -404,4 +405,4 @@ input[disabled], select[disabled], textarea[disabled] {
opacity: .35;
filter:Alpha(Opacity=35);
background-image: none;
}
}
2 changes: 1 addition & 1 deletion generate_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# but this will prevent lock file to stay there
if ( $lock_file_age < 600 ){
# some one other is generating the config
NConf_DEBUG::set('Someone else is already generating the configuration.', 'ERROR');
NConf_DEBUG::set('Someone else is already generating the configuration. If you believe this is in error, run: sudo nems-quickfix', 'ERROR');


# close page and cancel action
Expand Down
Binary file added img/ajax-loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/nconf_logo_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion include/head.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

?>

<title>NConf</title>
<title>NEMS NConf</title>
</head>


Expand Down
2 changes: 1 addition & 1 deletion include/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

define("COPYRIGHT_STRING", '<i>Copyright &copy; 2006 - 2012 <br>Sunrise Communications AG, Zurich, Switzerland</i>
<br><br>Project homepage: <a href="http://www.nconf.org/" target="_blank">www.nconf.org</a>
<br /><br />Adapted for NEMS by <a href="http://baldnerd.com" target="_blank">Robbie Ferguson</a>');
<br /><br />Adapted for <a href="https://nemslinux.com" target="_blank">Nagios Enterprise Monitoring Server</a> by <a href="http://baldnerd.com" target="_blank">Robbie Ferguson</a>');

define("DISCLAIMER_STRING", '<b>Developed by:</b>
<br>Fabian Gander, Angelo Gargiulo, Bernhard Waldvogel, Robbie Ferguson;
Expand Down