(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["mission-control-memleak-analyzer-memleak-analyzer-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.component.html":
/*!********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.component.html ***!
  \********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"w-100-p ns-scenario  \">\n    <div class=\"w-100-p relative\">\n        <p-breadcrumb [model]=\"breadcrumbItems\"></p-breadcrumb>\n        <span class=\"breadcumb_help\">\n            <app-help [helpFileName]=\"'memoryLeakAnalyzer'\" [helpTitle]=\"'Memory Leak Analyzer'\"\n                [helpFolder]=\"'action'\"></app-help>\n        </span>\n    </div>\n\n\n    <div class=\"p-8\">\n        <ng-container>\n            <div class=\"w-100-p border-all bg-white border-4 p-6\">\n                <app-cav-toolbar [number]=\"'1'\" [label]=\"'Select Target'\"></app-cav-toolbar>\n                <div class=\"w-100-p\">\n                    <app-tier-server-info [parentName]=\"'MemoryLeak'\"></app-tier-server-info>\n                </div>\n            </div>\n            <div class=\"p-grid mt-16 p-justify-center w-100-p\">\n                <div class=\"p-grid mt-16 p-justify-center w-100-p\">\n                    <button pButton type=\"button\" (click)=\"startMemoryLeak()\" label=\"Start Memory Leak Analyzer\"\n                        class='ui-btn-primary mx-8' [disabled]=\"!isAdmin\"></button>\n                    <button pButton type=\"button\" label=\"Reset\" (click)=\"resetMemLeak()\" class=\"ui-button-secondary\"></button>\n                </div>\n            </div>\n        </ng-container>\n    </div>\n</div>\n\n\n<ng-container *ngIf=\"isAnalyzer\">\n    <app-mission-control [isFromRevamp]=\"isAnalyzer\"></app-mission-control>\n</ng-container>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/mission-control/mission-control.component.html":
/*!**************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/mission-control/mission-control.component.html ***!
  \**************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"template-container ns-scenario\">\n  <div *ngIf=\"loader\">\n    <p-progressBar mode=\"indeterminate\" [style]=\"{'height': '5px'}\"></p-progressBar>\n  </div>\n  <div class=\"page-container\">\n    <!--component html goes here -->\n    <div id=\"heapDumpDialog\" *ngIf = \"!isFromRevamp\">\n      <!-- {{headerName}} -->\n      <h2 mat-dialog-title class=\"dashboard-titlebar\" style='font-size: 16px;'>\n        <div style=\"float: right; \">\n        </div>\n      </h2>\n      <div>\n        <div class=\"p-grid p-align-center p-justify-between\">\n          <div class=\"p-col-8 p-grid p-align-center\" *ngIf=\"showTable != 2\">\n            <div class=\"p-grid p-col-4 p-align-center ml-5\"><label class=\"w-20-p font-14 font-weight-500\">Tier:</label>\n              <p-dropdown dropdownIcon=\"icons8 icons8-expand-arrow\" [options]=\"tiers\" pTooltip=\"{{selectedTierVal}}\"\n                tooltipPosition=\"bottom\" appendTo='body' [(ngModel)]=\"selectedTierVal\" [filter]='true'\n                [style]=\"{'width':'130px'}\" (onChange)=\"getServerValue(selectedTierVal)\"></p-dropdown>\n            </div>\n            <div class=\"p-grid p-col-6 p-align-center\"><label class=\"w-20-p font-14 font-weight-500\">Server:</label>\n              <p-dropdown dropdownIcon=\"icons8 icons8-expand-arrow\" [options]=\"servers\" placeholder=\"-- Select Server --\" [disabled]=\"isDisabled\" pTooltip=\"{{selectedServerVal}}\"\n                tooltipPosition=\"bottom\" appendTo='body' [(ngModel)]=\"selectedServerVal\" [filter]=\"true\"\n                [style]=\"{'width':'130px'}\" (onChange)=\"resetInstanceTable()\" ></p-dropdown>\n            </div>\n          </div>\n          <div class=\"p-grid p-align-center\">\n            <button pButton type=\"button\" *ngIf=\"showTable == 2\" (click)=\"showTable = 1\" icon=\"icons8 icons8-left\"\n              title=\"Go Back\" class=\"mx-15 mb-6  ui-btn-primary\"></button>\n            <div *ngIf=\"showTable != 2\">\n              <button pButton type=\"button\" (click)=\"getJavaInstances()\" label=\"All\"\n                title=\"Get All Instances through Cavmonagent\" class='mh-10 ui-btn-primary'></button>\n              <button pButton type=\"button\" (click)=\"getNDInstances()\" label=\"ND\"\n                title=\"Get ND Instances through ND Collector\" class='ml-5 mr-15 ui-btn-primary'></button>\n            </div>\n          </div>\n          <span class=\"py-5\" *ngIf=\"(showTable == 2)\">\n            <button pButton type=\"button\" title=\"Refresh\" label=\"Refresh\" (click)=\"refreshGUI()\"\n              class='mh-10 ui-btn-primary'></button>\n          </span>\n        </div>\n        <div class=\"p-grid loader-container vertical-container h-50-vh\" *ngIf=\"loading1\">\n          <div class=\"p-col p-col-align-center text-center\">\n            <div><i class=\"pi pi-spin pi-spinner font-25\"></i> <span class=\"font-25\">Loading</span></div>\n          </div>\n        </div>\n        <div style=\"margin:10px;\" *ngIf=\"showTable == 1\">\n          <p-accordion class=\"accordHeader\">\n            <p-accordionTab header=\"Java Instances\" [selected]=\"true\">\n              <div>\n                <p-table [value]=\"instanceInfo\" [(selection)]=\"selectedInstanceInfo\"\n                  [responsive]=\"true\" selectionMode=\"single\" (onRowSelect)=\"onRowSelectData($event.data)\"\n                  (onRowUnselect)=\"onRowUnselectData($event.data)\" [rows]=\"10\" [paginator]=\"instanceInfo && instanceInfo.length > 10\" [pageLinks]=\"3\"\n                  scrollHeight=\"213px\" [scrollable]=\"true\"\n                  [rowsPerPageOptions]=\"[10,20,50,100]\" sortOrder=\"-1\" sortable =\"true\" (sortFunction)=\"sortColumnsOnCustom($event)\" [customSort]=\"true\">\n                  <ng-template pTemplate=\"colgroup\" let-columns>\n                    <colgroup>\n                        <col style=\"width:5%\">\n                        <col style=\"width:20%\">\n                        <col style=\"width:20%\">\n                        <col style=\"width:20%\" *ngIf=\"isNDCase\">\n                        <col style=\"width:auto\" *ngIf=\"!isNDCase\">\n                        <col style=\"width:15%\" *ngIf=\"isNDCase\">\n                    </colgroup>\n                </ng-template>\n                  <ng-template pTemplate=\"header\">\n                    <tr>\n                      <th></th>\n                      <th pSortableColumn=\"pid\">Process ID<p-sortIcon field=\"pid\"></p-sortIcon></th>\n                      <th pSortableColumn=\"appName\">Instance Name<p-sortIcon field=\"appName\"></p-sortIcon></th>\n                      <th pSortableColumn=\"agentType\" *ngIf=\"isNDCase\">Agent Type<p-sortIcon field=\"agentType\"></p-sortIcon></th>\n                      <th pSortableColumn=\"arguments\" *ngIf=\"!isNDCase\">Process Arguments<p-sortIcon field=\"arguments\"></p-sortIcon></th>\n                      <th pSortableColumn=\"status\" *ngIf=\"isNDCase\">Status<p-sortIcon field=\"status\"></p-sortIcon></th>\n                    </tr>\n                  </ng-template>\n                  <ng-template pTemplate=\"body\" let-node>\n                    <tr>\n                      <td class=\"w-5-p text-center\">\n                        <p-tableRadioButton [value]=\"node\"></p-tableRadioButton>\n                      </td>\n                      <td><a class=\"elipseText right\" pTooltip=\"{{ node.pid }}\" tooltipPosition=\"bottom\"\n                          tooltipEvent=\"hover\">{{ node.pid }}</a></td>\n                      <td><a class=\"elipseText\" pTooltip=\"{{ node.appName }}\" tooltipPosition=\"bottom\"\n                          tooltipEvent=\"hover\">{{ node.appName }}</a></td>\n                      <td *ngIf=\"isNDCase\">\n                        <a class=\"elipseText\" pTooltip=\"{{ node.agentType }}\" tooltipPosition=\"bottom\"\n                          tooltipEvent=\"hover\">{{ node.agentType }}</a>\n                      </td>\n                      <td *ngIf=\"!isNDCase\">\n                        <a class=\"elipseText\" *ngIf='(node.arguments.length > 70)' title=\"{{node.arguments}}\"\n                          tooltipPosition=\"bottom\" tooltipEvent=\"hover\">{{node.arguments.substring(0, 70)}}</a>\n                        <a class=\"elipseText\" *ngIf='(node.arguments.length <= 70)' title=\"{{node.arguments}}\"\n                          tooltipPosition=\"bottom\" tooltipEvent=\"hover\">{{node.arguments}}</a>\n                      </td>\n                      <td *ngIf=\"isNDCase\"><a class=\"elipseText\" pTooltip=\"{{ node.status }}\" tooltipPosition=\"bottom\"\n                          tooltipEvent=\"hover\">{{ node.status }}</a></td>\n                    </tr>\n                  </ng-template>\n                </p-table>\n                <div *ngIf=\"(!isNDCase && selectedInstanceInfo)\">\n                  <div class=\"process-arguments process-arguments overflow border-3\">\n                    <div class=\"process-arguments-content\" style=\"max-width:100%;margin:5px\"> <b> Process Arguments:\n                      </b>{{selectedInstanceInfo['arguments']}}</div>\n                  </div>\n                </div>\n              </div>\n            </p-accordionTab>\n\n          </p-accordion>\n        </div>\n        <div *ngIf=\"showTable== 2\" class=\"mx-15\">\n          <p-table [columns]=\"jfCols\" [value]=\"jfrList\" tableLayout=\"false\" sortField=\"timestamp\" [sortOrder]=\"-1\" selectionMode=\"single\"\n            [scrollable]=\"true\" scrollHeight=\"calc(100vh - 220px)\" [resizableColumns]=\"true\" columnResizeMode=\"fit\"\n            [rows]=\"10\" [paginator]=\"true\" [pageLinks]=\"3\" [rowsPerPageOptions]=\"[10,20,30,40,50]\">\n            <ng-template pTemplate=\"colgroup\" let-columns>\n              <colgroup>\n                  <col *ngFor=\"let col of columns\" [style.width]=\"col.width\">\n              </colgroup>\n          </ng-template>\n          <ng-template pTemplate=\"header\" let-columns>\n              <tr>\n                  <th *ngFor=\"let col of columns\" pResizableColumn>\n                      {{col.header}}\n                  </th>\n              </tr>\n          </ng-template>\n            <ng-template pTemplate=\"body\" let-node let-columns=\"columns\">\n              <tr>\n                <td>\n                  <a pTooltip=\"{{node.tierName}}\" tooltipPosition=\"bottom\" tooltipEvent=\"hover\">{{node.tierName}}</a>\n                </td>\n                <td>\n                  <a pTooltip=\"{{node.serverName}}\" tooltipPosition=\"bottom\"\n                    tooltipEvent=\"hover\">{{node.serverName}}</a></td>\n                <td>\n                  <a pTooltip=\"{{node.instanceName}}\" tooltipPosition=\"bottom\"\n                    tooltipEvent=\"hover\">{{node.instanceName}}</a></td>\n                <td>\n                  <a pTooltip=\"Time at which Java Flight Record is started successfully\" tooltipPosition=\"bottom\"\n                    tooltipEvent=\"hover\">{{node.timestamp}}</a></td>\n                <td>\n                  <a pTooltip=\"{{node.userName}}\" tooltipPosition=\"bottom\" tooltipEvent=\"hover\">{{node.userName}}</a>\n                </td>\n                <td>\n                  <a class=\"elipseText\" pTooltip=\"{{node.location}}\" tooltipPosition=\"bottom\"\n                    tooltipEvent=\"hover\">{{node.location}}</a></td>\n                <td>\n                  <a class=\"elipseText\" pTooltip=\"{{node.filePath}}\" tooltipPosition=\"bottom\"\n                    tooltipEvent=\"hover\">{{node.filePath}}</a></td>\n                <td class=\"text-center\">\n                  <button pButton type=\"button\" title=\"download at local\" class=\"btn-icon\"\n                    icon=\"icons8 icons8-download-2\" (click)=\"downloadFile(node)\"></button>\n                    <button pButton type=\"button\" title=\"Copy file\" icon=\"icons8 icons8-copy font-18 mr-3\" (click)=\"copyLink(node)\"  class='btn-icon mx-5'></button>\n                  <button pButton type=\"button\" title=\"Remove JFR\" class=\"btn-icon\" icon=\"icons8 icons8-delete-trash\"\n                    (click)=\"confirmationPopup = true;assignNodevalueToDelete(node)\"></button>\n                </td>\n              </tr>\n            </ng-template>\n            <ng-template pTemplate=\"emptymessage\">\n              <tr>\n                <td style=\"text-align: center\" [attr.colspan]=\"8\"> No records found </td>\n              </tr>\n            </ng-template>\n          </p-table>\n        </div>\n        <div class=\"ui-dialog-content\" *ngIf=\"showTable == 0\">{{ErrorResult}}</div>\n      </div>\n      <p-footer>\n        <div class='p-grid p-justify-center p-align-center'>\n          <span *ngIf=\"(showThreadDumpOption == true && showTable != 2 && !showMemLeak)\">\n            <button pButton type=\"button\" [disabled] = \"isNonAdmin\" (click)=\"openStartFlightRecorder()\" label=\"Start Flight Recording\"\n              class='mh-10 ui-btn-primary'></button>\n            <button pButton type=\"button\" (click)=\"showFlightRecording()\" label=\"Show Flight Recording\"\n              class='mh-10 ui-btn-primary'></button>\n          </span>\n          <span *ngIf=\"(showTable != 2 && !showMemLeak)\">\n            <button pButton type=\"button\" (click)=\"showAllData()\" label=\"Show All Recordings\"\n              class='mh-10 ui-btn-primary'></button>\n          </span>\n          <button *ngIf=\"showMemLeak\" pButton type=\"button\" (click)=\"startMemLeakAnalyzer()\"\n          [disabled] = \"isNonAdmin\" label=\"Start MemLeak Analyzer\" class='mh-10 ui-btn-primary'></button>\n        </div>\n      </p-footer>\n    </div>\n    <p-dialog class=\"secondary-dialog foterDialog\" [style]=\"{width: '60vw'}\" header=\"Start Flight Recording\" [(visible)]=\"startFlight\" styleClass=\"flight-record\" modal=\"modal\" [responsive]=\"true\">\n      <div class=\"ui-g-12 p-grid p-align-center\">\n        <div class=\"p-grid p-col p-align-center\">\n          <label class=\"p-col-6 pr-0\"> Recording File Name: </label>\n          <input  minlength=\"1\" placeholder=\"File Name With Absolute Path(Required)\"  [(ngModel)]=\"fileName\" style=\"width:206px;\" pInputText/>\n        </div>\n        <div class=\"p-grid p-col p-align-center\">\n          <p-checkbox label=\"Overwrite existing File (if present)\" [(ngModel)]=\"isOverwrite\" binary=\"true\"></p-checkbox>\n        </div>\n      </div>\n      <div class=\"ui-g-12 p-grid p-align-center\">\n        <div class=\"p-grid p-col pl-12 p-align-center\">\n          Max timeout for recording request\n          <input class=\"pr-10 mx-8\"  minlength=\"1\" placeholder=\"\" [(ngModel)]=\"maxTime\" style=\"width:30px; height:26px; \" pInputText/> in minutes\n        </div>\n        <div class=\"p-grid p-col-6 p-align-center\">\n          <label class=\"p-col-2 pl-0\">Duration: </label>\n          <input  minlength=\"1\" class=\"mr-20\" placeholder=\"Duration in Minutes\" (keypress)=\"validateDuration($event)\" [(ngModel)]=\"maxTimeOut\" style=\"width:35px; height:26px;\" pInputText/>\n          <p-dropdown dropdownIcon=\"icons8 icons8-expand-arrow\" [options]=\"selectTime\" scrollHeight=\"100px\" appendTo=\"body\" [(ngModel)]=\"selectedTime\" [style]=\"{'min-width':'115px'}\"></p-dropdown>\n        </div>\n      </div>\n      \n        <div class=\"ui-g-12 p-grid p-align-center\">\n          <div class=\"p-grid p-col-6 p-align-center\">\n            <label class=\"p-col-6 pr-0 \">Expected Size of Recording (if known):  </label>\n            <input  minlength=\"1\" placeholder=\"Expected Size\" (keypress)=\"validate($event)\" [(ngModel)]=\"fileSize\" style=\"width:145px;height:26px;\" pInputText/>\n            <p-dropdown dropdownIcon=\"icons8 icons8-expand-arrow\" class=\"ml-5\" [options]=\"selectFileSize\" appendTo=\"body\" [(ngModel)]=\"selectedSize\" [style]=\"{'min-width':'192%'}\"></p-dropdown>\n          </div>\n        \n        </div>\n      <div class=\"p-col-12 p-grid p-justify-center mt-30\">\n        <button pButton type=\"button\" (click)=\"closeFlightRecording()\" label=\"Close\"\n          class='mh-10 ui-btn-primary'></button>\n        <button pButton type=\"button\" (click)=\"startFlightRecording()\" label=\"Start\"\n          class='mh-10 ui-btn-primary'></button>\n      </div>\n    </p-dialog>\n\n    <p-dialog class=\"secondary-dialog foterDialog\" header=\"Show Flight Recording\" [(visible)]=\"showFlight\" modal=\"modal\"\n      width=\"1000px\" [resizable]=false autoAlign=\"true\">\n      <div style=\"width:900px;height:auto;\">\n        <p-table class=\"all-tables\" [value]=\"flightData\" sortField=\"fileLastModificationTime\" [sortOrder]=\"-1\"\n          selectionMode=\"single\" [style]=\"{'font-size':'12px','overflow':'unset'}\" resizableColumns=\"true\"\n          reorderableColumns=\"true\" [(selection)]=\"selectedRowInfo\" [rows]=\"10\" [paginator]=\"true\" [pageLinks]=\"3\"\n          [scrollable]=\"true\" scrollHeight=\"240px\" [rowsPerPageOptions]=\"[10,20,30,40,50]\">\n          <ng-template pTemplate=\"colgroup\" let-columns>\n            <colgroup>\n                <col *ngFor=\"let col of columns\" [style.width]=\"col.width\">\n            </colgroup>\n        </ng-template>\n          <ng-template pTemplate=\"header\">\n            <tr>\n              <th pResizableColumn class=\"w-5-p\"></th>\n              <th pResizableColumn>File Name</th>\n              <th pResizableColumn>Status</th>\n              <th pResizableColumn>Duration(Sec)</th>\n              <th pResizableColumn>Location</th>\n              <th pResizableColumn>File Size(MB)</th>\n              <th pResizableColumn>Last Modification Time</th>\n            </tr>\n          </ng-template>\n          <ng-template pTemplate=\"body\" let-node>\n            <tr>\n              <td class=\"w-5-p text-center\"> \n                <p-tableRadioButton [value]=\"node\"></p-tableRadioButton>\n              </td>\n              <td><a pTooltip=\"{{node.recordingName}}\" tooltipPosition=\"bottom\"\n                  tooltipEvent=\"hover\">{{node.recordingName}}</a>\n              </td>\n              <td><a pTooltip=\"{{node.status}}\" tooltipPosition=\"bottom\" tooltipEvent=\"hover\">{{node.status}}</a></td>\n              <td><a class=\"elipseText right\" pTooltip=\"{{node.duration}}\" tooltipPosition=\"bottom\" tooltipEvent=\"hover\">{{node.duration}}</a>\n              </td>\n              <td><a pTooltip=\"{{node.recordingFileName}}\" tooltipPosition=\"bottom\"\n                  tooltipEvent=\"hover\">{{node.recordingFileName}}</a></td>\n              <td><a class=\"elipseText right\" pTooltip=\"{{node.fileSize}}\" tooltipPosition=\"bottom\" tooltipEvent=\"hover\">{{node.fileSize}}</a>\n              </td>\n              <td><a pTooltip=\"{{node.fileLastModificationTime}}\" tooltipPosition=\"bottom\"\n                  tooltipEvent=\"hover\">{{node.fileLastModificationTime}}</a></td>\n            </tr>\n          </ng-template>\n          <ng-template pTemplate=\"emptymessage\">\n            <tr>\n              <td style=\"text-align: center\" [attr.colspan]=\"6\"> No records found </td>\n            </tr>\n          </ng-template>\n        </p-table>\n      </div>\n      <div class=\"p-grid p-justify-center p-align-center py-5\">\n        <button pButton type=\"button\" (click)=\"removeFlightRecording()\" label=\"Remove Recording File\"\n          class='mx-6 ui-btn-primary'></button>\n        <button pButton type=\"button\" (click)=\"stopFlightRecording()\" label=\"Stop Recording\"\n          class='mx-6 ui-btn-primary'></button>\n        <button pButton type=\"button\" (click)=\"showFlightRecording()\" label=\"Refresh\"\n          class='mx-6 ui-btn-primary'></button>\n        <button pButton type=\"button\" (click)=\"closeFlightRecording()\" label=\"Close\"\n          class='mx-6 ui-btn-primary'></button>\n      </div>\n    </p-dialog>\n\n\n    <p-dialog [modal]=\"true\" class=\"secondary-dialog foterDialog\" styleClass=\"leak-analyzer\" header=\"Memory Leak Analyzer\"\n      [(visible)]=\"showMemLeakTab\" [style]=\"{width: '80vw'}\"  [responsive]=\"true\" positionTop=\"20\"\n      (onHide)=\"onClose($event)\">\n      <div class=\"loading-indicator pageLoading\" *ngIf=\"loading\">\n        <p-progressSpinner [style]=\"{width: '50px', height: '50px'}\" strokeWidth=\"4\" animationDuration=\".5s\">\n        </p-progressSpinner>\n      </div>\n      <div class=\"ddr-fieldset\">\n        <p-fieldset class=\"scenario\" legend=\"Settings\">\n          \n          <!-- Tabular View -->\n          <div class=\"ui-g-12 p-grid p-align-center\" *ngIf=\"tabView\">\n            <span class=\"p-col-fixed\">\n              <label>Sample Interval in sec(s)</label>\n            </span>\n            <span class=\"ui-g-1\">\n              <input minlength=\"1\" [(ngModel)]=\"interval\" class=\"w-100-p\" pInputText />\n            </span>\n            <span class=\"p-col-fixed\">\n              <button pButton type=\"button\" (click)=\"apply()\" label=\"Apply\" class='ui-btn-primary'></button>\n            </span>\n\n            <div class=\"p-grid p-col p-align-center p-justify-end\">\n              <!-- <img src=\"./images/resetDelta.png\" style=\"height:15px; width:15px;float:right;cursor:pointer;\" title=\"Reset\" (click)=\"resetDelta()\"> -->\n              <!--   <div class=\"span-delta-img\"> <label class=\"icon delta-img ddrui-icon-delta\" title=\"Reset the instance count and size deltas\" (click)=\"resetDelta()\"> </label></div> -->\n              <p-button type=\"button\" styleClass=\"width-34 mx-3 ui-button-secondary\"\n                icon=\"icons8 icons8-sync-settings\" title=\"Reset the instance count and size deltas\"\n                (click)=\"resetDelta()\"></p-button>\n              <p-button type=\"button\" styleClass=\"width-34 mx-3 ui-button-secondary\"\n                icon=\"icons8 icons8-synchronize\" (click)='refresh()'\n                title='Refresh the data, without storing trends Memory Leak sample'></p-button>\n              <p-button type=\"button\" styleClass=\"width-34 mx-3 ui-button-secondary\" [disabled]=\"isPause\"\n                icon=\"icons8 icons8-pause\" (click)='pause()'\n                title='Pause updating the data, but continue analysis in the background'></p-button>\n              <p-button type=\"button\" styleClass=\"width-34 mx-3 ui-button-secondary\" [disabled]=\"isPlay\"\n                icon=\"las-dot-circle text-danger font-21 font-weight-500\" (click)='play()' [disabled] = \"isNonAdmin\" title='Start trends analysis of Memory Leak'></p-button>\n              <p-button type=\"button\" styleClass=\"width-34 mx-3 ui-button-secondary\" [disabled]=\"isStop\"\n                icon=\"las-stop-circle-solid\" (click)='stop()' title='Stop trends analysis of Memory Leak'></p-button>\n    </div>\n          </div>\n\n          <!-- Chart View -->\n          <div class=\"ui-g-12 p-grid p-align-center\" *ngIf=\"chartView\">\n            <div class=\"p-col-fixed\"><label>Sample Interval in sec(s)</label></div>\n            <div class=\"p-col-1\"><input  minlength=\"1\" [(ngModel)]=\"interval\" style=\"width:80px;\" pInputText />\n            </div>\n            <div class=\"p-col\"><button pButton type=\"button\" (click)=\"apply()\" label=\"Apply\"\n                class='ui-btn-primary'></button></div>\n          </div>\n\n          <!-- Compare -->\n          <div class=\"ui-g-12 p-grid p-align-center\" *ngIf=\"compareView\">\n            <div class=\"p-col-fixed\"><label>Sample Count</label></div>\n            <div class=\"p-col-1\"><input  minlength=\"1\" [(ngModel)]=\"sampleCount\" class=\"w-100-p\"\n                pInputText /></div>\n            <div class=\"p-col-fixed\">Sample Interval in sec(s)</div>\n            <div class=\"p-col-1\"><input  minlength=\"1\" [(ngModel)]=\"interval\" class=\"w-100-p\" pInputText />\n            </div>\n            <div class=\"p-col\"><button pButton type=\"button\" (click)=\"apply()\" label=\"Apply\"\n                class='ui-btn-primary'></button></div>\n          </div>\n\n        </p-fieldset>\n      </div>\n      <p-tabView class=\"scenTab\" (onChange)=\"tabViewTab($event)\">\n        <p-tabPanel header=\"Tabular View\" [selected]=\"true\">\n          <div>\n            <cav-table [value]=\"memLeakData\" [headerRelativePath]=\"relativePath\" [scrollable]=\"true\" scrollHeight=\"148px\" >\n            </cav-table>\n\n          </div>\n        </p-tabPanel>\n\n\n        <p-tabPanel header=\"Chart View\">\n          <div class='div-borader' style=\"overflow:auto\">\n            <div class=\"ddr-graphpanel\">\n              <highcharts-chart [Highcharts]=\"highcharts\" [options]=\"Options\"></highcharts-chart>\n            </div>\n          </div>\n        </p-tabPanel>\n        <p-tabPanel header=\"Compare\">\n          <div class='div-borader'>\n            <div class=\"ddr-graphpanel\" *ngIf = \"samlpleArrList.length == 1\">\n              <highcharts-chart  [Highcharts]=\"highcharts\" [options]=\"options1\"></highcharts-chart>\n            </div>\n            <div class=\"ddr-graphpanel\" *ngIf = \"samlpleArrList.length == 2\">\n              <highcharts-chart [Highcharts]=\"highcharts\" [options]=\"options2\"></highcharts-chart>\n            </div>\n            <div class=\"ddr-graphpanel\" *ngIf = \"samlpleArrList.length == 3\">\n              <highcharts-chart [Highcharts]=\"highcharts\" [options]=\"options2\"></highcharts-chart>\n            </div>\n            <div class=\"ddr-graphpanel\" *ngIf = \"samlpleArrList.length == 4\">\n              <highcharts-chart [Highcharts]=\"highcharts\" [options]=\"options2\"></highcharts-chart>\n            </div>\n            <div class=\"ddr-graphpanel\" *ngIf=\"samlpleArrList.length != 1 && samlpleArrList.length != 2 && samlpleArrList.length != 3 && samlpleArrList.length != 4\">\n              <highcharts-chart [Highcharts]=\"highcharts\" [options]=\"options2\"></highcharts-chart>\n            </div>\n          </div>\n        </p-tabPanel>\n      </p-tabView>\n    </p-dialog>\n\n\n    <p-dialog class=\"secondary-dialog confirmdialog\" header=\"Delete Confirmation\" [(visible)]=\"confirmationPopup\" width=\"400\"\n      [responsive]=\"true\">\n      <label>Do you want to delete current recording from NDE box?</label>\n      <p-footer>\n        <div>\n          <button pButton type=\"button\" (click)=\"removeFile()\" label=\"Yes\" class='mh-10 ui-btn-primary'></button>\n          <button pButton (click)=\"confirmationPopup = false\" type=\"button\" label=\"No\"\n            class='mh-10 ui-button-secondary'></button>\n        </div>\n      </p-footer>\n    </p-dialog>\n    <!-- <p-growl life=\"60000\"  [(value)]=\"_message\"></p-growl> -->\n    <!-- <p-toast></p-toast> -->\n\n  </div>\n</div>\n<app-help #help></app-help>\n\n\n");

/***/ }),

