1414import { h } from '/js/src/index.js' ;
1515import { formatDistinctLhcBeamEnergies } from '../format/formatDistinctLhcBeamEnergies.js' ;
1616import { formatLhcPeriodYear } from '../format/formatYear.js' ;
17- import { frontLink } from '../../../components/common/navigation/frontLink.js' ;
1817import { textFilter } from '../../../components/Filters/common/filters/textFilter.js' ;
18+ import { frontLink } from '../../../components/common/navigation/frontLink.js' ;
1919
2020/**
2121 * List of active columns for a generic periods table
@@ -24,29 +24,48 @@ export const lhcPeriodsActiveColumns = {
2424 name : {
2525 name : 'Name' ,
2626 visible : true ,
27- format : ( name , { id, runsCount } ) => h ( '.flex-row.flex-wrap' , [
28- h ( '.ph1.mh1.w-10' , name ) ,
29- h ( '.mh4' ) ,
30- frontLink (
31- [ 'Runs' , h ( '.badge' , `(${ runsCount } )` ) ] ,
32- 'runs-per-lhc-period' ,
33- { lhcPeriodName : name } ,
34- { class : `mh1 ${ runsCount === 0 ? 'gray-darker' : '' } ` } ,
35- ) ,
36- frontLink ( 'Data Passes' , 'data-passes-per-lhc-period-overview' , { lhcPeriodId : id } , { class : 'mh1' } ) ,
37- ] ) ,
3827 sortable : true ,
3928 filter : ( { namesFilterModel } ) => textFilter (
4029 namesFilterModel ,
4130 { class : 'w-75 mt1' , placeholder : 'e.g. LHC22a, lhc23b, ...' } ,
4231 ) ,
32+ classes : 'w-15' ,
33+ } ,
34+
35+ associatedRuns : {
36+ name : 'Runs' ,
37+ visible : true ,
38+ format : ( _ , { name, runsCount } ) =>
39+ runsCount === 0
40+ ? 'No runs'
41+ : frontLink (
42+ h ( '.flex-row.g3' , [ h ( '.f6.badge.bg-gray-light.black' , runsCount ) , 'Runs' ] ) ,
43+ 'runs-per-lhc-period' ,
44+ { lhcPeriodName : name } ,
45+ ) ,
46+ classes : 'w-15' ,
47+ } ,
48+
49+ associatedDataPasses : {
50+ name : 'Data Passes' ,
51+ visible : true ,
52+ format : ( _ , { id, dataPassesCount } ) =>
53+ dataPassesCount === 0
54+ ? 'No data pass'
55+ : frontLink (
56+ h ( '.flex-row.g3' , [ h ( '.f6.badge.bg-gray-light.black' , dataPassesCount ) , 'Data Passes' ] ) ,
57+ 'data-passes-per-lhc-period-overview' ,
58+ { lhcPeriodId : id } ,
59+ ) ,
60+ classes : 'w-20' ,
4361 } ,
4462
4563 avgCenterOfMassEnergy : {
46- name : [ 'Avg ' , h ( 'img' , { src : '/assets/center-of-mass-energy.svg' } ) , ' [GeV]' ] ,
64+ name : h ( '.flex-wrap' , [ 'Avg ' , h ( 'img' , { src : '/assets/center-of-mass-energy.svg' } ) , '[GeV]' ] ) ,
4765 visible : true ,
4866 sortable : true ,
4967 format : ( avgCenterOfMassEnergy ) => avgCenterOfMassEnergy ? `${ Number ( avgCenterOfMassEnergy ) . toFixed ( 2 ) } ` : '-' ,
68+ classes : 'w-10' ,
5069 } ,
5170
5271 year : {
@@ -58,6 +77,7 @@ export const lhcPeriodsActiveColumns = {
5877 yearsFilterModel ,
5978 { class : 'w-75 mt1' , placeholder : 'e.g. 2022, 2023, ...' } ,
6079 ) ,
80+ classes : 'w-7' ,
6181 } ,
6282
6383 beamType : {
@@ -69,6 +89,7 @@ export const lhcPeriodsActiveColumns = {
6989 beamTypesFilterModel ,
7090 { class : 'w-75 mt1' , placeholder : 'e.g. pp, PbPb' } ,
7191 ) ,
92+ classes : 'w-7' ,
7293 } ,
7394
7495 distinctEnergies : {
0 commit comments