Changeset 42384 for trunk/ippMonitor
- Timestamp:
- Feb 8, 2023, 12:00:36 PM (3 years ago)
- Location:
- trunk/ippMonitor
- Files:
-
- 19 edited
- 3 copied
-
. (modified) (1 prop)
-
INSTALL (modified) (2 diffs)
-
Makefile.in (modified) (1 diff)
-
config.dat.in (modified) (1 diff)
-
configure.tcsh (modified) (6 diffs)
-
def/fpcamPendingExp.d (copied) (copied from branches/eam_branches/ipp-20220316/ippMonitor/def/fpcamPendingExp.d )
-
def/fpcamProcessedExp.d (copied) (copied from branches/eam_branches/ipp-20220316/ippMonitor/def/fpcamProcessedExp.d )
-
def/fpcamStageExp.d (copied) (copied from branches/eam_branches/ipp-20220316/ippMonitor/def/fpcamStageExp.d )
-
raw/Login.php (modified) (4 diffs)
-
raw/SelectProject.php (modified) (2 diffs)
-
raw/czartool_getplot.php (modified) (1 diff)
-
raw/getlog.php (modified) (2 diffs)
-
raw/ipp.ffs.dat (modified) (1 diff)
-
raw/ipp.ffs.php (modified) (1 diff)
-
raw/ipp.php (modified) (6 diffs)
-
raw/plotHistogram.php (modified) (2 diffs)
-
raw/scatterPlot.php (modified) (2 diffs)
-
raw/show_and_delete_image.php (modified) (1 diff)
-
raw/show_log.php (modified) (2 diffs)
-
raw/showimage.php (modified) (2 diffs)
-
raw/skycellplot.php (modified) (2 diffs)
-
raw/skyplot.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20220316/ippMonitor (added) merged: 42199-42202,42210,42360
- Property svn:mergeinfo changed
-
trunk/ippMonitor/INSTALL
r41730 r42384 28 28 psconfig ipp-20210708-gentoo 29 29 30 # Copy these files and modify them. 31 # config.dat is used to generate the site.php file installed in the htdocs location 32 cp config.dat.in config.dat 33 34 # czarconfig.xml is used by czarpool.pl 35 cp czartool/czarconfig.xml.in czartool/czarconfig.xml 36 30 37 # run psconfigure to generate Makefile and raw/site.php 31 38 # DO NOT check site.php into the svn tree 32 39 # $CZARPLOTDIR and $METRICSPLOTDIR will be generated as links in the same folder as ippMonitor 33 # the structure of the names for these two directories are defined in Makefile.in 34 psconfigure --htdocs /var/www/localhost/htdocs --wwwbin /var/www/localhost/wwwbin -- site ~/ippconfig/ippmonitor.config40 # the structure of the names for these two directories are defined in Makefile.in a 41 psconfigure --htdocs /var/www/localhost/htdocs --wwwbin /var/www/localhost/wwwbin --pltdir /some/path --site ~/ippconfig/ippmonitor.config 35 42 36 43 ## NOTES: … … 41 48 ## For an initial installation, you may need to create /var/www/localhost/wwwbin 42 49 43 # Copy these files and modify them.44 # config.dat is used to generate the site.php file installed in the htdocs location45 cp config.dat.in config.dat46 47 # czarconfig.xml is used by czarpool.pl48 cp czartool/czarconfig.xml.in czartool/czarconfig.xml49 50 50 # install the php code: 51 51 # czartool_plots and ippMetrics will be linked to different path in different hostnames -
trunk/ippMonitor/Makefile.in
r42273 r42384 9 9 DESTBIN = @WWWBIN@ 10 10 DESTWWW = @HTDOCS@/ippMonitor 11 CZARPLOTDIR = /export/@HOST2@.0/ipp/czartool_plots 12 METRICSPLOTDIR = /export/@HOST2@.0/ipp/ippMetrics 11 12 CZARPLOTDIR = @PLTDIR@/czartool_plots 13 METRICSPLOTDIR = @PLTDIR@/ippMetrics 13 14 14 15 GENERATE = $(SCRIPTS)/generate -
trunk/ippMonitor/config.dat.in
r41679 r42384 98 98 $LABEL_APACHE6 = ""; 99 99 100 $HOST_APACHE_BACKUP1 = " ;"101 $LABEL_APACHE_BACKUP1 = " ;"100 $HOST_APACHE_BACKUP1 = ""; 101 $LABEL_APACHE_BACKUP1 = ""; 102 102 103 $HOST_APACHE_BACKUP2 = " ;"104 $LABEL_APACHE_BACKUP2 = " ;"103 $HOST_APACHE_BACKUP2 = ""; 104 $LABEL_APACHE_BACKUP2 = ""; 105 105 106 106 $HOST_HOME = ""; -
trunk/ippMonitor/configure.tcsh
r41730 r42384 18 18 set wwwbin = "" 19 19 set libdir = "" 20 set pltdir = "" 20 21 set datadir = "" 21 22 set site = "" … … 109 110 endif 110 111 breaksw; 112 case --pltdir* 113 if ("$1" == "--pltdir") then 114 shift 115 set pltdir = $1 116 else 117 set pltdir = `echo $1 | tr = ' ' | awk '{print $2}'` 118 endif 119 breaksw; 111 120 case --datadir* 112 121 if ("$1" == "--datadir") then … … 127 136 case --useMDB2 128 137 set DBI = "MDB2" 138 breaksw; 139 case --usePDO 140 set DBI = "PDO" 129 141 breaksw; 130 142 case --help: … … 150 162 echo "wwwbin: $wwwbin" 151 163 echo "libdir: $libdir" 164 echo "pltdir: $pltdir" 152 165 echo "datadir:$datadir" 153 166 echo "site: $site" … … 182 195 endif 183 196 197 # LIBDIR set the install lib directory 198 if ("$pltdir" == "") then 199 if ("$prefix" == "") goto usage 200 set pltdir = $prefix/plots 201 endif 202 184 203 # DATADIR holds the general non-binary files 185 204 if ("$datadir" == "") then … … 198 217 # convert Makefile.in to Makefile: 199 218 if (-e Makefile) mv -f Makefile Makefile~ 200 cat Makefile.in | sed "s|@HTDOCS@|$htdocs|" > tmp.1201 cat tmp.1 | sed "s|@ HOST2@|$hostname2|" > tmp.2202 cat tmp.2 | sed "s|@BINDIR@|$bindir|" > tmp.1203 cat tmp.1 | sed "s|@WWWBIN@|$wwwbin|" > Makefile219 cat Makefile.in | sed "s|@HTDOCS@|$htdocs|" > tmp.1 220 cat tmp.1 | sed "s|@PLTDIR@|$pltdir|" > tmp.2 221 cat tmp.2 | sed "s|@BINDIR@|$bindir|" > tmp.1 222 cat tmp.1 | sed "s|@WWWBIN@|$wwwbin|" > Makefile 204 223 rm -f tmp.1 tmp.2 205 224 -
trunk/ippMonitor/raw/Login.php
r25308 r42384 3 3 include 'ipp.php'; 4 4 5 if (($_SERVER[ REQUEST_METHOD] != 'POST') && ($_SERVER[REQUEST_METHOD] != 'GET')) {5 if (($_SERVER['REQUEST_METHOD'] != 'POST') && ($_SERVER['REQUEST_METHOD'] != 'GET')) { 6 6 menu ('ipp.menu.dat', 'Login', 'ipp.css', '', ''); 7 7 echo "Invalid Client Request<br>\n"; … … 10 10 } 11 11 12 if ($_SERVER[ REQUEST_METHOD] == 'GET') {12 if ($_SERVER['REQUEST_METHOD'] == 'GET') { 13 13 14 14 $ID = checkID (); … … 29 29 } 30 30 31 if ($_SERVER[ REQUEST_METHOD] == 'POST') {32 if (key_exists ( login, $_POST)) {31 if ($_SERVER['REQUEST_METHOD'] == 'POST') { 32 if (key_exists ('login', $_POST)) { 33 33 34 34 $ID = checkLogin (); … … 40 40 } 41 41 42 if (key_exists ( logout, $_POST)) {42 if (key_exists ('logout', $_POST)) { 43 43 menu ('ipp.menu.dat', 'Login', 'ipp.css', '', ''); 44 44 echo "You are now logged out<br>\n"; -
trunk/ippMonitor/raw/SelectProject.php
r9439 r42384 3 3 include 'ipp.php'; 4 4 5 if (($_SERVER[ REQUEST_METHOD] != 'POST') && ($_SERVER[REQUEST_METHOD] != 'GET')) {5 if (($_SERVER['REQUEST_METHOD'] != 'POST') && ($_SERVER['REQUEST_METHOD'] != 'GET')) { 6 6 menu ('ipp.menu.dat', 'Select Project', 'ipp.css', '', ''); 7 7 echo "Invalid Client Request<br>\n"; … … 12 12 $ID = checkID (); 13 13 14 if ($_SERVER[ REQUEST_METHOD] == 'GET') {14 if ($_SERVER['REQUEST_METHOD'] == 'GET') { 15 15 projectform ($ID); 16 16 } 17 17 18 if ($_SERVER[ REQUEST_METHOD] == 'POST') {18 if ($_SERVER['REQUEST_METHOD'] == 'POST') { 19 19 20 20 if (key_exists (project, $_POST)) { 21 $myProj = $_POST[ proj];21 $myProj = $_POST['proj']; 22 22 $ID['proj'] = $myProj; 23 23 // validate the existence of the project -
trunk/ippMonitor/raw/czartool_getplot.php
r40840 r42384 8 8 9 9 ### we must have been past arguments with GET: 10 if ($_SERVER[ REQUEST_METHOD] != 'GET') {10 if ($_SERVER['REQUEST_METHOD'] != 'GET') { 11 11 exit (); 12 12 } 13 13 14 $mode = $_GET[ mode];15 $type = $_GET[ type];16 $label = $_GET[ label];17 $stage = $_GET[ stage];18 $plottype = $_GET[ plottype];14 $mode = $_GET['mode']; 15 $type = $_GET['type']; 16 $label = $_GET['label']; 17 $stage = $_GET['stage']; 18 $plottype = $_GET['plottype']; 19 19 20 $proj = $_GET[ proj];20 $proj = $_GET['proj']; 21 21 22 22 $path = $CZARPLOTDIR; -
trunk/ippMonitor/raw/getlog.php
r41730 r42384 9 9 // load an image file from the image directory 10 10 // validate request 11 if ($_SERVER[ REQUEST_METHOD] != 'GET') {11 if ($_SERVER['REQUEST_METHOD'] != 'GET') { 12 12 exit (); 13 13 } … … 20 20 21 21 # $basename may contain filename@filerule 22 $basename = strtok($_GET[ name],"@");22 $basename = strtok($_GET['name'],"@"); 23 23 $filerule = strtok("@"); 24 24 -
trunk/ippMonitor/raw/ipp.ffs.dat
r41133 r42384 9 9 menulink | menuselect | link | Full Force Failed | failedFullforce.php 10 10 11 11 menutop | menutop | plain | | 12 menulink | menuselect | link | Forced Phot Camera Exp | fpcamStageExp.php 13 menulink | menuselect | link | Forced Phot Camera Pending | fpcamPendingExp.php 14 menulink | menuselect | link | Forced Phot Camera Processed Exp | fpcamProcessedExp.php -
trunk/ippMonitor/raw/ipp.ffs.php
r41126 r42384 8 8 if (! $ID['proj']) { projectform ($ID); } 9 9 10 menu('ipp.ffs.dat', 'F ull ForceSteps', 'ipp.css', $ID['link'], $ID['proj']);10 menu('ipp.ffs.dat', 'Forced Photometry Steps', 'ipp.css', $ID['link'], $ID['proj']); 11 11 12 12 // document body -
trunk/ippMonitor/raw/ipp.php
r41730 r42384 26 26 27 27 menu ('ipp.menu.dat', 'Select Project', 'ipp.css', $ID['link'], $ID['proj']); 28 if ( $_GET['new'] && $_GET['proj']) {28 if (isset($_GET['new']) && isset($_GET['proj'])) { 29 29 echo "<p> Project is now <b>" . $_GET['proj'] . "</b></p>\n"; 30 30 } … … 66 66 global $DBI; 67 67 68 if ($DBI == "PDO") { 69 $result = $qry->fetch(); 70 if ($result == NULL) { 71 $success = 0; 72 } else { 73 $success = 1; 74 } 75 } 68 76 if ($DBI == "MDB2") { 69 77 $result = $qry->fetchRow(); … … 90 98 global $CZARDBHOST; 91 99 100 // define the DSN strings. NOTE: PDO uses a different format from DB or MDB2 101 if ($database == $CZARDBNAME) { 102 $dsn_pdo = "mysql:host=$DBHOST;dbname=$database"; 103 $dsn = "mysql://$DBUSER:$DBPASS@$CZARDBHOST/$database"; 104 $dsnerr = "mysql://$DBUSER:XXX@$CZARDBHOST/$database"; // only used to report the error 105 } else { 106 $dsn_pdo = "mysql:host=$CZARDBHOST;dbname=$database"; // note this is case sensitive 107 $dsn = "mysql://$DBUSER:$DBPASS@$DBHOST/$database"; 108 $dsnerr = "mysql://$DBUSER:XXX@$DBHOST/$database"; // only used to report the error 109 } 110 111 // PDO has a different error handling method initially (throw exception) 112 // but after construction can be set to match DB & MDB2 113 if ($DBI == "PDO") { 114 try { 115 $db = new PDO($dsn_pdo, $DBUSER, $DBPASS); 116 $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); 117 } catch (PDOException $dberr) { 118 dbconnectFailure($dberr, $dsnerr); 119 } 120 return $db; 121 } 122 92 123 $success = 0; 93 124 if ($DBI == "MDB2") { … … 104 135 } 105 136 106 // connect to the database107 if ($database == $CZARDBNAME) {108 $dsn = "mysql://$DBUSER:$DBPASS@$CZARDBHOST/$database";109 $dsnerr = "mysql://$DBUSER:XXX@$CZARDBHOST/$database"; // only used to report the error110 } else {111 $dsn = "mysql://$DBUSER:$DBPASS@$DBHOST/$database";112 $dsnerr = "mysql://$DBUSER:XXX@$DBHOST/$database"; // only used to report the error113 }114 137 if ($DBI == "DB") { 115 138 $db = DB::connect($dsn); … … 118 141 $db = MDB2::connect($dsn); 119 142 } 120 121 143 if (dberror($db)) { 122 echo "<b>error accessing database</b><br>\n"; 123 echo "<b>tried $dsnerr</b><br>\n"; 124 $result = $db->getMessage(); 125 echo "$result<br>"; 126 menu_end(); 144 dbconnectFailure($db, $dsnerr); 127 145 } 128 146 return $db; 129 147 } 130 148 149 function dbconnectFailure($db, $dsnerr) { 150 echo "<b>error accessing database</b><br>\n"; 151 echo "<b>tried $dsnerr</b><br>\n"; 152 $result = $db->getMessage(); 153 echo "$result<br>"; 154 menu_end(); 155 } 156 157 # return true/false for an error 131 158 function dberror ($db) { 132 159 global $DBI; … … 137 164 if ($DBI == "DB") { 138 165 $dberr = DB::isError($db); 166 } 167 if ($DBI == "PDO") { 168 if ($db == null) { 169 $dberr = 1; 170 } else { 171 $dberr = 0; 172 } 139 173 } 140 174 -
trunk/ippMonitor/raw/plotHistogram.php
r41730 r42384 12 12 13 13 ### we must have been past arguments with GET: 14 if ($_SERVER[ REQUEST_METHOD] != 'GET') {14 if ($_SERVER['REQUEST_METHOD'] != 'GET') { 15 15 exit (); 16 16 } … … 43 43 } 44 44 45 $infile = $_GET[ input];46 $outfile = $_GET[ output];47 $title = $_GET[ title];45 $infile = $_GET['input']; 46 $outfile = $_GET['output']; 47 $title = $_GET['title']; 48 48 49 49 if ($debug) { -
trunk/ippMonitor/raw/scatterPlot.php
r41730 r42384 12 12 13 13 ### we must have been past arguments with GET: 14 if ($_SERVER[ REQUEST_METHOD] != 'GET') {14 if ($_SERVER['REQUEST_METHOD'] != 'GET') { 15 15 exit (); 16 16 } … … 43 43 } 44 44 45 $infile = $_GET[ input];46 $outfile = $_GET[ output];47 $title = $_GET[ title];45 $infile = $_GET['input']; 46 $outfile = $_GET['output']; 47 $title = $_GET['title']; 48 48 49 49 $title = preg_replace("/'/", "", $title); -
trunk/ippMonitor/raw/show_and_delete_image.php
r28433 r42384 2 2 3 3 ### we must have been past arguments with GET: 4 if ($_SERVER[ REQUEST_METHOD] != 'GET') {4 if ($_SERVER['REQUEST_METHOD'] != 'GET') { 5 5 exit (); 6 6 } 7 7 8 $filename = $_GET[ file];8 $filename = $_GET['file']; 9 9 10 10 $file = fopen ($filename, "r"); -
trunk/ippMonitor/raw/show_log.php
r41730 r42384 5 5 include 'site.php'; 6 6 7 if ($_SERVER[ REQUEST_METHOD] != 'GET') {7 if ($_SERVER['REQUEST_METHOD'] != 'GET') { 8 8 exit (); 9 9 } … … 13 13 putenv("PATH=$WWWBIN:$BINDIR:$PATH"); 14 14 15 $basename = $_GET[ basename];15 $basename = $_GET['basename']; 16 16 $basename = escapeshellarg($basename); 17 17 18 $state = $_GET[ state];18 $state = $_GET['state']; 19 19 $state = escapeshellarg($state); 20 20 if (!$state) $state = 'new'; -
trunk/ippMonitor/raw/showimage.php
r27054 r42384 11 11 // load an image file from the image directory 12 12 // validate request 13 if ($_SERVER[ REQUEST_METHOD] != 'GET') {13 if ($_SERVER['REQUEST_METHOD'] != 'GET') { 14 14 exit (); 15 15 } … … 20 20 21 21 # $basename may contain filename@filerule 22 $basename = $_GET[ name];23 $filerule = $_GET[ rule];24 $camera = $_GET[ camera];25 $class_id = $_GET[ class_id];22 $basename = $_GET['name']; 23 $filerule = $_GET['rule']; 24 $camera = $_GET['camera']; 25 $class_id = $_GET['class_id']; 26 26 27 27 $title = $basename; -
trunk/ippMonitor/raw/skycellplot.php
r41730 r42384 13 13 14 14 ### we must have been past arguments with GET: 15 if ($_SERVER[ REQUEST_METHOD] != 'GET') {15 if ($_SERVER['REQUEST_METHOD'] != 'GET') { 16 16 exit (); 17 17 } … … 44 44 } 45 45 46 $infile = $_GET[ input];47 $outfile = $_GET[ output];46 $infile = $_GET['input']; 47 $outfile = $_GET['output']; 48 48 49 49 $output = shell_exec("skycellplot.dvo $infile $outfile");//, $output, $status); -
trunk/ippMonitor/raw/skyplot.php
r41730 r42384 23 23 24 24 ### we must have been passed arguments with GET: 25 if ($_SERVER[ REQUEST_METHOD] != 'GET') {25 if ($_SERVER['REQUEST_METHOD'] != 'GET') { 26 26 exit (); 27 27 } … … 54 54 } 55 55 56 $infile = $_GET[ input];57 $outfile = $_GET[ output];56 $infile = $_GET['input']; 57 $outfile = $_GET['output']; 58 58 59 59 // $output = shell_exec("skyplot.dvo $infile $outfile");//, $output, $status);
Note:
See TracChangeset
for help on using the changeset viewer.
