Minor fixes; Update frontend

This commit is contained in:
Lou Knauer 2022-03-08 10:33:56 +01:00
parent 8e8b205da8
commit 08d760361d
5 changed files with 5 additions and 4 deletions

View File

@ -86,7 +86,7 @@ type ErrorResponse struct {
}
func handleError(err error, statusCode int, rw http.ResponseWriter) {
log.Printf("REST API error: %s", err.Error())
log.Warnf("REST API: %s", err.Error())
rw.Header().Add("Content-Type", "application/json")
rw.WriteHeader(statusCode)
json.NewEncoder(rw).Encode(ErrorResponse{

View File

@ -22,7 +22,7 @@ var db *sqlx.DB
var lookupConfigStmt *sqlx.Stmt
var lock sync.RWMutex
var uiDefaults map[string]interface{}
var cache lrucache.Cache = *lrucache.New(1024)
var cache *lrucache.Cache = lrucache.New(1024)
var Clusters []*model.Cluster
func Init(usersdb *sqlx.DB, authEnabled bool, uiConfig map[string]interface{}, jobArchive string) error {

@ -1 +1 @@
Subproject commit 93ec75b801215d9b4175cb32dd485217b1cbe810
Subproject commit b7e422e49ece2d9eeef7354ee595c54c474a4697

View File

@ -70,6 +70,7 @@ const JOBS_DB_INDEXES string = `
CREATE INDEX job_by_user ON job (user);
CREATE INDEX job_by_starttime ON job (start_time);
CREATE INDEX job_by_job_id ON job (job_id);
CREATE INDEX job_by_state ON job (job_state);
`
// Delete the tables "job", "tag" and "jobtag" from the database and

View File

@ -65,7 +65,7 @@ func (r *JobRepository) Find(
startTime *int64) (*schema.Job, error) {
q := sq.Select(jobColumns...).From("job").
Where("job.job_id = ?", jobId)
Where("job.job_id = ?", *jobId)
if cluster != nil {
q = q.Where("job.cluster = ?", *cluster)