(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["thread-dump-revamp-thread-dump-revamp-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/analyze-thread-dump/analyze-thread-dump.component.html":
/*!*****************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/analyze-thread-dump/analyze-thread-dump.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=\"content-body p-8\">\n    <app-cav-toolbar [showNumber]=\"false\" label=\" File: {{fileName}}\"></app-cav-toolbar>\n    <div class=\"p-grid p-nogutter mb-50\">\n        <div class=\"p-col-7 p-align-center tab-adjust-left\">\n            <p-tabView class=\"ddr-tabs\" (onChange)=\"handleChange($event)\">\n                <p-tabPanel header=\"Thread State\">\n                    <div *ngIf=\"showChart == true\">\n                        <highcharts-chart [options]=\"options\" [Highcharts]=\"highcharts\"\n                            style=\"width:  100%; height: 100%; display: block;\"></highcharts-chart>\n                    </div>\n                    <div *ngIf=\"showChart == false\" class=\"ddr-custom-tab\">No Thread State found for Thread Dump.</div>\n                </p-tabPanel>\n                <p-tabPanel header=\"Thread Category\">\n                    <div *ngIf=\"showChart == true\">\n                        <highcharts-chart [options]=\"options1\" [Highcharts]=\"highcharts\"\n                            style=\"width:  100%; height: 100%; display: block;\"></highcharts-chart>\n                    </div>\n                    <div *ngIf=\"showChart == false\" class=\"ddr-custom-tab\">No Thread Category found for Thread Dump.\n                    </div>\n                </p-tabPanel>\n                <p-tabPanel header=\"Thread Group\">\n                    <div *ngIf=\"showThreadGroup == true\">\n                        <highcharts-chart [options]=\"options4\" [Highcharts]=\"highcharts\"\n                            style=\"width:  100%; height: 100%; display: block;\"></highcharts-chart>\n                    </div>\n                    <div *ngIf=\"showThreadGroup == false\" class=\"ddr-custom-tab\">No Thread group found for Thread Dump.\n                    </div>\n                </p-tabPanel>\n                <p-tabPanel header=\"Deadlock\">\n                    <div class=\"ddr-custom-tab\">{{deadlockMsg}}<a *ngIf=\"isDeadlock== true\"\n                            style=\"color: #8484f0;cursor:pointer\" (click)=\"showDeadlockThreads()\">Click here</a>\n                    </div>\n                </p-tabPanel>\n                <p-tabPanel header=\"Hotstacks\">\n                    <div *ngIf=\"showHotstack == true\">\n                        <highcharts-chart [options]=\"options5\" [Highcharts]=\"highcharts\"\n                            style=\"width:  100%; height: 100%; display: block;\"></highcharts-chart>\n                    </div>\n                    <div *ngIf=\"showHotstack == false\" class=\"ddr-custom-tab\">No Hotstacks found for Thread Dump.</div>\n                </p-tabPanel>\n            </p-tabView>\n        </div>\n        <div class=\"p-col-5 p-align-center\">\n            <div *ngIf=\"showThreadTable==2\">\n                <div class=\"ddr-custom-div ddr-custom-div mt-8 mb-6\">\n                    HotStack [count: {{hotstackCount}}] w.r.t Top <input class=\"width-50 ui-inputtext\" type=\"text\"\n                        pInputText [(ngModel)]=\"hotstackCompareCount\" />\n                    <span class=\"ml-3 mr-20\">frames</span> <button pButton type=\"button\" title=\"Apply Top frames\"\n                        class='ui-button-primary' label=\"Apply\" (click)=\"getTopFramedHotstack()\"></button>\n                </div>\n                <div id=\"stack_text\">\n                    <pre style=\"overflow: auto\">{{hotstack}}</pre>\n                </div>\n            </div>\n\n            <div *ngIf=\"showThreadTable==0\">\n                <div class=\"p-grid p-align-center p-justify-between font-14 py-16\">\n                    <div class=\"p-align-center p-justify-start\">Thread(s) Details {{threadTableHeader}}</div>\n                    <button pButton type=\"button\" icon=\"icons8 icons8-synchronize\" *ngIf=\"showAllOption\"\n                        class=\"btn-icon\" title=\"Show all data\" (click)=\"showAllThreadData();\"></button>\n                </div>\n                <div class=\"mb-25\">\n                    <cav-table [value]=\"threadDumpInfo\" [headerRelativePath]=\"relativePath\" [scrollable]=\"true\"\n                        scrollHeight=\"148px\" (clickButtonEvent)=\"onClickButtonEvent($event)\">\n                    </cav-table>\n\n                </div>\n                <div class=\"p-grid p-justify-end\">\n                    <div class=\"ui-toolbar-group-right\" *ngIf=\"showDownLoadReportIcon\">\n                        <button type=\"button\" class=\"btn-icon mx-3\" (click)='downloadReport(\"word\")'\n                            title=\"Download as Word Report\"><i class=\"icons8 icons8-doc font-20\"></i></button>\n                        <button type=\"button\" class=\"btn-icon mx-3\" (click)='downloadReport(\"excel\")'\n                            title=\"Download Excel file\"><i class=\"icons8 icons8-spreadsheet-file font-20\"></i></button>\n                        <button type=\"button\" class=\"btn-icon mx-3\" (click)='downloadReport(\"pdf\")'\n                            title=\"Download PDF file\"><i class=\"icons8 icons8-pdf-2 font-20\"></i></button>\n\n                    </div>\n                </div>\n                <div class=\"ddr-custom-div mt-5\">\n                    Stack Trace {{indiThreadInfo}}\n                </div>\n                <div id=\"stack_text\" class=\"stack-text mb-25\">\n                    <pre style=\"outline: none;\">{{stacktrace}}</pre>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/compare-thread-dump/compare-thread-dump.component.html":
/*!*****************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/compare-thread-dump/compare-thread-dump.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=\"p-grid loader-container vertical-container h-50-vh\" *ngIf=\"loading\">\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 class=\"font-20 font-weight-600 p-12\">\n    Total Thread Dumps: {{threadDumpSummaryInfo.length}}\n</div>\n<div class=\"threadDumpSummary\">\n    <p-panel [toggleable]=\"true\" header=\"Total Threads: {{totalThreadInfo.length}} \" styleClass=\"net-panel1 m-8\">\n\n        <div *ngIf=\"showThreadDetails== 1\">\n            <div class=\"p-12\">\n                <cav-table (clickButtonEvent)=\"totalThreadTableEvent($event)\" [scrollable]=\"true\"\n                    [value]=\"totalThreadInfo\" [headerRelativePath]=\"relativePathForTotslThreadTable\"\n                    currentPageReportTemplate=\"showing {first} to {last} of {totalRecords}\"\n                    scrollHeight=\"193px\"></cav-table>\n            </div>\n        </div>\n    </p-panel>\n    <p-panel [toggleable]=\"true\" header=\"Hotstacks: {{hotStackArr.length}} \" styleClass=\"net-panel1 m-8\">\n        <div *ngIf=\"showHotstack == 1\">\n            <div class=\"p-col-12 p-grid p-justify-start\">\n                <label class=\"mr-10 mt-6\">Hotstacks w.r.t top</label> <input class=\"ui-inputtext width-50\" type=\"text\"\n                    pInputText [(ngModel)]=\"hotstackTopFrames\" />\n                <label class=\"ml-10 mr-20 mt-6\">frames</label> <button pButton type=\"button\" title=\"Apply Top Frames\"\n                    class=\"ui-btn-primary\" label=\"Apply\" (click)=\"getTopFramedHotstackForSummary()\"></button>\n            </div>\n            <p-tree [value]=\"hotstackTree\" scrollHeight=\"280px\" class=\"ddr-custom-tree ddr-custom-tree-thread-dump\">\n                <ng-template let-node pTemplate=\"hotstack\">\n                    <div class=\"ui-g\">\n                        <div id=\"stack_text\" class=\"w-100-p\">\n                            <pre>{{threadDumpInfoObject[node.label]['hotstack']}}</pre>\n                        </div>\n                        <div class=\"p-12\">\n                            <cav-table (clickButtonEvent)=\"hotStackTableEvent($event)\"\n                                [value]=\"threadDumpInfoObject[node.label]['threadDumpInfo']\"\n                                [headerRelativePath]=\"relativePathForhotStackTable\"></cav-table>\n                        </div>\n\n                    </div>\n                </ng-template>\n            </p-tree>\n        </div>\n    </p-panel>\n\n    <p-panel [toggleable]=\"true\" header=\"Deadlocks: {{deadlockArr.length}} \" styleClass=\"net-panel1 m-8\"\n        *ngIf=\"deadlockArr.length !=0\">\n\n        <div *ngIf=\"showDeadlock== 1\">\n            <div class=\"p-col-12 p-grid p-justify-start\">Deadlocks Info </div>\n            <p-tree [value]=\"deadlockTree\">\n                <ng-template let-node pTemplate=\"deadlock\">\n                    <div class=\"p-12\">\n                        <cav-table (clickButtonEvent)=\"totalThreadTableEvent($event)\"\n                            [value]=\"deadlockArr[node.label]['deadlockInfo']\"\n                            [headerRelativePath]=\"relativePathForTotslThreadTable\"></cav-table>\n                    </div>\n                </ng-template>\n            </p-tree>\n        </div>\n    </p-panel>\n    <p-panel styleClass=\"net-panel1 m-8\" [toggleable]=\"true\"\n        header=\"Thread(s) Statistics : {{statisticsTDData.length}} \">\n        <div *ngIf=\"showOption== 0\">\n            <p-table class=\"all-tables\" [value]=\"statisticsTDData\" scrollwidth=\"40px\" [scrollable]=\"true\"\n                scrollHeight=\"340px\" [style]=\"{'font-size':'12px','height':'auto'}\" resizableColumns=\"true\"\n                reorderableColumns=\"true\" [rows]=\"5\" [paginator]=\"true\" [pageLinks]=\"3\"\n                [rowsPerPageOptions]=\"[5,10,20,30,40,50,100]\">\n                <ng-template pTemplate=\"colgroup\" let-columns>\n                    <colgroup>\n                        <col *ngFor=\"let col of grpTableHeaderList\">\n                    </colgroup>\n                </ng-template>\n                <ng-template pTemplate=\"header\">\n                    <tr>\n                        <th *ngFor=\"let col of grpTableHeaderList\" [pSortableColumn]=\"col.field\" pResizableColumn\n                            pReorderableColumn>{{ col.header }}\n                            <p-sortIcon [field]=\"col.field\" ariaLabel=\"Activate to sort\"\n                                ariaLabelDesc=\"Activate to sort in descending order\"\n                                ariaLabelAsc=\"Activate to sort in ascending order\">\n                            </p-sortIcon>\n                        </th>\n                    </tr>\n                </ng-template>\n                <ng-template pTemplate=\"body\" let-node>\n                    <tr>\n                        <td *ngFor=\"let col of grpTableHeaderList\">\n                            <div style=\"color:blue; text-align: left !important;cursor: pointer !important;\"\n                                *ngIf=\"(!(col.field == 'threadName') && !(node[col.field] == '-')) else others\"\n                                (click)=\"statisticsThreadDumpData(node,col.field)\">\n                                {{node[col.field]}}\n                            </div>\n                            <ng-template #others style=\"color:black; text-align: left !important;\">\n                                {{node[col.field]}}\n                            </ng-template>\n                        </td>\n                    </tr>\n                </ng-template>\n            </p-table>\n\n            <div *ngIf=\"isSummary\">\n                <pre> {{threadData}} </pre>\n            </div>\n        </div>\n    </p-panel>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.component.html":
/*!********************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.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 *ngIf=\"!analyzeThreadDump && !isAddThreadDumpVisible && !isThreadDumpSummary\"  [helpFileName]=\"'threadDump'\"  [helpTitle]=\"'Thread Dump'\" [helpFolder]=\"'action'\"></app-help> \n            <app-help  *ngIf=\"isAddThreadDumpVisible\"  [helpFileName]=\"'takeThreadDump'\"  [helpTitle]=\"'Take Thread Dump'\" [helpFolder]=\"'action'\"></app-help> \n        </span>\n    </div>\n\n    <div *ngIf=\"!analyzeThreadDump && !isAddThreadDumpVisible && !isThreadDumpSummary && !tableEnable\" class=\"w-100-p p-8 \">\n        <cav-table [value]=\"tdTableData\"  [headerRelativePath]=\"relativePathForTDList\" [scrollable]=\"true\"\n             (clickButtonEvent)=\"threadDumpTableEvent($event)\" \n            currentPageReportTemplate=\"showing {first} to {last} of {totalRecords}\" scrollHeight=\"calc(100vh - 250px)\"></cav-table>\n    </div>\n\n    <div *ngIf=\"tableEnable\">\n        <cav-scheduler-table [scheduleObj]=\"scheduleObj\" (outputEvent)=\"outputEventHandler($event)\"></cav-scheduler-table>\n      </div>\n      \n\n    <ng-container *ngIf=\"analyzeThreadDump\">\n        <app-analyze-thread-dump [value]=\"analyzedData\"></app-analyze-thread-dump>\n    </ng-container>\n\n    <ng-container *ngIf=\"isThreadDumpSummary\">\n        <app-compare-thread-dump [value]=\"threadDumpSummaryInfo\"></app-compare-thread-dump>\n    </ng-container>\n    \n\n\n<p-menu #tableMenuPrime [popup]=\"true\" [style]=\"{'width':'180px'}\" class=\"\" [model]=\"tableMenuItemsRef\"></p-menu>\n\n<ng-container *ngIf=\"isAddThreadDumpVisible\">\n    <div class=\"border-all bg-white border-4 m-8 p-6 thread_dump\">\n            <app-cav-toolbar [number]=\"'1'\" [label]=\"'Select Target'\"></app-cav-toolbar>\n            <div class=\"w-100-p\">\n                <app-tier-server-info [tierServerInstanceObj]=\"tierServerVal\" [parentName]=\"'ThreadDump'\"></app-tier-server-info>\n            </div>\n            <!-- *ngIf=\"commonActionServiceObj.showSettings\" -->\n    <ng-container>\n        <app-cav-toolbar [number]=\"'2'\" [label]=\"'Thread Dump Configuration'\"></app-cav-toolbar>\n        <div class=\"p-grid mb-16\">\n           <div class=\"p-col-3 form-group\">\n               <label class=\"p-col-4 control-label\" for=\"count\">Count</label>\n               <div class=\"p-col-8\">\n                    <p-spinner type=\"number\" id=\"count\" min=1 required [(ngModel)]=\"counts\" (keyup)=\"enableTimeInterval()\" (onChange)=\"onCountChange()\" ></p-spinner>\n               </div>\n           </div>\n            <div class=\"p-col-3 form-group\">\n                <label class=\"p-col-4 control-label\" for=\"timeInterval\">Time Interval</label>\n                <div class=\"ui-inputgroup w-100-p\">\n                    <p-spinner type=\"number\" name=\"duration\" min=1 max=120 required [(ngModel)]=\"timeInterval\"\n                         id=\"timeInterval\" [disabled]=\"showTInterval\"></p-spinner>\n                        <span class=\"ui-inputgroup-addon\">Second(s)</span>  \n                </div>\n            </div>\n        </div>\n    </ng-container>\n    <ng-container>\n        <app-cav-toolbar [number]=\"'3'\" [label]=\"'Schedule Settings'\"></app-cav-toolbar>\n            <app-cav-scheduler [cavScheduleInput]=\"inputForCavScheduler\" (responseEvent)=\"cavScheduleEventHandler($event)\" (scheduleNow)=\"handleScheduleNow($event)\"></app-cav-scheduler>\n    </ng-container>\n    </div>\n\n    <div class=\"bottom-footer\">\n        <button pButton type=\"button\" [disabled]=\"!isWritePermission\" [label]=\"scheduleNow ? 'Take Thread Dump' : 'Schedule Thread Dump'\"  (click)=\"takeThreadDump()\" class='ui-btn-primary mx-3'></button>\n        <button pButton type=\"button\" label=\"Cancel\" (click)=\"cancelTakeThreadDump()\" class=\"ui-button-secondary mx-3\"></button>\n    </div>\n</ng-container>\n\n<p-dialog class=\"secondary-dialog confirmdialog\" header=\"Delete Confirmation\" [(visible)]=\"confirmationDelete\"\n[style]=\"{'width':'40%'}\" [responsive]=\"true\">\n    <label>Are you sure you want to permanently delete the selected thread dump?</label>\n    <p-footer>\n        <div>\n         <button pButton (click)=\"confirmationDelete = false\" type=\"button\" label=\"No\" class='mh-10 ui-button-secondary'></button>\n         <button pButton type=\"button\" (click)=\"deleteThreadDump()\" label=\"Yes\" class='mr-10 '></button>\n        </div>\n    </p-footer>\n</p-dialog>\n\n<div class=\"loading-indicator pageLoading\" *ngIf=\"commonActionServiceObj.loading\">\n    <p-progressSpinner [style]=\"{width: '50px', height: '50px'}\" strokeWidth=\"4\" animationDuration=\".5s\">\n    </p-progressSpinner>\n</div>\n<p-dialog header=\"View Logs\" [(visible)]=\"viewLogsDialog\" [style]=\"{'width':'70%'}\" [modal]=\"true\">\n<cav-table [value]=\"logsList\" [headerRelativePath]=\"relativePathForLogs\" [scrollable]=\"true\"\n(clickButtonEvent)=\"threadDumpTableEvent($event)\" [paginator]=\"true\"\n [selection]=\"selectedThreadDumpInfo\"  \ncurrentPageReportTemplate=\"showing {first} to {last} of {totalRecords}\"\nscrollHeight=\"calc(100vh - 210px)\"></cav-table>\n</p-dialog>\n<!-------------This dialog is for Node js Thread Dump Analysis Steps --------------------------->\n<p-dialog header=\"Node.js Thread Dump Analysis\"\n          [(visible)]=\"analyzeNodeThreadDialog\"\n          [modal]=\"true\"\n          [style]=\"{'width':'65%'}\">\n\n  <div>\n    <p><b>Selected row is for Node.js Thread Dump Analysis. Follow the steps below to analyze it.</b></p>\n\n    <ol style=\"line-height: 1.8;\">\n      <li>Step 1 : Download the <code>.cpuprofile</code> file from the selected row.</li>\n      <li>Step 2 : Open <b>Chrome</b> browser.</li>\n      <li>Step 3 : Go to the <b>Performance</b> tab in DevTools (Press <b>F12</b> → Performance).</li>\n      <li>Step 4 : Click <b>Load Profile</b> (or press <b>Ctrl + O</b>).</li>\n      <li>Step 5 : Select the downloaded <code>.cpuprofile</code> file.</li>\n      <li>Step 6 : Analyze the profile:\n        <ul>\n          <li><b>Bottom-Up View:</b> Identify the functions consuming the highest CPU time.</li>\n          <li><b>Call Tree:</b> Shows the execution hierarchy of function calls with total and self time.</li>\n          <li><b>Event Log:</b> Lists all recorded execution events in chronological order during profiling.</li>\n        </ul>\n      </li>\n    </ol>\n\n    <p style=\"margin-top:1em;\">\n      For more reference, visit: \n      <a href=\"https://developer.chrome.com/docs/devtools/performance/nodejs\" target=\"_blank\">\n        Chrome DevTools Performance Documentation\n      </a>\n    </p>\n  </div>\n</p-dialog>\n</div>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<p-dialog header=\"Edit Schedule Thread Dump\" [(visible)]=\"isVisibleSchedule\" [modal]=\"true\" [style]=\"{width: '95vw'}\"\n    [baseZIndex]=\"-1000\" [draggable]=\"false\" [resizable]=\"false\">\n\n    <cav-table [value]=\"editTdTableRow\" [tableConfig]=\"editTdTableConfig\" [columns]=\"editTdTableCols\"\n        [scrollable]=\"true\" [headers]=\"editTdTableHeader\" (clickButtonEvent)=\"editScheduleThreadDump($event)\"\n        currentPageReportTemplate=\"showing {first} to {last} of {totalRecords}\" scrollHeight=\"400px\"></cav-table>\n\n    <p-footer>\n        <button type=\"button\" pButton label=\"Close\" (click)=\"isVisibleSchedule=false\"\n            class=\"btn-secondary-outline\"></button>\n    </p-footer>\n</p-dialog>");

/***/ }),

