Skip to content

Commit ec61335

Browse files
Allow hiding the processing section of 'tasks' dialogs based on backend configuration (requires mxcubecore feature ao-feature-hide_processing_task_section)
1 parent 18c23f8 commit ec61335

File tree

3 files changed

+129
-117
lines changed

3 files changed

+129
-117
lines changed

ui/src/components/Tasks/DataCollection.jsx

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -290,46 +290,50 @@ class DataCollection extends React.Component {
290290
</CollapsableRows>
291291
</Form>
292292

293-
<FieldsHeader title="Processing" />
294-
<CollapsableRows>
295-
<Form>
296-
<SelectField
297-
col1="3"
298-
col2="3"
299-
propName="space_group"
300-
label="Space group"
301-
list={SPACE_GROUPS}
302-
/>
303-
<Form.Label className="mb-2 mt-3">
304-
<b> Unit Cell: </b>
305-
</Form.Label>
306-
<FieldsRow>
307-
<InputField col1="1" col2="5" propName="cellA" label="a" />
308-
<InputField col1="1" col2="5" propName="cellB" label="b" />
309-
<InputField col1="1" col2="5" propName="cellC" label="c" />
310-
</FieldsRow>
311-
<FieldsRow>
312-
<InputField
313-
col1="1"
314-
col2="5"
315-
propName="cellAlpha"
316-
label="&alpha;"
317-
/>
318-
<InputField
319-
col1="1"
320-
col2="5"
321-
propName="cellBeta"
322-
label="&beta;"
323-
/>
324-
<InputField
325-
col1="1"
326-
col2="5"
327-
propName="cellGamma"
328-
label="&gamma;"
293+
{!this.props.initialValues.disable_processing && (
294+
<FieldsHeader title="Processing" />
295+
)}
296+
{!this.props.initialValues.disable_processing && (
297+
<CollapsableRows>
298+
<Form>
299+
<SelectField
300+
col1="3"
301+
col2="3"
302+
propName="space_group"
303+
label="Space group"
304+
list={SPACE_GROUPS}
329305
/>
330-
</FieldsRow>
331-
</Form>
332-
</CollapsableRows>
306+
<Form.Label className="mb-2 mt-3">
307+
<b> Unit Cell: </b>
308+
</Form.Label>
309+
<FieldsRow>
310+
<InputField col1="1" col2="5" propName="cellA" label="a" />
311+
<InputField col1="1" col2="5" propName="cellB" label="b" />
312+
<InputField col1="1" col2="5" propName="cellC" label="c" />
313+
</FieldsRow>
314+
<FieldsRow>
315+
<InputField
316+
col1="1"
317+
col2="5"
318+
propName="cellAlpha"
319+
label="&alpha;"
320+
/>
321+
<InputField
322+
col1="1"
323+
col2="5"
324+
propName="cellBeta"
325+
label="&beta;"
326+
/>
327+
<InputField
328+
col1="1"
329+
col2="5"
330+
propName="cellGamma"
331+
label="&gamma;"
332+
/>
333+
</FieldsRow>
334+
</Form>
335+
</CollapsableRows>
336+
)}
333337
</Modal.Body>
334338

335339
{this.props.taskData.state ? '' : this.showFooter()}

ui/src/components/Tasks/Helical.jsx

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -184,46 +184,50 @@ class Helical extends React.Component {
184184
</CollapsableRows>
185185
</Form>
186186

187-
<FieldsHeader title="Processing" />
188-
<CollapsableRows>
189-
<Form>
190-
<SelectField
191-
col1="3"
192-
col2="3"
193-
propName="space_group"
194-
label="Space group"
195-
list={SPACE_GROUPS}
196-
/>
197-
<Form.Label className="mb-2 mt-3">
198-
<b> Unit Cell: </b>
199-
</Form.Label>
200-
<FieldsRow>
201-
<InputField col1="1" col2="5" propName="cellA" label="a" />
202-
<InputField col1="1" col2="5" propName="cellB" label="b" />
203-
<InputField col1="1" col2="5" propName="cellC" label="c" />
204-
</FieldsRow>
205-
<FieldsRow>
206-
<InputField
207-
col1="1"
208-
col2="5"
209-
propName="cellAlpha"
210-
label="&alpha;"
211-
/>
212-
<InputField
213-
col1="1"
214-
col2="5"
215-
propName="cellBeta"
216-
label="&beta;"
217-
/>
218-
<InputField
219-
col1="1"
220-
col2="5"
221-
propName="cellGamma"
222-
label="&gamma;"
187+
{!this.props.initialValues.disable_processing && (
188+
<FieldsHeader title="Processing" />
189+
)}
190+
{!this.props.initialValues.disable_processing && (
191+
<CollapsableRows>
192+
<Form>
193+
<SelectField
194+
col1="3"
195+
col2="3"
196+
propName="space_group"
197+
label="Space group"
198+
list={SPACE_GROUPS}
223199
/>
224-
</FieldsRow>
225-
</Form>
226-
</CollapsableRows>
200+
<Form.Label className="mb-2 mt-3">
201+
<b> Unit Cell: </b>
202+
</Form.Label>
203+
<FieldsRow>
204+
<InputField col1="1" col2="5" propName="cellA" label="a" />
205+
<InputField col1="1" col2="5" propName="cellB" label="b" />
206+
<InputField col1="1" col2="5" propName="cellC" label="c" />
207+
</FieldsRow>
208+
<FieldsRow>
209+
<InputField
210+
col1="1"
211+
col2="5"
212+
propName="cellAlpha"
213+
label="&alpha;"
214+
/>
215+
<InputField
216+
col1="1"
217+
col2="5"
218+
propName="cellBeta"
219+
label="&beta;"
220+
/>
221+
<InputField
222+
col1="1"
223+
col2="5"
224+
propName="cellGamma"
225+
label="&gamma;"
226+
/>
227+
</FieldsRow>
228+
</Form>
229+
</CollapsableRows>
230+
)}
227231
</Modal.Body>
228232
{this.props.taskData.state ? (
229233
''

ui/src/components/Tasks/Mesh.jsx

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -193,46 +193,50 @@ class Mesh extends React.Component {
193193
</CollapsableRows>
194194
</Form>
195195

196-
<FieldsHeader title="Processing" />
197-
<CollapsableRows>
198-
<Form>
199-
<SelectField
200-
col1="3"
201-
col2="3"
202-
propName="space_group"
203-
label="Space group"
204-
list={SPACE_GROUPS}
205-
/>
206-
<Form.Label className="mb-2 mt-3">
207-
<b> Unit Cell: </b>
208-
</Form.Label>
209-
<FieldsRow>
210-
<InputField col1="1" col2="5" propName="cellA" label="a" />
211-
<InputField col1="1" col2="5" propName="cellB" label="b" />
212-
<InputField col1="1" col2="5" propName="cellC" label="c" />
213-
</FieldsRow>
214-
<FieldsRow>
215-
<InputField
216-
col1="1"
217-
col2="5"
218-
propName="cellAlpha"
219-
label="&alpha;"
220-
/>
221-
<InputField
222-
col1="1"
223-
col2="5"
224-
propName="cellBeta"
225-
label="&beta;"
226-
/>
227-
<InputField
228-
col1="1"
229-
col2="5"
230-
propName="cellGamma"
231-
label="&gamma;"
196+
{!this.props.initialValues.disable_processing && (
197+
<FieldsHeader title="Processing" />
198+
)}
199+
{!this.props.initialValues.disable_processing && (
200+
<CollapsableRows>
201+
<Form>
202+
<SelectField
203+
col1="3"
204+
col2="3"
205+
propName="space_group"
206+
label="Space group"
207+
list={SPACE_GROUPS}
232208
/>
233-
</FieldsRow>
234-
</Form>
235-
</CollapsableRows>
209+
<Form.Label className="mb-2 mt-3">
210+
<b> Unit Cell: </b>
211+
</Form.Label>
212+
<FieldsRow>
213+
<InputField col1="1" col2="5" propName="cellA" label="a" />
214+
<InputField col1="1" col2="5" propName="cellB" label="b" />
215+
<InputField col1="1" col2="5" propName="cellC" label="c" />
216+
</FieldsRow>
217+
<FieldsRow>
218+
<InputField
219+
col1="1"
220+
col2="5"
221+
propName="cellAlpha"
222+
label="&alpha;"
223+
/>
224+
<InputField
225+
col1="1"
226+
col2="5"
227+
propName="cellBeta"
228+
label="&beta;"
229+
/>
230+
<InputField
231+
col1="1"
232+
col2="5"
233+
propName="cellGamma"
234+
label="&gamma;"
235+
/>
236+
</FieldsRow>
237+
</Form>
238+
</CollapsableRows>
239+
)}
236240
</Modal.Body>
237241
{this.props.taskData.state ? (
238242
''

0 commit comments

Comments
 (0)