Skip to content

Commit

Permalink
Revert "Replaced basic authentication with form authentication"
Browse files Browse the repository at this point in the history
This reverts commit fc00b01.
  • Loading branch information
John C. Frickson committed Feb 23, 2017
1 parent cde8780 commit f1616f8
Show file tree
Hide file tree
Showing 23 changed files with 76 additions and 201 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ html/angularjs/ui-utils-0.2.1
html/bootstrap-3.3.0
html/d3
html/index.php
html/js/config.js
7 changes: 0 additions & 7 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ note that this functionality has been disabled by default in this
release. If you still want to use it, run ./configure with the
parameter --enable-corewindow

The Nagios core web pages now have a login page and a "Logout" button
in the "General" section of the side menu bar. To enable these new
features, you must update the apache configuration file for Nagios
(nagios.conf) either by running `make install-webconf` or copying the
appropriate sections from `sample-config/nagios.cfg` and include the
session, session_cookie, and session_crypto apache modules.


nagios-3.0
----------
Expand Down
27 changes: 3 additions & 24 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@ enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
PERL
apachepw
USE_EVENTBROKER
INITDIR
BASEEXTRALIBS
Expand All @@ -645,7 +644,6 @@ MOD_LDFLAGS
MOD_CFLAGS
BROKERLIBS
BROKER_LDFLAGS
cgi2url
cgiurl
htmurl
COREWINDOW
Expand Down Expand Up @@ -749,7 +747,6 @@ with_gd_inc
enable_corewindow
enable_statusmap
enable_statuswrl
with_cgi2url
with_cgiurl
with_htmurl
enable_nanosleep
Expand Down Expand Up @@ -1413,12 +1410,9 @@ Optional Packages:
poll, or select
--with-gd-lib=DIR sets location of the gd library
--with-gd-inc=DIR sets location of the gd include files
--with-cgi2url=<local-url>
sets URL for scripts calling cgi programs - defaults
to /nagios/cgi-bin (do not use a trailing slash)
--with-cgiurl=<local-url>
sets URL for cgi programs - defaults to
/nagios/cgibin (do not use a trailing slash)
sets URL for cgi programs (do not use a trailing
slash)
--with-htmurl=<local-url>
sets URL for public html
Expand Down Expand Up @@ -5466,20 +5460,11 @@ _ACEOF
fi
# Check whether --with-cgi2url was given.
if test "${with_cgi2url+set}" = set; then :
withval=$with_cgi2url; cgi2url=$withval
else
cgi2url=/nagios/cgi-bin
fi
# Check whether --with-cgiurl was given.
if test "${with_cgiurl+set}" = set; then :
withval=$with_cgiurl; cgiurl=$withval
else
cgiurl=/nagios/cgibin
cgiurl=/nagios/cgi-bin
fi
Expand All @@ -5495,7 +5480,6 @@ fi
USE_NANOSLEEP=yes
# Check whether --enable-nanosleep was given.
if test "${enable_nanosleep+set}" = set; then :
Expand Down Expand Up @@ -5905,9 +5889,6 @@ fi
apachepw=`echo "$$ \`date\`" | md5sum | cut -d' ' -f1`
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Expand Down Expand Up @@ -7389,8 +7370,6 @@ echo " ------------------------"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: HTML URL: http://localhost$htmurl/" >&5
$as_echo " HTML URL: http://localhost$htmurl/" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CGI URL for Scripts: http://localhost$cgi2url/" >&5
$as_echo " CGI URL for Scripts: http://localhost$cgi2url/" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CGI URL: http://localhost$cgiurl/" >&5
$as_echo " CGI URL: http://localhost$cgiurl/" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Traceroute (used by WAP): $PATH_TO_TRACEROUTE" >&5
Expand Down
15 changes: 2 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -550,17 +550,11 @@ if test x$TRYGD = xyep; then
fi
fi

