ASNMTAP
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/comments.pl view on Meta::CPAN
<input type="hidden" name="pagedir" value="$pagedir">
<input type="hidden" name="pageset" value="$pageset">
<input type="hidden" name="debug" value="$debug">
<input type="hidden" name="CGISESSID" value="$sessionID">
<input type="hidden" name="pageNo" value="$pageNo">
<input type="hidden" name="pageOffset" value="$pageOffset">
<input type="hidden" name="action" value="$nextAction">
HTML
} else {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
print "<br>\n";
}
print <<HTML;
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center"><td>
<table border="0" cellspacing="0" cellpadding="0"><tr>
HTML
if ( $userType != 0 ) {
print <<HTML;
<td class="StatusItem"><a href="$urlWithAccessParameters&action=insertView&catalogID=$CcatalogID&uKey=$CuKey">[Insert comment]</a></td>
<td class="StatusItem"> </td>
HTML
if ( $supportRequest ) {
print <<HTML;
<td class="StatusItem"><a href="$urlWithAccessParameters&action=createView&catalogID=$CcatalogID&uKey=$CuKey">[Create support request]</a></td>
<td class="StatusItem"> </td>
HTML
}
}
print <<HTML;
<td class="StatusItem"><a href="$urlWithAccessParameters&action=listView&catalogID=$CcatalogID&uKey=$CuKey">[List active comments]</a></td>
<td class="StatusItem"> </td>
<td class="StatusItem"><a href="$urlWithAccessParameters&action=listAllView&catalogID=$CcatalogID&uKey=$CuKey">[List active comments for all plugins]</a></td>
<td class="StatusItem"> </td>
<td class="StatusItem"><a href="$urlWithAccessParameters&action=solvedView&catalogID=$CcatalogID&uKey=$CuKey">[Show solved comments]</a></td>
<td class="StatusItem"> </td>
<td class="StatusItem"><a href="$urlWithAccessParameters&action=historyView&catalogID=$CcatalogID&uKey=$CuKey">[Show history comments]</a></td>
</tr></table>
</td></tr>
<tr><td> </td></tr>
HTML
my $creatviewDisabled = ($action eq 'createView') ? 'disabled' : '';
if ($action eq 'insertView' or $action eq 'createView' or $action eq 'historyView') {
my $instabilityDisabled = ($action eq 'createView' or $userType < 2) ? 'disabled' : '';
my $persistentDisabled = ($action eq 'createView' or $userType < 2) ? 'disabled' : '';
my $downtimeDisabled = ($action eq 'createView') ? 'disabled' : '';
my $instabilityChecked = ($Cinstability eq 'on') ? ' checked' : '';
my $persistentChecked = ($Cpersistent eq 'on') ? ' checked' : '';
my $downtimeChecked = ($Cdowntime eq 'on') ? ' checked' : '';
print <<HTML;
<tr><td><table border="0" cellspacing="0" cellpadding="0">
<tr><td><b>Catalog ID: </b></td><td>
<input type="text" name="catalogID" value="$CcatalogID" size="5" maxlength="5" disabled>
</td></tr>
<tr><td><b>Application: </b></td><td>
$uKeySelect
</td></tr><tr><td><b>Remote User: </b></td><td>
$remoteUsersSelect
</td>
HTML
if ($action eq 'insertView' or $action eq 'createView') {
print <<HTML;
</tr><tr>
<td valign="top"><b>Comment: </b></td>
<td><textarea name=commentData cols=84 rows=13 $creatviewDisabled>$CcommentData</textarea></td>
</tr><tr>
<td><b>Instability: </b></td>
<td><b><input type="checkbox" name="instability" $instabilityChecked $instabilityDisabled></b> 'checked' means 'instability' and 'not checked' means 'not instability'</td>
</tr><tr>
<td><b>Persistent: </b></td>
<td><b><input type="checkbox" name="persistent" $persistentChecked $persistentDisabled></b> 'checked' means 'persistent' and 'not checked' means 'not persistent'</td>
</tr><tr><td> </td><td>
When 'Instability' and 'Persistent' are checked, this 'comment' will be not visible into the 'Minimal Condenced View'
</td>
</tr><tr>
<td><b>Downtime: </b></td>
<td><b><input type="checkbox" name="downtime" $downtimeChecked $downtimeDisabled></b> 'checked' means 'downtime scheduling' and 'not checked' means 'no downtime scheduling'</td>
</tr><tr>
<td>Activation: </td>
<td>
<b><input type="text" name="activationDate" value="$CactivationDate" size="10" maxlength="10" $creatviewDisabled></b>
<a href="#" onclick="cal1Calendar.select(document.forms[1].activationDate, 'activationDateCalendar','yyyy-MM-dd'); return false;" name="activationDateCalendar" id="activationDateCalendar"><img src="$IMAGESURL/cal.gif" alt="Calendar" border="0...
<b><input type="text" name="activationTime" value="$CactivationTime" size="8" maxlength="8" onChange="ReadISO8601time(document.forms['comments'].activationTime.value);" $creatviewDisabled></b> format: hh:mm:ss, 00:00:00 to 23:59:59
</td>
</tr><tr>
<td>Suspention: </td>
<td>
<b><input type="text" name="suspentionDate" value="$CsuspentionDate" size="10" maxlength="10" $creatviewDisabled></b>
<a href="#" onclick="cal1Calendar.select(document.forms[1].suspentionDate, 'suspentionDateCalendar','yyyy-MM-dd'); return false;" name="suspentionDateCalendar" id="suspentionDateCalendar"><img src="$IMAGESURL/cal.gif" alt="Calendar" border="0...
<b><input type="text" name="suspentionTime" value="$CsuspentionTime" size="8" maxlength="8" onChange="ReadISO8601time(document.forms['comments'].suspentionTime.value);" $creatviewDisabled></b> format: hh:mm:ss, 00:00:00 to 23:59:59
</td>
</tr><tr><td> </td><td>
<br>
<b>Problem automatically solved when</b> ('not persistent' has higher priority then 'persistent')<b>:</b>
<ul type="circle">
<li>instability:
<ul type="disc">
<li>problem is <b>never</b> automatically solved</li>
</ul>
</li>
<li>not persistent:
<ul type="disc">
<li>problem is automatically solved when 'last n results are OK' and 'current Timeslot' > 'Activation Date/time'</li>
<li>problem is automatically solved when 'current Timeslot' > 'Suspention Date/time'</li>
</ul>
</li>
<li>persistent:
<ul type="disc">
<li>problem is automatically solved when 'current Timeslot' > 'Suspention Date/time'</li>
<li>problem is <b>never</b> automatically solved when 'Suspention Date/time' is missing</li>
</ul>
</li>
</ul>
</td>
HTML
$submitButton = ($action eq 'insertView') ? 'Insert' : 'Create';
} elsif ($action eq 'historyView') {
$submitButton = 'History';
print <<HTML;
</tr><tr>
<td>Entry: </td>
<td>
<b><input type="text" name="entryDate" value="$CentryDate" size="10" maxlength="10"></b> <a href="#" onclick="cal1Calendar.select(document.forms[1].entryDate, 'entryDateCalendar','yyyy-MM-dd'); return false;" name="entryDateCalendar" i...
<b><input type="text" name="entryTime" value="$CentryTime" size="8" maxlength="8" onChange="ReadISO8601time(document.forms['comments'].entryTime.value);"></b> format: hh:mm:ss, 00:00:00 to 23:59:59
</td>
</tr><tr>
<td>Solved: </td>
<td>
<b><input type="text" name="solvedDate" value="$CsolvedDate" size="10" maxlength="10"></b> <a href="#" onclick="cal1Calendar.select(document.forms[1].solvedDate, 'solvedDateCalendar','yyyy-MM-dd'); return false;" name="solvedDateCalend...
<b><input type="text" name="solvedTime" value="$CsolvedTime" size="8" maxlength="8" onChange="ReadISO8601time(document.forms['comments'].solvedTime.value);"></b> format: hh:mm:ss, 00:00:00 to 23:59:59
</td>
</tr><tr><td> </td><td> </td>
HTML
}
print <<HTML;
</tr><tr><td> </td><td>Please enter all required information before committing the command. Required fields are marked in bold.</td>
</tr><tr align="left"><td align="right"><br><input type="submit" value="$submitButton"></td><td><br><input type="reset" value="Reset"></td></tr>
</table></td></tr>
HTML
} elsif ($action eq 'deleteView' or $action eq 'editView' or $action eq 'updateView') {
print <<HTML;
<tr align="center"><td>
<input type="hidden" name="catalogID" value="$CcatalogID">
<input type="hidden" name="id" value="$Cid">
<input type="hidden" name="uKey" value="$CuKey">
<input type="hidden" name="problemSolved" value="$CproblemSolved">
<input type="hidden" name="solvedDate" value="$CsolvedDate">
<input type="hidden" name="solvedTime" value="$CsolvedTime">
<input type="hidden" name="solvedTimeslot" value="$CsolvedTimeslot">
</td></tr><tr align="center"><td>
<table align="center" border="0" cellspacing="0" cellpadding="0"><tr>
<td colspan="2">$matchingComments</td>
</tr><tr><td colspan="2"> </td></tr><tr>
<td valign="top"><b>$commentText:</b> </td>
<td align="right"><textarea name=commentData cols=84 rows=13 $creatviewDisabled>$commentData</textarea></td>
</tr></table>
</tr><tr><td colspan="2"> </td>
</tr><tr align="center"><td colspan="2"><input type="submit" value="$submitButton"> <input type="reset" value="Reset"></td></tr>
HTML
} else {
print "<tr align=\"center\"><td>$matchingComments</td></tr>\n";
}
print " </table>\n";
if ($action eq 'insertView' or $action eq 'createView' or $action eq 'deleteView' or $action eq 'editView' or $action eq 'historyView' or $action eq 'updateView') {
print <<HTML;
<input type="hidden" name="catalogID" value="$CcatalogID">
<input type="hidden" name="uKey" value="$CuKey">
</form>
HTML
} else {
print "<br>\n";
}
}
}
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_legend (*STDOUT);
print '</BODY>', "\n", '</HTML>', "\n";
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
( run in 0.566 second using v1.01-cache-2.11-cpan-39bf76dae61 )