mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-10 00:47:26 +01:00
Minor fixes; Update frontend
This commit is contained in:
parent
8e8b205da8
commit
08d760361d
@ -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{
|
||||
|
@ -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 {
|
||||
|
2
frontend
2
frontend
@ -1 +1 @@
|
||||
Subproject commit 93ec75b801215d9b4175cb32dd485217b1cbe810
|
||||
Subproject commit b7e422e49ece2d9eeef7354ee595c54c474a4697
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user