Skip to content

Conversation

@AlexJanson
Copy link
Collaborator

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

The user should be able to press on an icon that is to be displayed in the object info panel and navigate in a NEW tab to bookkeeipng run-details page of that run number.

  • Bookkeeping URL to use is to be configurable and taken from backend config file.
  • Thus, QCG should load at run time a new API endpoint sending the URL on load of the QCG application.
    For example, at start we load filter/configuration where we send data loaded on server start.
    We should add a new endpoint: services which returns an object of services and their connection links. For start, we will only provide in this object the configuraiton of bookkeeping service:
Bookkeeping: {
  BASE_URL: <url to bookkeeping>, // ... (e.g. ali-bookkeeping) taken from config.js
  PARTIAL_RUN_DETAILS: `?page=run-detail&runNumber=` // this will be used on front-end in combination with base url

Please add:

  • status controller method for handling this new route
  • status service method for gathering this information from config.js or loaded through constructor
  • tests on back-end
  • tests on front-end

Then on front-end side use this data to build the URL needed to access bookkeeping on the run-details page
e.g. of URL https://ali-bookkeeping.cern.ch/?page=run-detail&runNumber=568864

The button should be an icon next to the runNumber and should not be copied when cliking on runNumber
Moreover, if Bookkeeping is not present in the config.js file, this button should not be displayed

strictEqual(baseUrl, `${config.bookkeeping.url}/`);
strictEqual(runNumber, url.searchParams.get('runNumber'))
}
)

Check notice

Code scanning / CodeQL

Semicolon insertion Note test

Avoid automated semicolon insertion (95% of all statements in
the enclosing function
have an explicit semicolon).

Copilot Autofix

AI about 15 hours ago

To fix this, we should explicitly terminate the await testParent.test(...) statement that ends around line 241 with a semicolon. This means adding a ; immediately after the closing ) line so that the call is clearly a complete statement before the next await testParent.test(...) call begins. No imports, methods, or additional definitions are needed—this is a simple syntactic/style correction.

Concretely, in QualityControl/test/public/pages/object-tree.test.js, locate the await testParent.test( block starting at line 225 ('should have an external link to bookkeeping inline with the run number row') and ending at line 241. Change the final line of that call from ) to );. This preserves all existing functionality while eliminating reliance on automatic semicolon insertion.

Suggested changeset 1
QualityControl/test/public/pages/object-tree.test.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/QualityControl/test/public/pages/object-tree.test.js b/QualityControl/test/public/pages/object-tree.test.js
--- a/QualityControl/test/public/pages/object-tree.test.js
+++ b/QualityControl/test/public/pages/object-tree.test.js
@@ -238,7 +238,7 @@
       strictEqual(baseUrl, `${config.bookkeeping.url}/`);
       strictEqual(runNumber, url.searchParams.get('runNumber'));
     }
-  )
+  );
 
   await testParent.test(
     'should close the object plot upon clicking the close button',
EOF
@@ -238,7 +238,7 @@
strictEqual(baseUrl, `${config.bookkeeping.url}/`);
strictEqual(runNumber, url.searchParams.get('runNumber'));
}
)
);

await testParent.test(
'should close the object plot upon clicking the close button',
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants