| Index: milo/api/resp/build.go
|
| diff --git a/milo/api/resp/build.go b/milo/api/resp/build.go
|
| index 174f328f23bcb78db9c004d9d3f524c70170d9aa..9c7e9685641a304801633ef64fcd1dfff70567e3 100644
|
| --- a/milo/api/resp/build.go
|
| +++ b/milo/api/resp/build.go
|
| @@ -285,11 +285,24 @@ func NewLink(label, url string) *Link {
|
| }
|
|
|
| func (comp *BuildComponent) toModelSummary() model.Summary {
|
| + text := comp.Text
|
| + // Max length for a datastore text field is 1500 char, but for summary purposes
|
| + // we don't really need anything much longer than 256 char or so.
|
| + const maxTextLen = 256
|
| + sliceIdx := 0
|
| + // Make sure we don't cut off characters inbetween runes.
|
| + for idx := range text {
|
| + if idx > maxTextLen {
|
| + break
|
| + }
|
| + sliceIdx = idx
|
| + }
|
| + text = text[:sliceIdx]
|
| return model.Summary{
|
| Status: comp.Status,
|
| Start: comp.Started,
|
| End: comp.Finished,
|
| - Text: comp.Text,
|
| + Text: text,
|
| }
|
| }
|
|
|
|
|