mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-10-30 23:45:06 +01:00 
			
		
		
		
	Merge back changes from main
This commit is contained in:
		| @@ -47,8 +47,8 @@ func GetJobRepository() *JobRepository { | |||||||
| 		db := GetConnection() | 		db := GetConnection() | ||||||
|  |  | ||||||
| 		jobRepoInstance = &JobRepository{ | 		jobRepoInstance = &JobRepository{ | ||||||
| 			DB:             db.DB, | 			DB:     db.DB, | ||||||
| 			driver:         db.Driver, | 			driver: db.Driver, | ||||||
|  |  | ||||||
| 			stmtCache:      sq.NewStmtCache(db.DB), | 			stmtCache:      sq.NewStmtCache(db.DB), | ||||||
| 			cache:          lrucache.New(1024 * 1024), | 			cache:          lrucache.New(1024 * 1024), | ||||||
| @@ -893,6 +893,18 @@ func (r *JobRepository) JobsStatistics(ctx context.Context, | |||||||
| 				stats[id.String].ShortJobs = int(shortJobs.Int64) | 				stats[id.String].ShortJobs = int(shortJobs.Int64) | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | 		if col == "job.user" { | ||||||
|  | 			for id, _ := range stats { | ||||||
|  | 				emptyDash := "-" | ||||||
|  | 				name, _ := r.FindNameByUser(ctx, id) | ||||||
|  | 				if name != "" { | ||||||
|  | 					stats[id].Name = &name | ||||||
|  | 				} else { | ||||||
|  | 					stats[id].Name = &emptyDash | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// Calculating the histogram data is expensive, so only do it if needed. | 	// Calculating the histogram data is expensive, so only do it if needed. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user