@@ -7,11 +7,11 @@ import { useUserQuota } from 'src/pages/scientificServices/pipelines/hooks/useUs
77
88import { PipelineWidgetContainer } from './PipelineWidgetContainer' ;
99
10- export const QuotaRemainingWidget = ( { selectedPipeline } : { selectedPipeline ?: Pipeline } ) => {
10+ export const QuotaDetailsWidget = ( { selectedPipeline } : { selectedPipeline ?: Pipeline } ) => {
1111 const { quota, pipelineDetails, meetsMinimumQuota } = useUserQuota ( selectedPipeline ) ;
1212
1313 return (
14- < PipelineWidgetContainer title = 'Quota Remaining ' marginBottom = '1rem' >
14+ < PipelineWidgetContainer title = 'Quota Details ' marginBottom = '1rem' >
1515 { cond (
1616 [ ! selectedPipeline , ( ) => < div style = { { marginTop : '1rem' } } > Select a pipeline to see quota</ div > ] ,
1717 [
@@ -24,48 +24,38 @@ export const QuotaRemainingWidget = ({ selectedPipeline }: { selectedPipeline?:
2424 }
2525 return (
2626 < div style = { { marginTop : '1rem' } } >
27- < div style = { { fontWeight : 'bold' , textTransform : 'capitalize' } } > { quota . quotaUnits } </ div >
28- < div style = { { marginTop : '0.5rem' } } >
29- < div
30- style = { {
31- backgroundColor : '#e4e5e6' ,
32- borderRadius : '4px' ,
33- overflow : 'hidden' ,
34- } }
35- >
27+ < div
28+ style = { {
29+ borderLeft : `3px solid ${ meetsMinimumQuota ? '#5CC88D' : colors . warning ( 0.7 ) } ` ,
30+ paddingLeft : '1rem' ,
31+ } }
32+ >
33+ < div style = { { marginTop : '0.5rem' , gap : '5rem' } } >
3634 < div
37- aria-label = { `quota: ${ quota . quotaLimit - quota . quotaConsumed } remaining, ${
38- quota . quotaConsumed
39- } used`}
40- role = 'progressbar'
4135 style = { {
42- width : ` ${ ( ( quota . quotaLimit - quota . quotaConsumed ) / quota . quotaLimit ) * 100 } %` ,
43- height : '6px ' ,
44- backgroundColor : meetsMinimumQuota ? '#5CC88D' : colors . warning ( 0.6 ) ,
36+ display : 'flex' ,
37+ flexDirection : 'column ' ,
38+ alignItems : 'flex-start' ,
4539 } }
46- />
47- </ div >
48- </ div >
49- < div style = { { display : 'flex' , justifyContent : 'space-between' , marginTop : '0.5rem' , gap : '5rem' } } >
50- < div
51- style = { {
52- display : 'flex' ,
53- flexDirection : 'column' ,
54- alignItems : 'flex-start' ,
55- } }
56- >
57- < div style = { { fontWeight : 'bold' } } > { quota . quotaLimit - quota . quotaConsumed } </ div >
58- < div style = { { color : '#6B6C6E' , marginTop : '0.125rem' } } > Remaining</ div >
59- </ div >
60- < div
61- style = { {
62- display : 'flex' ,
63- flexDirection : 'column' ,
64- alignItems : 'flex-end' ,
65- } }
66- >
67- < div style = { { fontWeight : 'bold' } } > { quota . quotaConsumed } </ div >
68- < div style = { { color : '#6B6C6E' , marginTop : '0.125rem' } } > Used</ div >
40+ >
41+ < div style = { { fontWeight : 'bold' , fontSize : 16 } } > { quota . quotaLimit - quota . quotaConsumed } </ div >
42+ < div style = { { color : '#6B6C6E' , marginTop : '0.125rem' , fontSize : 13 } } >
43+ { quota . quotaUnits } remaining
44+ </ div >
45+ </ div >
46+ < div
47+ style = { {
48+ marginTop : '0.75rem' ,
49+ display : 'flex' ,
50+ flexDirection : 'column' ,
51+ alignItems : 'flex-start' ,
52+ } }
53+ >
54+ < div style = { { fontWeight : 'bold' , fontSize : 16 } } > { quota . quotaConsumed } </ div >
55+ < div style = { { color : '#6B6C6E' , marginTop : '0.125rem' , fontSize : 13 } } >
56+ { quota . quotaUnits } used
57+ </ div >
58+ </ div >
6959 </ div >
7060 </ div >
7161 { pipelineDetails && (
0 commit comments