mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
isc standard php look and feel treatment, evolution of features, fixes
This commit is contained in:
parent
8f24b2c47a
commit
2eb827695d
@ -80,6 +80,10 @@ $Nobp = 0;
|
|||||||
# number of test problems
|
# number of test problems
|
||||||
$Ntprobs = 0;
|
$Ntprobs = 0;
|
||||||
|
|
||||||
|
# flag to signal bad test journal format
|
||||||
|
$BadTest = 0;
|
||||||
|
$BadTestReason = "";
|
||||||
|
|
||||||
#
|
#
|
||||||
# name of host serving the bind9 reports
|
# name of host serving the bind9 reports
|
||||||
#
|
#
|
||||||
@ -133,21 +137,26 @@ foreach $entry (@entries) {
|
|||||||
$when = `date`;
|
$when = `date`;
|
||||||
chop $when;
|
chop $when;
|
||||||
|
|
||||||
printf("<HTML>\n");
|
#printf("<HTML>\n");
|
||||||
printf("<HEAD>\n");
|
#printf("<HEAD>\n");
|
||||||
printf("<TITLE>bind9 status %s</TITLE>\n", $when);
|
#printf("<TITLE>bind9 status %s</TITLE>\n", $when);
|
||||||
printf("<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n");
|
#printf("<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n");
|
||||||
printf("</HEAD>\n");
|
#printf("</HEAD>\n");
|
||||||
printf("<BODY BGCOLOR=\"white\">\n");
|
#printf("<BODY BGCOLOR=\"white\">\n");
|
||||||
printf("<P>\n");
|
#printf("<P>\n");
|
||||||
printf("<P>\n");
|
#printf("<P>\n");
|
||||||
|
|
||||||
|
printf("<?php \$title = \"ISC Status Server\"; ?>\n");
|
||||||
|
printf("<?php include(\"status-isc-header.inc\") ?>\n");
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
printf("<CENTER>\n");
|
printf("<CENTER>\n");
|
||||||
printf("<TABLE BORDER=0>\n");
|
printf("<TABLE BORDER=0>\n");
|
||||||
printf("\t<TR HEIGHT=36><TD COLSPAN=4> </TD></TR>\n");
|
printf("\t<TR HEIGHT=36><TD COLSPAN=4> </TD></TR>\n");
|
||||||
printf("\t<TR><TD COLSPAN=4 ALIGN=CENTER><FONT SIZE=+1><EM>bind9 status %s</EM></FONT></TD></TR>\n", $when);
|
printf("\t<TR><TD COLSPAN=4 ALIGN=CENTER><FONT SIZE=+1><EM>bind9 status %s</EM></FONT></TD></TR>\n", $when);
|
||||||
printf("\t<TR HEIGHT=36><TD COLSPAN=4> </TD></TR>\n");
|
printf("\t<TR HEIGHT=36><TD COLSPAN=4> </TD></TR>\n");
|
||||||
printf("\t<TR>\n");
|
printf("\t<TR>\n");
|
||||||
printf("\t\t<TD WIDTH=150 ALIGN=LEFT><B>host</EM></B>\n");
|
printf("\t\t<TD WIDTH=150 ALIGN=LEFT><B>host</B></TD>\n");
|
||||||
printf("\t\t<TD WIDTH=100 ALIGN=LEFT><B>build status</B></TD>\n");
|
printf("\t\t<TD WIDTH=100 ALIGN=LEFT><B>build status</B></TD>\n");
|
||||||
printf("\t\t<TD WIDTH=100 ALIGN=LEFT><B>fatal/other</B></TD>\n");
|
printf("\t\t<TD WIDTH=100 ALIGN=LEFT><B>fatal/other</B></TD>\n");
|
||||||
printf("\t\t<TD WIDTH=100 ALIGN=LEFT><B>test status</B></TD>\n");
|
printf("\t\t<TD WIDTH=100 ALIGN=LEFT><B>test status</B></TD>\n");
|
||||||
@ -166,10 +175,15 @@ foreach $host (sort @hosts) {
|
|||||||
# output end of page
|
# output end of page
|
||||||
#
|
#
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
printf("</TABLE>\n");
|
printf("</TABLE>\n");
|
||||||
printf("</CENTER>\n");
|
printf("\n");
|
||||||
printf("</BODY>\n");
|
printf("<?php include(\"isc-footer.inc\") ?>\n");
|
||||||
printf("</HTML>\n");
|
|
||||||
|
#printf("</TABLE>\n");
|
||||||
|
#printf("</CENTER>\n");
|
||||||
|
#printf("</BODY>\n");
|
||||||
|
#printf("</HTML>\n");
|
||||||
|
|
||||||
close(DEBUG) if ($Debug);
|
close(DEBUG) if ($Debug);
|
||||||
|
|
||||||
@ -192,9 +206,11 @@ sub doHost {
|
|||||||
#
|
#
|
||||||
# scan the build and test results files for problems
|
# scan the build and test results files for problems
|
||||||
#
|
#
|
||||||
|
|
||||||
$Nfbp = 0;
|
$Nfbp = 0;
|
||||||
$Nobp = 0;
|
$Nobp = 0;
|
||||||
$Ntprobs = 0;
|
$Ntprobs = 0;
|
||||||
|
$BadTest = 0;
|
||||||
|
|
||||||
%buildprobs = &buildCheck("$hostpath") if (-r "$hostpath/$BuildFile");
|
%buildprobs = &buildCheck("$hostpath") if (-r "$hostpath/$BuildFile");
|
||||||
%testprobs = &testCheck("$hostpath") if (-r "$hostpath/$TestFile");
|
%testprobs = &testCheck("$hostpath") if (-r "$hostpath/$TestFile");
|
||||||
@ -216,8 +232,11 @@ sub doHost {
|
|||||||
$bstatus = "ok";
|
$bstatus = "ok";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Nfbp) {
|
if ($BadTest) {
|
||||||
$tstatus = "not available";
|
$tstatus = "not available ($BadTestReason)";
|
||||||
|
}
|
||||||
|
elsif ($bstatus =~ /not available|broken/) {
|
||||||
|
$tstatus = "not available (no results)";
|
||||||
}
|
}
|
||||||
elsif ($Ntprobs) {
|
elsif ($Ntprobs) {
|
||||||
$tstatus = "broken";
|
$tstatus = "broken";
|
||||||
@ -226,6 +245,8 @@ sub doHost {
|
|||||||
$tstatus = "ok";
|
$tstatus = "ok";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf(DEBUG "Host %s STATUS: bstatus %s, tstatus %s, badtest %d, reason %s\n", $hostid, $bstatus, $tstatus, $BadTest, $BadTestReason) if ($Debug);
|
||||||
|
|
||||||
printf("\t<TR>\n");
|
printf("\t<TR>\n");
|
||||||
printf("\t\t<TD>%s</TD>\n", $hostid);
|
printf("\t\t<TD>%s</TD>\n", $hostid);
|
||||||
if ($bstatus =~ /not available/) {
|
if ($bstatus =~ /not available/) {
|
||||||
@ -378,8 +399,7 @@ sub testCheck {
|
|||||||
local($hostpath) = @_;
|
local($hostpath) = @_;
|
||||||
local($funcname, $anum, $atext);
|
local($funcname, $anum, $atext);
|
||||||
local(%probs);
|
local(%probs);
|
||||||
|
local($intest, $intestcase, $inassert, $ininfo, $inresult);
|
||||||
$Ntprobs = 0;
|
|
||||||
|
|
||||||
# initialize the well known test problems array
|
# initialize the well known test problems array
|
||||||
if (-f "$hostpath/$WktpFile") {
|
if (-f "$hostpath/$WktpFile") {
|
||||||
@ -393,18 +413,61 @@ sub testCheck {
|
|||||||
close(XXX);
|
close(XXX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! -r "$hostpath/$TestFile") {
|
||||||
|
$BadTest = 1;
|
||||||
|
$BadTestReason = "no journal file";
|
||||||
|
printf(DEBUG "No test journal at %s\n", "$hostpath/$TestFile") if ($Debug);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$intest = 0;
|
||||||
|
|
||||||
open(XXX, "< $hostpath/$TestFile");
|
open(XXX, "< $hostpath/$TestFile");
|
||||||
|
|
||||||
while (<XXX>) {
|
while (<XXX>) {
|
||||||
|
next if ($_ !~ /^(S|I|T|A|R):/);
|
||||||
|
$intest = 1 if (/^S:(Mon|Tue|Wed|Thu|Fri|Sat|Sun)/);
|
||||||
|
|
||||||
if (/^T:([^:]*):([^:]*):/) {
|
if (/^T:([^:]*):([^:]*):/) {
|
||||||
|
if ($intest == 0) {
|
||||||
|
$BadTest = 1;
|
||||||
|
$BadTestReason = "T";
|
||||||
|
}
|
||||||
$funcname = $1;
|
$funcname = $1;
|
||||||
$anum = $2;
|
$anum = $2;
|
||||||
|
|
||||||
|
$intestcase = 1;
|
||||||
|
$inassert = 0;
|
||||||
|
$ininfo = 0;
|
||||||
|
$inresult = 0;
|
||||||
|
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if (/^A:(.*)$/) {
|
if (/^A:(.*)$/) {
|
||||||
|
if (($intestcase == 0) || ($inresult == 1)) {
|
||||||
|
$BadTest = 1;
|
||||||
|
$BadTestReason = "A";
|
||||||
|
}
|
||||||
|
$inassert = 1;
|
||||||
$atext = 1;
|
$atext = 1;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
if (/^I:(.*)$/) {
|
||||||
|
if ($inassert == 0) {
|
||||||
|
$BadTest = 1;
|
||||||
|
$BadTestReason = "I";
|
||||||
|
}
|
||||||
|
$ininfo = 1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
if (/^R:(.*)$/) {
|
if (/^R:(.*)$/) {
|
||||||
|
if (($intestcase == 0) || ($inassert == 0)) {
|
||||||
|
$BadTest = 1;
|
||||||
|
$BadTestReason = "R";
|
||||||
|
}
|
||||||
|
$inresult = 1;
|
||||||
|
$intestcase = 0;
|
||||||
|
|
||||||
$result = $1;
|
$result = $1;
|
||||||
if ($result =~ /FAIL|UNRESOLVED|UNINITIATED/) {
|
if ($result =~ /FAIL|UNRESOLVED|UNINITIATED/) {
|
||||||
#
|
#
|
||||||
@ -414,9 +477,14 @@ sub testCheck {
|
|||||||
$probs{"$funcname:$anum"} = $result;
|
$probs{"$funcname:$anum"} = $result;
|
||||||
++$Ntprobs;
|
++$Ntprobs;
|
||||||
}
|
}
|
||||||
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(XXX);
|
close(XXX);
|
||||||
|
if ($intest == 0) {
|
||||||
|
$BadTest = 1;
|
||||||
|
$BadTestReason = "no results";
|
||||||
|
}
|
||||||
return(%probs);
|
return(%probs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,8 +494,12 @@ sub wbpf {
|
|||||||
local(@messageset, $message);
|
local(@messageset, $message);
|
||||||
|
|
||||||
open(XXX, "> $B9HostPath/$hostid/$BuildProblemsFile");
|
open(XXX, "> $B9HostPath/$hostid/$BuildProblemsFile");
|
||||||
printf(XXX "<HTML>\n<HEAD>\n");
|
# printf(XXX "<HTML>\n<HEAD>\n");
|
||||||
printf(XXX "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n");
|
# printf(XXX "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n");
|
||||||
|
|
||||||
|
# printf("<?php $title = \"IEI Internal Web\"; ?>\n");
|
||||||
|
# printf("<?php include(\"isc-header.inc\") ?>\n");
|
||||||
|
|
||||||
printf(XXX "<TITLE>bind9 %s build problems by filename</TITLE>\n", $hostid);
|
printf(XXX "<TITLE>bind9 %s build problems by filename</TITLE>\n", $hostid);
|
||||||
printf(XXX "</HEAD>\n<BODY BGCOLOR=\"white\">\n");
|
printf(XXX "</HEAD>\n<BODY BGCOLOR=\"white\">\n");
|
||||||
|
|
||||||
@ -449,7 +521,8 @@ sub wbpf {
|
|||||||
$lastfilename = $filename;
|
$lastfilename = $filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf(XXX "</BODY>\n</HTML>\n");
|
# printf(XXX "</BODY>\n</HTML>\n");
|
||||||
|
# printf("<?php include(\"isc-footer.inc\") ?>\n");
|
||||||
close(XXX);
|
close(XXX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user