/***/ "./src/app/pages/tools/actions/constant/common-action-constants.ts":
/*!*************************************************************************!*\
  !*** ./src/app/pages/tools/actions/constant/common-action-constants.ts ***!
  \*************************************************************************/
/*! exports provided: WARNING, SUCCESS, FAIL, ERROR, INFO, TYPE_PROCESS_DUMP, BREADCRUMB_HOME, BREADCRUMB_TAKE_PROCESS_DUMP, BREADCRUMB_PROCESS_DUMP, BREADCRUMB_DIAGNOSTIC_TOOL_ADV_SETTING, KEY_STATUS, KEY_MSG, KEY_MSTATUS, ACTION_DOWNLOAD, ACTION_DELETE, ACTION_VIEW_LOGS, STATUS_COMPLETED, STATUS_IN_PROGRESS, STATUS_ERROR, HOME_URL, SUMMARY_SUCCESS, SUMMARY_ERROR, SUMMARY_WARNING, SUMMARY_FAIL, SUMMARY_INFO, SEVERITY_SUCCESS, SEVERITY_ERROR, SEVERITY_WARNING, SEVERITY_INFO, SEVERITY_FAIL */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WARNING", function() { return WARNING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUCCESS", function() { return SUCCESS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FAIL", function() { return FAIL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ERROR", function() { return ERROR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INFO", function() { return INFO; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TYPE_PROCESS_DUMP", function() { return TYPE_PROCESS_DUMP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_HOME", function() { return BREADCRUMB_HOME; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_TAKE_PROCESS_DUMP", function() { return BREADCRUMB_TAKE_PROCESS_DUMP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_PROCESS_DUMP", function() { return BREADCRUMB_PROCESS_DUMP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_DIAGNOSTIC_TOOL_ADV_SETTING", function() { return BREADCRUMB_DIAGNOSTIC_TOOL_ADV_SETTING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KEY_STATUS", function() { return KEY_STATUS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KEY_MSG", function() { return KEY_MSG; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KEY_MSTATUS", function() { return KEY_MSTATUS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ACTION_DOWNLOAD", function() { return ACTION_DOWNLOAD; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ACTION_DELETE", function() { return ACTION_DELETE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ACTION_VIEW_LOGS", function() { return ACTION_VIEW_LOGS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STATUS_COMPLETED", function() { return STATUS_COMPLETED; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STATUS_IN_PROGRESS", function() { return STATUS_IN_PROGRESS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STATUS_ERROR", function() { return STATUS_ERROR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HOME_URL", function() { return HOME_URL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUMMARY_SUCCESS", function() { return SUMMARY_SUCCESS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUMMARY_ERROR", function() { return SUMMARY_ERROR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUMMARY_WARNING", function() { return SUMMARY_WARNING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUMMARY_FAIL", function() { return SUMMARY_FAIL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUMMARY_INFO", function() { return SUMMARY_INFO; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SEVERITY_SUCCESS", function() { return SEVERITY_SUCCESS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SEVERITY_ERROR", function() { return SEVERITY_ERROR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SEVERITY_WARNING", function() { return SEVERITY_WARNING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SEVERITY_INFO", function() { return SEVERITY_INFO; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SEVERITY_FAIL", function() { return SEVERITY_FAIL; });
const WARNING = "WARNING";
const SUCCESS = "SUCCESS";
const FAIL = "FAIL";
const ERROR = "ERROR";
const INFO = "INFO";
const TYPE_PROCESS_DUMP = "ProcessDump";
const BREADCRUMB_HOME = "Home";
const BREADCRUMB_TAKE_PROCESS_DUMP = "Take Process Dump";
const BREADCRUMB_PROCESS_DUMP = "Process Dump";
const BREADCRUMB_DIAGNOSTIC_TOOL_ADV_SETTING = "Diagnostic Tools Setting";
const KEY_STATUS = "status";
const KEY_MSG = "msg";
const KEY_MSTATUS = "mStatus";
const ACTION_DOWNLOAD = "Download";
const ACTION_DELETE = "Delete";
const ACTION_VIEW_LOGS = "View Logs";
const STATUS_COMPLETED = "Completed";
const STATUS_IN_PROGRESS = "In Progress";
const STATUS_ERROR = "Error";
const HOME_URL = "/home/dashboard";
const SUMMARY_SUCCESS = "SUCCESS";
const SUMMARY_ERROR = "ERROR";
const SUMMARY_WARNING = "WARNING";
const SUMMARY_FAIL = "FAIL";
const SUMMARY_INFO = "INFO";
const SEVERITY_SUCCESS = "success";
const SEVERITY_ERROR = "error";
const SEVERITY_WARNING = "warn";
const SEVERITY_INFO = "info";
const SEVERITY_FAIL = "fail";


/***/ }),

/***/ "./src/app/pages/tools/actions/thread-dump-revamp/analyze-thread-dump/analyze-thread-dump.component.scss":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/analyze-thread-dump/analyze-thread-dump.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-analyze-thread-dump .analyze-thread-dump-container .content-body {\n  height: 100%;\n}\n\n.stack-text {\n  overflow: auto;\n  border: 1px #666 solid;\n}\n\n.tab-adjust-left .ui-tabview.ui-tabview-top .ui-tabview-nav {\n  flex-flow: wrap;\n}\n\n.tab-adjust-left .ui-tabview.ui-tabview-top .ui-tabview-nav li {\n  width: auto !important;\n}");

/***/ }),

/***/ "./src/app/pages/tools/actions/thread-dump-revamp/analyze-thread-dump/analyze-thread-dump.component.ts":
/*!*************************************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/analyze-thread-dump/analyze-thread-dump.component.ts ***!
  \*************************************************************************************************************/
/*! exports provided: AnalyzeThreadDumpComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnalyzeThreadDumpComponent", function() { return AnalyzeThreadDumpComponent; });
/* 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 _ddr_data_model_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ddr-data-model.service */ "./src/app/pages/tools/actions/ddr-data-model.service.ts");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! highcharts */ "./node_modules/highcharts/highcharts.js");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var _services_thread_dump_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../services/thread-dump-service */ "./src/app/pages/tools/actions/thread-dump-revamp/services/thread-dump-service.ts");
/* harmony import */ var _common_action_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common-action.service */ "./src/app/pages/tools/actions/common-action.service.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var src_app_app_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/app.service */ "./src/app/app.service.ts");









let AnalyzeThreadDumpComponent = class AnalyzeThreadDumpComponent {
    constructor(sessionService, _ddrData, tdServiceObj, commonActionServiceObj, appService) {
        this.sessionService = sessionService;
        this._ddrData = _ddrData;
        this.tdServiceObj = tdServiceObj;
        this.commonActionServiceObj = commonActionServiceObj;
        this.appService = appService;
        this.tabs = [
            { label: 'State', routerLink: 'state' },
            { label: 'Category', routerLink: 'category' },
            { label: 'Common Methods', routerLink: 'common-methods' },
            { label: 'Most Used Methods', routerLink: 'most-used-methods' },
            { label: 'Thread Groups', routerLink: 'thread-groups' },
            { label: 'Deadlocks', routerLink: 'deadlocks' },
            { label: 'Hotstacks', routerLink: 'hotstacks' },
        ];
        this.analyseThreadDump = true;
        this.loading = false;
        this.showChart = false;
        this.showAllOption = false;
        this.showDownLoadReportIcon = true;
        this.showThreadTable = 0;
        this.selectedRowIndex = 0;
        this.showThreadGroup = false;
        this.deadlockMsg = "";
        this.isDeadlock = false;
        this.showHotstack = false;
        this.hotstackCompareCount = 3;
        this.tdInfoData = {};
        this.otherArr = [];
        this.isGoAgent = false;
        this.isJavaAgent = false;
        this.highcharts = highcharts__WEBPACK_IMPORTED_MODULE_3__;
        this.relativePath = "diagnosticTools/threadDump/thread-dump-analyze.json";
        this.loading = true;
    }
    ngOnChanges(changes) {
        this.fileName = this.value.filePath.substring(this.value.filePath.lastIndexOf('/') + 1);
        this.fullFileName = this.value.filePath;
        this.hotstackCompareCount = 3;
        this.agentType = this.value.agentType.toLowerCase();
        if (this.value.agentType.toLowerCase() === 'go') {
            this.isGoAgent = true;
            this.isJavaAgent = false;
        }
        else {
            this.isJavaAgent = true;
            this.isGoAgent = false;
        }
        if (!this.value.filePath.includes('_procdump'))
            this.showAnalysisThreadDump(changes);
        let log = [];
        for (let propName in changes) {
            let changedProp = changes[propName];
            let to = JSON.stringify(changedProp.currentValue);
        }
    }
    /*Method is used get host url*/
    getHostUrl(dcName) {
        var hostDcName;
        if (this.sessionService.preSession.multiDc === true) {
            if (dcName) {
                hostDcName = this._ddrData.getHostUrl(true) + "/tomcat/" + dcName;
            }
            else {
                hostDcName = this._ddrData.getHostUrl(true) + "/node" + "/ALL";
            }
        }
        else {
            hostDcName = this._ddrData.getHostUrl();
        }
        return hostDcName;
    }
    showAnalysisThreadDump(changes) {
        let filePath = this.value.filePath;
        let sunstringFilePath = filePath.substring(filePath.indexOf("logs"), filePath.length);
        let url;
        if (this.sessionService.preSession.multiDc)
            url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/tomcat/" + this.value['nodeName'] + "/" + sunstringFilePath;
        else
            url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + '/' + sunstringFilePath;
        this.appService.fetchTextData(url).subscribe(data => {
            this.assignThreadDump(data);
        }, error => {
            console.error("File not found or having some other issue ", filePath);
        });
        this.getParsedThreadDumpData(filePath);
        this.getcommonMethodCount(filePath, this.agentType);
    }
    getcommonMethodCount(filePath, agent) {
        this.tdInfoData.tr = this.sessionService.session.testRun.id;
        this.tdInfoData.masterTR = this.sessionService.session.testRun.id;
        this.tdInfoData.filePath = filePath;
        this.tdInfoData.agentType = agent;
        if (this.sessionService.preSession.multiDc) {
            let url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/tomcat/" + this.value['nodeName'] + '/DashboardServer/v2' + src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].api.threadDump.getCommonMethods.endpoint;
            this.tdServiceObj.getDataUsingPost(url, this.tdInfoData).subscribe(res => {
                this.doAssignValueCommonMethod(res);
            });
        }
        else {
            this.tdServiceObj.getCommonMethods(this.tdInfoData).subscribe(res => {
                this.doAssignValueCommonMethod(res);
            });
        }
    }
    doAssignValueCommonMethod(data) {
        let hotStackArr = this.convertHotStackMapToArr(data.hotstack);
        this.createHotStackBarChart(hotStackArr);
    }
    createHotStackBarChart(hotStackArr) {
        if (hotStackArr.length > 0) {
            this.showHotstack = true;
            this.hotstackCount = "" + hotStackArr.length + "";
        }
        else
            this.showHotstack = false;
        this.options5 = {
            chart: {
                type: 'column'
            },
            title: {
                text: ''
            },
            credits: {
                enabled: false
            },
            subtitle: {
                text: ''
            },
            xAxis: {
                crosshair: true,
                title: {
                    text: 'Hotstack'
                },
                labels: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                title: {
                    text: 'Hotstack Count'
                }
            },
            tooltip: {
                style: { fontSize: '7pt' },
                formatter: function () {
                    let splittedCM = this.point.name.split("\n");
                    let tooltip = "";
                    splittedCM.forEach((val, index) => {
                        tooltip += "" + val + "<br/>";
                    });
                    tooltip += "<b>" + this.point.y + "</b>";
                    return tooltip;
                }
            },
            plotOptions: {
                column: {
                    cursor: 'pointer',
                    allowPointSelect: true,
                    events: {
                        click: function (event) {
                            // this.filterTopMethod(event);
                            this.assignHotStack(event);
                        }.bind(this)
                    },
                    column: {
                        pointPadding: 0.2,
                        borderWidth: 0
                    }
                },
                series: {
                    pointWidth: 25
                }
            },
            series: [{
                    showInLegend: false,
                    enableMouseTracking: true,
                    name: '',
                    data: hotStackArr
                }],
            exporting: {
                enabled: false
            }
        };
    }
    convertHotStackMapToArr(hotStackMap) {
        let hotStackArr = [];
        let arr = Object.keys(hotStackMap);
        arr.forEach((val, index) => {
            let hotStackCount = hotStackMap[val];
            if (index == 0)
                this.hotstack = val.replace(/at /g, '');
            if (hotStackCount > 1)
                hotStackArr.push({ "name": val, "y": hotStackCount });
        });
        if (hotStackArr.length == 0)
            this.hotstack = "";
        return hotStackArr;
    }
    handleChange(e) {
        if (e.index == 4)
            this.showThreadTable = 2;
        else if (e.index == 5) {
            if (!this.isDeadlock)
                this.threadDumpInfo = [];
            this.indiThreadInfo = "";
            this.stacktrace = "";
        }
        else {
            this.showThreadTable = 0;
            this.threadDumpInfo = this.getThreadDumpInfo();
        }
        this.showAllThreadData();
    }
    convertCommonMethodMapToArr(data) {
        let tDCategoryArr = [];
        let arr = Object.keys(data);
        arr.forEach((val, index) => {
            let oneArr = data[val];
            if (index == 0)
                this.commonMethods = oneArr["commonMethods"].replace(/at /g, '');
            tDCategoryArr.push({ "name": oneArr["commonMethods"], "y": oneArr["matchCount"] });
        });
        if (tDCategoryArr.length == 0)
            this.commonMethods = "";
        return tDCategoryArr;
    }
    createTopMethodBarChart(topMethodArr) {
        if (topMethodArr.length > 0)
            this.showUsedMethodChart = true;
        else
            this.showUsedMethodChart = false;
        this.options3 = {
            chart: {
                type: 'column'
            },
            title: {
                text: ''
            },
            credits: {
                enabled: false
            },
            subtitle: {
                text: ''
            },
            xAxis: {
                crosshair: true,
                title: {
                    text: 'Top Used Methods'
                },
                labels: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                title: {
                    text: 'Thread Count'
                }
            },
            tooltip: {
                headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                pointFormat: '<tr><td style="padding:0"><b>{point.y}</b></td></tr>',
                footerFormat: '</table>',
                shared: true,
                useHTML: true
            },
            plotOptions: {
                column: {
                    cursor: 'pointer',
                    allowPointSelect: true,
                    events: {
                        click: function (event) {
                            this.filterTopMethod(event);
                        }.bind(this)
                    },
                    column: {
                        pointPadding: 0.2,
                        borderWidth: 0
                    }
                },
                series: {
                    pointWidth: 25
                }
            },
            series: [{
                    showInLegend: false,
                    enableMouseTracking: true,
                    name: '',
                    data: topMethodArr
                }],
            exporting: {
                enabled: false
            }
        };
    }
    filterThreadGroup(event) {
        let filteredTDInfo = [];
        let otherArr = this.otherArr;
        this.threadDumpData.forEach((val, index) => {
            let threadInfo = val;
            if (event.point.name == "Others" && otherArr.filter((x) => threadInfo["threadName"].startsWith(x)).length == 1) {
                filteredTDInfo.push({ "threadId": threadInfo["threadId"], "threadName": threadInfo["threadName"], "priority": threadInfo["priority"], "threadState": threadInfo["threadState"], "nativeId": threadInfo["nativeId"], "stackTrace": threadInfo["stackTrace"] });
            }
            else if (threadInfo["threadName"].startsWith(event.point.name)) {
                filteredTDInfo.push({ "threadId": threadInfo["threadId"], "threadName": threadInfo["threadName"], "priority": threadInfo["priority"], "threadState": threadInfo["threadState"], "nativeId": threadInfo["nativeId"], "stackTrace": threadInfo["stackTrace"] });
            }
        });
        if (filteredTDInfo.length > 0) {
            this.showStackTrace(filteredTDInfo[0]);
            this.threadTableHeader = " [Threads:" + filteredTDInfo.length + "]";
        }
        this.showAllOption = true;
        this.threadDumpInfo = filteredTDInfo;
    }
    filterTopMethod(event) {
        let filteredTDInfo = [];
        this.threadDumpData.forEach((val, index) => {
            let threadInfo = val;
            if (threadInfo["stackTrace"].indexOf(event.point.name) != -1) {
                filteredTDInfo.push({ "threadId": threadInfo["threadId"], "threadName": threadInfo["threadName"], "priority": threadInfo["priority"], "threadState": threadInfo["threadState"], "nativeId": threadInfo["nativeId"], "stackTrace": threadInfo["stackTrace"] });
            }
        });
        if (filteredTDInfo.length > 0) {
            this.showStackTrace(filteredTDInfo[0]);
            this.threadTableHeader = " [Threads:" + filteredTDInfo.length + "]";
        }
        this.showAllOption = true;
        this.threadDumpInfo = filteredTDInfo;
    }
    convertTopMethodMapToArr(data) {
        let topMethodArr = [];
        let arr = Object.keys(data);
        arr.forEach((val, index) => {
            let topCount = data[val];
            if (topCount > 1)
                topMethodArr.push({ "name": val, "y": topCount });
        });
        return topMethodArr;
    }
    /*
    * BarChart to show Common Methods
    */
    createBarChart(TDCatgoryArr) {
        if (TDCatgoryArr.length > 0)
            this.showBarChart = true;
        else
            this.showBarChart = false;
        this.options2 = {
            chart: {
                type: 'column'
            },
            title: {
                text: ''
            },
            credits: {
                enabled: false
            },
            subtitle: {
                text: ''
            },
            xAxis: {
                crosshair: true,
                title: {
                    text: 'Common Methods'
                },
                labels: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                title: {
                    text: 'Count'
                }
            },
            tooltip: {
                style: { fontSize: '7pt' },
                formatter: function () {
                    let splittedCM = this.point.name.split("\n");
                    let tooltip = "";
                    splittedCM.forEach((val, index) => {
                        tooltip += "" + val + "<br/>";
                    });
                    tooltip += "<b>" + this.point.y + "</b>";
                    return tooltip;
                }
            },
            plotOptions: {
                column: {
                    cursor: 'pointer',
                    allowPointSelect: true,
                    column: {
                        pointPadding: 0.2,
                        borderWidth: 0
                    },
                    events: {
                        click: function (event) {
                            this.assignCommonMethod(event);
                        }.bind(this)
                    }
                },
                series: {
                    pointWidth: 25
                }
            },
            series: [
                {
                    showInLegend: false,
                    enableMouseTracking: true,
                    name: '',
                    data: TDCatgoryArr
                }
            ],
            exporting: {
                enabled: false
            }
        };
    }
    /*
      * used to parse Thread dump file
      */
    getParsedThreadDumpData(filePath) {
        this.tdInfoData.tr = this.sessionService.session.testRun.id;
        this.tdInfoData.masterTR = this.sessionService.session.testRun.id;
        this.tdInfoData.filePath = filePath;
        if (this.sessionService.preSession.multiDc) {
            let url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/tomcat/" + this.value['nodeName'] + '/DashboardServer/v2' + src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].api.threadDump.parseTD.endpoint;
            this.tdServiceObj.getDataUsingPost(url, this.tdInfoData).subscribe(res => {
                this.commonActionServiceObj.loading = false;
                this.doAssignValueParseTD(res, filePath);
            });
        }
        else {
            this.tdServiceObj.parseThreadDumpFile(this.tdInfoData).subscribe(res => {
                this.commonActionServiceObj.loading = false;
                this.doAssignValueParseTD(res, filePath);
            });
        }
    }
    assignCommonMethod(event) {
        this.commonMethods = event.point.name.replace(/at /g, '');
    }
    assignHotStack(event) {
        this.hotstack = event.point.name.replace(/at /g, '');
        this.hotstackCount = event.point.y;
    }
    /*
     *assign value to pieChart object and Analyze Thread Dump
     */
    doAssignValueParseTD(data, filePath) {
        let arrAggTDState = this.convertAggMaptoArr(data.aggregateState);
        this.createPieChart(arrAggTDState);
        this.threadDumpData = data.data;
        let deadlockMessage = data.adlockMessage;
        if (deadlockMessage.length > 0) {
            this.deadlockMsg = deadlockMessage;
            this.isDeadlock = true;
        }
        else {
            this.deadlockMsg = "No deadlock found";
            this.isDeadlock = false;
        }
        this.deadlockthreadName = data.deadloackThreadList;
        this.createPieChartForDaemonOrNonDaemon(data.daemonOrNonDaemonCount);
        let threadGroupArr = this.convertThreadGroupMapToArr(data.threadGroup);
        this.createPieChartForThreadGroup(threadGroupArr);
        this.threadDumpInfo = this.getThreadDumpInfo();
        let FilePath = filePath.substring(filePath.lastIndexOf('/') + 1);
        this.analyzeHeader = "[Total Threads:" + this.threadDumpInfo.length + ", File:" + FilePath + "]";
        this.threadTableHeader = "[Threads:" + this.threadDumpInfo.length + ",Thread State : All]";
    }
    convertThreadGroupMapToArr(threadGroupMap) {
        var threadGroupArr = [];
        let otherArr = [];
        let otherCount = 0;
        for (let prop in threadGroupMap) {
            if (threadGroupMap.hasOwnProperty(prop) && threadGroupMap[prop] > 1) {
                threadGroupArr.push({ "name": prop, "y": threadGroupMap[prop] });
            }
            else {
                otherCount++;
                otherArr.push(prop);
            }
        }
        threadGroupArr.push({ "name": "Others", "y": otherCount });
        this.otherArr = otherArr;
        return threadGroupArr;
    }
    showDeadlockThreads() {
        let parsedTDInfo = [];
        this.threadDumpData.forEach((val, index) => {
            if (this.deadlockthreadName.indexOf("\"" + val['threadName'] + "\"") != -1)
                parsedTDInfo.push({ "threadId": this.threadDumpData[index]["threadId"], "threadName": this.threadDumpData[index]["threadName"], "priority": this.threadDumpData[index]["priority"], "threadState": this.threadDumpData[index]["threadState"], "nativeId": this.threadDumpData[index]["nativeId"], "stackTrace": this.threadDumpData[index]["stackTrace"] });
        });
        if (parsedTDInfo.length > 0) {
            this.threadTableHeader = " [Threads:" + parsedTDInfo.length + "]";
            this.showStackTrace(parsedTDInfo[0]);
        }
        this.showAllOption = true;
        this.threadDumpInfo = parsedTDInfo;
    }
    createPieChartForThreadGroup(threadGroupArr) {
        if (threadGroupArr.length > 0)
            this.showThreadGroup = true;
        else
            this.showThreadGroup = false;
        this.options4 = {
            chart: {
                type: 'pie',
            },
            credits: {
                enabled: false
            },
            title: { text: '', style: { 'fontSize': '13px' } },
            tooltip: {
                pointFormat: ' Count: <b>{point.y}</b><br/> Percenatge: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    cursor: 'pointer',
                    allowPointSelect: true,
                    dataLabels: {
                        enabled: true,
                        format: '<b> {point.name} </b>: {point.percentage:.2f} %',
                        style: {
                            textShadow: false,
                            textOutline: 0
                        }
                    },
                    events: {
                        click: function (event) {
                            this.filterThreadGroup(event);
                        }.bind(this)
                    },
                }
            },
            series: [
                {
                    name: '',
                    enableMouseTracking: true,
                    data: threadGroupArr
                }
            ],
            exporting: {
                enabled: false
            }
        };
    }
    createPieChartForDaemonOrNonDaemon(countArr) {
        let TCategoryArr = [];
        if (countArr[0] > 0)
            TCategoryArr.push({ "name": "Daemon", "y": countArr[0] });
        if (countArr[1] > 0)
            TCategoryArr.push({ "name": "Non-Daemon", "y": countArr[1] });
        if (countArr[2] > 0)
            TCategoryArr.push({ "name": "GC", "y": countArr[2] });
        this.options1 = {
            chart: {
                type: 'pie',
            },
            credits: {
                enabled: false
            },
            title: { text: '', style: { 'fontSize': '13px' } },
            tooltip: {
                pointFormat: 'Count:<b>{point.y}</b><br/>{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    cursor: 'pointer',
                    allowPointSelect: true,
                    dataLabels: {
                        enabled: true,
                        format: '<b> {point.name} </b>: {point.percentage:.2f} %',
                        style: {
                            textShadow: false,
                            textOutline: 0
                        }
                    },
                    events: {
                        click: function (event) {
                            this.clickHandler(event);
                        }.bind(this)
                    },
                }
            },
            series: [
                {
                    name: 'Percentage',
                    enableMouseTracking: true,
                    data: TCategoryArr
                }
            ],
            exporting: {
                enabled: false
            }
        };
    }
    /*
    **/
    getThreadDumpInfo() {
        var parsedTDInfo = [];
        this.stacktrace = "";
        if (this.threadDumpData[0] != null) {
            this.threadDumpData.forEach((val, index) => {
                if (index == 0)
                    this.showStackTrace({ "threadId": this.threadDumpData[index]["threadId"], "threadName": this.threadDumpData[index]["threadName"], "priority": this.threadDumpData[index]["priority"], "threadState": this.threadDumpData[index]["threadState"], "nativeId": this.threadDumpData[index]["nativeId"], "stackTrace": this.threadDumpData[index]["stackTrace"] });
                parsedTDInfo.push({ "threadId": this.threadDumpData[index]["threadId"], "threadName": this.threadDumpData[index]["threadName"], "priority": this.threadDumpData[index]["priority"], "threadState": this.threadDumpData[index]["threadState"], "nativeId": this.threadDumpData[index]["nativeId"], "stackTrace": this.threadDumpData[index]["stackTrace"] });
            });
        }
        return parsedTDInfo;
    }
    /*
    *convert map to arr
    */
    convertAggMaptoArr(aggregateMap) {
        var aggTDStateArr = [];
        for (let prop in aggregateMap) {
            if (aggregateMap.hasOwnProperty(prop)) {
                aggTDStateArr.push({ "name": prop, "y": aggregateMap[prop] });
            }
        }
        return aggTDStateArr;
    }
    /*
    * Changing Stack Trace and Thread Table on click of PieCHart
    * */
    clickHandler(event) {
        this.showAllOption = true;
        let filterType = "";
        let filteredTDInfo = [];
        this.threadDumpData.forEach((val, index) => {
            if ((this.threadDumpData[index]["threadState"] == event.point.name)) {
                filterType = "State";
                filteredTDInfo.push({ "threadId": this.threadDumpData[index]["threadId"], "threadName": this.threadDumpData[index]["threadName"], "priority": this.threadDumpData[index]["priority"], "threadState": this.threadDumpData[index]["threadState"], "nativeId": this.threadDumpData[index]["nativeId"], "stackTrace": this.threadDumpData[index]["stackTrace"] });
            }
            else if (event.point.name == "Daemon" && (this.threadDumpData[index]["stackTrace"].indexOf("daemon") != -1)) {
                filterType = "Category";
                filteredTDInfo.push({ "threadId": this.threadDumpData[index]["threadId"], "threadName": this.threadDumpData[index]["threadName"], "priority": this.threadDumpData[index]["priority"], "threadState": this.threadDumpData[index]["threadState"], "nativeId": this.threadDumpData[index]["nativeId"], "stackTrace": this.threadDumpData[index]["stackTrace"] });
            }
            else if (event.point.name == "GC" && (this.threadDumpData[index]["stackTrace"].indexOf("GC") != -1)) {
                filterType = "Category";
                filteredTDInfo.push({ "threadId": this.threadDumpData[index]["threadId"], "threadName": this.threadDumpData[index]["threadName"], "priority": this.threadDumpData[index]["priority"], "threadState": this.threadDumpData[index]["threadState"], "nativeId": this.threadDumpData[index]["nativeId"], "stackTrace": this.threadDumpData[index]["stackTrace"] });
            }
            else if (event.point.name == "Non-Daemon" && (this.threadDumpData[index]["stackTrace"].indexOf("daemon") == -1) && (this.threadDumpData[index]["stackTrace"].indexOf("ParallelGC") == -1)) {
                filterType = "Category";
                filteredTDInfo.push({ "threadId": this.threadDumpData[index]["threadId"], "threadName": this.threadDumpData[index]["threadName"], "priority": this.threadDumpData[index]["priority"], "threadState": this.threadDumpData[index]["threadState"], "nativeId": this.threadDumpData[index]["nativeId"], "stackTrace": this.threadDumpData[index]["stackTrace"] });
            }
        });
        if (filterType == "State")
            this.threadTableHeader = "[Total Threads :" + filteredTDInfo.length + ", Thread State : " + event.point.name + "]";
        else if (filterType == "Category")
            this.threadTableHeader = "[Total Threads :" + filteredTDInfo.length + ", Thread Category : " + event.point.name + "]";
        if (filteredTDInfo.length > 0)
            this.showStackTrace(filteredTDInfo[0]);
        this.threadDumpInfo = filteredTDInfo;
    }
    showStackTrace(data) {
        this.selectedThreadInfo = data;
        this.stacktrace = data.stackTrace;
        this.indiThreadInfo = "[Name : " + data.threadName + ",id : " + data.threadId + "]";
    }
    showAllThreadData() {
        this.threadDumpInfo = this.getThreadDumpInfo();
        this.threadTableHeader = "[Total Threads :" + this.threadDumpInfo.length + ", Thread State : All]";
        this.showAllOption = false;
    }
    /*
      * used to show piechart on basis of state
      */
    createPieChart(arrAggTDState) {
        if (arrAggTDState.length == 0) {
            this.showChart = false;
        }
        else {
            this.showChart = true;
        }
        this.options = {
            chart: {
                type: 'pie',
            },
            credits: {
                enabled: false
            },
            title: { text: '', style: { 'fontSize': '13px' } },
            tooltip: {
                pointFormat: 'Count:<b> {point.y}</b><br/>{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    cursor: 'pointer',
                    allowPointSelect: true,
                    dataLabels: {
                        enabled: true,
                        format: '<b> {point.name}  </b>: {point.percentage:.2f} %',
                        style: {
                            textShadow: false,
                            textOutline: 0
                        }
                    },
                    events: {
                        click: function (event) {
                            this.clickHandler(event);
                        }.bind(this)
                    },
                }
            },
            series: [
                {
                    enableMouseTracking: true,
                    name: 'Percentage',
                    data: arrAggTDState
                }
            ],
            exporting: {
                enabled: false
            }
        };
    }
    getTopFramedHotstack() {
        this.tdInfoData.tr = this.sessionService.session.testRun.id;
        this.tdInfoData.masterTR = this.sessionService.session.testRun.id;
        this.tdInfoData.topFrames = this.hotstackCompareCount;
        this.tdInfoData.agentType = this.agentType;
        this.tdInfoData.filePath = this.fullFileName;
        if (this.sessionService.preSession.multiDc) {
            let url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/tomcat/" + this.value['nodeName'] + '/DashboardServer/v2' + src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].api.threadDump.getHotstackBasedTopFrames.endpoint;
            this.tdServiceObj.getDataUsingPost(url, this.tdInfoData).subscribe(res => {
                let hotStackArr = this.convertHotStackMapToArr(res['hotstack']);
                this.createHotStackBarChart(hotStackArr);
            });
        }
        else {
            this.tdServiceObj.getHotstackBasedTopFrames(this.tdInfoData).subscribe(res => {
                let hotStackArr = this.convertHotStackMapToArr(res['hotstack']);
                this.createHotStackBarChart(hotStackArr);
            });
        }
    }
    assignThreadDump(data) {
        this.property = data;
    }
    sortColumnsOnCustom(event) {
        if (event["field"] === "priority") {
            if (event.order == -1) {
                var temp = (event["field"]);
                event.order = 1;
                event.data = event.data.sort(function (a, b) {
                    var value = Number(a[temp]);
                    var value2 = Number(b[temp]);
                    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]);
                    var value2 = Number(b[temp]);
                    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);
                });
            }
        }
    }
    Immutablepush(arr, newEntry) {
        return [...arr, newEntry];
    }
    downloadReport(downloadType) {
        let threadDetailsRenameArray = {};
        let threadDetailsColorder = [];
        if (this.isGoAgent) {
            threadDetailsRenameArray = { "threadName": "Goroutine Name", "threadState": "State", "threadId": "Goroutine ID", "stackTrace": "Stack Trace" };
            threadDetailsColorder = ["Goroutine Name", "State", "Goroutine ID", "Stack Trace"];
            this.threadDumpInfo.forEach((val, index) => {
                delete val['priority'];
                delete val['nativeId'];
            });
        }
        else {
            threadDetailsRenameArray = { "threadName": "Thread Name", "priority": "Thread Priority", "threadState": "State", "threadId": "Thread ID", "nativeId": "Native ID", "stackTrace": "Stack Trace" };
            threadDetailsColorder = ["Thread Name", "Thread Priority", "State", "Thread ID", "Native ID", "Stack Trace"];
        }
        this.threadDumpInfo.forEach((val, index) => {
            delete val['_$visited'];
        });
        let downloadObj = {
            downloadType: downloadType,
            strSrcFileName: "ThreadDumpAdvanceReport",
            strRptTitle: "Thread Dump Analyzer",
            jsonData: JSON.stringify(this.threadDumpInfo),
            renameArray: JSON.stringify(threadDetailsRenameArray),
            varFilterCriteria: this.threadTableHeader,
            colOrder: threadDetailsColorder.toString()
        };
        let ipWithProd = "";
        if (this.sessionService.preSession.multiDc === true) {
            ipWithProd = this.getHostUrl("ALL") + '/' + "DashboardServer";
        }
        else {
            ipWithProd = this.getHostUrl(this.value.dcName) + '/' + "DashboardServer";
        }
        if (ipWithProd.includes("/tomcat")) {
            ipWithProd = ipWithProd.replace("/tomcat", "/node");
        }
        let downloadFileUrl = decodeURIComponent(ipWithProd) + "/v2/diagnosticTools/threadDump/downloadAngularReport";
        this.appService.postTextData(downloadFileUrl, (downloadObj)).subscribe(res => (this.openReport(res)));
    }
    openReport(res) {
        let fileName = res;
        let filePath = "common/";
        let url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + '/' + filePath + fileName;
        this.downloadURI(url, fileName);
    }
    checkDownloadType(res) {
        res = JSON.parse(res);
        let dcinfo;
        dcinfo = res.dcInfo;
        let keys = Object.keys(dcinfo);
        for (let i = 0; i < keys.length; i++) {
            if (dcinfo[keys[i]].isMaster == true) {
                this.openDownloadReports(res, dcinfo[keys[i]].dc);
            }
        }
    }
    downloadURI(uri, name) {
        var link = document.createElement("a");
        link.download = name;
        link.href = uri;
        var clickEvent = document.createEvent("MouseEvent");
        clickEvent.initEvent("click", true, true);
        link.dispatchEvent(clickEvent);
    }
    openDownloadReports(res, dcName) {
        let ipWithProd;
        if (dcName)
            ipWithProd = this.getURLbasedOnDC(dcName, res.dcInfo); //single mai res.info ok.
        else
            ipWithProd = this.getHostUrl();
        let fileName;
        if (res.tierData) {
            fileName = res.tierData;
        }
        else
            fileName = res;
        window.open(decodeURIComponent(ipWithProd + '/' + this.productName).replace("/netstorm", "").replace("/netdiagnostics", "") + "/common/" + fileName);
    }
    getURLbasedOnDC(dcName, dcInfo) {
        let dcinfo;
        if (dcInfo)
            dcinfo = dcInfo;
        else
            dcinfo = this.dcInfo;
        let dcObject = dcinfo.find((dcObj) => { return dcObj.dc == dcName; });
        this.dcTestRun = dcObject.testRun;
        return dcObject.protocol + "://" + dcObject.ip + ":" + dcObject.port;
    }
    onClickButtonEvent(event) {
        this.showStackTrace(event.cavEventExt.row);
    }
};
AnalyzeThreadDumpComponent.ctorParameters = () => [
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_4__["SessionService"] },
    { type: _ddr_data_model_service__WEBPACK_IMPORTED_MODULE_2__["DdrDataModelService"] },
    { type: _services_thread_dump_service__WEBPACK_IMPORTED_MODULE_5__["ThreadDumpService"] },
    { type: _common_action_service__WEBPACK_IMPORTED_MODULE_6__["CommonActionService"] },
    { type: src_app_app_service__WEBPACK_IMPORTED_MODULE_8__["AppService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('value')
], AnalyzeThreadDumpComponent.prototype, "value", void 0);
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('productName')
], AnalyzeThreadDumpComponent.prototype, "productName", void 0);
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('dcInfo')
], AnalyzeThreadDumpComponent.prototype, "dcInfo", void 0);
AnalyzeThreadDumpComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-analyze-thread-dump',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./analyze-thread-dump.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/analyze-thread-dump/analyze-thread-dump.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./analyze-thread-dump.component.scss */ "./src/app/pages/tools/actions/thread-dump-revamp/analyze-thread-dump/analyze-thread-dump.component.scss")).default]
    })
], AnalyzeThreadDumpComponent);