/***/ "./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.component.scss":
/*!******************************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.component.scss ***!
  \******************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("");

/***/ }),

/***/ "./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.component.ts":
/*!****************************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.component.ts ***!
  \****************************************************************************************************/
/*! exports provided: MemleakAnalyzerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MemleakAnalyzerComponent", function() { return MemleakAnalyzerComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var _common_action_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common-action.service */ "./src/app/pages/tools/actions/common-action.service.ts");
/* harmony import */ var src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/shared/cav-toast/service/cav-message.service */ "./src/app/shared/cav-toast/service/cav-message.service.ts");
/* harmony import */ var _tier_server_info_tier_server_info_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../tier-server-info/tier-server-info.component */ "./src/app/pages/tools/actions/tier-server-info/tier-server-info.component.ts");
/* harmony import */ var src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/shared/cav-nav-bar/cav-nav-bar.service */ "./src/app/shared/cav-nav-bar/cav-nav-bar.service.ts");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var _admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../admin/access-control-management/constants/cav-acl-features.constants */ "./src/app/pages/tools/admin/access-control-management/constants/cav-acl-features.constants.ts");
/* harmony import */ var _admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../admin/access-control-management/services/cav-acl-util */ "./src/app/pages/tools/admin/access-control-management/services/cav-acl-util.ts");










