| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. | 1 // Copyright 2016 The LUCI Authors. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. | 13 // limitations under the License. |
| 14 | 14 |
| 15 package resp | 15 package resp |
| 16 | 16 |
| 17 import "github.com/luci/luci-go/milo/common/model" | 17 import ( |
| 18 » "github.com/luci/luci-go/milo/common/model" |
| 19 ) |
| 18 | 20 |
| 19 // This file contains the structures for defining a Console view. | 21 // This file contains the structures for defining a Console view. |
| 20 // Console: The main entry point and the overall struct for a console page. | 22 // Console: The main entry point and the overall struct for a console page. |
| 21 // BuilderRef: Used both as an input to request a builder and headers for the co
nsole. | 23 // BuilderRef: Used both as an input to request a builder and headers for the co
nsole. |
| 22 // CommitBuild: A row in the console. References a commit with a list of build
summaries. | 24 // CommitBuild: A row in the console. References a commit with a list of build
summaries. |
| 23 // ConsoleBuild: A cell in the console. Contains all information required to ren
der the cell. | 25 // ConsoleBuild: A cell in the console. Contains all information required to ren
der the cell. |
| 24 | 26 |
| 25 // Console represents a console view. Commit contains the full matrix of | 27 // Console represents a console view. Commit contains the full matrix of |
| 26 // Commits x Builder, and BuilderRef contains information on how to render | 28 // Commits x Builder, and BuilderRef contains information on how to render |
| 27 // the header. The two structs are expected to be consistent. IE len(Console.[
]BuilderRef) | 29 // the header. The two structs are expected to be consistent. IE len(Console.[
]BuilderRef) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 43 // and organize builders. Adjacent builders with common categories will
be | 45 // and organize builders. Adjacent builders with common categories will
be |
| 44 // merged on the header. | 46 // merged on the header. |
| 45 Category []string | 47 Category []string |
| 46 // ShortName is a string of length 1-3 used to label the builder. | 48 // ShortName is a string of length 1-3 used to label the builder. |
| 47 ShortName string | 49 ShortName string |
| 48 } | 50 } |
| 49 | 51 |
| 50 // CommitBuild is a row in the console. References a commit with a list of buil
d summaries. | 52 // CommitBuild is a row in the console. References a commit with a list of buil
d summaries. |
| 51 type CommitBuild struct { | 53 type CommitBuild struct { |
| 52 Commit | 54 Commit |
| 53 » Build []*ConsoleBuild | 55 » Build []*model.BuildSummary |
| 54 } | 56 } |
| 55 | |
| 56 // ConsoleBuild is a cell in the console. Contains all information required to r
ender the cell. | |
| 57 type ConsoleBuild struct { | |
| 58 // Link to the build. Alt-text goes on the Label of the link | |
| 59 Link *Link | |
| 60 | |
| 61 // Status of the build. | |
| 62 Status model.Status | |
| 63 } | |
| OLD | NEW |