Skip to content

Commit

Permalink
Merge branch 'main' into xsalonx/MICS/O2B-1099/mode-reset-filter-btn-…
Browse files Browse the repository at this point in the history
…on-top
  • Loading branch information
xsalonx authored Apr 25, 2024
2 parents 4c684e8 + ddeedac commit 950ef22
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ export const simulationPassesActiveColumns = {
associatedDataPasses: {
name: 'Anchorage',
visible: true,
format: (_, { id }) => frontLink('Anchorage', 'data-passes-per-simulation-pass-overview', { simulationPassId: id }),
format: (_, { id, dataPassesCount }) =>
dataPassesCount === 0
? 'No anchorage'
: frontLink(
badge(dataPassesCount),
'data-passes-per-simulation-pass-overview',
{ simulationPassId: id },
),
classes: 'w-10 f6',
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = () => {
const tableDataValidators = {
name: (name) => periodNameRegex.test(name),
associatedRuns: (display) => /(No runs)|(\d+)/.test(display),
associatedDataPasses: (display) => 'Anchorage' === display,
associatedDataPasses: (display) => /(No anchorage)|(\d+)/.test(display),
pwg: (pwg) => /PWG.+/.test(pwg),
jiraId: (jiraId) => /[A-Z][A-Z0-9]+-[0-9]+/.test(jiraId),
requestedEventsCount: (requestedEventsCount) => !isNaN(requestedEventsCount.replace(/,/g, '')),
Expand Down
2 changes: 1 addition & 1 deletion test/public/simulationPasses/overviewPerLhcPeriod.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = () => {
const headerDatatypes = {
name: (name) => periodNameRegex.test(name),
associatedRuns: (display) => /(No runs)|(\d+)/.test(display),
associatedDataPasses: (display) => 'Anchorage' === display,
associatedDataPasses: (display) => /(No anchorage)|(\d+)/.test(display),
pwg: (pwg) => /PWG.+/.test(pwg),
jiraId: (jiraId) => /[A-Z]+[A-Z0-9]+-\d+/.test(jiraId),
requestedEventsCount: (requestedEventsCount) => !isNaN(requestedEventsCount.replace(/,/g, '')),
Expand Down

0 comments on commit 950ef22

Please sign in to comment.