let MemleakAnalyzerComponent = class MemleakAnalyzerComponent {
    constructor(router, commonActionServiceObj, messageService, cavNavBarService, sessionService) {
        this.router = router;
        this.commonActionServiceObj = commonActionServiceObj;
        this.messageService = messageService;
        this.cavNavBarService = cavNavBarService;
        this.sessionService = sessionService;
        this.isAnalyzer = false;
        this.isAdmin = false;
        this.cavNavBarService.showNavBar = false;
    }
    ngOnInit() {
        this.isAdmin = this.sessionService.isFeatureWrite(_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_8__["CAV_FEATURES"].DIAGNOSTIC_TOOLS.NAME, _admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_8__["CAV_FEATURES"].DIAGNOSTIC_TOOLS.SUB_FEATURES.MEMORY_LEAK_ANALYZER);
        this.breadcrumbItems = [
            {
                label: 'Home', command: () => {
                    this.router.navigateByUrl('/home/dashboard');
                }
            },
            {
                label: 'Memory Leak Analyzer',
            },
        ];
    }
    //Method called when start memory leak analyzer button is clicked.
    startMemoryLeak() {
        let validateMsg = this.commonActionServiceObj.validateTarget();
        if (validateMsg) {
            this.messageService.add({ severity: "error", summary: "ERROR", detail: validateMsg });
            return;
        }
        this.isAnalyzer = true;
        // add setTimeout as UI was not calling NgOnit method immediately as soon as dialog opened so list of filter were comming empty.
        setTimeout(() => {
            this.commonActionServiceObj.startMemLeak(true);
        }, 0);
    }
    //Method called when RESET button is clicked.
    resetMemLeak() {
        this.tierChild.clearField();
    }
    ngOnDestroy() {
        this.cavNavBarService.showNavBar = true;
    }
};
MemleakAnalyzerComponent.ctorParameters = () => [
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
    { type: _common_action_service__WEBPACK_IMPORTED_MODULE_3__["CommonActionService"] },
    { type: src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_4__["CavMessageService"] },
    { type: src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_6__["CavNavBarService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__["SessionService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(_tier_server_info_tier_server_info_component__WEBPACK_IMPORTED_MODULE_5__["TierServerInfoComponent"])
], MemleakAnalyzerComponent.prototype, "tierChild", void 0);
MemleakAnalyzerComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-memleak-analyzer',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./memleak-analyzer.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.component.html")).default,
        providers: [{ provide: _admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_9__["ACL_PROPS"], useFactory: _admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_9__["getDiagnosticToolsMemoryLeakAnalyzerACLProps"] }],
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./memleak-analyzer.component.scss */ "./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.component.scss")).default]
    })
], MemleakAnalyzerComponent);



/***/ }),

/***/ "./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.module.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.module.ts ***!
  \*************************************************************************************************/
/*! exports provided: MemleakAnalyzerModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MemleakAnalyzerModule", function() { return MemleakAnalyzerModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
/* harmony import */ var _memleak_analyzer_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./memleak-analyzer.component */ "./src/app/pages/tools/actions/mission-control/memleak-analyzer/memleak-analyzer.component.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/shared/help/help.module */ "./src/app/shared/help/help.module.ts");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var src_app_shared_cav_toolbar_cav_toolbar_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/shared/cav-toolbar/cav-toolbar.module */ "./src/app/shared/cav-toolbar/cav-toolbar.module.ts");
/* harmony import */ var _tier_server_info_tier_server_info_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../tier-server-info/tier-server-info.module */ "./src/app/pages/tools/actions/tier-server-info/tier-server-info.module.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");
/* harmony import */ var _mission_control_module__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../mission-control.module */ "./src/app/pages/tools/actions/mission-control/mission-control.module.ts");
/* harmony import */ var src_app_shared_cav_toast_cav_toast_module__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/app/shared/cav-toast/cav-toast.module */ "./src/app/shared/cav-toast/cav-toast.module.ts");













const routes = [
    {
        path: '',
        component: _memleak_analyzer_component__WEBPACK_IMPORTED_MODULE_3__["MemleakAnalyzerComponent"],
    },
];
const imports = [
    _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["ToolbarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["ButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["InputTextModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["DropdownModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["BreadcrumbModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["MenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["InputSwitchModule"],
    _angular_forms__WEBPACK_IMPORTED_MODULE_7__["FormsModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["TableModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["DialogModule"],
    src_app_shared_cav_toolbar_cav_toolbar_module__WEBPACK_IMPORTED_MODULE_8__["CavToolbarModule"],
    _tier_server_info_tier_server_info_module__WEBPACK_IMPORTED_MODULE_9__["TierServerInfoModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["BreadcrumbModule"],
    src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_5__["HelpModule"],
    primeng__WEBPACK_IMPORTED_MODULE_6__["PanelModule"],
    src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_10__["CavTableModule"],
    src_app_shared_cav_toast_cav_toast_module__WEBPACK_IMPORTED_MODULE_12__["CavToastModule"],
    _mission_control_module__WEBPACK_IMPORTED_MODULE_11__["MissionControlModule"]
];
const components = [_memleak_analyzer_component__WEBPACK_IMPORTED_MODULE_3__["MemleakAnalyzerComponent"]];
let MemleakAnalyzerModule = class MemleakAnalyzerModule {
};
MemleakAnalyzerModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [components],
        imports: [_angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"].forChild(routes), imports],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"]],
    })
], MemleakAnalyzerModule);



/***/ }),