/***/ }),

/***/ "./src/app/pages/tools/actions/thread-dump-revamp/compare-thread-dump/compare-thread-dump.component.scss":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/compare-thread-dump/compare-thread-dump.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-compare-thread-dump .loadingIcon1 {\n  height: 50px;\n  margin-left: 50%;\n}\napp-compare-thread-dump .hotstack {\n  height: 200px;\n  overflow: auto;\n  background: white;\n  border: 1px #DEDEDE solid;\n}\napp-compare-thread-dump .ddr-custom-tree .ui-tree {\n  display: block;\n  width: 100%;\n}\napp-compare-thread-dump .ddr-custom-tree .ui-tree .ui-tree-container .ui-treenode .ui-treenode-content {\n  height: auto;\n}\napp-compare-thread-dump .threadDumpSummary {\n  height: calc(100vh - 125px);\n  overflow: auto;\n}");

/***/ }),

/***/ "./src/app/pages/tools/actions/thread-dump-revamp/compare-thread-dump/compare-thread-dump.component.ts":
/*!*************************************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/compare-thread-dump/compare-thread-dump.component.ts ***!
  \*************************************************************************************************************/
/*! exports provided: CompareThreadDumpComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompareThreadDumpComponent", function() { return CompareThreadDumpComponent; });
/* 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 src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var _ddr_data_model_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ddr-data-model.service */ "./src/app/pages/tools/actions/ddr-data-model.service.ts");
/* harmony import */ var _common_action_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common-action.service */ "./src/app/pages/tools/actions/common-action.service.ts");
/* harmony import */ var _services_thread_dump_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../services/thread-dump-service */ "./src/app/pages/tools/actions/thread-dump-revamp/services/thread-dump-service.ts");
/* harmony import */ var _common_services__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common.services */ "./src/app/pages/tools/actions/common.services.ts");
/* harmony import */ var src_app_app_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/app.service */ "./src/app/app.service.ts");








