(rows []policyTableRow, h *policy.ActionCommand)
| 454 | } |
| 455 | |
| 456 | func appendActionCommandRows(rows []policyTableRow, h *policy.ActionCommand) []policyTableRow { |
| 457 | if h.Script != "" { |
| 458 | rows = append(rows, |
| 459 | policyTableRow{" Embedded script (stored in repository):", "", ""}, |
| 460 | policyTableRow{indentMultilineString(h.Script, " "), "", ""}, |
| 461 | ) |
| 462 | } else { |
| 463 | rows = append(rows, |
| 464 | policyTableRow{" Command:", "", ""}, |
| 465 | policyTableRow{" " + h.Command + " " + strings.Join(h.Arguments, " "), "", ""}) |
| 466 | } |
| 467 | |
| 468 | actualMode := h.Mode |
| 469 | if actualMode == "" { |
| 470 | actualMode = "sync" |
| 471 | } |
| 472 | |
| 473 | rows = append(rows, |
| 474 | policyTableRow{" Mode:", actualMode, ""}, |
| 475 | policyTableRow{" Timeout:", (time.Second * time.Duration(h.TimeoutSeconds)).String(), ""}, |
| 476 | policyTableRow{"", "", ""}, |
| 477 | ) |
| 478 | |
| 479 | return rows |
| 480 | } |
| 481 | |
| 482 | func appendOSSnapshotPolicyRows(rows []policyTableRow, p *policy.Policy, def *policy.Definition) []policyTableRow { |
| 483 | rows = append(rows, |
no test coverage detected