Skip to main content

teraslice-cli / helpers/display / default

Class: default

Constructors

new default()

new default(): default

Returns

default

Methods

display()

display(header, items, type, active?, parse?, id?): Promise<void>

Display teraslice responses in a table

Parameters

ParameterTypeDescription
headeranyHeader values to include in output
itemsanyTeraslice client response object
typestringOutput table type
active?booleanSet to true use values in active list
parse?booleanSet to true to parse response
id?stringid 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

ParameterTypeDescription
headerany[]Header values to include in output
responseRecord<string, any>Teraslice client response object
active?booleanWhen set to true parse values in active list
id?stringid 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

ParameterType
actionAction
tenseTense

Returns

UpdateActions

Source

teraslice-cli/src/helpers/display.ts:249


showPrompt()

showPrompt(action, message): Promise<boolean>

Parameters

ParameterTypeDefault value
actionstringundefined
messagestring''

Returns

Promise<boolean>

Source

teraslice-cli/src/helpers/display.ts:237