MCPcopy Create free account
hub / github.com/rilldata/rill / newResourceTableRow

Function newResourceTableRow

cli/cmd/project/status.go:181–199  ·  view source on GitHub ↗
(r *runtimev1.Resource)

Source from the content-addressed store, hash-verified

179}
180
181func newResourceTableRow(r *runtimev1.Resource) *resourceTableRow {
182 truncErr := r.Meta.ReconcileError
183 if len(truncErr) > 80 {
184 truncErr = truncErr[:80] + "..."
185 }
186
187 truncWarn := strings.Join(r.Meta.ReconcileWarnings, "; ")
188 if len(truncWarn) > 80 {
189 truncWarn = truncWarn[:80] + "..."
190 }
191
192 return &resourceTableRow{
193 Type: runtime.PrettifyResourceKind(r.Meta.Name.Kind),
194 Name: r.Meta.Name.Name,
195 Status: runtime.PrettifyReconcileStatus(r.Meta.ReconcileStatus),
196 Error: truncErr,
197 Warning: truncWarn,
198 }
199}
200
201type parseErrorTableRow struct {
202 Path string `header:"path"`

Callers 1

StatusCmdFunction · 0.85

Calls 2

PrettifyResourceKindFunction · 0.92
PrettifyReconcileStatusFunction · 0.92

Tested by

no test coverage detected