/***/ "./src/app/pages/tools/actions/mission-control/mission-control.component.scss":
/*!************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/mission-control/mission-control.component.scss ***!
  \************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("app-mission-control .template-container .btn-spacing {\n  margin-right: 10px;\n}\napp-mission-control .template-container .ui-secondary-toolbar .ui-toolbar .ui-dropdown {\n  background: #1d5290;\n  border: 1px solid #1d5290;\n  color: #ffffff;\n  min-width: 80px;\n}\napp-mission-control .template-container .ui-secondary-toolbar .ui-toolbar .ui-dropdown .ui-dropdown-label {\n  color: #ffffff;\n  background: #1d5290;\n}\napp-mission-control .template-container .ui-secondary-toolbar .ui-toolbar .ui-dropdown .ui-dropdown-trigger {\n  background-color: #1d5290;\n  width: 2em;\n  line-height: 2em;\n  text-align: center;\n  padding: 0;\n  color: #ffffff;\n}\napp-mission-control .template-container .action-container .dropdowndisplay {\n  display: flex;\n  align-items: center;\n  padding: 10px 20px;\n}\napp-mission-control .template-container .action-container .dropdowndisplay .display2 {\n  display: flex;\n  align-items: center;\n}\napp-mission-control .template-container .action-container .dropdowndisplay .label-size {\n  font-size: 16px;\n  font-weight: 500;\n}\napp-mission-control .template-container .action-container .dropdowndisplay .lable-size2 {\n  font-size: 16px;\n  font-weight: 500;\n  margin-left: 10px;\n}\napp-mission-control .template-container .action-container .spacing {\n  margin-left: 20px;\n}\napp-mission-control .template-container .action-container .addgraph {\n  font-size: 1.5em;\n  margin-top: -2px;\n}\napp-mission-control .template-container .action-container .input-field-search {\n  width: 80%;\n  padding-left: 25px;\n}\napp-mission-control .template-container .action-container .labels {\n  margin: 0px 10px;\n}\napp-mission-control .template-container .action-container i.filter-icon {\n  font-size: 1.5em;\n  color: #1d5290;\n  margin: 0 10px;\n  line-height: 30px;\n}\napp-mission-control .template-container .action-container .search-div-css {\n  position: relative;\n}\napp-mission-control .template-container .action-container .search-div-css i {\n  font-size: 1.5em;\n  position: absolute;\n  color: #1d5290;\n  top: 7px;\n  left: 7px;\n}\napp-mission-control .template-container .action-container .ui-multiselect {\n  border: none;\n  padding: 12px;\n  background: transparent;\n}\napp-mission-control .template-container .action-container .ui-multiselect .ui-helper-hidden-accessible {\n  display: none;\n}\napp-mission-control .template-container .action-container .ui-multiselect .ui-multiselect-label {\n  display: none;\n}\napp-mission-control .template-container .action-container .ui-multiselect .ui-multiselect-trigger {\n  margin-top: 1px;\n  background-color: transparent;\n}\napp-mission-control .template-container .action-container .ui-multiselect .ui-multiselect-trigger .ui-multiselect-trigger-icon {\n  font-size: 1.5em;\n}\napp-mission-control .template-container .action-container .icons-container {\n  display: flex;\n  flex-direction: row-reverse;\n}\napp-mission-control .template-container .action-container .icons-container i {\n  font-size: 1.5em;\n}\napp-mission-control .template-container .ui-dropdown .ui-dropdown-trigger .ui-dropdown-trigger-icon {\n  font-size: 1.25em;\n}\napp-mission-control .template-container .ui-paginator-current {\n  float: left;\n}\napp-mission-control .template-container .edit-row {\n  color: #1d5290;\n  font-size: 15px;\n}\napp-mission-control .template-container .add-template {\n  margin-right: 15px;\n}\napp-mission-control .template-container .global-search-block {\n  width: 40%;\n}\napp-mission-control .template-container .info-section {\n  height: 30%;\n  width: 100%;\n}\napp-mission-control .template-container .info-section .view-data {\n  border: 1px solid #cecece;\n  overflow: auto;\n  height: calc(100% - 80px);\n  margin: 0px 10px;\n}\napp-mission-control .process-arguments {\n  text-align: left;\n  word-break: break-all;\n  margin-top: 10px;\n  border-style: solid;\n  overflow: auto;\n  max-height: 170px;\n  border-width: 1px;\n  line-height: 21px;\n}\n.leak-analyzer {\n  max-width: 90%;\n}\n.flight-record {\n  max-width: 75%;\n}");

/***/ }),

/***/ "./src/app/pages/tools/actions/mission-control/mission-control.component.ts":
/*!**********************************************************************************!*\
  !*** ./src/app/pages/tools/actions/mission-control/mission-control.component.ts ***!
  \**********************************************************************************/
/*! exports provided: MissionControlComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MissionControlComponent", function() { return MissionControlComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
/* harmony import */ var _ddr_data_model_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ddr-data-model.service */ "./src/app/pages/tools/actions/ddr-data-model.service.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! highcharts */ "./node_modules/highcharts/highcharts.js");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/shared/cav-nav-bar/cav-nav-bar.service */ "./src/app/shared/cav-nav-bar/cav-nav-bar.service.ts");
/* harmony import */ var _common_action_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common-action.service */ "./src/app/pages/tools/actions/common-action.service.ts");
/* harmony import */ var _memory_profiler_revamp_services_memory_profiler_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../memory-profiler-revamp/services/memory-profiler-service */ "./src/app/pages/tools/actions/memory-profiler-revamp/services/memory-profiler-service.ts");
/* harmony import */ var _admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../admin/access-control-management/constants/cav-acl-features.constants */ "./src/app/pages/tools/admin/access-control-management/constants/cav-acl-features.constants.ts");
/* harmony import */ var src_app_app_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! src/app/app.service */ "./src/app/app.service.ts");



// import { MatDialog } from '@angular/material';
// import { Logger } from '../../../../../vendors/angular2-logger/core';
// import { CavTopPanelNavigationService } from '../../../../main/services/cav-top-panel-navigation.service';


// import { CavConfigService } from '../../../../main/services/cav-config.service';
// import {  } from 'primeng/primeng';

// import { ChartModule } from 'angular2-highcharts';
// import { Highcharts } from '../../constants/common-constants';
// import { Observable } from 'rxjs/Observable';
// import { interval } from 'rxjs/observable/interval';









