Skip to content

Commit 5193a5a

Browse files
Merge pull request #118 from NessieCanCode/add-cpu/gpu-hrs-comparison-to-reports
Display account and historical usage charts side by side
2 parents d299f71 + d744e91 commit 5193a5a

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

src/slurmcostmanager.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,16 @@ nav button:hover {
186186
.pagination {
187187
margin-top: 0.5em;
188188
}
189+
190+
/* Layout for side-by-side summary charts */
191+
.summary-charts {
192+
display: flex;
193+
flex-wrap: wrap;
194+
gap: 1em;
195+
margin-top: 1em;
196+
}
197+
198+
.summary-chart {
199+
flex: 1;
200+
min-width: 300px;
201+
}

src/slurmcostmanager.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -698,10 +698,22 @@ function Summary({ summary, details = [], daily = [], monthly = [], yearly = []
698698
})
699699
})
700700
),
701-
React.createElement('h3', null, 'CPU/GPU-hrs per Slurm account'),
702-
React.createElement(AccountsChart, { details }),
703-
React.createElement('h3', null, historicalLabel),
704-
React.createElement(HistoricalUsageChart, { data: historical })
701+
React.createElement(
702+
'div',
703+
{ className: 'summary-charts' },
704+
React.createElement(
705+
'div',
706+
{ className: 'summary-chart' },
707+
React.createElement('h3', null, 'CPU/GPU-hrs per Slurm account'),
708+
React.createElement(AccountsChart, { details })
709+
),
710+
React.createElement(
711+
'div',
712+
{ className: 'summary-chart' },
713+
React.createElement('h3', null, historicalLabel),
714+
React.createElement(HistoricalUsageChart, { data: historical })
715+
)
716+
)
705717
);
706718
}
707719

0 commit comments

Comments
 (0)