mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
fix: fix renamed column reference in searchbar workflow
This commit is contained in:
parent
0bbedd1600
commit
9248ee8868
@ -14,7 +14,7 @@ var (
|
|||||||
func cliInit() {
|
func cliInit() {
|
||||||
flag.BoolVar(&flagInit, "init", false, "Setup var directory, initialize swlite database file, config.json and .env")
|
flag.BoolVar(&flagInit, "init", false, "Setup var directory, initialize swlite database file, config.json and .env")
|
||||||
flag.BoolVar(&flagReinitDB, "init-db", false, "Go through job-archive and re-initialize the 'job', 'tag', and 'jobtag' tables (all running jobs will be lost!)")
|
flag.BoolVar(&flagReinitDB, "init-db", false, "Go through job-archive and re-initialize the 'job', 'tag', and 'jobtag' tables (all running jobs will be lost!)")
|
||||||
flag.BoolVar(&flagSyncLDAP, "sync-ldap", false, "Sync the 'user' table with ldap")
|
flag.BoolVar(&flagSyncLDAP, "sync-ldap", false, "Sync the 'hpc_user' table with ldap")
|
||||||
flag.BoolVar(&flagServer, "server", false, "Start a server, continues listening on port after initialization and argument handling")
|
flag.BoolVar(&flagServer, "server", false, "Start a server, continues listening on port after initialization and argument handling")
|
||||||
flag.BoolVar(&flagGops, "gops", false, "Listen via github.com/google/gops/agent (for debugging)")
|
flag.BoolVar(&flagGops, "gops", false, "Listen via github.com/google/gops/agent (for debugging)")
|
||||||
flag.BoolVar(&flagDev, "dev", false, "Enable development components: GraphQL Playground and Swagger UI")
|
flag.BoolVar(&flagDev, "dev", false, "Enable development components: GraphQL Playground and Swagger UI")
|
||||||
|
@ -308,17 +308,17 @@ func (r *JobRepository) FindUserOrProjectOrJobname(user *schema.User, searchterm
|
|||||||
return searchterm, "", "", ""
|
return searchterm, "", "", ""
|
||||||
} else { // Has to have letters and logged-in user for other guesses
|
} else { // Has to have letters and logged-in user for other guesses
|
||||||
if user != nil {
|
if user != nil {
|
||||||
// Find username in jobs (match)
|
// Find username by username in job table (match)
|
||||||
uresult, _ := r.FindColumnValue(user, searchterm, "job", "user", "user", false)
|
uresult, _ := r.FindColumnValue(user, searchterm, "job", "hpc_user", "hpc_user", false)
|
||||||
if uresult != "" {
|
if uresult != "" {
|
||||||
return "", uresult, "", ""
|
return "", uresult, "", ""
|
||||||
}
|
}
|
||||||
// Find username by name (like)
|
// Find username by real name in hpc_user table (like)
|
||||||
nresult, _ := r.FindColumnValue(user, searchterm, "hpc_user", "username", "name", true)
|
nresult, _ := r.FindColumnValue(user, searchterm, "hpc_user", "username", "name", true)
|
||||||
if nresult != "" {
|
if nresult != "" {
|
||||||
return "", nresult, "", ""
|
return "", nresult, "", ""
|
||||||
}
|
}
|
||||||
// Find projectId in jobs (match)
|
// Find projectId by projectId in job table (match)
|
||||||
presult, _ := r.FindColumnValue(user, searchterm, "job", "project", "project", false)
|
presult, _ := r.FindColumnValue(user, searchterm, "job", "project", "project", false)
|
||||||
if presult != "" {
|
if presult != "" {
|
||||||
return "", "", presult, ""
|
return "", "", presult, ""
|
||||||
|
Loading…
Reference in New Issue
Block a user