@broadcom/mat-analyze-for-zowe-cli 2.0.5 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1193 -429
- package/lib/api/MATRest.d.ts +17 -0
- package/lib/api/MATRest.js +21 -1
- package/lib/api/MATRest.js.map +1 -1
- package/lib/api/response/ICallStack.d.ts +4 -0
- package/lib/api/response/ICallStack.js +25 -0
- package/lib/api/response/ICallStack.js.map +1 -0
- package/lib/api/response/ICicstat.d.ts +4 -0
- package/lib/api/response/ICicstat.js +25 -0
- package/lib/api/response/ICicstat.js.map +1 -0
- package/lib/api/response/IDML.d.ts +4 -0
- package/lib/api/response/IDML.js +25 -0
- package/lib/api/response/IDML.js.map +1 -0
- package/lib/api/response/IIDMSModule.d.ts +4 -0
- package/lib/api/response/IIDMSModule.js +25 -0
- package/lib/api/response/IIDMSModule.js.map +1 -0
- package/lib/api/response/IIDMSModuleDetail.d.ts +4 -0
- package/lib/api/response/IIDMSModuleDetail.js +25 -0
- package/lib/api/response/IIDMSModuleDetail.js.map +1 -0
- package/lib/api/response/IIDMSTask.d.ts +4 -0
- package/lib/api/response/IIDMSTask.js +25 -0
- package/lib/api/response/IIDMSTask.js.map +1 -0
- package/lib/api/response/IIMSSSAView.d.ts +4 -0
- package/lib/api/response/IIMSSSAView.js +25 -0
- package/lib/api/response/IIMSSSAView.js.map +1 -0
- package/lib/api/response/IIMSStatement.d.ts +4 -0
- package/lib/api/response/IIMSStatement.js +25 -0
- package/lib/api/response/IIMSStatement.js.map +1 -0
- package/lib/api/response/IIMSView.d.ts +4 -0
- package/lib/api/response/IIMSView.js +25 -0
- package/lib/api/response/IIMSView.js.map +1 -0
- package/lib/api/response/IIMSViewDBDName.d.ts +4 -0
- package/lib/api/response/IIMSViewDBDName.js +25 -0
- package/lib/api/response/IIMSViewDBDName.js.map +1 -0
- package/lib/api/response/IIMSViewPSBName.d.ts +4 -0
- package/lib/api/response/IIMSViewPSBName.js +25 -0
- package/lib/api/response/IIMSViewPSBName.js.map +1 -0
- package/lib/api/response/IIMSViewRegion.d.ts +4 -0
- package/lib/api/response/IIMSViewRegion.js +25 -0
- package/lib/api/response/IIMSViewRegion.js.map +1 -0
- package/lib/api/response/ITranview.d.ts +4 -0
- package/lib/api/response/ITranview.js +25 -0
- package/lib/api/response/ITranview.js.map +1 -0
- package/lib/cli/monitor/Monitor.definition.js +6 -1
- package/lib/cli/monitor/Monitor.definition.js.map +1 -1
- package/lib/cli/monitor/codeview/Histogram/Histogram.handler.d.ts +1 -0
- package/lib/cli/monitor/codeview/Histogram/Histogram.handler.js +91 -130
- package/lib/cli/monitor/codeview/Histogram/Histogram.handler.js.map +1 -1
- package/lib/cli/monitor/codeview/callerid/Callerid.handler.js.map +1 -1
- package/lib/cli/monitor/codeview/module/Module.definition.js +1 -1
- package/lib/cli/monitor/codeview/module/Module.definition.js.map +1 -1
- package/lib/cli/monitor/db2/db2view/DB2View.handler.js.map +1 -1
- package/lib/cli/monitor/db2/sqlview/SQLView.handler.js.map +1 -1
- package/lib/cli/monitor/idms/IDMS.definition.d.ts +16 -0
- package/lib/cli/monitor/idms/IDMS.definition.js +76 -0
- package/lib/cli/monitor/idms/IDMS.definition.js.map +1 -0
- package/lib/cli/monitor/idms/dml/DML.definition.d.ts +3 -0
- package/lib/cli/monitor/idms/dml/DML.definition.js +64 -0
- package/lib/cli/monitor/idms/dml/DML.definition.js.map +1 -0
- package/lib/cli/monitor/idms/dml/DML.handler.d.ts +7 -0
- package/lib/cli/monitor/idms/dml/DML.handler.js +52 -0
- package/lib/cli/monitor/idms/dml/DML.handler.js.map +1 -0
- package/lib/cli/monitor/idms/module/IDMSModule.definition.d.ts +16 -0
- package/lib/cli/monitor/idms/module/IDMSModule.definition.js +101 -0
- package/lib/cli/monitor/idms/module/IDMSModule.definition.js.map +1 -0
- package/lib/cli/monitor/idms/module/IDMSModule.handler.d.ts +8 -0
- package/lib/cli/monitor/idms/module/IDMSModule.handler.js +89 -0
- package/lib/cli/monitor/idms/module/IDMSModule.handler.js.map +1 -0
- package/lib/cli/monitor/idms/task/IDMSTask.definition.d.ts +3 -0
- package/lib/cli/monitor/idms/task/IDMSTask.definition.js +64 -0
- package/lib/cli/monitor/idms/task/IDMSTask.definition.js.map +1 -0
- package/lib/cli/monitor/idms/task/IDMSTask.handler.d.ts +7 -0
- package/lib/cli/monitor/idms/task/IDMSTask.handler.js +50 -0
- package/lib/cli/monitor/idms/task/IDMSTask.handler.js.map +1 -0
- package/lib/cli/monitor/ims/IMS.definition.d.ts +16 -0
- package/lib/cli/monitor/ims/IMS.definition.js +59 -0
- package/lib/cli/monitor/ims/IMS.definition.js.map +1 -0
- package/lib/cli/monitor/ims/dbdname/DBDName.definition.d.ts +2 -0
- package/lib/cli/monitor/ims/dbdname/DBDName.definition.js +61 -0
- package/lib/cli/monitor/ims/dbdname/DBDName.definition.js.map +1 -0
- package/lib/cli/monitor/ims/dbdname/DBDName.handler.d.ts +7 -0
- package/lib/cli/monitor/ims/dbdname/DBDName.handler.js +50 -0
- package/lib/cli/monitor/ims/dbdname/DBDName.handler.js.map +1 -0
- package/lib/cli/monitor/ims/imsview/IMSView.definition.d.ts +2 -0
- package/lib/cli/monitor/ims/imsview/IMSView.definition.js +61 -0
- package/lib/cli/monitor/ims/imsview/IMSView.definition.js.map +1 -0
- package/lib/cli/monitor/ims/imsview/IMSView.handler.d.ts +7 -0
- package/lib/cli/monitor/ims/imsview/IMSView.handler.js +51 -0
- package/lib/cli/monitor/ims/imsview/IMSView.handler.js.map +1 -0
- package/lib/cli/monitor/ims/psbname/PSBName.definition.d.ts +2 -0
- package/lib/cli/monitor/ims/psbname/PSBName.definition.js +61 -0
- package/lib/cli/monitor/ims/psbname/PSBName.definition.js.map +1 -0
- package/lib/cli/monitor/ims/psbname/PSBName.handler.d.ts +7 -0
- package/lib/cli/monitor/ims/psbname/PSBName.handler.js +60 -0
- package/lib/cli/monitor/ims/psbname/PSBName.handler.js.map +1 -0
- package/lib/cli/monitor/ims/region/Region.definition.d.ts +2 -0
- package/lib/cli/monitor/ims/region/Region.definition.js +61 -0
- package/lib/cli/monitor/ims/region/Region.definition.js.map +1 -0
- package/lib/cli/monitor/ims/region/Region.handler.d.ts +7 -0
- package/lib/cli/monitor/ims/region/Region.handler.js +62 -0
- package/lib/cli/monitor/ims/region/Region.handler.js.map +1 -0
- package/lib/cli/monitor/ims/ssa/SSA.definition.d.ts +2 -0
- package/lib/cli/monitor/ims/ssa/SSA.definition.js +82 -0
- package/lib/cli/monitor/ims/ssa/SSA.definition.js.map +1 -0
- package/lib/cli/monitor/ims/ssa/SSA.handler.d.ts +8 -0
- package/lib/cli/monitor/ims/ssa/SSA.handler.js +53 -0
- package/lib/cli/monitor/ims/ssa/SSA.handler.js.map +1 -0
- package/lib/cli/monitor/ims/statement/Statement.definition.d.ts +2 -0
- package/lib/cli/monitor/ims/statement/Statement.definition.js +68 -0
- package/lib/cli/monitor/ims/statement/Statement.definition.js.map +1 -0
- package/lib/cli/monitor/ims/statement/Statement.handler.d.ts +8 -0
- package/lib/cli/monitor/ims/statement/Statement.handler.js +63 -0
- package/lib/cli/monitor/ims/statement/Statement.handler.js.map +1 -0
- package/lib/cli/monitor/overview/Overview.handler.js.map +1 -1
- package/lib/cli/monitor/tranview/Tranview.definition.d.ts +16 -0
- package/lib/cli/monitor/tranview/Tranview.definition.js +81 -0
- package/lib/cli/monitor/tranview/Tranview.definition.js.map +1 -0
- package/lib/cli/monitor/tranview/all/All.definition.d.ts +3 -0
- package/lib/cli/monitor/tranview/all/All.definition.js +80 -0
- package/lib/cli/monitor/tranview/all/All.definition.js.map +1 -0
- package/lib/cli/monitor/tranview/all/All.handler.d.ts +7 -0
- package/lib/cli/monitor/tranview/all/All.handler.js +50 -0
- package/lib/cli/monitor/tranview/all/All.handler.js.map +1 -0
- package/lib/cli/monitor/tranview/callerid/Callerid.definition.d.ts +3 -0
- package/lib/cli/monitor/tranview/callerid/Callerid.definition.js +70 -0
- package/lib/cli/monitor/tranview/callerid/Callerid.definition.js.map +1 -0
- package/lib/cli/monitor/tranview/callerid/Callerid.handler.d.ts +8 -0
- package/lib/cli/monitor/tranview/callerid/Callerid.handler.js +54 -0
- package/lib/cli/monitor/tranview/callerid/Callerid.handler.js.map +1 -0
- package/lib/cli/monitor/tranview/callstack/CallStack.definition.d.ts +3 -0
- package/lib/cli/monitor/tranview/callstack/CallStack.definition.js +70 -0
- package/lib/cli/monitor/tranview/callstack/CallStack.definition.js.map +1 -0
- package/lib/cli/monitor/tranview/callstack/CallStack.handler.d.ts +8 -0
- package/lib/cli/monitor/tranview/callstack/CallStack.handler.js +53 -0
- package/lib/cli/monitor/tranview/callstack/CallStack.handler.js.map +1 -0
- package/lib/cli/monitor/tranview/csect/CsectDetail.definition.d.ts +2 -0
- package/lib/cli/monitor/tranview/csect/CsectDetail.definition.js +70 -0
- package/lib/cli/monitor/tranview/csect/CsectDetail.definition.js.map +1 -0
- package/lib/cli/monitor/tranview/csect/CsectDetail.handler.d.ts +8 -0
- package/lib/cli/monitor/tranview/csect/CsectDetail.handler.js +53 -0
- package/lib/cli/monitor/tranview/csect/CsectDetail.handler.js.map +1 -0
- package/lib/cli/monitor/tranview/delay/DelayDetail.definition.d.ts +2 -0
- package/lib/cli/monitor/tranview/delay/DelayDetail.definition.js +70 -0
- package/lib/cli/monitor/tranview/delay/DelayDetail.definition.js.map +1 -0
- package/lib/cli/monitor/tranview/delay/DelayDetail.handler.d.ts +8 -0
- package/lib/cli/monitor/tranview/delay/DelayDetail.handler.js +53 -0
- package/lib/cli/monitor/tranview/delay/DelayDetail.handler.js.map +1 -0
- package/lib/cli/monitor/tranview/module/Module.definition.d.ts +2 -0
- package/lib/cli/monitor/tranview/module/Module.definition.js +70 -0
- package/lib/cli/monitor/tranview/module/Module.definition.js.map +1 -0
- package/lib/cli/monitor/tranview/module/Module.handler.d.ts +7 -0
- package/lib/cli/monitor/tranview/module/Module.handler.js +50 -0
- package/lib/cli/monitor/tranview/module/Module.handler.js.map +1 -0
- package/lib/cli/monitor/tranview/stat/Cicstat.definition.d.ts +3 -0
- package/lib/cli/monitor/tranview/stat/Cicstat.definition.js +80 -0
- package/lib/cli/monitor/tranview/stat/Cicstat.definition.js.map +1 -0
- package/lib/cli/monitor/tranview/stat/Cicstat.handler.d.ts +8 -0
- package/lib/cli/monitor/tranview/stat/Cicstat.handler.js +173 -0
- package/lib/cli/monitor/tranview/stat/Cicstat.handler.js.map +1 -0
- package/lib/cli/profile/create/CreateProfile.handler.js.map +1 -1
- package/lib/cli/profile/invoke/InvokeProfile.handler.js.map +1 -1
- package/lib/cli/session/MATSession.js +2 -2
- package/lib/cli/session/MATSession.js.map +1 -1
- package/lib/handlers/AbstractAnalyzeHandler.js.map +1 -1
- package/lib/handlers/AbstractGetHandler.js +9 -9
- package/lib/handlers/AbstractGetHandler.js.map +1 -1
- package/lib/handlers/AbstractPostHandler.js +2 -2
- package/lib/handlers/AbstractPostHandler.js.map +1 -1
- package/lib/handlers/AbstractRestHandler.js +3 -16
- package/lib/handlers/AbstractRestHandler.js.map +1 -1
- package/lib/healthCheck.Handler.d.ts +53 -3
- package/lib/healthCheck.Handler.js +119 -18
- package/lib/healthCheck.Handler.js.map +1 -1
- package/lib/imperative.js +2 -15
- package/lib/imperative.js.map +1 -1
- package/lib/index.js +6 -2
- package/lib/index.js.map +1 -1
- package/package.json +33 -34
|
@@ -34,12 +34,77 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
34
34
|
const AbstractAnalyzeHandler_1 = require("../../../../handlers/AbstractAnalyzeHandler");
|
|
35
35
|
const MATRest_1 = require("../../../../api/MATRest");
|
|
36
36
|
const imperative_1 = require("@zowe/imperative");
|
|
37
|
-
|
|
38
|
-
const
|
|
37
|
+
const path = require("path");
|
|
38
|
+
const fs = require("fs");
|
|
39
39
|
class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
// Helper class to encapsulate specific operations
|
|
43
|
+
this.Helper = {
|
|
44
|
+
// Extract and parse the footprint from the JSON object
|
|
45
|
+
extractFootprint(json) {
|
|
46
|
+
let footprint = JSON.stringify(json.footprint);
|
|
47
|
+
footprint = footprint.substring(footprint.indexOf("[") + 1, footprint.indexOf("]"));
|
|
48
|
+
return JSON.parse(footprint); // Return the parsed footprint object
|
|
49
|
+
},
|
|
50
|
+
// Construct the REST API request URL using the footprint data
|
|
51
|
+
constructRequestUrl(jsonFootprint) {
|
|
52
|
+
return "/" + jsonFootprint.endevorBasePath + "/" + jsonFootprint.endevorContext + "/env/" + jsonFootprint.environment + "/stgnum/"
|
|
53
|
+
+ jsonFootprint.stage + "/sys/" + jsonFootprint.system + "/subsys/" + jsonFootprint.subsystem + "/type/" + jsonFootprint.type + "/ele/"
|
|
54
|
+
+ jsonFootprint.element + "?print=listing";
|
|
55
|
+
},
|
|
56
|
+
// Create a session with the required authentication details
|
|
57
|
+
createSession(jsonFootprint, user, password) {
|
|
58
|
+
const endevorProtocolFoot = jsonFootprint.endevorHost.substring(0, jsonFootprint.endevorHost.indexOf(":"));
|
|
59
|
+
const endevorHostFoot = jsonFootprint.endevorHost.substring(jsonFootprint.endevorHost.indexOf("//") + 2);
|
|
60
|
+
const auth = "Basic " + Buffer.from(user + ":" + password).toString("base64");
|
|
61
|
+
// Return a new session object with the configured parameters
|
|
62
|
+
return new imperative_1.Session({
|
|
63
|
+
hostname: endevorHostFoot,
|
|
64
|
+
port: jsonFootprint.endevorPort,
|
|
65
|
+
protocol: endevorProtocolFoot,
|
|
66
|
+
type: "basic",
|
|
67
|
+
base64EncodedAuth: auth
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
// Write the API response to a file and return the file location
|
|
71
|
+
writeResponseToFile(response, listingDir, elementName, extension) {
|
|
72
|
+
const dir = listingDir;
|
|
73
|
+
// Create the directory if it does not exist
|
|
74
|
+
if (!fs.existsSync(dir)) {
|
|
75
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
76
|
+
}
|
|
77
|
+
// Construct the full file path and write the response to the file
|
|
78
|
+
const location = path.join(listingDir, elementName + "." + extension);
|
|
79
|
+
fs.writeFileSync(location, response); // Write the response content to the file
|
|
80
|
+
return location; // Return the location of the file
|
|
81
|
+
},
|
|
82
|
+
// Process the file content by searching for matching statements and verbs in the histogram
|
|
83
|
+
processFileContent(response, histogram, location) {
|
|
84
|
+
const lines = response.split("\n"); // Split the response into lines
|
|
85
|
+
// Iterate over each histogram item and search for matching lines in the file content
|
|
86
|
+
for (const hist of histogram) {
|
|
87
|
+
for (let index = 0; index < lines.length; index++) {
|
|
88
|
+
const stmtLine = lines[index].indexOf(hist.stmt);
|
|
89
|
+
if (stmtLine >= 0) {
|
|
90
|
+
const columnNum = lines[index].indexOf(hist.verb, stmtLine);
|
|
91
|
+
if (columnNum >= 0) {
|
|
92
|
+
const lineNum = index + 1;
|
|
93
|
+
hist.listing = `${location}:${lineNum}:${columnNum}`;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return histogram;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
// Define the URI for the analysis
|
|
40
104
|
getAnalyzeURI() {
|
|
41
105
|
return MATRest_1.MATRest.ANALYSIS_CODEVIEW_HISTOGRAM;
|
|
42
106
|
}
|
|
107
|
+
// Determine the fields to be included in the output based on the presence of specific keys in the JSON
|
|
43
108
|
getFields(json) {
|
|
44
109
|
let fields = ["csect", "offset", "active", "wait", "total"];
|
|
45
110
|
if (JSON.stringify(json).indexOf("verb") >= 0) {
|
|
@@ -50,84 +115,23 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
50
115
|
}
|
|
51
116
|
return fields;
|
|
52
117
|
}
|
|
118
|
+
// Main method to handle the histogram request
|
|
53
119
|
getOutput(json, params) {
|
|
54
120
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
// Check if the listing argument is not true
|
|
122
|
+
// If listing is not true, return the histogram from json
|
|
55
123
|
if (params.arguments.listing === true) {
|
|
56
124
|
if ("footprint" in json) {
|
|
57
125
|
const endconerror = "Endevor Connection Error";
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
type: endevorFootprint.type.trim(),
|
|
66
|
-
element: endevorFootprint.element.trim(),
|
|
67
|
-
// instance: "ENDEVOR" // ON THE JSON RESPONSE IS MISSING THE CONTEXT.
|
|
68
|
-
instance: endevorFootprint.endevorContext.trim()
|
|
69
|
-
};*/
|
|
70
|
-
/* const elemDef: ElmSpecDictionary = {
|
|
71
|
-
environment: endevorFootprint.environment.trim(),
|
|
72
|
-
"stage-number": endevorFootprint.stage.trim(),
|
|
73
|
-
system: endevorFootprint.system.trim(),
|
|
74
|
-
subsystem: endevorFootprint.subsystem.trim(), // SUBSYSTEM IS COMING WITH WHITE SPACES IN THE END.
|
|
75
|
-
type: endevorFootprint.type.trim(),
|
|
76
|
-
element: endevorFootprint.element.trim(),
|
|
77
|
-
};*/
|
|
78
|
-
/* const requestBody: any = {
|
|
79
|
-
version: undefined,
|
|
80
|
-
level: undefined,
|
|
81
|
-
print: "listing",
|
|
82
|
-
listString: undefined,
|
|
83
|
-
search: undefined,
|
|
84
|
-
headings: undefined,
|
|
85
|
-
explode: undefined,
|
|
86
|
-
whereProcGroup: undefined,
|
|
87
|
-
whereCcidCurrent: undefined,
|
|
88
|
-
whereCcidAll: undefined,
|
|
89
|
-
whereCcidRetrieve: undefined,
|
|
90
|
-
};*/
|
|
91
|
-
const requestBody = {
|
|
92
|
-
print: "listing",
|
|
93
|
-
};
|
|
94
|
-
const elemDef = {
|
|
95
|
-
"environment": endevorFootprint.environment.trim(),
|
|
96
|
-
"stage-number": endevorFootprint.stage.trim(),
|
|
97
|
-
"system": endevorFootprint.system.trim(),
|
|
98
|
-
"subsystem": endevorFootprint.subsystem.trim(),
|
|
99
|
-
"type": endevorFootprint.type.trim(),
|
|
100
|
-
"element": endevorFootprint.element.trim(),
|
|
101
|
-
"print": "listing",
|
|
102
|
-
};
|
|
103
|
-
let endevorSession;
|
|
104
|
-
if (!endevorFootprint.endevorHost.includes("http")) {
|
|
105
|
-
const exception = {
|
|
106
|
-
name: "HistogramException",
|
|
107
|
-
header: "Footprint Data Error",
|
|
108
|
-
message: "Histogram footprint contains the wrong protocol type. The allowed protocol types are: http and https. \n REST client reports: " + endevorFootprint.endevorHost
|
|
109
|
-
};
|
|
110
|
-
throw exception;
|
|
111
|
-
}
|
|
112
|
-
if (!endevorFootprint.endevorHost.includes("//") || !endevorFootprint.endevorHost.includes(":")) {
|
|
113
|
-
const exception = {
|
|
114
|
-
name: "HistogramException",
|
|
115
|
-
header: "Footprint Data Error",
|
|
116
|
-
message: "Histogram footprint contains the wrong Endevor Host. \n REST client reports: " + endevorFootprint.endevorHost
|
|
117
|
-
};
|
|
118
|
-
throw exception;
|
|
119
|
-
}
|
|
126
|
+
const listingDir = params.arguments.listingDir; // Directory where the listing will be stored
|
|
127
|
+
const jsonFootprint = this.Helper.extractFootprint(json); // Extract and parse the footprint from JSON
|
|
128
|
+
const request = this.Helper.constructRequestUrl(jsonFootprint); // Construct the REST API request URL
|
|
129
|
+
let response;
|
|
130
|
+
let session;
|
|
131
|
+
let headers;
|
|
132
|
+
// Create a session for making the API call with authentication
|
|
120
133
|
try {
|
|
121
|
-
|
|
122
|
-
hostname: endevorFootprint.endevorHost.substring(endevorFootprint.endevorHost.indexOf("//") + 2),
|
|
123
|
-
port: endevorFootprint.endevorPort,
|
|
124
|
-
protocol: endevorFootprint.endevorHost.substring(0, endevorFootprint.endevorHost.indexOf(":")),
|
|
125
|
-
user: params.arguments.user,
|
|
126
|
-
password: params.arguments.password,
|
|
127
|
-
basePath: endevorFootprint.endevorBasePath,
|
|
128
|
-
rejectUnauthorized: false,
|
|
129
|
-
type: "basic"
|
|
130
|
-
});
|
|
134
|
+
session = this.Helper.createSession(jsonFootprint, params.arguments.user, params.arguments.password);
|
|
131
135
|
}
|
|
132
136
|
catch (error) {
|
|
133
137
|
const exception = {
|
|
@@ -137,10 +141,11 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
137
141
|
};
|
|
138
142
|
throw exception;
|
|
139
143
|
}
|
|
140
|
-
|
|
144
|
+
// Make the REST API call to retrieve the listing as a string response
|
|
141
145
|
try {
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
// Prepare headers with the authorization information
|
|
147
|
+
headers = [{ Authorization: session.ISession.base64EncodedAuth }];
|
|
148
|
+
response = yield imperative_1.RestClient.getExpectString(session, request, headers);
|
|
144
149
|
}
|
|
145
150
|
catch (error) {
|
|
146
151
|
if (error instanceof imperative_1.RestClientError) {
|
|
@@ -160,65 +165,22 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
160
165
|
throw exception;
|
|
161
166
|
}
|
|
162
167
|
}
|
|
163
|
-
if
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
throw err;
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
tofileName += "\\" + endevorFootprint.element + "." + this.getExtension(endevorFootprint.type);
|
|
175
|
-
fs.writeFileSync(tofileName, responseEndevor.body.data[0], { encoding: "latin1" });
|
|
176
|
-
// THIS IS HOW YOU WRITE A FILE USING ENDEVOR
|
|
177
|
-
// EndevorUtils.generalWriteFile(tofileName, responseEndevor.data[0]);
|
|
178
|
-
}
|
|
179
|
-
catch (error) {
|
|
180
|
-
const exception = {
|
|
181
|
-
name: "HistogramException",
|
|
182
|
-
header: "File or Folder Access Error",
|
|
183
|
-
errno: error.errno ? error.errno : null,
|
|
184
|
-
message: error.message
|
|
185
|
-
};
|
|
186
|
-
throw exception;
|
|
187
|
-
}
|
|
188
|
-
if (responseEndevor.body.data[0].length === 0) {
|
|
189
|
-
const exception = {
|
|
190
|
-
name: "HistogramException",
|
|
191
|
-
header: "Endevor Data Error",
|
|
192
|
-
message: "No data in response from Endevor."
|
|
193
|
-
};
|
|
194
|
-
throw exception;
|
|
195
|
-
}
|
|
196
|
-
responseEndevor.body.data[0] = responseEndevor.body.data[0] + "";
|
|
197
|
-
const lines = responseEndevor.body.data[0].split("\n");
|
|
198
|
-
for (const histogram of json.histogram) {
|
|
199
|
-
histogram.listing = "not found";
|
|
200
|
-
for (let index = 0; index < lines.length; index++) {
|
|
201
|
-
const stmtLine = lines[index].indexOf(histogram.stmt);
|
|
202
|
-
if (stmtLine >= 0) {
|
|
203
|
-
const columnNum = lines[index].indexOf(histogram.verb, stmtLine) + 1;
|
|
204
|
-
if (columnNum >= 1) {
|
|
205
|
-
const lineNum = index + 1;
|
|
206
|
-
histogram.listing = tofileName + ":" + lineNum + ":" + columnNum;
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
168
|
+
//Check if the response is neither nor undefined
|
|
169
|
+
if (response !== null && response !== undefined) {
|
|
170
|
+
// Write the response to a file and return the file location
|
|
171
|
+
const location = this.Helper.writeResponseToFile(response, listingDir, jsonFootprint.element, this.getExtension(jsonFootprint.type));
|
|
172
|
+
response = fs.readFileSync(location, "utf8"); // Read the file content
|
|
173
|
+
// Process the file content to match statements and verbs in the histogram
|
|
174
|
+
return this.Helper.processFileContent(response, json.histogram, location);
|
|
212
175
|
}
|
|
213
176
|
else {
|
|
214
177
|
const exception = {
|
|
215
178
|
name: "HistogramException",
|
|
216
179
|
header: "Resource Access Error",
|
|
217
|
-
message: "Listing not found. Caused by: \n" +
|
|
180
|
+
message: "Listing not found. Caused by: \n" + json.message
|
|
218
181
|
};
|
|
219
182
|
throw exception;
|
|
220
183
|
}
|
|
221
|
-
// } else if (("message" in json) && ((json.message === "No footprint data in the database for requested measurement") || (json.message === "No listing data in the database for requested measurement"))) {
|
|
222
184
|
}
|
|
223
185
|
else if (("message" in json) && (json.message !== "OK")) {
|
|
224
186
|
for (const histogram of json.histogram) {
|
|
@@ -234,6 +196,7 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
234
196
|
throw exception;
|
|
235
197
|
}
|
|
236
198
|
}
|
|
199
|
+
// Return the updated histogram data
|
|
237
200
|
return json.histogram;
|
|
238
201
|
});
|
|
239
202
|
}
|
|
@@ -243,11 +206,9 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
243
206
|
getExtension(language) {
|
|
244
207
|
switch (language) {
|
|
245
208
|
case "COBOL":
|
|
246
|
-
return "cbl";
|
|
247
209
|
case "COB390":
|
|
248
210
|
return "cbl";
|
|
249
211
|
case "ASM":
|
|
250
|
-
return "asm";
|
|
251
212
|
case "ASMPGM":
|
|
252
213
|
return "asm";
|
|
253
214
|
case "C":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Histogram.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/Histogram/Histogram.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,wFAAiF;AACjF,qDAAkD;AAElD,
|
|
1
|
+
{"version":3,"file":"Histogram.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/Histogram/Histogram.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,wFAAiF;AACjF,qDAAkD;AAElD,iDAA0F;AAC1F,6BAA6B;AAE7B,yBAAyB;AAEzB,MAAqB,gBAAiB,SAAQ,gCAAkC;IAAhF;;QAuHI,kDAAkD;QAC1C,WAAM,GAAG;YACb,uDAAuD;YACvD,gBAAgB,CAAC,IAAS;gBACtB,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC/C,SAAS,GAAG,SAAS,CAAC,SA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,EAAE,uBAAuB;wBAC/B,OAAO,EAAE,qEAAqE;qBACjF,CAAC;oBACF,MAAM,SAAS,CAAC;gBACpB,CAAC;YACL,CAAC;YACD,oCAAoC;YACpC,OAAO,IAAI,CAAC,SAAS,CAAC;QAC1B,CAAC;KAAA;IAES,iBAAiB;QACvB,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAC1D,CAAC;IAEO,YAAY,CAAC,QAAgB;QACjC,QAAQ,QAAQ,EAAE,CAAC;YACf,KAAK,OAAO,CAAC;YACb,KAAK,QAAQ;gBACT,OAAO,KAAK,CAAC;YACjB,KAAK,KAAK,CAAC;YACX,KAAK,QAAQ;gBACT,OAAO,KAAK,CAAC;YACjB,KAAK,GAAG;gBACJ,OAAO,GAAG,CAAC;YACf,KAAK,KAAK;gBACN,OAAO,KAAK,CAAC;YACjB;gBACI,OAAO,KAAK,CAAC;QACrB,CAAC;IACL,CAAC;CAuEJ;AA5LD,mCA4LC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callerid.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/callerid/Callerid.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,wFAAiF;AACjF,qDAAkD;AAGlD,MAAqB,eAAgB,SAAQ,gCAAiC;IAEhE,aAAa;QACnB,OAAO,iBAAO,CAAC,0BAA0B,CAAC;IAC9C,CAAC;IAES,SAAS;QACf,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC;IACe,SAAS,CAAC,IAAS;;YAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;KAAA;
|
|
1
|
+
{"version":3,"file":"Callerid.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/callerid/Callerid.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,wFAAiF;AACjF,qDAAkD;AAGlD,MAAqB,eAAgB,SAAQ,gCAAiC;IAEhE,aAAa;QACnB,OAAO,iBAAO,CAAC,0BAA0B,CAAC;IAC9C,CAAC;IAES,SAAS;QACf,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC;IACe,SAAS,CAAC,IAAS;;YAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;KAAA;IAES,gBAAgB;QACtB,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC/B,CAAC;CACJ;AAhBD,kCAgBC"}
|
|
@@ -25,7 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.ModuleDefinition = void 0;
|
|
26
26
|
exports.ModuleDefinition = {
|
|
27
27
|
name: "module",
|
|
28
|
-
aliases: ["
|
|
28
|
+
aliases: ["mod"],
|
|
29
29
|
summary: "Get CodeView data in Module mode",
|
|
30
30
|
description: "Get the CodeView measurement details in Module mode.",
|
|
31
31
|
type: "command",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Module.definition.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/module/Module.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGU,QAAA,gBAAgB,GAAuB;IAChD,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"Module.definition.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/module/Module.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGU,QAAA,gBAAgB,GAAuB;IAChD,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,OAAO,EAAE,kCAAkC;IAC3C,WAAW,EAAE,sDAAsD;IACnE,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS,GAAG,iBAAiB;IACtC,OAAO,EAAE;QACL,QAAQ,EAAE,CAAC,KAAK,CAAC;KACpB;IACD,OAAO,EAAE;QACL;YACI,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,8DAA8D;gBAC3E,qEAAqE;gBACrE,2CAA2C;YAC3C,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,yDAAyD;YACtE,IAAI,EAAE,QAAQ;SACjB;KACJ;IACD,QAAQ,EAAE;QACN;YACI,WAAW,EAAE,0EAA0E;YACvF,OAAO,EAAE,aAAa;SACzB;QACD;YACI,WAAW,EAAE,oGAAoG;YACjH,OAAO,EAAE,oBAAoB;SAChC;QACD;YACI,WAAW,EAAE,4EAA4E;gBACzF,+CAA+C;YAC/C,OAAO,EAAE,kFAAkF;SAC9F;KACJ;CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DB2View.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/db2/db2view/DB2View.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,wFAAiF;AACjF,qDAAkD;AAIlD,MAAqB,cAAe,SAAQ,gCAAgC;IAE9D,aAAa;QACnB,OAAO,iBAAO,CAAC,gBAAgB,CAAC;IACpC,CAAC;
|
|
1
|
+
{"version":3,"file":"DB2View.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/db2/db2view/DB2View.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,wFAAiF;AACjF,qDAAkD;AAIlD,MAAqB,cAAe,SAAQ,gCAAgC;IAE9D,aAAa;QACnB,OAAO,iBAAO,CAAC,gBAAgB,CAAC;IACpC,CAAC;IAES,SAAS;QACf,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAG,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACrM,CAAC;IACe,SAAS,CAAC,IAAS;;YAC/B,OAAO,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;KAAA;IACS,gBAAgB;QACtB,OAAO,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;CACJ;AAfD,iCAeC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SQLView.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/db2/sqlview/SQLView.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,wFAAiF;AACjF,qDAAkD;AAIlD,MAAqB,cAAe,SAAQ,gCAAgC;IAE9D,aAAa;QACnB,OAAO,iBAAO,CAAC,gBAAgB,CAAC;IACpC,CAAC;
|
|
1
|
+
{"version":3,"file":"SQLView.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/db2/sqlview/SQLView.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAGH,wFAAiF;AACjF,qDAAkD;AAIlD,MAAqB,cAAe,SAAQ,gCAAgC;IAE9D,aAAa;QACnB,OAAO,iBAAO,CAAC,gBAAgB,CAAC;IACpC,CAAC;IAES,SAAS;QACf,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAClD,CAAC;IACe,SAAS,CAAC,IAAS;;YAC/B,OAAO,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;KAAA;IACS,gBAAgB;QACtB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;IAC7C,CAAC;CACJ;AAfD,iCAeC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ICommandDefinition } from "@zowe/imperative";
|
|
2
|
+
/**
|
|
3
|
+
* [action] command definition for the [action] two group. The [action] is of imperative command definition type
|
|
4
|
+
* "group", which means it must have children.
|
|
5
|
+
*
|
|
6
|
+
* In this case, the action is "list" - which will list files, etc.
|
|
7
|
+
*
|
|
8
|
+
* Property Summary:
|
|
9
|
+
* =================
|
|
10
|
+
* "name" of the [action]. Always a verb (e.g. "copy")
|
|
11
|
+
* "summary" will display when issuing the help for the [group] (e.g. zowe zos-files --help)
|
|
12
|
+
* "type" is "group" which means it has children (the [objects])
|
|
13
|
+
* "children" is the set of child definitions (the [objects])
|
|
14
|
+
*/
|
|
15
|
+
declare const IDMSDefinition: ICommandDefinition;
|
|
16
|
+
export = IDMSDefinition;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023 Broadcom. All Rights Reserved. The term
|
|
4
|
+
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
|
+
*
|
|
6
|
+
* This software and all information contained therein is
|
|
7
|
+
* confidential and proprietary and shall not be duplicated,
|
|
8
|
+
* used, disclosed, or disseminated in any way except as
|
|
9
|
+
* authorized by the applicable license agreement, without the
|
|
10
|
+
* express written permission of Broadcom. All authorized
|
|
11
|
+
* reproductions must be marked with this language.
|
|
12
|
+
*
|
|
13
|
+
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
|
|
14
|
+
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
|
|
15
|
+
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
|
|
16
|
+
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
|
|
18
|
+
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
|
|
19
|
+
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
|
|
20
|
+
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
|
|
21
|
+
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
|
+
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
|
+
*/
|
|
24
|
+
const DMLDefinition = require("./dml/DML.definition");
|
|
25
|
+
const TaskDefinition = require("./task/IDMSTask.definition");
|
|
26
|
+
const IDMSModule = require("./module/IDMSModule.definition");
|
|
27
|
+
/**
|
|
28
|
+
* [action] command definition for the [action] two group. The [action] is of imperative command definition type
|
|
29
|
+
* "group", which means it must have children.
|
|
30
|
+
*
|
|
31
|
+
* In this case, the action is "list" - which will list files, etc.
|
|
32
|
+
*
|
|
33
|
+
* Property Summary:
|
|
34
|
+
* =================
|
|
35
|
+
* "name" of the [action]. Always a verb (e.g. "copy")
|
|
36
|
+
* "summary" will display when issuing the help for the [group] (e.g. zowe zos-files --help)
|
|
37
|
+
* "type" is "group" which means it has children (the [objects])
|
|
38
|
+
* "children" is the set of child definitions (the [objects])
|
|
39
|
+
*/
|
|
40
|
+
const IDMSDefinition = {
|
|
41
|
+
name: "idms",
|
|
42
|
+
aliases: ["idms"],
|
|
43
|
+
summary: "Get IDMS data",
|
|
44
|
+
description: "Get the IDMS measurement details.",
|
|
45
|
+
type: "group",
|
|
46
|
+
children: [DMLDefinition, TaskDefinition, IDMSModule],
|
|
47
|
+
profile: {
|
|
48
|
+
required: ["mat"]
|
|
49
|
+
},
|
|
50
|
+
options: [
|
|
51
|
+
{
|
|
52
|
+
name: "profile",
|
|
53
|
+
description: "Specifies the name of the profile that you want to analyze. " +
|
|
54
|
+
"When you specify the profile name, you get the data for the latest " +
|
|
55
|
+
"measurement within the specified profile.",
|
|
56
|
+
type: "string"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "mon_num",
|
|
60
|
+
description: "Specifies the unique monitor number of the measurement.",
|
|
61
|
+
type: "number"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
examples: [
|
|
65
|
+
{
|
|
66
|
+
description: "Get the overview details of the measurement for monitor number 5",
|
|
67
|
+
options: "--mon_num 5",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
description: "Get the overview details of the measurement for the latest monitor in the TESTPROF profile",
|
|
71
|
+
options: "--profile TESTPROF",
|
|
72
|
+
},
|
|
73
|
+
]
|
|
74
|
+
};
|
|
75
|
+
module.exports = IDMSDefinition;
|
|
76
|
+
//# sourceMappingURL=IDMS.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDMS.definition.js","sourceRoot":"","sources":["../../../../src/cli/monitor/idms/IDMS.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,sDAAuD;AACvD,6DAA8D;AAC9D,6DAA8D;AAG9D;;;;;;;;;;;;GAYG;AACH,MAAM,cAAc,GAAuB;IACvC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe;IACxB,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,UAAU,CAAE;IACtD,OAAO,EAAE;QACL,QAAQ,EAAE,CAAC,KAAK,CAAC;KACpB;IACD,OAAO,EAAE;QACL;YACI,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,8DAA8D;gBACvE,qEAAqE;gBACrE,2CAA2C;YAC/C,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,yDAAyD;YACtE,IAAI,EAAE,QAAQ;SACjB;KACJ;IACD,QAAQ,EAAE;QACN;YACI,WAAW,EAAE,kEAAkE;YAC/E,OAAO,EAAE,aAAa;SACzB;QACD;YACI,WAAW,EAAE,4FAA4F;YACzG,OAAO,EAAE,oBAAoB;SAChC;KACJ;CACJ,CAAC;AACF,iBAAS,cAAc,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023 Broadcom. All Rights Reserved. The term
|
|
4
|
+
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
|
+
*
|
|
6
|
+
* This software and all information contained therein is
|
|
7
|
+
* confidential and proprietary and shall not be duplicated,
|
|
8
|
+
* used, disclosed, or disseminated in any way except as
|
|
9
|
+
* authorized by the applicable license agreement, without the
|
|
10
|
+
* express written permission of Broadcom. All authorized
|
|
11
|
+
* reproductions must be marked with this language.
|
|
12
|
+
*
|
|
13
|
+
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
|
|
14
|
+
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
|
|
15
|
+
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
|
|
16
|
+
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
|
|
18
|
+
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
|
|
19
|
+
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
|
|
20
|
+
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
|
|
21
|
+
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
|
+
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
|
+
*/
|
|
24
|
+
const DMLDefinition = {
|
|
25
|
+
name: "dml",
|
|
26
|
+
aliases: ["dml"],
|
|
27
|
+
summary: "Get DML data in Module mode",
|
|
28
|
+
description: "Get the IDMS measurement details in DML mode.",
|
|
29
|
+
type: "command",
|
|
30
|
+
handler: __dirname + "/DML.handler",
|
|
31
|
+
profile: {
|
|
32
|
+
required: ["mat"]
|
|
33
|
+
},
|
|
34
|
+
options: [
|
|
35
|
+
{
|
|
36
|
+
name: "profile",
|
|
37
|
+
description: "Specifies the name of the profile that you want to analyze. " +
|
|
38
|
+
"When you specify the profile name, you get the data for the latest " +
|
|
39
|
+
"measurement within the specified profile.",
|
|
40
|
+
type: "string"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "mon_num",
|
|
44
|
+
description: "Specifies the unique monitor number of the measurement.",
|
|
45
|
+
type: "number"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
examples: [
|
|
49
|
+
{
|
|
50
|
+
description: "Get the CodeView measurement details in Module mode for monitor number 5",
|
|
51
|
+
options: "--mon_num 5",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
description: "Get the CodeView measurement details in Module mode for the latest monitor in the TESTPROF profile",
|
|
55
|
+
options: "--profile TESTPROF",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
description: "Get the dml details of the measurement for monitor number 5",
|
|
59
|
+
options: "dml --mon_num 5",
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
};
|
|
63
|
+
module.exports = DMLDefinition;
|
|
64
|
+
//# sourceMappingURL=DML.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DML.definition.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/idms/dml/DML.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,MAAM,aAAa,GAAuB;IACtC,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,OAAO,EAAE,6BAA6B;IACtC,WAAW,EAAE,+CAA+C;IAC5D,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS,GAAG,cAAc;IACnC,OAAO,EAAE;QACL,QAAQ,EAAE,CAAC,KAAK,CAAC;KACpB;IACD,OAAO,EAAE;QACL;YACI,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,8DAA8D;gBAC3E,qEAAqE;gBACrE,2CAA2C;YAC3C,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,yDAAyD;YACtE,IAAI,EAAE,QAAQ;SACjB;KACJ;IACD,QAAQ,EAAE;QACN;YACI,WAAW,EAAE,0EAA0E;YACvF,OAAO,EAAE,aAAa;SACzB;QACD;YACI,WAAW,EAAE,oGAAoG;YACjH,OAAO,EAAE,oBAAoB;SAChC;QACD;YACI,WAAW,EAAE,6DAA6D;YAC1E,OAAO,EAAE,iBAAiB;SAC7B;KACJ;CACJ,CAAC;AAEF,iBAAS,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import AbstractAnalyzeHandler from "../../../../handlers/AbstractAnalyzeHandler";
|
|
2
|
+
import { IDML } from "../../../../api/response/IDML";
|
|
3
|
+
export default class DMLHandler extends AbstractAnalyzeHandler<IDML> {
|
|
4
|
+
protected getAnalyzeURI(): string;
|
|
5
|
+
protected getFields(): string[];
|
|
6
|
+
protected getOutput(json: any): Promise<any>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023 Broadcom. All Rights Reserved. The term
|
|
4
|
+
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
|
+
*
|
|
6
|
+
* This software and all information contained therein is
|
|
7
|
+
* confidential and proprietary and shall not be duplicated,
|
|
8
|
+
* used, disclosed, or disseminated in any way except as
|
|
9
|
+
* authorized by the applicable license agreement, without the
|
|
10
|
+
* express written permission of Broadcom. All authorized
|
|
11
|
+
* reproductions must be marked with this language.
|
|
12
|
+
*
|
|
13
|
+
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
|
|
14
|
+
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
|
|
15
|
+
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
|
|
16
|
+
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
|
|
18
|
+
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
|
|
19
|
+
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
|
|
20
|
+
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
|
|
21
|
+
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
|
+
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
|
+
*/
|
|
24
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
25
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
26
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
27
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
28
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
29
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
30
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
const AbstractAnalyzeHandler_1 = require("../../../../handlers/AbstractAnalyzeHandler");
|
|
35
|
+
const MATRest_1 = require("../../../../api/MATRest");
|
|
36
|
+
class DMLHandler extends AbstractAnalyzeHandler_1.default {
|
|
37
|
+
getAnalyzeURI() {
|
|
38
|
+
return MATRest_1.MATRest.ANALYSIS_IDMSVIEW_DML;
|
|
39
|
+
}
|
|
40
|
+
getFields() {
|
|
41
|
+
return ["taskCode", "module", "processName", "offset", "sscProg",
|
|
42
|
+
"dmlSeq", "adsSeq", "frontEnd", "active", "wait", "total",
|
|
43
|
+
"taskID", "dmlVerb", "dmlTarget", "dmlQualifier", "lastRecord", "lastArea"];
|
|
44
|
+
}
|
|
45
|
+
getOutput(json) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
return json.idmsviewdml;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.default = DMLHandler;
|
|
52
|
+
//# sourceMappingURL=DML.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DML.handler.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/idms/dml/DML.handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;AAEH,wFAAiF;AAEjF,qDAAkD;AAGlD,MAAqB,UAAW,SAAQ,gCAA4B;IACtD,aAAa;QACnB,OAAO,iBAAO,CAAC,qBAAqB,CAAC;IACzC,CAAC;IAGS,SAAS;QACf,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS;YACxD,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO;YACzD,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IACxF,CAAC;IACe,SAAS,CAAC,IAAS;;YAC/B,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;KAAA;CACJ;AAdD,6BAcC"}
|