let CompareThreadDumpComponent = class CompareThreadDumpComponent {
    constructor(commonServices, sessionService, commonActionService, tdServiceObj, _ddrData, appService) {
        this.commonServices = commonServices;
        this.sessionService = sessionService;
        this.commonActionService = commonActionService;
        this.tdServiceObj = tdServiceObj;
        this._ddrData = _ddrData;
        this.appService = appService;
        this.hotStackArr = [];
        this.loading = false;
        this.threadDumpInfo = [];
        this.statisticsTDData = [];
        this.threadDumpInfoObject = [];
        this.hotstackTree = [];
        this.arrKey = [];
        this.stackArr = [];
        this.headerArr = [];
        this.deadlockArr = [];
        this.deadlockTree = [];
        this.totalThreadInfo = [];
        this.hotstackThreadCount = 0;
        this.showOption = 0;
        this.threadDumpTimes = "";
        this.hotstackTopFrames = 3;
        this.showThreadDetails = 1;
        this.showHotstack = 1;
        this.showDeadlock = 1;
        this.isSummary = false;
        this.relativePathForTotslThreadTable = "diagnosticTools/threadDump/total-threads-table.json";
        this.relativePathForhotStackTable = "diagnosticTools/threadDump/hot-stack-table.json";
        this.relativePathForDeadlockTable = "diagnosticTools/threadDump/deadlock-table.json";
        this.id = this.commonServices.getData();
    }
    ngOnInit() {
        this.productName = this.sessionService.session.cctx.prodType;
        this.productName = this.productName.toLowerCase();
        this.relativePathForTotslThreadTable = "diagnosticTools/threadDump/total-threads-table.json";
    }
    ngOnChanges(changes) {
        this.productName = this.sessionService.session.cctx.prodType;
        this.productName = this.productName.toLowerCase();
        this.isSummary = false;
        let filePaths = "";
        let fileArr = [];
        this.loading = true;
        this.threadDumpTimes = "";
        let threadDumpInfo = [];
        this.hotstackTopFrames = 3;
        this.threadDumpSummaryInfo.forEach((val, index) => {
            if (val.filePath.endsWith("_procdump")) {
                val.filePath = val.filePath.substring(0, val.filePath.indexOf("_procdump"));
            }
            filePaths += val.filePath + "|";
            fileArr.push(val.filePath);
            let filePathStr = val.filePath;
            if (index < this.threadDumpSummaryInfo.length - 1)
                filePathStr += ",";
            threadDumpInfo.push(filePathStr);
            this.threadDumpTimes += val.timeStamp + ",";
        });
        this.threadDumpInfo = threadDumpInfo;
        this.threadDumpTimes = this.threadDumpTimes.substring(0, this.threadDumpTimes.length - 1);
        filePaths = filePaths.substring(0, filePaths.length - 1);
        this.filePathsInfo = filePaths;
        this.getThreadDumpSummaryInfo(filePaths);
        this.getStatisticsTDdata(fileArr);
        for (let propName in changes) {
            let changedProp = changes[propName];
            let to = JSON.stringify(changedProp.currentValue);
        }
    }
    getThreadDumpSummaryInfo(filePaths) {
        this.commonActionService.loading = true;
        this.tdInfoData = {};
        this.tdInfoData.filePath = filePaths;
        this.tdInfoData.topFrames = this.hotstackTopFrames;
        this.tdServiceObj.getSummaryOfThreadDumps(this.tdInfoData).subscribe(res => {
            this.commonActionService.loading = false;
            this.openSummaryThreadDump(res);
        });
    }
    /*Method to get DC IP PORT */
    getURLbasedOnDC(dcName, dcInfo) {
        return location.protocol + "//" + location.host + "/tomcat/" + dcName;
    }
    openSummaryThreadDump(data) {
        this.loading = false;
        if (data.summarizedHotStack)
            this.convertHotStackMapToArr(data.summarizedHotStack);
        this.createHotstackTree();
        if (data.summarizedDeadlock)
            this.convertDeadlockMapToArr(data.summarizedDeadlock);
        this.createDeadlockTree();
    }
    convertDeadlockMapToArr(deadlockMap) {
        let mainArr = [];
        let arr = Object.keys(deadlockMap);
        arr.forEach((val, index) => {
            let deadlockArr = deadlockMap[val];
            var obj = {};
            obj['deadlockInfo'] = deadlockArr;
            mainArr.push(obj);
        });
        this.deadlockArr = mainArr;
    }
    showDeadocks() {
        if (this.showDeadlock == 1)
            this.showDeadlock = 0;
        else
            this.showDeadlock = 1;
    }
    showStatistics() {
        if (this.showOption == 5)
            this.showOption = 0;
        else
            this.showOption = 5;
    }
    showAllThreds() {
        if (this.showThreadDetails == 0)
            this.showThreadDetails = 1;
        else
            this.showThreadDetails = 0;
    }
    createDeadlockTree() {
        let deadlockTree = [];
        this.deadlockArr.forEach((val, index) => {
            var obj = {};
            let threadCount = index;
            obj['label'] = "Deadlock" + (++threadCount) + " [Thread :" + val['deadlockInfo'].length + "]";
            var childrenArr = [];
            var childrenObj = {};
            childrenObj['label'] = index;
            childrenObj['type'] = 'deadlock';
            childrenArr.push(childrenObj);
            obj['children'] = childrenArr;
            deadlockTree.push(obj);
        });
        this.deadlockTree = deadlockTree;
    }
    createHotstackTree() {
        let hotstackTree = [];
        this.hotStackArr.forEach((val, index) => {
            var obj = {};
            let threadCount = index;
            obj['label'] = "Hotstack" + (++threadCount) + " [Threads :" + val['y'] + "]";
            var childrenArr = [];
            var childrenObj = {};
            childrenObj['label'] = index;
            childrenObj['type'] = 'hotstack';
            childrenArr.push(childrenObj);
            obj['children'] = childrenArr;
            hotstackTree.push(obj);
        });
        this.hotstackTree = hotstackTree;
    }
    convertHotStackMapToArr(hotStackMap) {
        let hotStackArr = [];
        let mainArr = [];
        this.hotstackThreadCount = 0;
        let arr = Object.keys(hotStackMap);
        arr.forEach((val, index) => {
            let summaryTDInfo = hotStackMap[val];
            if (summaryTDInfo['aggregateCount'] > 1) {
                hotStackArr.push({ "name": val, "y": summaryTDInfo['summarizedTD'].length });
                var threadDumpInfoArr = [];
                summaryTDInfo['summarizedTD'].forEach((val1, index1) => {
                    threadDumpInfoArr.push({ "threadId": val1["threadId"], "threadName": val1["threadName"], "priority": val1["priority"], "threadState": val1["threadState"], "nativeId": val1["nativeId"], "stackTrace": val1["stackTrace"] });
                });
                this.hotstackThreadCount += threadDumpInfoArr.length;
                let obj = {};
                obj['hotstack'] = val;
                obj['threadDumpInfo'] = threadDumpInfoArr;
                mainArr.push(obj);
            }
        });
        this.threadDumpInfoObject = mainArr;
        this.hotStackArr = hotStackArr;
    }
    /*Method is used get host url*/
    getHostUrl() {
        var hostDcName;
        if (this.sessionService.preSession.multiDc === true) {
            hostDcName = this._ddrData.getHostUrl();
        }
        else {
            hostDcName = this._ddrData.getHostUrl();
        }
        return hostDcName;
    }
    showHotstacks() {
        if (this.showHotstack == 0)
            this.showHotstack = 1;
        else
            this.showHotstack = 0;
    }
    getStatisticsTDdata(filepaths) {
        let arrData = [];
        let arrFile = [];
        if (filepaths.length >= 2) {
            for (let i = 0; i < this.threadDumpSummaryInfo.length; i++) {
                let fileTime = this.threadDumpSummaryInfo[i].timeStamp;
                let fileName = this.threadDumpSummaryInfo[i].filePath;
                fileName = fileName.substring(fileName.lastIndexOf('/') + 1);
                this.headerArr.push(fileTime);
                arrData.push(fileTime);
                arrFile.push(fileName);
            }
            this.stackArr = arrFile;
            if (this.stackArr.length != 0) {
                for (let m = 0; m < this.stackArr.length; m++) {
                    this.stackArr[m] = this.stackArr[m].replace(/_/g, '').replace(/\./, '');
                }
            }
            this.arrKey = arrData;
            if (this.arrKey.length != 0) {
                for (let m = 0; m < this.arrKey.length; m++) {
                    if (typeof this.arrKey[m] === "string") {
                        this.arrKey[m] = this.arrKey[m].replace(/\//g, '').replace(/:/g, '').split(' ').join('');
                    }
                }
            }
            if (arrData.length == 2) {
                this.stData1 = arrData[0];
                this.stdata2 = arrData[1];
            }
            let fileArray = filepaths.join();
            this.tdInfoData = {};
            this.tdInfoData.tr = this.sessionService.session.testRun.id;
            this.tdInfoData.masterTR = this.sessionService.session.testRun.id;
            this.tdInfoData.filePath = fileArray;
            this.tdServiceObj.getThreadDumpStatistics(this.tdInfoData).subscribe(res => {
                this.doAssignValueParseSattisticsTD(res);
                this.createTotalThreadInfo(res);
            });
        }
    }
    createTotalThreadInfo(data) {
        //Bug Id 54355
        let totalThreadInfo = [];
        const compareObj = data.compareData || {};
        let statistics = Object.keys(compareObj);
        statistics.forEach((val, index) => {
            totalThreadInfo.push({ "threadId": compareObj[val]['threadId'], "threadName": compareObj[val]['threadName'], "nativeId": compareObj[val]['nativeId'], "threadCount": compareObj[val]['threadStateList'].length });
        });
        totalThreadInfo.sort((val, val1) => ((val['threadName'] < val1['threadName']) ? -1 : (val['threadName'] > val1['threadName']) ? 1 : 0));
        this.totalThreadInfo = totalThreadInfo;
    }
    doAssignValueParseSattisticsTD(data) {
        try {
            let stInfo = [];
            this.statisticsTDData = this.convertMaptoArr(data);
            this.statisticsTDData.sort((val, val1) => ((val['threadName'] < val1['threadName']) ? -1 : (val['threadName'] > val1['threadName']) ? 1 : 0));
            this.grpTableHeaderList = [];
            let colField = [];
            colField.push('threadName');
            for (let m = 0; m < this.arrKey.length; m++) {
                colField.push(this.arrKey[m]);
            }
            let colHeader = [];
            colHeader.push('Thread Name');
            for (let k = 0; k < this.headerArr.length; k++) {
                colHeader.push(this.sessionService.convertTimestampIntoFormattedString(this.headerArr[k]));
            }
            this.threadDumpSTInfo = stInfo;
            for (let key in colField) {
                this.grpTableHeaderList.push({ 'field': colField[key], 'header': colHeader[key], 'align': 'right', 'sortable': true });
            }
            let obj = {};
            for (let i = 0; i < this.statisticsTDData.length; i++) {
                for (let j = 0; j < colField.length; j++) {
                    obj['threadId'] = this.statisticsTDData[i].threadId;
                    obj['nativeId'] = this.statisticsTDData[i].nativeId;
                    obj[colField[j]] = this.statisticsTDData[i][colField[j]];
                    obj['ST' + colField[j]] = this.statisticsTDData[i]['ST' + colField[j]];
                }
                stInfo.push(obj);
            }
            this.threadDumpSTInfo = stInfo;
            this.statisticsThreadDumpData(this.statisticsTDData[0], this.statisticsTDData[0].threadName);
        }
        catch (error) {
        }
    }
    convertMaptoArr(stmap) {
        let tableArr = [];
        let arr = Object.keys(stmap);
        arr.forEach((val, index) => {
            let stCount = stmap[val];
            let Obj = {};
            Obj['threadId'] = stCount.threadId;
            Obj['threadName'] = stCount.threadName;
            if (stCount.nativeId === undefined || stCount.nativeId === null) {
                Obj['nativeId'] = '-';
            }
            else {
                Obj['nativeId'] = stCount.nativeId;
            }
            for (let j = 0; j < this.arrKey.length; j++) {
                if (stCount.threadStateList[j] === undefined || stCount.threadStateList[j] === null) {
                    Obj[this.arrKey[j]] = '-';
                }
                else {
                    Obj[this.arrKey[j]] = stCount.threadStateList[j];
                }
            }
            for (let k = 0; k < this.stackArr.length; k++) {
                if (stCount.stackTraceList[k] === undefined || stCount.stackTraceList[k] === null) {
                    Obj['ST' + this.arrKey[k]] = '-';
                }
                else {
                    Obj['ST' + this.arrKey[k]] = stCount.stackTraceList[k];
                }
            }
            tableArr.push(Obj);
        });
        return tableArr;
    }
    statisticsThreadDumpData(data, field) {
        this.isSummary = true;
        this.threadData = 'Thread Name: ' + data.threadName +
            '\n Thread ID: ' + data.threadId +
            '\n Native ID: ' + data.nativeId +
            '\n Thread State: ' + data[field] +
            '\n Stack Trace: ' + data['ST' + field];
    }
    showFiles(filePath) {
        this.showOption = 4;
        let sunstringFilePath = "";
        if (filePath.indexOf(",") != -1)
            sunstringFilePath = filePath.substring(filePath.indexOf("logs"), filePath.length - 1);
        else
            sunstringFilePath = filePath.substring(filePath.indexOf("logs"), filePath.length);
        let ipWithProd = this.getHostUrl() + '/' + this.productName;
        let downloadfilPath = ipWithProd.replace("/netstorm", "").replace("/netdiagnostics", "") + "/" + sunstringFilePath;
        this.appService.fetchTextData(downloadfilPath).subscribe(data => (this.assignThreadDump(data)));
    }
    assignThreadDump(data) {
        this.threadDumpContent = data;
    }
    getTopFramedHotstackForSummary() {
        this.tdInfoData = {};
        this.tdInfoData.filePath = this.filePathsInfo;
        this.tdInfoData.topFrames = this.hotstackTopFrames;
        this.tdServiceObj.getSummaryOfThreadDumps(this.tdInfoData).subscribe(res => {
            this.commonActionService.loading = false;
            this.convertHotStackMapToArr(res.summarizedHotStack);
            this.createHotstackTree();
        });
    }
    totalThreadTableEvent(event) { }
    hotStackTableEvent(event) { }
    deadlockTableEvent(event) { }
};
CompareThreadDumpComponent.ctorParameters = () => [
    { type: _common_services__WEBPACK_IMPORTED_MODULE_6__["CommonServices"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__["SessionService"] },
    { type: _common_action_service__WEBPACK_IMPORTED_MODULE_4__["CommonActionService"] },
    { type: _services_thread_dump_service__WEBPACK_IMPORTED_MODULE_5__["ThreadDumpService"] },
    { type: _ddr_data_model_service__WEBPACK_IMPORTED_MODULE_3__["DdrDataModelService"] },
    { type: src_app_app_service__WEBPACK_IMPORTED_MODULE_7__["AppService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('dcInfo')
], CompareThreadDumpComponent.prototype, "dcInfo", void 0);
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('value')
], CompareThreadDumpComponent.prototype, "threadDumpSummaryInfo", void 0);
CompareThreadDumpComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-compare-thread-dump',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./compare-thread-dump.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/compare-thread-dump/compare-thread-dump.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./compare-thread-dump.component.scss */ "./src/app/pages/tools/actions/thread-dump-revamp/compare-thread-dump/compare-thread-dump.component.scss")).default]
    })
], CompareThreadDumpComponent);



