Fix frontend errors

- todo: debug backend handling
This commit is contained in:
Christoph Kluge 2023-08-28 10:00:20 +02:00
parent ce758610b6
commit c84b819212
2 changed files with 11 additions and 3 deletions

View File

@ -221,14 +221,22 @@ func (r *JobRepository) jobsStats(
row := query.RunWith(r.DB).QueryRow() row := query.RunWith(r.DB).QueryRow()
stats := make([]*model.JobsStatistics, 0, 1) stats := make([]*model.JobsStatistics, 0, 1)
var jobs, walltime, nodeHours, coreHours, accHours sql.NullInt64 var jobs, walltime, nodes, nodeHours, cores, coreHours, accs, accHours sql.NullInt64
if err := row.Scan(&jobs, &walltime, &nodeHours, &coreHours, &accHours); err != nil { if err := row.Scan(&jobs, &walltime, &nodes, &nodeHours, &cores, &coreHours, &accs, &accHours); err != nil {
log.Warn("Error while scanning rows") log.Warn("Error while scanning rows")
return nil, err return nil, err
} }
if jobs.Valid { if jobs.Valid {
var totalCoreHours, totalAccHours int var totalCoreHours, totalAccHours int
// var totalCores, totalAccs int
// if cores.Valid {
// totalCores = int(cores.Int64)
// }
// if accs.Valid {
// totalAccs = int(accs.Int64)
// }
if coreHours.Valid { if coreHours.Valid {
totalCoreHours = int(coreHours.Int64) totalCoreHours = int(coreHours.Int64)

View File

@ -77,7 +77,7 @@
client: client, client: client,
query: gql` query: gql`
query($jobFilters: [JobFilter!]!, $paging: PageRequest!) { query($jobFilters: [JobFilter!]!, $paging: PageRequest!) {
jobsStatistics(filter: $jobFilters, page: $paging, sortBy: TOTALCOREHOURS, groupBy: USER) { jobsStatistics(filter: $jobFilters, page: $paging, sortBy: COREHOURS, groupBy: USER) {
id id
totalCoreHours totalCoreHours
} }