|
|
@@ -644,6 +644,7 @@ func CloudBrainDownloadModel(ctx *context.Context) { |
|
|
|
|
|
|
|
func GetRate(ctx *context.Context) { |
|
|
|
var jobID = ctx.Params(":jobid") |
|
|
|
isObjectDetcionAll := ctx.QueryBool("isObjectDetcionAll") |
|
|
|
job, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
if err != nil { |
|
|
|
ctx.ServerError("GetCloudbrainByJobID failed", err) |
|
|
@@ -652,7 +653,11 @@ func GetRate(ctx *context.Context) { |
|
|
|
|
|
|
|
if job.JobType == string(models.JobTypeBenchmark) { |
|
|
|
log.Info("url=" + setting.BenchmarkServerHost + "?username=" + ctx.User.Name) |
|
|
|
ctx.Redirect(setting.BenchmarkServerHost + "?username=" + ctx.User.Name) |
|
|
|
if isObjectDetcionAll { |
|
|
|
ctx.Redirect(setting.BenchmarkServerHost + "?username=admin") |
|
|
|
} else { |
|
|
|
ctx.Redirect(setting.BenchmarkServerHost + "?username=" + ctx.User.Name) |
|
|
|
} |
|
|
|
} else if job.JobType == string(models.JobTypeSnn4imagenet) { |
|
|
|
ctx.Redirect(setting.Snn4imagenetServerHost) |
|
|
|
} else if job.JobType == string(models.JobTypeBrainScore) { |
|
|
|