Teraslice CLI: `Helpers Display Default`
helpers/display.default
Table of contents
Constructors
Methods
Constructors
constructor
• new default(): default
Returns
Methods
display
▸ display(header
, items
, type
, active?
, parse?
, id?
): Promise
<void
>
Display teraslice responses in a table
Parameters
Name | Type | Description |
---|---|---|
header | any | Header values to include in output |
items | any | Teraslice client response object |
type | string | Output table type |
active? | boolean | Set to true use values in active list |
parse? | boolean | Set to true to parse response |
id? | string | id value used to filter results by job_id or ex_id |
Returns
Promise
<void
>
Defined in
teraslice-cli/src/helpers/display.ts:139
parseResponse
▸ parseResponse(header
, response
, active?
, id?
): any
[]
Parses the teraslice client endpoint responses into an array used to generate tables in command line output.
Parameters
Name | Type | Description |
---|---|---|
header | any [] | Header values to include in output |
response | Record <string , any > | Teraslice client response object |
active? | boolean | When set to true parse values in active list |
id? | string | id value used to filter results by job_id or ex_id |
Returns
any
[]
Table content is an array of arrays with each row an element in the array.
Defined in
teraslice-cli/src/helpers/display.ts:82
setAction
▸ setAction(action
, tense
): string
Parameters
Name | Type |
---|---|
action | string |
tense | string |
Returns
string
Defined in
teraslice-cli/src/helpers/display.ts:248
showPrompt
▸ showPrompt(action
, message?
): Promise
<boolean
>
Parameters
Name | Type | Default value |
---|---|---|
action | string | undefined |
message | string | '' |
Returns
Promise
<boolean
>