From a17e4dd4809735e05bfa2ab3a887d8c258530de7 Mon Sep 17 00:00:00 2001 From: pmandrik Date: Mon, 14 Mar 2022 15:22:01 +0100 Subject: [PATCH] fix button --- .../cron/2.save_or_update_runs.js | 29 --------------- .../EditRunLumisections.js | 36 +++++++++++++++++-- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/runregistry_backend/cron/2.save_or_update_runs.js b/runregistry_backend/cron/2.save_or_update_runs.js index 9a51a97..baebc5b 100755 --- a/runregistry_backend/cron/2.save_or_update_runs.js +++ b/runregistry_backend/cron/2.save_or_update_runs.js @@ -271,35 +271,6 @@ exports.manually_update_a_run = async ( }); }; -exports.manually_update_a_run_ongoing = async ( - run_number, - { email, comment, manually_significant, atomic_version } -) => { - // get rr_attributes: - const { data: saved_run } = await axios.get(`${API_URL}/runs/${run_number}`); - const previous_rr_attributes = saved_run.rr_attributes; - - if (previous_rr_attributes.state !== 'OPEN') { - throw 'Run must be in state OPEN to be refreshed'; - } - // get oms_attributes: - const endpoint = `${OMS_URL}/${OMS_SPECIFIC_RUN(run_number)}`; - const { - data: { data: fetched_run }, - } = await instance.get(endpoint, { - headers: { - Authorization: `Bearer ${await getToken()}`, - }, - }); - const run_oms_attributes = fetched_run[0].attributes; - await exports.update_runs([run_oms_attributes], 0, { - previous_rr_attributes, - email, - comment, - manually_significant, - atomic_version, - }); -}; diff --git a/runregistry_frontend/components/online/manage_run/manageRun/editRunLumisections/EditRunLumisections.js b/runregistry_frontend/components/online/manage_run/manageRun/editRunLumisections/EditRunLumisections.js index daa2616..a53fa89 100644 --- a/runregistry_frontend/components/online/manage_run/manageRun/editRunLumisections/EditRunLumisections.js +++ b/runregistry_frontend/components/online/manage_run/manageRun/editRunLumisections/EditRunLumisections.js @@ -53,9 +53,41 @@ class EditRunLumisections extends Component { } return (
+ +
+
+ +
+
+ {run.significant ? (
-
@@ -111,7 +143,7 @@ class EditRunLumisections extends Component {
In order to edit a run's lumisections the run{' '} - must be marked significant first + must be marked significant first! .

You can mark a run significant by clicking 'make significant' in the