From c84e503b05da2b3dcd973debae18132f5e45caa7 Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Mon, 9 Dec 2024 14:55:21 +0000 Subject: [PATCH 1/2] LIMS-1536: Add more options to reprocessing --- client/src/js/modules/dc/views/reprocess2.js | 43 +++++++++++++++++-- .../js/modules/mc/views/datacollections.js | 25 ++++++++++- client/src/js/templates/dc/reprocess.html | 5 ++- client/src/js/templates/dc/reprocess_dc.html | 3 +- .../src/js/templates/mc/datacollections.html | 4 +- 5 files changed, 73 insertions(+), 7 deletions(-) diff --git a/client/src/js/modules/dc/views/reprocess2.js b/client/src/js/modules/dc/views/reprocess2.js index 6dee03148..54badb883 100644 --- a/client/src/js/modules/dc/views/reprocess2.js +++ b/client/src/js/modules/dc/views/reprocess2.js @@ -46,7 +46,8 @@ define(['backbone', 'marionette', 'views/dialog', ind: 'div.ind', pipeline: 'select[name=pipeline]', res: 'input[name=res]', - sg: 'select[name=SG]' + lowres: 'input[name=lowres]', + sg: 'input[name=SG]' }, events: { @@ -71,6 +72,7 @@ define(['backbone', 'marionette', 'views/dialog', 'change @ui.pipeline': 'updatePipeline', 'change @ui.res': 'updateRes', + 'change @ui.lowres': 'updateLowRes', }, @@ -78,6 +80,10 @@ define(['backbone', 'marionette', 'views/dialog', this.model.set('RES', this.ui.res.val()) }, + updateLowRes: function() { + this.model.set('LOWRES', this.ui.lowres.val()) + }, + updatePipeline: function() { this.model.set('PIPELINE', this.ui.pipeline.val()) }, @@ -139,6 +145,7 @@ define(['backbone', 'marionette', 'views/dialog', this.ui.ind.hide() this.$el.find('ul').addClass('half') this.$el.find('li input[type="text"]').css('width', '25%') + this.$el.find('div input[type="text"]').css('width', '50px') this.ui.pipeline.html(this.getOption('pipelines').opts()) this.model.set('PIPELINE', this.ui.pipeline.val()) }, @@ -172,7 +179,7 @@ define(['backbone', 'marionette', 'views/dialog', this.ui.be.val(c['CELL_BE']).trigger('change') this.ui.ga.val(c['CELL_GA']).trigger('change') - this.ui.sg.val(e['SG']).trigger('change') + this.ui.sg.val(e.get('SG')).trigger('change') } }, @@ -213,6 +220,12 @@ define(['backbone', 'marionette', 'views/dialog', }, KVCollection)) + var AbsorptionLevels = Backbone.Collection.extend(_.extend({ + keyAttribute: 'NAME', + valueAttribute: 'VALUE', + }, KVCollection)) + + return ReprocessView = DialogView.extend({ template: template, dialog: true, @@ -233,6 +246,7 @@ define(['backbone', 'marionette', 'views/dialog', sg: 'select[name=sg]', sm: 'input[name=sm]', indexingMethod: 'select[name=method]', + absorptionLevel: 'select[name=absorption_level]', }, buttons: { @@ -287,7 +301,7 @@ define(['backbone', 'marionette', 'views/dialog', }, xia2params: function() { - return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method'] + return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method', 'absorption_level'] }, integrate: function(e) { @@ -327,6 +341,12 @@ define(['backbone', 'marionette', 'views/dialog', PARAMETERVALUE: sw.get('RES') })) + if (sw.get('LOWRES')) reprocessingparams.add(new ReprocessingParameter({ + PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID'), + PARAMETERKEY: 'd_max', + PARAMETERVALUE: sw.get('LOWRES') + })) + var hascell = true var cell = [] _.each(['CELL_A', 'CELL_B', 'CELL_C', 'CELL_ALPHA', 'CELL_BETA', 'CELL_GAMMA'], function(f, i) { @@ -417,6 +437,13 @@ define(['backbone', 'marionette', 'views/dialog', PARAMETERVALUE: res })) + var lowres = self.$el.find('input[name=lowres]').val() + if (lowres) reprocessingparams.add(new ReprocessingParameter({ + PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID'), + PARAMETERKEY: 'd_max', + PARAMETERVALUE: lowres + })) + var hascell = true var cell = [] _.each(['a', 'b', 'c', 'alpha', 'beta', 'gamma'], function(f, i) { @@ -506,6 +533,7 @@ define(['backbone', 'marionette', 'views/dialog', onRender: function() { this.ui.opts.hide() this.ui.cell.hide() + this.$el.find('span input[type="text"]').css('width', '50px') this.pipelines = new Pipelines([ { NAME: 'Xia2 DIALS', VALUE: 'xia2-dials' }, @@ -525,6 +553,15 @@ define(['backbone', 'marionette', 'views/dialog', this.ui.indexingMethod.html(this.indexingMethods.opts()) + this.absorptionLevels = new AbsorptionLevels([ + { NAME: '-', VALUE: '' }, + { NAME: 'Low', VALUE: 'low' }, + { NAME: 'Medium', VALUE: 'medium' }, + { NAME: 'High', VALUE: 'high' }, + ]) + + this.ui.absorptionLevel.html(this.absorptionLevels.opts()) + // asynchronously load space groups into the select menu this.showSpaceGroups() diff --git a/client/src/js/modules/mc/views/datacollections.js b/client/src/js/modules/mc/views/datacollections.js index 3ba226c14..e595b7875 100644 --- a/client/src/js/modules/mc/views/datacollections.js +++ b/client/src/js/modules/mc/views/datacollections.js @@ -42,6 +42,12 @@ define(['backbone', 'marionette', }, KVCollection)) + var AbsorptionLevels = Backbone.Collection.extend(_.extend({ + keyAttribute: 'NAME', + valueAttribute: 'VALUE', + }, KVCollection)) + + return Marionette.LayoutView.extend({ className: 'content', template: template, @@ -63,6 +69,7 @@ define(['backbone', 'marionette', wait: '.wait', pipeline: 'select[name=pipeline]', indexingMethod: 'select[name=method]', + absorptionLevel: 'select[name=absorption_level]', opts: 'div.options', sm: 'input[name=sm]', sg: 'select[name=sg]', @@ -94,7 +101,7 @@ define(['backbone', 'marionette', }, xia2params: function() { - return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method'] + return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method', 'absorption_level'] }, integrate: function(e) { @@ -127,6 +134,13 @@ define(['backbone', 'marionette', PARAMETERVALUE: res })) + var lowres = self.$el.find('input[name=lowres]').val() + if (lowres) reprocessingparams.add(new ReprocessingParameter({ + PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID'), + PARAMETERKEY: 'd_max', + PARAMETERVALUE: lowres + })) + var hascell = true var cell = [] _.each(['a', 'b', 'c', 'alpha', 'beta', 'gamma'], function(f, i) { @@ -252,6 +266,15 @@ define(['backbone', 'marionette', ]) this.ui.indexingMethod.html(this.indexingMethods.opts()) + + this.absorptionLevels = new AbsorptionLevels([ + { NAME: '-', VALUE: '' }, + { NAME: 'Low', VALUE: 'low' }, + { NAME: 'Medium', VALUE: 'medium' }, + { NAME: 'High', VALUE: 'high' }, + ]) + + this.ui.absorptionLevel.html(this.absorptionLevels.opts()) }, setCell: function(view, ap) { diff --git a/client/src/js/templates/dc/reprocess.html b/client/src/js/templates/dc/reprocess.html index 69e9af116..fdf575bb7 100644 --- a/client/src/js/templates/dc/reprocess.html +++ b/client/src/js/templates/dc/reprocess.html @@ -11,7 +11,8 @@ | Pipeline : - High Res : Å | + High Res : Å + Low Res : Å | Space Group / Cell @@ -36,7 +37,9 @@ +

+ diff --git a/client/src/js/templates/dc/reprocess_dc.html b/client/src/js/templates/dc/reprocess_dc.html index 96c548c4e..f24b2cd57 100644 --- a/client/src/js/templates/dc/reprocess_dc.html +++ b/client/src/js/templates/dc/reprocess_dc.html @@ -7,7 +7,8 @@

Pipeline - High Res Å | + High Res Å + Low Res Å | Space Group / Cell
diff --git a/client/src/js/templates/mc/datacollections.html b/client/src/js/templates/mc/datacollections.html index f5a610f90..057c53633 100644 --- a/client/src/js/templates/mc/datacollections.html +++ b/client/src/js/templates/mc/datacollections.html @@ -28,7 +28,8 @@

Data Collections for <%-VISIT%>

- + + Integrate Xia2 Options @@ -41,6 +42,7 @@

Data Collections for <%-VISIT%>

+
From 8171b0e3179d48acb14cd88539c1f4309b3ef8e5 Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Tue, 14 Jan 2025 09:40:41 +0000 Subject: [PATCH 2/2] LIMS-1537: Fix colour on successful submission --- client/src/js/modules/mc/views/datacollections.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/js/modules/mc/views/datacollections.js b/client/src/js/modules/mc/views/datacollections.js index e595b7875..f354ed010 100644 --- a/client/src/js/modules/mc/views/datacollections.js +++ b/client/src/js/modules/mc/views/datacollections.js @@ -193,7 +193,7 @@ define(['backbone', 'marionette', var reprocessingsweeps = new ReprocessingImageSweeps(sweeps) reprocessingsweeps.save() - app.alert({ message: '1 reprocessing job successfully submitted'}) + app.message({ message: '1 reprocessing job successfully submitted'}) self._enqueue({ PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID') }) },