@broadcom/sysview-for-zowe-cli
Version:
Zowe CLI plugin for SYSVIEW
325 lines • 9.88 kB
JavaScript
"use strict";
/*
* Copyright (c) 2020 Broadcom. All Rights Reserved. The term
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
*
* This software and all information contained therein is
* confidential and proprietary and shall not be duplicated,
* used, disclosed, or disseminated in any way except as
* authorized by the applicable license agreement, without the
* express written permission of Broadcom. All authorized
* reproductions must be marked with this language.
*
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommandDefinitionOptions = void 0;
const Constants_1 = require("../Constants");
/**
* Here are all the options used in SYSVIEW REST API commands.
*
* @export
* @class CommandDefinitionOptions
*/
class CommandDefinitionOptions {
}
exports.CommandDefinitionOptions = CommandDefinitionOptions;
/**
* Capture data set name from which to retrieve captured commands
*
* @static
* @type {ICommandPositionalDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.CAPTURE_DSN_POSITIONAL = {
name: "capture-dsn",
description: "Capture data set name from which to retrieve captured commands",
type: "string",
required: true
};
/**
* Captured command to retrieve
*
* @static
* @type {ICommandPositionalDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.CAPTURE_COMMAND_POSITIONAL = {
name: "capture-command",
description: "Captured command to retrieve",
type: "string",
required: true
};
/**
* Local file containing the Capture commands to be executed
*
* @static
* @type {ICommandPositionalDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.CAPTURE_FILE_POSITIONAL = {
name: "capture-file",
description: "The list of SYSVIEW commands to be executed as an Event Capture." +
"This takes the same form as a CAPLIB member.",
type: "string",
required: true
};
/**
* Command(s) to be issued
*
* @static
* @type {ICommandPositionalDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.COMMAND_STRING_POSITIONAL = {
name: "command-string",
description: "Command(s) to be issued \n" +
"(If more than one command, separated by a semi-colon)\n" +
"Example: \"ACTIVITY;SORT CPU% D\"\n",
type: "string",
required: true
};
/**
* Row number of command within capture data set
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.CAPTURE_ROW_OPTION = {
name: "capture-row", aliases: ["cr"],
description: "Row number of command within capture data set",
type: "number",
group: "data options"
};
/**
* Screen name, for commands which have multiple screens
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.CAPTURE_SCREEN_OPTION = {
name: "capture-screen", aliases: ["cs"],
description: "Screen name, for commands which have multiple screens",
type: "string",
group: "data options"
};
/**
* The captured command screen title or a user supplied title specified on the CAPIMMED command
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.CAPTURE_TITLE_OPTION = {
name: "capture-title", aliases: ["ct"],
description: "The captured command screen title or a user supplied title specified on the CAPIMMED command",
type: "string",
group: "data options"
};
/**
* Capture description
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.CAPTURE_DESCRIPTION_OPTION = {
name: "capture-description", aliases: ["cd"],
description: "The description of the capture",
type: "string",
group: "data options"
};
/**
* Fields to be returned (by name). For example: "jobname" "cpu"
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.FIELDS_OPTION = {
name: "fields", aliases: ["f"],
description: "Fields to be returned (by name). For example: \"jobname\" \"cpu\"",
type: "array",
group: "data options"
};
/**
* Return all rows of data, no matter how many. Overrides --row-start and --row-end.
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.ALL_ROWS_OPTION = {
name: "all-rows", aliases: ["ar"],
description: "Return all rows of data, no matter how many. Overrides --row-start and --row-end",
type: "boolean",
group: "data options"
};
/**
* The first row of the response data to display
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.ROW_START_OPTION = {
name: "row-start", aliases: ["rs"],
description: "The first row of the response data to display",
type: "number",
defaultValue: Constants_1.Constants.DEFAULT_ROW_START,
group: "data options"
};
/**
* The last row of the response data to display
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.ROW_END_OPTION = {
name: "row-end", aliases: ["re"],
description: "The last row of the response data to display",
type: "number",
defaultValue: Constants_1.Constants.DEFAULT_ROW_END,
group: "data options"
};
/**
* The number of seconds to wait before timing out
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.TIMEOUT_OPTION = {
name: "timeout", aliases: ["to"],
description: "The number of seconds to wait before timing out",
type: "number",
defaultValue: Constants_1.Constants.DEFAULT_TIMEOUT,
numericValueRange: [1, 60], // tslint:disable-line: no-magic-numbers
group: "data options"
};
/**
* Don't accept types as parameter. Instead, use one of the following:
* --overview for OVERVIEW;
* --info for INFOALL;
* --pretty for DATAFLDS;STATUS;
* CONTEXT;DATAROWS; are always included
*/
// name: "types", aliases: ["t"],
// description: "Command data types to be returned. Valid values:\n" +
// " CONTEXT - command context data\n" +
// " OVERVIEW - overview area data\n" +
// " INFOALL - equivalent to INFOFLDS, INFOROWS, INFODATA\n" +
// " INFOFLDS - information area field descriptions\n" +
// " INFOROWS - information area rows as text\n" +
// " INFODATA - information values as keyword/value pairs\n" +
// " DATAALL - equivalent to DATAFLDS, DATAROWS\n" +
// " DATAFLDS - data area field descriptions\n" +
// " DATAROWS - data row values\n" +
// " STATUS - return field statuses along with row values.",
// type: "array"
/**
* Context fields to display. Defaults to hiding all context
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.CONTEXT_FIELDS_OPTION = {
name: "context-fields", aliases: ["cf"],
description: "Context fields to display. Defaults to hiding all context",
type: "array",
group: "display options"
};
/**
* Display the overview section
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.OVERVIEW_OPTION = {
name: "overview", aliases: ["o"],
description: "Display the overview section",
type: "boolean",
group: "display options"
};
/**
* Display the information area, if any
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.INFO_OPTION = {
name: "info", aliases: ["i"],
description: "Display the information area, if any",
type: "boolean",
group: "display options"
};
/**
* Display formatted data
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.PRETTY_OPTION = {
name: "pretty", aliases: ["p"],
description: "Display formatted data",
type: "boolean",
group: "display options"
};
/**
* Show a blank space instead of '0' values
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.BLANK_IF_ZERO_OPTION = {
name: "blank-if-zero", aliases: ["biz", "b"],
description: "Show a blank space instead of '0' values",
type: "boolean",
group: "display options"
};
/**
* Format data as a set of Comma Seperated Values
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.RESPONSE_FORMAT_CSV_OPTION = {
name: "response-format-csv", aliases: ["csv"],
description: "Format data as a set of Comma Seperated Values",
type: "boolean",
group: "response format options"
};
/**
* Truncate displays that are too wide for the console
*
* @static
* @type {ICommandOptionDefinition}
* @memberof CommandDefinitionOptions
*/
CommandDefinitionOptions.TRUNCATE_OPTION = {
name: "truncate", aliases: ["tr"],
description: "Truncate displays that are too wide for the console",
type: "boolean",
defaultValue: false,
group: "display options"
};
//# sourceMappingURL=CommandDefinitionOptions.js.map