#!/usr/bin/perl -w
# -*- perl -*-
use P4CGI ;
use strict ;
#
#################################################################
# CONFIGURATION INFORMATION
# All config info should be in P4CGI.pm
#
#################################################################
#
# P4 depot browser, top
#
#################################################################
print "",
&P4CGI::start_page("P4DB
P4 Depot Browser",
"
Hint:".
"You can bookmark any page You want to get back to later") ;
my $applet =
"\n" ;
if(defined $::NO_JAVA) {
$applet = " " ;
} ;
print
&P4CGI::start_table("width=100%"),
&P4CGI::table_row(-align => "center",
&P4CGI::ahref(-url => &P4CGI::DTB_URL(),
"Browse the depot tree"),
),
&P4CGI::end_table(),
"
" ;
print
&P4CGI::start_table("width=100%"),
&P4CGI::table_row(-align => "center",
&P4CGI::ahref(-url => &P4CGI::CL_URL(),
"View submitted changelists"),
&P4CGI::ahref(-url => &P4CGI::CHB_URL(),
"FSPC=//...",
"STATUS=pending",
"View pending changes"),
&P4CGI::ahref(-url => &P4CGI::LAB_URL(),
"View branches"),
&P4CGI::ahref(-url => &P4CGI::LAL_URL(),
"View labels"),
&P4CGI::ahref(-url => &P4CGI::LAU_URL(),
"View users"),
$applet),
&P4CGI::end_table(),
"
" ;
print
&P4CGI::cgi()->startform(-action => &P4CGI::SFF_URL(),
-method => "GET"),
&P4CGI::cgi()->submit(-name => "ignore",
-value => "Search for file(s):"),
&P4CGI::cgi()->textfield(-name => "FSPC",
-default => "//...",
-size => 50,
-maxlength => 256),
&P4CGI::cgi()->endform() ;
print
&P4CGI::cgi()->startform(-action => &P4CGI::CHB_URL(),
-method => "GET"),
&P4CGI::cgi()->submit(-name => "ignore",
-value => "View changes for file(s):"),
&P4CGI::cgi()->hidden(-name => "MAXCH",
-value => "100"),
&P4CGI::cgi()->textfield(-name => "FSPC",
-default => "//...",
-size => 50,
-maxlength => 256),
&P4CGI::cgi()->endform() ;
my @labels ;
&P4CGI::p4call(\@labels,"labels") ;
my $l ;
foreach $l (@labels) {
$l =~ s/^Label (\S+).*/$1/ ;
}
if(undef) {
print
&P4CGI::cgi()->startform(-action => &P4CGI::LDV_URL(),
-method => "GET"),
"
",
&P4CGI::cgi()->submit(-name => "Go",
-value => "Label diff"),
" label: ",
&P4CGI::cgi()->popup_menu(-name => "LABEL1",
-value => \@labels),
"and: ",
&P4CGI::cgi()->popup_menu(-name => "LABEL2",
-value => \@labels),
"
Show files: ",
&P4CGI::cgi()->checkbox(-name => "SHOWSAME",
-value => "Y",
-label => " Not modified"),
&P4CGI::cgi()->checkbox(-name => "SHOWNOTSAME",
-checked => "Y",
-value => "Y",
-label => " Modified"),
&P4CGI::cgi()->checkbox(-name => "SHOWDIFF",
-checked => "Y",
-value => "Y",
-label => " Differ"),
&P4CGI::cgi()->endform() ;
my @excludelabs = @labels ;
unshift @excludelabs,"-" ;
print
&P4CGI::cgi()->startform(-action => &P4CGI::CHB_URL(),
-method => "GET"),
# "
",
&P4CGI::cgi()->submit(-name => "Go",
-value => "View changes for label"),
" label: ",
&P4CGI::cgi()->popup_menu(-name => "LABEL",
-value => \@labels),
"(optionally) excluding label: ",
&P4CGI::cgi()->popup_menu(-name => "EXLABEL",
-value => \@excludelabs),
&P4CGI::cgi()->endform() ;
}
print "",
&P4CGI::cgi()->startform(-action => &P4CGI::CHV_URL(),
-method => "GET"),
&P4CGI::cgi()->submit(-name => "ignore",
-value => "View specific changelist:"),
&P4CGI::cgi()->textfield(-name => "CH",
-default => "1",
-size => 10,
-maxlength => 10),
&P4CGI::cgi()->endform() ;
print
"
",
&P4CGI::start_table("width=100%"),
&P4CGI::table_row(-align => "left",
&P4CGI::ahref(-url =>
"P4DB_UserGuide.html","P4DB Users Guide"),
{ -text => &P4CGI::ahref(-url => "p4race.cgi",
"The great
submit race"),
-align => "right" }),
&P4CGI::end_table(),
&P4CGI::end_page() ;
#
# That's it folks
#