Skip to content

Commit 92984cb

Browse files
ndg63276Mark Williamsgfrn
authored
Merge pre-release/2025-R1.3 into master (#913)
* LIMS-1621: Support webcam auth (#898) Co-authored-by: Mark Williams <[email protected]> * LIMS-1549: Disallow dispatch requests on dewars that are 'processing' (#884) Co-authored-by: Mark Williams <[email protected]> * LIMS-1287: Improve workflow for responsive scheduling (#889) * LIMS-1287: Improve workflow for responsive scheduling * LIMS-1287: Dont allow 'Other' for red/yellow shipments --------- Co-authored-by: Mark Williams <[email protected]> * LIMS-1064: Display dropdown or span depending on number of schema options (#870) Co-authored-by: Mark Williams <[email protected]> * LIMS-1589 - Remove Highcharts (#878) * Remove touchscreen app * Remove unused dependencies * Remove local version of jquery-flot-pie * Remove aliased dependencies * Remove unused app file, dead dependencies * Remove unused vendor files * Remove unused dependencies * Remove Highcharts and Moment dependencies * Reinstate call to plotYears Co-authored-by: Mark W <[email protected]> --------- Co-authored-by: Mark W <[email protected]> * LIMS-103: Fix various bugs in Screens UI (#863) * LIMS-103: Fix various bugs in Screens UI * Update api/src/Page/Shipment.php Co-authored-by: Guilherme Francisco <[email protected]> --------- Co-authored-by: Mark Williams <[email protected]> Co-authored-by: Guilherme Francisco <[email protected]> * LIMS-1652: Revert underscore to 1.8.3 (#906) Co-authored-by: Mark Williams <[email protected]> * LIMS-1287: Improve help text --------- Co-authored-by: Mark Williams <[email protected]> Co-authored-by: Guilherme Francisco <[email protected]>
1 parent 61600ca commit 92984cb

28 files changed

+353
-4717
lines changed

api/src/Database/Type/MySQL.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ class MySQL extends DatabaseParent {
130130

131131
// VMXi
132132
'ContainerInspection',
133+
'ContainerType',
133134
'Imager',
134135
'Screen',
135136
'ScreenComponentGroup',

api/src/Page.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ function auth($require_staff)
221221
if ($require_staff)
222222
{
223223
$auth = $this->staff;
224+
224225
}
225226
// Barcode Scanners
226227
else if ($this->bcr() && !$this->user->loginId)

api/src/Page/Image.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ function _forward_webcam() {
331331
$ch = curl_init();
332332
curl_setopt($ch, CURLOPT_URL, 'http://'.$img.'/axis-cgi/mjpg/video.cgi?fps=5&resolution=CIF&resolution=480x270');
333333
curl_setopt($ch, CURLOPT_HEADER, 0);
334+
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
334335
$im = curl_exec($ch);
335336
curl_close($ch);
336337
}

api/src/Page/Imaging.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class Imaging extends Page
4545
'PROPOSALID' => '\d+',
4646
'COMPONENTID' => '\d+',
4747
'GLOBAL' => '\d',
48+
'CONTAINERTYPEID' => '\d*',
4849
'SCREENCOMPONENTGROUPID' => '\d+',
4950
'SCREENCOMPONENTID' => '\d+',
5051
'CONCENTRATION' => '\d+(.\d+)?',
@@ -865,10 +866,11 @@ function _get_screens()
865866
array_push($args, $this->arg('scid'));
866867
}
867868

868-
$screens = $this->db->pq("SELECT 96 as capacity, CONCAT(p.proposalcode, p.proposalnumber) as prop, s.global, s.name, s.screenid, s.proposalid, count(distinct sg.screencomponentgroupid) as groups, count(distinct sc.screencomponentid) as components
869+
$screens = $this->db->pq("SELECT ct.name as containertypeid, IFNULL(ct.capacity, 96) as capacity, CONCAT(p.proposalcode, p.proposalnumber) as prop, s.global, s.name, s.screenid, s.proposalid, count(distinct sg.screencomponentgroupid) as groups, count(distinct sc.screencomponentid) as components
869870
FROM screen s
870871
LEFT OUTER JOIN screencomponentgroup sg ON sg.screenid = s.screenid
871872
LEFT OUTER JOIN screencomponent sc ON sc.screencomponentgroupid = sg.screencomponentgroupid
873+
LEFT OUTER JOIN containertype ct ON ct.containertypeid = s.containertypeid
872874
INNER JOIN proposal p ON p.proposalid = s.proposalid
873875
WHERE $where
874876
GROUP BY CONCAT(p.proposalcode, p.proposalnumber), s.global, s.name, s.screenid, s.proposalid", $args);
@@ -888,8 +890,8 @@ function _add_screen()
888890
if (!$this->has_arg('NAME'))
889891
$this->_error('No screen name provided');
890892

891-
$this->db->pq("INSERT INTO screen (screenid, name, proposalid)
892-
VALUES (s_screen.nextval, :1, :2) RETURNING screenid INTO :id", array($this->arg('NAME'), $this->proposalid));
893+
$this->db->pq("INSERT INTO screen (screenid, name, global, proposalid)
894+
VALUES (s_screen.nextval, :1, :2, :3) RETURNING screenid INTO :id", array($this->arg('NAME'), $this->arg('GLOBAL'), $this->proposalid));
893895

894896
$this->_output(array('SCREENID' => $this->db->id()));
895897
}
@@ -907,9 +909,10 @@ function _update_screen()
907909
if (!sizeof($sc))
908910
$this->_error('No such screen');
909911

910-
foreach (array('NAME', 'GLOBAL') as $f) {
912+
foreach (array('NAME', 'GLOBAL', 'CONTAINERTYPEID') as $f) {
911913
if ($this->has_arg($f)) {
912-
$this->db->pq('UPDATE screen SET ' . $f . '=:1 WHERE screenid=:2', array($this->arg($f), $this->arg('scid')));
914+
$argf = $this->arg($f) == '' ? null : $this->arg($f);
915+
$this->db->pq('UPDATE screen SET ' . $f . '=:1 WHERE screenid=:2', array($argf, $this->arg('scid')));
913916
$this->_output(array($f => $this->arg($f)));
914917
}
915918
}

api/src/Page/Shipment.php

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Shipment extends Page
8989
//'FIRSTEXPERIMENTID' => '\w+\d+-\d+',
9090

9191
// Fields for responsive remote questions:
92-
'DYNAMIC' => '1?|Yes|No',
92+
'DYNAMIC' => '\w+',
9393
'REMOTEORMAILIN' => '.*',
9494
'SESSIONLENGTH' => '\w+',
9595
'ENERGY' => '.*',
@@ -101,6 +101,7 @@ class Shipment extends Page
101101
'MULTIAXISGONIOMETRY' => '1?|Yes|No',
102102
'ENCLOSEDHARDDRIVE' => '1?|Yes|No',
103103
'ENCLOSEDTOOLS' => '1?|Yes|No',
104+
'LONGWAVELENGTH' => '1?|Yes|No',
104105

105106
'COMMENTS' => '.*',
106107

@@ -146,6 +147,7 @@ class Shipment extends Page
146147
'TOKEN' => '\w+',
147148
'tracking_number' => '\w+',
148149
'AWBURL' => '[\w\:\/\.\-]+',
150+
'PROPOSALTYPE' => '\w+',
149151
'pickup_confirmation_code' => '\w+',
150152

151153
'manifest' => '\d',
@@ -165,7 +167,8 @@ class Shipment extends Page
165167
'EXTRASUPPORTREQUIREMENT',
166168
'MULTIAXISGONIOMETRY',
167169
'ENCLOSEDHARDDRIVE',
168-
'ENCLOSEDTOOLS'
170+
'ENCLOSEDTOOLS',
171+
'LONGWAVELENGTH',
169172
);
170173

171174
public static $dispatch = array(
@@ -2592,14 +2595,22 @@ function _add_container_history()
25922595
function _get_container_types()
25932596
{
25942597
$where = '';
2598+
$args = array();
25952599
// By default only return active container types.
25962600
// If all param set return everything
25972601
if ($this->has_arg('all')) {
25982602
$where .= '1=1';
25992603
} else {
26002604
$where .= 'ct.active = 1';
26012605
}
2602-
$rows = $this->db->pq("SELECT ct.containerTypeId, name, ct.proposalType, ct.capacity, ct.wellPerRow, ct.dropPerWellX, ct.dropPerWellY, ct.dropHeight, ct.dropWidth, ct.wellDrop FROM ContainerType ct WHERE $where");
2606+
if ($this->has_arg('ty') && $this->arg('ty') == 'plate') {
2607+
$where .= " AND ct.wellperrow is not null";
2608+
}
2609+
if ($this->has_arg('PROPOSALTYPE')) {
2610+
$where .= ' AND ct.proposaltype = :1';
2611+
array_push($args, $this->arg('PROPOSALTYPE'));
2612+
}
2613+
$rows = $this->db->pq("SELECT ct.containerTypeId, name, ct.proposalType, ct.capacity, ct.wellPerRow, ct.dropPerWellX, ct.dropPerWellY, ct.dropHeight, ct.dropWidth, ct.wellDrop FROM ContainerType ct WHERE $where", $args);
26032614
$this->_output(array('total' => count($rows), 'data' => $rows));
26042615
}
26052616

@@ -2933,7 +2944,7 @@ function _add_shipment()
29332944

29342945
$dynamic = null;
29352946
if ($this->has_arg('DYNAMIC')) {
2936-
$dynamic = $this->arg("DYNAMIC") ? "Yes" : "No";
2947+
$dynamic = $this->arg("DYNAMIC");
29372948
}
29382949

29392950
$extra_array = array(
@@ -2943,6 +2954,7 @@ function _add_shipment()
29432954
);
29442955

29452956
if ($dynamic) {
2957+
$long_wavelength = $this->has_arg('LONGWAVELENGTH') ? $this->arg('LONGWAVELENGTH') : '';
29462958
$remote_or_mailin = $this->has_arg('REMOTEORMAILIN') ? $this->arg('REMOTEORMAILIN') : '';
29472959
$session_length = $this->has_arg('SESSIONLENGTH') ? $this->arg('SESSIONLENGTH') : '';
29482960
$energy_requirements = $this->has_arg('ENERGY') ? $this->arg('ENERGY') : '';
@@ -2965,6 +2977,7 @@ function _add_shipment()
29652977
$multi_axis_goniometry = $this->arg('MULTIAXISGONIOMETRY') ? "Yes" : "No";
29662978
}
29672979
$dynamic_options = array(
2980+
"LONGWAVELENGTH" => $long_wavelength,
29682981
"REMOTEORMAILIN" => $remote_or_mailin,
29692982
"SESSIONLENGTH" => $session_length,
29702983
"ENERGY" => $energy_requirements,

client/package-lock.json

Lines changed: 24 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"imports-loader": "^0.8.0",
3939
"jest-environment-jsdom": "^29.5.0",
4040
"mini-css-extract-plugin": "^2.6.1",
41-
"postcss": "^8.1.14",
41+
"postcss": "^8.4.31",
4242
"postcss-color-function": "^4.1.0",
4343
"postcss-extend-rule": "^3.0.0",
4444
"postcss-import": "^13.0.0",
@@ -60,7 +60,6 @@
6060
"webpack-dev-server": "^4.11.1"
6161
},
6262
"dependencies": {
63-
"@highcharts/map-collection": "^1.1.2",
6463
"backbone": "1.1.2",
6564
"backbone-validation": "0.9.1",
6665
"backbone.marionette": "2.1.0",
@@ -79,7 +78,6 @@
7978
"flot-axislabels": "^1.0.0",
8079
"flot-pie": "^1.0.0",
8180
"font-awesome": "^4.2.0",
82-
"highcharts": "^7.2.2",
8381
"jquery": "^1.12.4",
8482
"jquery-color": "^3.0.0-alpha.1",
8583
"jquery-flot-resize": "^1.0.0",
@@ -97,7 +95,7 @@
9795
"tailwindcss": "^1.9.5",
9896
"three": "^0.143.0",
9997
"uglymol": "^0.6.4",
100-
"underscore": "1.12.1",
98+
"underscore": "1.8.3",
10199
"util": "^0.12.4",
102100
"vee-validate": "^2.2.15",
103101
"vue": "^2.6.10",

client/src/css/partials/_tables.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ They can be overriden by specific classes below
165165
}
166166

167167
tr {
168-
.deactivate {
169-
display: none;
170-
}
171-
172168
&.inactive td {
173169
background: $content-inactive !important;
174170
}
@@ -179,10 +175,6 @@ They can be overriden by specific classes below
179175

180176
&.active td, &.active:nth-child(odd) td {
181177
background: $content-active;
182-
183-
.deactivate {
184-
display: inline;
185-
}
186178
}
187179
}
188180

0 commit comments

Comments
 (0)