/***/ }),

/***/ "./src/app/pages/tools/actions/thread-dump-revamp/services/thread-dump-service.ts":
/*!****************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/services/thread-dump-service.ts ***!
  \****************************************************************************************/
/*! exports provided: ThreadDumpService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThreadDumpService", function() { return ThreadDumpService; });
/* 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 src_app_core_store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/store/store */ "./src/app/core/store/store.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
/* harmony import */ var src_app_core_session_node_Info_session_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/session/node-Info-session.service */ "./src/app/core/session/node-Info-session.service.ts");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");









let ThreadDumpService = class ThreadDumpService extends src_app_core_store_store__WEBPACK_IMPORTED_MODULE_2__["Store"].AbstractService {
    constructor(http, nodeInfoSessionService, sessionService) {
        super();
        this.http = http;
        this.nodeInfoSessionService = nodeInfoSessionService;
        this.sessionService = sessionService;
    }
    takeThreadDump(apiData) {
        let url = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.threadDump.takeTD.endpoint;
        return this.controller.post(url, apiData);
    }
    viewThreadDump(apiData) {
        let url = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.threadDump.viewTD.endpoint;
        let basePath = this.sessionService.getBasePath(true, null, null);
        return this.controller.post(url, apiData, basePath);
    }
    deleteThreadDump(apiData) {
        let url = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.threadDump.deleteTD.endpoint;
        return this.controller.post(url, apiData);
    }
    parseThreadDumpFile(apiData) {
        let url = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.threadDump.parseTD.endpoint;
        return this.controller.post(url, apiData);
    }
    getCommonMethods(apiData) {
        let url = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.threadDump.getCommonMethods.endpoint;
        return this.controller.post(url, apiData);
    }
    getHotstackBasedTopFrames(apiData) {
        let url = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.threadDump.getHotstackBasedTopFrames.endpoint;
        return this.controller.post(url, apiData);
    }
    getSummaryOfThreadDumps(apiData) {
        let url = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.threadDump.getSummaryOfThreadDumps.endpoint;
        return this.controller.post(url, apiData);
    }
    getThreadDumpStatistics(apiData) {
        let url = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.threadDump.threadDumpStats.endpoint;
        return this.controller.post(url, apiData);
    }
    getDataUsingPost(url, paramObj) {
        return this.http.post(url, paramObj, { headers: this.getHeaders(this.nodeInfoSessionService.dcData) }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["tap"])(data => data), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])((err) => {
            return this.catchLog(err, url);
        }));
    }
    getHeaders(dcData = null) {
        if (dcData) {
            let nodeObjArray = [];
            for (let i = 0; i < dcData.length; i++) {
                nodeObjArray.push(dcData[i].nodeInfoObj);
            }
            let nodeObj = btoa(JSON.stringify(nodeObjArray));
            return new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpHeaders"]().set('content-type', 'application/json')
                .set('nodeInfo', nodeObj).set('cctx', localStorage.getItem('cctx'));
        }
        else {
            return new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpHeaders"]({ 'Content-Type': 'application/json' })
                .set('cctx', localStorage.getItem('cctx'));
        }
    }
    catchLog(err, url) {
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["throwError"])(new Error(`${err.status} ${err.statusText}`));
    }
};
ThreadDumpService.ctorParameters = () => [
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"] },
    { type: src_app_core_session_node_Info_session_service__WEBPACK_IMPORTED_MODULE_7__["NodeInfoSessionService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_8__["SessionService"] }
];
ThreadDumpService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root',
    })
], ThreadDumpService);