let MissionControlComponent = class MissionControlComponent {
    constructor(sessionService, mpServiceObj, 
    // private log: Logger, private dialog: MatDialog,
    // private _navService: CavTopPanelNavigationService,
    http, id, 
    // private _cavConfigService: CavConfigService,
    route, messageService, appService, commonActionService, cavNavBarService) {
        this.sessionService = sessionService;
        this.mpServiceObj = mpServiceObj;
        this.http = http;
        this.id = id;
        this.route = route;
        this.messageService = messageService;
        this.appService = appService;
        this.commonActionService = commonActionService;
        this.cavNavBarService = cavNavBarService;
        this.highcharts = highcharts__WEBPACK_IMPORTED_MODULE_6__;
        this.showTable = 0;
        this.showAll = false;
        this.showThreadDumpOption = false;
        this.selectedDcVal = "";
        this.selectedInstanceInfo = [];
        this.isNDCase = false;
        this.isChecked = false;
        this.instanceDetail = [{ "pid": "", "appName": "", "arguments": "", "status": "" }];
        this.selectedRowIndex = 0;
        this.isCompressed = false;
        this.disableMsg = true;
        this.display = false;
        this.showDialog = false;
        this.maxTimeOut = 10;
        this.interval = 60;
        this.sampleCount = 2;
        this.checkCmdArgs = true;
        this.startFlight = false;
        this.showFlight = false;
        this.showMemLeak = false;
        this.tabView = true;
        this.chartView = false;
        this.compareView = false;
        this.fileName = '/tmp/';
        this.selectedTime = 'Second(s)';
        this.selectedSize = 'MB';
        this.fileSize = '';
        this.isOverwrite = false;
        this.checkMaxTimeOut = true;
        this.selectedValues = ['checkMaxTimeOut'];
        this.timeLimitForMessage = 15000;
        this.maxTime = 10;
        this.confirmationPopup = false;
        this.showMemLeakTab = false;
        this.samlpleArrList = [];
        this.isPlay = true;
        this.isPause = false;
        this.isStop = false;
        this.loading = false;
        this.loading1 = false;
        this.loader = false;
        this.isDisabled = true;
        this.isNonAdmin = false;
        this.relativePath = "diagnosticTools/memory-leak/memory-leak-analyzer.json";
        /*Observable for update message sources.*/
        this._messageObser = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
        /*Service Observable for getting update message.*/
        this.messageProvider$ = this._messageObser.asObservable();
        this.cavNavBarService.showNavBar = false;
        this.headerName = this.route.snapshot.paramMap.get('name');
        if (this.headerName == 'mission_control') {
            this.featureName = 'Memory Leak Analyzer';
        }
        else {
            this.featureName = 'Java Flight Recording';
        }
    }
    /*Service message commands.*/
    messageEmit(message) {
        this._messageObser.next(message);
    }
    ngOnDestroy() {
        if (this.missionControlMsgSubscription !== null && this.missionControlMsgSubscription !== undefined) {
            this.missionControlMsgSubscription.unsubscribe();
        }
        if (this.updateData && null !== this.updateData)
            this.updateData.unsubscribe();
        this.cavNavBarService.showNavBar = true;
        if (this.changeOTypeSubscription != null)
            this.changeOTypeSubscription.unsubscribe();
    }
    ngOnInit() {
        this.showMemLeakTab = this.isFromRevamp;
        this.changeOTypeSubscription = this.commonActionService.$startMemLeakAnalyzer.subscribe((res) => {
            if (res) {
                this.startMemLeakAnalyzer();
            }
        });
        this.jfCols = [
            { field: 'col1', header: 'Tier', width: '11%' },
            { field: 'col2', header: 'Server', width: '11%' },
            { field: 'col3', header: 'Instance', width: '11%' },
            { field: 'col4', header: 'Time', width: '11%' },
            { field: 'col5', header: 'UserName', width: '11%' },
            { field: 'col6', header: 'File Path at NDE', width: '22%' },
            { field: 'col7', header: 'File Path at Server', width: '15%' },
            { field: 'col8', header: 'Actions', width: '8%' },
        ];
        this.isNonAdmin = !(this.sessionService.isFeatureWrite(_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_12__["CAV_FEATURES"].DIAGNOSTIC_TOOLS.NAME, _admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_12__["CAV_FEATURES"].DIAGNOSTIC_TOOLS.SUB_FEATURES.MEMORY_LEAK_ANALYZER));
        if (this.isNonAdmin) {
            if (this.featureName == 'Memory Leak Analyzer') {
                setTimeout(() => this.messageService.add({ severity: 'info', detail: "User does not have permission to start Memory Leak Analyzer" }), 3000);
            }
            else {
                setTimeout(() => this.messageService.add({ severity: 'info', detail: "User does not have permission to start Java Flight Recording" }), 3000);
            }
        }
        this.productKey = this.sessionService.session.cctx.pk;
        // this.headerName = this.id.featureName;
        this.productType = this.sessionService.session.cctx.prodType;
        this.productType = this.productType.toLowerCase();
        this.userName = this.sessionService.session.cctx.u;
        this.testRun = this.sessionService.session.testRun.id;
        this.dcData = this.sessionService.preSession.dcData;
        if (this.headerName == 'mission_control') {
            this.showMemLeak = true;
        }
        this.getTierServerList();
        this.missionControlMsgSubscription = this.messageProvider$.subscribe(data => this.messageService.add(data));
    }
    showNotification(result) {
        this.loading1 = false;
        this.loader = false;
        this.disableMsg = false;
        if (!result) {
            this.id.setInLogger("", "Java Flight Recording", "Java Flight Recording Started", "Unable to open window since no response coming from agent");
            this.errorMessage("Unable to open window since no response coming from agent");
        }
        if (result[0].startsWith("Pass")) {
            // this.startFlight = false;
            this.id.setInLogger("", "Java Flight Recording", "Java Flight Recording Started", "" + result[0].split(":")[2]);
            this.multiSuccessMessage(result[0].split(":")[2], result[0].split(":")[1]);
        }
        if (result[0].startsWith("Fail")) {
            // this.startFlight = false;
            if (result[0].split(":")[3] && result[0].split(":")[2]) {
                this.id.setInLogger("", "Java Flight Recording", "Java Flight Recording Started", "" + result[0].split(":")[2] + result[0].split(":")[3]);
                this.multiErrorMessage(result[0].split(":")[2] + result[0].split(":")[3], result[0].split(":")[1]);
            }
            else if (result[0].split(":")[2]) {
                this.id.setInLogger("", "Java Flight Recording", "Java Flight Recording Started", "" + result[0].split(":")[2]);
                this.multiErrorMessage(result[0].split(":")[2], result[0].split(":")[1]);
            }
        }
    }
    getTierServerList() {
        this.showTable = 0;
        this.selectedServerVal = '';
        this.selectedTierVal = '';
        this.showThreadDumpOption = false;
        var hostDcName = "";
        if (this.sessionService.preSession.multiDc === true) {
            hostDcName = this.id.getSelectedDCHostUrl("node");
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        var url = this.getHostUrl() + "/DashboardServer/v2/monitor/topology/getTiers?tr=" + this.testRun + "&topoName=default";
        return this.appService.fetchData(url).subscribe(data => (this.setTierValues(data)));
    }
    getHostUrl() {
        var hostDcName;
        if (this.sessionService.preSession.multiDc === true) {
            hostDcName = location.protocol + "//" + location.host + "/node" + "/ALL";
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        return hostDcName;
    }
    setTierValues(jsondata) {
        if (jsondata != null && jsondata.status) {
            this.tiers = [];
            this.selectedTierVal = "";
            this.servers = [];
            this.selectedServerVal = "";
            this.tiers.push({ label: "-- Select Tier --", value: null });
            jsondata.data.forEach((tier) => {
                this.tiers.push({ label: tier['tName'], value: tier['tName'] });
            });
        }
        else {
            this.messageService.add({ severity: 'error', summary: 'ERROR', detail: jsondata.error });
        }
    }
    getSelectedServerNodeName(serverIp) {
        // Find the server data object that matches the extracted IP
        const obj = this.serverData['data'].find(item => item['serverIP'] === serverIp);
        if (obj && obj['clusters']) {
            this.selectedDcVal = obj['clusters'][0]['cname'];
        }
        else {
            console.log(`Object with sName ${this.selectedServerVal} doesn't exist or doesn't have a cluster.`);
        }
    }
    getJavaInstances() {
        var tr = this.testRun;
        this.instanceInfo = [];
        this.selectedInstanceInfo = undefined;
        this.isNDCase = false;
        let serverIp = "";
        if (!this.selectedTierVal) {
            this.errorMessage("Please select valid tier name");
            return;
        }
        if (!this.selectedServerVal) {
            this.errorMessage("Please select valid server name");
            return;
        }
        this.loading1 = true;
        if (this.selectedServerVal.indexOf('(') != -1) {
            serverIp = this.selectedServerVal.match(/\(([^)]+)\)/)[1];
            this.serverNameforTD = this.selectedServerVal.substring(this.selectedServerVal.indexOf('(') + 1, this.selectedServerVal.indexOf(')'));
        }
        else {
            this.serverNameforTD = this.selectedServerVal;
        }
        var hostDcName = "";
        if (this.sessionService.preSession.multiDc === true) {
            this.getSelectedServerNodeName(serverIp);
            hostDcName = this.id.getSelectedDCHostUrl("tomcat", this.selectedDcVal);
            for (let i = 0; i < this.dcData.length; i++) {
                if (this.selectedDcVal === this.dcData[i].name) {
                    tr = this.dcData[i]['testRun']['id'];
                }
            }
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        var url = hostDcName + '/' + this.productType + "/v1/cavisson/netdiagnostics/ddr/getJavaInstances?server=" + serverIp + "&testRun=" + tr;
        return this.appService.fetchData(url).subscribe(data => (this.doAssignValues(data)));
    }
    getNDInstances() {
        this.instanceInfo = [];
        this.selectedInstanceInfo = undefined;
        this.isNDCase = true;
        let serverIp = "";
        if (!this.selectedTierVal) {
            this.errorMessage("Please select valid tier name");
            return;
        }
        if (!this.selectedServerVal) {
            this.errorMessage("Please select valid server name");
            return;
        }
        this.loading1 = true;
        if (this.selectedServerVal.indexOf('(') != -1) {
            serverIp = this.selectedServerVal.match(/\(([^)]+)\)/)[1];
            this.serverNameforTD = this.selectedServerVal.substring(0, this.selectedServerVal.indexOf('('));
        }
        else {
            this.serverNameforTD = this.selectedServerVal;
        }
        var hostDcName = "";
        if (this.sessionService.preSession.multiDc === true) {
            this.getSelectedServerNodeName(serverIp);
            hostDcName = this.id.getSelectedDCHostUrl("tomcat", this.selectedDcVal);
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        var url = hostDcName + '/' + this.productType + "/v1/cavisson/netdiagnostics/ddr/getNDInstances?server=" + this.serverNameforTD + "&tier=" + this.selectedTierVal;
        return this.appService.fetchData(url).subscribe(data => (this.doAssignValues(data)));
    }
    doAssignValues(res) {
        this.loading1 = false;
        this.showTable = 1;
        this.showThreadDumpOption = true;
        this.instanceDetail = res.data;
        if (this.instanceDetail.toString().startsWith("Unable to get instance") || this.instanceDetail.toString().toLowerCase().includes("error")) {
            this.ErrorResult = this.instanceDetail.toString();
            this.showTable = 0;
            this.showThreadDumpOption = false;
        }
        else {
            this.instanceInfo = this.getInstanceInfo();
            this.showTable = 1;
            this.showThreadDumpOption = true;
        }
    }
    getInstanceInfo() {
        let instArr = [];
        for (var i = 0; i < this.instanceDetail.length; i++) {
            if (this.isNDCase) {
                if (this.instanceDetail[i]["agentType"].trim().toLowerCase() === 'java')
                    instArr[i] = { pid: this.instanceDetail[i]["pid"], appName: this.instanceDetail[i]["appName"], agentType: this.instanceDetail[i]["agentType"], status: this.instanceDetail[i]["status"].replace(",", "") };
            }
            else
                instArr[i] = { pid: this.instanceDetail[i]["pid"], appName: this.instanceDetail[i]["appName"], arguments: this.instanceDetail[i]["arguments"], status: this.instanceDetail[i]["status"].replace(",", "") };
        }
        return instArr;
    }
    onRowSelectData(selectedRowData) {
        this.selectedRowIndex++;
    }
    onRowUnselectData(unSelectedRowData) {
        this.selectedRowIndex--;
        let index = this.selectedInstanceInfo.indexOf(unSelectedRowData);
        if (index !== -1) {
            this.selectedInstanceInfo.splice(index, 1);
        }
    }
    resetData() {
        this.getTierServerList();
        this.selectedInstanceInfo = [];
        this.servers = [];
        this.selectedTierVal = this.tiers[0].value;
        this.servers.push({ label: "", value: "" });
        this.ErrorResult = "";
        this.showTable = 0;
        this.showThreadDumpOption = false;
    }
    close() {
        // try {
        //     this.log.info('Closing JFR window');
        //     // this.showFlight = false;
        //     this.dialog.closeAll();
        // } catch (e) {
        //     this.log.error('Error in closing JFR window', e);
        // }
    }
    ;
    getServerValue(selectedValue) {
        this.isDisabled = false;
        if (this.selectedTierVal == null) {
            this.isDisabled = true;
        }
        this.selectedServerVal = "";
        var hostDcName = "";
        if (this.sessionService.preSession.multiDc === true) {
            hostDcName = this.id.getSelectedDCHostUrl("node");
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        var url = hostDcName + "/DashboardServer/v2/monitor/topology/getServers";
        let payLoad = {
            tier: selectedValue,
            topoName: "default",
            tr: this.testRun,
        };
        if (this.sessionService.preSession.multiDc) {
            payLoad['subject'] = this.id.getPostPayloadSubject(selectedValue);
        }
        return this.appService.submitData(url, payLoad).subscribe(data => (this.createServerArray(data)));
    }
    createServerArray(serverJson) {
        this.serverData = serverJson;
        this.servers = [];
        const uniqueServerNames = new Set();
        this.serverData['data'].forEach((server) => {
            if (server['sName'] === "All" || server['sName'] === "Any") {
                return;
            }
            const serverName = server['uiDName'];
            if (!uniqueServerNames.has(serverName)) {
                uniqueServerNames.add(serverName);
                this.servers.push({ label: serverName, value: serverName });
            }
        });
    }
    openStartFlightRecorder() {
        this.processIDWithInstance = "";
        this.resetAllFields();
        if (this.selectedInstanceInfo != null && Object.keys(this.selectedInstanceInfo).length > 0) {
            this.processIDWithInstance += this.selectedInstanceInfo["pid"] + ":" + this.selectedInstanceInfo["appName"];
            if (this.processIDWithInstance.startsWith(","))
                this.processIDWithInstance = this.processIDWithInstance.substring(1);
            this.selectTime = [];
            this.selectTime.push({ label: 'Second(s)', value: 'Second(s)' });
            this.selectTime.push({ label: 'Minute(s)', value: 'Minute(s)' });
            this.selectTime.push({ label: 'Hour(s)', value: 'Hour(s)' });
            this.selectFileSize = [];
            this.selectFileSize.push({ label: 'KB', value: 'KB' });
            this.selectFileSize.push({ label: 'MB', value: 'MB' });
            this.selectFileSize.push({ label: 'GB', value: 'GB' });
            this.startFlight = true;
        }
        else {
            alert("Please select instance");
            return;
        }
    }
    showFlightRecording() {
        if (!this.selectedInstanceInfo) {
            alert("First select an instance from table to show recording");
            return;
        }
        // this.loading1 = true;
        this.loader = true;
        this.selectedRowInfo = undefined;
        let url = '';
        var tr = this.testRun;
        var hostDcName = "";
        if (this.sessionService.preSession.multiDc === true) {
            hostDcName = this.id.getSelectedDCHostUrl("tomcat", this.selectedDcVal);
            for (let i = 0; i < this.dcData.length; i++) {
                if (this.selectedDcVal === this.dcData[i].name) {
                    tr = this.dcData[i]['testRun']['id'];
                }
            }
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        if (this.selectedInstanceInfo != null && Object.keys(this.selectedInstanceInfo).length > 0) {
            this.processIDWithInstance = this.selectedInstanceInfo["pid"] + ":" + this.selectedInstanceInfo["appName"];
            url = hostDcName + '/' + this.productType + '/v1/cavisson/netdiagnostics/ddr/missionControl?testRun=' + tr + '&userName=' + this.userName + '&isNDCase=' + this.isNDCase + '&pidwithapp=' + this.processIDWithInstance;
        }
        else
            alert("Please select one insatnce to show flight recording");
        if (this.selectedTierVal != null) {
            url += '&tierName=' + this.selectedTierVal;
        }
        if (this.isNDCase) {
            if (this.selectedServerVal != null) {
                if (this.selectedServerVal.indexOf('(') != -1)
                    this.serverNameforTD = this.selectedServerVal.substring(0, this.selectedServerVal.indexOf('('));
                else
                    this.serverNameforTD = this.selectedServerVal;
            }
        }
        else {
            if (this.selectedServerVal.indexOf('(') != -1)
                this.serverNameforTD = this.selectedServerVal.substring(this.selectedServerVal.indexOf('(') + 1, this.selectedServerVal.indexOf(')'));
            else
                this.serverNameforTD = this.selectedServerVal;
        }
        url += '&serverName=' + this.serverNameforTD;
        url += '&operation=show&cmdArgs= -u ' + this.userName;
        this.appService.fetchData(url).subscribe(data => { this.doAssignFlightRecData(data); });
    }
    doAssignFlightRecData(data) {
        if (data && data.frData && data.frData.length > 0 && !isNaN(data.frData[0].fileLastModificationTime)) {
            data.frData[0].fileLastModificationTime = this.sessionService.convertTimestampIntoFormattedString(parseInt(data.frData[0].fileLastModificationTime), "DD/MM/YYYY HH:mm:ss");
        }
        if (data) {
            this.flightData = undefined;
            this.showFlight = true;
        }
        this.flightData = data.frData;
        this.showFlight = true;
        this.showNotification(data.status);
    }
    openFlightRecording() {
        if (this.selectedInstanceInfo != null && Object.keys(this.selectedInstanceInfo).length > 0) {
            this.colsForFlight = [
                { field: 'id', header: 'Recording ID' },
                { field: 'name', header: 'Recording Name' },
                { field: 'status', header: 'Status' },
                { field: 'duration', header: 'Duration' },
                { field: 'file', header: 'Recording File' },
                { field: 'size', header: 'File Size' },
                { field: 'lastmodification', header: 'Last Modification Time' },
                { field: 'compression', header: 'Compression' },
            ];
        }
        else {
            alert('Please select instance');
            return;
        }
    }
    startMemLeakAnalyzer() {
        this.memLeakData = [];
        this.loading = true;
        if (this.commonActionService.selectedInstanceInfo) {
            this.colsForMemLeak = [
                { field: 'objectNameChanged', header: 'Object Type', sortable: 'custom', width: '200', align: 'left' },
                { field: 'growthRate', header: 'Growth Rate (KB/s)', sortable: 'custom', width: '100', align: 'right' },
                { field: 'heapPct', header: 'Heap Usage (in %)', sortable: 'custom', width: '100', align: 'right' },
                { field: 'memorySizeInUnit', header: 'Size (MB)', sortable: 'custom', width: '100', align: 'right' },
                { field: 'deltaSizeInUnit', header: 'Delta Size (KB)', sortable: 'custom', width: '100', align: 'right' },
                { field: 'objCount', header: 'Count', sortable: 'custom', width: '100', align: 'right' },
                { field: 'deltaCount', header: 'Delta Count', sortable: 'custom', width: '100', align: 'right' }
            ];
            this.selectFilter = [];
            this.selectFilter.push({ label: 'Object Type', value: 'Object Type' });
            this.selectFilter.push({ label: 'Growth Rate', value: 'Growth Rate' });
            this.selectFilter.push({ label: 'Heap Usage', value: 'Heap Usage' });
            this.selectFilter.push({ label: 'Size', value: 'Size' });
            this.selectFilter.push({ label: 'Delta Size', value: 'Delta Size' });
            this.selectFilter.push({ label: 'Count', value: 'Count' });
            this.selectFilter.push({ label: 'Delta Count', value: 'Delta Count' });
            this.selectOperation = [];
            this.selectOperation.push({ label: '>', value: 'greater' });
            this.selectOperation.push({ label: '>=', value: 'greaterequal' });
            this.selectOperation.push({ label: '<', value: 'less' });
            this.selectOperation.push({ label: '<=', value: 'lessequal' });
            this.selectOperation.push({ label: '==', value: 'equal' });
            this.showMemLeakTab = true;
            this.startMemLeakTimer();
        }
        else {
            this.loading = false;
            alert('Please select instance');
            return;
        }
    }
    refresh() {
        this.loading = true;
        this.play();
    }
    resetDelta() {
        this.memLeakData.forEach((val, index) => {
            val['deltaCount'] = '0';
            val['deltaSizeInUnit'] = '0';
        });
    }
    pause() {
        this.isPause = true;
        this.isPlay = false;
    }
    play() {
        this.isPlay = true;
        this.isPause = false;
        this.isStop = false;
        this.startMemLeakTimer();
    }
    stop() {
        this.isPause = true;
        this.isStop = true;
        this.isPlay = false;
        this.updateData.unsubscribe();
    }
    getMemLeakData(CallTime) {
        var tr = this.testRun;
        if (!this.selectedInstanceInfo) {
            this.loading = false;
            alert('First select an instance from table to show recording');
            return;
        }
        this.selectedRowInfo = undefined;
        let url = '';
        let strCmdArgs = '';
        // var hostDcName="";
        // if (this.sessionService.preSession.multiDc === true) {
        //     this.getSelectedServerNodeName(this.selectedServerVal.match(/\(([^)]+)\)/)[1]);
        //     hostDcName = this.id.getSelectedDCHostUrl("tomcat", this.selectedDcVal);
        //     for(let i = 0; i<this.dcData.length; i++){
        //       if(this.selectedDcVal === this.dcData[i].name){
        //         tr = this.dcData[i]['testRun']['id'];
        //       }
        //     }
        // } else {
        //     hostDcName = this.id.getHostUrl();
        // }
        if (this.commonActionService.selectedInstanceInfo['appAgentEnabled']) {
            if (this.commonActionService.selectedServerVal != null) {
                if (this.commonActionService.selectedServerVal['uiDName'].indexOf('(') !== -1) {
                    this.serverNameforTD = this.commonActionService.selectedServerVal['uiDName'].substring(0, this.commonActionService.selectedServerVal['uiDName'].indexOf('('));
                }
                else {
                    this.serverNameforTD = this.commonActionService.selectedServerVal['serverIP'];
                }
            }
        }
        else {
            if (this.commonActionService.selectedServerVal['uiDName'].indexOf('(') != -1) {
                this.serverNameforTD = this.commonActionService.selectedServerVal['uiDName'].substring(this.commonActionService.selectedServerVal['uiDName'].indexOf('(') + 1, this.commonActionService.selectedServerVal['uiDName'].indexOf(')'));
            }
            else {
                this.serverNameforTD = this.commonActionService.selectedServerVal['serverIP'];
            }
        }
        //   if (this.firstMemLeakData != null && this.firstMemLeakData !== undefined) {
        //     var filename = this.firstMemLeakData.fileName;
        //     // url+= '&fileName=' + filename + '&firstExecutionTime=' + this.firstMemLeakData.firstExecutionTime;
        // }
        let apiData = {};
        apiData['tr'] = this.testRun;
        apiData['user'] = this.userName;
        apiData['tier'] = this.commonActionService.selectedTierVal;
        apiData['serverN'] = this.serverNameforTD;
        apiData['instance'] = this.commonActionService.selectedInstanceInfo['instance'];
        apiData['pid'] = this.commonActionService.selectedInstanceInfo['pid'];
        apiData['appAgentEnabled'] = this.commonActionService.selectedInstanceInfo['appAgentEnabled'];
        apiData['fileName'] = this.firstMemLeakData ? this.firstMemLeakData.fileName : null;
        this.mpServiceObj.startMemoryLeak(apiData, this.firstMemLeakData).subscribe(res => {
            this.doAssignMemLeakData(res, CallTime);
            this.loading = false;
        });
    }
    doAssignMemLeakData(data, callTime) {
        this.loading = false;
        if (data['listData'].length == 0) {
            this.errorMessage("Machine Agent is not connected with ND Server. Please check.");
        }
        if (data.errorMsg && data.errorMsg != "") {
            this.errorMessage(data.errorMsg);
            this.updateData.unsubscribe();
            this.showMemLeakTab = false;
            return;
        }
        if (callTime === 0) {
            this.firstMemLeakData = data;
        }
        if (!this.isPause) {
            this.memLeakData = data.listData;
            this.getChartData(JSON.parse(JSON.stringify(this.memLeakData)), callTime);
        }
    }
    apply() {
        this.loading = true;
        this.play();
    }
    getChartData(pieData, callTime) {
        pieData = pieData.sort((a, b) => (a.heapPct > b.heapPct) ? -1 : 1);
        let pieArr = [];
        let barArr = [];
        let barXArr = [];
        if (pieData.length !== 0 && pieData.length > 10) {
            for (let i = 0; i < pieData.length; i++) {
                if (i === 10) {
                    break;
                }
                pieArr.push({ 'name': pieData[i].objectNameChanged, 'y': pieData[i].heapPct });
                barArr.push(pieData[i].heapPct);
                barXArr.push(pieData[i].objectNameChanged);
            }
        }
        let dateTimeFormat = new Date();
        let format = dateTimeFormat.getDate() + '/' + dateTimeFormat.getMonth() + ' '
            + dateTimeFormat.getHours() + ':' + dateTimeFormat.getMinutes() + ':' + dateTimeFormat.getSeconds();
        let seriesObj = {};
        seriesObj['name'] = 'Sample' + (callTime + 1) + ' (' + format + ')';
        seriesObj['data'] = barArr;
        this.samlpleArrList.push(seriesObj);
        let sampleArrCount = this.samlpleArrList.length;
        if (this.sampleCount < sampleArrCount) {
            this.samlpleArrList.splice(0, 1);
        }
        var removeSample = 'Sample' + (callTime + 1);
        if (this.samlpleArrList.length > 0) {
            for (let k = 0; k < this.samlpleArrList.length; k++) {
                let key = this.samlpleArrList[k];
                if (key.hasOwnProperty('_colorIndex')) {
                    delete key['_colorIndex'];
                }
            }
        }
        for (let j = 0; j < this.sampleCount; j++) {
            let sample = 'Sample' + (j + 1);
            if (this.samlpleArrList.hasOwnProperty('name')) {
                this.samlpleArrList['name'] = this.samlpleArrList['name'].replace(removeSample, sample);
            }
        }
        // if (this.samlpleArrList.length == 2) {
        this.options2 = {
            chart: {
                type: 'column',
                width: 1200,
                responsive: true,
                zoomType: 'x',
            },
            title: {
                text: 'Heap Usage comparision (Top 10 Objects)'
            },
            credits: {
                enabled: false
            },
            subtitle: {
                text: ''
            },
            xAxis: {
                crosshair: true,
                categories: barXArr,
                labels: {
                    rotation: -45,
                    style: {
                        fontSize: '13px',
                        fontFamily: 'Verdana, sans-serif'
                    }
                },
            },
            yAxis: {
                min: 0,
                title: {
                    text: '% of Heap'
                },
                style: {
                    fontSize: '13px',
                    fontFamily: 'Verdana, sans-serif'
                }
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0
                }
            },
            series: this.samlpleArrList,
            exporting: {
                enabled: false
            }
        };
        this.Options = {
            chart: {
                type: 'pie',
                width: 1200,
                responsive: true,
            },
            credits: {
                enabled: false
            },
            title: { text: 'Heap Usage (Top 10 Objects)', style: { 'fontSize': '13px' } },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    cursor: 'pointer',
                    allowPointSelect: true,
                    dataLabels: {
                        enabled: false,
                        format: '<b> {point.name} </b>: {point.percentage:.2f} %',
                    },
                    showInLegend: true,
                    borderWidth: 0
                }
            },
            legend: {
                enabled: true,
                layout: 'horizental',
                align: 'right',
                width: 400,
                verticalAlign: 'middle',
                labelFormat: '{name} {y}%',
            },
            series: [
                {
                    name: '',
                    data: pieArr,
                    colorByPoint: true,
                    enableMouseTracking: true
                }
            ],
            exporting: {
                enabled: false
            }
        };
        this.options1 = {
            chart: {
                type: 'column',
                width: 1200,
                responsive: true,
                zoomType: 'x',
            },
            title: {
                text: 'Heap Usage comparision (Top 10 Objects)'
            },
            credits: {
                enabled: false
            },
            subtitle: {
                text: ''
            },
            xAxis: {
                crosshair: true,
                categories: barXArr,
                labels: {
                    rotation: -45,
                    style: {
                        fontSize: '13px',
                        fontFamily: 'Verdana, sans-serif'
                    }
                },
            },
            yAxis: {
                min: 0,
                title: {
                    text: '% of Heap'
                },
                style: {
                    fontSize: '13px',
                    fontFamily: 'Verdana, sans-serif'
                }
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0
                }
            },
            series: this.samlpleArrList,
            exporting: {
                enabled: false
            }
        };
    }
    tabViewTab(event) {
        if (event.index == 0) {
            this.chartView = false;
            this.compareView = false;
            this.tabView = true;
        }
        else if (event.index == 1) {
            this.compareView = false;
            this.tabView = false;
            this.chartView = true;
        }
        else {
            this.chartView = false;
            this.tabView = false;
            this.compareView = true;
        }
    }
    closeFlightRecording() {
        this.startFlight = false;
        this.showFlight = false;
    }
    flightRecordingData(operation) {
        let url = '';
        if (this.selectedRowInfo) {
            var rowData = this.selectedRowInfo["recordingId"] + ":" + this.selectedRowInfo["recordingFileName"] + ":" + this.selectedRowInfo["status"];
        }
        var hostDcName = "";
        var tr = this.testRun;
        if (this.sessionService.preSession.multiDc === true) {
            hostDcName = this.id.getSelectedDCHostUrl("tomcat", this.selectedDcVal);
            for (let i = 0; i < this.dcData.length; i++) {
                if (this.selectedDcVal === this.dcData[i].name) {
                    tr = this.dcData[i]['testRun']['id'];
                }
            }
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        if (this.selectedInstanceInfo && Object.keys(this.selectedInstanceInfo).length > 0) {
            this.processIDWithInstance = this.selectedInstanceInfo["pid"] + ":" + this.selectedInstanceInfo["appName"];
            url = hostDcName + '/' + this.productType + '/v1/cavisson/netdiagnostics/ddr/missionControl?testRun=' + tr + '&userName=' + this.userName + '&isNDCase=' + this.isNDCase + '&pidwithapp=' + this.processIDWithInstance + '&rowData=' + rowData;
        }
        else {
            alert("Please select one insatnce to show flight recording");
            return;
        }
        if (this.selectedTierVal != null) {
            url += '&tierName=' + this.selectedTierVal;
        }
        if (this.isNDCase) {
            if (this.selectedServerVal != null) {
                if (this.selectedServerVal.indexOf('(') != -1)
                    this.serverNameforTD = this.selectedServerVal.substring(0, this.selectedServerVal.indexOf('('));
                else
                    this.serverNameforTD = this.selectedServerVal;
            }
        }
        else {
            if (this.selectedServerVal.indexOf('(') != -1)
                this.serverNameforTD = this.selectedServerVal.substring(this.selectedServerVal.indexOf('(') + 1, this.selectedServerVal.indexOf(')'));
            else
                this.serverNameforTD = this.selectedServerVal;
        }
        url += '&serverName=' + this.serverNameforTD;
        url += '&operation=' + operation + '&cmdArgs= -u ' + this.userName;
        let statusMsg = [];
        let dataSubscription = this.appService.fetchData(url).subscribe(result => {
            var _a;
            if (result.status) {
                this.flightData = undefined;
                this.showFlight = true;
                statusMsg.push(result.status);
                this.showNotification(statusMsg);
            }
            if (result.frData) {
                this.flightData = result.frData;
                this.showFlight = true;
            }
            if (result !== 'undefined' && ((_a = result[0]) === null || _a === void 0 ? void 0 : _a.startsWith("Fail"))) {
                this.multiErrorMessage(result);
            }
        }, err => { this.showNotification(err); }, () => {
            /*unsubscribe/releasing resources.*/
            dataSubscription.unsubscribe();
        });
    }
    stopFlightRecording() {
        if (this.flightData.length != 0 && this.selectedRowInfo == undefined) {
            alert("Please select file to stop");
            return;
        }
        else {
            this.flightRecordingData("stop");
        }
    }
    removeFlightRecording() {
        if (this.flightData.length != 0 && this.selectedRowInfo == undefined) {
            alert("Please select file to remove");
            return;
        }
        else {
            this.flightRecordingData("remove");
        }
    }
    resetAllFields() {
        this.fileName = '/tmp/';
        this.isOverwrite = false;
        this.maxTimeOut = 10;
        this.selectedTime = 'Second(s)';
        this.fileSize = '';
        this.selectedSize = 'MB';
        this.isCompressed = false;
        this.maxTime = 10;
    }
    startFlightRecording() {
        let url = '';
        let strCmdArgs = '';
        var hostDcName = "";
        var tr = this.testRun;
        if (this.sessionService.preSession.multiDc === true) {
            hostDcName = this.id.getSelectedDCHostUrl("tomcat", this.selectedDcVal);
            for (let i = 0; i < this.dcData.length; i++) {
                if (this.selectedDcVal === this.dcData[i].name) {
                    tr = this.dcData[i]['testRun']['id'];
                }
            }
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        url = hostDcName + '/' + this.productType + '/v1/cavisson/netdiagnostics/ddr/missionControl?testRun=' + tr + '&userName=' + this.userName + '&isNDCase=' + this.isNDCase;
        if (this.selectedTierVal != null) {
            url += '&tierName=' + this.selectedTierVal;
        }
        if (this.isNDCase) {
            if (this.selectedServerVal != null) {
                if (this.selectedServerVal.indexOf('(') != -1)
                    this.serverNameforTD = this.selectedServerVal.substring(0, this.selectedServerVal.indexOf('('));
                else
                    this.serverNameforTD = this.selectedServerVal;
            }
        }
        else {
            if (this.selectedServerVal.indexOf('(') != -1)
                this.serverNameforTD = this.selectedServerVal.substring(this.selectedServerVal.indexOf('(') + 1, this.selectedServerVal.indexOf(')'));
            else
                this.serverNameforTD = this.selectedServerVal;
        }
        url += '&serverName=' + this.serverNameforTD;
        if (this.processIDWithInstance != null) {
            url += '&pidwithapp=' + this.processIDWithInstance;
        }
        if (this.fileName == '' || null == this.fileName || this.fileName == undefined || !this.fileName.startsWith('/')) {
            alert("Please enter file name with absolute path to start flight recording");
            return;
        }
        else if (this.fileName == '/') {
            alert("Please enter file name to start flight recording");
            return;
        }
        else {
            let path = this.fileName.split('/');
            if (path[path.length - 1] == "") {
                alert("Enter file name");
                return;
            }
            else {
                url += '&filePath=' + this.fileName;
            }
        }
        if (this.maxTime != undefined && this.maxTime > 0)
            url += '&timeout=' + this.maxTime;
        else {
            alert("Timeout should be greater than zero");
            return;
        }
        if (this.maxTimeOut > 0 && undefined != this.maxTimeOut) {
            if (this.selectedTime === 'Minute(s)') {
                strCmdArgs += ' -d ' + this.maxTimeOut + 'm';
            }
            else if (this.selectedTime === 'Hour(s)') {
                strCmdArgs += ' -d ' + this.maxTimeOut + 'h';
            }
            else {
                strCmdArgs += ' -d ' + this.maxTimeOut + 's';
            }
        }
        else {
            alert("Duration should be greater than zero to start flight recording");
            return;
        }
        if (this.fileSize === undefined || this.fileSize === '') {
            //do nothing 
        }
        else if (this.fileSize > 0) {
            if (this.selectedSize === 'MB') {
                strCmdArgs += ' -S ' + this.fileSize + 'M';
            }
            else if (this.selectedSize === 'GB') {
                strCmdArgs += ' -S ' + this.fileSize + 'G';
            }
            else {
                strCmdArgs += ' -S ' + this.fileSize + 'K';
            }
        }
        else {
            alert("Expected file size should be greater than zero to start flight recording");
            return;
        }
        if (this.isOverwrite)
            strCmdArgs += ' -O 1 ';
        else
            strCmdArgs += ' -O 0 ';
        if (this.isCompressed)
            url += '&isCompress=1';
        else
            url += '&isCompress=0';
        url += '&operation=start&cmdArgs=' + strCmdArgs;
        this.loading1 = true;
        this.startFlight = false;
        // this.http.get(url).subscribe(res => (this.showNotification(res)));
        let dataSubscription = this.appService.fetchData(url)
            .subscribe(result => {
            this.showNotification(result);
        }, err => { this.showNotification(err); }, () => {
            console.log('Dashboard Filght Recorder request failed.');
            /*unsubscribe/releasing resources.*/
            dataSubscription.unsubscribe();
        });
    }
    validateDuration(key) {
        let keycode = (key.which) ? key.which : key.keyCode;
        if (this.maxTimeOut.toString().length == 4) {
            return false;
        }
        if (!(keycode == 8 || keycode == 46) && (keycode < 48 || keycode > 57)) {
            return false;
        }
        else {
            return true;
        }
    }
    validate(key) {
        let keycode = (key.which) ? key.which : key.keyCode;
        if (this.fileSize.toString().length === 8) {
            return false;
        }
        if (!(keycode === 8 || keycode === 46) && (keycode < 48 || keycode > 57)) {
            return false;
        }
        else {
            return true;
        }
    }
    multiSuccessMessage(detail, summary) {
        this.timeLimitForMessage = 10000;
        this._message = { severity: 'success', summary: summary, detail: detail };
        this.messageEmit(this._message);
        setTimeout(() => {
            this._message = {};
            this.messageEmit(this._message);
        }, this.timeLimitForMessage);
    }
    multiErrorMessage(detail, summary) {
        this.timeLimitForMessage = 15000;
        this._message = { severity: 'error', summary: summary, detail: detail };
        this.messageEmit(this._message);
        setTimeout(() => {
            this._message = {};
            this.messageEmit(this._message);
        }, this.timeLimitForMessage);
    }
    errorMessage(detail, summary) {
        this.timeLimitForMessage = 30000;
        if (summary == undefined)
            this._message = { severity: 'error', detail: detail };
        else
            this._message = { severity: 'error', summary: summary, detail: detail };
        this.messageEmit(this._message);
        setTimeout(() => {
            this._message = {};
            this.messageEmit(this._message);
        }, 30000);
    }
    infoMessage(detail, summary) {
        this.timeLimitForMessage = 10000;
        if (summary == undefined)
            this._message = { severity: 'info', detail: detail };
        else
            this._message = { severity: 'info', summary: summary, detail: detail };
        this.messageEmit(this._message);
        setTimeout(() => {
            this._message = {};
            this.messageEmit(this._message);
        }, this.timeLimitForMessage);
    }
    successMessage(detail, summary) {
        this.timeLimitForMessage = 10000;
        if (summary == undefined)
            this._message = { severity: 'success', detail: detail };
        else
            this._message = { severity: 'success', summary: summary, detail: detail };
        this.messageEmit(this._message);
        setTimeout(() => {
            this._message = {};
            this.messageEmit(this._message);
        }, this.timeLimitForMessage);
    }
    CustomsortOnColumnsforCustom(event, tempData) {
        if (event["field"] === 'objectNameChanged') {
            if (event.order == -1) {
                var temp = (event["field"]);
                event.order = 1;
                var reA = /[^a-zA-Z]/g;
                var reN = /[^0-9]/g;
                tempData = tempData.sort(function (a, b) {
                    var v1 = a[temp];
                    var v2 = b[temp];
                    let value;
                    let value2;
                    v1 = v1.replace(reA, "");
                    v2 = v2.replace(reA, "");
                    if (v1 === v2) {
                        value = parseInt(a[temp].replace(reN, ""), 10);
                        value2 = parseInt(b[temp].replace(reN, ""), 10);
                        return (value2 > value) ? 1 : ((value2 < value) ? -1 : 0);
                    }
                    else {
                        value = a[temp];
                        value2 = b[temp];
                        return (value2 > value) ? 1 : ((value2 < value) ? -1 : 0);
                    }
                });
            }
            else {
                var temp = (event["field"]);
                event.order = -1;
                var reA = /[^a-zA-Z]/g;
                var reN = /[^0-9]/g;
                tempData = tempData.sort(function (a, b) {
                    let v1 = a[temp];
                    let v2 = b[temp];
                    let value;
                    let value2;
                    v1 = v1.replace(reA, "");
                    v2 = v2.replace(reA, "");
                    if (v1 === v2) {
                        value = parseInt(a[temp].toString().replace(reN, ""), 10);
                        value2 = parseInt(b[temp].toString().replace(reN, ""), 10);
                        return (value > value2) ? 1 : ((value < value2) ? -1 : 0);
                    }
                    else {
                        value = a[temp];
                        value2 = b[temp];
                        return (value > value2) ? 1 : ((value < value2) ? -1 : 0);
                    }
                });
            }
        }
        else {
            let fieldValue = event['field'];
            if (event.order === -1) {
                event.order = 1;
                tempData = tempData.sort(function (a, b) {
                    var value = parseFloat(a[fieldValue]);
                    var value2 = parseFloat(b[fieldValue]);
                    return (value2 > value) ? 1 : ((value2 < value) ? -1 : 0);
                });
            }
            else {
                event.order = -1;
                // asecding order
                tempData = tempData.sort(function (a, b) {
                    var value = parseFloat(a[fieldValue]);
                    var value2 = parseFloat(b[fieldValue]);
                    return (value > value2) ? 1 : ((value < value2) ? -1 : 0);
                });
            }
        }
        this.memLeakData = [];
        if (tempData) {
            tempData.map((rowdata) => { this.memLeakData = this.Immutablepush(this.memLeakData, rowdata); });
        }
    }
    /* ******** Custom Sorting  **********/
    CustomSort(event, tempData) {
        //for date type data type
        //alert("event.field>>>"+ event["field"] + "    and "+ event["order"]);
        if (event["field"] == "fileLastModificationTime") {
            if (event.order == -1) {
                var temp = (event["field"]);
                event.order = 1;
                tempData = tempData.sort(function (a, b) {
                    var value = Date.parse(a[temp]);
                    var value2 = Date.parse(b[temp]);
                    return (value2 > value) ? 1 : ((value2 < value) ? -1 : 0);
                });
            }
            else {
                var temp = (event["field"]);
                event.order = -1;
                //asecding order
                tempData = tempData.sort(function (a, b) {
                    var value = Date.parse(a[temp]);
                    var value2 = Date.parse(b[temp]);
                    return (value > value2) ? 1 : ((value < value2) ? -1 : 0);
                });
            }
        }
        else {
            if (event.order == -1) {
                var temp = (event["field"]);
                event.order = 1;
                tempData = tempData.sort(function (a, b) {
                    var value = Number(a[temp].replace(/,/g, ''));
                    var value2 = Number(b[temp].replace(/,/g, ''));
                    return (value2 > value) ? 1 : ((value2 < value) ? -1 : 0);
                });
            }
            else {
                var temp = (event["field"]);
                event.order = -1;
                //asecding order
                tempData = tempData.sort(function (a, b) {
                    var value = Number(a[temp].replace(/,/g, ''));
                    var value2 = Number(b[temp].replace(/,/g, ''));
                    return (value > value2) ? 1 : ((value < value2) ? -1 : 0);
                });
            }
        }
        this.flightData = [];
        if (tempData) {
            tempData.map((rowdata) => { this.flightData = this.Immutablepush(this.flightData, rowdata); });
        }
    }
    Immutablepush(arr, newEntry) {
        return [...arr, newEntry];
    }
    openAvailableRecording(isAll) {
        if (isAll)
            this.showAll = true;
        else
            this.showAll = false;
        var tr = this.testRun;
        var hostDcName = "";
        if (this.sessionService.preSession.multiDc === true) {
            if (this.showAll) {
                hostDcName = this.id.getSelectedDCHostUrl("node");
            }
            else {
                hostDcName = this.id.getSelectedDCHostUrl("tomcat", this.selectedDcVal);
                for (let i = 0; i < this.dcData.length; i++) {
                    if (this.selectedDcVal === this.dcData[i].name) {
                        tr = this.dcData[i]['testRun']['id'];
                    }
                }
            }
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        var url = this.getHostUrl() + '/' + this.productType + "/v1/cavisson/netdiagnostics/ddr/getJFRList?testRun=" + tr +
            '&tierName=' + this.selectedTierVal +
            '&server=' + this.selectedServerVal +
            '&isAllData=' + isAll;
        return this.appService.fetchData(url).subscribe(data => (this.setJFRTableValues(data)));
    }
    setJFRTableValues(res) {
        this.confirmationPopup = false;
        if (res.hasOwnProperty("errorStatus")) {
            this.multiErrorMessage(res.errorStatus.split(":")[0], res.errorStatus.split(":")[1]);
        }
        else if (res.jfrList) {
            this.jfrList = res.jfrList;
            this.showTable = 2;
        }
        this.loader = false;
    }
    downloadFile(node) {
        let urlInfo = '&tierName=' + node.tierName + '&serverName=' + node.serverName + '&instanceName=' + node.instanceName + '&pid=' + node.pid + '&partition=' + node.partition + '&timestamp=' + node.timestamp + '&fileName=' + node.fileName + '&filePath=' + node.filePath + '&userName=' + node.userName + '&mode=' + node.mode + '&isFrom=' + node.isFrom + '&index=' + node.index + '&location=' + node.location + '&productKey=' + this.sessionService.session.cctx.pk + '&cck=' + this.sessionService.session.cctx.cck;
        var tr = this.testRun;
        var hostDcName = "";
        if (this.sessionService.preSession.multiDc === true) {
            this.dcName = node.dcName;
            hostDcName = this.id.getSelectedDCHostUrl("tomcat", this.dcName);
            for (let i = 0; i < this.dcData.length; i++) {
                if (this.dcName === this.dcData[i].name) {
                    tr = this.dcData[i]['testRun']['id'];
                }
            }
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        let url = hostDcName + '/' + this.productType + "/v1/cavisson/netdiagnostics/ddr/downloadJFRFile?testRun=" + tr + urlInfo;
        this.id.setInLogger('', 'Java Flight Recording', 'Java Flight Recording Download', 'Java Flight Recording Download Successfully');
        window.open(url, "_blank");
        // this.refreshGui =  setInterval(() => { this.openHeapDumpList() }, 10000);
        setTimeout(() => {
            this.openAvailableRecording("All");
        }, 10000);
    }
    assignNodevalueToDelete(node) {
        this.nodeValueToDelete = node;
    }
    removeFile() {
        if (this.nodeValueToDelete.location === "-") {
            this.confirmationPopup = false;
            alert("File doesn't exist at NDE, So couldn't be deleted.");
            return;
        }
        // tierName|serverName|instanceName|pid|partition|startTime|endTime|timestamp|fileName|filePath|userName|mode|isFrom
        // let url = '&tierName='+node.tierName+'&serverName='+node.serverName+'&instanceName='+node.instanceName+
        // +'&pid='+node.pid+'&partition='+node.partition+'&startTime='+node.startTime+'&endTime='+node.endTime+'&timestamp='+node.timestamp+
        // +'&fileName='+node.fileName+'&filePath='+node.filePath+'&userName='+node.userName+'&mode='+node.mode+'&isFrom='+node.isFrom+'&index='+node.index;
        var hostDcName = "";
        if (this.sessionService.preSession.multiDc === true) {
            this.dcName = this.nodeValueToDelete.dcName;
            hostDcName = this.id.getSelectedDCHostUrl("tomcat", this.dcName);
            for (let i = 0; i < this.dcData.length; i++) {
                if (this.dcName === this.dcData[i].name) {
                    this.testRun = this.dcData[i]['testRun']['id'];
                }
            }
        }
        else {
            hostDcName = this.id.getHostUrl();
        }
        let fileName = this.nodeValueToDelete.filePath.substring(this.nodeValueToDelete.filePath.lastIndexOf("/") + 1);
        let urlInfo = '&tierName=' + this.nodeValueToDelete.tierName + '&serverName=' + this.nodeValueToDelete.serverName + '&instanceName=' + this.nodeValueToDelete.instanceName + '&pid=' + this.nodeValueToDelete.pid + '&partition=' + this.nodeValueToDelete.partition + '&timestamp=' + this.nodeValueToDelete.timestamp + '&filePath=' + this.nodeValueToDelete.filePath + '&userName=' + this.nodeValueToDelete.userName + '&mode=' + this.nodeValueToDelete.mode + '&isFrom=' + this.nodeValueToDelete.isFrom + '&index=' + this.nodeValueToDelete.index + '&location=' + this.nodeValueToDelete.location + '&productKey=' + this.productKey;
        let jfr_list_url = hostDcName + '/' + this.productType + "/v1/cavisson/netdiagnostics/ddr/removeJFR?testRun=" + this.testRun + '&removeFile=' + this.nodeValueToDelete.location + "/" + fileName + urlInfo;
        this.appService.fetchTextData(jfr_list_url).subscribe(data => {
            this.confirmationPopup = false;
            if (data == 'Successfully updated') {
                if (this.showAll)
                    this.openAvailableRecording('isAll');
                else
                    this.openAvailableRecording();
            }
            else
                this.errorMessage(data);
        }, err => {
            this.confirmationPopup = false;
            this.errorMessage('Error is coming while removing JFR');
        });
    }
    copyLink(val) {
        const selBox = document.createElement('textarea');
        selBox.style.position = 'fixed';
        selBox.style.left = '0';
        selBox.style.top = '0';
        selBox.style.opacity = '0';
        selBox.value = val.location;
        document.body.appendChild(selBox);
        selBox.focus();
        selBox.select();
        document.execCommand('copy');
        document.body.removeChild(selBox);
        this.messageService.add({ severity: 'success', detail: 'File Path copied successfully' });
    }
    resetInstanceTable() {
        this.instanceInfo = undefined;
    }
    /*Custom Sorting*/
    sortColumnsOnCustom(event) {
        //for integer type data type
        if (event["field"] === "pid") {
            if (event.order == -1) {
                var temp = (event["field"]);
                event.order = 1;
                event.data = event.data.sort(function (a, b) {
                    var value = Number(a[temp].replace(/,/g, ''));
                    var value2 = Number(b[temp].replace(/,/g, ''));
                    return (value2 > value) ? 1 : ((value2 < value) ? -1 : 0);
                });
            }
            else {
                var temp = (event["field"]);
                event.order = -1;
                //ascending order
                event.data = event.data.sort(function (a, b) {
                    var value = Number(a[temp].replace(/,/g, ''));
                    var value2 = Number(b[temp].replace(/,/g, ''));
                    return (value > value2) ? 1 : ((value < value2) ? -1 : 0);
                });
            }
        }
        else {
            var temp = (event["field"]);
            if (event.order == -1) {
                event.data = event.data.sort(function (a, b) {
                    var value = a[temp];
                    var value2 = b[temp];
                    return value.localeCompare(value2);
                });
            }
            else {
                event.order = -1;
                event.data = event.data.sort(function (a, b) {
                    var value = a[temp];
                    var value2 = b[temp];
                    return value2.localeCompare(value);
                });
            }
        }
    }
    customsort(event, tempData) {
        //for interger type data type
        if (event.order == -1) {
            var temp = (event["field"]);
            event.order = 1;
            tempData = tempData.sort(function (a, b) {
                var value = Date.parse(a[temp]);
                var value2 = Date.parse(b[temp]);
                return (value2 > value) ? 1 : ((value2 < value) ? -1 : 0);
            });
        }
        else {
            var temp = (event["field"]);
            event.order = -1;
            //asecding order
            tempData = tempData.sort(function (a, b) {
                var value = Date.parse(a[temp]);
                var value2 = Date.parse(b[temp]);
                return (value > value2) ? 1 : ((value < value2) ? -1 : 0);
            });
        }
        this.jfrList = [];
        if (tempData) {
            tempData.map((rowdata) => { this.jfrList = this.Immutablepush(this.jfrList, rowdata); });
        }
    }
    showAllData() {
        this.showAll = true;
        this.openAvailableRecording("All");
    }
    refreshGUI() {
        this.loader = true;
        if (this.showAll)
            this.openAvailableRecording("All");
        else
            this.openAvailableRecording();
    }
    onClose(event) {
        this.updateData.unsubscribe();
        this.resetScreen();
    }
    resetScreen() {
        this.interval = 60;
        this.sampleCount = 2;
    }
    startMemLeakTimer() {
        if (this.updateData && null !== this.updateData)
            this.updateData.unsubscribe();
        let updateinterval = this.interval * 1000;
        let updateMemLeakData = Object(rxjs__WEBPACK_IMPORTED_MODULE_5__["timer"])(0, updateinterval);
        this.updateData = updateMemLeakData.subscribe(t => {
            this.getMemLeakData(t);
        });
    }
};
MissionControlComponent.ctorParameters = () => [
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__["SessionService"] },
    { type: _memory_profiler_revamp_services_memory_profiler_service__WEBPACK_IMPORTED_MODULE_11__["MemoryProfilerService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpClient"] },
    { type: _ddr_data_model_service__WEBPACK_IMPORTED_MODULE_4__["DdrDataModelService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_8__["ActivatedRoute"] },
    { type: primeng__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
    { type: src_app_app_service__WEBPACK_IMPORTED_MODULE_13__["AppService"] },
    { type: _common_action_service__WEBPACK_IMPORTED_MODULE_10__["CommonActionService"] },
    { type: src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_9__["CavNavBarService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()
], MissionControlComponent.prototype, "isFromRevamp", void 0);
MissionControlComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-mission-control',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./mission-control.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/mission-control/mission-control.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./mission-control.component.scss */ "./src/app/pages/tools/actions/mission-control/mission-control.component.scss")).default]
    })
], MissionControlComponent);



/***/ }),

/***/ "./src/app/pages/tools/actions/mission-control/mission-control.module.ts":
/*!*******************************************************************************!*\
  !*** ./src/app/pages/tools/actions/mission-control/mission-control.module.ts ***!
  \*******************************************************************************/
/*! exports provided: MissionControlModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MissionControlModule", function() { return MissionControlModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
/* harmony import */ var _mission_control_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mission-control.component */ "./src/app/pages/tools/actions/mission-control/mission-control.component.ts");
/* harmony import */ var _java_flight_recorder_java_flight_recorder_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../java-flight-recorder/java-flight-recorder.component */ "./src/app/pages/tools/actions/java-flight-recorder/java-flight-recorder.component.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var src_app_shared_app_message_app_message_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/shared/app-message/app-message.module */ "./src/app/shared/app-message/app-message.module.ts");
/* harmony import */ var src_app_shared_ip_summary_open_box_ip_summary_open_box_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/shared/ip-summary-open-box/ip-summary-open-box.module */ "./src/app/shared/ip-summary-open-box/ip-summary-open-box.module.ts");
/* harmony import */ var src_app_shared_long_value_long_value_module__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/shared/long-value/long-value.module */ "./src/app/shared/long-value/long-value.module.ts");
/* harmony import */ var src_app_shared_pipes_pipes_module__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/shared/pipes/pipes.module */ "./src/app/shared/pipes/pipes.module.ts");
/* harmony import */ var highcharts_angular__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! highcharts-angular */ "./node_modules/highcharts-angular/__ivy_ngcc__/fesm2015/highcharts-angular.js");
/* harmony import */ var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! src/app/shared/help/help.module */ "./src/app/shared/help/help.module.ts");
/* harmony import */ var primeng_progressbar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! primeng/progressbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-progressbar.js");
/* harmony import */ var _shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");
















