IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 20, 2012, 12:21:48 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120601/ippMonitor
Files:
15 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120601/ippMonitor

  • branches/eam_branches/ipp-20120601/ippMonitor/INSTALL

    r32403 r34047  
    1515# note that we have a special version for ippmonitor without $PSCONFIG/$PSCONFDIR values:
    1616ipp@ippdb03 / ippdb03 example:
    17  psconfigure --dbhost ippdb01 --dbuser ipp --dbpass ipp --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config
     17# psconfigure --dbhost ippdb01 --dbuser ipp --dbpass ipp --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config
    1818
     19#ipp@ippdb03 / ippdb01 example:
     20 psconfigure --dbhost ippdb03 --dbuser ipp --dbpass ipp --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config
     21
     22#
     23# Regular installation on ippMonitor.ifa.hawaii.edu
     24# Note: we use a 'science databases (replication) slave' and the ippMonitor read-only account to connect to that database
     25psconfigure --dbhost scidbs1 --dbuser ippMonitor --dbpass ippMonitor --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config
  • branches/eam_branches/ipp-20120601/ippMonitor/czartool/czartool/czarconfig.xml

    r32954 r34047  
    2121  <gpc1database>
    2222    <name>gpc1</name>
    23     <host>ippdb01</host>
     23    <host>scidbs1</host>
    2424    <user>ippMonitor</user>
    2525    <password>ippMonitor</password>
     
    2929  <czardatabase>
    3030    <name>czardb</name>
    31     <host>ippdb01</host>
     31    <host>scidbm</host>
    3232    <user>ipp</user>
    3333    <password>ipp</password>
     
    4646
    4747</czarconfig>
     48
  • branches/eam_branches/ipp-20120601/ippMonitor/def/autocode.php

    r29485 r34047  
    2828// ** TABLE RESTRICTIONS **
    2929
     30// Note: the restriction is now moved AFTER the count query
     31// unless the RESTRICT_COUNT keyword is used
    3032if ($restricted == 0) {
    31   if ("$UNRESTRICTED" != "none") {
    32     $WHERE = "$WHERE $UNRESTRICTED";
     33  if ("$RESTRICT_COUNT" != "none") {
     34    $WHERE = "$WHERE $RESTRICT_COUNT";
    3335  }
    3436}
     
    5658  menu_end();
    5759}
     60
     61// Restrict the query if it is necessary
     62if ($restricted == 0) {
     63  if ( ("$UNRESTRICTED" != "none") && ("$RESTRICT_COUNT" == "none") ) {
     64    $WHERE = "$WHERE $UNRESTRICTED";
     65  }
     66}
     67
    5868// set up the row counter variables
    5969if ($ID['from']) {
  • branches/eam_branches/ipp-20120601/ippMonitor/def/camProcessedExp_Images.d

    r31828 r34047  
    33FILE  camProcessedExp_Images.php
    44MENU  ipp.science.dat
     5
     6UNRESTRICTED AND 0>1
    57
    68# the following WHERE clauses are added to all queries joined by AND
     
    1012WHERE camProcessedExp.cam_id  = camRun.cam_id
    1113WHERE camProcessedExp.fault = 0
    12 
    1314# define image names to be used below
    1415# IMAGE VAR basename filerule camera class_id
  • branches/eam_branches/ipp-20120601/ippMonitor/def/diffSummary_Images.d

    r28654 r34047  
    33FILE  diffSummary_Images.php
    44MENU  ipp.stack.dat
     5
     6UNRESTRICTED AND 0>1
    57
    68WHERE diffRun.diff_id             = diffSkyfile.diff_id
  • branches/eam_branches/ipp-20120601/ippMonitor/def/newImfile.d

    r18193 r34047  
    44MENU  ipp.load.dat
    55
     6UNRESTRICTED WHERE 0>1
     7
    68#        field       size  format  name           show   link to         extras
    79FIELD    exp_id,        5, %d,     exposure ID
  • branches/eam_branches/ipp-20120601/ippMonitor/def/pzDoneImfile.d

    r16638 r34047  
    33FILE  pzDoneImfile.php
    44MENU  ipp.load.dat
     5
     6UNRESTRICTED AND 0>1
    57
    68WHERE pzDownloadImfile.fault     = 0
  • branches/eam_branches/ipp-20120601/ippMonitor/def/pzPendingImfile.d

    r16638 r34047  
    33FILE  pzPendingImfile.php
    44MENU  ipp.load.dat
     5
     6UNRESTRICTED AND 0>1
    57
    68WHERE summitImfile.exp_name  = pzDownloadExp.exp_name
  • branches/eam_branches/ipp-20120601/ippMonitor/def/rawBurntoolState.d

    r30690 r34047  
    55
    66# if no query restrictions are supplied, we want to limit the query or it is extremely long running:
     7RESTRICT_COUNT WHERE 0>1
    78UNRESTRICTED WHERE exp_id = 0
    89
  • branches/eam_branches/ipp-20120601/ippMonitor/def/rawImfile.d

    r26991 r34047  
    55
    66# HEAD PHP insert_backref ("rawExp.php", "exp_id", $ID['link']);
     7
     8UNRESTRICTED WHERE 0>1
    79
    810OP   OP1  $ra * 57.295783
  • branches/eam_branches/ipp-20120601/ippMonitor/def/summitImfile.d

    r16617 r34047  
    33FILE  summitImfile.php
    44MENU  ipp.load.dat
     5
     6UNRESTRICTED WHERE 0>1
    57
    68#        field     size  format  name             show   link to         extras
  • branches/eam_branches/ipp-20120601/ippMonitor/raw/czartool_labels.php

    r33846 r34047  
    171171echo "<tr><td>Who's using the cluster?</td><td><a href=\"http://ippmonitor.ipp.ifa.hawaii.edu/ippMonitor/clusterMonitor/top.html\"><font color=\"blue\">here</font></a></td></tr>";
    172172echo "<tr><td>IPP metrics</td><td><a href=\"http://ipp0022.ifa.hawaii.edu/ps1sc/ippMetrics\"><font color=\"blue\">here</font></a></td></tr>";
    173 echo "<tr><td>Czar log pages</td><td><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\"><font color=\"blue\">here</font></a></td></tr>";
     173echo "<tr><td>Czar log pages</td><td><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\"><font color=\"blue\">All</font></a>&nbsp;&nbsp;&nbsp;";
     174echo "<a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLog_".(date("Ymd")-date("w")+"1")."\">This week</a>";
     175echo "</td></tr>";
    174176echo "<tr><td>Exposure summary</td><td><a href=\"czartool_exposures.php?pass=$pass&proj=$proj\"><font color=\"blue\">here</font></a></td></tr>";
    175177
     
    215217      showReplicationsStatus($REPL_HOST_PSTAMP, $REPL_USER_PSTAMP, $REPL_PASSWORD_PSTAMP, $REPL_DBNAME_PSTAMP);
    216218      showReplicationsStatus($REPL_HOST_IPPADMIN, $REPL_USER_IPPADMIN, $REPL_PASSWORD_IPPADMIN, $REPL_DBNAME_IPPADMIN);
     219      showReplicationsStatus($REPL_HOST_ISP, $REPL_USER_ISP, $REPL_PASSWORD_ISP, $REPL_DBNAME_ISP);
    217220      echo "</table>";
    218221
  • branches/eam_branches/ipp-20120601/ippMonitor/raw/site.php.in

    r31812 r34047  
    2525$REPL_USER_IPPADMIN = "ippMonitor";
    2626$REPL_PASSWORD_IPPADMIN = "ippMonitor";
    27 $REPL_DBNAME_IPPADMIN = "ipp001 (gpc1, isp, ippadmin, czardb)";
     27$REPL_DBNAME_IPPADMIN = "ipp001 (gpc1, isp, ippadmin, czardb, ipptopsps, megacam, ssp, uip)" ;
    2828
    2929$REPL_HOST_NEBULOUS = "ippdb02.IfA.Hawaii.Edu";
    3030$REPL_USER_NEBULOUS = "ippMonitor";
    3131$REPL_PASSWORD_NEBULOUS = "ippMonitor";
    32 $REPL_DBNAME_NEBULOUS = "ippdb02 (Nebulous)";
     32$REPL_DBNAME_NEBULOUS = "ippdb02 (nebulous)";
    3333
    3434$REPL_HOST_PSTAMP = "ippc19.IfA.Hawaii.Edu";
     
    4040$REPL_USER_GPC1 = "ippMonitor";
    4141$REPL_PASSWORD_GPC1 = "ippMonitor";
    42 $REPL_DBNAME_GPC1 = "ippdb03 (gpc1, isp, ippadmin, czardb)";
     42$REPL_DBNAME_GPC1 = "ippdb03 (czardb, gpc1, ippadmin, ipptopsps, megacam, skycells, ssp, uip)";
     43
     44$REPL_HOST_ISP = "ippc17.IfA.Hawaii.Edu";
     45$REPL_USER_ISP = "ippMonitor";
     46$REPL_PASSWORD_ISP = "ippMonitor";
     47$REPL_DBNAME_ISP = "ippc17 (isp)";
     48
     49
    4350
    4451?>
  • branches/eam_branches/ipp-20120601/ippMonitor/scripts/generate

    r31816 r34047  
    2929    &init_key ("MODE");
    3030    &init_key ("UNRESTRICTED");
     31    &init_key ("RESTRICT_COUNT");
    3132    &init_key ("TABLE");
    3233    &init_key ("TITLE");
     
    4647        if ($key eq "TABLE") { ($value) = $value =~ m|^\s*(.+)\s*$|; }
    4748        if ($key eq "TYPE")  { ($value) = $value =~ m|^\s*(.+)\s*$|; }
    48         if ($key eq "TOPLOT") { ($value) = $value =~ m|^\s*(.+)\s*$|; }
    49         if ($key eq "PLOTTER") { ($value) = $value =~ m|^\s*(.+)\s*$|; }
    50         if ($key eq "PLOTTITLE") {
    51             ($value) = $value =~ m|^\s*(.+)\s*$|;
    52             $value =~ s/\s/_/g;
    53         }
     49        if ($key eq "TOPLOT") { ($value) = $value =~ m|^\s*(.+)\s*$|; }
     50        if ($key eq "PLOTTER") { ($value) = $value =~ m|^\s*(.+)\s*$|; }
     51        if ($key eq "PLOTTITLE") {
     52            ($value) = $value =~ m|^\s*(.+)\s*$|;
     53            $value =~ s/\s/_/g;
     54        }
    5455
    5556        &set_keypair ($key, $value);
     
    6162            if ($field =~ m|\S+\s+as\s+\S+|) {
    6263                ($fieldreal) = $field =~ m|\S+\s+as\s+(\S+)|;
    63                 #print STDERR "Case 1\n";
     64                #print STDERR "Case 1\n";
    6465            } elsif ($field =~ m|\S+\s+AS\s+\S+|) {
    65                 #print STDERR "field=$field\n";
    66                 $fieldreal = $field;
    67                 $fieldreal =~ s/\s+AS.*$//;
     66                #print STDERR "field=$field\n";
     67                $fieldreal = $field;
     68                $fieldreal =~ s/\s+AS.*$//;
    6869                #($fieldreal) = $field =~ m|\S+\s+as\s+(\S+)|;
    69                 #print STDERR "Case 2\n";
     70                #print STDERR "Case 2\n";
    7071            } else {
    7172                $fieldreal = $field;
    72                 #print STDERR "Case 3\n";
     73                #print STDERR "Case 3\n";
    7374            }
    74             #print STDERR "field=[$field]\tfieldreal=[$fieldreal]\n";
     75            #print STDERR "field=[$field]\tfieldreal=[$fieldreal]\n";
    7576
    7677            if ($VERBOSE) { printf "%-20s %-20s %-20s %-20s %-20s %-20s\n", $field, $name, $format, $show, $link, $extras; }
     
    141142    &check_key ("MODE", "basic");
    142143    &check_key ("UNRESTRICTED", "none");
     144    &check_key ("RESTRICT_COUNT", "none");
    143145    &check_key ("TABLE", "");
    144146    &check_key ("TITLE", "");
     
    324326# generate a WHERE test for each field (field != *)
    325327sub write_table_restrict {
    326 
    327328    if ($WHERE) {
    328329        print FILE "\$WHERE = \"WHERE $WHERE\";\n";
     
    348349}
    349350
    350 # Generate GROUP BY statement if any 
     351# Generate GROUP BY statement if any
    351352sub write_group_by {
    352353    print FILE "\$WHERE = check_ordering ('$GROUPS', \$WHERE);\n";
     
    536537    @extfields = split (/,/, $extras);
    537538    for ($i = 0; $i < @extfields; $i++) {
    538         # print STDERR $extfields[$i],"\n";
     539        # print STDERR $extfields[$i],"\n";
    539540        ($label, $value, $outline) = &parse_label ($extfields[$i]);
    540         # print STDERR "[",$label,"]","[",$value,"]","[",$outline,"\n";
     541        # print STDERR "[",$label,"]","[",$value,"]","[",$outline,"\n";
    541542        print FILE "  \$link = \$link . \"&$outline\";\n";
    542543    }
     
    553554    # print STDERR "#############################\n";
    554555    # foreach my $key ( keys %linkarg ) {
    555     #   print STDERR "key: $key, value: $linkarg{$key}\n";
     556    #   print STDERR "key: $key, value: $linkarg{$key}\n";
    556557    # }
    557558
     
    560561
    561562    if ($linkarg{$word}) {
    562         # print STDERR "Case 1\n";
     563        # print STDERR "Case 1\n";
    563564        $linkarg{$word} = "$linkarg{$word},$value";
    564565    } else {
    565         # print STDERR "Case 2\n";
     566        # print STDERR "Case 2\n";
    566567        $linkarg{$word} = $value;
    567568    }
     
    585586    # print STDERR "### parse_label ###\n";
    586587    # for ($i = 0; $i < @field; $i++) {
    587     #   print STDERR "field[$i]=$field[$i]\n";
     588    #   print STDERR "field[$i]=$field[$i]\n";
    588589    # }
    589590    # for ($i = 0; $i < @fieldreal; $i++) {
    590     #   print STDERR "fieldreal[$i]=$fieldreal[$i]\n";
     591    #   print STDERR "fieldreal[$i]=$fieldreal[$i]\n";
    591592    # }
    592593    # for ($i = 0; $i < @count; $i++) {
    593     #   print STDERR "count[$i]=$count[$i]\n";
     594    #   print STDERR "count[$i]=$count[$i]\n";
    594595    # }
    595596
     
    598599    if ($string =~ m|\S+=\S+|) {
    599600        ($label, $value) = $string =~ m|(\S+)=(\S+)|;
    600         # print STDERR "value=$value\n";
     601        # print STDERR "value=$value\n";
    601602        if ($value =~ m|^\$|) {
    602603          MATCH_LABEL:
     
    669670    $name   = &parse_fieldname ($name);
    670671    if (exists $ops{$name}) {
    671         #if OPx was defined, replace it by its value
    672         $name = $ops{$name};
    673         $name =~ s/\s+//g;
     672        #if OPx was defined, replace it by its value
     673        $name = $ops{$name};
     674        $name =~ s/\s+//g;
    674675    }
    675676    $camera = &parse_fieldname ($camera);
Note: See TracChangeset for help on using the changeset viewer.