(items []WorkspaceRecord)
| 384 | } |
| 385 | |
| 386 | func workspaceListBundle(items []WorkspaceRecord) outputBundle { |
| 387 | return listBundle( |
| 388 | items, |
| 389 | items, |
| 390 | "Workspaces", |
| 391 | []string{ |
| 392 | "ID", |
| 393 | workspaceNameValue, |
| 394 | workspaceRootValue, |
| 395 | "Add Dirs", |
| 396 | "Default Agent", |
| 397 | workspaceSandboxValue, |
| 398 | workspaceUpdatedValue, |
| 399 | }, |
| 400 | "workspaces", |
| 401 | []string{ |
| 402 | "id", |
| 403 | automationNameKey, |
| 404 | "root_dir", |
| 405 | "add_dir_count", |
| 406 | "default_agent", |
| 407 | "sandbox_ref", |
| 408 | automationUpdatedAtKey, |
| 409 | }, |
| 410 | func(item WorkspaceRecord) []string { |
| 411 | return []string{ |
| 412 | stringOrDash(item.ID), |
| 413 | stringOrDash(item.Name), |
| 414 | stringOrDash(item.RootDir), |
| 415 | strconv.Itoa(len(item.AddDirs)), |
| 416 | stringOrDash(item.DefaultAgent), |
| 417 | stringOrDash(item.SandboxRef), |
| 418 | stringOrDash(formatTime(item.UpdatedAt)), |
| 419 | } |
| 420 | }, |
| 421 | func(item WorkspaceRecord) []string { |
| 422 | return []string{ |
| 423 | item.ID, |
| 424 | item.Name, |
| 425 | item.RootDir, |
| 426 | strconv.Itoa(len(item.AddDirs)), |
| 427 | item.DefaultAgent, |
| 428 | item.SandboxRef, |
| 429 | formatTime(item.UpdatedAt), |
| 430 | } |
| 431 | }, |
| 432 | ) |
| 433 | } |
| 434 | |
| 435 | type workspaceDetailOutput struct { |
| 436 | WorkspaceDetailRecord |
no test coverage detected