started improving web page and added more fixes
This commit is contained in:
25
logic/tasks/runner_data.go
Normal file
25
logic/tasks/runner_data.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
. "git.andr3h3nriqu3s.com/andr3/fyp/logic/db_types"
|
||||
. "git.andr3h3nriqu3s.com/andr3/fyp/logic/tasks/runner"
|
||||
. "git.andr3h3nriqu3s.com/andr3/fyp/logic/utils"
|
||||
)
|
||||
|
||||
func handleRunnerData(x *Handle) {
|
||||
type NonType struct{}
|
||||
PostAuthJson(x, "/tasks/runner/info", User_Admin, func(c *Context, dat *NonType) *Error {
|
||||
mutex_remote := LockRunners(x, "")
|
||||
defer mutex_remote.Unlock()
|
||||
mutex_local := LockRunners(x, "local")
|
||||
defer mutex_local.Unlock()
|
||||
|
||||
return c.SendJSON(struct {
|
||||
RemoteRunners map[string]interface{} `json:"remoteRunners"`
|
||||
LocalRunner *LocalRunners `json:"localRunners"`
|
||||
}{
|
||||
RemoteRunners: x.DataMap["runners"].(map[string]interface{}),
|
||||
LocalRunner: x.DataMap["local_runners"].(*LocalRunners),
|
||||
})
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user