teraslice-cli / helpers/display / default
Class: default
Constructors
new default()
new default():
default
Returns
Methods
display()
display(
header
,items
,type
,active
?,parse
?,id
?):Promise
<void
>
Display teraslice responses in a table
Parameters
Parameter | 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
>
Source
teraslice-cli/src/helpers/display.ts:140
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
Parameter | 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.
Source
teraslice-cli/src/helpers/display.ts:83
setAction()
setAction(
action
,tense
):UpdateActions
Parameters
Parameter | Type |
---|---|
action | Action |
tense | Tense |
Returns
Source
teraslice-cli/src/helpers/display.ts:249
showPrompt()
showPrompt(
action
,message
):Promise
<boolean
>
Parameters
Parameter | Type | Default value |
---|---|---|
action | string | undefined |
message | string | '' |
Returns
Promise
<boolean
>