#!/usr/bin/perl -w # -*- perl -*- use P4CGI ; use strict ; # ################################################################# # CONFIGURATION INFORMATION # All config info should be in the config file # ################################################################# # # P4 view job # View a job # ################################################################# # Get file spec argument my $job = P4CGI::cgi()->param("JOB") ; &P4CGI::bail("No job specified") unless defined $job ; # Create title print "", &P4CGI::start_page("Job $job",(&P4CGI::ahref(-url => "jobList.cgi", "LIST=Y", "View job list"))) ; my @fields ; my %fieldData ; @fields = &P4CGI::p4readform("job -o $job",\%fieldData); # Check that job exist if($fieldData{"Description"} =~ /<enter description here>/) { &P4CGI::signalError("Job $job does not exist") ; } # Fix user field if(exists $fieldData{"User"}) { $fieldData{"User"} = &P4CGI::ahref(-url => "userView.cgi", "USER=$fieldData{User}", "HELP=View user info", $fieldData{"User"}) ; } # Fix description field if(exists $fieldData{"Description"}) { my $d = &P4CGI::fixSpecChar($fieldData{"Description"}) ; $d =~ s/\n/<br>/g ; $fieldData{"Description"} = "<tt>$d</tt>" ; } my @fixes ; &P4CGI::p4call(\@fixes,"fixes -j $job") ; if(@fixes > 0) { push @fields,"Fixed by" ; $fieldData{"Fixed by"} = join("<br>\n", map {/change (\d+) on (\S+) by (\S+)\@(\S+)/ ; my ($ch,$date,$user,$client) = ($1,$2,$3,$4) ; $ch = &P4CGI::ahref(-url => "changeView.cgi", "CH=$ch", "HELP=View change", $ch) ; $user = &P4CGI::ahref(-url => "userView.cgi", "USER=$user", "HELP=View user info", $user) ; $client = &P4CGI::ahref(-url => "clientView.cgi", "CLIENT=$client", "HELP=View client info", $client) ; "Change $ch on $date by $user\@$client" ; } @fixes ) ; } print "", &P4CGI::start_table("") ; my $f ; foreach $f (@fields) { print &P4CGI::table_row({-align => "right", -valign => "top", -type => "th", -text => $f}, $fieldData{$f}) ; } ; print &P4CGI::end_table("") ; print &P4CGI::end_page(); # # That's all folks #
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 4306 | Fredric Fredricson |
P4DB: Hardened P4DB against malicious parameters (cross site scripting), performed some cleanup and increased version to 3.1.1. |
||
#4 | 2942 | Fredric Fredricson | P4DB: Fixed bug: Can now handle spaces in label names etc.... | ||
#3 | 2875 | Fredric Fredricson | P4DB 3.0 first beta... | ||
#2 | 1920 | Fredric Fredricson |
P4DB: Mainly some user interface fixes: * Added a small arrow that points to selection in list of options * Added tooltip help * Added user prefereces to turn the above off (or on) * Some other user interface fixes And fixed a bug in jobList.cgi and some minor bugs in label and branch viewers. |
||
#1 | 1638 | Fredric Fredricson | P4DB: Added all (I think) files for P4DB |