fix front end issues
This commit is contained in:
parent
177cf45af5
commit
d7afd72e5b
18 changed files with 345 additions and 61 deletions
|
|
@ -6,6 +6,9 @@ package backend
|
|||
#include <stdlib.h>
|
||||
#include "client.h"
|
||||
#include "val_helpers.h"
|
||||
|
||||
// Helper to index into xce_host_alloc_t** (CGO cannot dereference C pointer-to-pointer arrays).
|
||||
static xce_host_alloc_t *job_alloc_host(xce_job_alloc_t *a, int i) { return a->allocs[i]; }
|
||||
*/
|
||||
import "C"
|
||||
|
||||
|
|
@ -63,6 +66,15 @@ func cJobToModel(job *C.xce_job_t) *models.JobInfo {
|
|||
}
|
||||
r.submit = rd
|
||||
}
|
||||
if job.allocs != nil {
|
||||
n := int(job.allocs.nhosts)
|
||||
for i := 0; i < n; i++ {
|
||||
h := C.job_alloc_host(job.allocs, C.int(i))
|
||||
if h != nil && h.host != nil {
|
||||
r.execHosts = append(r.execHosts, C.GoString(h.host))
|
||||
}
|
||||
}
|
||||
}
|
||||
return rawJobToModel(r)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue