Skip to content

Commit d744e91

Browse files
committed
Show account and historical usage charts side by side
1 parent 9e3ebba commit d744e91

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
@@ -692,10 +692,22 @@ function Summary({ summary, details = [], daily = [], monthly = [], yearly = []
692692
})
693693
})
694694
),
695-
React.createElement('h3', null, 'CPU/GPU-hrs per Slurm account'),
696-
React.createElement(AccountsChart, { details }),
697-
React.createElement('h3', null, historicalLabel),
698-
React.createElement(HistoricalUsageChart, { data: historical })
695+
React.createElement(
696+
'div',
697+
{ className: 'summary-charts' },
698+
React.createElement(
699+
'div',
700+
{ className: 'summary-chart' },
701+
React.createElement('h3', null, 'CPU/GPU-hrs per Slurm account'),
702+
React.createElement(AccountsChart, { details })
703+
),
704+
React.createElement(
705+
'div',
706+
{ className: 'summary-chart' },
707+
React.createElement('h3', null, historicalLabel),
708+
React.createElement(HistoricalUsageChart, { data: historical })
709+
)
710+
)
699711
);
700712
}
701713

0 commit comments

Comments
 (0)