AC_ARG_WITH(cgi2url,
AC_HELP_STRING([--with-cgi2url=<local-url>],
[sets URL for scripts calling cgi programs - defaults to /nagios/cgi-bin (do not use a trailing slash)]),
cgi2url=$withval,
cgi2url=/nagios/cgi-bin
)
AC_ARG_WITH(cgiurl,
AC_HELP_STRING([--with-cgiurl=<local-url>],
[sets URL for cgi programs - defaults to /nagios/cgibin (do not use a trailing slash)]),
[sets URL for cgi programs (do not use a trailing slash)]),
cgiurl=$withval,
cgiurl=/nagios/cgibin
cgiurl=/nagios/cgi-bin
)
AC_ARG_WITH(htmurl,
AC_HELP_STRING([--with-htmurl=<local-url>],
Expand All @@ -570,7 +564,6 @@ AC_ARG_WITH(htmurl,
)
AC_SUBST(htmurl)
AC_SUBST(cgiurl)
AC_SUBST(cgi2url)

USE_NANOSLEEP=yes
AC_ARG_ENABLE(nanosleep,
Expand Down Expand Up @@ -791,9 +784,6 @@ AC_SUBST(BASEEXTRALIBS)
AC_SUBST(INITDIR)
AC_SUBST(USE_EVENTBROKER)

apachepw=`echo "$$ \`date\`" | md5sum | cut -d' ' -f1`
AC_SUBST(apachepw)

AC_PATH_PROG(PERL,perl)
if test -z "$PERL"; then
AC_MSG_ERROR([Cannot continue without perl!])
Expand Down Expand Up @@ -863,7 +853,6 @@ echo " Web Interface Options:"
echo " ------------------------"

AC_MSG_RESULT([ HTML URL: http://localhost$htmurl/])
AC_MSG_RESULT([ CGI URL for Scripts: http://localhost$cgi2url/])
AC_MSG_RESULT([ CGI URL: http://localhost$cgiurl/])
AC_MSG_RESULT([ Traceroute (used by WAP): $PATH_TO_TRACEROUTE])

Expand Down
3 changes: 1 addition & 2 deletions html/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ clean:
rm -rf d3

distclean: clean
rm -f Makefile config.inc.php index.php
rm -f Makefile config.inc.php

devclean: distclean

Expand Down Expand Up @@ -74,7 +74,6 @@ install:
rm -f $(DESTDIR)$(HTMLDIR)/rss-*
rm -rf $(DESTDIR)$(HTMLDIR)/include/rss
$(INSTALL) -m 664 $(INSTALL_OPTS) jsonquery.html $(DESTDIR)$(HTMLDIR)
$(INSTALL) -m 664 $(INSTALL_OPTS) login.html $(DESTDIR)$(HTMLDIR)
# New graphical CGI pages
$(INSTALL) -m 664 $(INSTALL_OPTS) graph-header.html $(DESTDIR)$(HTMLDIR)
$(INSTALL) -m 664 $(INSTALL_OPTS) histogram.html $(DESTDIR)$(HTMLDIR)
Expand Down
1 change: 0 additions & 1 deletion html/histogram.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
src="angularjs/ui-utils-0.2.1/ui-utils.js"></script>
<script type="text/javascript" src="d3/d3.min.js"></script>
<script type="text/javascript" src="spin/spin.min.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/histogram.js"></script>
<script type="text/javascript" src="js/histogram-events.js"></script>
<script type="text/javascript" src="js/histogram-form.js"></script>
Expand Down
Binary file removed html/images/corelogo.gif
Binary file not shown.
2 changes: 1 addition & 1 deletion html/index.php.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $this_year = '2017';
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<script LANGUAGE="javascript">
var n = Math.round(Math.random() * 10000000000);
document.write("<title>Nagios Core @VERSION@ on " + window.location.hostname + "</title>");
document.write("<title>Nagios Core on " + window.location.hostname + "</title>");
document.cookie = "NagFormId=" + n.toString(16);
</script>
<link rel="shortcut icon" href="images/favicon.ico" type="image/ico">
Expand Down
2 changes: 0 additions & 2 deletions html/js/config.js.in

This file was deleted.

2 changes: 1 addition & 1 deletion html/js/histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ angular.module("histogramApp", ["ui.bootstrap", "ui.utils",
// URL parameters
$scope.params = {
cgiurl: $scope.search.cgiurl ? $scope.search.cgiurl :
$location.absUrl().replace(/histogram\.html.*$/, nagcfg.cgidir),
$location.absUrl().replace(/histogram\.html.*$/, "cgi-bin/"),
reporttype: $scope.search.reporttype ?
$scope.search.reporttype : "",
host: $scope.search.host ? $scope.search.host : "",
Expand Down
10 changes: 5 additions & 5 deletions html/js/jsonquery.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$( document).ready( function() {
var parts = $(location).attr( 'href').split( '/');
parts.pop();
parts.pop()
var baseurl = parts.join( '/');

$('#query button').attr('disabled','disabled');
Expand Down Expand Up @@ -257,7 +257,7 @@ $( document).ready( function() {
}
}
$.ajax({
url: baseurl + '/' + nagcfg.cgidir + cgi + '.cgi',
url: baseurl + '/cgi-bin/' + cgi + '.cgi',
data: parameters,
success: success,
async: false
Expand Down Expand Up @@ -431,7 +431,7 @@ $( document).ready( function() {
$('#query button').attr('disabled','disabled');
}
else {
$.get( baseurl + '/' + nagcfg.cgidir + cginame,
$.get( baseurl + '/cgi-bin/' + cginame,
{ query: "help" }, function(data, results) {
help = data;
buildForm(data);
Expand Down Expand Up @@ -541,7 +541,7 @@ $( document).ready( function() {
}
}
var p = jQuery.param( parameters);
var url = baseurl + '/' + nagcfg.cgidir + cginame + '?' + p
var url = baseurl + '/cgi-bin/' + cginame + '?' + p
$('#results').append(
$('<p></p>').text( 'URL: ').append(
$('<a></a>').attr({
Expand All @@ -550,7 +550,7 @@ $( document).ready( function() {
}).text( url)
)
);
$.get( baseurl + '/' + nagcfg.cgidir + cginame,
$.get( baseurl + '/cgi-bin/' + cginame,
parameters,
function(data, results) {
$('#results').append(
Expand Down
2 changes: 1 addition & 1 deletion html/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ angular.module("mapApp", ["ui.bootstrap", "ui.utils", "nagiosDecorations",
// URL parameters
$scope.params = {
cgiurl: $scope.search.cgiurl ? $scope.search.cgiurl :
$location.absUrl().replace(/map\.php.*$/, nagcfg.cgidir),
$location.absUrl().replace(/map\.php.*$/, "cgi-bin/"),
layout: map_layout,
dimensions: $scope.search.dimensions ?
$scope.search.dimensions : "",
Expand Down
2 changes: 1 addition & 1 deletion html/js/trends.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ angular.module("trendsApp", ["ui.bootstrap", "ui.utils",
// URL parameters
$scope.params = {
cgiurl: $scope.search.cgiurl ? $scope.search.cgiurl :
$location.absUrl().replace(/trends\.html.*$/, nagcfg.cgidir),
$location.absUrl().replace(/trends\.html.*$/, "cgi-bin/"),
reporttype: $scope.search.reporttype ?
$scope.search.reporttype : "",
host: $scope.search.host ? $scope.search.host : "",
Expand Down
1 change: 0 additions & 1 deletion html/jsonquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<title>JSON Query Generator</title>
<link rel="stylesheet" type="text/css" href="stylesheets/jsonquery.css"/>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/jsonquery.js"></script>
</head>
<body>
Expand Down
39 changes: 0 additions & 39 deletions html/login.html

This file was deleted.

2 changes: 1 addition & 1 deletion html/map-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h4 class="modal-title" id="nagiosTrendsLabel">
<div class="form-group">
<label>URL for JSON CGIs</label>
<input type="text" class="form-control" ng-model="params.cgiurl"
placeholder="http://localhost/nagios/cgibin/"
placeholder="http://localhost/nagios/cgi-bin/"
ui-event="{ blur : 'onBlurCgiurl($event)' }">
</div>
<div class="form-group">
Expand Down
6 changes: 3 additions & 3 deletions html/map-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<tr>
<td class="linkBox">
<span ng-show="params.root != 'Nagios Process'">
<a ng-href="{{params.cgiurl}}status.cgi?host={{params.host | uriComponentEncode}}" target="_self">
<a ng-href="{{params.cgiurl}}cgi-bin/status.cgi?host={{params.host | uriComponentEncode}}" target="_self">
View Status Detail For This Host
</a>
<br/>
</span>
<a ng-href="{{params.cgiurl}}status.cgi?host=all" target="_self">
<a ng-href="{{params.cgiurl}}cgi-bin/status.cgi?host=all" target="_self">
View Status Detail For All Hosts
</a>
<br/>
<a ng-href="{{params.cgiurl}}status.cgi?hostgroup=all" target="_self">
<a ng-href="{{params.cgiurl}}cgi-bin/status.cgi?hostgroup=all" target="_self">
View Status Overview For All Hosts
</a>
</td>
Expand Down
4 changes: 1 addition & 3 deletions html/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
<script type="text/javascript"
src="angularjs/ui-utils-0.2.1/ui-utils.js"></script>
<script type="text/javascript" src="spin/spin.min.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/map.js"></script>
<script type="text/javascript" src="js/map-directive.js"></script>
<script type="text/javascript" src="js/map-form.js"></script>
Expand Down Expand Up @@ -84,8 +83,7 @@
last-update="lastUpdate"
initial-state="collapsed"
collapsable="true"
>
<!-- include-partial="map-links.html"-->
include-partial="map-links.html">
</div>
</div>
<div id="map-container" ng-hide="formDisplayed"
Expand Down
1 change: 0 additions & 1 deletion html/side.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<ul class="navsectionlinks">
<li><a href="main.php" target="<?php echo $link_target;?>">Home</a></li>
<li><a href="https://go.nagios.com/nagioscore/docs" target="_blank">Documentation</a></li>
<li><a href="dologout" target="_top">Logout</a></li>
</ul>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion html/trends.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<script type="text/javascript"
src="angularjs/ui-utils-0.2.1/ui-utils.js"></script>
<script type="text/javascript" src="spin/spin.min.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/trends.js"></script>
<script type="text/javascript" src="js/trends-form.js"></script>
<script type="text/javascript" src="js/trends-graph.js"></script>
Expand Down
Loading

0 comments on commit f1616f8

Please sign in to comment.