/***/ }),

/***/ "./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.component.scss":
/*!******************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.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-thread-dump-revamp .thread_dump {\n  height: calc(100vh - 140px);\n  overflow: auto;\n}");

/***/ }),

/***/ "./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.component.ts":
/*!****************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.component.ts ***!
  \****************************************************************************************/
/*! exports provided: TYPE_THREAD_DUMP, BREADCRUMB_TAKE_THREAD_DUMP, BREADCRUMB_ANALYZE_THREAD_DUMP, BREADCRUMB_COMPARE_THREAD_DUMP, BREADCRUMB_THREAD_DUMP, BREADCRUMB_HOME, BREADCRUMB_SCHEDULED_THREAD_DUMP_LIST, ThreadDumpRevampComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TYPE_THREAD_DUMP", function() { return TYPE_THREAD_DUMP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_TAKE_THREAD_DUMP", function() { return BREADCRUMB_TAKE_THREAD_DUMP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_ANALYZE_THREAD_DUMP", function() { return BREADCRUMB_ANALYZE_THREAD_DUMP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_COMPARE_THREAD_DUMP", function() { return BREADCRUMB_COMPARE_THREAD_DUMP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_THREAD_DUMP", function() { return BREADCRUMB_THREAD_DUMP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_HOME", function() { return BREADCRUMB_HOME; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_SCHEDULED_THREAD_DUMP_LIST", function() { return BREADCRUMB_SCHEDULED_THREAD_DUMP_LIST; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThreadDumpRevampComponent", function() { return ThreadDumpRevampComponent; });
/* 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 highcharts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! highcharts */ "./node_modules/highcharts/highcharts.js");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _common_action_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-action.service */ "./src/app/pages/tools/actions/common-action.service.ts");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var _services_thread_dump_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./services/thread-dump-service */ "./src/app/pages/tools/actions/thread-dump-revamp/services/thread-dump-service.ts");
/* harmony import */ var src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_7__ = __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_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/shared/cav-toast/service/cav-message.service */ "./src/app/shared/cav-toast/service/cav-message.service.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
/* harmony import */ var _tier_server_info_tier_server_info_component__WEBPACK_IMPORTED_MODULE_11__ = __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_environments_environment__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../constant/common-action-constants */ "./src/app/pages/tools/actions/constant/common-action-constants.ts");
/* harmony import */ var _admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../admin/access-control-management/services/cav-acl-util */ "./src/app/pages/tools/admin/access-control-management/services/cav-acl-util.ts");















