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

Side by Side Diff: milo/appengine/frontend/buildbot_data.go

Issue 2944633003: [milo] Add BuildSummary and common models. (Closed)
Patch Set: add comments 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 unified diff | Download patch
« no previous file with comments | « milo/appengine/common/model/summary.go ('k') | milo/appengine/frontend/frontpage.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package frontend 5 package frontend
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 9
10 "github.com/luci/gae/impl/memory" 10 "github.com/luci/gae/impl/memory"
(...skipping 22 matching lines...) Expand all
33 Data: templates.Args{ 33 Data: templates.Args{
34 "Build": build, 34 "Build": build,
35 }, 35 },
36 }) 36 })
37 } 37 }
38 return bundles 38 return bundles
39 } 39 }
40 40
41 // buildbotBuilderTestData returns sample test data for builder pages. 41 // buildbotBuilderTestData returns sample test data for builder pages.
42 func buildbotBuilderTestData() []common.TestBundle { 42 func buildbotBuilderTestData() []common.TestBundle {
43 l := resp.NewLink("Some current build", "https://some.url/path")
43 return []common.TestBundle{ 44 return []common.TestBundle{
44 { 45 {
45 Description: "Basic Test no builds", 46 Description: "Basic Test no builds",
46 Data: templates.Args{ 47 Data: templates.Args{
47 "Builder": &resp.Builder{ 48 "Builder": &resp.Builder{
48 Name: "Sample Builder", 49 Name: "Sample Builder",
49 }, 50 },
50 }, 51 },
51 }, 52 },
52 { 53 {
53 Description: "Basic Test with builds", 54 Description: "Basic Test with builds",
54 Data: templates.Args{ 55 Data: templates.Args{
55 "Builder": &resp.Builder{ 56 "Builder": &resp.Builder{
56 Name: "Sample Builder", 57 Name: "Sample Builder",
57 MachinePool: &resp.MachinePool{ 58 MachinePool: &resp.MachinePool{
58 Total: 15, 59 Total: 15,
59 Disconnected: 13, 60 Disconnected: 13,
60 Idle: 5, 61 Idle: 5,
61 Busy: 8, 62 Busy: 8,
62 }, 63 },
63 CurrentBuilds: []*resp.BuildSummary{ 64 CurrentBuilds: []*resp.BuildSummary{
64 » » » » » » { 65 » » » » » » {Link: l, Revision: "deadbeef"},
65 » » » » » » » Link: &resp.Link{
66 » » » » » » » » URL: "https:// some.url/path",
67 » » » » » » » » Label: "Some cur rent build",
68 » » » » » » » },
69 » » » » » » » Revision: "deadbeef",
70 » » » » » » },
71 }, 66 },
72 PendingBuilds: []*resp.BuildSummary{ 67 PendingBuilds: []*resp.BuildSummary{
73 » » » » » » { 68 » » » » » » {Link: l, Revision: "deadbeef"},
74 » » » » » » » Link: &resp.Link{
75 » » » » » » » » URL: "https:// some.url/path",
76 » » » » » » » » Label: "Some cur rent build",
77 » » » » » » » },
78 » » » » » » » Revision: "deadbeef",
79 » » » » » » },
80 }, 69 },
81 FinishedBuilds: []*resp.BuildSummary{ 70 FinishedBuilds: []*resp.BuildSummary{
82 » » » » » » { 71 » » » » » » {Link: l, Revision: "deadbeef"},
83 » » » » » » » Link: &resp.Link{
84 » » » » » » » » URL: "https:// some.url/path",
85 » » » » » » » » Label: "Some cur rent build",
86 » » » » » » » },
87 » » » » » » » Revision: "deadbeef",
88 » » » » » » },
89 }, 72 },
90 }, 73 },
91 }, 74 },
92 }, 75 },
93 } 76 }
94 } 77 }
OLDNEW
« no previous file with comments | « milo/appengine/common/model/summary.go ('k') | milo/appengine/frontend/frontpage.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698