-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pre-release/2024-R4.2 into master (#830)
* LIMS-1432: Add shelxt downstream view (#818) * LIMS-1436: Use auth provider provided logout URL when SSO is enabled (#822) * LIMS-1108: Improve message re international shipping (#721) * LIMS-1396: Use shipping service callback URL to only send emails once shipment is booked (#814) * LIMS-1435: Put CCP4 location into config variable (#821) * LIMS-656: Show auto subsamples if they have data (#817) --------- Co-authored-by: Dean Keeble <[email protected]> Co-authored-by: Guilherme Francisco <[email protected]> Co-authored-by: Mark Williams <[email protected]>
- Loading branch information
1 parent
c96ea08
commit 55b05b3
Showing
33 changed files
with
479 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,5 +122,10 @@ function validate($service, $ticket) | |
|
||
return rtrim($resp); | ||
} | ||
|
||
function logout() | ||
{ | ||
return false; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,9 @@ function authenticate($login, $password) | |
{ | ||
return true; | ||
} | ||
|
||
function logout() | ||
{ | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,9 @@ function authenticate($login, $password) | |
} | ||
} | ||
} | ||
|
||
function logout() | ||
{ | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
|
||
namespace SynchWeb\Downstream\Type; | ||
|
||
use SynchWeb\Downstream\DownstreamPlugin; | ||
use SynchWeb\Downstream\DownstreamResult; | ||
|
||
class Shelxt extends DownstreamPlugin { | ||
var $has_images = true; | ||
var $friendlyname = 'Shelxt'; | ||
var $has_mapmodel = array(1, 0); | ||
|
||
function _get_shelxt_results_json() { | ||
$appid = array($this->autoprocprogramid); | ||
$filepath = $this->db->pq( | ||
"SELECT app.filePath from autoprocprogramattachment app where autoprocprogramid = :1 and filename = 'shelxt_results.json' ", | ||
$appid | ||
); | ||
return $filepath; | ||
} | ||
|
||
function _get_shelxt_results_png() { | ||
$appid = array($this->autoprocprogramid); | ||
$filepath = $this->db->pq( | ||
"SELECT app.filepath, app.filename from autoprocprogramattachment app where autoprocprogramid = :1 and filename like '%.png%' ", | ||
$appid | ||
); | ||
return $filepath; | ||
} | ||
|
||
function _get_pdb() { | ||
$appid = array($this->autoprocprogramid); | ||
$filepath = $this->db->pq( | ||
"SELECT app.filepath, app.filename from autoprocprogramattachment app where autoprocprogramid = :1 and filename like '%.pdb%' ", | ||
$appid | ||
); | ||
if (sizeof($filepath)) { | ||
return $filepath[0]["FILEPATH"] . "/" . $filepath[0]["FILENAME"]; | ||
} else { | ||
return; | ||
} | ||
} | ||
|
||
function results() { | ||
$json_filepath = $this->_get_shelxt_results_json(); | ||
if (sizeof($json_filepath)) { | ||
$json_path = $json_filepath[0]["FILEPATH"] . "/shelxt_results.json" ; | ||
$json_data = file_get_contents($json_path); | ||
} else { | ||
$json_data = "[]"; | ||
} | ||
$dat = array(); | ||
$dat['BLOBS'] = 1; | ||
$dat['SOLUTIONS'] = json_decode($json_data); | ||
|
||
// scaling_id should always be present, but just in case... | ||
if (array_key_exists('scaling_id', $this->process['PARAMETERS'])) { | ||
$integrator = $this->_lookup_autoproc( | ||
null, | ||
$this->process['PARAMETERS']['scaling_id'] | ||
); | ||
if ($integrator) { | ||
$dat['PARENTAUTOPROCPROGRAM'] = $integrator['PROCESSINGPROGRAMS']; | ||
$dat['PARENTAUTOPROCPROGRAMID'] = $integrator['AUTOPROCPROGRAMID']; | ||
} | ||
} | ||
$results = new DownstreamResult($this); | ||
$results->data = $dat; | ||
|
||
return $results; | ||
} | ||
|
||
function images($n = 0) { | ||
$png = $this->_get_shelxt_results_png(); | ||
if (sizeof($png)) { | ||
return $png[0]["FILEPATH"] . "/" . $png[0]["FILENAME"]; | ||
} else { | ||
return; | ||
} | ||
|
||
} | ||
|
||
function mapmodel($n = 0, $map = false) { | ||
$pdb = $this->_get_pdb(); | ||
if (!$pdb) { | ||
return; | ||
} else { | ||
return $pdb; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.