ASNMTAP
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/admin/plugins.pl view on Meta::CPAN
$nextAction = "listView" if ($rv);
} elsif ($action eq 'displayView') {
$formDisabledUniqueKey = $formDisabledAll = 'disabled';
$htmlTitle = "Display plugin $CuKey from $CcatalogID";
$nextAction = "listView" if ($rv);
} elsif ($action eq 'editView') {
$formDisabledUniqueKey = 'disabled';
$htmlTitle = "Edit plugin $CuKey from $CcatalogID";
$submitButton = "Edit";
$nextAction = "edit" if ($rv);
} elsif ($action eq 'edit') {
$htmlTitle = "Plugin $CuKey updated from $CcatalogID";
my $dummyOndemand = ($Condemand eq 'on') ? 1 : 0;
my $dummyProduction = ($Cproduction eq 'on') ? 1 : 0;
my $dummyActivated = ($Cactivated eq 'on') ? 1 : 0;
$sql = 'UPDATE ' .$SERVERTABLPLUGINS. ' SET catalogID="' .$CcatalogID. '", uKey="' .$CuKey. '", test="' .$Ctest. '", environment="' .$Cenvironment. '", arguments="' .$Carguments. '", argumentsOndemand="' .$CargumentsOndemand. '", title="' .$Cti...
$dbh->do ( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->do: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
$nextAction = "listView" if ($rv);
} elsif ($action eq 'listView') {
my $doFilter = ( ( defined $filter and $filter ne '' ) ? 1 : 0 );
$htmlTitle = ( $doFilter ) ? "All plugins matching filter: $filter" : "All plugins listed";
if ( $CcatalogIDreload ) {
$pageNo = 1;
$pageOffset = 0;
}
my $andFilter = ( ( $doFilter ) ? "AND title regexp '$filter'" : '' );
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(uKey) from $SERVERTABLPLUGINS where catalogID = '$CcatalogID' $andFilter";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=listView&catalogID=$CcatalogID&fi...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLPLUGINS, 'title', "catalogID = '$CcatalogID' $andFilter", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug...
$sql = "select catalogID, uKey, title, environment, ondemand, production, pagedir, resultsdir, activated from $SERVERTABLPLUGINS where catalogID = '$CcatalogID' $andFilter order by $orderBy limit $pageOffset, $RECORDSONPAGE";
$header = "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalogID desc, uKey asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog ID <a href=\"$urlWithAccessParameters&action=listView&am...
$header .= "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=production desc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Production <a href=\"$urlWithAccessParameters&action=listView&orderBy...
($rv, $matchingPlugins, $nextAction) = record_navigation_table ($rv, $dbh, $sql, 'Plugin', 'catalogID|uKey', '0|1', '', '', "&catalogID=$CcatalogID&filter=$filter", $orderBy, $header, $navigationBar, $iconAdd, $iconDelete, $iconDetails,...
}
if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView') {
$sql = "select catalogID, uKey, test, environment, arguments, argumentsOndemand, title, shortDescription, trendline, percentage, tolerance, step, ondemand, production, pagedir, resultsdir, helpPluginFilename, holidayBundleID, activated from $SE...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
if ( $rv ) {
($CcatalogID, $CuKey, $Ctest, $Cenvironment, $Carguments, $CargumentsOndemand, $Ctitle, $CshortDescription, $Ctrendline, $Cpercentage, $Ctolerance, $Cstep, $Condemand, $Cproduction, $Cpagedir, $Cresultsdir, $ChelpPluginFilename, $CholidayBund...
$CcatalogID = $CATALOGID if ($action eq 'duplicateView');
$Condemand = ($Condemand == 1) ? 'on' : 'off';
$Cproduction = ($Cproduction == 1) ? 'on' : 'off';
$Cactivated = ($Cactivated == 1) ? 'on' : 'off';
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
}
if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
$environmentSelect = create_combobox_from_keys_and_values_pairs ('P=>Production|A=>Acceptation|S=>Simulation|T=>Test|D=>Development|L=>Local', 'V', 0, $Cenvironment, 'environment', '', '', $formDisabledAll, '', $debug);
$sql = "select pagedir, groupName from $SERVERTABLPAGEDIRS where catalogID = '$CcatalogID' order by groupName";
($rv, $pagedirsSelect) = create_combobox_multiple_from_DBI ($rv, $dbh, $sql, $action, $Cpagedir, 'pagedirs', 'Pagedirs missing.', 5, 100, $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select resultsdir, groupName from $SERVERTABLRESULTSDIR where catalogID = '$CcatalogID' order by groupName";
($rv, $resultsdirSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $Cresultsdir, 'resultsdir', 'none', '-Select-', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select holidayBundleID, holidayBundleName from $SERVERTABLHOLIDYSBNDL where catalogID = '$CcatalogID' and activated = '1' order by holidayBundleName";
($rv, $holidayBundleSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CholidayBundleID, 'holidayBundleID', '1', '+ No Holiday Bundle', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
}
if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'editView') {
$matchingViewsCrontabs .= "<table border=0 cellpadding=1 cellspacing=1 bgcolor=\"$COLORSTABLE{TABLE}\">";
my ($VdisplayDaemon, $Vactivated, $DGgroupTitle, $DGactivated, $DDdisplayDaemon, $DDgroupName, $DDactivated, $ScatalogID, $SserverID, $SserverTitle, $StypeServers, $StypeMonitoring, $StypeActiveServer, $SmasterFQDN, $SslaveFQDN, $Sactivated, $C...
my ($prevSserverID, $prevDDdisplayDaemon, $prevCDcollectorDaemon, $urlWithAccessParametersAction, $actionItem, $notActivated);
$matchingViewsCrontabs .= "<tr><th colspan=\"3\">Servers, Display Daemons, Views & Display Groups:</th></tr>\n";
$sql = "select $SERVERTABLVIEWS.displayDaemon, $SERVERTABLVIEWS.activated, $SERVERTABLDISPLAYGRPS.groupTitle, $SERVERTABLDISPLAYGRPS.activated, $SERVERTABLDISPLAYDMNS.displayDaemon, $SERVERTABLDISPLAYDMNS.groupName, $SERVERTABLDISPLAYDMNS.activ...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
$sth->bind_columns( \$VdisplayDaemon, \$Vactivated, \$DGgroupTitle, \$DGactivated, \$DDdisplayDaemon, \$DDgroupName, \$DDactivated, \$ScatalogID, \$SserverID, \$SserverTitle, \$StypeServers, \$StypeMonitoring, \$StypeActiveServer, \$SmasterFQDN...
if ( $rv ) {
$prevSserverID = $prevDDdisplayDaemon = '';
if ( $sth->rows ) {
while( $sth->fetch() ) {
my $actionSkip = ( ( $ScatalogID eq $CATALOGID ) ? 0 : 1 );
if ($prevSserverID eq '' or $prevSserverID ne $SserverID) {
$urlWithAccessParametersAction = "../sadmin/servers.pl?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=1&pageOffset=0&catalogID=$ScatalogID&serverID=$SserverID&orderBy=serverID ...
$actionItem = " ";
$actionItem .= "<a href=\"$urlWithAccessParametersAction=displayView\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{details}\" title=\"Display Server\" alt=\"Display Server\" border=\"0\"></a> " if ($iconDetails);
$actionItem .= "<a href=\"$urlWithAccessParametersAction=editView\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{edit}\" title=\"Edit Server\" alt=\"Edit Server\" border=\"0\"></a> " if ($iconEdit and ! $actionSkip);
$notActivated = ($Sactivated) ? '' : ' not';
$matchingViewsCrontabs .= "<tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td colspan=\"2\"><b>Server: $SserverTitle ($SserverID) -$notActivated activated </b></td><td>$actionItem</td></tr>\n";
my $typeMonitoringText = ($StypeMonitoring) ? 'Distributed' : 'Central';
$matchingViewsCrontabs .= "<tr><td bgcolor=\"$COLORSTABLE{NOBLOCK}\">type monitoring</td><td>$typeMonitoringText</td><td> </td></tr>\n";
my $typeServersText = ($StypeServers) ? 'Failover' : 'Standalone';
my $typeActiveServerText = ($StypeActiveServer eq 'S') ? 'Slave' : 'Master';
$matchingViewsCrontabs .= "<tr><td bgcolor=\"$COLORSTABLE{NOBLOCK}\">type servers</td><td>$typeServersText</td><td> </td></tr>\n";
$matchingViewsCrontabs .= "<tr><td bgcolor=\"$COLORSTABLE{NOBLOCK}\">type active server</td><td>$typeActiveServerText</td><td> </td></tr>\n";
$matchingViewsCrontabs .= "<tr><td bgcolor=\"$COLORSTABLE{NOBLOCK}\">master FQDN</td><td>$SmasterFQDN</td><td> </td></tr>\n";
$matchingViewsCrontabs .= "<tr><td bgcolor=\"$COLORSTABLE{NOBLOCK}\">slave FQDN</td><td>$SslaveFQDN</td><td> </td></tr>\n";
}
if ($prevDDdisplayDaemon eq '' or $prevDDdisplayDaemon ne $DDdisplayDaemon) {
$urlWithAccessParametersAction = "../sadmin/displayDaemons.pl?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=1&pageOffset=0&catalogID=$ScatalogID&displayDaemon=$DDdisplayDaemon&...
$actionItem = " ";
$actionItem .= "<a href=\"$urlWithAccessParametersAction=displayView\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{details}\" title=\"Display Display Daemon\" alt=\"Display Display Daemon\" border=\"0\"></a> " if ($iconDet...
$actionItem .= "<a href=\"$urlWithAccessParametersAction=editView\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{edit}\" title=\"Edit Display Daemon\" alt=\"Edit Display Daemon\" border=\"0\"></a> " if ($iconEdit and ! $act...
$notActivated = ($DDactivated) ? '' : ' not';
$matchingViewsCrontabs .= "<tr bgcolor=\"$COLORSTABLE{STARTBLOCK}\"><td colspan=\"2\"><b>Display daemon: DisplayCT-$DDdisplayDaemon -$notActivated activated </b></td><td>$actionItem</td></tr>\n";
$matchingViewsCrontabs .= "<tr><td bgcolor=\"$COLORSTABLE{NOBLOCK}\">Group name</td><td>$DDgroupName</td><td> </td></tr>\n";
}
$urlWithAccessParametersAction = "views.pl?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=1&pageOffset=0&catalogID=$ScatalogID&displayDaemon=$VdisplayDaemon;uKey=$CuKey&orderBy=g...
$actionItem = " ";
$actionItem .= "<a href=\"$urlWithAccessParametersAction=displayView\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{details}\" title=\"Display View\" alt=\"Display View\" border=\"0\"></a> " if ($iconDetails);
$actionItem .= "<a href=\"$urlWithAccessParametersAction=editView\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{edit}\" title=\"Edit View\" alt=\"Edit View\" border=\"0\"></a> " if ($iconEdit and ! $actionSkip);
( run in 1.111 second using v1.01-cache-2.11-cpan-39bf76dae61 )