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 16 hours ago

In general, to avoid problems with automatic semicolon insertion, each statement should be explicitly terminated with a semicolon, especially when the next line begins with characters that could be parsed ambiguously. Here, the call to strictEqual on line 239 should be explicitly terminated.

The minimal fix without changing functionality is to add a semicolon at the end of line 239, turning strictEqual(runNumber, url.searchParams.get('runNumber')) into strictEqual(runNumber, url.searchParams.get('runNumber'));. This keeps the test logic identical while making the statement termination explicit and consistent with the rest of the file. No new imports, methods, or definitions are needed; only the one line is updated in QualityControl/test/public/pages/object-tree.test.js.

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
@@ -236,7 +236,7 @@
       const baseUrl = `${url.origin}${url.pathname}`;
 
       strictEqual(baseUrl, `${config.bookkeeping.url}/`);
-      strictEqual(runNumber, url.searchParams.get('runNumber'))
+      strictEqual(runNumber, url.searchParams.get('runNumber'));
     }
   )
 
EOF
@@ -236,7 +236,7 @@
const baseUrl = `${url.origin}${url.pathname}`;

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

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