Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions mxcubeweb/routes/samplecentring.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,38 +140,6 @@ def get_shapes():
resp.status_code = 200
return resp

@bp.route("/shapes/<sid>", methods=["GET"])
@server.restrict
def get_shape_with_sid(sid):
"""
Retrieve requested shape information.
:response Content-type: application/json, the stored centred positions.
:statuscode: 200: no error
:statuscode: 409: shape not found
"""
shape = app.sample_view.get_shapes()

if shape is not None:
resp = jsonify(shape)
resp.status_code = 200
return resp
return Response(status=409)

@bp.route("/shapes/<sid>", methods=["POST"])
def shape_add_result(sid):
"""
Update shape result data.
:parameter shape_data: dict with result info (result value dict, data file path)
:response Content-type: application/json, response status.
:statuscode: 200: no error
:statuscode: 409: error
"""
params = request.get_json()
result = params.get("result")
data_file = params.get("data_file")
app.sample_view.shape_add_result(sid, result, data_file)
return Response(status=200)

@bp.route("/shapes", methods=["POST"])
@server.require_control
@server.restrict
Expand Down Expand Up @@ -226,18 +194,6 @@ def rotate_to():

return resp

@bp.route("/centring/startauto", methods=["GET"])
@server.require_control
@server.restrict
def centre_auto():
"""
Start automatic (lucid) centring procedure.
:statuscode: 200: no error
:statuscode: 409: error
"""
app.sample_view.start_auto_centring()
return Response(status=200)

@bp.route("/centring/start_click_centring", methods=["PUT"])
@server.require_control
@server.restrict
Expand Down Expand Up @@ -311,14 +267,6 @@ def accept_centring():
HWR.beamline.diffractometer.accept_centring()
return Response(status=200)

@bp.route("/centring/reject", methods=["PUT"])
@server.require_control
@server.restrict
def reject_centring():
"""Reject the centring position."""
app.sample_view.reject_centring()
return Response(status=200)

@bp.route("/movetobeam", methods=["PUT"])
@server.require_control
@server.restrict
Expand Down