const routes = [
    {
        path: 'mission-control/:name',
        component: _mission_control_component__WEBPACK_IMPORTED_MODULE_3__["MissionControlComponent"],
    },
    {
        path: 'flight-recording/java-flight-recorder',
        component: _java_flight_recorder_java_flight_recorder_component__WEBPACK_IMPORTED_MODULE_4__["JavaFlightRecorderComponent"]
    }
];
const imports = [
    _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["ToolbarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["ButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["CardModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["CheckboxModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["MultiSelectModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["InputTextModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["RadioButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["DropdownModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["PanelModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["InputTextareaModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["BreadcrumbModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["MenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["InputSwitchModule"],
    _angular_forms__WEBPACK_IMPORTED_MODULE_6__["FormsModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["FieldsetModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["TableModule"],
    src_app_shared_app_message_app_message_module__WEBPACK_IMPORTED_MODULE_8__["AppMessageModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["ToastModule"],
    _angular_forms__WEBPACK_IMPORTED_MODULE_6__["ReactiveFormsModule"],
    src_app_shared_long_value_long_value_module__WEBPACK_IMPORTED_MODULE_10__["LongValueModule"],
    src_app_shared_pipes_pipes_module__WEBPACK_IMPORTED_MODULE_11__["PipeModule"],
    src_app_shared_ip_summary_open_box_ip_summary_open_box_module__WEBPACK_IMPORTED_MODULE_9__["IpSummaryOpenBoxModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["MessageModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["AccordionModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["DialogModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["TabViewModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["FieldsetModule"],
    highcharts_angular__WEBPACK_IMPORTED_MODULE_12__["HighchartsChartModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["TableModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["TooltipModule"],
    src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_13__["HelpModule"],
    primeng_progressbar__WEBPACK_IMPORTED_MODULE_14__["ProgressBarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["ProgressSpinnerModule"]
];
const components = [_mission_control_component__WEBPACK_IMPORTED_MODULE_3__["MissionControlComponent"]];
let MissionControlModule = class MissionControlModule {
};
MissionControlModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [components],
        imports: [
            imports,
            _angular_router__WEBPACK_IMPORTED_MODULE_5__["RouterModule"].forChild(routes),
            _shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_15__["CavTableModule"]
        ],
        exports: [
            _angular_router__WEBPACK_IMPORTED_MODULE_5__["RouterModule"],
            _mission_control_component__WEBPACK_IMPORTED_MODULE_3__["MissionControlComponent"]
        ],
    })
], MissionControlModule);



/***/ })

}]);