const TYPE_THREAD_DUMP = "ThreadDump";
const BREADCRUMB_TAKE_THREAD_DUMP = "Take Thread Dump";
const BREADCRUMB_ANALYZE_THREAD_DUMP = "Analyze Thread Dump";
const BREADCRUMB_COMPARE_THREAD_DUMP = "Compare Thread Dump";
const BREADCRUMB_THREAD_DUMP = "Thread Dump";
const BREADCRUMB_HOME = "Home";
const BREADCRUMB_SCHEDULED_THREAD_DUMP_LIST = "Scheduled Thread Dump List";
let ThreadDumpRevampComponent = class ThreadDumpRevampComponent {
    constructor(router, commonActionServiceObj, sessionService, tdServiceObj, messageService, cavNavBarService, aclProperties) {
        this.router = router;
        this.commonActionServiceObj = commonActionServiceObj;
        this.sessionService = sessionService;
        this.tdServiceObj = tdServiceObj;
        this.messageService = messageService;
        this.cavNavBarService = cavNavBarService;
        this.aclProperties = aclProperties;
        this.analyzeThreadDump = false;
        this.isAddThreadDumpVisible = false;
        this.tdInfoData = {};
        this.relativePathForTDList = "diagnosticTools/threadDump/thread-dump.json";
        this.summaryThreadDump = false;
        this.compareThreadDumpAnalysis = false;
        this.threadDumpAnalysis = false;
        this.threadDumpView = false;
        this.disableComapre = false;
        this.disableAnalyze = false;
        this.analyseData = false;
        this.isThreadDumpSummary = false;
        this.timeInterval = 5;
        this.counts = 1;
        this.showTInterval = true;
        this.alive = true;
        this.isCavSchedulerVisible = false;
        this.scheduleNow = false;
        this.tableEnable = false;
        this.viewLogsDialog = false;
        this.relativePathForLogs = "diagnosticTools/java-flight-recorder/relativePathForLogs.json";
        this.confirmationDelete = false;
        this.isWritePermission = false;
        //For Node.js Thread Dump
        this.analyzeNodeThreadDialog = false;
        this.destroy$ = new rxjs__WEBPACK_IMPORTED_MODULE_9__["Subject"]();
        // =========================Pie chart======================= 
        this.highcharts = highcharts__WEBPACK_IMPORTED_MODULE_3__;
        this.chartOptions = {
            chart: {
                plotBorderWidth: null,
                plotShadow: false
            },
            title: {
                text: ''
            },
            legend: {
                align: 'right',
                verticalAlign: 'middle',
                layout: 'vertical',
                itemMarginTop: 12,
                width: 180 // Fixed width for legend
            },
            exporting: {
                buttons: {
                    contextButton: {
                        enabled: false
                    },
                },
            },
            credits: {
                enabled: false
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    innerSize: '50%',
                    dataLabels: {
                        enabled: false
                    },
                    showInLegend: true
                },
            },
            series: [{
                    type: 'pie',
                    data: [
                        ['ava.util.TreeMap$Entry', 45.0],
                        ['java.util.CollectionsSU.', 26.8],
                        ['java.util.LinkedListSNo java.util.LinkedListSNo', 8.5],
                        ['sun.misc.FDBigInteger', 6.2],
                        ['java.util.CollectionsSU.', 0.7]
                    ]
                }]
        };
        this.cavNavBarService.showNavBar = false;
    }
    ngOnInit() {
        this.isWritePermission = this.sessionService.isFeatureWrite(this.aclProperties.feature, this.aclProperties.subFeature);
        this.initializeBreadcrumbs();
        this.initializeTableMenuItems();
        this.setupUpdateInterval();
        this.getThreadDumpList();
    }
    initializeBreadcrumbs() {
        this.breadcrumbItems = [
            {
                label: BREADCRUMB_HOME,
                command: () => this.router.navigateByUrl('/home/dashboard')
            },
            {
                label: BREADCRUMB_THREAD_DUMP,
                command: () => this.resetToThreadDump()
            }
        ];
    }
    initializeTableMenuItems() {
        this.tableMenuItems = [
            {
                label: 'Analyze',
                icon: 'las-chart-pie-solid',
                command: () => this.openAnalyzeThreadDump()
            },
            {
                label: 'View Logs',
                icon: 'icons8 icons8-eye',
                command: () => this.viewLogs(this.selectedThreadDumpInfo)
            },
            {
                label: 'Download',
                icon: 'icons8 icons8-download',
                command: () => this.downloadFile(this.selectedThreadDumpInfo)
            },
            {
                label: 'Delete',
                icon: 'icons8 icons8-trash',
                disabled: !this.isWritePermission,
                command: () => { this.confirmationDelete = true; }
            }
        ];
    }
    setupUpdateInterval() {
        this.updateIntervalSubs = Object(rxjs__WEBPACK_IMPORTED_MODULE_9__["timer"])(this.sessionService.globalUpdateInterval, this.sessionService.globalUpdateInterval)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this.destroy$))
            .subscribe(() => this.getThreadDumpList());
    }
    openAnalyzeThreadDump() {
        this.analyzeThreadDump = true;
        this.breadcrumbItems.push({ label: BREADCRUMB_ANALYZE_THREAD_DUMP });
        this.getViewThreadDumpInfo(this.selectedThreadDumpInfo);
        this.unsubscribeFromUpdateInterval();
    }
    resetToThreadDump() {
        this.analyzeThreadDump = false;
        this.isAddThreadDumpVisible = false;
        this.commonActionServiceObj.isEdit = false;
        this.tableEnable = false;
        this.isThreadDumpSummary = false;
        this.breadcrumbItems = this.breadcrumbItems.filter(item => ![BREADCRUMB_TAKE_THREAD_DUMP, BREADCRUMB_ANALYZE_THREAD_DUMP, BREADCRUMB_COMPARE_THREAD_DUMP, BREADCRUMB_SCHEDULED_THREAD_DUMP_LIST].includes(item.label));
        this.setupUpdateInterval();
    }
    unsubscribeFromUpdateInterval() {
        if (this.updateIntervalSubs && !this.updateIntervalSubs.closed) {
            this.updateIntervalSubs.unsubscribe();
        }
    }
    ngOnDestroy() {
        this.cavNavBarService.showNavBar = true;
        this.destroy$.next(); // Emit value to complete all subscriptions
        this.destroy$.complete();
    }
    getThreadDumpList() {
        this.commonActionServiceObj.loading = true;
        this.tdInfoData.tr = this.sessionService.session.testRun.id;
        this.tdInfoData.masterTR = this.sessionService.session.testRun.id;
        this.tdServiceObj.viewThreadDump(this.tdInfoData).subscribe(res => {
            this.commonActionServiceObj.loading = false;
            this.tdTableData = this.commonActionServiceObj.sortTimestamp(res);
        });
    }
    // Logs can be viewed only when status is "In progress", "Stopping" or  "Error" state
    viewLogs(node) {
        this.viewLogsDialog = true;
        node.logs.forEach(function (obj) {
            if (obj.level === 1) {
                obj.level = 'INFO';
            }
            else if (obj.level === 2) {
                obj.level = 'WARNING';
            }
            else if (obj.level === 3) {
                obj.level = 'ERROR';
            }
        });
        this.logsList = node.logs;
    }
    threadDumpTableEvent(event) {
        if (event.cavEventExt.actionConfig.action === "addThreadDump") {
            this.addActionForThreadDump();
        }
        if (event.cavEventExt.actionConfig.action === "scheduleList") {
            this.breadcrumbItems.push({ label: BREADCRUMB_SCHEDULED_THREAD_DUMP_LIST });
            this.tableEnable = true;
            this.scheduleObj = {
                taskType: "ThreadDumpTask"
            };
            this.unsubscribeFromUpdateInterval();
        }
        if (event.cavEventExt.actionConfig.action === "analyze_multi") {
        }
        if (event.cavEventExt.actionConfig.action === "menuClick") {
            this.tableMenu.toggle(event);
            this.selectedThreadDumpInfo = event.cavEventExt.row;
            this.getActionMenuItems();
        }
        if (event.cavEventExt.actionConfig.action === "onRowSelect") {
        }
        if (event.cavEventExt.actionConfig.action === "refresh") {
            this.getThreadDumpList();
        }
        if (event.cavEventExt.actionConfig.action === "compare") {
            this.selectedThreadDumpInfo = event.cavEventExt.rowData;
            if (!this.selectedThreadDumpInfo) {
                this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: "No row selected to compare summary." });
                return;
            }
            this.breadcrumbItems.push({ label: BREADCRUMB_COMPARE_THREAD_DUMP });
            this.isThreadDumpSummary = true;
            this.unsubscribeFromUpdateInterval();
            this.getSummaryThreadDumps();
        }
        if (event.cavEventExt.actionConfig.action === "deleteAll") {
            let rowData = event.cavEventExt.rowData;
            if (!rowData) {
                this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_WARNING"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_WARNING"], detail: "Please select rows to delete." });
                return;
            }
            const idList = rowData.map(item => item._id.$oid);
            this.commonActionServiceObj.deleteAll(idList).subscribe(res => {
                if (res.status === "SUCCESS") {
                    this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_SUCCESS"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_SUCCESS"], detail: res.msg });
                    //Refresh Thread Dump UI
                    this.getThreadDumpList();
                }
                else
                    this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: res.msg });
            });
        }
    }
    getActionMenuItems() {
        if (this.selectedThreadDumpInfo['mStatus'] == 'Completed') {
            this.tableMenuItemsRef = this.tableMenuItems.filter(item => {
                return item.label !== 'View Logs';
            });
        }
        else {
            this.tableMenuItemsRef = this.tableMenuItems.filter(item => {
                return item.label !== 'Download' && item.label !== 'Delete' && item.label !== 'Analyze';
            });
        }
        // Check if the agentType is Java and Nodejs, and only then show 'Analyze'
        if (this.selectedThreadDumpInfo['agentType'] && this.selectedThreadDumpInfo['agentType'].toLowerCase() !== 'java' && this.selectedThreadDumpInfo['agentType'].toLowerCase() !== 'nodejs') {
            this.tableMenuItemsRef = this.tableMenuItemsRef.filter(item => item.label !== 'Analyze');
        }
    }
    //Method called to take thread dump 
    takeThreadDump() {
        let validateMsg = this.commonActionServiceObj.validateTarget();
        if (validateMsg) {
            this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: validateMsg });
            return;
        }
        this.commonActionServiceObj.loading = true;
        this.tdInfoData = {};
        this.getInfoForSelectedInstance();
        this.tdInfoData.tier = this.commonActionServiceObj.selectedTierVal;
        this.tdInfoData.tr = this.sessionService.session.testRun.id;
        this.tdInfoData.masterTR = this.sessionService.session.testRun.id;
        this.tdInfoData.user = this.sessionService.session.cctx.u;
        this.tdInfoData.type = TYPE_THREAD_DUMP;
        this.tdInfoData['subject'] = this.commonActionServiceObj.getSubject(this.tdInfoData.tier, this.tdInfoData.serverN, this.tdInfoData.instance);
        this.tdInfoData.tr = this.commonActionServiceObj.selectedServerVal['clusters'][0]['tr'];
        let nodeName = this.commonActionServiceObj.selectedServerVal['clusters'][0]['cname'];
        this.tdInfoData['nodeName'] = nodeName;
        this.tdInfoData.count = this.counts;
        this.tdInfoData.interval = this.timeInterval * 1000;
        if (this.scheduleNow == true) {
            this.tdInfoData.triggeredBy = "Now";
            let url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/tomcat/" + nodeName + '/DashboardServer/v2' + src_environments_environment__WEBPACK_IMPORTED_MODULE_12__["environment"].api.threadDump.takeTD.endpoint;
            this.tdServiceObj.getDataUsingPost(url, this.tdInfoData).subscribe(res => {
                this.handleTakeResponse(res);
            }, err => {
                this.commonActionServiceObj.loading = false;
                this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: "Your request has timed out. Please try again later." });
            });
        }
        else {
            this.tdInfoData.triggeredBy = "Scheduled";
            let obj = {
                "taskType": "ThreadDumpTask",
                "taskReq": this.tdInfoData,
                id: this.taskId
            };
            let cavScheduleObj = {
                task: [obj],
                inputType: this.commonActionServiceObj.isEdit ? "UPDATE" : "ADD"
            };
            this.inputForCavScheduler = cavScheduleObj;
        }
    }
    cavScheduleEventHandler(event) {
        this.commonActionServiceObj.loading = false;
        if (event.code === 200) {
            this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_SUCCESS"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_SUCCESS"], detail: event.msg });
            this.goToThreadDumpHomePage();
        }
        else {
            this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: event.msg });
        }
    }
    // method to handle response when we take thread dump
    handleTakeResponse(res) {
        this.reset();
        if (res) {
            this.commonActionServiceObj.loading = false;
            if (res['status'] && res['status'].code == 200) {
                this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_SUCCESS"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_SUCCESS"], detail: res['status'].msg });
                this.goToThreadDumpHomePage(); // to go to home page of thread dump UI and get fresh available thread dump list.
            }
            else {
                this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: res['status'].msg });
            }
        }
    }
    takeThreadDumpBasedOnCountAndTimeInterval() {
        this.alive = true;
        this.takeThreadDump();
        if (this.counts > 1) {
            this.asyncTDtaken = new rxjs__WEBPACK_IMPORTED_MODULE_9__["Observable"](observer => {
                let timeInterval = this.timeInterval * 1000;
                let threadDumpCount = this.counts;
                let takedump = setInterval(() => {
                    observer.next({ 'threadDumpCount': threadDumpCount, 'observer': observer });
                }, timeInterval);
                this.commonActionServiceObj.loading;
                let Interval = (threadDumpCount * timeInterval) - timeInterval;
                setTimeout(() => {
                    observer.complete();
                    clearInterval(takedump);
                }, (Interval));
            });
            let subscription = this.asyncTDtaken.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeWhile"])(() => this.alive)).subscribe(data => { this.takeThreadDump(); }, error => { this.alive = false; }, () => { });
        }
    }
    //Method to get instance information
    getInfoForSelectedInstance() {
        let instanceInfoList = this.commonActionServiceObj.selectedInstanceInfo;
        let that = this;
        that.tdInfoData.pid = instanceInfoList.pid;
        that.tdInfoData.instance = instanceInfoList.instance;
        that.tdInfoData.appAgentEnabled = instanceInfoList.appAgentEnabled;
        that.tdInfoData.agentType = instanceInfoList.agentType;
        that.tdInfoData.serverN = instanceInfoList.serverN;
        that.tdInfoData.serverip = instanceInfoList.serverip;
        that.tdInfoData.machineType = this.commonActionServiceObj.selectedServerVal['machineType'];
    }
    enableTimeInterval() {
        if (this.counts > 1)
            this.showTInterval = false;
        else
            this.showTInterval = true;
    }
    //Method called to delete thread dump.
    deleteThreadDump() {
        this.commonActionServiceObj.loading = true;
        this.tdInfoData.iD = this.selectedThreadDumpInfo['_id'].$oid;
        this.tdInfoData.tr = this.sessionService.session.testRun.id;
        this.tdInfoData.masterTR = this.sessionService.session.testRun.id;
        this.tdInfoData.appAgentEnabled = this.selectedThreadDumpInfo['appAgentEnabled'];
        this.tdInfoData.serverN = this.selectedThreadDumpInfo['serverN'];
        this.tdInfoData.instance = this.selectedThreadDumpInfo['instance'];
        this.tdInfoData.pid = this.selectedThreadDumpInfo['pid'];
        this.tdInfoData.filePath = this.selectedThreadDumpInfo['filePath'];
        this.commonActionServiceObj.loading = false;
        if (this.sessionService.preSession.multiDc) {
            let url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/tomcat/" + this.selectedThreadDumpInfo['nodeName'] + '/DashboardServer/v2' + src_environments_environment__WEBPACK_IMPORTED_MODULE_12__["environment"].api.threadDump.deleteTD.endpoint;
            this.tdServiceObj.getDataUsingPost(url, this.tdInfoData).subscribe(res => {
                if (res['status'] == _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_SUCCESS"]) {
                    this.confirmationDelete = false;
                    this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_SUCCESS"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_SUCCESS"], detail: res['msg'] });
                    this.getThreadDumpList(); // to go to home page of thread dump UI and get fresh available thread dump list.
                }
                else if (res['status'] == _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_WARNING"]) {
                    this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_WARNING"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_WARNING"], detail: res['msg'] });
                }
                else if (res['status'] == _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_FAIL"]) {
                    this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: res['msg'] });
                    this.confirmationDelete = false;
                }
            });
        }
        else {
            this.tdServiceObj.deleteThreadDump(this.tdInfoData).subscribe(res => {
                if (res['status'] == _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_SUCCESS"]) {
                    this.confirmationDelete = false;
                    this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_SUCCESS"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_SUCCESS"], detail: res['msg'] });
                    this.getThreadDumpList(); // to go to home page of thread dump UI and get fresh available thread dump list.
                }
                else if (res['status'] == _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_WARNING"]) {
                    this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_WARNING"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_WARNING"], detail: res['msg'] });
                }
                else if (res['status'] == _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_FAIL"]) {
                    this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: res['msg'] });
                    this.confirmationDelete = false;
                }
            });
        }
    }
    //To download file from cavisson server path to Local machine.
    downloadFile(node) {
        if (!node.filePath) {
            this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: "No file available to download", life: 10000 });
            return;
        }
        // Split the URL by '/'
        let parts = node.filePath.split("/");
        // The last portion is after the last '/'
        let lastPortion = parts[parts.length - 1];
        let filepath = node.filePath.substring(node.filePath.indexOf("logs"), node.filePath.length);
        let url;
        if (this.sessionService.preSession.multiDc)
            url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/tomcat/" + node.nodeName + "/" + filepath;
        else
            url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + '/' + filepath;
        this.downloadURI(url, lastPortion);
    }
    downloadURI(uri, name) {
        var link = document.createElement("a");
        link.download = name;
        link.href = uri;
        var clickEvent = document.createEvent("MouseEvent");
        clickEvent.initEvent("click", true, true);
        link.dispatchEvent(clickEvent);
    }
    getViewThreadDumpInfo(node) {
        var obj = {
            "tierName": node["tier"],
            "serverName": node["serverN"],
            "instanceName": node["instance"],
            "timeStamp": node["timestamp"],
            "partition": node["partition"],
            'userName': node['user'],
            "filePath": node["filePath"],
            "pid": node['pid'],
            "startTime": node['startTS'],
            "endTime": node['endTime'],
            "agentType": node['agentType'],
            "nodeName": node['nodeName']
        };
        //  Request is going for two times 1.calling from below 2. On sort case (by default sorting on time bassis )
        this.showAnalysisThreadDump(obj);
    }
    showAnalysisThreadDump(data) {
        if (data.agentType.toLowerCase() == "nodejs") {
            // Open Node.js dialog
            this.analyzeNodeThreadDialog = true;
            this.threadDumpAnalysis = false;
            this.compareThreadDumpAnalysis = false;
            this.summaryThreadDump = false;
            this.threadDumpView = false;
            this.disableComapre = true;
            this.disableAnalyze = true;
            this.analyzeThreadDump = false;
            return;
        }
        else {
            this.summaryThreadDump = false;
            this.threadDumpAnalysis = true;
            this.compareThreadDumpAnalysis = false;
            this.disableComapre = true;
            this.threadDumpView = true;
            this.analyzedData = data;
            this.analyseData = true;
        }
    }
    getSummaryThreadDumps() {
        if (this.selectedThreadDumpInfo.length > 10) {
            this.messageService.add({ severity: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SEVERITY_ERROR"], summary: _constant_common_action_constants__WEBPACK_IMPORTED_MODULE_13__["SUMMARY_ERROR"], detail: "Only 10 Thread Dumps are allowed to Compare." });
            return;
        }
        this.threadDumpAnalysis = false;
        this.threadDumpView = false;
        this.summaryThreadDump = true;
        this.compareThreadDumpAnalysis = false;
        this.threadDumpSummaryInfo = JSON.parse(JSON.stringify(this.selectedThreadDumpInfo));
    }
    // Method to route back to available thread dump table.
    cancelTakeThreadDump() {
        this.isAddThreadDumpVisible = false;
        this.commonActionServiceObj.isEdit = false;
        this.resetToThreadDump();
        this.reset();
    }
    reset() {
        this.tierChild.clearField();
        this.counts = 1;
        this.timeInterval = 5;
        this.showTInterval = true;
    }
    resetCountTimeInterval() {
        this.counts = 1;
        this.timeInterval = 5;
    }
    handleScheduleNow(event) {
        const me = this;
        me.scheduleNow = event;
    }
    goToThreadDumpHomePage() {
        this.isAddThreadDumpVisible = false;
        this.scheduleNow = false;
        this.getThreadDumpList();
        this.resetToThreadDump();
    }
    editRow(data) {
        let me = this;
        me.commonActionServiceObj.isEdit = true;
        me.isAddThreadDumpVisible = true;
        me.tableEnable = false;
        me.counts = data.task.at(0).taskReq.count;
        me.timeInterval = data.task[0].taskReq.interval / 1000;
        me.taskId = data.task[0].id;
        this.tierServerVal = {
            tier: data.task[0].taskReq.tier,
            server: data.task[0].taskReq.serverN,
            instance: data.task[0].taskReq.instance
        };
        this.inputForCavScheduler = {
            schedule: data.schedule,
            enableFor: false,
            enableNow: false,
            preview: true
        };
    }
    outputEventHandler(cavScheduleTask) {
        const me = this;
        if (cavScheduleTask) {
            me.editRow(cavScheduleTask);
        }
        else {
            me.addActionForThreadDump();
        }
    }
    addActionForThreadDump() {
        this.inputForCavScheduler = {
            enableFor: false,
            enableNow: true,
            oneTime: true
        };
        this.isAddThreadDumpVisible = true;
        this.resetCountTimeInterval();
        this.commonActionServiceObj.isEdit = false;
        this.tableEnable = false;
        if (this.breadcrumbItems.length > 2)
            this.breadcrumbItems.pop();
        this.breadcrumbItems.push({ label: BREADCRUMB_TAKE_THREAD_DUMP });
        this.unsubscribeFromUpdateInterval();
    }
    onCountChange() {
        this.enableTimeInterval();
    }
};
ThreadDumpRevampComponent.ctorParameters = () => [
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
    { type: _common_action_service__WEBPACK_IMPORTED_MODULE_4__["CommonActionService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_5__["SessionService"] },
    { type: _services_thread_dump_service__WEBPACK_IMPORTED_MODULE_6__["ThreadDumpService"] },
    { type: src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_8__["CavMessageService"] },
    { type: src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_7__["CavNavBarService"] },
    { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_14__["ACL_PROPS"],] }] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('tableMenuPrime')
], ThreadDumpRevampComponent.prototype, "tableMenu", void 0);
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_11__["TierServerInfoComponent"])
], ThreadDumpRevampComponent.prototype, "tierChild", void 0);
ThreadDumpRevampComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-thread-dump-revamp',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./thread-dump-revamp.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        providers: [{ provide: _admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_14__["ACL_PROPS"], useFactory: _admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_14__["getDiagnosticToolsThreadDumpACLProps"] }],
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./thread-dump-revamp.component.scss */ "./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.component.scss")).default]
    }),
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(6, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(6, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"])(_admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_14__["ACL_PROPS"]))
], ThreadDumpRevampComponent);



