mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
Fix frontend errors
- todo: debug backend handling
This commit is contained in:
parent
ce758610b6
commit
c84b819212
@ -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)
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user