Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1464)

Unified Diff: scheduler/appengine/ui/presentation.go

Issue 2948103002: scheduler: rename JobID to JobName to avoid overloading JobID meaning. (Closed)
Patch Set: more js lowercase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scheduler/appengine/frontend/templates/pages/run_job_result.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scheduler/appengine/ui/presentation.go
diff --git a/scheduler/appengine/ui/presentation.go b/scheduler/appengine/ui/presentation.go
index 2cde68077994c570cb1966ee1a006ae2360c3bbd..73a3bb03abed5a1ff8c7704d19fd62fecb5cbaed 100644
--- a/scheduler/appengine/ui/presentation.go
+++ b/scheduler/appengine/ui/presentation.go
@@ -8,7 +8,6 @@ import (
"bytes"
"fmt"
"sort"
- "strings"
"time"
"github.com/dustin/go-humanize"
@@ -30,7 +29,7 @@ import (
// schedulerJob is UI representation of engine.Job entity.
type schedulerJob struct {
ProjectID string
- JobID string
+ JobName string
Schedule string
Definition string
Revision string
@@ -103,12 +102,9 @@ func makeJob(c context.Context, j *engine.Job) *schedulerJob {
sortGroup = "B"
}
- // JobID has form <project>/<id>. Split it into components.
- chunks := strings.Split(j.JobID, "/")
-
return &schedulerJob{
- ProjectID: chunks[0],
- JobID: chunks[1],
+ ProjectID: j.ProjectID,
+ JobName: j.GetJobName(),
Schedule: j.Schedule,
Definition: taskToText(j.Task),
Revision: j.Revision,
@@ -150,7 +146,7 @@ func (s sortedJobs) Less(i, j int) bool {
return sortby.Chain{
func(i, j int) bool { return s[i].ProjectID < s[j].ProjectID },
func(i, j int) bool { return s[i].sortGroup < s[j].sortGroup },
- func(i, j int) bool { return s[i].JobID < s[j].JobID },
+ func(i, j int) bool { return s[i].JobName < s[j].JobName },
}.Use(i, j)
}
@@ -168,7 +164,7 @@ func sortJobs(c context.Context, jobs []*engine.Job) sortedJobs {
// invocation is UI representation of engine.Invocation entity.
type invocation struct {
ProjectID string
- JobID string
+ JobName string
InvID int64
Attempt int64
Revision string
@@ -232,7 +228,7 @@ func makeInvocation(j *schedulerJob, i *engine.Invocation) *invocation {
return &invocation{
ProjectID: j.ProjectID,
- JobID: j.JobID,
+ JobName: j.JobName,
InvID: i.ID,
Attempt: i.RetryCount + 1,
Revision: i.Revision,
« no previous file with comments | « scheduler/appengine/frontend/templates/pages/run_job_result.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698