@broadcom/mat-analyze-for-zowe-cli 1.0.6 → 2.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/CHANGELOG.md +3 -27
- package/README.md +45 -41
- package/lib/api/MATRest.d.ts +1 -1
- package/lib/api/MATRest.js +3 -5
- package/lib/api/MATRest.js.map +1 -1
- package/lib/cli/monitor/Monitor.definition.js +13 -2
- package/lib/cli/monitor/Monitor.definition.js.map +1 -1
- package/lib/cli/monitor/codeview/Histogram/Histogram.definition.js +6 -6
- package/lib/cli/monitor/codeview/Histogram/Histogram.definition.js.map +1 -1
- package/lib/cli/monitor/codeview/Histogram/Histogram.handler.js +46 -24
- package/lib/cli/monitor/codeview/Histogram/Histogram.handler.js.map +1 -1
- package/lib/cli/monitor/codeview/callerid/Callerid.definition.js +1 -1
- package/lib/cli/monitor/codeview/csect/Csect.definition.js +1 -1
- package/lib/cli/monitor/codeview/module/Module.definition.js +1 -1
- package/lib/cli/monitor/db2/db2view/DB2View.definition.js +2 -2
- package/lib/cli/monitor/db2/db2view/DB2View.definition.js.map +1 -1
- package/lib/cli/monitor/db2/sqlview/SQLView.definition.js +1 -1
- package/lib/cli/monitor/delayview/address/Address.definition.js +1 -1
- package/lib/cli/monitor/delayview/delay/Delay.definition.js +1 -1
- package/lib/cli/monitor/history/History.definition.js +1 -1
- package/lib/cli/monitor/overview/Overview.definition.js +1 -1
- package/lib/cli/profile/Profile.definition.js +13 -2
- package/lib/cli/profile/Profile.definition.js.map +1 -1
- package/lib/cli/profile/create/CreateProfile.definition.js +47 -46
- package/lib/cli/profile/create/CreateProfile.definition.js.map +1 -1
- package/lib/cli/profile/create/CreateProfile.handler.d.ts +2 -0
- package/lib/cli/profile/create/CreateProfile.handler.js +140 -96
- package/lib/cli/profile/create/CreateProfile.handler.js.map +1 -1
- package/lib/cli/profile/invoke/InvokeProfile.definition.js +13 -12
- package/lib/cli/profile/invoke/InvokeProfile.definition.js.map +1 -1
- package/lib/cli/profile/listprofile/ListProfile.definition.js +1 -1
- package/lib/cli/session/MATSession.d.ts +24 -5
- package/lib/cli/session/MATSession.js +97 -31
- package/lib/cli/session/MATSession.js.map +1 -1
- package/lib/handlers/AbstractGetHandler.js +20 -24
- package/lib/handlers/AbstractGetHandler.js.map +1 -1
- package/lib/handlers/AbstractRestHandler.js +12 -7
- package/lib/handlers/AbstractRestHandler.js.map +1 -1
- package/lib/imperative.js +17 -13
- package/lib/imperative.js.map +1 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
# Change log
|
|
2
2
|
All notable changes to this project are documented in this file.
|
|
3
3
|
|
|
4
|
-
##
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
## `1.0.6`
|
|
9
|
-
- Issue resolution for correct boolean datatype for zowediscoverable/zdis parameter.
|
|
10
|
-
|
|
11
|
-
## `1.0.5`
|
|
12
|
-
- Program listing support enhancements: The `zowe mat profile invoke` command is enhanced with the `listing` option, which activates the automated retrieval of Cobol, C/C++, and Assembler program listings through CA Endevor® footprints and registers the listing with CA MAT after the measurement is completed. Optional parameter `listingDir` added to the MAT profile options. The parameter defines the local directory to store retrieved listings. The `zowe mat monitor codeview histogram` command is enhanced with the `listing` option that retrieves the program listing details pertaining to the specific statement and CSECT. Users of Visual Studio Code IDE can navigate from the command response in their IDE terminal directly to the specific line and column of the retrieved source code.
|
|
13
|
-
|
|
14
|
-
## `1.0.4`
|
|
15
|
-
- Issue resolution for unit test coverage and DB2view related details.
|
|
16
|
-
|
|
17
|
-
## `1.0.3`
|
|
18
|
-
- DB2View and SQL statement details added under the DB2 command group
|
|
19
|
-
- Removed overrides configuration form imperative.ts.
|
|
20
|
-
|
|
21
|
-
## `1.0.2`
|
|
22
|
-
- Enabled CodeView histogram and CodeView CallerID.
|
|
23
|
-
|
|
24
|
-
## `1.0.1`
|
|
25
|
-
- Updated License.
|
|
26
|
-
|
|
27
|
-
## `1.0.0`
|
|
28
|
-
- Initial release.
|
|
29
|
-
|
|
30
|
-
|
|
4
|
+
## `2.0.0`
|
|
5
|
+
- Release for Zowe v2
|
|
6
|
+
- Changed Endevor package to version 7.0.0
|
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
<img src="https://github.com/openmainframeproject/artwork/blob/master/other/zowe-conformant/zowev1/cli/color/zowe-conformant-zowev1-cli-color.png?raw=true" width=25% alt="Zowe Conformance Badge">
|
|
2
2
|
|
|
3
|
-
#
|
|
4
|
-
The
|
|
3
|
+
# MAT Analyze Plug-in for Zowe CLI
|
|
4
|
+
The MAT Analyze plug-in for Zowe CLI provides access to Mainframe Application Tuner (MAT) functionality. The plug-in ensures interaction with MAT and enables you to measure your mainframe applications and get the analysis data in the form of MAT analysis views using Zowe command line interface.
|
|
5
5
|
|
|
6
|
-
You can use the
|
|
6
|
+
You can use the MAT Analyze plug-in for Zowe CLI to perform the following tasks:
|
|
7
7
|
* Manage monitor profiles.
|
|
8
8
|
Create and invoke monitor profiles, view the lists of available profiles, and retrieve the measurement history.
|
|
9
9
|
* Analyze the measurement data.
|
|
10
|
-
Access the measurement data from
|
|
10
|
+
Access the measurement data from Mainframe Application Tuner that is available to you in the CLI in the form of MAT analysis views.
|
|
11
11
|
* Address performance issues.
|
|
12
|
-
With the source program listing registered with
|
|
12
|
+
With the source program listing registered with MAT, users of Visual Studio Code (VS Code) IDE can obtain the Histogram details and display specific source program locations that are associated with the most resource-consuming program modules and CSECTs. When you request the Histogram measurement details from your VS Code command line terminal, the MAT Analyze plug-in for Zowe CLI transfers the source code listing to your local machine and navigates you directly to the specific line and column number of the source code, which enables you to immediately inspect the program statement and identify possible tuning opportunities.
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
Table of Contents
|
|
16
16
|
=================
|
|
17
17
|
* [Installation](#installation)
|
|
18
18
|
* [Prerequisites](#prerequisites)
|
|
19
|
-
* [Install the
|
|
20
|
-
* [Install the
|
|
19
|
+
* [Install the MAT Analyze Plug-in for Zowe CLI From Packages](#install-the-mat-analyze-plug-in-for-zowe-cli-from-packages)
|
|
20
|
+
* [Install the MAT Analyze Plug-in for Zowe CLI From Source](#install-the-mat-analyze-plug-in-for-zowe-cli-from-source)
|
|
21
21
|
* [Validate the Installation](#validate-the-installation)
|
|
22
22
|
* [Create a z/OSMF Profile](#create-a-zosmf-profile)
|
|
23
23
|
* [Create a MAT Profile](#create-a-mat-profile)
|
|
@@ -42,23 +42,23 @@ Table of Contents
|
|
|
42
42
|
* [db2](#db2)
|
|
43
43
|
* [db2view | db2](#db2view--db2)
|
|
44
44
|
* [sqlstmt | sql](#sqlstmt--sql)
|
|
45
|
-
* [Uninstall the
|
|
45
|
+
* [Uninstall the MAT Analyze Plug-in for Zowe CLI](#uninstall-the-mat-analyze-plug-in-for-zowe-cli)
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
# Installation
|
|
50
|
-
You can install the
|
|
50
|
+
You can install the MAT Analyze Plug-in for Zowe CLI:
|
|
51
51
|
* From the Zowe Package
|
|
52
52
|
* From Source
|
|
53
53
|
|
|
54
54
|
## Prerequisites
|
|
55
|
-
Before starting the installation of the
|
|
55
|
+
Before starting the installation of the MAT Analyze Plug-in for Zowe CLI, verify that you have:
|
|
56
56
|
* Zowe CLI installed
|
|
57
57
|
* Zosmf profile created.
|
|
58
|
-
*
|
|
59
|
-
* (Optional) To use the automated listing registration and retrieval option through
|
|
58
|
+
* MAT database and the REST API installed, configured, and running.
|
|
59
|
+
* (Optional) To use the automated listing registration and retrieval option through Endevor® footprints, install and configure the Endevor® Web Services and specify the Endevor® web server details in the MAT database configuration.
|
|
60
60
|
|
|
61
|
-
## Install the
|
|
61
|
+
## Install the MAT Analyze Plug-in for Zowe CLI From Packages
|
|
62
62
|
Issue the following command:
|
|
63
63
|
|
|
64
64
|
```
|
|
@@ -67,8 +67,8 @@ $ zowe plugins install @broadcom/mat-analyze-for-zowe-cli
|
|
|
67
67
|
**Note:**
|
|
68
68
|
The `latest` npm tag installs a version of the product that is intended for public consumption. You can use different npm tags to install other versions of the product. For example, you can install with the `@beta` tag to try new features that have not been fully validated. For more information about tag usage, see [NPM Tag Names](https://github.com/zowe/zowe-cli/blob/master/docs/MaintainerVersioning.md#npm-tag-names).
|
|
69
69
|
|
|
70
|
-
## Install the
|
|
71
|
-
To install the
|
|
70
|
+
## Install the MAT Analyze Plug-in for Zowe CLI From Source
|
|
71
|
+
To install the MAT Analyze plug-in for Zowe CLI from source, follow these steps:
|
|
72
72
|
|
|
73
73
|
1. `git clone git@github.gwd.broadcom.net:MFD/mat-analyze-for-zowe-cli.git`
|
|
74
74
|
2. `cd mat-analyze-for-zowe-cli`
|
|
@@ -95,7 +95,7 @@ $ zowe profiles create zosmf-profile --help
|
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
## Create a MAT Profile
|
|
98
|
-
To enable the interaction of the
|
|
98
|
+
To enable the interaction of the MAT Analyze plug-in for Zowe CLI with MAT, you need to create a MAT profile. You set up a MAT profile to avoid typing your connection details on every command. The profile contains your protocol type, host, and port that you defined for the MAT REST API server, and your mainframe username and password. You can create multiple profiles and switch between them if necessary.
|
|
99
99
|
|
|
100
100
|
**Usage**
|
|
101
101
|
```
|
|
@@ -123,11 +123,15 @@ To enable the interaction of the CA MAT Analyze plug-in for Zowe CLI with CA MAT
|
|
|
123
123
|
`--password` | `--pass` *(string)*
|
|
124
124
|
Your mainframe password.
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
`--base-path` | `--bp` *(string)*
|
|
127
|
+
The base path for your API mediation layer instance. Specify this option to prepend the base path to all resources when making REST requests. Do not specify this option if you are not using an API mediation layer.
|
|
128
|
+
|
|
129
|
+
`--reject-unauthorized` | `--ru` *(boolean)*
|
|
130
|
+
Reject self-signed certificates.
|
|
131
|
+
Default value: true
|
|
128
132
|
|
|
129
133
|
`--listingDir` | `--ldir` *(string)*
|
|
130
|
-
Specifies the directory where you want to store the registered program listings (e.g. 'c:\listings') for your immediate source code inspection. You can use the advantage of automated listing registration with
|
|
134
|
+
Specifies the directory where you want to store the registered program listings (e.g. 'c:\listings') for your immediate source code inspection. You can use the advantage of automated listing registration with MAT and listing retrieval through Endevor® footprints for Cobol, C/C++, and Assembler programs. When a source program listing is registered with MAT, you can enhance the histogram analysis data with the program listing details that pertain to the specific CSECT and program statement. The listing is transfered to the specified directory, which enables you to navigate directly to the line of the source code in you VS Code IDE and inspect the program statement. To use the listing retrieval option through Endevor® footprints, you need to have the Endevor® Web Services installed and configured and specify the Endevor® web server details in the MAT database configuration. The `--listingDir` parameter is optional.
|
|
131
135
|
|
|
132
136
|
|
|
133
137
|
**Options**
|
|
@@ -135,12 +139,12 @@ To enable the interaction of the CA MAT Analyze plug-in for Zowe CLI with CA MAT
|
|
|
135
139
|
Overwrite the MAT profile when a profile of the same name exists.
|
|
136
140
|
|
|
137
141
|
**Examples**
|
|
138
|
-
* Create a MAT profile called 'matprofile' using your
|
|
142
|
+
* Create a MAT profile called 'matprofile' using your MAT configuration and REST API details, with the MAT REST API server integrated with the Zowe API Mediation Layer:
|
|
139
143
|
```
|
|
140
|
-
$ zowe profiles create mat-profile matprofile --prt http --hn localhost --pt 1234 --user johndoe --pass qwerty --
|
|
144
|
+
$ zowe profiles create mat-profile matprofile --prt http --hn localhost --pt 1234 --user johndoe --pass qwerty --base-path api/v1/camat
|
|
141
145
|
```
|
|
142
146
|
|
|
143
|
-
* Create a MAT profile called 'matprofile' using your
|
|
147
|
+
* Create a MAT profile called 'matprofile' using your MAT configuration and the details of the MAT REST API server without integration with the Zowe API Mediation Layer, and define the 'c:\listings' directory to store program listings for instant analysis from your VS Code IDE:
|
|
144
148
|
```
|
|
145
149
|
$ zowe profiles create mat-profile matprofile --prt http --hn localhost --pt 1234 --user johndoe --pass qwerty --zowediscoverable false --listingDir 'c:\listings'
|
|
146
150
|
```
|
|
@@ -172,17 +176,17 @@ The name of a (mat) profile to load for this command execution.
|
|
|
172
176
|
You can also have other MAT connection options apart from the MAT profile and use them as options in the commands.
|
|
173
177
|
|
|
174
178
|
# Use Cases and Commands
|
|
175
|
-
The
|
|
179
|
+
The MAT Analyze plug-in for Zowe CLI enables you to manage monitor profiles and get the measurement analysis data using Mainframe Application Tuner (MAT).
|
|
176
180
|
```
|
|
177
181
|
$ zowe mat <group>
|
|
178
182
|
```
|
|
179
183
|
|
|
180
|
-
The
|
|
184
|
+
The MAT Analyze plug-in for Zowe CLI commands are organized in the following **command groups**:
|
|
181
185
|
|
|
182
186
|
|
|
183
187
|
|
|
184
188
|
## PROFILE
|
|
185
|
-
The commands from the PROFILE group enable you to create, invoke, and list
|
|
189
|
+
The commands from the PROFILE group enable you to create, invoke, and list MAT monitor profiles.
|
|
186
190
|
|
|
187
191
|
**Usage**
|
|
188
192
|
```
|
|
@@ -192,7 +196,7 @@ $ zowe mat profile <command>
|
|
|
192
196
|
The following **commands** are available for the PROFILE group:
|
|
193
197
|
|
|
194
198
|
### create | cr
|
|
195
|
-
Create a
|
|
199
|
+
Create a MAT monitor profile.
|
|
196
200
|
|
|
197
201
|
**Usage**
|
|
198
202
|
```
|
|
@@ -201,7 +205,7 @@ $ zowe mat profile create [options]
|
|
|
201
205
|
|
|
202
206
|
**Required Options**
|
|
203
207
|
`--profile` *(string)*
|
|
204
|
-
Specifies the name of the profile that you create in
|
|
208
|
+
Specifies the name of the profile that you create in MAT (e.g. PROFILE1).
|
|
205
209
|
Values: 1 to 8 characters, a combination of alphanumeric and national characters (A-Z, 0-9, and @), the first character must be an alphabetic or @. The profile name must not contain characters # and $.
|
|
206
210
|
|
|
207
211
|
`--jobname` *(string)*
|
|
@@ -222,8 +226,8 @@ Allowed values: yes, no.
|
|
|
222
226
|
Provide the monitor description (maximum 24 characters).
|
|
223
227
|
|
|
224
228
|
`--mondsn` *(string)*
|
|
225
|
-
Specifies the monitor data set name where
|
|
226
|
-
Values: data set name pattern, maximum 46 characters. If not specified, your default
|
|
229
|
+
Specifies the monitor data set name where MAT saves the measurement (e.g. DEMO.MAT.MONITOR).
|
|
230
|
+
Values: data set name pattern, maximum 46 characters. If not specified, your default MAT monitor DSN pattern is applied.
|
|
227
231
|
|
|
228
232
|
`--stepname` *(string)*
|
|
229
233
|
Specifies the name of the job step to monitor.
|
|
@@ -367,7 +371,7 @@ $ zowe mat profile create --profile PROFILE1 --jobname JOB1 --targsys AA31,AA32
|
|
|
367
371
|
```
|
|
368
372
|
|
|
369
373
|
### invoke | ivk
|
|
370
|
-
Invoke a
|
|
374
|
+
Invoke a MAT monitor profile to start measurement. If you invoke a monitor profile that does currently exist, MAT creates the profile with the provided name and invokes the measurement for this profile.
|
|
371
375
|
|
|
372
376
|
**Usage**
|
|
373
377
|
```
|
|
@@ -376,7 +380,7 @@ $ zowe mat profile invoke [options]
|
|
|
376
380
|
|
|
377
381
|
**Required Options**
|
|
378
382
|
`--profile` *(string)*
|
|
379
|
-
Specifies the name of the profile in
|
|
383
|
+
Specifies the name of the profile in MAT that you invoke (e.g. PROFILE1).
|
|
380
384
|
Values: 1 to 8 characters, a combination of alphanumeric and national characters (A-Z, 0-9, and @), the first character must be an alphabetic or @. The profile name must not contain characters # and $.
|
|
381
385
|
|
|
382
386
|
`--jobname` *(string)*
|
|
@@ -389,8 +393,8 @@ Values: a comma separated list of up to 4 values is allowed, maximum 8 character
|
|
|
389
393
|
|
|
390
394
|
**Options**
|
|
391
395
|
`--mondsn` *(string)*
|
|
392
|
-
Specifies the monitor data set name where
|
|
393
|
-
Values: data set name pattern, maximum 46 characters. If not specified, your default
|
|
396
|
+
Specifies the monitor data set name where MAT saves the measurement (e.g. DEMO.MAT.MONITOR).
|
|
397
|
+
Values: data set name pattern, maximum 46 characters. If not specified, your default MAT monitor DSN pattern is applied.
|
|
394
398
|
|
|
395
399
|
`--moiuuid` *(string)*
|
|
396
400
|
Specifies the MOI UUID.
|
|
@@ -401,7 +405,7 @@ Specifies the MOI timestamp.
|
|
|
401
405
|
Values: maximum 12 characters, numbers only (0-9). If you use this parameter for command execution, the value cannot be blank.
|
|
402
406
|
|
|
403
407
|
`--listing` *(boolean)*
|
|
404
|
-
Activates automated registration of Cobol, C/C++, and Assembler program listings through
|
|
408
|
+
Activates automated registration of Cobol, C/C++, and Assembler program listings through Endevor® footprints. After completion of the measurement that you invoke with the '--listing' parameter, the MAT Analyze plug-in for Zowe CLI automatically retrieves the program listing that is associated with the monitored job and registers the listing with MAT. A registered program listing enhances the analysis possibilities of the 'codeview histogram' command and enables you to inspect the source code statements that are associated with specific modules and CSECTs.
|
|
405
409
|
|
|
406
410
|
**Profile Options**
|
|
407
411
|
`--mat-profile` | `--mat-p` (string)
|
|
@@ -434,7 +438,7 @@ $ zowe mat profile list [options]
|
|
|
434
438
|
The name of a (mat) profile to load for this command execution.
|
|
435
439
|
|
|
436
440
|
## MONITOR
|
|
437
|
-
The commands from the MONITOR group enable you to get monitor history and measurement analysis data from
|
|
441
|
+
The commands from the MONITOR group enable you to get monitor history and measurement analysis data from MAT.
|
|
438
442
|
|
|
439
443
|
**Usage**
|
|
440
444
|
```
|
|
@@ -666,13 +670,13 @@ Specifies the module name that you request the Histogram data for. You get the m
|
|
|
666
670
|
Specifies the CSECT name that you request the Histogram data for. You get the csect value from the 'codeview csect' command response. The CSECT name can be empty (e.g., --csect "TUNCOB01" or --module '""').
|
|
667
671
|
|
|
668
672
|
`--top` *(number)*
|
|
669
|
-
Specifies the maximum number of the top consuming CSECT activity locations that you want to obtain in the response (e.g., --top 5). If you specify --top 0, you get the list of all CSECT activity locations that
|
|
673
|
+
Specifies the maximum number of the top consuming CSECT activity locations that you want to obtain in the response (e.g., --top 5). If you specify --top 0, you get the list of all CSECT activity locations that MAT has detected during the measurement. The --top parameter is optional. Values: numbers between 0 and 300.
|
|
670
674
|
|
|
671
675
|
`--group` *(number)*
|
|
672
|
-
Specifies the histogram group size parameter that defines the resolution of the histogram. If you do not specify the group parameter, the group size defaults to 4 bytes (e.g., --group 32). If program listing is registered with
|
|
676
|
+
Specifies the histogram group size parameter that defines the resolution of the histogram. If you do not specify the group parameter, the group size defaults to 4 bytes (e.g., --group 32). If program listing is registered with MAT, the group parameter is ignored. The --group parameter is optional.
|
|
673
677
|
|
|
674
678
|
`--listing` *(boolean)*
|
|
675
|
-
Enables you to retrieve program listing details that pertain to the specific CSECT and statement. To use the listing retrieval option, you must install and configure the
|
|
679
|
+
Enables you to retrieve program listing details that pertain to the specific CSECT and statement. To use the listing retrieval option, you must install and configure the Endevor® Web Services and have the program listing for the specific measurement registered with MAT. The source code listing is retrieved through Endevor® footprints for Cobol, C/C++, and Assembler programs. The program listing file is downloaded to your local directory that you specified with the 'listingDir' parameter for your MAT configuration profile. When you request the histogram details with the '--listing' option, the 'histogram' command returns the additional 'listing' column that contains a reference to the program listing with the specific CSECT name, program type, line and column number that pertain to the requested CSECT and statement, for example, c:\listings\SA420LE.asm:382:51. If you use Visual Studio Code (VS Code) IDE, you can click on the reference in the command response in your VS Code terminal to navigate directly to the indicated source program location. The --listing parameter is optional.
|
|
676
680
|
|
|
677
681
|
**Profile Options**
|
|
678
682
|
`--mat-profile` | `--mat-p` *(string)*
|
|
@@ -756,7 +760,7 @@ Specifies the name of the profile that you want to analyze. When you specify the
|
|
|
756
760
|
Specifies the unique monitor number of the measurement.
|
|
757
761
|
|
|
758
762
|
`--top` *(number)*
|
|
759
|
-
Specifies the maximum number of the top consuming DB2 statements that you want to obtain in the response (e.g., --top 5). If you specify --top 0, you get the list of of all DB2 statements that
|
|
763
|
+
Specifies the maximum number of the top consuming DB2 statements that you want to obtain in the response (e.g., --top 5). If you specify --top 0, you get the list of of all DB2 statements that MAT has detected during the measurement. The --top parameter is optional. Values: numbers between 0 and 300.
|
|
760
764
|
|
|
761
765
|
|
|
762
766
|
**Profile Options**
|
|
@@ -815,8 +819,8 @@ $ zowe mat monitor db2 sqlstmt --profile TESTPROF --dbrm CUPBTSDY --stmtnum 464
|
|
|
815
819
|
```
|
|
816
820
|
|
|
817
821
|
|
|
818
|
-
# Uninstall the
|
|
819
|
-
To uninstall the
|
|
822
|
+
# Uninstall the MAT Analyze Plug-in for Zowe CLI
|
|
823
|
+
To uninstall the MAT Analyze plug-in for Zowe CLI, issue the following command:
|
|
820
824
|
```
|
|
821
825
|
$ zowe plugins uninstall @broadcom/mat-analyze-for-zowe-cli
|
|
822
826
|
```
|
package/lib/api/MATRest.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class MATRest {
|
|
|
21
21
|
static readonly ANALYSIS_CODEVIEW_CALLERID: string;
|
|
22
22
|
static readonly ANALYSIS_CODEVIEW_HISTOGRAM: string;
|
|
23
23
|
static readonly TOKEN_OFFSET = 25;
|
|
24
|
-
static GetAuth(session: AbstractSession,
|
|
24
|
+
static GetAuth(session: AbstractSession, endpoint: string): Promise<IAuth>;
|
|
25
25
|
static sendGetRequest<T extends IResponse>(session: AbstractSession, resource: string, headers?: any[], parameters?: Map<string, object>): Promise<T>;
|
|
26
26
|
static sendPostRequest<T extends IResponse>(session: AbstractSession, resource: string, headers?: any[], payload?: any): Promise<T>;
|
|
27
27
|
static sendPostRequestWithParm<T extends IResponse>(session: AbstractSession, resource: string, headers?: any[], parameters?: Map<string, object>, payload?: any): Promise<T>;
|
package/lib/api/MATRest.js
CHANGED
|
@@ -34,13 +34,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
34
34
|
exports.MATRest = void 0;
|
|
35
35
|
const imperative_1 = require("@zowe/imperative");
|
|
36
36
|
class MATRest {
|
|
37
|
-
static GetAuth(session, username, password, endpoint) {
|
|
37
|
+
// public static async GetAuth(session: AbstractSession, username: string, password: string, endpoint: string): Promise<IAuth> {
|
|
38
|
+
static GetAuth(session, endpoint) {
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const auth = "Basic " + Buffer.from(username + ":" + password).toString("base64");
|
|
40
|
-
const header = { Authorization: auth };
|
|
41
40
|
const resource = endpoint + MATRest.AUTH;
|
|
42
|
-
const
|
|
43
|
-
const response = yield this.sendPostRequest(session, resource, headers);
|
|
41
|
+
const response = yield this.sendPostRequest(session, resource);
|
|
44
42
|
return response;
|
|
45
43
|
});
|
|
46
44
|
}
|
package/lib/api/MATRest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MATRest.js","sourceRoot":"","sources":["../../src/api/MATRest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAA+D;
|
|
1
|
+
{"version":3,"file":"MATRest.js","sourceRoot":"","sources":["../../src/api/MATRest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAA+D;AAI/D,MAAa,OAAO;IAqBhB,gIAAgI;IACzH,MAAM,CAAO,OAAO,CAAC,OAAwB,EAAE,QAAgB;;YAClE,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;YACzC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe,CAAQ,OAAO,EAAE,QAAQ,CAAC,CAAC;YACtE,OAAO,QAAQ,CAAC;QAChB,CAAC;KAAA;IAEL,2CAA2C;IACpC,MAAM,CAAO,cAAc,CAAsB,OAAwB,EAAE,QAAgB,EAAE,OAAe,EAAE,UAAgC;;YACjJ,IAAI,QAAQ,GAAG,EAAE,CAAC;YAClB,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,IAAI,EAAE;gBAC7C,QAAQ,IAAI,GAAG,CAAC;gBAChB,IAAI,GAAG,GAAG,CAAC,CAAC;gBACZ,KAAK,MAAM,QAAQ,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE;oBACzC,GAAG,EAAE,CAAC;oBACN,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;oBACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;oBAC1B,QAAQ,IAAI,GAAG,GAAG,GAAG,GAAG,KA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G,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;AACjE,mCAA2B,GAAG,OAAO,CAAC,kBAAkB,GAAG,WAAW,CAAC;AACvE,kCAA0B,GAAG,OAAO,CAAC,QAAQ,GAAG,oBAAoB,CAAC;AACrE,mCAA2B,GAAG,OAAO,CAAC,QAAQ,GAAG,qBAAqB,CAAC;AACvE,oBAAY,GAAG,EAAE,CAAC"}
|
|
@@ -39,12 +39,23 @@ const CodeviewDefinition = require("./codeview/Codeview.definition");
|
|
|
39
39
|
const DelayviewDefinition = require("./delayview/Delayview.definition");
|
|
40
40
|
const DB2Definition = require("./db2/DB2.definition");
|
|
41
41
|
const History_definition_1 = require("./history/History.definition");
|
|
42
|
+
const MATSession_1 = require("../session/MATSession");
|
|
42
43
|
const MonitorDefinition = {
|
|
43
44
|
name: "monitor",
|
|
44
45
|
summary: "Get monitor data",
|
|
45
|
-
description: "Get monitor history and measurement analysis data from
|
|
46
|
+
description: "Get monitor history and measurement analysis data from MAT.",
|
|
46
47
|
type: "group",
|
|
47
|
-
children: [Overview_definition_1.OverviewDefinition, CodeviewDefinition, DelayviewDefinition, History_definition_1.HistoryDefinition, DB2Definition]
|
|
48
|
+
children: [Overview_definition_1.OverviewDefinition, CodeviewDefinition, DelayviewDefinition, History_definition_1.HistoryDefinition, DB2Definition],
|
|
49
|
+
passOn: [
|
|
50
|
+
{
|
|
51
|
+
property: "options",
|
|
52
|
+
value: MATSession_1.MATSession.PMA_CONNECTION_OPTIONS,
|
|
53
|
+
merge: true,
|
|
54
|
+
ignoreNodes: [
|
|
55
|
+
{ type: "group" }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
]
|
|
48
59
|
};
|
|
49
60
|
module.exports = MonitorDefinition;
|
|
50
61
|
//# sourceMappingURL=Monitor.definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Monitor.definition.js","sourceRoot":"","sources":["../../../src/cli/monitor/Monitor.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH;;;;;;;;;;;;GAYG;AACH,wEAAoE;AACpE,qEAAsE;AACtE,wEAAyE;AACzE,sDAAuD;AAEvD,qEAAiE;AACjE,MAAM,iBAAiB,GAAuB;IAC1C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,kBAAkB;IAC3B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"Monitor.definition.js","sourceRoot":"","sources":["../../../src/cli/monitor/Monitor.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH;;;;;;;;;;;;GAYG;AACH,wEAAoE;AACpE,qEAAsE;AACtE,wEAAyE;AACzE,sDAAuD;AAEvD,qEAAiE;AACjE,sDAAmD;AACnD,MAAM,iBAAiB,GAAuB;IAC1C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,kBAAkB;IAC3B,WAAW,EAAE,6DAA6D;IAC1E,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,wCAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,sCAAiB,EAAE,aAAa,CAAC;IACzG,MAAM,EAAE;QACJ;YACI,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,uBAAU,CAAC,sBAAsB;YACxC,KAAK,EAAE,IAAI;YACX,WAAW,EAAE;gBACT,EAAC,IAAI,EAAE,OAAO,EAAC;aAClB;SACJ;KACJ;CACJ,CAAC;AAEF,iBAAS,iBAAiB,CAAC"}
|
|
@@ -31,7 +31,7 @@ exports.HistogramDefinition = {
|
|
|
31
31
|
type: "command",
|
|
32
32
|
handler: __dirname + "/Histogram.handler",
|
|
33
33
|
profile: {
|
|
34
|
-
|
|
34
|
+
optional: ["mat"]
|
|
35
35
|
},
|
|
36
36
|
options: [
|
|
37
37
|
{
|
|
@@ -64,7 +64,7 @@ exports.HistogramDefinition = {
|
|
|
64
64
|
name: "group",
|
|
65
65
|
description: "Specifies the histogram group size parameter that defines the resolution of the histogram " +
|
|
66
66
|
"(e.g., --group 32). If you do not specify the group parameter, the group size value defaults to 4 bytes. " +
|
|
67
|
-
"If the source program listing is registered with
|
|
67
|
+
"If the source program listing is registered with MAT, the group size parameter is ignored. " +
|
|
68
68
|
"The --group parameter is optional. " +
|
|
69
69
|
"Lower values of the --group parameter result in more granular representation of the histogram data. " +
|
|
70
70
|
"Values: numbers between 2 and 999999.",
|
|
@@ -74,16 +74,16 @@ exports.HistogramDefinition = {
|
|
|
74
74
|
name: "top",
|
|
75
75
|
description: "Specifies the maximum number of the top consuming CSECT activity locations " +
|
|
76
76
|
"that you want to obtain in the response (e.g., --top 5). If you specify --top 0, " +
|
|
77
|
-
"you get the list of all CSECT activity locations that
|
|
77
|
+
"you get the list of all CSECT activity locations that MAT has detected during the measurement." +
|
|
78
78
|
"The --top parameter is optional. Values: numbers between 0 and 300.",
|
|
79
79
|
type: "number"
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
name: "listing",
|
|
83
83
|
description: "Enables you to retrieve program listing details that pertain to the specific CSECT and statement. " +
|
|
84
|
-
"To use the listing retrieval option, you must install and configure the
|
|
85
|
-
"program listing for the specific measurement registered with
|
|
86
|
-
"through
|
|
84
|
+
"To use the listing retrieval option, you must install and configure the Endevor® Web Services and have the " +
|
|
85
|
+
"program listing for the specific measurement registered with MAT. The source code listing is retrieved " +
|
|
86
|
+
"through Endevor® footprints for Cobol, C/C++, and Assembler programs. The program listing file is downloaded " +
|
|
87
87
|
"to your local directory that you specified with the \'listingDir\' parameter in your MAT configuration profile. " +
|
|
88
88
|
"When you request the histogram details with the \'--listing\' option, the \'histogram\' command returns the " +
|
|
89
89
|
"additional \'listing\' column that contains a reference to the program listing with the specific CSECT name, " +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Histogram.definition.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/Histogram/Histogram.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGU,QAAA,mBAAmB,GAAuB;IACnD,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,OAAO,EAAE,oBAAoB;IAC7B,WAAW,EAAE,gDAAgD;IAC7D,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS,GAAG,oBAAoB;IACzC,OAAO,EAAE;QACL,QAAQ,EAAE,CAAC,KAAK,CAAC;KACpB;IACD,OAAO,EAAE;QACL;YACI,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,8DAA8D;gBAC3E,iFAAiF;gBACjF,+BAA+B;YAC/B,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,yDAAyD;YACtE,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qEAAqE;gBAClF,yEAAyE;gBACzE,iFAAiF;YACjF,IAAI,EAAE,eAAe;SACxB;QACD;YACI,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,oEAAoE;gBACjF,oGAAoG;gBACpG,oDAAoD;YACpD,IAAI,EAAE,eAAe;SACxB;QACD;YACI,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,4FAA4F;gBACzG,2GAA2G;gBAC3G,
|
|
1
|
+
{"version":3,"file":"Histogram.definition.js","sourceRoot":"","sources":["../../../../../src/cli/monitor/codeview/Histogram/Histogram.definition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGU,QAAA,mBAAmB,GAAuB;IACnD,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,OAAO,EAAE,oBAAoB;IAC7B,WAAW,EAAE,gDAAgD;IAC7D,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS,GAAG,oBAAoB;IACzC,OAAO,EAAE;QACL,QAAQ,EAAE,CAAC,KAAK,CAAC;KACpB;IACD,OAAO,EAAE;QACL;YACI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}
|
|
@@ -34,7 +34,8 @@ 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
|
-
|
|
37
|
+
// import { PrintElementComponents, IElementBasicData } from "@broadcom/endevor-for-zowe-cli";
|
|
38
|
+
const api_1 = require("@broadcom/endevor-for-zowe-cli/lib/api");
|
|
38
39
|
class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
39
40
|
getAnalyzeURI() {
|
|
40
41
|
return MATRest_1.MATRest.ANALYSIS_CODEVIEW_HISTOGRAM;
|
|
@@ -53,19 +54,28 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
53
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
55
|
if (params.arguments.listing === true) {
|
|
55
56
|
if ("footprint" in json) {
|
|
56
|
-
const
|
|
57
|
+
const endconerror = "Endevor Connection Error";
|
|
58
|
+
// const matProfile = params.profiles.get("mat", true);
|
|
57
59
|
const endevorFootprint = json.footprint[0]; // 1. CLARIFY WITH GAS WHY THE JSON FOOTPRINT IS AN ARRAY, CAN WE HAVE MORE THAN 1 FOOTPRINT PER MODULE AND CSECT?
|
|
58
|
-
const elemDef = {
|
|
60
|
+
/* const elemDef: IElementBasicData = {
|
|
59
61
|
environment: endevorFootprint.environment.trim(),
|
|
60
62
|
stageNumber: endevorFootprint.stage.trim(),
|
|
61
63
|
system: endevorFootprint.system.trim(),
|
|
62
|
-
subsystem: endevorFootprint.subsystem.trim(),
|
|
64
|
+
subsystem: endevorFootprint.subsystem.trim(), // SUBSYSTEM IS COMING WITH WHITE SPACES IN THE END.
|
|
63
65
|
type: endevorFootprint.type.trim(),
|
|
64
66
|
element: endevorFootprint.element.trim(),
|
|
65
67
|
// instance: "ENDEVOR" // ON THE JSON RESPONSE IS MISSING THE CONTEXT.
|
|
66
68
|
instance: endevorFootprint.endevorContext.trim()
|
|
67
|
-
}
|
|
68
|
-
const
|
|
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 = {
|
|
69
79
|
version: undefined,
|
|
70
80
|
level: undefined,
|
|
71
81
|
print: "listing",
|
|
@@ -77,6 +87,18 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
77
87
|
whereCcidCurrent: undefined,
|
|
78
88
|
whereCcidAll: undefined,
|
|
79
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",
|
|
80
102
|
};
|
|
81
103
|
let endevorSession;
|
|
82
104
|
if (!endevorFootprint.endevorHost.includes("http")) {
|
|
@@ -100,8 +122,8 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
100
122
|
hostname: endevorFootprint.endevorHost.substring(endevorFootprint.endevorHost.indexOf("//") + 2),
|
|
101
123
|
port: endevorFootprint.endevorPort,
|
|
102
124
|
protocol: endevorFootprint.endevorHost.substring(0, endevorFootprint.endevorHost.indexOf(":")),
|
|
103
|
-
user:
|
|
104
|
-
password:
|
|
125
|
+
user: params.arguments.user,
|
|
126
|
+
password: params.arguments.password,
|
|
105
127
|
basePath: endevorFootprint.endevorBasePath,
|
|
106
128
|
rejectUnauthorized: false,
|
|
107
129
|
type: "basic"
|
|
@@ -110,35 +132,36 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
110
132
|
catch (error) {
|
|
111
133
|
const exception = {
|
|
112
134
|
name: "HistogramException",
|
|
113
|
-
header:
|
|
135
|
+
header: endconerror,
|
|
114
136
|
message: "An error occurred while connecting to the endevor web services: \n" + error.message
|
|
115
137
|
};
|
|
116
138
|
throw exception;
|
|
117
139
|
}
|
|
118
140
|
let responseEndevor;
|
|
119
141
|
try {
|
|
120
|
-
responseEndevor = yield
|
|
142
|
+
responseEndevor = yield api_1.EndevorClient.printElement(endevorSession)(endevorFootprint.endevorContext.trim())(elemDef);
|
|
143
|
+
// responseEndevor = await EndevorClient.printElement(endevorSession, elemDef, requestBody, false);
|
|
121
144
|
}
|
|
122
145
|
catch (error) {
|
|
123
146
|
if (error instanceof imperative_1.RestClientError) {
|
|
124
147
|
const exception = {
|
|
125
148
|
name: "HistogramException",
|
|
126
|
-
header:
|
|
127
|
-
message: "Cannot download the listing file from
|
|
149
|
+
header: endconerror,
|
|
150
|
+
message: "Cannot download the listing file from Endevor: \n" + error.mDetails.additionalDetails
|
|
128
151
|
};
|
|
129
152
|
throw exception;
|
|
130
153
|
}
|
|
131
154
|
else {
|
|
132
155
|
const exception = {
|
|
133
156
|
name: "HistogramException",
|
|
134
|
-
header:
|
|
135
|
-
message: "An error occurred while connecting to the
|
|
157
|
+
header: endconerror,
|
|
158
|
+
message: "An error occurred while connecting to the Endevor web services: \n" + error.message
|
|
136
159
|
};
|
|
137
160
|
throw exception;
|
|
138
161
|
}
|
|
139
162
|
}
|
|
140
|
-
if (responseEndevor.data !== null && responseEndevor.data !== undefined) {
|
|
141
|
-
let tofileName =
|
|
163
|
+
if (responseEndevor.body.data !== null && responseEndevor.body.data !== undefined) {
|
|
164
|
+
let tofileName = params.arguments.listingDir === undefined ? "." : params.arguments.listingDir;
|
|
142
165
|
try {
|
|
143
166
|
const fs = require("fs");
|
|
144
167
|
if (!fs.existsSync(tofileName)) {
|
|
@@ -148,9 +171,8 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
148
171
|
}
|
|
149
172
|
});
|
|
150
173
|
}
|
|
151
|
-
// const stats = await fs.statSync(tofileName); // add because EndevorUtils.generalWriteFile cause exception which is not catch
|
|
152
174
|
tofileName += "\\" + endevorFootprint.element + "." + this.getExtension(endevorFootprint.type);
|
|
153
|
-
fs.writeFileSync(tofileName, responseEndevor.data[0], { encoding: "latin1" });
|
|
175
|
+
fs.writeFileSync(tofileName, responseEndevor.body.data[0], { encoding: "latin1" });
|
|
154
176
|
// THIS IS HOW YOU WRITE A FILE USING ENDEVOR
|
|
155
177
|
// EndevorUtils.generalWriteFile(tofileName, responseEndevor.data[0]);
|
|
156
178
|
}
|
|
@@ -163,16 +185,16 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
163
185
|
};
|
|
164
186
|
throw exception;
|
|
165
187
|
}
|
|
166
|
-
if (responseEndevor.data[0].length === 0) {
|
|
188
|
+
if (responseEndevor.body.data[0].length === 0) {
|
|
167
189
|
const exception = {
|
|
168
190
|
name: "HistogramException",
|
|
169
191
|
header: "Endevor Data Error",
|
|
170
|
-
message: "No data in response from
|
|
192
|
+
message: "No data in response from Endevor."
|
|
171
193
|
};
|
|
172
194
|
throw exception;
|
|
173
195
|
}
|
|
174
|
-
responseEndevor.data[0] = responseEndevor.data[0] + "";
|
|
175
|
-
const lines = responseEndevor.data[0].split("\n");
|
|
196
|
+
responseEndevor.body.data[0] = responseEndevor.body.data[0] + "";
|
|
197
|
+
const lines = responseEndevor.body.data[0].split("\n");
|
|
176
198
|
for (const histogram of json.histogram) {
|
|
177
199
|
histogram.listing = "not found";
|
|
178
200
|
for (let index = 0; index < lines.length; index++) {
|
|
@@ -192,7 +214,7 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
192
214
|
const exception = {
|
|
193
215
|
name: "HistogramException",
|
|
194
216
|
header: "Resource Access Error",
|
|
195
|
-
message: "Listing not found. Caused by: \n" + responseEndevor.messages
|
|
217
|
+
message: "Listing not found. Caused by: \n" + responseEndevor.body.messages
|
|
196
218
|
};
|
|
197
219
|
throw exception;
|
|
198
220
|
}
|
|
@@ -207,7 +229,7 @@ class HistogramHandler extends AbstractAnalyzeHandler_1.default {
|
|
|
207
229
|
const exception = {
|
|
208
230
|
name: "HistogramException",
|
|
209
231
|
header: "Resource Access Error",
|
|
210
|
-
message: "The listing data set for the measurement is not registered with
|
|
232
|
+
message: "The listing data set for the measurement is not registered with MAT"
|
|
211
233
|
};
|
|
212
234
|
throw exception;
|
|
213
235
|
}
|