/***/ }),

/***/ "./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.module.ts":
/*!*************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.module.ts ***!
  \*************************************************************************************/
/*! exports provided: ThreadDumpRevampModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThreadDumpRevampModule", function() { return ThreadDumpRevampModule; });
/* 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 _thread_dump_revamp_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./thread-dump-revamp.component */ "./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-revamp.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 _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var highcharts_angular__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! highcharts-angular */ "./node_modules/highcharts-angular/__ivy_ngcc__/fesm2015/highcharts-angular.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_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");
/* harmony import */ var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/shared/help/help.module */ "./src/app/shared/help/help.module.ts");
/* harmony import */ var _thread_dump_schedule_thread_dump_schedule_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./thread-dump-schedule/thread-dump-schedule.component */ "./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-schedule/thread-dump-schedule.component.ts");
/* harmony import */ var _tier_server_info_tier_server_info_module__WEBPACK_IMPORTED_MODULE_11__ = __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_toolbar_cav_toolbar_module__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/app/shared/cav-toolbar/cav-toolbar.module */ "./src/app/shared/cav-toolbar/cav-toolbar.module.ts");
/* harmony import */ var src_app_shared_cav_scheduler_cav_scheduler_module__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! src/app/shared/cav-scheduler/cav-scheduler.module */ "./src/app/shared/cav-scheduler/cav-scheduler.module.ts");
/* harmony import */ var src_app_shared_cav_scheduler_table_cav_scheduler_table_module__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! src/app/shared/cav-scheduler-table/cav-scheduler-table.module */ "./src/app/shared/cav-scheduler-table/cav-scheduler-table.module.ts");
/* harmony import */ var _analyze_thread_dump_analyze_thread_dump_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./analyze-thread-dump/analyze-thread-dump.component */ "./src/app/pages/tools/actions/thread-dump-revamp/analyze-thread-dump/analyze-thread-dump.component.ts");
/* harmony import */ var _compare_thread_dump_compare_thread_dump_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./compare-thread-dump/compare-thread-dump.component */ "./src/app/pages/tools/actions/thread-dump-revamp/compare-thread-dump/compare-thread-dump.component.ts");

















const routes = [
    {
        path: '',
        component: _thread_dump_revamp_component__WEBPACK_IMPORTED_MODULE_3__["ThreadDumpRevampComponent"],
    },
];
const imports = [
    primeng__WEBPACK_IMPORTED_MODULE_7__["PanelModule"],
    _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["ToolbarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["ButtonModule"],
    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__["InputTextareaModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["BreadcrumbModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["MenuModule"],
    _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormsModule"],
    src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_9__["HelpModule"],
    src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_8__["CavTableModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["ToastModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["TabViewModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["SelectButtonModule"],
    highcharts_angular__WEBPACK_IMPORTED_MODULE_6__["HighchartsChartModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["DialogModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["SpinnerModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["ToggleButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["SidebarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["TreeModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["TableModule"],
    _tier_server_info_tier_server_info_module__WEBPACK_IMPORTED_MODULE_11__["TierServerInfoModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["CalendarModule"],
    src_app_shared_cav_toolbar_cav_toolbar_module__WEBPACK_IMPORTED_MODULE_12__["CavToolbarModule"],
    src_app_shared_cav_scheduler_cav_scheduler_module__WEBPACK_IMPORTED_MODULE_13__["CavSchedulerModule"],
    primeng__WEBPACK_IMPORTED_MODULE_7__["ProgressSpinnerModule"],
    src_app_shared_cav_scheduler_table_cav_scheduler_table_module__WEBPACK_IMPORTED_MODULE_14__["cavSchedulerTableModule"]
];
const components = [_thread_dump_revamp_component__WEBPACK_IMPORTED_MODULE_3__["ThreadDumpRevampComponent"]];
let ThreadDumpRevampModule = class ThreadDumpRevampModule {
};
ThreadDumpRevampModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [components, _thread_dump_schedule_thread_dump_schedule_component__WEBPACK_IMPORTED_MODULE_10__["ThreadDumpScheduleComponent"], _analyze_thread_dump_analyze_thread_dump_component__WEBPACK_IMPORTED_MODULE_15__["AnalyzeThreadDumpComponent"], _compare_thread_dump_compare_thread_dump_component__WEBPACK_IMPORTED_MODULE_16__["CompareThreadDumpComponent"]],
        imports: [
            imports,
            _angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"].forChild(routes)
        ],
        exports: [
            _angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"],
            _thread_dump_revamp_component__WEBPACK_IMPORTED_MODULE_3__["ThreadDumpRevampComponent"]
        ],
    })
], ThreadDumpRevampModule);



/***/ }),

/***/ "./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-schedule/thread-dump-schedule.component.scss":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-schedule/thread-dump-schedule.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/thread-dump-revamp/thread-dump-schedule/thread-dump-schedule.component.ts":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-schedule/thread-dump-schedule.component.ts ***!
  \***************************************************************************************************************/
/*! exports provided: ThreadDumpScheduleComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThreadDumpScheduleComponent", function() { return ThreadDumpScheduleComponent; });
/* 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 _admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../admin/access-control-management/services/cav-acl-util */ "./src/app/pages/tools/admin/access-control-management/services/cav-acl-util.ts");



let ThreadDumpScheduleComponent = class ThreadDumpScheduleComponent {
    constructor() {
        this.displayChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.editTdTableHeader = [];
    }
    ngOnInit() {
        // =====================Thread Dump table configuration========================
        this.editTdTableCols = [
            { valueField: 'userName', label: 'User Name', filter: { isFilter: true, type: 'contains' }, selected: true, width: '130px' },
            { valueField: 'tier', label: 'Tier ', filter: { isFilter: true, type: 'contains' }, selected: true, width: '100px' },
            { valueField: 'server', label: 'Server', filter: { isFilter: true, type: 'contains' }, selected: true, width: '100px' },
            { valueField: 'processID', label: 'Process ID', filter: { isFilter: true, type: 'contains' }, selected: true, width: '120px', classes: 'text-right', },
            { valueField: 'instance', label: 'Instance', filter: { isFilter: true, type: 'contains' }, selected: true, width: '120px' },
            { valueField: 'agent', label: 'Agent', filter: { isFilter: true, type: 'contains' }, selected: true, width: '100px' },
            { valueField: 'count', label: 'Count', filter: { isFilter: true, type: 'contains' }, selected: true, width: '100px', classes: 'text-right', },
            { valueField: 'countT', label: 'Count Time Interval(s)', filter: { isFilter: true, type: 'contains' }, selected: true, width: '160px', classes: 'text-right', },
            { valueField: 'sTime', label: 'Start Time', filter: { isFilter: true, type: 'contains' }, selected: true, width: '120px', classes: 'text-right', },
            { valueField: 'eTime', label: 'End Time', filter: { isFilter: true, type: 'contains' }, selected: true, width: '120px', classes: 'text-right', },
            { valueField: 'status', label: 'Status', filter: { isFilter: true, type: 'contains' }, selected: true, width: '100px' },
            { valueField: 'action', label: 'Actions', filter: { isFilter: true, type: 'contains' }, selected: true, classes: 'text-center', width: '80px' },
        ];
        this.editTdTableHeader = [{ cols: this.editTdTableCols }];
        this.editTdTableRow = [
            { "userName": "Demo1", "tier": "Cav1", "server": "Server1", 'processID': '31556', 'instance': 'PN1', 'agent': 'Java', 'count': 1, 'countT': 1, 'sTime': '10/02/24 16:10', 'eTime': '10/02/24 20:120', 'status': 'Pending' },
            { "userName": "Demo2", "tier": "Cav2", "server": "Server2", 'processID': '26533', 'instance': 'PN2', 'agent': 'Java', 'count': 1, 'countT': 1, 'sTime': '10/02/24 16:10', 'eTime': '10/02/24 20:120', 'status': 'Completed' },
            { "userName": "Demo3", "tier": "Cav3", "server": "Server3", 'processID': '45632', 'instance': 'PN3', 'agent': 'Java', 'count': 1, 'countT': 1, 'sTime': '10/02/24 16:10', 'eTime': '10/02/24 20:120', 'status': 'Completed' },
            { "userName": "Demo4", "tier": "Cav4", "server": "Server4", 'processID': '33699', 'instance': 'PN4', 'agent': 'Java', 'count': 1, 'countT': 1, 'sTime': '10/02/24 16:10', 'eTime': '10/02/24 20:120', 'status': 'Pending' },
        ];
        this.editTdTableConfig = {
            config: {
                globalFilter: true,
                masterCheckbox: true,
                tableName: 'Schedule Thread Dump',
                rowSelection: true,
                download: true
            },
            tableAction: [
                {
                    iconType: 'icon',
                    iconClass: 'las-redo-alt-solid',
                    toolTip: 'Refresh',
                    action: 'refresh',
                    needRowData: true,
                },
                {
                    iconType: 'icon',
                    iconClass: 'icons8 icons8-trash',
                    toolTip: 'Delete multiple',
                    action: 'delete_multiple',
                    needRowData: true,
                },
            ],
            rowAction: {
                rightAction: [
                    {
                        iconType: 'icon',
                        iconClass: 'icons8 icons8-edit',
                        toolTip: 'Edit',
                        action: 'edit',
                        needRowData: true,
                    },
                    {
                        iconType: 'icon',
                        iconClass: 'icons8 icons8-trash',
                        toolTip: 'Delete',
                        action: 'delete',
                        needRowData: true,
                    },
                ],
            },
        };
    }
    open() {
        this.isVisibleSchedule = true;
    }
    editScheduleThreadDump(event) {
        // if (event.cavEventExt.actionConfig.action === "addThreadDump") {
        //   this.ThreadDumpSchedule.open()
        // }
    }
};
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()
], ThreadDumpScheduleComponent.prototype, "display", void 0);
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()
], ThreadDumpScheduleComponent.prototype, "displayChange", void 0);
ThreadDumpScheduleComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-thread-dump-schedule',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./thread-dump-schedule.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-schedule/thread-dump-schedule.component.html")).default,
        providers: [{ provide: _admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_2__["ACL_PROPS"], useFactory: _admin_access_control_management_services_cav_acl_util__WEBPACK_IMPORTED_MODULE_2__["getDiagnosticToolsThreadDumpACLProps"] }],
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./thread-dump-schedule.component.scss */ "./src/app/pages/tools/actions/thread-dump-revamp/thread-dump-schedule/thread-dump-schedule.component.scss")).default]
    })
], ThreadDumpScheduleComponent);



/***/ })

}]);