Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.eso.org/~qc/dfos/others/php.html
Дата изменения: Fri Jun 19 12:52:14 2015 Дата индексирования: Sun Apr 10 19:51:53 2016 Кодировка: Поисковые слова: р п р п р п р п р п р п р п р п р п р п р п |
Other DFOS tools:
|
dfos = Data Flow Operations System, the common tool set for QC |
![]() |
new: | see also: | ||||||||
This page collects information
about the php scripts which are used on the web pages for the closed QC loop (calChecker, HC monitor, score report). |
|
|||||||||
tools with PHP scripts: calChecker | HC monitor (scoreHC, trendPlotter) | autoDaily | QuickLook score interface | shiftleader interface |
PHP stands for "PHP: Hypertext Preprocessor" (there seems to be no particular reason for the first P in PHP). It is a general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. Within dfos, it is used to provide interactive web interfaces. Find a PHP manual here.
In order to execute, php scripts need a php server installed. The web server running www.eso.org has a php server installation.
The calChecker and HC monitor web sites both use php-based web interfaces for accepting analysis results and comments. The (password-protected) interfaces are accessible in the same way to the QC scientists and to Paranal SciOps staff (the "users"), in order to exchange information about calibration completeness and quality issues.
There is also the HC monitor interface to force a run of autoDaily, used by PSO staff to request an update of the HC monitor.
The score_cgi.php is an (unprotected) php interface which creates the QuickPlot interface, useful for custom queries to the QC1 plotter.
qc_shift.php manages the entries on the QC shiftleader interface.
Usage
The calChecker analysis interface is linked to the calChecker main result page as analyze ISSUES .
Maintenance and management
The analysis interface is provided by the php script calAnalysis.php. Its entire source code is contained in the calChecker tool, in the function createCalEditor. It is created on the fly, and uploaded to the php URL, each time calChecker executes. If a change is needed, it has to be implemented in the calChecker tool. All changes on the php URL will be overwritten!
The output is:
These two scripts are uploaded to the php URL http://www.eso.org/observing/dfo/quality/<instrument>/reports/CAL/php/, e.g. here. They interact with the user input, and with the text file calEditor.txt which is managed by calChecker.
Workflow
This is the workflow within a calChecker execution:
The exact same workflow exists for the CAL4CAL cases; the php URL is http://www.eso.org/observing/dfo/quality/<instrument>/reports/CAL/CAL4CALphp.
On the php URL, the workflow for the analysis tool is the following:
Installation
No installation needed. The tool calChecker manages the php scripts automatically (each time it executes), including the required directory structure on the web server and management of the access rights.
2.
HC monitor php: the comment interface
Usage
The Health Check comment editor is linked to
The link goes to the HTML page score_overview_core_all.html collecting the report scores of the respective instrument HC monitor, and the links to the comment interface which is on http://www.eso.org/observing/dfo/quality/<instrument>/reports/php/hcComments.php, e.g. here.
Maintenance and management
The HC comment interface is provided by the php script hcComments.php. Its entire source code is contained in the scoreHC tool, in the section 0.8 "php script generation". It is not created on the fly but on demand, by calling
scoreHC -P .
[The reason for this is that scoreHC, embedded in trendPlotter, can be called with many instances at a time, and this could cause trouble with uploading the php tools.]
This creates the two php scripts
and uploads them to their web URL. It also creates the required directory structure on the web server and manages the access rights.
These two scripts are uploaded to the php URL http://www.eso.org/observing/dfo/quality/<instrument>/reports/php/, e.g. here. They interact with the user input. The content of a comment file is stored in a file <report_name>.msg which is included in the report html file. The comment file is entirely managed on the web server, not on the local QC machine.
Its content is structured to always have a DATE (of creation or modification), the comment text, and the originator:
DATE | comment | author |
---|---|---|
2012-09-28 | test | [rhanusch@eso.org] |
If a change in the php code is needed, it has to be implemented in the scoreHC tool.
Workflow
This is the workflow for managing the HC comments:
a) creating a new HC comment:
- go to the comment editor, e.g. here,
either from the score overview page or from the local scoreManager page
- select the report for the comment and click 'go'
- enter date, comment, and email address; click 'submit'
The new comment appears immediately on the corresponding HC monitor page.
From the local scoreManager, choose 'edit comments' and then follow the same workflow as above.
b) updating an existing HC comment:
- go to the comment editor, select the report and click 'go'
- you have the choice to delete or update the comment
- for updates, now follow the same workflow as above
- for deletion, you are asked for confirmation, then the comment is deleted
- the changes appear immediately on the corresponding HC monitor page.
Installation
Call
scoreHC -P
once to initiate. This will create the php scripts, including the required directory structure on the web server and management of the access rights.
Any future change of the php code will be implemented by calling 'scoreHC -P'.
3.
HC monitor php: the forced refresh interface
Usage
The Health Check forced refresh interface is linked to every HC monitor page. It is under http://www.eso.org/observing/dfo/quality/<instrument>/reports/php/hcForcedRefresh.php. A dialog opens after authentication.
Maintenance and management
The php script hcForcedRefresh.php is contained in the autoDaily tool, as procedure "createPHP". It is created on the fly upon execution and transferred to the web server under the php URL http://www.eso.org/observing/dfo/quality/<instrument>/reports/php/. If executed successfully it creates a trigger file file HC_ENFORCED which is then spotted by a cronjob running on the muc machines and used as a trigger to launch 'autoDaily -F' there. See a description here.
During execution, there is a link which reflects the status of the autoDaily execution. Emails about start and finish of the tool are sent to the sender of the request and to the $OP_ADDRESS.
4.
QuickLook Interface score_cgi.php
Usage
This php interface is linked to the score report: click on 'explore', select a Qc1 parameter, click on 'select', and the php interface creates the QuickPlot interface. It can be used to select the relevant parameters for a QC1 plot.
Maintenance and management
The php tool is created by scoreQC, option -P [create PHP].
This creates the php script
score_cgi.php
and uploads it to the URL http://www.eso.org/observing/dfo/quality/ALL/php.
If a change in the php code is needed, it has to be implemented in the scoreQC tool.
Installation
Call
scoreQC -P
to create a new version and upload it.
Any future change of the php code will be implemented by calling 'scoreQC -P'.
5.
QC shiftleader interface qc_shift.php
Usage
This php interface is linked to the QC shiftleader interface under http://www.eso.org/~qc/QC_shift/QC_Shiftleader.html.
Maintenance and management
The php script qc_shift.php is stored under qc@stargate1:qc/ALL/qcshift. It is managed by rhanusch on a local PC.
The output of the script goes to http://www.eso.org/~qc/QC_shift/QC_Shiftleader.html. Its length is limited to max. 20 entries and is controlled by the cronjob qcShiftLog under qc@stargate1:bin. This cronjob is called once a day.
Installation
Manual installation.