Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ez a subrutine amit atadok
- sub addSubSection {
- @params = @_;
- if ($params[1] eq 'info') {
- $initStyle = "display:block";
- } else{
- $initStyle = "display:none";
- }
- seek LOGFILE, 0,0;
- @section = grep {$_ =~ $params[2]} <LOGFILE>;
- if (@section) {
- $id++;
- print REPORT "<$params[0] id=\"$id\" class=\"$params[1]\" style=\"$initStyle\">\n";
- for ($i =0;$i<$#section+1;$i++){
- @line = split('::',$section[$i]);
- shift(@line);
- chomp(@line);
- print REPORT @line;
- print REPORT "<br>\n";
- }
- print REPORT "</$params[0]>\n";
- }
- }
- ennek a subrutinnak
- sub addReportEntry {
- @params = @_;
- if (testForEntry($params[0])) {
- $subFunction = $params[3];
- seek LOGFILE, 0,0;
- @entry = grep { $_ =~ $params[1] } <LOGFILE>;
- $id++;
- print REPORT "<span id=\"$id\" class=\"$reportEntryCssClass\">";
- if (@entry) {
- @line = split('::',pop(@entry));
- shift(@line);
- print REPORT @line;
- if ($params[4]){
- print REPORT "<input class=\"showButton\" type=\"button\" value=\"Show details\" onClick=\"showhide(this,".($id+1).");\"/>";
- }
- print REPORT "</span><span id=\"ok\" class=\"$stausCssClass\">";
- print REPORT "OK";
- print REPORT "</span><br>\n";
- if ($params[4]){
- $subFunction->("p","extendable",$params[4]);
- }
- }
- else {
- print REPORT $_[2];
- if ($params[4]){
- print REPORT "<input class=\"showButton\" type=\"button\" value=\"Show details\" onClick=\"showhide(this,".($id+1).");\"/>";
- }
- print REPORT "</span><span id=\"failed\" class=\"$stausCssClass\">";
- print REPORT "FAILED";
- print REPORT "</span><br>\n";
- if ($params[4]){
- $subFunction->("p","extendable",$params[4]);
- }
- }
- print REPORT "<hr>\n";
- }
- }
- igy hivom meg pl:
- addReportEntry("LOG_START_LICENCE_UPDATE\:\:","LOG_LICENCE_UPDATE\:\:","Updating licence",\addSubSection,"LOG_LICENCE_UPDATE_EXT");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement