(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["test-case-configuration-test-case-configuration-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.component.html":
/*!**************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.component.html ***!
  \**************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<cav-table [value]=\"profileTable\" [headerRelativePath]=\"headerRelativePath\" \n        [scrollable]=\"true\" [responsive] =\"true\"\n        scrollHeight=\"calc(100vh - 280px)\" (clickButtonEvent)=\"clickButtonEvent($event)\">\n</cav-table>\n\n    \n\n\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.component.html":
/*!************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.component.html ***!
  \************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n<div *ngIf=\"buttonLabel==='Edit In Advance Mode'\">\n<h3 class=\"font-weight-600 my-16 mx-8\">Compare TestRun(s)</h3>\n<div class=\"p-grid p-align-center p-nogutter8\">\n  <div class=\"p-col-fixed width-120\">\n    <p-checkbox [disabled]=\"!aclMode\" name=\"group1\" label=\"BaseLine1\" binary=\"true\" [(ngModel)]=\"baseLineCheckBox\"\n      (onChange)=\"onBaselineCheckBoxClick()\" inputId=\"BaseLine\">\n    </p-checkbox>\n  </div>\n  <div class=\"p-col-fixed width-120\">\n    <input [disabled]=\"!aclMode == true ? true : baselineMSR\" type=\"text\" maxlength=\"16\" size=\"16\" id=\"base1\"\n      name=\"line1\" value=\"MSR Name\" [(ngModel)]=\"MSRbaseline1\" (keyup)=\"onbaseline1MSRclick($event)\" class=\"w-100-p\"\n      pInputText pTooltip=\"Maximum characters can not be greater than 16\">\n  </div>\n\n  <ng-container *ngIf=\"anotherProjectSubProj\">\n    <div class=\"p-col-fixed width-160\">\n      <p-dropdown  [style]=\"{'min-width': '100%'}\" [options]=\"projectBase1\" filter=\"true\"\n        [disabled]=\"!aclMode == true ? true : isBaselineScenario\" [(ngModel)]=\"selectedProjectBase1\" optionLabel=\"name\"\n        \n        (onChange)=\"getSubProjectListBase1(selectedProjectBase1, '')\"></p-dropdown>\n    </div>\n\n    <div class=\"p-col-fixed width-160\">\n      <p-dropdown  [style]=\"{'min-width': '100%'}\" [options]=\"subprojectBase1\" filter=\"true\"\n        [disabled]=\"!aclMode == true ? true : isBaselineScenario\" [(ngModel)]=\"selectedSubProjectBase1\"\n        (onChange)=\"onSubProjectClickBase1()\" optionLabel=\"name\" ></p-dropdown>\n    </div>\n  </ng-container>\n  <div class=\"p-col-fixed width-160\">\n    <p-dropdown [disabled]=\"!aclMode == true ? true : isBaselineScenario\" [style]=\"{'min-width': '100%'}\"\n      [options]=\"baseLineScenarioList\" [(ngModel)]=\"selBaselineScenario\" (onChange)=\"onBaselineScenarioClick()\"\n      optionLabel=\"name\" filter=\"true\">\n    </p-dropdown>\n  </div>\n\n  <div class=\"p-col-fixed width-160\">\n    <p-dropdown [disabled]=\"!aclMode == true ? true : isbBaselineTR\" [style]=\"{'min-width': '100%'}\"\n      [options]=\"baseLineTRList\" [(ngModel)]=\"selBaselineTR\" (onChange)=\"onBaselineTestRunClick()\"\n      placeholder=\"Test Run\" optionLabel=\"name\" filter=\"true\">\n    </p-dropdown>\n  </div>\n</div>\n\n<div class=\"p-grid p-align-center p-nogutter8\">\n  <div class=\"p-col-fixed width-120\">\n    <p-checkbox [disabled]=\"!aclMode\" name=\"group1\" label=\"BaseLine2\" binary=\"true\" [(ngModel)]=\"initialCheckBox\"\n      (onChange)=\"onInitialCheckBoxClick()\" inputId=\"Initial\">\n    </p-checkbox>\n  </div>\n  <div class=\"p-col-fixed width-120\">\n    <input [disabled]=\"!aclMode == true ? true : initialMSR\" type=\"text\" maxlength=\"16\" size=\"16\" id=\"base2\"\n      name=\"line2\" value=\"MSR Name\" [(ngModel)]=\"MSRbaseline2\" (keyup)=\"oninitial2MSRclick($event)\" class=\"w-100-p\"\n      pInputText pTooltip=\"Maximum characters can not be greater than 16\">\n  </div>\n\n  <ng-container *ngIf=\"anotherProjectSubProj\">\n    <div class=\"p-col-fixed width-160\">\n      <p-dropdown  [style]=\"{'min-width': '100%'}\" [options]=\"projectBase2\"\n        [disabled]=\"!aclMode == true ? true : isInitialScenario\" [(ngModel)]=\"selectedProjectBase2\" optionLabel=\"name\"\n        (onChange)=\"getSubProjectListBase2(selectedProjectBase2, '')\" filter=\"true\"></p-dropdown>\n    </div>\n    <div class=\"p-col-fixed width-160\">\n      <p-dropdown  [style]=\"{'min-width': '100%'}\" [options]=\"subprojectBase2\"\n        [disabled]=\"!aclMode == true ? true : isInitialScenario\" [(ngModel)]=\"selectedSubProjectBase1\"\n        (onChange)=\"onSubProjectClickBase2()\" optionLabel=\"name\" filter=\"true\"></p-dropdown>\n    </div>\n  </ng-container>\n  <div class=\"p-col-fixed width-160\">\n    <p-dropdown [disabled]=\"!aclMode == true ? true : isInitialScenario\" [style]=\"{'min-width': '100%'}\"\n      [options]=\"initialScenarioList\" [(ngModel)]=\"selInitialScenario\" (onChange)=\"onInitialScenarioClick()\"\n      optionLabel=\"name\" filter=\"true\">\n    </p-dropdown>\n  </div>\n\n  <div class=\"p-col-fixed width-160\">\n    <p-dropdown [disabled]=\"!aclMode == true ? true : isInitialTR\" [style]=\"{'min-width': '100%'}\"\n      [options]=\"initialTRList\" [(ngModel)]=\"selInitialTR\" (onChange)=\"onInitialTestRunClick()\" placeholder=\"Test Run\"\n      optionLabel=\"name\" filter=\"true\">\n    </p-dropdown>\n  </div>\n</div>\n\n<div class=\"p-grid p-align-center p-nogutter8\">\n  <div class=\"p-col-fixed width-120\">\n    <p-checkbox [disabled]=\"!aclMode\" name=\"group1\" label=\"BaseLine3\" binary=\"true\" [(ngModel)]=\"previousCheckBox\"\n      (onChange)=\"onPreviousCheckBoxClick()\" inputId=\"Previous\">\n    </p-checkbox>\n  </div>\n  <div class=\"p-col-fixed width-120\">\n    <input [disabled]=\"!aclMode == true ? true : previousMSR\" type=\"text\" maxlength=\"16\" size=\"16\" id=\"base3\"\n      name=\"line3\" value=\"MSR Name\" [(ngModel)]=\"MSRbaseline3\" (keyup)=\"onprevious3MSRclick($event)\" class=\"w-100-p\"\n      pInputText pTooltip=\"Maximum characters can not be greater than 16\">\n  </div>\n\n  <ng-container *ngIf=\"anotherProjectSubProj\">\n    <div class=\"p-col-fixed width-160\">\n      <p-dropdown [style]=\"{'min-width': '100%'}\" [options]=\"projectBase3\"\n        [disabled]=\"!aclMode == true ? true : isPreviousScenario\" [(ngModel)]=\"selectedProjectBase3\" optionLabel=\"name\"\n        (onChange)=\"getSubProjectListBase3(selectedProjectBase3, '')\" filter=\"true\"></p-dropdown>\n    </div>\n    <div class=\"p-col-fixed width-160\">\n      <p-dropdown [style]=\"{'min-width': '100%'}\" [options]=\"subprojectBase3\"\n        [disabled]=\"!aclMode == true ? true : isPreviousScenario\" [(ngModel)]=\"selectedSubProjectBase3\"\n        (onChange)=\"onSubProjectClickBase3()\" optionLabel=\"name\" filter=\"true\"></p-dropdown>\n    </div>\n  </ng-container>\n  <div class=\"p-col-fixed width-160\">\n    <p-dropdown [disabled]=\"!aclMode == true ? true : isPreviousScenario\" [style]=\"{'min-width': '100%'}\"\n      [options]=\"previousScenarioList\" [(ngModel)]=\"selPreviousScenario\" (onChange)=\"onPreviousScenarioClick()\"\n      optionLabel=\"name\" filter=\"true\">\n    </p-dropdown>\n  </div>\n\n  <div class=\"p-col-fixed width-160\">\n    <p-dropdown [disabled]=\"!aclMode == true ? true : isPreviousTR\" [style]=\"{'min-width': '100%'}\"\n      [options]=\"previousTRList\" [(ngModel)]=\"selPreviousTR\" (onChange)=\"onPreviousTestRunClick()\"\n      placeholder=\"Test Run\" optionLabel=\"name\" filter=\"true\">\n    </p-dropdown>\n  </div>\n</div>\n\n\n\n<div class=\"p-grid p-align-center p-nogutter8\">\n  <div class=\"p-col-fixed width-240\">\n    <p-checkbox [disabled]=\"!aclMode\" [disabled]=\"isSLACheckbox\" name=\"group2\" label=\"Override checkprofile SLA With \"\n      binary=\"true\" [(ngModel)]=\"overallSla\" (onChange)=\"onOverallSlaClick()\" inputId=\"ipt\">\n    </p-checkbox>\n  </div>\n  <div class=\"p-col-fixed width-320\">\n    <p-dropdown [disabled]=\"!aclMode == true ? true : isSlaTRList\" [style]=\"{'min-width': '100%'}\" [options]=\"slaTRList\"\n      [(ngModel)]=\"selSLATR\" (onChange)=\"slaTR()\" optionLabel=\"name\"></p-dropdown>\n  </div>\n</div>\n\n    \n<h3 class=\"font-weight-600 my-16 mx-8\">Pass/Fail Criteria</h3>\n            <div class=\"p-grid p-align-center p-nogutter8\">\n              <div class=\"p-col-2\">Metric is green if variation is upto</div>\n                <div class=\"p-col-fixed\">\n                <div class=\"ui-inputgroup\">\n                  <p-spinner inputStyleClass=\"width-50\" [disabled]=\"!aclMode\"\n                    [(ngModel)]=\"warningThreshold\" (keyup)=\"warning($event)\"></p-spinner>\n                  <span class=\"ui-inputgroup-addon\">%</span>\n                </div>\n              </div>\n\n              <div class=\"p-col-fixed pl-40\">Metric is yellow if variation is upto</div>\n              <div class=\"p-col-fixed\">\n                <div class=\"ui-inputgroup\">\n                  <p-spinner inputStyleClass=\"width-50\" [disabled]=\"!aclMode\"\n                    [(ngModel)]=\"criticalThreshold\" (keyup)=\"critical($event)\"></p-spinner>\n                  <span class=\"ui-inputgroup-addon\">%</span>\n                  </div>\n                </div>\n\n                <div class=\"p-col-fixed pl-40\">Metric is red if variation is more than </div>\n                <div class=\"p-col-fixed\">\n                  <div class=\"ui-inputgroup\">\n                    <p-spinner inputStyleClass=\"width-50\" [(ngModel)]=\"criticalThreshold\"\n                      [disabled]=\"true\"></p-spinner>\n                    <span class=\"ui-inputgroup-addon\">%</span>\n                  </div>\n                </div>\n            </div>\n\n            <div class=\"p-grid p-align-center p-nogutter8\">\n                <div class=\"p-col-2\">Overall test fails if </div>\n                <div class=\"p-col-fixed\">\n                <div class=\"ui-inputgroup\">\n                  <p-spinner inputStyleClass=\"width-50\" [disabled]=\"!aclMode\"\n                    [(ngModel)]=\"overallFailCriteria\" (keyup)=\"overallcriteria($event)\"></p-spinner>\n                  <span class=\"ui-inputgroup-addon\">% </span>\n                </div>\n                </div>\n                <div class=\"p-col pl-40\">or more metrics are red</div>\n\n                <div class=\"p-col-12\">\n                  <strong>Note:</strong> Variation is checked based on the operator used in rule. For\n                  less than on higher side, for greater than it is lower side and for equal to operator its in both sides .\n                </div>\n                <div class=\"p-col-12\">\n                  <p-toggleButton [(ngModel)]=\"advanceSettings\" onLabel=\"Advance&nbsp;Settings\" offLabel=\"Advance&nbsp;Settings\"\n                  onIcon=\"pi&nbsp;pi-minus-circle\" offIcon=\"pi pi-plus-circle\" styleClass=\"toggle-button-link\"></p-toggleButton>\n                </div>\n              </div>\n             \n\n\n\n<div class=\"p-grid p-align-center p-nogutter8\" *ngIf=\"advanceSettings\">\n  <div class=\"p-col-3\">\n    <p-checkbox name=\"group2\" [disabled]=\"!aclMode\" label=\"Run 'Post Check Script' on Failure\" binary=\"true\"\n      [(ngModel)]=\"runPostChkScript\" (onChange)=\"postChkScript()\" inputId=\"ipt\"></p-checkbox>\n  </div>\n  <div class=\"p-col-3\">\n    <p-checkbox name=\"group2\" [disabled]=\"!aclMode\" label=\"Include Transcation Count In Report\" binary=\"true\"\n      [(ngModel)]=\"transactionCount\" (onChange)=\"transacCount()\" inputId=\"ipt\"></p-checkbox>\n    <sup><i class=\"fa fa-question\"\n        title=\"Transaction count will be shown in the report for metrices such as Transaction Time, Transaction Successful Time. Ex: for Transaction Successful Time metric, count will be total successful transactions.\"\n        style=\"cursor: pointer;font-size: 14px;padding: 2px;color: gray;padding-top: 1px;\"></i></sup>\n  </div>\n\n  <div class=\"p-col-3\">\n    <p-checkbox name=\"group2\" [disabled]=\"!aclMode\" label=\"Include Unexecuted Transactions In Report\" binary=\"true\"\n      [(ngModel)]=\"unexecutedTransac\" (onChange)=\"unexecutedCount()\" inputId=\"ipt\"></p-checkbox>\n  </div>\n\n  <div class=\"p-grid p-align-center p-col-3\">\n    <div class=\"mr-5\">Apply rule on </div>\n    <p-dropdown [style]=\"{'min-width': '120px'}\" [disabled]=\"!aclMode\" [options]=\"criticalOfList\"\n      (onChange)=\"criticalOf($event)\" [(ngModel)]=\"selCriticalOf\" optionLabel=\"name\"\n      ></p-dropdown>\n  </div>\n  <div class=\"p-col-3\">\n    <p-checkbox name=\"group2\" [disabled]=\"!aclMode\" label=\"Report Generation Of Duration Phase\" binary=\"true\"\n      [(ngModel)]=\"durationphase\" (onChange)=\"duratPhase()\"></p-checkbox>\n  </div>\n</div>\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.component.html":
/*!******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.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 p-align-center p-justify-between p-8\">\n      <p class=\"font-14 font-weight-600 my-6 mx-8\">Add Parameter</p>\n      <p-selectButton [options]=\"iterationMode\" [(ngModel)]=\"selectIterMode\" (click)=\"getActions()\"></p-selectButton>\n</div>\n<div *ngIf=\"advance\">\n\n    <div class=\"p-grid p-align-center p-nogutter8\">\n      <div class=\"p-col-fixed\">Parameter Name</div>\n      <div class=\"p-col-fixed width-200\">\n        <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"paramName\">\n      </div>\n      <div class=\"p-col-fixed pl-25\">Value(s)</div>\n      <div class=\"p-col\">\n        <input type=\"text\" pInputText [(ngModel)]=\"parameterValues\" class=\"w-100-p\" placeholder=\"EG: Parameter 1, Parameter 2, Parameter 3\">\n      </div>\n      <div class=\"p-col-fixed\">\n        <p-selectButton [options]=\"usedIn\" [(ngModel)]=\"selectUseIn\"></p-selectButton>\n      </div>\n      <div class=\"p-col-fixed\">\n        <button pButton class=\"btn-tritery width-32 height-32\" icon=\"las-plus-circle-solid\"\n        pTooltip=\"Add Parameter\" tooltipPosition=\"top\" (click)=\"addIteration()\"></button>\n      </div>\n      <div class=\"p-col-fixed\">\n        <button  pButton class=\"btn-tritery width-32 height-32\" icon=\"las-bars-solid\"\n        pTooltip=\"Add Row\" (click)=\"addRow()\" tooltipPosition=\"top\"></button>\n      </div>\n    </div>\n\n    <div class=\"p-8\">\n    <p-table #dt class=\"new-table\" [columns]=\"cols\" [value]=\"iterationsArr\" [scrollable]=\"true\" scrollHeight=\"200px\" [rows]=\"10\" [(selection)]=\"selectedBox\"\n    [paginator]=\"true\" [totalRecords]=\"iterationsArr.length\" [rows]=\"4\" [rowsPerPageOptions]=\"[4,8,12]\" (onRowSelect)=\"onRowSelect($event)\" (onRowUnselect)=\"onRowUnselect($event)\" (onHeaderCheckboxToggle)=\"onHeaderCheckBoxToggle($event)\">\n\n    <ng-template pTemplate=\"colgroup\" let-columns>\n      <colgroup>\n        <ng-container *ngFor=\"let col of cols\">\n          <col *ngIf=\"col.action\" [style]=\"{'width': col.width+'px'}\">\n        </ng-container>\n      </colgroup>\n    </ng-template>\n    \n      <ng-template pTemplate=\"header\" let-columns>\n          <tr>\n            <th pResizableColumn style=\"width: 50px;\">\n              <div class=\"p-grid p-justify-center\" >\n                <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n              </div>\n          </th>\n              <th *ngFor=\"let col of cols | slice:3\" >\n                <span *ngIf=\"col.field == 'Status'\">\n                  {{col.header}}\n                </span>\n                <span *ngIf=\"col.field !== 'Status'\">\n                  {{col.header}} <button pButton type=\"button\" [disabled]= \"!aclMode\" icon=\"icons8 icons8-trash\" class=\"btn-icon\" (click)=\"onParamSelection(col.header)\" title=\"Delete parameter\"></button>\n                </span>\n                  \n              </th>\n              <th style=\"width: 50px;\">  \n                <button pButton type=\"button\" [disabled]= \"disableDelete || !aclMode\" icon=\"icons8 icons8-trash\" class=\"btn-icon\" (click)=\"deleteMultiple()\" title=\"Delete parameter\"></button>\n              </th>\n          </tr>\n      </ng-template>\n      <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-editing=\"editing\"  let-index=\"rowIndex\">\n          <tr>\n            <td class=\"text-center\">\n              <p-tableCheckbox [value]=\"rowData\" ></p-tableCheckbox>\n          </td>\n            <td style=\"text-align:center\">\n              <p-inputSwitch [disabled]=\"!aclMode\" [(ngModel)]=\"rowData.Status\" (onChange)=\"changeLabel(index)\" ></p-inputSwitch>\n            </td> \n            <td *ngFor=\"let col of cols | slice:4\" pEditableColumn>\n              <p-cellEditor>\n                <ng-template pTemplate=\"input\">\n                  <input [(ngModel)]=\"rowData[col.field]\"  [disabled]= \"!aclMode\" type=\"text\" placeholder=\"{{def}}\">\n                </ng-template>\n                <ng-template pTemplate=\"output\">\n                  {{rowData[col.field]}}\n                </ng-template>\n              </p-cellEditor>\n            </td>\n            <td class=\"text-center\" style=\"width: 50px;\" >\n              <button pButton type=\"button\" [disabled]= \"!aclMode\" icon=\"icons8 icons8-trash\" class=\"btn-icon\" (click)=\"deleteRow(index)\" title=\"Delete\"></button>\n            </td>\n          </tr>\n      </ng-template>\n      <ng-template pTemplate=\"emptymessage\" let-columns>\n        <tr>\n            <td [attr.colspan]=\"columns.length+1\" class=\"noRecords\">\n                No records found\n            </td>\n        </tr>\n    </ng-template>\n  </p-table>\n\n</div>\n<!--Text Mode-->\n<div class=\"p-8\" *ngIf=\"selectIterMode == 'textMode'\">\n  <textarea rows=\"10\" [disabled]=\"!aclMode\" class=\"w-100-p\" pInputTextarea\n    [(ngModel)]=\"textMode\">{{textMode}}</textarea>\n</div>\n\n\n\n\n<!-- <p-dialog class=\"profile-dialog browseTopCss headerCss\" header=\"Add Parameter\" *ngIf=\"addParameterDialog\"\n  [(visible)]=\"addParameterDialog\" modal=\"modal\" width=\"auto\" height=\"auto\" responsive=\"true\" [resizable]=\"false\">\n  <div><span class=\"cav-mr-2\">Enter Parameter Name: </span> <input id=\"input\" type=\"text\" size=\"30\" pInputText\n      [(ngModel)]=\"paramName\" placeholder=\"{{paramName}}\"> </div>\n  <div style=\"margin-top:10px;\">\n    <p-radioButton name=\"groupAll\" value=\"scenario\" label=\"Used In Test\" [(ngModel)]=\"parameter\"></p-radioButton>\n    <p-radioButton class=\"radio-class\" name=\"groupAll\" value=\"script\" label=\"Used In Script\" [(ngModel)]=\"parameter\"></p-radioButton>\n  </div>\n  <div style=\"margin-top:10px;\">\n  <button type=\"submit\" (click)=\"addIteration()\">OK</button>\n  <button type=\"submit\" style=\"margin-left: 10px;\" (click)=\"addParameterDialog=false\">Cancel</button>\n  </div>\n</p-dialog> -->\n\n<!-- <p-dialog class=\"profile-dialog browseTopCss headerCss\" header=\"Delete Parameter\" *ngIf=\"deleteParameterDialog\"\n  [(visible)]=\"deleteParameterDialog\" modal=\"modal\" width=\"auto\" height=\"auto\" responsive=\"true\" [resizable]=\"false\">\n  <div><span class=\"cav-mr-2\">Select Parameter Name: </span>\n    <p-dropdown [style]=\"{'width': '150px'}\" scrollHeight=\"120px\" [options]=\"paramNames\" [(ngModel)]=\"paramSelected\" dropdownIcon=\"pi pi-chevron-down\"\n    optionLabel=\"name\"></p-dropdown></div>\n  <div style=\"margin-top:10px;\">\n  <button type=\"submit\" (click)=\"onParamSelection(paramSelected)\">OK</button>\n  <button type=\"submit\" style=\"margin-left: 10px;\" (click)=\"deleteParameterDialog=false\">Cancel</button>\n  </div>\n</p-dialog> -->\n\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.component.html":
/*!****************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.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 p-nogutter8\">\n  <div class=\"p-col-10\">\n    <p-chips #chip1  placeholder=\"To:\" class=\"chip input-chips\" [disabled]=\"!aclMode\" pTooltip=\"Press enter after adding each email address\" (onAdd)=\"validateInput()\" (onRemove)=\"updateList('To')\" [allowDuplicate]=\"false\" [(ngModel)]=\"toList\" separator=\",\"></p-chips>\n  </div>\n  <div class=\"p-col-2\">\n    <button pButton type=\"button\" (click)=\"showCC = true\" class=\"ui-btn-primary mr-5\">CC</button>\n    <button pButton type=\"button\" (click)=\"showBCC = true\" class=\"ui-btn-primary mr-5\">BCC</button>\n  </div>\n\n<div *ngIf=\"showCC\"  class=\"p-col-12\">\n  <p-chips #chip2  placeholder=\"CC:\" class=\"chip input-chips\" [disabled]=\"!aclMode\" pTooltip=\"Press enter after adding each email address\" (onAdd)=\"validateInput()\" (onRemove)=\"updateList('Cc')\" [allowDuplicate]=\"false\" [(ngModel)]=\"ccList\" separator=\",\"></p-chips>\n  </div>\n\n  <div  *ngIf=\"showBCC\" class=\"p-col-12\">\n    <p-chips #chip3 placeholder=\"BCC:\" class=\"chip input-chips\"  [disabled]=\"!aclMode\" pTooltip=\"Press enter after adding each email address\" (onAdd)=\"validateInput()\" (onRemove)=\"updateList('Bcc')\" [allowDuplicate]=\"false\" [(ngModel)]=\"bccList\" separator=\",\"></p-chips>\n  </div>\n  <div class=\"p-col-12 chip\">\n    <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"subject\"  (keyup)=\"onKeySubject()\" placeholder=\"Subject:\">\n </div>\n\n<div class=\"p-col-12\">\n  <textarea pInputTextarea [(ngModel)]=\"bodyText\"  (keyup)=\"onKeyBody()\"\n  rows=\"8\" class=\"w-100-p border-none\">\n</textarea>\n</div>\n<div class=\"p-col-12 top-border border-5\"></div>\n<div class=\"w-100-p\">\n  <strong class=\"mr-14\" >Note:</strong>Use these keywords for:\n</div>\n<ul class=\"font-11\">\n  <li>\n      <div class=\"w-100-p p-grid p-align-center\">\n          <div class=\"w-60-p pl-20\">\n              <ul class=\"ul-styled pl-0\">\n                  <li>\n                      <strong>$TESTSUITE_NAME :</strong>\n                       Testsuite Name\n                  </li>\n                  <li>\n                      <strong>$TEST_CYCLE_NO : </strong>\n                       Test Cycle Number\n                  </li>\n                  <li>\n                      <strong>$SUMMARY_TABLE_DATA :</strong>\n                       To show summary table data \n                  </li>\n                  <li>\n                      <strong>$TESTCASE_NAME :</strong>\n                       TestCase Name\n\n                  </li>\n                  <li>\n                      <strong>$STATUS :</strong>\n                       Test Case Status\n                  </li>\n              </ul>\n          </div>\n          <div class=\"w-40-p pl-30\">\n              <ul class=\"ul-styled pl-0\">\n                  <li>\n                      <strong>$VUSER : </strong>\n                       Number of vsuer \n                  </li>\n                  <li>\n                      <strong>$TESTRUN : </strong>\n                        Test run number\n\n                  </li>\n                  <li>\n                      <strong>$IP : </strong>\n                       IP Address\n                  </li>\n                  <li>\n                      <strong>$TEST_DURATION : </strong>\n                       Test Duration\n                  </li>\n                  <li class=\"nowrap\" >\n                      <strong>$START_TIME : </strong>\n                      Start Time of test case\" \n                  </li>\n              </ul>\n          </div>\n      </div>\n  \n  </li>\n</ul>\n\n<div class=\"p-col-12 pt-0 pl-45\">\n  <p *ngIf=\"globalConfig\" class=\"text-danger\">*Mandatory global email settings are not configured. Configure via :\n    <code>'{{userName}} > Email/SMS Settings'</code></p>\n  <p>\n</div>\n\n\n\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.component.html":
/*!********************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.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 p-align-center p-justify-end p-8\">\n  <p-selectButton [options]=\"postTestScript\" [(ngModel)]=\"selectPostTestScript\" (click)=\"getActions()\"></p-selectButton>\n</div>\n<div *ngIf=\"advance\">\n  \n  <!-- <div class=\"v-px-2 cav-py-2 cav-fnt-weight500\">\nAdd Action :\n</div> -->\n  <div class=\"p-grid p-align-center p-nogutter8\">\n    <div class=\"p-col-fixed\">Action</div>\n    <div class=\"p-col-fixed width-200\">\n      <p-dropdown [style]=\"{'min-width': '100%'}\" [disabled]=\"!aclMode\" [options]=\"actionOptions\"\n        [(ngModel)]=\"actionSelected\" placeholder=\"{{actionSelected}}\" (onChange)=\"onActionChange(actionSelected)\"\n        dropdownIcon=\"icons8 icons8-expand-arrow\" optionLabel=\"name\"></p-dropdown>\n    </div>\n\n    <ng-container *ngIf=\"actionSelected['name'] != 'SLEEP'\">\n      <div class=\"p-col-fixed pl-15\">Server Name</div>\n      <div class=\"p-col-fixed width-200\">\n        <p-dropdown [style]=\"{'min-width': '100%'}\" [disabled]=\"!aclMode\" [options]=\"serverOptions\"\n          [(ngModel)]=\"serverSelected\" placeholder=\"{{serverSelected}}\" (onChange)=\"onServerChange(serverSelected)\"\n          dropdownIcon=\"icons8 icons8-expand-arrow\" optionLabel=\"name\"></p-dropdown>\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'COPY_FILE'\">\n      <div class=\"p-col-fixed pl-15\">Source</div>\n      <div class=\"p-col-fixed\">\n        <div class=\"ui-inputgroup width-300\">\n          <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"source\" value=\"{{source}}\">\n          <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('source')\"></button>\n        </div>\n      </div>\n\n      <div class=\"p-col-fixed pl-15\">Destination</div>\n      <div class=\"p-col-fixed\">\n        <div class=\"ui-inputgroup width-300\">\n          <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"destination\" value=\"{{destination}}\">\n          <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('destination')\"></button>\n        </div>\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'START_COMMAND' || actionSelected['name'] === 'STOP_COMMAND'\">\n      <div class=\"p-col-fixed pl-15\">Service String</div>\n      <div class=\"p-col-5\">\n        <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"startStopCommand\" value=\"{{startStopCommand}}\">\n        <!-- <textarea class=\"p-5\" [rows]=\"1\" [cols]=\"50\" pInputTextarea autoResize=\"auto\" [(ngModel)]=\"startStopCommand\" value=\"{{startStopCommand}}\"></textarea> -->\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'REMOVE_FILE'\">\n      <div class=\"p-col-fixed pl-15\">File Path</div>\n      <div class=\"p-col-fixed width-200\">\n        <div class=\"ui-inputgroup\">\n        <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"removeFile\" value=\"{{removeFile}}\">\n        <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('removeFile')\"></button>\n        </div>\n      </div>\n    </ng-container>\n\n    <ng-container\n      *ngIf=\"actionSelected['name'] === 'SUDO_START_SERVICE' || actionSelected['name'] === 'SUDO_STOP_SERVICE'\">\n      <div class=\"p-col-fixed pl-15\">Service String</div>\n      <div class=\"p-col-5\">\n        <input type=\"text\" class=\"w-100-p\" pInputText [(ngModel)]=\"startStopServiceString\"\n          value=\"{{startStopServiceString}}\">\n        <!-- <textarea class=\"p-5\" [rows]=\"1\" [cols]=\"50\" pInputTextarea autoResize=\"auto\" [(ngModel)]=\"startStopServiceString\" value=\"{{startStopServiceString}}\"></textarea> -->\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'REMOTE_EXECUTION'\">\n      <div class=\"p-col-fixed pl-15\">Remote Command</div>\n      <div class=\"p-col-5\">\n        <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"remoteExecution\" value=\"{{remoteExecution}}\">\n        <!-- <textarea class=\"p-5\" [rows]=\"1\" [cols]=\"50\" pInputTextarea autoResize=\"auto\" [(ngModel)]=\"remoteExecution\" value=\"{{remoteExecution}}\"></textarea> -->\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'UPLOAD' || actionSelected['name'] === 'DOWNLOAD'\">\n      <div class=\"p-col-fixed pl-15\">Server Path</div>\n      <div class=\"p-col-fixed\">\n        <div class=\"ui-inputgroup width-300\">\n          <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"serverPath\" value=\"{{serverPath}}\">\n          <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('serverPath')\"></button>\n        </div>\n      </div>\n\n      <div class=\"p-col-fixed pl-15\">Netstorm Path</div>\n      <div class=\"p-col-fixed\">\n        <div class=\"ui-inputgroup width-300\">\n          <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"netstormPath\" value=\"{{netstormPath}}\">\n          <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('netstormPath')\"></button>\n        </div>\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'SLEEP'\">\n      <div class=\"p-col-fixed pl-15\">Time (Seconds)</div>\n      <div class=\"p-col-fixed\">\n        <p-spinner inputStyleClass=\"width-60\" [(ngModel)]=\"timeModel\"></p-spinner>\n        <!-- <input type=\"number\" pInputText [(ngModel)]=\"timeModel\" style=\"width:74px;\"> -->\n      </div>\n    </ng-container>\n\n    <div class=\"p-col-fixed\">\n      <button class=\"btn-tritery width-32 height-32\" pButton [disabled]=\"!aclMode\" icon=\"las-plus-circle-solid\"\n        (click)=\"addAction(actionSelected)\" pTooltip=\"Add Action\"></button>\n    </div>\n  </div>\n\n\n  <div class=\"p-8\">\n    <cav-table [value]=\"addedActionList\" [headerRelativePath]=\"headerRelativePath\" \n        [scrollable]=\"true\" [responsive] =\"true\" scrollHeight=\"calc(100vh - 280px)\" (clickButtonEvent)=\"clickButtonEvent($event)\">\n</cav-table>\n  </div>\n  </div>\n  <!--Text Mode-->\n<div *ngIf=\"selectPostTestScript === 'textMode'\" class=\"p-8\">\n    <textarea rows=\"10\" pInputTextarea class=\"w-100-p\" id=\"postTxtId\" [disabled]=\"!aclMode\" pInputTextarea\n      (keyup)=\"onKeyTextMode($event)\"></textarea>\n  </div>\n  <div class=\"p-grid p-nogutter8\">\n    <div class=\"p-col-12\">\n      <div class=\"line-height18\" *ngIf=\"advance\"><strong>Command Description :</strong> {{commandDescription}} </div>\n    </div>\n  </div>\n\n  <app-file-manager #fileManager openFrom=\"testsuite\" (pathBind)=\"getPath($event)\"></app-file-manager>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.component.html":
/*!******************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.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 p-align-center p-justify-end p-8\">\n  <p-selectButton [options]=\"preTestScript\" [(ngModel)]=\"selectPreTestScript\" (click)=\"getActions()\"></p-selectButton>\n</div>\n<div *ngIf=\"advance\">\n\n  \n\n  <div class=\"p-grid p-align-center p-nogutter8\">\n    <div class=\"p-col-fixed\">Action</div>\n    <div class=\"p-col-fixed width-200\">\n      <p-dropdown [style]=\"{'min-width': '100%'}\" [disabled]=\"!aclMode\" [options]=\"actionOptions\"\n        [(ngModel)]=\"actionSelected\" placeholder=\"{{actionSelected}}\" (onChange)=\"onActionChange(actionSelected)\"\n        dropdownIcon=\"icons8 icons8-expand-arrow\" optionLabel=\"name\"></p-dropdown>\n    </div>\n\n    <ng-container *ngIf=\"actionSelected['name'] != 'SLEEP'\">\n      <div class=\"p-col-fixed pl-15\">Server Name</div>\n      <div class=\"p-col-fixed width-200\">\n        <p-dropdown [style]=\"{'min-width': '100%'}\" [disabled]=\"!aclMode\" [options]=\"serverOptions\"\n          [(ngModel)]=\"serverSelected\" placeholder=\"{{serverSelected}}\" (onChange)=\"onServerChange(serverSelected)\"\n          dropdownIcon=\"icons8 icons8-expand-arrow\" optionLabel=\"name\"></p-dropdown>\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'COPY_FILE'\">\n      <div class=\"p-col-fixed pl-15\">Source</div>\n      <div class=\"p-col-fixed\">\n        <div class=\"ui-inputgroup width-280\">\n          <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"source\" value=\"{{source}}\">\n          <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('source')\"></button>\n        </div>\n      </div>\n      <div class=\"p-col-fixed pl-15\">Destination</div>\n      <div class=\"p-col-fixed\">\n        <div class=\"ui-inputgroup width-280\">\n          <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"destination\" value=\"{{destination}}\">\n          <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('destination')\"></button>\n        </div>\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'START_COMMAND' || actionSelected['name'] === 'STOP_COMMAND'\">\n      <div class=\"p-col-fixed pl-15\">Service String</div>\n      <div class=\"p-col-5\">\n        <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"startStopCommand\" value=\"{{startStopCommand}}\">\n        <!-- <textarea class=\"w-100-p\" [rows]=\"1\" pInputTextarea autoResize=\"auto\" [(ngModel)]=\"startStopCommand\"\n          value=\"{{startStopCommand}}\"></textarea> -->\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'REMOVE_FILE'\">\n      <div class=\"p-col-fixed pl-15\">File Path</div>\n      <div class=\"p-col-fixed  width-210\">\n        <div class=\"ui-inputgroup\">\n          <input type=\"text\" pInputText [(ngModel)]=\"removeFile\" value=\"{{removeFile}}\">\n          <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('removeFile')\"></button>\n        </div>\n      </div>\n    </ng-container>\n\n    <ng-container\n      *ngIf=\"actionSelected['name'] === 'SUDO_START_SERVICE' || actionSelected['name'] === 'SUDO_STOP_SERVICE'\">\n      <div class=\"p-col-fixed pl-15\">Service String</div>\n      <div class=\"p-col-5\">\n        <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"startStopServiceString\"\n        value=\"{{startStopServiceString}}\">\n        <!-- <textarea class=\"w-100-p\" [rows]=\"1\" pInputTextarea autoResize=\"auto\" [(ngModel)]=\"startStopServiceString\"\n          value=\"{{startStopServiceString}}\"></textarea> -->\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'REMOTE_EXECUTION'\">\n      <div class=\"p-col-fixed pl-15\">Remote Command</div>\n      <div class=\"p-col-5\">\n        <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"remoteExecution\"\n        value=\"{{remoteExecution}}\">\n        <!-- <textarea class=\"w-100-p\" [rows]=\"1\" pInputTextarea autoResize=\"auto\" [(ngModel)]=\"remoteExecution\"\n          value=\"{{remoteExecution}}\"></textarea> -->\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'UPLOAD' || actionSelected['name'] === 'DOWNLOAD'\">\n      <div class=\"p-col-fixed pl-15\">Server Path</div>\n      <div class=\"p-col-fixed \">\n        <div class=\"ui-inputgroup width-280\">\n          <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"serverPath\" value=\"{{serverPath}}\">\n          <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('serverPath')\"></button>\n        </div>\n      </div>\n\n      <div class=\"p-col-fixed pl-15\">Netstorm Path</div>\n      <div class=\"p-col-fixed\">\n        <div class=\"ui-inputgroup width-280\">\n          <input type=\"text\" pInputText class=\"w-100-p\" [(ngModel)]=\"netstormPath\" value=\"{{netstormPath}}\">\n          <button pButton type=\"button\" icon=\"icons8 icons8-folder\" (click)=\"openFileExplorer('netstormPath')\"></button>\n        </div>\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"actionSelected['name'] === 'SLEEP'\">\n      <div class=\"p-col-fixed pl-15\">Time (Seconds)</div>\n      <div class=\"p-col-fixed width-60\">\n        <p-spinner inputStyleClass=\"width-60\" [(ngModel)]=\"timeModel\"></p-spinner>\n        <!-- <input type=\"number\" pInputText [(ngModel)]=\"timeModel\"> -->\n      </div>\n    </ng-container>\n\n    <div class=\"p-col-fixed\">\n      <button class=\"btn-tritery width-32 height-32\" pButton [disabled]=\"!aclMode\" (click)=\"addAction(actionSelected)\"\n        icon=\"las-plus-circle-solid\" pTooltip=\"Add Action\"></button>\n    </div>\n  </div>\n\n  <div class=\"p-8\">\n\n    <cav-table [value]=\"addedActionList\" [headerRelativePath]=\"headerRelativePath\" \n        [scrollable]=\"true\" [responsive] =\"true\"\n        scrollHeight=\"calc(100vh - 280px)\" (clickButtonEvent)=\"clickButtonEvent($event)\">\n</cav-table>\n  </div>\n</div>\n\n<!--Text Mode-->\n<div *ngIf=\"selectPreTestScript == 'textMode'\" class=\"p-8\">\n    <textarea rows=\"10\" pInputTextarea class=\"w-100-p\" id=\"txtId\" [disabled]=\"!aclMode\" (keyup)=\"onKeyTextMode($event)\"></textarea>\n</div>\n\n<div class=\"p-grid p-nogutter8\">\n  <div class=\"p-col-12\">\n  <div class=\"line-height18\" *ngIf=\"advance\"><strong>Command Description :</strong>{{commandDescription}}</div>\n</div>\n  <!-- <div class=\"p-col-fixed width-200 p-grid p-justify-end\">\n    <button *ngIf=\"advance\" pButton class=\"ui-button-rounded mx-3\" (click)=\"getPreActionsInTextMode()\">View in Text mode</button>\n    <button *ngIf=\"GUI\" pButton class=\"ui-button-rounded mx-3\" (click)=\"getPreActionsInGuiMode()\">View in GUI mode</button>\n</div> -->\n</div>\n<app-file-manager #fileManager openFrom=\"testsuite\" (pathBind)=\"getPath($event)\"></app-file-manager>\n ");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.component.html":
/*!**************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.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=\"pageLoading\" *ngIf=\"loader\">\n    <i class=\"icons8 icons8-spinner spin font-36 \"></i>\n</div>\n\n<div class=\"test-case-configuration p-16 ns-scenario\">\n    <div class=\"p-grid p-align-center p-justify-between mb-16\">\n        <h2 class=\"text-uppercase font-weight-600 my-0\">Test Case Configuration</h2>\n        <div class=\"p-grid p-align-center\">\n          <button *ngIf=\"!aclMode\" type=\"button\" pButton class=\"btn-primary-outline mx-8\" icon=\"icons8 icons8-eye\"\n            pTooltip=\"View Mode\" label=\"View Mode\"></button>\n    <app-help  [helpFileName]=\"'testCaseConfiguration'\"  [helpTitle]=\"'Test Case Configuration'\" [helpFolder]=\"'automation'\"></app-help>\n        </div>\n      </div>\n\n    <div class=\" mb-16\">\n        <div class=\"card-header border-5 bottom-border p-0\">\n            <div class=\"p-grid p-align-center p-nogutter8\">\n                <div class=\"p-col-fixed width-100\">Project</div>\n                <div class=\"p-col-fixed width-300\">\n                    <p-dropdown [style]=\"{'min-width': '100%'}\" [options]=\"project\" [disabled]=\"disableDropdown\"\n                        [(ngModel)]=\"selectedProject\" optionLabel=\"name\"\n                        (onChange)=\"getSubProjectList(selectedProject)\"></p-dropdown>\n                </div>\n                <div class=\"p-col-fixed\">Subproject</div>\n                <div class=\"p-col-fixed width-300\">\n                    <p-dropdown [style]=\"{'min-width': '100%'}\" [options]=\"subproject\" [disabled]=\"disableDropdown\"\n                        [(ngModel)]=\"selectedSubProject\" (onChange)=\"onSubProjectClick()\" optionLabel=\"name\"\n                       ></p-dropdown>\n                </div>\n                <div class=\"p-col-fixed\">Test Case Name</div>\n                <div class=\"p-col\">\n                    <input id=\"input\" type=\"text\" [disabled]=\"!aclMode\" class=\"w-100-p\" pInputText [(ngModel)]=\"testCaseName\"\n                        placeholder=\"{{testCaseName}}\" (keyup)=\"onKeyTestCase($event)\"\n                        pTooltip=\"Test Case Name: {{testCaseName}}{{tooltipTestCaseName}}\">\n                </div>\n            </div>\n        \n            <div class=\"p-grid p-align-center p-nogutter8\">\n                <div class=\"p-col-fixed width-100\">Description</div>\n                <div class=\"p-col\">\n                    <input class=\"data\" id=\"input\" type=\"text\" [disabled]=\"!aclMode\" class=\"w-100-p\" pInputText\n                    [(ngModel)]=\"description\" (keyup)=\"onKeyTestDescription($event)\" tooltipPosition=\"bottom\"\n                    pTooltip=\"{{description}}\">\n                </div>\n            </div>\n        </div>\n        \n        <div class=\"p-col-12\">\n            <p-checkbox name=\"project\" binary=\"true\" (onChange)=\"anotherProjectSubproject()\"\n                [(ngModel)]=\"projectSubproject\"\n                label=\"Use other project/subproject for scenario, Check profile and check script\"></p-checkbox>\n        </div>\n        \n        <div class=\" px-0\">\n            <div class=\"p-grid p-align-center p-nogutter\">\n                <div class=\"p-grid p-align-center p-nogutter8\">\n                    <div class=\"p-col-fixed width-100\">Test</div>\n                    <div class=\"p-col-fixed width-300\">\n                        <p-dropdown [disabled]=\"!aclMode\" [style]=\"{'min-width': '100%'}\" [options]=\"scenarioList\"\n                            [(ngModel)]=\"scenarioSelected\" (onChange)=\"changeScenario(scenarioSelected)\"\n                            optionLabel=\"name\"\n                            filter=\"true\" pTooltip=\"{{scenarioSelected['name']}}\"></p-dropdown>\n                    </div>\n                </div>\n                <div class=\"p-grid p-align-center p-nogutter8\">\n                    <button (click)=\"openScenarioInAdvance()\" pButton class=\"btn-primary-outline mx-8\"\n                    label=\"Edit Test From Configuration File\"  pTooltip=\"Advance\" tooltipPosition=\"top\"></button>\n                    <button [disabled]=\"!aclMode\" label=\"Edit in Test GUI\" (click)=\"openScenario(scenarioSelected)\" pButton class=\"btn-primary-outline mx-8\"  pTooltip=\"Edit Test From UI\" tooltipPosition=\"top\"></button>\n                    <button [disabled]=\"!aclMode\" (click)=\"openScript(scenarioSelected)\" pButton class=\"btn-primary-outline mx-8\" label=\"Edit Script\"   pTooltip=\"Edit Script\" tooltipPosition=\"top\"></button>\n                </div>\n            </div>\n            <div class=\"p-grid p-align-center p-nogutter8\" *ngIf=\"openScenTab\">\n                <div class=\"p-col-12\">\n                    <textarea id=\"txt\" rows=\"10\" class=\"w-100-p\" [(ngModel)]=\"text\" [disabled]=\"!aclMode\" pInputTextarea></textarea>\n                </div>\n            </div>\n        </div>\n    </div>\n\n    <p-panel class=\"testPanel\" [style]=\"{'margin-bottom':'16px'}\">\n            <p-header>\n                <div class=\"w-100-p p-grid p-align-center p-justify-between\" >\n                    <div class=\"text-uppercase p-col-fixed font-14 font-weight-600 p-col-nogutter\">\n                        Check Profile \n                    </div>\n                    <div class=\"p-col-fixed\">\n                        <button pButton class=\"btn-icon mx-8 font-16\" icon=\"las-plus-circle-solid\"\n                        routerLink=\"add-check-profile\" [routerLinkActive]=\"'active'\" pTooltip=\"Create New CheckProfile\"\n                        tooltipPosition=\"top\" (click)=\"addCheckProfile()\"></button>\n                    </div>\n                </div>\n            </p-header>\n       \n\n        <div class=\"p-grid p-align-center p-nogutter8\">\n            <ng-container *ngIf=\"projectSubproject\">\n                <div class=\"p-col-fixed width-100 text-right\">Project</div>\n                <div class=\"p-col-fixed width-200\">\n                    <p-dropdown [style]=\"{'min-width': '100%'}\" [options]=\"projectCheckProfile\"\n                        [(ngModel)]=\"selectedProjectCheckProfile\" optionLabel=\"name\"\n                        (onChange)=\"getSubProjectListCheckProfile()\">\n                    </p-dropdown>\n                </div>\n                <div class=\"p-col-fixed width-100 text-right\">Subproject</div>\n                <div class=\"p-col-fixed width-200\">\n                    <p-dropdown [style]=\"{'min-width': '100%'}\" [options]=\"subprojectCheckProfile\"\n                        [(ngModel)]=\"selectedSubProjectCheckProfile\" (onChange)=\"onSubProjectClickCheckProf()\" optionLabel=\"name\"\n                       ></p-dropdown>\n                </div>\n            </ng-container>\n            <div class=\"p-col-fixed width-100\">Check Profile</div>\n            <div class=\"p-col-fixed\">\n                <p-multiSelect [disabled]=\"!aclMode\" [style]=\"{'min-width': '200px'}\"\n                        [disabled]=\"isCheckProfileList\"\n                        [options]=\"checkProfileList\" [(ngModel)]=\"selCheckProfiles\"\n                       ></p-multiSelect>\n            </div>\n            <div class=\"p-col-fixed\">\n                <button pButton  class=\"btn-tritery width-32 height-32\" icon=\"las-plus-circle-solid\" pTooltip=\"Add In Table\"\n                tooltipPosition=\"top\" (click)=\"addCheckProfileInTable('1', '')\"></button>\n            </div>\n            <div class=\"p-col-12\" *ngIf=\"scenarioSelected['name'] !== 'Select Test'\">\n                <app-check-profile-tab></app-check-profile-tab>\n            </div>\n        </div>\n    </p-panel>\n\n    <p-panel *ngIf=\"scenarioSelected['name'] !== 'Select Test'\" class=\"testPanel\" [style]=\"{'margin-bottom':'16px'}\">\n        <p-header>\n            <div class=\"w-100-p p-grid p-align-center p-justify-between\" >\n                <div class=\"text-uppercase p-col-fixed font-14 font-weight-600 pl-0\">\n                    Check Script \n                </div>\n            </div>\n        </p-header>\n        <div>\n            <app-check-script-tab></app-check-script-tab>\n        </div>\n    </p-panel>\n\n    <p-panel *ngIf=\"scenarioSelected['name'] !== 'Select Test'\" class=\"testPanel\" [style]=\"{'margin-bottom':'16px'}\">\n        <p-header>\n            <div class=\"w-100-p p-grid p-align-center p-justify-between\" >\n                <div class=\"text-uppercase p-col-fixed font-14 font-weight-600 pl-0\">\n                    Iteration\n                </div>\n            </div>\n        </p-header>\n        <div>\n            <app-iteration-tab></app-iteration-tab>\n        </div>\n    </p-panel>\n\n    <p-panel *ngIf=\"scenarioSelected['name'] !== 'Select Test'\" class=\"testPanel\" [style]=\"{'margin-bottom':'16px'}\">\n        <p-header>\n            <div class=\"w-100-p p-grid p-align-center p-justify-between\" >\n                <div class=\"text-uppercase p-col-fixed font-14 font-weight-600 pl-0\">\n                    Pre Test Script \n                </div>\n            </div>\n        </p-header>\n        <div>\n            <app-pre-test-script-tab></app-pre-test-script-tab>\n        </div>\n    </p-panel>\n    <p-panel *ngIf=\"scenarioSelected['name'] !== 'Select Test'\" class=\"testPanel\" [style]=\"{'margin-bottom':'16px'}\">\n        <p-header>\n            <div class=\"w-100-p p-grid p-align-center p-justify-between\" >\n                <div class=\"text-uppercase p-col-fixed font-14 font-weight-600 pl-0\">\n                    Post Test Script\n                </div>\n            </div>\n        </p-header>\n        <div>\n            <app-post-test-script-tab></app-post-test-script-tab>\n        </div>\n    </p-panel>\n\n\n\n\n\n\n\n<div class=\" mb-16\">\n    <div class=\" px-0\">\n        <h3 class=\"text-uppercase font-weight-600 m-8 p-grid p-align-center\">Mail Configuration\n            <!-- <i class=\"icons8 icons8-help font-20 clickable text-primary mx-8\"></i> -->\n        </h3>\n    </div>\n    <div class=\"p-grid p-align-center px-8 mb-24 mt-8\" *ngIf=\"scenarioSelected['name'] !== 'Select Test'\">\n        <!-- <p-checkbox name=\"group1\" binary=\"true\" [(ngModel)]=\"emailDialogOpen\"></p-checkbox> -->\n\n        <div class=\"mx-4\">Attach Report of each test cases in single Email \n           <span *ngIf=\"addEmail\" class=\"blueHead text-underline clickable\" (click)=\"emailDialogOpen=true\">Add Mail Configuration</span> \n           <span *ngIf=\"editEmail\" class=\"blueHead text-underline clickable\" (click)=\"emailDialogOpen=true\">Edit Mail Configuration</span> \n        </div>\n    </div>\n\n\n    <div class=\"p-8\" *ngIf=\"mailConfigTable\">\n        <cav-table [value]=\"mailBodyTable\" [headerRelativePath]=\"headerRelativePath\">\n        </cav-table>\n    </div>\n\n</div>\n\n\n<p-dialog [(visible)]=\"emailDialogOpen\" [style]=\"{width: '900px'}\" [modal]=\"true\" [closable]=\"false\">\n    <p-header class=\"p-grid p-align-center p-justify-between text-primary\">\n        <div class=\"p-grid p-align-center font-16\">\n            <i class=\"las-envelope-solid mx-5\"></i> Email All Test Case\n        </div>\n        <i class=\"icons8 icons8-delete clickable\" (click)=\"emailDialogOpen = false\"></i>\n    </p-header>\n    <app-mail-configuration></app-mail-configuration>\n    <p-footer>\n        <button type=\"button\" pButton (click)=\"emailDialogOpen=false\" label=\"No\" class=\"ui-button-secondary\"></button>\n        <button type=\"button\" pButton  (click)=\"showEmailTable()\" label=\"Yes\"></button>\n    </p-footer>\n</p-dialog>\n\n\n\n<div class=\"p-grid p-align-center p-justify-end\">\n    <button class=\"btn-secondary-outline mx-8\" pButton routerLink=\"/home/load-test/test-case\"\n        (click)=\"backtoTestCaseList()\" label=\"back\" pTooltip=\"Back\" tooltipPosition=\"top\">\n    </button>\n    <button [disabled]=\"!aclMode\" (click)=\"saveConfiguration(scenarioSelected)\" pButton label=\"Save\" pTooltip=\"Save\"\n        tooltipPosition=\"top\"></button>\n</div>\n\n\n</div>\n\n<p-dialog header=\"Add Parameter\" *ngIf=\"addParameterDialog\" [(visible)]=\"addParameterDialog\" modal=\"modal\"\n    [resizable]=\"false\" [style]=\"{'width':'600px'}\">\n    <div class=\"p-grid p-align-center\">\n        <div class=\"p-col-4\"> Enter Parameter Name</div>\n        <div class=\"p-col-4\">\n            <input id=\"input\" type=\"text\" class=\"w-100-p\" pInputText [(ngModel)]=\"paramName\"\n                placeholder=\"{{paramName}}\" (keypress)=\"validateParamName($event)\">\n        </div>\n        </div>\n        <div class=\"p-grid p-align-center\">\n        <div class=\"p-col-4\">\n            <p-radioButton name=\"groupAll\" value=\"scenario\" label=\"Used In Test\" [(ngModel)]=\"parameter\">\n            </p-radioButton>\n        </div>\n        <div class=\"p-col-4\">\n            <p-radioButton name=\"groupAll\" value=\"script\" label=\"Used In Script\" [(ngModel)]=\"parameter\">\n            </p-radioButton>\n        </div>\n        <!-- <button *ngIf=\"modeForIteration=='GUI'\" pButton class=\"btn-icon\" icon=\"las-bars-solid\" -->\n                        <!-- pTooltip=\"Add Row\" (click)=\"addRow()\" tooltipPosition=\"top\"></button> -->\n        \n    </div>\n    <p-footer class=\"p-grid p-justify-end\">\n        <button type=\"submit\" class=\"btn-secondary-outline\" pButton\n            (click)=\"addParameterDialog=false\">Cancel</button>\n        <button type=\"submit\" (click)=\"addIteration()\" class=\"ui-button-rounded px-15 mx-6\" pButton>OK</button>\n    </p-footer>\n</p-dialog>\n\n<app-cav-scen-open></app-cav-scen-open>");

/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.component.scss":
/*!************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.component.scss ***!
  \************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".logs-panel {\n  line-height: 1.53322;\n  height: 200px;\n  overflow: auto;\n}\n\n.mx-1em {\n  min-height: 200px;\n  max-height: 360px;\n  overflow: auto;\n}\n\n.cursor {\n  cursor: pointer;\n}\n\n.noRecords {\n  text-align: center;\n}");

/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.component.ts":
/*!**********************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.component.ts ***!
  \**********************************************************************************************************************/
/*! exports provided: CheckProfileTabComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckProfileTabComponent", function() { return CheckProfileTabComponent; });
/* 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 _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/testsuite-config.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-config.service.ts");
/* harmony import */ var _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/testsuite-data-handler.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-data-handler.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_testsuite_http_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../services/testsuite-http.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-http.service.ts");







let CheckProfileTabComponent = class CheckProfileTabComponent {
    constructor(testsuiteHTTPService, sessionService, _testConfig, router, _dataRequest) {
        this.testsuiteHTTPService = testsuiteHTTPService;
        this.sessionService = sessionService;
        this._testConfig = _testConfig;
        this.router = router;
        this._dataRequest = _dataRequest;
        this.aclMode = true;
        this.userLoginName = "";
        this.headerRelativePath = "testSuite/testCases/check-profile-list.json";
        this.cols = [
            { field: 'Profile Name', header: 'Profile Name', align: 'left', width: '20%' },
            { field: 'Profile Description', header: 'Profile Description', align: 'left', width: '15%' },
            { field: 'Check Rules', header: 'Check Rules', align: 'right', width: '10%' },
            { field: 'Last Updated', header: 'Last Updated', align: 'right', width: '25%' },
            { field: 'Updated By', header: 'Updated By', align: 'left', width: '20%' },
        ];
        this.userLoginName = this.sessionService.session.cctx.u;
    }
    ngOnInit() {
        if (this._testConfig.$testCaseMode != undefined)
            this.aclMode = this._testConfig.$testCaseMode;
        this.dataSubscription = this._testConfig.checkProfileDataObservable$.subscribe(action => {
            this.updateEventData(action);
        });
    }
    updateEventData(action) {
        try {
            /* Checking for actions. */
            switch (action.action) {
                case 'CHECK_PROFILE_TABLE_DATA':
                    {
                        console.log('discontinued metric data from server - ', action.data);
                        if (action.data) {
                            //this.profileTable = action.data;
                            if (this.profileTable == null || this.profileTable == undefined) {
                                this.profileTable = [];
                            }
                            let checkprofiledata = action.data;
                            for (let i = 0; i < checkprofiledata.length; i++) {
                                let index = this.profileTable.findIndex(item => item['Profile Name'] === checkprofiledata[i]['Profile Name']);
                                console.log("index..", index);
                                if (index == -1)
                                    this.profileTable.push(checkprofiledata[i]);
                            }
                            // this.profileTable = this.profileTable.concat(action.data);
                            this.saveCheckProfileData();
                        }
                        break;
                    }
                case 'SAVE_CHECK_PROFILE':
                    {
                        this.saveCheckProfileInFile();
                        break;
                    }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    saveCheckProfileData() {
        try {
            let checkProfileList = "";
            if (this.profileTable && this.profileTable.length !== 0) {
                for (let i = 0; i < this.profileTable.length; i++) {
                    console.log("profile Table =", this.profileTable[i]['Profile Name']);
                    let chkProfileName = this.profileTable[i]['Profile Name'];
                    if (chkProfileName.includes(".")) {
                        chkProfileName = chkProfileName.substring(0, chkProfileName.indexOf("."));
                        checkProfileList = checkProfileList + chkProfileName;
                    }
                    if (i != this.profileTable.length - 1)
                        checkProfileList = checkProfileList + "\n";
                }
            }
            let testCaseData = this._testConfig.getTestCaseData();
            testCaseData.checkStatusBufferData = checkProfileList;
        }
        catch (e) {
            console.error(e);
        }
    }
    deleteCheckProfile(index) {
        try {
            if (!this.aclMode) {
                return;
            }
            this.profileTable.splice(index, 1);
            this.saveCheckProfileData();
            //  this._testConfig.updateSelectedCheckProfile(this._testConfig.getTestCaseData());
            // let testCaseName = "",project="",subproject="";
            // if (this._testConfig.getSelectedRowForTestCase() !== null) {
            //   testCaseName = this._testConfig.getSelectedRowForTestCase()['Test Case'];
            //   project = this._testConfig.getSelectedRowForTestCase()['Project'];
            //   subproject = this._testConfig.getSelectedRowForTestCase()['Sub Project'];
            // }
            // console.log("testcase name in delete check profile =",testCaseName);
            // let testCaseData = this._testConfig.getTestCaseData();
            // this._dataRequest.saveSelectedCheckProfile(project,subproject,testCaseName,testCaseData.checkStatusBufferData);
        }
        catch (e) {
            console.error(e);
        }
    }
    updateCheckprofile(index) {
        try {
            if (!this.aclMode) {
                return;
            }
            this._testConfig.$checkProfileUpdateMode = true;
            if (this.profileTable[index]['Profile Name'].includes("/")) {
                var profile = this.profileTable[index]['Profile Name'].split("/");
                this._testConfig.$projectSubProject = profile[0] + "/" + profile[1];
                this._testConfig.$profileName = profile[2];
            }
            else
                this._testConfig.$profileName = this.profileTable[index]['Profile Name'];
            this._testConfig.$checkProfileUrl = '/home/testcase/checkProfile';
            this._testConfig.$checkProfileMode = this.aclMode;
            // this._navService.addNewNaviationLink('checkProfileList');
            this.router.navigate(['/home/load-test/check-profile/check-profile-list/add-check-profile']);
        }
        catch (e) {
            console.error(e);
        }
    }
    saveCheckProfileInFile() {
        try {
            let testCaseName = "";
            let testCaseDes = "NA";
            if (this._testConfig.getSelectedRowForTestCase() !== null) {
                testCaseDes = this._testConfig.getSelectedRowForTestCase()['Description'];
                testCaseName = this._testConfig.getSelectedRowForTestCase()['Test Case'];
            }
            if (testCaseName == "") {
                alert("Please fill the testcase Name.");
                return;
            }
            let checkProfileList = "";
            if (this.profileTable && this.profileTable.length !== 0) {
                for (let i = 0; i < this.profileTable.length; i++) {
                    let chkProfileName = this.profileTable[i]['Profile Name'];
                    if (chkProfileName.includes(".")) {
                        chkProfileName = chkProfileName.substring(0, chkProfileName.indexOf("."));
                        checkProfileList = checkProfileList + chkProfileName;
                    }
                    if (i != this.profileTable.length - 1)
                        checkProfileList = checkProfileList + "\n";
                }
            }
            let testCaseData = this._testConfig.getTestCaseData();
            testCaseData.checkStatusBufferData = checkProfileList;
            testCaseData.scenarioDescription = testCaseDes;
            let actualtestcaseName = "";
            if (this._testConfig.$actualTestCaseName == "")
                actualtestcaseName = testCaseName;
            else {
                actualtestcaseName = this._testConfig.$actualTestCaseName;
            }
            this._dataRequest.saveTestCaseData(actualtestcaseName, testCaseName);
        }
        catch (e) {
            console.error(e);
        }
    }
    clickButtonEvent(event) {
        var _a, _b, _c, _d, _e, _f;
        try {
            if (((_b = (_a = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _a === void 0 ? void 0 : _a.actionConfig) === null || _b === void 0 ? void 0 : _b.action) == "deleteRow") {
                this.deleteCheckProfile((_c = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _c === void 0 ? void 0 : _c.rowIndex);
            }
            console.log(event);
            if (((_e = (_d = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _d === void 0 ? void 0 : _d.actionConfig) === null || _e === void 0 ? void 0 : _e.action) == "editCheckProfile") {
                this.updateCheckprofile((_f = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _f === void 0 ? void 0 : _f.rowIndex);
            }
        }
        catch (error) {
            console.error("Error in clickButtonEvent", error);
        }
    }
    ngOnDestroy() {
        try {
            this.dataSubscription.unsubscribe();
        }
        catch (e) {
            console.error(e);
        }
    }
};
CheckProfileTabComponent.ctorParameters = () => [
    { type: _services_testsuite_http_service__WEBPACK_IMPORTED_MODULE_6__["TestsuiteHttpService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_5__["SessionService"] },
    { type: _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_3__["TestsuiteConfigService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
    { type: _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_4__["TestsuiteDataHandlerService"] }
];
CheckProfileTabComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-check-profile-tab',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./check-profile-tab.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.component.html")).default,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./check-profile-tab.component.scss */ "./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.component.scss")).default]
    })
], CheckProfileTabComponent);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.module.ts":
/*!*******************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.module.ts ***!
  \*******************************************************************************************************************/
/*! exports provided: CheckProfileTabModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckProfileTabModule", function() { return CheckProfileTabModule; });
/* 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 src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/header/header.module */ "./src/app/shared/header/header.module.ts");
/* harmony import */ var primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js");
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
/* harmony import */ var primeng_card__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/card */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-card.js");
/* harmony import */ var primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js");
/* harmony import */ var primeng_dialog__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
/* harmony import */ var primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
/* harmony import */ var primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
/* harmony import */ var primeng_menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng/menu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menu.js");
/* harmony import */ var primeng_message__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/message */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-message.js");
/* harmony import */ var primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! primeng/multiselect */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
/* harmony import */ var primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js");
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js");
/* harmony import */ var _check_profile_tab_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./check-profile-tab.component */ "./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.component.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");





















let CheckProfileTabModule = class CheckProfileTabModule {
};
CheckProfileTabModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_check_profile_tab_component__WEBPACK_IMPORTED_MODULE_19__["CheckProfileTabComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__["ToolbarModule"],
            src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__["HeaderModule"],
            primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__["InputTextModule"],
            primeng_button__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"],
            primeng_message__WEBPACK_IMPORTED_MODULE_12__["MessageModule"],
            primeng_dialog__WEBPACK_IMPORTED_MODULE_8__["DialogModule"],
            primeng_card__WEBPACK_IMPORTED_MODULE_6__["CardModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_17__["FormsModule"],
            primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__["DropdownModule"],
            primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__["CheckboxModule"],
            primeng_table__WEBPACK_IMPORTED_MODULE_14__["TableModule"],
            primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__["MultiSelectModule"],
            primeng_menu__WEBPACK_IMPORTED_MODULE_11__["MenuModule"],
            primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__["BreadcrumbModule"],
            primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__["TooltipModule"],
            src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_20__["CavTableModule"],
            primeng_sidebar__WEBPACK_IMPORTED_MODULE_18__["SidebarModule"]
        ],
        exports: [_check_profile_tab_component__WEBPACK_IMPORTED_MODULE_19__["CheckProfileTabComponent"]]
    })
], CheckProfileTabModule);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.component.scss":
/*!**********************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.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/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.component.ts":
/*!********************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.component.ts ***!
  \********************************************************************************************************************/
/*! exports provided: CheckScriptTabComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckScriptTabComponent", function() { return CheckScriptTabComponent; });
/* 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 _containers_check_status_file__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../containers/check-status-file */ "./src/app/pages/home/load-test/testsuite/containers/check-status-file.ts");
/* harmony import */ var _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/testsuite-config.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-config.service.ts");
/* harmony import */ var _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/testsuite-data-handler.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-data-handler.service.ts");
/* harmony import */ var _services_testsuite_http_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../services/testsuite-http.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-http.service.ts");
/* harmony import */ var _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../services/testsuite.state */ "./src/app/pages/home/load-test/testsuite/services/testsuite.state.ts");








let CheckScriptTabComponent = class CheckScriptTabComponent {
    constructor(_testConfig, _dataRequest, sessionService, testsuiteHTTpService) {
        this._testConfig = _testConfig;
        this._dataRequest = _dataRequest;
        this.sessionService = sessionService;
        this.testsuiteHTTpService = testsuiteHTTpService;
        this.baseLineCheckBox = false;
        this.selBaselineScenario = { name: "Select Test" };
        this.selBaselineTR = { name: "Select TestRun" };
        this.initialCheckBox = false;
        this.selInitialScenario = { name: "Select Test" };
        this.selInitialTR = { name: "Select TestRun" };
        this.previousCheckBox = false;
        this.criticalThreshold = "50";
        this.warningThreshold = "20";
        this.overallFailCriteria = "10";
        this.selCriticalOf = { name: 'Current' };
        this.thresholdAsRange = false;
        this.selSLATR = { name: 'Select Baseline' };
        this.isBaselineScenario = true;
        this.isbBaselineTR = true;
        this.isInitialScenario = true;
        this.isInitialTR = true;
        this.isSlaTRList = true;
        this.runPostChkScript = false;
        this.isServerName = true;
        this.selServerName = { name: 'Server Name' };
        this.server = false;
        this.isWarVersion = true;
        this.warVersionPath = "";
        this.successTransac = false;
        this.transactionCount = false;
        this.durationphase = false;
        this.unexecutedTransac = false;
        this.selTrendAxisValues = [];
        this.overallSla = false;
        this.releaseVersion = false;
        this.isReleaseVersion = true;
        this.releaseVersionTextBox = "";
        this.projectSubproject = "";
        this.buttonLabel = "Edit In Advance Mode";
        this.checkScriptTextArea = "";
        this.isSLACheckbox = true;
        this.aclMode = true;
        this.baselineMSR = true;
        this.initialMSR = true;
        this.selPreviousScenario = { name: "Select Test" };
        this.selPreviousTR = { name: "Select TestRun" };
        this.previousMSR = true;
        this.isPreviousScenario = true;
        this.isPreviousTR = true;
        this.MSRbaseline1 = "";
        this.MSRbaseline2 = "";
        this.MSRbaseline3 = "";
        this.anotherProjectSubProj = false;
        this.selectedProjectBase1 = { 'name': 'Select Project' };
        this.selectedSubProjectBase1 = { 'name': 'Select SubProject' };
        this.selectedProjectBase2 = { 'name': 'Select Project' };
        this.selectedSubProjectBas2 = { 'name': 'Select SubProject' };
        this.selectedProjectBase3 = { 'name': 'Select Project' };
        this.selectedSubProjectBase3 = { 'name': 'Select SubProject' };
        this.permissionArray = [];
        this.customObj = {};
        this.editMode = false;
        this.userLoginName = "";
        this.advanceSettings = false;
        this.userLoginName = this.sessionService.session.cctx.u;
        this.criticalOfList = [
            { name: 'Current' },
        ];
        this.slaTRList = [{ name: 'Select Baseline' }];
        this.trensAxisList = [{ label: 'Start Date/Time', value: 'startDateTime' },
            { label: 'Environment Name', value: 'environmentName' }];
    }
    ngOnInit() {
        this.aclMode = this._testConfig.$testCaseMode;
        this.permissionArray = this._testConfig.$permission;
        this.dataSubscription = this._testConfig.checkProfileDataObservable$.subscribe(action => {
            this.updateEventData(action);
        });
        this.getScenarioListIfSameProj();
    }
    getScenarioListForBase1(projSubproj) {
        console.log('before this.selectedProjectBase1name = ', this.selectedProjectBase1['name']);
        if (this.selectedProjectBase1 == undefined || this.selectedProjectBase1['name'] == 'Select Project') {
            this.baseLineScenarioList = [];
            this.baseLineScenarioList.push({ 'name': 'Select Test' });
            this.selBaselineScenario['name'] = 'Select Test';
            console.log('this.selectedProjectBase1name = ', this.selectedProjectBase1['name']);
            return;
        }
        let param = "&projSubproj= -p " + projSubproj + "&username=" + this.userLoginName;
        this.testsuiteHTTpService.getScenarioListForSpecificProjSubProj(param).subscribe((state) => {
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetScenarioListForSpeProSubProLoadingState"]) {
                this.onLoadingScenList(state);
                return;
            }
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetScenarioListForSpeProSubProLoadedState"]) {
                this.onLoadedScenListBase1(state);
                return;
            }
        }, (state) => {
            this.onLoadingErrorScenList(state);
        });
    }
    onLoadingScenList(state) { }
    onLoadedScenListBase1(state) { this.setScenarioForBase1(state.data); }
    onLoadingErrorScenList(state) { }
    setScenarioForBase1(response) {
        if (response) {
            this.baseLineScenarioList = [];
            this.baseLineScenarioList.push({ "name": "Select Test" });
            let scenarioList = response;
            for (let i = 0; i < scenarioList.length; i++) {
                let name = scenarioList[i];
                if (name.includes("/")) {
                    let obj = {};
                    let scename = name.substring(name.lastIndexOf("/") + 1, name.length);
                    obj = { 'name': scename };
                    this.baseLineScenarioList.push(obj);
                }
            }
        }
    }
    getScenarioListForBase2(projSubproj) {
        if (this.selectedProjectBase2 == null || this.selectedProjectBase2['name'] == 'Select Test') {
            this.initialScenarioList = [];
            this.initialScenarioList.push({ 'name': 'Select Test' });
            return;
        }
        let param = "&projSubproj= -p " + projSubproj + "&username=" + this.userLoginName;
        this.testsuiteHTTpService.getScenarioListForSpecificProjSubProj(param).subscribe((state) => {
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetScenarioListForSpeProSubProLoadingState"]) {
                this.onLoadingScenList(state);
                return;
            }
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetScenarioListForSpeProSubProLoadedState"]) {
                this.onLoadedScenListBase2(state);
                return;
            }
        }, (state) => {
            this.onLoadingErrorScenList(state);
        });
    }
    onLoadedScenListBase2(state) {
        this.setScenarioListForBase2(state.data);
    }
    setScenarioListForBase2(response) {
        if (response) {
            let scenarioList = response;
            this.initialScenarioList = [];
            this.initialScenarioList.push({ "name": "Select Test" });
            for (let i = 0; i < scenarioList.length; i++) {
                let name = scenarioList[i];
                if (name.includes("/")) {
                    let obj = {};
                    let scename = name.substring(name.lastIndexOf("/") + 1, name.length);
                    obj = { 'name': scename };
                    this.initialScenarioList.push(obj);
                }
            }
        }
    }
    getScenarioListForBase3(projSubproj) {
        if (this.selectedProjectBase3 == undefined || this.selectedProjectBase3['name'] == 'Select Test') {
            this.previousScenarioList = [];
            this.previousScenarioList.push({ 'name': 'Select Test' });
            return;
        }
        let param = "&projSubproj= -p " + projSubproj + "&username=" + this.userLoginName;
        this.testsuiteHTTpService.getScenarioListForSpecificProjSubProj(param).subscribe((state) => {
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetScenarioListForSpeProSubProLoadingState"]) {
                this.onLoadingScenList(state);
                return;
            }
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetScenarioListForSpeProSubProLoadedState"]) {
                this.onLoadedScenListBase2(state);
                return;
            }
        }, (state) => {
            this.onLoadingErrorScenList(state);
        });
    }
    onLoadedScenListForBase3(state) {
        this.setScenListForBase3(state.data);
    }
    setScenListForBase3(response) {
        if (response) {
            let scenarioList = response;
            this.previousScenarioList = [];
            this.previousScenarioList.push({ "name": "Select Test" });
            for (let i = 0; i < scenarioList.length; i++) {
                let name = scenarioList[i];
                if (name.includes("/")) {
                    let obj = {};
                    let scename = name.substring(name.lastIndexOf("/") + 1, name.length);
                    obj = { 'name': scename };
                    this.previousScenarioList.push(obj);
                }
            }
        }
    }
    getScenarioListIfSameProj() {
        console.log("inside same scenario");
        let scenarioList = this._testConfig.$scenarioList;
        this.baseLineScenarioList = [];
        this.initialScenarioList = [];
        this.previousScenarioList = [];
        this.baseLineScenarioList.push({ "name": "Select Test" });
        this.initialScenarioList.push({ "name": "Select Test" });
        this.previousScenarioList.push({ "name": "Select Test" });
        for (let i = 0; i < scenarioList.length; i++) {
            let name = scenarioList[i];
            if (name.includes("/")) {
                let obj = {};
                let scename = name.substring(name.lastIndexOf("/") + 1, name.length);
                obj = { 'name': scename };
                console.log('scename...', scename);
                this.baseLineScenarioList.push(obj);
                this.initialScenarioList.push(obj);
                this.previousScenarioList.push(obj);
            }
        }
    }
    getListOfProjSubproj(checkScriptData) {
        this.testsuiteHTTpService.getProjList(this.userLoginName).subscribe((state) => {
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetProjListLoadingState"]) {
                console.log("In GetProjListLoadingState");
                this.onLoadingGetProjList(state);
                return;
            }
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetProjListLoadedState"]) {
                console.log("In GetProjListLoadedState");
                this.onLoadedGetProjList(state, checkScriptData);
                return;
            }
        }, (state) => {
            console.log("In GetProjListLoadingErrorState");
            this.onLoadingErrorGetProjList(state);
        });
    }
    onLoadingGetProjList(state) { }
    onLoadingErrorGetProjList(state) { }
    onLoadedGetProjList(state, checkScriptData) {
        console.log("Inside onLoadedGetProjList");
        this.setProjectList(state.data, checkScriptData);
    }
    setProjectList(response, checkScriptData) {
        if (response) {
            this.projectSubProjectList = response;
            this.getProjectList(checkScriptData);
        }
        else {
            this.projectBase1 = [];
            this.projectBase2 = [];
            this.projectBase3 = [];
            this.subprojectBase1 = [];
            this.subprojectBase2 = [];
            this.subprojectBase3 = [];
        }
    }
    getProjectList(checkScriptData) {
        try {
            this.projectBase1 = [];
            this.projectBase2 = [];
            this.projectBase3 = [];
            this.projectBase1.push({ 'name': "Select Project" });
            this.projectBase2.push({ 'name': "Select Project" });
            this.projectBase3.push({ 'name': "Select Project" });
            if (this.permissionArray && this.permissionArray.length > 0) {
                console.log("in if check ...");
                for (let i = 0; i < this.permissionArray.length; i++) {
                    let arr = [];
                    if (this.projectBase1 && this.projectBase1.length > 0 && this.projectBase1.some(proj => proj.name === this.permissionArray[i]['project'])) {
                        console.log("project not empty ...");
                        if (this.permissionArray[i]['Permission'] !== '4') {
                            console.log("inside duplicate with permission 6 ...");
                            arr = this.customObj[this.permissionArray[i]['project']];
                            arr.push({ name: this.permissionArray[i]['subproject'] });
                            this.customObj[this.permissionArray[i]['project']] = arr;
                        }
                    }
                    else {
                        console.log("inside permission 6 ...");
                        this.projectBase1.push({ name: this.permissionArray[i]['project'] });
                        this.projectBase2.push({ name: this.permissionArray[i]['project'] });
                        this.projectBase3.push({ name: this.permissionArray[i]['project'] });
                        arr.push({ name: this.permissionArray[i]['subproject'] });
                        this.customObj[this.permissionArray[i]['project']] = arr;
                    }
                }
            }
            else if (this.projectSubProjectList) {
                console.log("in other check ...", this.projectSubProjectList);
                let arr = Object.keys(this.projectSubProjectList);
                for (let i = 0; i < arr.length; i++) {
                    this.projectBase1.push({ "name": arr[i] });
                    this.projectBase2.push({ "name": arr[i] });
                    this.projectBase3.push({ "name": arr[i] });
                }
            }
            if (this.editMode == true) {
                this.setInitialValues(checkScriptData);
                this.editMode = false;
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    getSubProjectListBase1(project, subproject) {
        try {
            if (project == null || project['name'] == 'Select Project') {
                this.subprojectBase1 = [];
                this.subprojectBase1.push({ 'name': "Select Sub Project" });
                this.baseLineScenarioList = [];
                this.baseLineScenarioList.push({ 'name': 'Select Test' });
                return;
            }
            this.subprojectBase1 = [];
            console.log("custom obj...", this.customObj);
            if (this.permissionArray && this.permissionArray.length > 0) {
                console.log("list =", this.customObj[project['name']]);
                this.subprojectBase1 = this.customObj[project['name']];
            }
            else {
                let arr = this.projectSubProjectList[project['name']];
                this.subprojectBase1 = [];
                for (let i = 0; i < arr.length; i++) {
                    this.subprojectBase1.push({ "name": arr[i] });
                }
            }
            if (subproject == null || subproject == undefined || subproject == "")
                this.selectedSubProjectBase1 = this.subprojectBase1[0];
            else
                this.selectedSubProjectBase1 = subproject;
            console.log("selected sub project..", this.selectedSubProjectBase1);
            this.getScenarioListForBase1(this.selectedProjectBase1["name"] + "/" + this.selectedSubProjectBase1["name"]);
        }
        catch (e) {
            console.error(e);
        }
    }
    getSubProjectListBase2(project, subproject) {
        try {
            if (project == null || project['name'] == 'Select Project') {
                this.subprojectBase2 = [];
                this.subprojectBase2.push({ 'name': "Select Sub Project" });
                this.initialScenarioList = [];
                this.initialScenarioList.push({ 'name': 'Select Test' });
                return;
            }
            this.subprojectBase2 = [];
            if (this.permissionArray && this.permissionArray.length > 0) {
                console.log("list =", this.customObj[project['name']]);
                this.subprojectBase2 = this.customObj[project['name']];
            }
            else {
                let arr = this.projectSubProjectList[project['name']];
                this.subprojectBase2 = [];
                for (let i = 0; i < arr.length; i++) {
                    this.subprojectBase2.push({ "name": arr[i] });
                }
            }
            console.log(project, "sub project = ", subproject);
            if (subproject == null || subproject == undefined || subproject == "")
                this.selectedSubProjectBas2 = this.subprojectBase2[0];
            else
                this.selectedSubProjectBas2 = subproject;
            this.getScenarioListForBase2(this.selectedProjectBase2["name"] + "/" + this.selectedSubProjectBas2["name"]);
        }
        catch (e) {
            console.error(e);
        }
    }
    getSubProjectListBase3(project, subproject) {
        try {
            if (project == null || project['name'] == 'Select Project') {
                this.subprojectBase3 = [];
                this.subprojectBase3.push({ 'name': "Select Sub Project" });
                this.previousScenarioList = [];
                this.previousScenarioList.push({ 'name': 'Select Test' });
                return;
            }
            this.subprojectBase3 = [];
            if (this.permissionArray && this.permissionArray.length > 0) {
                console.log("list =", this.customObj[project['name']]);
                this.subprojectBase3 = this.customObj[project['name']];
            }
            else {
                //let obj = this._testConfig.getProjSubprojList();
                let arr = this.projectSubProjectList['name'];
                this.subprojectBase3 = [];
                for (let i = 0; i < arr.length; i++) {
                    this.subprojectBase3.push({ "name": arr[i] });
                }
            }
            if (subproject == null || subproject == undefined || subproject == "")
                this.selectedSubProjectBase3 = this.subprojectBase3[0];
            else
                this.selectedSubProjectBase3 = subproject;
            this.getScenarioListForBase3(this.selectedProjectBase3["name"] + "/" + this.selectedSubProjectBase3["name"]);
        }
        catch (e) {
            console.error(e);
        }
    }
    onSubProjectClickBase1() {
        try {
            if (this.selectedSubProjectBase1 != null && this.selectedSubProjectBase1['name'] != 'Select Sub Project')
                this.getScenarioListForBase1(this.selectedProjectBase1['name'] + "/" + this.selectedSubProjectBase1['name']);
        }
        catch (e) {
            console.error(e);
        }
    }
    onSubProjectClickBase2() {
        try {
            if (this.selectedSubProjectBas2 != null && this.selectedSubProjectBas2['name'] != 'Select Sub Project')
                this.getScenarioListForBase2(this.selectedProjectBase2['name'] + "/" + this.selectedSubProjectBas2['name']);
        }
        catch (e) {
            console.error(e);
        }
    }
    onSubProjectClickBase3() {
        try {
            if (this.selectedSubProjectBase3 != null && this.selectedSubProjectBase3['name'] != 'Select Sub Project')
                this.getScenarioListForBase3(this.selectedProjectBase3['name'] + "/" + this.selectedSubProjectBase3['name']);
        }
        catch (e) {
            console.error(e);
        }
    }
    updateEventData(action) {
        try {
            /* Checking for actions. */
            switch (action.action) {
                case 'SCENARIO_LIST':
                    {
                        console.log('scenario list data.', action.data);
                        if (action.data) {
                            let scenarioList = action.data;
                            this._testConfig.$scenarioList = scenarioList;
                            if (!this.anotherProjectSubProj) {
                                console.log("inside if scenario");
                                this.baseLineScenarioList = [];
                                this.initialScenarioList = [];
                                this.previousScenarioList = [];
                                this.baseLineScenarioList.push({ "name": "Select Test" });
                                this.initialScenarioList.push({ "name": "Select Test" });
                                this.previousScenarioList.push({ "name": "Select Test" });
                                for (let i = 0; i < scenarioList.length; i++) {
                                    let name = scenarioList[i];
                                    if (name.includes("/")) {
                                        let obj = {};
                                        let scename = name.substring(name.lastIndexOf("/") + 1, name.length);
                                        obj = { 'name': scename };
                                        console.log('scename...', scename);
                                        this.baseLineScenarioList.push(obj);
                                        this.initialScenarioList.push(obj);
                                        this.previousScenarioList.push(obj);
                                    }
                                }
                            }
                        }
                        break;
                    }
                case 'CHECK_SCRIPT_FILE_DATA':
                    {
                        console.log('check script file data.', action.data);
                        if (action.data) {
                            let checkScriptData = action.data;
                            this.anotherProjectSubProj = checkScriptData.anotherProjSubProj;
                            if (this.anotherProjectSubProj) {
                                this.editMode = true;
                                this.getListOfProjSubproj(checkScriptData);
                            }
                            else
                                this.setInitialValues(checkScriptData);
                        }
                        break;
                    }
                case 'SERVER_LIST':
                    {
                        console.log('server list.', action.data);
                        if (action.data) {
                            let arr = action.data;
                            this.serverNameList = [];
                            this.serverNameList.push({ "name": "Server Name" });
                            for (let i = 0; i < arr.length; i++) {
                                console.log("arr at " + i, arr[i]);
                                let obj = { "name": arr[i] };
                                this.serverNameList.push(obj);
                            }
                        }
                        break;
                    }
                case 'ANOTHER_PROJ_SUBPROJ':
                    {
                        console.log("project subproject var", this.anotherProjectSubProj);
                        this.anotherProjectSubProj = action.data;
                        console.log("project subproject", this.anotherProjectSubProj);
                        if (this.anotherProjectSubProj == true) {
                            console.log("inside if check");
                            this.baseLineScenarioList = [];
                            this.initialScenarioList = [];
                            this.previousScenarioList = [];
                            this.baseLineScenarioList.push({ 'name': 'Select Test' });
                            this.initialScenarioList.push({ 'name': 'Select Test' });
                            this.previousScenarioList.push({ 'name': 'Select Test' });
                            this.projectBase1 = [];
                            this.projectBase2 = [];
                            this.projectBase3 = [];
                            this.subprojectBase1 = [];
                            this.subprojectBase2 = [];
                            this.subprojectBase3 = [];
                            this.projectBase1.push({ 'name': "Select Project" });
                            this.projectBase2.push({ 'name': "Select Project" });
                            this.projectBase3.push({ 'name': "Select Project" });
                            this.subprojectBase1.push({ 'name': "Select Sub Project" });
                            this.subprojectBase2.push({ 'name': "Select Sub Project" });
                            this.subprojectBase3.push({ 'name': "Select Sub Project" });
                            this.selectedProjectBase1 = { 'name': 'Select Project' };
                            this.selectedSubProjectBase1 = { 'name': 'Select SubProject' };
                            this.selectedProjectBase2 = { 'name': 'Select Project' };
                            this.selectedSubProjectBas2 = { 'name': 'Select SubProject' };
                            this.selectedProjectBase3 = { 'name': 'Select Project' };
                            this.selectedSubProjectBase3 = { 'name': 'Select SubProject' };
                            this.baseLineTRList = [];
                            this.baseLineTRList.push({ 'name': 'Select TestRun' });
                            this.initialTRList = [];
                            this.initialTRList.push({ 'name': 'Select TestRun' });
                            this.previousTRList = [];
                            this.previousTRList.push({ 'name': 'Select TestRun' });
                            this.getListOfProjSubproj(new _containers_check_status_file__WEBPACK_IMPORTED_MODULE_3__["CheckStatusContainer"]);
                        }
                        else {
                            this.projectBase1 = [];
                            this.projectBase2 = [];
                            this.projectBase3 = [];
                            this.subprojectBase1 = [];
                            this.subprojectBase2 = [];
                            this.subprojectBase3 = [];
                            this.getScenarioListIfSameProj();
                        }
                    }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    /**Method is used to fill the values in case of edit mode. */
    setInitialValues(checkScriptData) {
        try {
            if (checkScriptData) {
                let testCaseData = this._testConfig.getTestCaseData();
                let checkScriptConf = this._testConfig.getcheckScriptData();
                if (checkScriptData.runPostCheckScriptOnFail == "1") {
                    this.runPostChkScript = true;
                    checkScriptConf.runPostScript = true;
                }
                else {
                    this.runPostChkScript = false;
                    checkScriptConf.runPostScript = false;
                }
                testCaseData.runPostCheckScriptOnFail = +checkScriptConf.runPostScript + "";
                if (checkScriptData.durationPhase == "1") {
                    this.durationphase = true;
                    checkScriptConf.durationPhas = true;
                }
                else {
                    this.durationphase = false;
                    checkScriptConf.durationPhas = false;
                }
                testCaseData.durationPhase = +checkScriptConf.durationPhas + "";
                if (checkScriptData.baseLineTestRun !== "-1" && checkScriptData.baseLineTestRun !== "") {
                    this.selBaselineTR = { 'name': checkScriptData.baseLineTestRun };
                    this.baseLineCheckBox = true;
                    this.isBaselineScenario = false;
                    this.isbBaselineTR = false;
                    checkScriptConf.baselineCheckBox = true;
                    checkScriptConf.baselineTestRun = this.selBaselineTR['name'];
                    testCaseData.baseLineTestRun = checkScriptConf.baselineTestRun;
                    this.baseLineCheckBox = true;
                    this.isBaselineScenario = false;
                    this.isbBaselineTR = false;
                    checkScriptConf.baselineCheckBox = true;
                    let projectsub = checkScriptData.scenarioProSubProject.split("/");
                    let project = projectsub[0];
                    let subproject = projectsub[1];
                    let scenario = { 'name': 'Select Test' };
                    if (checkScriptData.scenNameIs.lastIndexOf("/") != -1) {
                        project = checkScriptData.scenNameIs.substring(0, checkScriptData.scenNameIs.indexOf("/"));
                        subproject = checkScriptData.scenNameIs.substring(checkScriptData.scenNameIs.indexOf("/") + 1, checkScriptData.scenNameIs.lastIndexOf("/"));
                        scenario = { 'name': checkScriptData.scenNameIs.substring(checkScriptData.scenNameIs.lastIndexOf("/") + 1, checkScriptData.scenNameIs.length) };
                    }
                    else {
                        scenario = { 'name': checkScriptData.scenNameIs };
                    }
                    if (this.anotherProjectSubProj) {
                        this.selectedProjectBase1 = { 'name': project };
                        console.log("1111111111", subproject);
                        this.getSubProjectListBase1(this.selectedProjectBase1, { 'name': subproject });
                    }
                    this.selBaselineScenario = scenario;
                    checkScriptConf.baselineScenario = project + "/" + subproject + "/" + this.selBaselineScenario['name'];
                    testCaseData.scenNameIs = checkScriptConf.baselineScenario;
                    this.getTestRunList('baseline', this.selBaselineScenario['name']);
                    this.baselineMSR = false;
                    this.MSRbaseline1 = checkScriptData.baselineMSR;
                    checkScriptConf.baselineMSR = this.MSRbaseline1;
                    testCaseData.baselineMSR = checkScriptConf.baselineMSR;
                    this.criticalOfList = [];
                    if (checkScriptData.initialTestRun !== "-1" && checkScriptData.previousTestRun !== "-1") {
                        this.criticalOfList = this.criticalOfList.concat({ name: "All(Current and Baselines)" });
                        if (checkScriptData.failValue == "0")
                            this.selCriticalOf = { name: "All(Current and Baselines)" };
                    }
                    this.criticalOfList = this.criticalOfList.concat({ name: "Current" });
                    this.criticalOfList = this.criticalOfList.concat({ name: "Baseline1" });
                    if (checkScriptData.initialTestRun !== "-1") {
                        this.criticalOfList = this.criticalOfList.concat({ name: "Baseline2" });
                    }
                    if (checkScriptData.previousTestRun !== "-1") {
                        this.criticalOfList = this.criticalOfList.concat({ name: "Baseline3" });
                    }
                    this.isSLACheckbox = false;
                    this.slaTRList = this.slaTRList.concat({ name: 'Baseline1 TR' });
                }
                if (checkScriptData.initialTestRun !== "-1" && checkScriptData.initialTestRun !== "") {
                    this.selInitialTR = { 'name': checkScriptData.initialTestRun };
                    this.initialCheckBox = true;
                    this.isInitialScenario = false;
                    this.isInitialTR = false;
                    checkScriptConf.InitialCheckBox = true;
                    checkScriptConf.InitialTestRun = this.selInitialTR['name'];
                    testCaseData.initialTestRun = checkScriptConf.InitialTestRun;
                    let projectsub = checkScriptData.scenarioProSubProject.split("/");
                    let project = projectsub[0];
                    let subproject = projectsub[1];
                    let scenario = { 'name': 'Select Test' };
                    if (checkScriptData.scenNameIntial.lastIndexOf("/") != -1) {
                        project = checkScriptData.scenNameIntial.substring(0, checkScriptData.scenNameIntial.indexOf("/"));
                        subproject = checkScriptData.scenNameIntial.substring(checkScriptData.scenNameIntial.indexOf("/") + 1, checkScriptData.scenNameIntial.lastIndexOf("/"));
                        scenario = { 'name': checkScriptData.scenNameIntial.substring(checkScriptData.scenNameIntial.lastIndexOf("/") + 1, checkScriptData.scenNameIntial.length) };
                    }
                    else {
                        scenario = { 'name': checkScriptData.scenNameIntial };
                    }
                    if (this.anotherProjectSubProj) {
                        this.selectedProjectBase2 = { 'name': project };
                        this.getSubProjectListBase2(this.selectedProjectBase2, { 'name': subproject });
                    }
                    this.selInitialScenario = scenario;
                    checkScriptConf.InitialScenario = project + "/" + subproject + "/" + this.selInitialScenario['name'];
                    testCaseData.scenNameIntial = checkScriptConf.InitialScenario;
                    this.initialCheckBox = true;
                    this.isInitialScenario = false;
                    this.isInitialTR = false;
                    checkScriptConf.InitialCheckBox = true;
                    this.getTestRunList('initial', this.selInitialScenario['name']);
                    this.MSRbaseline2 = checkScriptData.initialMSR;
                    this.initialMSR = false;
                    checkScriptConf.initialMSR = this.MSRbaseline2;
                    testCaseData.initialMSR = checkScriptConf.initialMSR;
                    this.criticalOfList = [];
                    if (checkScriptData.baseLineTestRun !== "-1" && checkScriptData.previousTestRun !== "-1") {
                        this.criticalOfList = this.criticalOfList.concat({ name: "All(Current and Baselines)" });
                        if (checkScriptData.failValue == "0")
                            this.selCriticalOf = { name: "All(Current and Baselines)" };
                    }
                    this.criticalOfList = this.criticalOfList.concat({ name: "Current" });
                    if (checkScriptData.baseLineTestRun !== "-1")
                        this.criticalOfList = this.criticalOfList.concat({ name: "Baseline1" });
                    this.criticalOfList = this.criticalOfList.concat({ name: "Baseline2" });
                    if (checkScriptData.previousTestRun !== "-1")
                        this.criticalOfList = this.criticalOfList.concat({ name: "Baseline3" });
                    this.isSLACheckbox = false;
                    this.slaTRList = this.slaTRList.concat({ name: 'Baseline2 TR' });
                }
                if (checkScriptData.previousTestRun !== "-1" && checkScriptData.previousTestRun !== "") {
                    this.selPreviousTR = { 'name': checkScriptData.previousTestRun };
                    this.previousCheckBox = true;
                    this.isPreviousScenario = false;
                    this.isPreviousTR = false;
                    checkScriptConf.previousCheckBox = true;
                    checkScriptConf.previousTestRun = this.selPreviousTR['name'];
                    testCaseData.previousTestRun = checkScriptConf.previousTestRun;
                    this.previousCheckBox = true;
                    this.isPreviousScenario = false;
                    this.isPreviousTR = false;
                    checkScriptConf.previousCheckBox = true;
                    let projectsub = checkScriptData.scenarioProSubProject.split("/");
                    let project = projectsub[0];
                    let subproject = projectsub[1];
                    let scenario = { 'name': 'Select Test' };
                    if (checkScriptData.scenNamePrevious.lastIndexOf("/") != -1) {
                        project = checkScriptData.scenNamePrevious.substring(0, checkScriptData.scenNamePrevious.indexOf("/"));
                        subproject = checkScriptData.scenNamePrevious.substring(checkScriptData.scenNamePrevious.indexOf("/") + 1, checkScriptData.scenNamePrevious.lastIndexOf("/"));
                        scenario = { 'name': checkScriptData.scenNamePrevious.substring(checkScriptData.scenNamePrevious.lastIndexOf("/") + 1, checkScriptData.scenNamePrevious.length) };
                    }
                    else {
                        scenario = { 'name': checkScriptData.scenNamePrevious };
                    }
                    if (this.anotherProjectSubProj) {
                        this.selectedProjectBase3 = { 'name': project };
                        this.getSubProjectListBase3(this.selectedProjectBase3, { 'name': subproject });
                    }
                    this.selPreviousScenario = scenario;
                    checkScriptConf.previousScenario = project + "/" + subproject + "/" + this.selPreviousScenario['name'];
                    testCaseData.scenNamePrevious = checkScriptConf.previousScenario;
                    this.getTestRunList('previous', this.selPreviousScenario['name']);
                    this.MSRbaseline3 = checkScriptData.previousMSR;
                    this.previousMSR = false;
                    checkScriptConf.previousMSR = this.MSRbaseline3;
                    testCaseData.previousMSR = checkScriptConf.previousMSR;
                    this.criticalOfList = [];
                    if (checkScriptData.baseLineTestRun !== "-1" && checkScriptData.initialTestRun !== "-1") {
                        this.criticalOfList = this.criticalOfList.concat({ name: "All(Current and Baselines)" });
                        if (checkScriptData.failValue == "0")
                            this.selCriticalOf = { name: "All(Current and Baselines)" };
                    }
                    this.criticalOfList = this.criticalOfList.concat({ name: "Current" });
                    if (checkScriptData.baseLineTestRun !== "-1")
                        this.criticalOfList = this.criticalOfList.concat({ name: "Baseline1" });
                    if (checkScriptData.initialTestRun !== "-1")
                        this.criticalOfList = this.criticalOfList.concat({ name: "Baseline2" });
                    this.criticalOfList = this.criticalOfList.concat({ name: "Baseline3" });
                    this.isSLACheckbox = false;
                    this.slaTRList = this.slaTRList.concat({ name: 'Baseline3 TR' });
                }
                if (checkScriptData.slaVal == "0") {
                    this.selSLATR = { 'name': 'Select Baseline' };
                    this.overallSla = false;
                    this.isSlaTRList = true;
                }
                else if (checkScriptData.slaVal == "1") {
                    this.selSLATR = { 'name': 'Baseline1 TR' };
                    this.overallSla = true;
                    this.isSlaTRList = false;
                    checkScriptConf.overallSlaCheckBox = true;
                }
                else if (checkScriptData.slaVal == "2") {
                    this.selSLATR = { 'name': 'Baseline2 TR' };
                    this.overallSla = true;
                    this.isSlaTRList = false;
                    checkScriptConf.overallSlaCheckBox = true;
                }
                else if (checkScriptData.slaVal == "3") {
                    this.selSLATR = { 'name': 'Baseline3 TR' };
                    this.overallSla = true;
                    this.isSlaTRList = false;
                    checkScriptConf.overallSlaCheckBox = true;
                }
                console.log("sla...", checkScriptData.slaVal);
                checkScriptConf.overallSlaDropDown = this.selSLATR['name'];
                testCaseData.slaVal = checkScriptData.slaVal;
                if (checkScriptData.range == "1") {
                    this.thresholdAsRange = true;
                }
                else {
                    this.thresholdAsRange = false;
                }
                testCaseData.range = checkScriptData.range;
                checkScriptConf.thresholdRange = this.thresholdAsRange;
                checkScriptData.successCol = "0";
                testCaseData.successCol = checkScriptData.successCol;
                checkScriptConf.sucessTransaction = this.successTransac;
                this.overallFailCriteria = checkScriptData.failCriteria;
                testCaseData.failCriteria = checkScriptData.failCriteria;
                if (checkScriptData.failValue == "1") {
                    this.selCriticalOf = { 'name': 'Current' };
                }
                else if (checkScriptData.failValue == "2") {
                    this.selCriticalOf = { 'name': 'Baseline1' };
                }
                else if (checkScriptData.failValue == "3") {
                    this.selCriticalOf = { 'name': 'Baseline2' };
                }
                else if (checkScriptData.failValue == "4") {
                    this.selCriticalOf = { 'name': 'Baseline3' };
                }
                console.log("fail value...", checkScriptData.failValue);
                testCaseData.failValue = checkScriptData.failValue;
                checkScriptConf.overallFailCriteria = this.overallFailCriteria;
                checkScriptConf.criticalOf = this.selCriticalOf['name'];
                testCaseData.unexecuted = checkScriptData.unexecuted;
                if (checkScriptData.unexecuted == "1") {
                    this.unexecutedTransac = true;
                }
                else {
                    this.unexecutedTransac = false;
                }
                checkScriptConf.UnexecutedTrans = this.unexecutedTransac;
                if (checkScriptData.transCount == "1") {
                    this.transactionCount = true;
                }
                else {
                    this.transactionCount = false;
                }
                checkScriptConf.transCount = this.transactionCount;
                testCaseData.transCount = checkScriptData.transCount;
                this.warningThreshold = checkScriptData.normalThreshold;
                this.criticalThreshold = checkScriptData.criticalThreshold;
                checkScriptConf.warningThreshold = this.warningThreshold;
                checkScriptConf.criticalThreshold = this.criticalThreshold;
                testCaseData.normalThreshold = checkScriptData.normalThreshold;
                testCaseData.criticalThreshold = checkScriptData.criticalThreshold;
                if (checkScriptData.checkProfileTabData !== "") {
                    this.checkScriptTextArea = checkScriptData.checkProfileTabData;
                }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onbaseline1MSRclick(event) {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.baselineMSR = event.target.value;
        }
        catch (e) {
            console.error(e);
        }
    }
    oninitial2MSRclick(event) {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.initialMSR = event.target.value;
        }
        catch (e) {
            console.error(e);
        }
    }
    onprevious3MSRclick(event) {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.previousMSR = event.target.value;
        }
        catch (e) {
            console.error(e);
        }
    }
    onBaselineCheckBoxClick() {
        try {
            if (this.baseLineCheckBox == true) {
                this.slaTRList = this.slaTRList.concat({ name: 'Baseline1 TR' });
                this.isBaselineScenario = false;
                this.isbBaselineTR = false;
                this.baselineMSR = false;
                this.isSLACheckbox = false;
                this.criticalOfList = [];
                if (this.initialCheckBox == true && this.previousCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.concat({ name: "All(Current and Baselines)" });
                }
                this.criticalOfList = this.criticalOfList.concat({ name: "Current" });
                this.criticalOfList = this.criticalOfList.concat({ name: "Baseline1" });
                if (this.initialCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.concat({ name: "Baseline2" });
                }
                if (this.previousCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.concat({ name: "Baseline3" });
                }
            }
            else {
                this.isBaselineScenario = true;
                this.slaTRList = this.slaTRList.filter(x => x.name !== "Baseline1 TR");
                this.isbBaselineTR = true;
                this.baselineMSR = true;
                this.isSLACheckbox = true;
                if (this.initialCheckBox == true && this.previousCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.filter(x => x.name !== "All(Current and Baselines)");
                }
                this.criticalOfList = this.criticalOfList.filter(x => x.name !== "Baseline1");
            }
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.overallSlaDropDown = this.selSLATR['name'];
            checkScriptData.baselineCheckBox = this.baseLineCheckBox;
        }
        catch (e) {
            console.error(e);
        }
    }
    onBaselineScenarioClick() {
        try {
            let scenarioName = this.selBaselineScenario['name'];
            if (scenarioName == 'Select Test') {
                this.baseLineTRList = [];
                this.baseLineTRList.push({ name: "Select TestRun" });
            }
            else {
                this.getTestRunList('baseline', scenarioName);
            }
            let checkScriptData = this._testConfig.getcheckScriptData();
            console.log('project = ', this.selectedProjectBase1, ", sub project = ", this.selectedSubProjectBase1);
            if (this.selectedProjectBase1 != null && this.selectedProjectBase1['name'] != 'Select Project')
                checkScriptData.baselineScenario = this.selectedProjectBase1['name'] + "/" + this.selectedSubProjectBase1['name'] + "/" + this.selBaselineScenario['name'];
            else
                checkScriptData.baselineScenario = this.selBaselineScenario['name'];
        }
        catch (e) {
            console.error(e);
        }
    }
    onBaselineTestRunClick() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.baselineTestRun = this.selBaselineTR['name'];
        }
        catch (e) {
            console.error(e);
        }
    }
    onInitialScenarioClick() {
        try {
            let scenarioName = this.selInitialScenario['name'];
            if (scenarioName == 'Select Test') {
                this.initialTRList = [];
                this.initialTRList.push({ name: "Select TestRun" });
            }
            else {
                this.getTestRunList('initial', scenarioName);
            }
            let checkScriptData = this._testConfig.getcheckScriptData();
            if (this.selectedProjectBase2 != null && this.selectedProjectBase2['name'] != 'Select Project')
                checkScriptData.InitialScenario = this.selectedProjectBase2['name'] + "/" + this.selectedSubProjectBas2['name'] + "/" + this.selInitialScenario['name'];
            else
                checkScriptData.InitialScenario = this.selInitialScenario['name'];
        }
        catch (e) {
            console.error(e);
        }
    }
    onInitialTestRunClick() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.InitialTestRun = this.selInitialTR['name'];
        }
        catch (e) {
            console.error(e);
        }
    }
    onPreviousScenarioClick() {
        try {
            let scenarioName = this.selPreviousScenario['name'];
            if (scenarioName == 'Select Test') {
                this.previousTRList = [];
                this.previousTRList.push({ name: "Select TestRun" });
            }
            else {
                this.getTestRunList('previous', scenarioName);
            }
            let checkScriptData = this._testConfig.getcheckScriptData();
            if (this.selectedProjectBase3 != null && this.selectedProjectBase3['name'] != 'Select Project')
                checkScriptData.previousScenario = this.selectedProjectBase3['name'] + "/" + this.selectedSubProjectBase3['name'] + "/" + this.selPreviousScenario['name'];
            else
                checkScriptData.previousScenario = this.selPreviousScenario['name'];
        }
        catch (e) {
            console.error(e);
        }
    }
    onPreviousTestRunClick() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.previousTestRun = this.selPreviousTR['name'];
        }
        catch (e) {
            console.error(e);
        }
    }
    getTestRunList(trType, scenarioName) {
        try {
            if (this._testConfig.getSelectedRowForTestCase() !== null) {
                this.projectSubproject = this._testConfig.getSelectedRowForTestCase()['Project'] + '/' + this._testConfig.getSelectedRowForTestCase()['Sub Project'];
            }
            let param = '&projectSubProject=' + this.projectSubproject + '&scenarioName=' + scenarioName;
            this.testsuiteHTTpService.getTRList(param).subscribe((state) => {
                if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetTRListLoadingState"]) {
                    this.onLoadingGetTRList(state);
                    return;
                }
                if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_7__["GetTRListLoadedState"]) {
                    this.onLoadedGetTRList(state, trType);
                    return;
                }
            }, (state) => {
                this.onLoadingErrorGetTRList(state);
            });
        }
        catch (e) {
            console.error(e);
        }
    }
    onLoadingGetTRList(state) { }
    onLoadedGetTRList(state, trType) {
        this.setTRList(state.data, trType);
    }
    onLoadingErrorGetTRList(state) { }
    setTRList(response, trType) {
        if (response) {
            let testRunList = response;
            if (trType == 'baseline') {
                this.baseLineTRList = [];
                this.baseLineTRList.push({ name: "Select TestRun" });
                for (let i = 0; i < testRunList.length; i++) {
                    this.baseLineTRList.push({ name: testRunList[i] });
                }
            }
            else if (trType == 'initial') {
                this.initialTRList = [];
                this.initialTRList.push({ name: "Select TestRun" });
                for (let i = 0; i < testRunList.length; i++) {
                    this.initialTRList.push({ name: testRunList[i] });
                }
            }
            else if (trType == 'previous') {
                this.previousTRList = [];
                this.previousTRList.push({ name: "Select TestRun" });
                for (let i = 0; i < testRunList.length; i++) {
                    this.previousTRList.push({ name: testRunList[i] });
                }
            }
        }
    }
    onInitialCheckBoxClick() {
        try {
            if (this.initialCheckBox == true) {
                this.slaTRList = this.slaTRList.concat({ name: 'Baseline2 TR' });
                console.log("baseline2.....", this.slaTRList);
                this.isInitialScenario = false;
                this.isInitialTR = false;
                this.initialMSR = false;
                this.isSLACheckbox = false;
                this.criticalOfList = [];
                if (this.baseLineCheckBox == true && this.previousCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.concat({ name: "All(Current and Baselines)" });
                }
                this.criticalOfList = this.criticalOfList.concat({ name: "Current" });
                if (this.baseLineCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.concat({ name: "Baseline1" });
                }
                this.criticalOfList = this.criticalOfList.concat({ name: "Baseline2" });
                if (this.previousCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.concat({ name: "Baseline3" });
                }
            }
            else {
                this.isInitialScenario = true;
                this.slaTRList = this.slaTRList.filter(x => x.name !== "Baseline2 TR");
                this.isInitialTR = true;
                this.initialMSR = true;
                this.isSLACheckbox = true;
                if (this.baseLineCheckBox == true && this.previousCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.filter(x => x.name !== "All(Current and Baselines)");
                }
                this.criticalOfList = this.criticalOfList.filter(x => x.name !== "Baseline2");
            }
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.overallSlaDropDown = this.selSLATR['name'];
            checkScriptData.InitialCheckBox = this.initialCheckBox;
        }
        catch (e) {
            console.error(e);
        }
    }
    onPreviousCheckBoxClick() {
        try {
            if (this.previousCheckBox == true) {
                this.slaTRList = this.slaTRList.concat({ name: 'Baseline3 TR' });
                this.isPreviousScenario = false;
                this.isPreviousTR = false;
                this.previousMSR = false;
                this.isSLACheckbox = false;
                this.criticalOfList = [];
                if (this.baseLineCheckBox == true && this.initialCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.concat({ name: "All(Current and Baselines)" });
                }
                this.criticalOfList = this.criticalOfList.concat({ name: "Current" });
                if (this.baseLineCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.concat({ name: "Baseline1" });
                }
                if (this.initialCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.concat({ name: "Baseline2" });
                }
                this.criticalOfList = this.criticalOfList.concat({ name: "Baseline3" });
            }
            else {
                this.isPreviousScenario = true;
                this.slaTRList = this.slaTRList.filter(x => x.name !== "Baseline3 TR");
                this.isPreviousTR = true;
                this.previousMSR = true;
                this.isSLACheckbox = true;
                if (this.initialCheckBox == true && this.baseLineCheckBox == true) {
                    this.criticalOfList = this.criticalOfList.filter(x => x.name !== "All(Current and Baselines)");
                }
                this.criticalOfList = this.criticalOfList.filter(x => x.name !== "Baseline3");
            }
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.overallSlaDropDown = this.selSLATR['name'];
            checkScriptData.previousCheckBox = this.previousCheckBox;
        }
        catch (e) {
            console.error(e);
        }
    }
    critical(event) {
        try {
            let values = event.target.value;
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.criticalThreshold = values;
        }
        catch (e) {
            console.error(e);
        }
    }
    warning(event) {
        try {
            let values = event.target.value;
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.warningThreshold = values;
            console.log("warning threshold", values);
        }
        catch (e) {
            console.error(e);
        }
    }
    overallcriteria(event) {
        try {
            let values = event.target.value;
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.overallFailCriteria = values;
        }
        catch (e) {
            console.error(e);
        }
    }
    criticalOf(event) {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.criticalOf = this.selCriticalOf['name'];
        }
        catch (e) {
            console.error(e);
        }
    }
    thresholdRange() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.thresholdRange = this.thresholdAsRange;
        }
        catch (e) {
            console.error(e);
        }
    }
    onOverallSlaClick() {
        try {
            if (this.overallSla == true) {
                this.isSlaTRList = false;
            }
            else {
                this.isSlaTRList = true;
            }
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.overallSlaCheckBox = this.overallSla;
            checkScriptData.overallSlaDropDown = this.selSLATR['name'];
        }
        catch (e) {
            console.error(e);
        }
    }
    slaTR() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.overallSlaDropDown = this.selSLATR['name'];
        }
        catch (e) {
            console.error(e);
        }
    }
    postChkScript() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.runPostScript = this.runPostChkScript;
        }
        catch (e) {
            console.error(e);
        }
    }
    duratPhase() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.durationPhas = this.durationphase;
        }
        catch (e) {
            console.error(e);
        }
    }
    successTrans() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.sucessTransaction = this.successTransac;
        }
        catch (e) {
        }
    }
    transacCount() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.transCount = this.transactionCount;
        }
        catch (e) {
            console.error(e);
        }
    }
    unexecutedCount() {
        try {
            let checkScriptData = this._testConfig.getcheckScriptData();
            checkScriptData.UnexecutedTrans = this.unexecutedTransac;
        }
        catch (e) {
            console.error(e);
        }
    }
    onServerCheckBoxClick() {
        try {
            if (this.server == true) {
                this.isServerName = false;
                this.isWarVersion = false;
                this._dataRequest.getServerList();
            }
            else {
                this.isServerName = true;
                this.isWarVersion = true;
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onReleaseVersionClick() {
        try {
            if (this.releaseVersion == true) {
                this.isReleaseVersion = false;
            }
            else {
                this.isReleaseVersion = true;
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    checkScriptInAdvanceMode() {
        try {
            if (this.buttonLabel == "Edit In Advance Mode") {
                this.buttonLabel = "Edit In Gui Mode";
                console.log('this._testConfig.getTestCaseData().checkProfileTabData', this._testConfig.getTestCaseData().checkProfileTabData);
                console.log('document.getElementById', this.checkScriptTextArea);
            }
            else {
                this.buttonLabel = "Edit In Advance Mode";
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    ngOnDestroy() {
        try {
            this.dataSubscription.unsubscribe();
        }
        catch (e) {
            console.error(e);
        }
    }
};
CheckScriptTabComponent.ctorParameters = () => [
    { type: _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_4__["TestsuiteConfigService"] },
    { type: _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_5__["TestsuiteDataHandlerService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__["SessionService"] },
    { type: _services_testsuite_http_service__WEBPACK_IMPORTED_MODULE_6__["TestsuiteHttpService"] }
];
CheckScriptTabComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-check-script-tab',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./check-script-tab.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./check-script-tab.component.scss */ "./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.component.scss")).default]
    })
], CheckScriptTabComponent);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.module.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.module.ts ***!
  \*****************************************************************************************************************/
/*! exports provided: CheckScriptTabModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckScriptTabModule", function() { return CheckScriptTabModule; });
/* 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 src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/header/header.module */ "./src/app/shared/header/header.module.ts");
/* harmony import */ var primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js");
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
/* harmony import */ var primeng_card__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/card */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-card.js");
/* harmony import */ var primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js");
/* harmony import */ var primeng_dialog__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
/* harmony import */ var primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
/* harmony import */ var primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
/* harmony import */ var primeng_menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng/menu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menu.js");
/* harmony import */ var primeng_message__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/message */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-message.js");
/* harmony import */ var primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! primeng/multiselect */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
/* harmony import */ var primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js");
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js");
/* harmony import */ var primeng_fieldset__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! primeng/fieldset */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-fieldset.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _check_script_tab_component__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./check-script-tab.component */ "./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.component.ts");






















let CheckScriptTabModule = class CheckScriptTabModule {
};
CheckScriptTabModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_check_script_tab_component__WEBPACK_IMPORTED_MODULE_21__["CheckScriptTabComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__["ToolbarModule"],
            src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__["HeaderModule"],
            primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__["InputTextModule"],
            primeng_button__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"],
            primeng_message__WEBPACK_IMPORTED_MODULE_12__["MessageModule"],
            primeng_dialog__WEBPACK_IMPORTED_MODULE_8__["DialogModule"],
            primeng_card__WEBPACK_IMPORTED_MODULE_6__["CardModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_17__["FormsModule"],
            primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__["DropdownModule"],
            primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__["CheckboxModule"],
            primeng_table__WEBPACK_IMPORTED_MODULE_14__["TableModule"],
            primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__["MultiSelectModule"],
            primeng_menu__WEBPACK_IMPORTED_MODULE_11__["MenuModule"],
            primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__["BreadcrumbModule"],
            primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__["TooltipModule"],
            primeng_sidebar__WEBPACK_IMPORTED_MODULE_18__["SidebarModule"],
            primeng_fieldset__WEBPACK_IMPORTED_MODULE_19__["FieldsetModule"],
            primeng__WEBPACK_IMPORTED_MODULE_20__["SpinnerModule"],
            primeng__WEBPACK_IMPORTED_MODULE_20__["ToggleButtonModule"]
        ],
        exports: [_check_script_tab_component__WEBPACK_IMPORTED_MODULE_21__["CheckScriptTabComponent"]]
    })
], CheckScriptTabModule);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.component.scss":
/*!****************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.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/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.component.ts":
/*!**************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.component.ts ***!
  \**************************************************************************************************************/
/*! exports provided: IterationTabComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IterationTabComponent", function() { return IterationTabComponent; });
/* 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 _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../services/testsuite-config.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-config.service.ts");
/* harmony import */ var _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/testsuite-data-handler.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-data-handler.service.ts");




let IterationTabComponent = class IterationTabComponent {
    constructor(_testConfig, _dataReq) {
        this._testConfig = _testConfig;
        this._dataReq = _dataReq;
        /* for opening dialog for adding new parameter */
        this.addParameterDialog = false;
        this.deleteParameterDialog = false;
        this.paramSelected = { 'name': 'Select Parameter' };
        this.paramNames = [{ 'name': 'Select Parameter' }];
        this.color = 'primary';
        this.param = [];
        this.cols = [{ field: 'check', header: 'CheckOption', action: true, width: '50' },
            { field: 'disable', header: 'disabled', factor: "factor" },
            { field: 'edit', header: 'edit', factor: "factor" },
            { field: "Status", header: "Status", factor: "factor" }];
        this.iterationsArr = [];
        this.label = "Enable";
        this.parameter = "scenario";
        this.def = "";
        this.text = false;
        this.advance = true;
        this.title = 'Enabled';
        this.aclMode = true;
        this.selectUseIn = 'usedScenario';
        this.selectIterMode = 'guiMode';
        this.disableDelete = true;
    }
    ngOnInit() {
        this.aclMode = this._testConfig.$testCaseMode;
        this.dataSubscription = this._testConfig.checkProfileDataObservable$.subscribe(action => {
            this.updateIterationList(action);
        });
        this.usedIn = [
            { label: 'Used in Test', value: 'usedScenario' },
            { label: 'Used in Script', value: 'usedScript' },
        ],
            this.iterationMode = [
                { label: 'GUI Mode', value: 'guiMode' },
                { label: 'Text Mode', value: 'textMode' },
            ];
    }
    changeLabel(index) {
        if (this.iterationsArr[index]['Status']) {
            this.iterationsArr[index]['title'] = 'Enabled';
        }
        else {
            this.iterationsArr[index]['title'] = 'Disabled';
        }
    }
    updateIterationList(action) {
        try {
            console.log('update iteratio list called ...', action);
            switch (action.action) {
                case 'ITERATION_LIST':
                    {
                        let obj = action.data;
                        this.setReceivedData(obj);
                        break;
                    }
                case 'ADD_PARAMETER':
                    {
                        this.paramName = action.paramName;
                        this.parameter = action.parameter;
                        this.addIteration();
                        break;
                    }
                case 'ADD_ROW':
                    {
                        this.addRow();
                        break;
                    }
                case 'SAVE_ITERATION':
                    {
                        this.saveIteration();
                    }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    setReceivedData(data) {
        try {
            if (data['param'] && data['values']) {
                /* getting list of parameters */
                let param = [];
                param = [...data['param']];
                /* setting list of parameters */
                if (param.length > 0) {
                    for (let i of param) {
                        console.log("item =", i);
                        this.cols = this.cols.concat({ field: i['name'], header: i['name'], factor: i['factor'] });
                    }
                }
                /* getting list of values for parameters */
                let values = [];
                values = [...data['values']];
                if (values.length > 0) {
                    for (let j = 0; j < values.length; j++) {
                        let obj = values[j];
                        if (data['disableStatus'][j] == "#") {
                            obj['Status'] = false;
                        }
                        else {
                            obj['Status'] = true;
                        }
                        if (obj['Status']) {
                            obj['title'] = 'Enabled';
                        }
                        else {
                            obj['title'] = 'Disabled';
                        }
                        this.iterationsArr = this.iterationsArr.concat(obj);
                    }
                }
                let iterationData = this.prepareIterationData();
                let testCaseData = this._testConfig.getTestCaseData();
                testCaseData.iterationBufferData = iterationData;
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    /* Method called on click of Add Parameter */
    addParamDialog() {
        try {
            this.addParameterDialog = true;
        }
        catch (e) {
            console.error(e);
        }
    }
    /* Method called on click of Delete Parameter */
    deleteParameter() {
        try {
            this.paramNames = [];
            this.paramNames.push({ 'name': 'Select Parameter' });
            if (this.cols.length > 3 && (this.cols !== null || this.cols !== undefined)) {
                for (let i = 0; i < this.cols.length; i++) {
                    if (this.cols[i].field !== 'edit' && this.cols[i].field !== 'disable' && this.cols[i].field !== 'Status') {
                        this.paramNames.push({ 'name': this.cols[i]['field'] });
                    }
                }
            }
            else {
                alert('No parameter is added');
                return;
            }
            this.deleteParameterDialog = true;
        }
        catch (e) {
            console.error(e);
        }
    }
    isMatched(index) {
        return index['field'] == this.paramSelected['name'];
    }
    /* Method to delete a selected parameter*/
    onParamSelection(parameter) {
        try {
            console.log("parameter in onParamSelection =" + parameter);
            let del = confirm("Are you sure you want to delete column?");
            if (del) {
                let index;
                for (let i = 0; i < this.cols.length; i++) {
                    if (this.cols[i]['header'] == parameter) {
                        index = i;
                    }
                }
                this.cols.splice(index, 1);
                if (this.cols.length == 3) {
                    this.iterationsArr = [];
                }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    addIteration() {
        try {
            console.log("inside add iteration...");
            if (this.paramName == undefined || this.paramName == "" || this.paramName == " ") {
                alert("Parameter Name can not be empty.");
                return;
            }
            if (this.cols.length > 3 && (this.cols !== null || this.cols !== undefined)) {
                for (let i = 0; i < this.cols.length; i++) {
                    if (this.paramName === this.cols[i].field) {
                        alert("Parameter with same name already exists");
                        return;
                    }
                }
            }
            console.log("iteration array =", this.iterationsArr);
            let fact = "";
            if (this.selectUseIn == "usedScenario") {
                fact = "$";
            }
            else if (this.selectUseIn == "usedScript") {
                fact = "%";
            }
            this.cols = this.cols.concat({ field: this.paramName, header: this.paramName, factor: fact });
            let key = this.paramName;
            let obj = {};
            for (let i = 0; i < this.iterationsArr.length; i++) {
                console.log("iterations in loop =", this.iterationsArr[i]);
                if (i == 0)
                    this.iterationsArr[i][this.paramName] = this.parameterValues;
            }
            if (this.iterationsArr.length == 0 || this.iterationsArr == null)
                this.iterationsArr = this.iterationsArr.concat({ [this.paramName]: this.parameterValues, ["Status"]: true, ["title"]: 'Enabled' });
            console.log("iteration array after =", this.iterationsArr);
            this.def = "";
            this.paramName = "";
            this.parameterValues = "";
            this.dtObj.updateHeaders(this.cols);
        }
        catch (e) {
            console.error(e);
        }
    }
    saveIteration() {
        try {
            let testCase = "";
            if (this._testConfig.getSelectedRowForTestCase() !== null) {
                testCase = this._testConfig.getSelectedRowForTestCase()['Test Case'];
            }
            let data = "";
            if (this.text == true) {
                data = this.textMode;
            }
            else {
                data = this.prepareIterationData();
            }
            let obj = this._testConfig.getTestCaseData();
            obj.iterationBufferData = data;
            let actualTestCaseName = "";
            let ob = this._testConfig.getSelectedRowForTestCase();
            let testCaseName = ob['Test Case'];
            if (this._testConfig.$actualTestCaseName == "") {
                actualTestCaseName = testCaseName;
            }
            else {
                actualTestCaseName = this._testConfig.$actualTestCaseName;
            }
            this._dataReq.saveTestCaseData(actualTestCaseName, testCaseName);
        }
        catch (e) {
            console.error(e);
        }
    }
    prepareIterationData() {
        try {
            let keys = [];
            let data = "";
            /* making header line */
            console.log("cols in prepareIterationData =", this.cols);
            if (this.cols.length > 3 && (this.cols !== null || this.cols !== undefined)) {
                for (let i = 0; i < this.cols.length; i++) {
                    if (this.cols[i].field !== 'edit' && this.cols[i].field !== 'disable' && this.cols[i].field !== 'Status' && this.cols[i].field !== 'check') {
                        console.log("in condition for cols **********", this.cols[i]);
                        if (i == 4) {
                            data = data + this.cols[i].factor + this.cols[i].field;
                            console.log("for i=3 data is ....", data);
                        }
                        else {
                            data = data + "|" + this.cols[i].factor + this.cols[i].field;
                        }
                        keys.push(this.cols[i].field);
                    }
                }
                data = data + "\n";
                console.log("keys =", keys + ", data=", data);
            }
            else {
                data = "";
                return;
            }
            for (let i = 0; i < this.iterationsArr.length; i++) {
                console.log("inside iteration loop =", this.iterationsArr[i]);
                for (let j = 0; j < keys.length; j++) {
                    console.log("key obtained =", keys[j]);
                    if (j == 0) {
                        if (this.iterationsArr[i]['Status'] == false) {
                            data = data + "#";
                        }
                        if (this.iterationsArr[i][keys[j]] == "")
                            data = data + "-";
                        else
                            data = data + this.iterationsArr[i][keys[j]];
                    }
                    else {
                        if (this.iterationsArr[i][keys[j]] == "")
                            data = data + "|" + "-";
                        else
                            data = data + "|" + this.iterationsArr[i][keys[j]];
                    }
                }
                data = data + "\n";
            }
            console.log("data final =", data);
            return data;
        }
        catch (e) {
            console.error(e);
        }
    }
    onRowEditInit(rowSelected) {
        try {
            rowSelected['disable'] = false;
            rowSelected['edit'] = true;
        }
        catch (e) {
            console.error(e);
        }
    }
    saveRow(rowData) {
        try {
            rowData['disable'] = true;
            rowData['edit'] = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    addRow() {
        try {
            let obj = {};
            console.log("length :: ", this.cols.length, "cols :: ", this.cols);
            if (this.cols.length > 3 && (this.cols !== null || this.cols !== undefined)) {
                for (let i = 0; i < this.cols.length; i++) {
                    let val = this.cols[i].field;
                    if (val === "Status")
                        obj[val] = true;
                    else
                        obj[val] = "";
                }
                obj['title'] = 'Enabled';
                this.iterationsArr = this.iterationsArr.concat(obj);
                console.log('table data...', this.iterationsArr);
            }
            else {
                alert("Add a new parameter");
                return;
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onRowSelect(index) {
        if (this.selectedBox.length <= 0) {
            this.disableDelete = true;
        }
        else {
            this.disableDelete = false;
        }
        this.selectedIterationArray = [];
        this.objSelected = [];
        for (let i = 0; i < this.selectedBox.length; i++) {
            let obj = { 'Project': this.selectedBox[i]['Project'], 'Sub Project': this.selectedBox[i]['SubProject'], 'Profile Name': this.selectedBox[i]['Profile Name'] };
            this.selectedIterationArray = this.selectedIterationArray.concat(obj);
            this.objSelected = this.objSelected.concat(obj);
        }
    }
    onRowUnselect(index) {
        if (this.selectedBox.length <= 0) {
            this.disableDelete = true;
        }
        else {
            this.disableDelete = false;
        }
        this.objSelected = [];
        this.selectedIterationArray = [];
        for (let i = 0; i < this.selectedBox.length; i++) {
            let obj = { 'Project': this.selectedBox[i]['Project'], 'Sub Project': this.selectedBox[i]['SubProject'], 'Profile Name': this.selectedBox[i]['Profile Name'] };
            this.selectedIterationArray = this.selectedIterationArray.concat(obj);
            this.objSelected = this.objSelected.concat(obj);
        }
    }
    deleteRow(index) {
        try {
            let del = confirm("Are you sure you want to delete row?");
            if (del) {
                this.iterationsArr.splice(index, 1);
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    isEqual(obj1, obj2) {
        const keys1 = Object.keys(obj1);
        const keys2 = Object.keys(obj2);
        if (keys1.length !== keys2.length) {
            return false;
        }
        for (let key of keys1) {
            if (obj1[key] !== obj2[key]) {
                return false;
            }
        }
        return true;
    }
    deleteMultiple() {
        try {
            let del = confirm("Are you sure you want to delete selected row(s)?");
            if (del) {
                for (let i = 0; i < this.selectedBox.length; i++) {
                    this.iterationsArr = this.iterationsArr.filter(item => !this.isEqual(this.selectedBox[i], item));
                }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onHeaderCheckBoxToggle(event) {
        try {
            this.newSelectedArray = [];
            if (this.dtObj && event.checked == true) {
                let firstRow = this.dtObj.first;
                let lastRow = this.dtObj.rows + this.dtObj.first;
                for (let i = firstRow; i < lastRow; i++) {
                    if (this.selectedBox[i] != undefined)
                        this.newSelectedArray.push(this.selectedBox[i]);
                }
            }
            else if (event.checked == false) {
                let firstRow = this.dtObj.first;
                let lastRow = this.dtObj.rows + this.dtObj.first;
                this.newSelectedArray = this.newSelectedArray.filter((_ele, index) => {
                    if (index >= firstRow && index < lastRow) {
                        for (let i = firstRow; i < lastRow; i++) {
                            console.log('_ele', _ele);
                            if (this.selectedBox[i] != undefined && this.selectedBox[i]['testRun'] == _ele['testRun'])
                                return false;
                        }
                    }
                });
            }
            this.selectedBox = [];
            this.selectedBox = this.newSelectedArray;
            if (this.selectedBox.length <= 0) {
                this.disableDelete = true;
            }
            else {
                this.disableDelete = false;
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    getActions() {
        console.log("view mode :: ", this.selectIterMode);
        if (this.selectIterMode == 'textMode')
            this.getActionsInTextMode();
        else if (this.selectIterMode == 'guiMode')
            this.getActionsInAdvanceMode();
    }
    getActionsInTextMode() {
        try {
            this.advance = false;
            this._testConfig.$modeForIteration = "text";
            this._testConfig.updateModeForIteration();
            this.text = true;
            this.textMode = this.prepareIterationData();
        }
        catch (e) {
            console.error(e);
        }
    }
    getActionsInAdvanceMode() {
        try {
            this.text = false;
            this.advance = true;
            this._testConfig.$modeForIteration = "GUI";
            this._testConfig.updateModeForIteration();
        }
        catch (e) {
            console.error(e);
        }
    }
    ngOnDestroy() {
        try {
            this.dataSubscription.unsubscribe();
        }
        catch (e) { }
    }
};
IterationTabComponent.ctorParameters = () => [
    { type: _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_2__["TestsuiteConfigService"] },
    { type: _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_3__["TestsuiteDataHandlerService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('dt')
], IterationTabComponent.prototype, "dtObj", void 0);
IterationTabComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-iteration-tab',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./iteration-tab.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.component.html")).default,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./iteration-tab.component.scss */ "./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.component.scss")).default]
    })
], IterationTabComponent);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.module.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.module.ts ***!
  \***********************************************************************************************************/
/*! exports provided: IterationTabModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IterationTabModule", function() { return IterationTabModule; });
/* 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 src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/header/header.module */ "./src/app/shared/header/header.module.ts");
/* harmony import */ var primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js");
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
/* harmony import */ var primeng_card__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/card */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-card.js");
/* harmony import */ var primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js");
/* harmony import */ var primeng_dialog__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
/* harmony import */ var primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
/* harmony import */ var primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var primeng_menu__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/menu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menu.js");
/* harmony import */ var primeng_message__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! primeng/message */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-message.js");
/* harmony import */ var primeng_multiselect__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! primeng/multiselect */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
/* harmony import */ var primeng_toolbar__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js");
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var _iteration_tab_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./iteration-tab.component */ "./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.component.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");






















let IterationTabModule = class IterationTabModule {
};
IterationTabModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_iteration_tab_component__WEBPACK_IMPORTED_MODULE_19__["IterationTabComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            primeng_toolbar__WEBPACK_IMPORTED_MODULE_16__["ToolbarModule"],
            src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__["HeaderModule"],
            primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__["InputTextModule"],
            primeng_button__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"],
            primeng_message__WEBPACK_IMPORTED_MODULE_13__["MessageModule"],
            primeng_dialog__WEBPACK_IMPORTED_MODULE_8__["DialogModule"],
            primeng_card__WEBPACK_IMPORTED_MODULE_6__["CardModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_18__["FormsModule"],
            primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__["DropdownModule"],
            primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__["CheckboxModule"],
            primeng_table__WEBPACK_IMPORTED_MODULE_15__["TableModule"],
            primeng_multiselect__WEBPACK_IMPORTED_MODULE_14__["MultiSelectModule"],
            primeng_menu__WEBPACK_IMPORTED_MODULE_12__["MenuModule"],
            primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__["BreadcrumbModule"],
            primeng_tooltip__WEBPACK_IMPORTED_MODULE_17__["TooltipModule"],
            primeng__WEBPACK_IMPORTED_MODULE_11__["SidebarModule"],
            primeng__WEBPACK_IMPORTED_MODULE_11__["InputSwitchModule"],
            primeng__WEBPACK_IMPORTED_MODULE_11__["SelectButtonModule"],
            src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_20__["CavTableModule"],
            primeng__WEBPACK_IMPORTED_MODULE_11__["InputTextareaModule"]
        ],
        exports: [_iteration_tab_component__WEBPACK_IMPORTED_MODULE_19__["IterationTabComponent"]]
    })
], IterationTabModule);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.component.scss":
/*!**************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.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-mail-configuration .chip ul.ui-inputtext, app-mail-configuration .chip .ui-inputtext {\n  border-top: none !important;\n  border-radius: 0px;\n  border-right: none !important;\n  border-left: none !important;\n  height: 40px;\n}\napp-mail-configuration .ul-styled ::marker {\n  font-size: 14px !important;\n}");

/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.component.ts":
/*!************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.component.ts ***!
  \************************************************************************************************************************/
/*! exports provided: MailConfigurationComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MailConfigurationComponent", function() { return MailConfigurationComponent; });
/* 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 _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../services/testsuite-config.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-config.service.ts");



let MailConfigurationComponent = class MailConfigurationComponent {
    constructor(_testConfig) {
        this._testConfig = _testConfig;
        this.show_subject = false;
        this.show_body = false;
        this.subject = " Test case $TESTCASE_NAME of Testsuite $TESTSUITE_NAME is completed  with status  $STATUS";
        /* String for validation of email id(s) */
        this.validateString = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
        this.globalConfig = false;
        this.userName = "";
        this.aclMode = true;
        this.bodyText = `Hi,
	
  Your TestSuite $TESTSUITE_NAME is now completed with Test case : $TESTCASE_NAME.
  Below is your test summary :

  $SUMMARY_TABLE_DATA

  You can find the results in the attached report.

  Regards,
  Cavisson Systems, Inc.`;
        this.editBody = false;
        this.editSubject = false;
        this.showCC = false;
        this.showBCC = false;
    }
    ngOnInit() {
        this.aclMode = this._testConfig.$testCaseMode;
        this.dataSubscription = this._testConfig.checkProfileDataObservable$.subscribe(action => {
            this.updateMailConfiguration(action);
        });
        this._testConfig.$body = this.bodyText;
        this._testConfig.$subject = this.subject;
    }
    updateMailConfiguration(action) {
        try {
            switch (action.action) {
                case 'MAIL_CONFIG':
                    {
                        let obj = action.data;
                        this.initializeConfig(obj);
                        break;
                    }
                case 'Mail_Conf':
                    {
                        let data = action.data;
                        if (data != null && data.config != null) {
                            if (data['host'] != "NA" && data['user'] != "NA" && data['port'] != 0) {
                                this.globalConfig = false;
                            }
                            else
                                this.globalConfig = true;
                        }
                        else
                            this.globalConfig = true;
                        this._testConfig.$isMailconf = this.globalConfig;
                    }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    initializeConfig(data) {
        console.log("initializeConfig called ...data =", data);
        try {
            if (data !== null && data['mailEnabled'] == "1") {
                this._testConfig.$isMailEnabled = data['mailEnabled'];
                /* updating to list */
                if (data['mailTo'] !== "") {
                    this._testConfig.$toList = data['mailTo'];
                    this.toList = data['mailTo'].split(",");
                }
                if (data['mailCc'] !== "") {
                    this._testConfig.$ccList = data['mailCc'];
                    this.ccList = data['mailCc'].split(",");
                }
                if (data['mailBcc'] !== "") {
                    this._testConfig.$bccList = data['mailBcc'];
                    this.bccList = data['mailBcc'].split(",");
                }
                if (data['mailSubject'] != null && data['mailSubject'] != "") {
                    this._testConfig.$subject = data['mailSubject'];
                    this.subject = data['mailSubject'];
                }
                else {
                    this.subject = " $TESTSUITE_NAME with Test case: $TESTCASE_NAME is $STATUS.";
                    this._testConfig.$subject = this.subject;
                }
                if (data['mailBody'] !== "") {
                    this._testConfig.$body = data['mailBody'];
                    this.bodyText = data['mailBody'];
                }
            }
            if (data !== null) {
                if (data['mailBody'] == "") {
                    let body = `Hi,
	
        Your TestSuite $TESTSUITE_NAME is now completed with Test case : $TESTCASE_NAME.

        You can find the results in the attached report.

        Regards,
        Cavisson Systems, Inc.`;
                    this._testConfig.$body = body;
                    this.bodyText = body;
                }
                else {
                    this._testConfig.$body = data['mailBody'];
                    this.bodyText = data['mailBody'];
                }
            }
            this.userName = sessionStorage.getItem('sesLoginName');
        }
        catch (e) {
            console.error(e);
        }
    }
    validateInput() {
        try {
            console.log("validateInput called ...");
            /* Validating to list of id(s) */
            if (this.toList !== null && this.toList !== undefined && this.toList.length > 0) {
                if (!this.toList[this.toList.length - 1].match(this.validateString)) {
                    alert("Invalid email address in \"To\" field");
                    if (this.chips["_results"][0]['value'].length == 1) {
                        this.chips["_results"][0]['value'] = [];
                        this.toList.pop();
                    }
                    else {
                        this.chips["_results"][0]['value'].slice(0, this.chips["_results"][0]['value'].length - 2);
                        this.toList.pop();
                    }
                    return;
                }
                else if (this.toList[this.toList.length - 1].match(this.validateString)) {
                    let list = "";
                    if (this.toList.length > 0) {
                        for (let i = 0; i < this.toList.length; i++) {
                            if (i !== this.toList.length - 1)
                                list += this.toList[i] + ",";
                            else
                                list += this.toList[i];
                        }
                        this._testConfig.$isMailEnabled = "1";
                    }
                    else {
                        this._testConfig.$isMailEnabled = "0";
                    }
                    this._testConfig.$toList = list;
                }
            }
            /* Validating cc list of id(s) */
            if (this.ccList !== null && this.ccList !== undefined && this.ccList.length > 0) {
                if (!this.ccList[this.ccList.length - 1].match(this.validateString)) {
                    alert("Invalid email address in \"Cc\" field");
                    if (this.chipsCc["_results"][0]['value'].length == 1) {
                        this.chipsCc["_results"][0]['value'] = [];
                        this.ccList.pop();
                    }
                    else {
                        this.chipsCc["_results"][0]['value'].slice(0, this.chipsCc["_results"][0]['value'].length - 2);
                        this.ccList.pop();
                    }
                    return;
                }
                else if (this.ccList[this.ccList.length - 1].match(this.validateString)) {
                    let list = "";
                    for (let i = 0; i < this.ccList.length; i++) {
                        if (i !== this.ccList.length - 1)
                            list += this.ccList[i] + ",";
                        else
                            list += this.ccList[i];
                    }
                    this._testConfig.$ccList = list;
                }
            }
            /* Validating bcc list of id(s) */
            if (this.bccList !== null && this.bccList !== undefined && this.bccList.length > 0) {
                if (!this.bccList[this.bccList.length - 1].match(this.validateString)) {
                    alert("Invalid email address in \"Bcc\" field");
                    if (this.chipsBcc["_results"][0]['value'].length == 1) {
                        this.chipsBcc["_results"][0]['value'] = [];
                        this.bccList.pop();
                    }
                    else {
                        this.chipsBcc["_results"][0]['value'].slice(0, this.chipsBcc["_results"][0]['value'].length - 2);
                        this.bccList.pop();
                    }
                    return;
                }
                else if (this.bccList[this.bccList.length - 1].match(this.validateString)) {
                    let list = "";
                    for (let i = 0; i < this.bccList.length; i++) {
                        if (i !== this.bccList.length - 1)
                            list += this.bccList[i] + ",";
                        else
                            list += this.bccList[i];
                    }
                    this._testConfig.$bccList = list;
                }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    updateList(value) {
        try {
            let list = "";
            if (value == "To" && this.toList !== null && this.toList !== undefined) {
                if (this.toList.length > 0) {
                    for (let i = 0; i < this.toList.length; i++) {
                        if (i !== this.toList.length - 1)
                            list += this.toList[i] + ",";
                        else
                            list += this.toList[i];
                    }
                    this._testConfig.$isMailEnabled = "1";
                }
                else {
                    this._testConfig.$isMailEnabled = "0";
                }
                this._testConfig.$toList = list;
            }
            list = "";
            if (value == "Cc" && this.ccList !== null && this.ccList !== undefined) {
                for (let i = 0; i < this.ccList.length; i++) {
                    if (i !== this.ccList.length - 1)
                        list += this.ccList[i] + ",";
                    else
                        list += this.ccList[i];
                }
                this._testConfig.$ccList = list;
            }
            list = "";
            if (value == "Bcc" && this.bccList !== null && this.bccList !== undefined) {
                for (let i = 0; i < this.bccList.length; i++) {
                    if (i !== this.bccList.length - 1)
                        list += this.bccList[i] + ",";
                    else
                        list += this.bccList[i];
                }
                this._testConfig.$bccList = list;
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onKeyBody() {
        try {
            this._testConfig.$body = this.bodyText;
        }
        catch (e) {
            console.error("onKeyBody - error: ", e);
        }
    }
    onKeySubject() {
        try {
            this._testConfig.$subject = this.subject;
        }
        catch (e) {
            console.error("onKeySubject - error: ", e);
        }
    }
};
MailConfigurationComponent.ctorParameters = () => [
    { type: _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_2__["TestsuiteConfigService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChildren"])("chip1")
], MailConfigurationComponent.prototype, "chips", void 0);
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChildren"])("chip2")
], MailConfigurationComponent.prototype, "chipsCc", void 0);
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChildren"])("chip3")
], MailConfigurationComponent.prototype, "chipsBcc", void 0);
MailConfigurationComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-mail-configuration',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./mail-configuration.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.component.html")).default,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./mail-configuration.component.scss */ "./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.component.scss")).default]
    })
], MailConfigurationComponent);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.module.ts":
/*!*********************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.module.ts ***!
  \*********************************************************************************************************************/
/*! exports provided: MailConfigurationModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MailConfigurationModule", function() { return MailConfigurationModule; });
/* 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 src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/header/header.module */ "./src/app/shared/header/header.module.ts");
/* harmony import */ var primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js");
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
/* harmony import */ var primeng_card__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/card */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-card.js");
/* harmony import */ var primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js");
/* harmony import */ var primeng_dialog__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
/* harmony import */ var primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
/* harmony import */ var primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
/* harmony import */ var primeng_menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng/menu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menu.js");
/* harmony import */ var primeng_message__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/message */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-message.js");
/* harmony import */ var primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! primeng/multiselect */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
/* harmony import */ var primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js");
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js");
/* harmony import */ var primeng_chips__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! primeng/chips */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-chips.js");
/* harmony import */ var _mail_configuration_component__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./mail-configuration.component */ "./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.component.ts");





















let MailConfigurationModule = class MailConfigurationModule {
};
MailConfigurationModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_mail_configuration_component__WEBPACK_IMPORTED_MODULE_20__["MailConfigurationComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__["ToolbarModule"],
            src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__["HeaderModule"],
            primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__["InputTextModule"],
            primeng_button__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"],
            primeng_message__WEBPACK_IMPORTED_MODULE_12__["MessageModule"],
            primeng_dialog__WEBPACK_IMPORTED_MODULE_8__["DialogModule"],
            primeng_card__WEBPACK_IMPORTED_MODULE_6__["CardModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_17__["FormsModule"],
            primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__["DropdownModule"],
            primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__["CheckboxModule"],
            primeng_table__WEBPACK_IMPORTED_MODULE_14__["TableModule"],
            primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__["MultiSelectModule"],
            primeng_menu__WEBPACK_IMPORTED_MODULE_11__["MenuModule"],
            primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__["BreadcrumbModule"],
            primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__["TooltipModule"],
            primeng_sidebar__WEBPACK_IMPORTED_MODULE_18__["SidebarModule"],
            primeng_chips__WEBPACK_IMPORTED_MODULE_19__["ChipsModule"]
        ],
        exports: [_mail_configuration_component__WEBPACK_IMPORTED_MODULE_20__["MailConfigurationComponent"]]
    })
], MailConfigurationModule);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.component.scss":
/*!******************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.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/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.component.ts":
/*!****************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.component.ts ***!
  \****************************************************************************************************************************/
/*! exports provided: PostTestScriptTabComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostTestScriptTabComponent", function() { return PostTestScriptTabComponent; });
/* 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 src_app_shared_file_manager_file_manager_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/file-manager/file-manager.component */ "./src/app/shared/file-manager/file-manager.component.ts");
/* harmony import */ var _constants_pre_post_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../constants/pre-post-constants */ "./src/app/pages/home/load-test/testsuite/constants/pre-post-constants.ts");
/* harmony import */ var _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/testsuite-config.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-config.service.ts");
/* harmony import */ var _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../services/testsuite-data-handler.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-data-handler.service.ts");
/* harmony import */ var _services_testsuite_http_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../services/testsuite-http.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-http.service.ts");
/* harmony import */ var _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../services/testsuite.state */ "./src/app/pages/home/load-test/testsuite/services/testsuite.state.ts");









let PostTestScriptTabComponent = class PostTestScriptTabComponent {
    constructor(sessionService, testsuiteHTTPService, _testConfig, _dataRequest) {
        this.sessionService = sessionService;
        this.testsuiteHTTPService = testsuiteHTTPService;
        this._testConfig = _testConfig;
        this._dataRequest = _dataRequest;
        this.actionOptions = _constants_pre_post_constants__WEBPACK_IMPORTED_MODULE_4__["PRE_POST_ACTION_LIST"];
        this.actionSelected = "Select Action";
        this.serverSelected = "Select Server name";
        this.openFileExplorerDialog = false;
        this.addedActionString = "";
        this.actionListString = "";
        this.cols = [
            { field: 'Added actions for service', header: 'Added actions for service' }
        ];
        this.editEntry = false;
        this.addedActionList = [];
        this.commandDescription = "";
        this.actionsList = [];
        this.aclMode = true;
        this.userLoginName = "";
        this.showPaginator = false;
        this.selectPostTestScript = 'guiMode';
        this.GUI = false;
        this.advance = true;
        this.headerRelativePath = "testSuite/testCases/post-test-script.json";
        this.userLoginName = this.sessionService.session.cctx.u;
    }
    ngOnInit() {
        // /*for acl implementation*/
        this.aclMode = this._testConfig.$testCaseMode;
        this._dataRequest.getServerList();
        this.fileSubscription = this._testConfig.fileListProvider.subscribe(fileList => {
            this.selectFile(fileList);
        });
        this.dataSubscription = this._testConfig.checkProfileDataObservable$.subscribe(action => {
            this.updateEventData(action);
        });
        this.postTestScript = [
            { label: 'GUI Mode', value: 'guiMode' },
            { label: 'Text Mode', value: 'textMode' },
        ];
    }
    updateEventData(action) {
        try {
            /* Checking for actions. */
            switch (action.action) {
                case 'SERVER_LIST':
                    {
                        let arr = action.data;
                        this.serverOptions = [];
                        this.serverOptions.push({ "name": "Select Server name" });
                        for (let i = 0; i < arr.length; i++) {
                            console.log("arr at " + i, arr[i]);
                            let obj = { "name": arr[i] };
                            this.serverOptions.push(obj);
                        }
                        break;
                    }
                case 'PRE_LIST':
                    {
                        let arr = action.data;
                        this.getPostList(arr);
                        break;
                    }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    getPostList(result) {
        try {
            console.log("result = ", result);
            if (result) {
                if (result[0]['postList'][1] === "") {
                    this.addedActionList = [];
                }
                else {
                    for (let action = 1; action < result[0]['postList'].length; action++) {
                        let line = result[0]['postList'][action];
                        if (line.startsWith('Action')) {
                            let obj = { "Added actions for service": result[0]['postList'][action] };
                            this.addedActionList.push(obj);
                        }
                    }
                    if (this.addedActionList !== null && this.addedActionList.length > 5)
                        this.showPaginator = true;
                    else
                        this.showPaginator = false;
                }
                this._testConfig.setAddedActions(this.addedActionList, 'Post');
                this.getSavedActions();
            }
            console.log("addedActionList after adding actions =", this.addedActionList);
        }
        catch (e) {
            console.error(e);
        }
    }
    getSavedActions() {
        try {
            let editMode = this._testConfig.$postEditMode;
            let listOfAddedActionsPre = this._testConfig.getAddedActions("Post");
            if (editMode == "Advance") {
                /* Saving data from advance mode */
                /* Making actionList param */
                let arr = this.getArrayForActionsToBeAdded(listOfAddedActionsPre);
                /* Making post request for saving final actions for pre-post */
                let requestJsonParm = {
                    actionList: arr,
                    mode: "Post",
                    uiMode: this._testConfig.$postEditMode,
                    projectSubproject: this._testConfig.$projectSubProject,
                    testCaseName: this._testConfig.$actualTestCaseName,
                    username: this.userLoginName
                };
                this.testsuiteHTTPService.saveActions(requestJsonParm).subscribe((state) => {
                    if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["SaveActionLoadingState"]) {
                        this.onLoadingSaveAction(state);
                        return;
                    }
                    if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["SaveActionLoadedState"]) {
                        this.onLoadedSaveActions(state);
                        return;
                    }
                }, (state) => {
                    this.onLoadingErrorSaveAction(state);
                });
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onLoadedSaveActions(state) {
        this.loadPostData(state.data);
    }
    loadPostData(result) {
        let data = result['prePostData'];
        let testCaseData = this._testConfig.getTestCaseData();
        testCaseData.postTestBufferData = data;
    }
    getActions() {
        console.log("view mode :: ", this.selectPostTestScript);
        if (this.selectPostTestScript == "textMode")
            this.getPreActionsInTextMode();
        else if (this.selectPostTestScript == "guiMode")
            this.getPreActionsInGuiMode();
    }
    getPreActionsInGuiMode() {
        this.GUI = false;
        this.advance = true;
        this._testConfig.$postEditMode = "Advance";
        this._testConfig.setAddedActions(this.addedActionList, 'Post');
    }
    getPreActionsInTextMode() {
        try {
            console.log("getPreActionsInTextMode method called ...");
            this.GUI = true;
            this.advance = false;
            this._testConfig.$postEditMode = "Text";
            /* Making actionList param */
            let arr = this.getArrayForActionsToBeAdded(this.addedActionList);
            let testCaseName = "";
            let projectSubproject = "";
            if (this._testConfig.getSelectedRowForTestCase() !== null) {
                projectSubproject = this._testConfig.getSelectedRowForTestCase()['Project'] + '/' + this._testConfig.getSelectedRowForTestCase()['Sub Project'];
                testCaseName = this._testConfig.getSelectedRowForTestCase()['Test Case'];
            }
            /* Making post request for saving final actions for pre-post */
            console.log("added actions list =", arr);
            let requestJsonParm = {
                actionList: arr,
                mode: "Post",
                uiMode: "Text",
                projectSubproject: projectSubproject,
                testCaseName: testCaseName,
                username: this.userLoginName
            };
            this.testsuiteHTTPService.saveActions(requestJsonParm).subscribe((state) => {
                if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["SaveActionLoadingState"]) {
                    this.onLoadingSaveAction(state);
                    return;
                }
                if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["SaveActionLoadedState"]) {
                    this.onLoadedSaveAction(state);
                    return;
                }
            }, (state) => {
                this.onLoadingErrorSaveAction(state);
            });
        }
        catch (e) {
            console.error(e);
        }
    }
    onLoadingSaveAction(state) { }
    onLoadedSaveAction(state) {
        this.savePostData(state.data);
    }
    onLoadingErrorSaveAction(state) { }
    savePostData(result) {
        if (result) {
            console.log("result =", result);
            let data = result['prePostData'];
            data = data.replace(new RegExp('&#010;', 'g'), "\n");
            this.textMode = data;
            let text;
            text = document.getElementById("postTxtId");
            console.log("text---", text);
            if (text)
                text.value = data;
            this._testConfig.setAddedActions(this.textMode, 'Post');
        }
    }
    onKeyTextMode(event) {
        console.log("onKeyTextMode method called ...");
        let text;
        text = document.getElementById("postTxtId");
        this._testConfig.setAddedActions(text.value, 'Post');
    }
    selectFile(fileName) {
        console.log("fileList in selectFile = ", fileName);
        if (this.valueOfCopyLink == 'source')
            this.source = fileName;
        else if (this.valueOfCopyLink == 'destination')
            this.destination = fileName;
        else if (this.valueOfCopyLink == 'removeFile')
            this.removeFile = fileName;
        else if (this.valueOfCopyLink == 'serverPath')
            this.serverPath = fileName;
        else if (this.valueOfCopyLink == 'netstormPath')
            this.netstormPath = fileName;
        this.openFileExplorerDialog = false;
    }
    addAction(action) {
        console.log("add action method called ...", action['name']);
        if (action['name'] == '' || action['name'] == null || action['name'] == "" || action['name'] == 'Select Action') {
            alert("Please select action to be performed");
            return;
        }
        if (action['name'] !== 'SLEEP') {
            if (this.serverSelected['name'] == '' || this.serverSelected['name'] == null || this.serverSelected['name'] == "" || this.serverSelected['name'] == 'Select Server name') {
                alert("Please select server name");
                return;
            }
        }
        if (action['name'] == 'COPY_FILE') {
            console.log("action is = ", action['name'].toLowerCase());
            if (this.source == null || this.source == "" || this.destination == null || this.destination == "") {
                alert("Source and destination path can not be empty");
                return;
            }
            if (!this.source.trim().startsWith("'"))
                this.source = "'" + this.source;
            if (!this.source.trim().endsWith("'"))
                this.source = this.source + "'";
            if (!this.destination.trim().startsWith("'"))
                this.destination = "'" + this.destination;
            if (!this.destination.trim().endsWith("'"))
                this.destination = this.destination + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Source: " + this.source + ", Destination: " + this.destination;
            console.log("addedString in copy_file = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Source": this.source,
                "Destination": this.destination
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList copyFile = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Post');
            this.source = "";
            this.destination = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'START_COMMAND' || action['name'] == 'STOP_COMMAND') {
            console.log("action is = ", action);
            if (this.startStopCommand == null || this.startStopCommand == "") {
                alert("Service string can not be empty");
                return;
            }
            if (!this.startStopCommand.trim().startsWith("'"))
                this.startStopCommand = "'" + this.startStopCommand;
            if (!this.startStopCommand.trim().endsWith("'"))
                this.startStopCommand = this.startStopCommand + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Service_string: " + this.startStopCommand;
            console.log("addedString in startStop = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Service_string": this.startStopCommand
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList startStopCommand = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Post');
            this.startStopCommand = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'REMOVE_FILE') {
            console.log("action is = ", action);
            if (this.removeFile == null || this.removeFile == "") {
                alert("File path can not be empty");
                return;
            }
            if (!this.removeFile.trim().startsWith("'"))
                this.removeFile = "'" + this.removeFile;
            if (!this.removeFile.trim().endsWith("'"))
                this.removeFile = this.removeFile + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", File_path: " + this.removeFile;
            console.log("addedString in removeFile = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "File_path": this.removeFile
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList removeFile = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Post');
            this.removeFile = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'SUDO_START_SERVICE' || action['name'] == 'SUDO_STOP_SERVICE') {
            console.log("action is = ", action);
            if (this.startStopServiceString == null || this.startStopServiceString == "") {
                alert("Service string can not be empty");
                return;
            }
            if (!this.startStopServiceString.trim().startsWith("'"))
                this.startStopServiceString = "'" + this.startStopServiceString;
            if (!this.startStopServiceString.trim().endsWith("'"))
                this.startStopServiceString = this.startStopServiceString + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Service string: " + this.startStopServiceString;
            console.log("addedString in startStopServiceSudo = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Service string": this.startStopServiceString
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList startStopService = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Post');
            this.startStopServiceString = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'REMOTE_EXECUTION') {
            console.log("action is = ", action);
            if (this.remoteExecution == null || this.remoteExecution == "") {
                alert("Remote command can not be empty");
                return;
            }
            if (!this.remoteExecution.trim().startsWith("'"))
                this.remoteExecution = "'" + this.remoteExecution;
            if (!this.remoteExecution.trim().endsWith("'"))
                this.remoteExecution = this.remoteExecution + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Remote Command: " + this.remoteExecution;
            console.log("addedString in remoteExecution = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Remote Command": this.remoteExecution
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList remoteExecution = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Post');
            this.remoteExecution = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'UPLOAD' || action['name'] == 'DOWNLOAD') {
            console.log("action is = ", action);
            if (this.serverPath == null || this.serverPath == "" || this.netstormPath == null || this.netstormPath == "") {
                alert("Server path and netstorm path can not be empty");
                return;
            }
            if (!this.serverPath.trim().startsWith("'"))
                this.serverPath = "'" + this.serverPath;
            if (!this.serverPath.trim().endsWith("'"))
                this.serverPath = this.serverPath + "'";
            if (!this.netstormPath.trim().startsWith("'"))
                this.netstormPath = "'" + this.netstormPath;
            if (!this.netstormPath.trim().endsWith("'"))
                this.netstormPath = this.netstormPath + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Remote Path: " + this.serverPath + ", Local Path: " + this.netstormPath;
            console.log("addedString in uploadDownload = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Remote Path": this.serverPath,
                "Local Path": this.netstormPath
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList uploadDownload = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Post');
            this.serverPath = "";
            this.netstormPath = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'SLEEP') {
            console.log("action is = ", action);
            if (this.timeModel == null || this.timeModel == "") {
                alert("Server path and netstorm path can not be empty");
                return;
            }
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Time: " + this.timeModel;
            console.log("addedString in sleep = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Time Model": this.timeModel
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList sleep = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Post');
            this.timeModel = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        if (this.addedActionList !== null && this.addedActionList.length > 5)
            this.showPaginator = true;
        else
            this.showPaginator = false;
    }
    onActionChange(action) {
        console.log("action selected = ", action['name']);
        if (action['name'] == 'Select Action') {
            this.serverSelected = { "name": "Select Server name" };
        }
        this.commandDescription = _constants_pre_post_constants__WEBPACK_IMPORTED_MODULE_4__["ACTION_DESCRIPTION"][action['name']];
        console.log("command description = ", this.commandDescription);
    }
    onServerChange(server) {
        console.log("server = ", server['name']);
    }
    getServerList() {
        console.log("getServerList method called --");
        this.testsuiteHTTPService.getServerList().subscribe((state) => {
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["GetServerListLoadingState"]) {
                this.onLoadingSaveAction(state);
                return;
            }
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["GetServerListLoadedState"]) {
                this.onLoadedSaveAction(state);
                return;
            }
        }, (state) => {
            this.onLoadingErrorSaveAction(state);
        });
    }
    onLoadingGetServerList(state) { }
    onLoadedGetServerList(state) { }
    onLoadingErrorGetServerList(state) { }
    setServerList(response) {
        if (response) {
            let arr = response;
            this.serverOptions = [];
            this.serverOptions.push({ "name": "Select Server name" });
            for (let i = 0; i < arr.length; i++) {
                console.log("arr at " + i, arr[i]);
                let obj = { "name": arr[i] };
                this.serverOptions.push(obj);
            }
        }
    }
    openFileExplorer(value) {
        this.openFileExplorerDialog = true;
        this.valueOfCopyLink = value;
        if (value == 'source')
            this.fileManager.saveText = this.source;
        else if (value == 'destination')
            this.fileManager.saveText = this.destination;
        else if (value == 'removeFile')
            this.fileManager.saveText = this.removeFile;
        else if (value == 'serverPath')
            this.fileManager.saveText = this.serverPath;
        else if (value == 'netstormPath')
            this.fileManager.saveText = this.netstormPath;
        this.fileManager.open(true);
    }
    openFileExplorern(value, text) {
        this.openFileExplorerDialog = true;
        this.valueOfCopyLink = value;
        this.fileManager.saveText = text;
        this.fileManager.open(true);
    }
    editAction(index) {
        console.log("rowIndex in editAction = ", index);
        this.indexToEdit = index;
        this.editEntry = true;
        let obj = {};
        let row = this.addedActionList[index];
        console.log("row =", row);
        if (!this.aclMode) {
            return;
        }
        let arr = row['Added actions for service'].split(",");
        console.log("arr=", arr);
        for (let i = 0; i < arr.length; i++) {
            let val = arr[i].trim();
            console.log("val = ", val);
            if (val.startsWith("Action")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Action'] = res[1];
            }
            else if (val.startsWith("Server")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Server'] = res[1];
            }
            else if (val.startsWith("File_path")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['File_path'] = res[1].trim();
            }
            else if (val.startsWith("Source")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Source'] = res[1];
            }
            else if (val.startsWith("Destination")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Destination'] = res[1].trim();
            }
            else if (val.startsWith("Service_string")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Service_string'] = res[1].trim();
            }
            else if (val.startsWith("Sudo Command")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Sudo Command'] = res[1].trim();
            }
            else if (val.startsWith("Remote Command")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Remote Command'] = res[1].trim();
            }
            else if (val.startsWith("Remote Path")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Remote Path'] = res[1];
            }
            else if (val.startsWith("Local Path")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Local Path'] = res[1].trim();
            }
            else if (val.startsWith("Service string")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Service string'] = res[1].trim();
            }
            else if (val.startsWith("Time")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Time Model'] = res[1].trim();
            }
        }
        console.log("obj =", obj);
        this.actionSelected = { "name": obj['Action'].trim().toUpperCase() };
        console.log("actionSelected =", this.actionSelected);
        this.commandDescription = _constants_pre_post_constants__WEBPACK_IMPORTED_MODULE_4__["ACTION_DESCRIPTION"][this.actionSelected['name']];
        this.serverSelected = { "name": "" };
        if (obj['Action'].trim() != 'sleep') {
            this.serverSelected = { "name": obj['Server'].trim() };
        }
        console.log("Action = ", obj['Action'].toUpperCase().trim() + ", Server: ", obj['Server']);
        if (obj['Action'].trim() == 'remove_file') {
            console.log("in remove file ...");
            this.removeFile = obj['File_path'];
        }
        else if (obj['Action'].trim() == 'copy_file') {
            console.log('in copy file ...');
            this.source = obj['Source'],
                this.destination = obj['Destination'];
        }
        else if (obj['Action'].trim() == 'start_command' || obj['Action'].trim() == 'stop_command') {
            console.log("in start stop command ...");
            this.startStopCommand = obj['Service_string'];
        }
        else if (obj['Action'].trim() == 'sudo_start_service' || obj['Action'].trim() == 'sudo_stop_service') {
            console.log("in start stop service ...");
            this.startStopServiceString = obj['Service string'];
        }
        else if (obj['Action'].trim() == 'remote_execution') {
            console.log("in remote execution ...");
            this.remoteExecution = obj['Remote Command'];
        }
        else if (obj['Action'].trim() == 'upload' || obj['Action'].trim() == 'download') {
            console.log("in upload download ...");
            this.serverPath = obj['Remote Path'];
            this.netstormPath = obj['Local Path'];
        }
        else if (obj['Action'].trim() == 'sleep') {
            this.timeModel = obj['Time Model'];
        }
    }
    deleteAction(index) {
        if (!this.aclMode) {
            return;
        }
        console.log("deleteAction called ...index =", index);
        this.addedActionList.splice(index, 1);
        console.log("after deleting array =", this.addedActionList);
        this._testConfig.setAddedActions(this.addedActionList, 'Post');
    }
    getArrayForActionsToBeAdded(listOfAddedActionsPre) {
        try {
            console.log("listOfAddedActionsPre =", listOfAddedActionsPre);
            let finalData = [];
            if (listOfAddedActionsPre.length > 0) {
                console.log("list length =", listOfAddedActionsPre.length);
                for (let i = 0; i < listOfAddedActionsPre.length; i++) {
                    let obj = {};
                    let arr = listOfAddedActionsPre[i]['Added actions for service'].split(",");
                    console.log("arr=", arr);
                    for (let i = 0; i < arr.length; i++) {
                        let val = arr[i].trim();
                        console.log("val = ", val);
                        if (val.startsWith("Action")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Action'] = res[1].trim();
                        }
                        else if (val.startsWith("Server")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Server'] = res[1].trim();
                        }
                        else if (val.startsWith("File_path")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['File_path'] = res[1].trim();
                        }
                        else if (val.startsWith("Source")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Source'] = res[1].trim();
                        }
                        else if (val.startsWith("Destination")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Destination'] = res[1].trim();
                        }
                        else if (val.startsWith("Service_string")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Service_string'] = res[1].trim();
                        }
                        else if (val.startsWith("Sudo Command")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Sudo Command'] = res[1].trim();
                        }
                        else if (val.startsWith("Remote Command")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Remote Command'] = res[1].trim();
                        }
                        else if (val.startsWith("Remote Path")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Remote Path'] = res[1].trim();
                        }
                        else if (val.startsWith("Local Path")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Local Path'] = res[1].trim();
                        }
                        else if (val.startsWith("Service string")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Service string'] = res[1].trim();
                        }
                        else if (val.startsWith("Time")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Time Model'] = res[1].trim();
                        }
                    }
                    console.log("obj formed =", obj);
                    if (obj['Action'].trim() == 'copy_file') {
                        let addedString = obj['Action'].trim() + " " + obj['Server'] + " " + obj['Source'] + " " + obj['Destination'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'remove_file') {
                        let addedString = obj['Action'].trim() + " " + obj['Server'] + " " + obj['File_path'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'start_command' || obj['Action'].trim() == 'stop_command') {
                        let actionName = "";
                        if (obj['Action'].trim() == 'start_command') {
                            actionName = 'start_service';
                        }
                        else {
                            actionName = 'stop_service';
                        }
                        let addedString = actionName + " " + obj['Server'] + " " + obj['Service_string'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'sudo_start_service' || obj['Action'].trim() == 'sudo_stop_service') {
                        let addedString = obj['Action'].trim() + " " + obj['Server'] + " " + obj['Service string'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'remote_execution') {
                        let addedString = 'remote_exec' + " " + obj['Server'] + " " + obj['Remote Command'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'upload' || obj['Action'].trim() == 'download') {
                        let addedString = obj['Action'].trim() + '_file' + " " + obj['Server'] + " " + obj['Remote Path'] + " " + obj['Local Path'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'sleep') {
                        let addedString = obj['Action'].trim() + " " + obj['Time Model'];
                        finalData.push(addedString);
                    }
                    console.log("finalData =", finalData);
                }
            }
            else {
                finalData = [];
            }
            return finalData;
        }
        catch (e) {
            console.error(e);
        }
    }
    getPath(path) {
        switch (this.valueOfCopyLink) {
            case "source":
                this.source = path;
                break;
            case "destination":
                this.destination = path;
                break;
            case "removeFile":
                this.removeFile = path;
                break;
            case "serverPath":
                this.serverPath = path;
                break;
            case "netstormPath":
                this.netstormPath = path;
                break;
            default:
                alert("Wrong Selection");
                break;
        }
    }
    clickButtonEvent(event) {
        var _a, _b, _c, _d, _e, _f;
        try {
            if (((_b = (_a = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _a === void 0 ? void 0 : _a.actionConfig) === null || _b === void 0 ? void 0 : _b.action) == "deleteRow") {
                this.deleteAction((_c = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _c === void 0 ? void 0 : _c.rowIndex);
            }
            if (((_e = (_d = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _d === void 0 ? void 0 : _d.actionConfig) === null || _e === void 0 ? void 0 : _e.action) == "edit") {
                this.editAction((_f = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _f === void 0 ? void 0 : _f.rowIndex);
            }
        }
        catch (error) {
            console.error("Error in clickButtonEvent", error);
        }
    }
    ngOnDestroy() {
        this.dataSubscription.unsubscribe();
    }
};
PostTestScriptTabComponent.ctorParameters = () => [
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__["SessionService"] },
    { type: _services_testsuite_http_service__WEBPACK_IMPORTED_MODULE_7__["TestsuiteHttpService"] },
    { type: _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_5__["TestsuiteConfigService"] },
    { type: _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_6__["TestsuiteDataHandlerService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(src_app_shared_file_manager_file_manager_component__WEBPACK_IMPORTED_MODULE_3__["FileManagerComponent"], { read: src_app_shared_file_manager_file_manager_component__WEBPACK_IMPORTED_MODULE_3__["FileManagerComponent"] })
], PostTestScriptTabComponent.prototype, "fileManager", void 0);
PostTestScriptTabComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-post-test-script-tab',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./post-test-script-tab.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.component.html")).default,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./post-test-script-tab.component.scss */ "./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.component.scss")).default]
    })
], PostTestScriptTabComponent);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.module.ts":
/*!*************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.module.ts ***!
  \*************************************************************************************************************************/
/*! exports provided: PostTestScriptTabModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostTestScriptTabModule", function() { return PostTestScriptTabModule; });
/* 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 src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/header/header.module */ "./src/app/shared/header/header.module.ts");
/* harmony import */ var primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js");
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
/* harmony import */ var primeng_card__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/card */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-card.js");
/* harmony import */ var primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js");
/* harmony import */ var primeng_dialog__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
/* harmony import */ var primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
/* harmony import */ var primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
/* harmony import */ var primeng_menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng/menu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menu.js");
/* harmony import */ var primeng_message__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/message */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-message.js");
/* harmony import */ var primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! primeng/multiselect */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
/* harmony import */ var primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js");
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _post_test_script_tab_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./post-test-script-tab.component */ "./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.component.ts");
/* harmony import */ var src_app_shared_file_manager_file_manager_module__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! src/app/shared/file-manager/file-manager.module */ "./src/app/shared/file-manager/file-manager.module.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");






















let PostTestScriptTabModule = class PostTestScriptTabModule {
};
PostTestScriptTabModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_post_test_script_tab_component__WEBPACK_IMPORTED_MODULE_19__["PostTestScriptTabComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__["ToolbarModule"],
            src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__["HeaderModule"],
            primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__["InputTextModule"],
            primeng_button__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"],
            primeng_message__WEBPACK_IMPORTED_MODULE_12__["MessageModule"],
            primeng_dialog__WEBPACK_IMPORTED_MODULE_8__["DialogModule"],
            primeng_card__WEBPACK_IMPORTED_MODULE_6__["CardModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_17__["FormsModule"],
            primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__["DropdownModule"],
            primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__["CheckboxModule"],
            primeng_table__WEBPACK_IMPORTED_MODULE_14__["TableModule"],
            primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__["MultiSelectModule"],
            primeng_menu__WEBPACK_IMPORTED_MODULE_11__["MenuModule"],
            primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__["BreadcrumbModule"],
            primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__["TooltipModule"],
            primeng__WEBPACK_IMPORTED_MODULE_18__["SidebarModule"],
            src_app_shared_file_manager_file_manager_module__WEBPACK_IMPORTED_MODULE_20__["FileManagerModule"],
            primeng__WEBPACK_IMPORTED_MODULE_18__["SelectButtonModule"],
            primeng__WEBPACK_IMPORTED_MODULE_18__["InputTextareaModule"],
            primeng__WEBPACK_IMPORTED_MODULE_18__["SpinnerModule"],
            src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_21__["CavTableModule"]
        ],
        exports: [_post_test_script_tab_component__WEBPACK_IMPORTED_MODULE_19__["PostTestScriptTabComponent"]]
    })
], PostTestScriptTabModule);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.component.scss":
/*!****************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.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/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.component.ts":
/*!**************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.component.ts ***!
  \**************************************************************************************************************************/
/*! exports provided: PreTestScriptTabComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreTestScriptTabComponent", function() { return PreTestScriptTabComponent; });
/* 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 src_app_shared_file_manager_file_manager_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/file-manager/file-manager.component */ "./src/app/shared/file-manager/file-manager.component.ts");
/* harmony import */ var _constants_pre_post_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../constants/pre-post-constants */ "./src/app/pages/home/load-test/testsuite/constants/pre-post-constants.ts");
/* harmony import */ var _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/testsuite-config.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-config.service.ts");
/* harmony import */ var _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../services/testsuite-data-handler.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-data-handler.service.ts");
/* harmony import */ var _services_testsuite_http_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../services/testsuite-http.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-http.service.ts");
/* harmony import */ var _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../services/testsuite.state */ "./src/app/pages/home/load-test/testsuite/services/testsuite.state.ts");









let PreTestScriptTabComponent = class PreTestScriptTabComponent {
    constructor(testsuiteHTTPService, sessionService, _testConfig, _dataRequest) {
        this.testsuiteHTTPService = testsuiteHTTPService;
        this.sessionService = sessionService;
        this._testConfig = _testConfig;
        this._dataRequest = _dataRequest;
        this.actionOptions = _constants_pre_post_constants__WEBPACK_IMPORTED_MODULE_4__["PRE_POST_ACTION_LIST"];
        this.actionSelected = { "name": "Select Action" };
        this.serverSelected = { "name": "Select Server name" };
        this.openFileExplorerDialog = false;
        this.addedActionString = "";
        this.actionListString = "";
        this.cols = [
            { field: 'Added actions for service', header: 'Added actions for service' }
        ];
        this.editEntry = false;
        this.addedActionList = [];
        this.commandDescription = "";
        this.actionsList = [];
        this.showPaginator = false;
        this.selectPreTestScript = 'guiMode';
        this.GUI = false;
        this.advance = true;
        this.textMode = "";
        this.aclMode = true;
        this.userLoginName = "";
        this.headerRelativePath = "testSuite/testCases/pre-test-script.json";
        this.userLoginName = this.sessionService.session.cctx.u;
    }
    ngOnInit() {
        this.aclMode = this._testConfig.$testCaseMode;
        this._dataRequest.getServerList();
        this.fileSubscription = this._testConfig.fileListProvider.subscribe(fileList => {
            this.selectFile(fileList);
        });
        this.dataSubscription = this._testConfig.checkProfileDataObservable$.subscribe(action => {
            this.updateEventData(action);
        });
        this.cols = [
            { field: 'Added actions for service', header: 'Added actions for service' }
        ];
        this.preTestScript = [
            { label: 'GUI Mode', value: 'guiMode' },
            { label: 'Text Mode', value: 'textMode' },
        ];
    }
    updateEventData(action) {
        try {
            /* Checking for actions. */
            switch (action.action) {
                case 'SERVER_LIST':
                    {
                        let arr = action.data;
                        this.serverOptions = [];
                        this.serverOptions.push({ "name": "Select Server name" });
                        for (let i = 0; i < arr.length; i++) {
                            let obj = { "name": arr[i] };
                            this.serverOptions.push(obj);
                        }
                        break;
                    }
                case 'PRE_LIST':
                    {
                        let arr = action.data;
                        this.getPreList(arr);
                        break;
                    }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    getPreList(result) {
        try {
            console.log("result = ", result);
            if (result) {
                if (result[0]['preList'][1] === "") {
                    this.addedActionList = [];
                }
                else {
                    for (let action = 1; action < result[0]['preList'].length; action++) {
                        let line = result[0]['preList'][action];
                        if (line.startsWith('Action')) {
                            let obj = { "Added actions for service": result[0]['preList'][action] };
                            this.addedActionList.push(obj);
                        }
                    }
                    if (this.addedActionList !== null && this.addedActionList.length > 5)
                        this.showPaginator = true;
                    else
                        this.showPaginator = false;
                }
                this._testConfig.setAddedActions(this.addedActionList, 'Pre');
                this.getSavedActions();
            }
            console.log("addedActionList after adding actions =", this.addedActionList);
        }
        catch (e) {
            console.error(e);
        }
    }
    getSavedActions() {
        try {
            let editMode = this._testConfig.$preEditMode;
            let listOfAddedActionsPre = this._testConfig.getAddedActions("Pre");
            if (editMode == "Advance") {
                /* Saving data from advance mode */
                /* Making actionList param */
                let arr = this.getArrayForActionsToBeAdded(listOfAddedActionsPre);
                /* Making post request for saving final actions for pre-post */
                let requestJsonParm = {
                    actionList: arr,
                    mode: "Pre",
                    uiMode: this._testConfig.$preEditMode,
                    projectSubproject: this._testConfig.$projectSubProject,
                    testCaseName: this._testConfig.$actualTestCaseName,
                    username: this.userLoginName
                };
                this.testsuiteHTTPService.saveActions(requestJsonParm).subscribe((state) => {
                    if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["SaveActionLoadingState"]) {
                        this.onLoadingSaveAction(state);
                        return;
                    }
                    if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["SaveActionLoadedState"]) {
                        this.onLoadedSaveActions(state);
                        return;
                    }
                }, (state) => {
                    this.onLoadingErrorSaveAction(state);
                });
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onLoadedSaveActions(state) {
        this.loadPostData(state.data);
    }
    loadPostData(result) {
        let data = result['prePostData'];
        let testCaseData = this._testConfig.getTestCaseData();
        testCaseData.preTestBufferData = data;
    }
    getActions() {
        if (this.selectPreTestScript == "textMode")
            this.getPreActionsInTextMode();
        else if (this.selectPreTestScript == "guiMode")
            this.getPreActionsInGuiMode();
    }
    getPreActionsInGuiMode() {
        this.GUI = false;
        this.advance = true;
        this._testConfig.$preEditMode = "Advance";
        this._testConfig.setAddedActions(this.addedActionList, 'Pre');
    }
    getPreActionsInTextMode() {
        try {
            this.GUI = true;
            this.advance = false;
            this._testConfig.$preEditMode = "Text";
            /* Making post request for saving final actions for pre-post */
            let arr = this.getArrayForActionsToBeAdded(this.addedActionList);
            let testCaseName = "";
            let projectSubproject = "";
            if (this._testConfig.getSelectedRowForTestCase() !== null) {
                projectSubproject = this._testConfig.getSelectedRowForTestCase()['Project'] + '/' + this._testConfig.getSelectedRowForTestCase()['Sub Project'];
                testCaseName = this._testConfig.getSelectedRowForTestCase()['Test Case'];
            }
            console.log("added actions list =", arr);
            let requestJsonParm = {
                actionList: arr,
                mode: "Pre",
                uiMode: "Text",
                projectSubproject: projectSubproject,
                testCaseName: testCaseName,
                username: this.userLoginName
            };
            this.testsuiteHTTPService.saveActions(requestJsonParm).subscribe((state) => {
                if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["SaveActionLoadingState"]) {
                    this.onLoadingSaveAction(state);
                    return;
                }
                if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_8__["SaveActionLoadedState"]) {
                    this.onLoadedSaveAction(state);
                    return;
                }
            }, (state) => {
                this.onLoadingErrorSaveAction(state);
            });
        }
        catch (e) {
            console.error(e);
        }
    }
    onLoadingSaveAction(state) { }
    onLoadedSaveAction(state) {
        this.savePreData(state.data);
    }
    onLoadingErrorSaveAction(state) { }
    savePreData(result) {
        console.log("result =", result);
        let data = result['prePostData'];
        data = data.replace(new RegExp('&#010;', 'g'), "\n");
        this.textMode = data;
        let text;
        text = document.getElementById("txtId");
        text.value = data;
        console.log("text mode value =", this.textMode);
        this._testConfig.setAddedActions(data, 'Pre');
    }
    selectFile(fileName) {
        if (this.valueOfCopyLink == 'source')
            this.source = fileName;
        else if (this.valueOfCopyLink == 'destination')
            this.destination = fileName;
        else if (this.valueOfCopyLink == 'removeFile')
            this.removeFile = fileName;
        else if (this.valueOfCopyLink == 'serverPath')
            this.serverPath = fileName;
        else if (this.valueOfCopyLink == 'netstormPath')
            this.netstormPath = fileName;
        this.openFileExplorerDialog = false;
    }
    onKeyTextMode(event) {
        let text;
        text = document.getElementById("txtId");
        this._testConfig.setAddedActions(text.value, 'Pre');
    }
    addAction(action) {
        console.log("add action method called ...", action['name']);
        if (action['name'] == '' || action['name'] == null || action['name'] == "" || action['name'] == 'Select Action') {
            alert("Please select action to be performed");
            return;
        }
        if (action['name'] !== 'SLEEP') {
            if (this.serverSelected['name'] == '' || this.serverSelected['name'] == null || this.serverSelected['name'] == "" || this.serverSelected['name'] == 'Select Server name') {
                alert("Please select server name");
                return;
            }
        }
        if (action['name'] == 'COPY_FILE') {
            if (this.source == null || this.source == "" || this.destination == null || this.destination == "") {
                alert("Source and destination path can not be empty");
                return;
            }
            if (!this.source.trim().startsWith("'"))
                this.source = "'" + this.source;
            if (!this.source.trim().endsWith("'"))
                this.source = this.source + "'";
            if (!this.destination.trim().startsWith("'"))
                this.destination = "'" + this.destination;
            if (!this.destination.trim().endsWith("'"))
                this.destination = this.destination + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Source: " + this.source + ", Destination: " + this.destination;
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Source": this.source,
                "Destination": this.destination
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            this._testConfig.setAddedActions(this.addedActionList, 'Pre');
            this.source = "";
            this.destination = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'START_COMMAND' || action['name'] == 'STOP_COMMAND') {
            if (this.startStopCommand == null || this.startStopCommand == "") {
                alert("Service string can not be empty");
                return;
            }
            if (!this.startStopCommand.trim().startsWith("'"))
                this.startStopCommand = "'" + this.startStopCommand;
            if (!this.startStopCommand.trim().endsWith("'"))
                this.startStopCommand = this.startStopCommand + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Service_string: " + this.startStopCommand;
            console.log("addedString in startStop = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Service_string": this.startStopCommand
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList startStopCommand = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Pre');
            this.startStopCommand = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'REMOVE_FILE') {
            console.log("action is = ", action);
            if (this.removeFile == null || this.removeFile == "") {
                alert("File path can not be empty");
                return;
            }
            if (!this.removeFile.trim().startsWith("'"))
                this.removeFile = "'" + this.removeFile;
            if (!this.removeFile.trim().endsWith("'"))
                this.removeFile = this.removeFile + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", File_path: " + this.removeFile;
            console.log("addedString in removeFile = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "File_path": this.removeFile
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList removeFile = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Pre');
            this.removeFile = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'SUDO_START_SERVICE' || action['name'] == 'SUDO_STOP_SERVICE') {
            console.log("action is = ", action);
            if (this.startStopServiceString == null || this.startStopServiceString == "") {
                alert("Service string can not be empty");
                return;
            }
            if (!this.startStopServiceString.trim().startsWith("'"))
                this.startStopServiceString = "'" + this.startStopServiceString;
            if (!this.startStopServiceString.trim().endsWith("'"))
                this.startStopServiceString = this.startStopServiceString + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Service string: " + this.startStopServiceString;
            console.log("addedString in startStopServiceSudo = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Service string": this.startStopServiceString
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList startStopService = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Pre');
            this.startStopServiceString = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'REMOTE_EXECUTION') {
            console.log("action is = ", action);
            if (this.remoteExecution == null || this.remoteExecution == "") {
                alert("Remote command can not be empty");
                return;
            }
            if (!this.remoteExecution.trim().startsWith("'"))
                this.remoteExecution = "'" + this.remoteExecution;
            if (!this.remoteExecution.trim().endsWith("'"))
                this.remoteExecution = this.remoteExecution + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Remote Command: " + this.remoteExecution;
            console.log("addedString in remoteExecution = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Remote Command": this.remoteExecution
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList remoteExecution = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Pre');
            this.remoteExecution = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'UPLOAD' || action['name'] == 'DOWNLOAD') {
            console.log("action is = ", action);
            if (this.serverPath == null || this.serverPath == "" || this.netstormPath == null || this.netstormPath == "") {
                alert("Server path and netstorm path can not be empty");
                return;
            }
            if (!this.serverPath.trim().startsWith("'"))
                this.serverPath = "'" + this.serverPath;
            if (!this.serverPath.trim().endsWith("'"))
                this.serverPath = this.serverPath + "'";
            if (!this.netstormPath.trim().startsWith("'"))
                this.netstormPath = "'" + this.netstormPath;
            if (!this.netstormPath.trim().endsWith("'"))
                this.netstormPath = this.netstormPath + "'";
            this.addedActionString = "";
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Server: " + this.serverSelected['name'] + ", Remote Path: " + this.serverPath + ", Local Path: " + this.netstormPath;
            console.log("addedString in uploadDownload = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Remote Path": this.serverPath,
                "Local Path": this.netstormPath
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList uploadDownload = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Pre');
            this.serverPath = "";
            this.netstormPath = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        else if (action['name'] == 'SLEEP') {
            console.log("action is = ", action);
            if (this.timeModel == null || this.timeModel == "") {
                alert("Server path and netstorm path can not be empty");
                return;
            }
            this.addedActionString = "Action: " + action['name'].toLowerCase() + ", Time: " + this.timeModel;
            console.log("addedString in sleep = ", this.addedActionString);
            let obj = {
                "Added actions for service": this.addedActionString,
                "Action": action['name'].toLowerCase(),
                "Server": this.serverSelected['name'],
                "Time Model": this.timeModel
            };
            if (this.editEntry) {
                if (this.addedActionList.length >= this.indexToEdit)
                    this.addedActionList[this.indexToEdit] = obj;
                this.editEntry = false;
            }
            else
                this.addedActionList.push(obj);
            console.log("addedActionList sleep = ", this.addedActionList);
            this._testConfig.setAddedActions(this.addedActionList, 'Pre');
            this.timeModel = "";
            this.serverSelected = "Select Server name";
            this.actionSelected = "Select Action";
        }
        if (this.addedActionList !== null && this.addedActionList.length > 5)
            this.showPaginator = true;
        else
            this.showPaginator = false;
    }
    onActionChange(action) {
        console.log("action selected = ", action['name']);
        if (action['name'] == 'Select Action') {
            this.serverSelected = { "name": "Select Server name" };
        }
        this.commandDescription = _constants_pre_post_constants__WEBPACK_IMPORTED_MODULE_4__["ACTION_DESCRIPTION"][action['name']];
        console.log("command description = ", this.commandDescription);
    }
    onServerChange(server) {
        console.log("server = ", server['name']);
    }
    openFileExplorer(value) {
        this.openFileExplorerDialog = true;
        this.valueOfCopyLink = value;
        if (value == 'source')
            this.fileManager.saveText = this.source;
        else if (value == 'destination')
            this.fileManager.saveText = this.destination;
        else if (value == 'removeFile')
            this.fileManager.saveText = this.removeFile;
        else if (value == 'serverPath')
            this.fileManager.saveText = this.serverPath;
        else if (value == 'netstormPath')
            this.fileManager.saveText = this.netstormPath;
        this.fileManager.open(true, false, "TESTSUITE");
    }
    editAction(index) {
        console.log("rowIndex in editAction = ", index);
        this.indexToEdit = index;
        this.editEntry = true;
        let obj = {};
        let row = this.addedActionList[index];
        console.log("row =", row);
        if (!this.aclMode) {
            return;
        }
        let arr = row['Added actions for service'].split(",");
        console.log("arr=", arr);
        for (let i = 0; i < arr.length; i++) {
            let val = arr[i].trim();
            console.log("val = ", val);
            if (val.startsWith("Action")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Action'] = res[1];
            }
            else if (val.startsWith("Server")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Server'] = res[1];
            }
            else if (val.startsWith("File_path")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['File_path'] = res[1].trim();
            }
            else if (val.startsWith("Source")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Source'] = res[1].trim();
            }
            else if (val.startsWith("Destination")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Destination'] = res[1].trim();
            }
            else if (val.startsWith("Service_string")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Service_string'] = res[1];
            }
            else if (val.startsWith("Sudo Command")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Sudo Command'] = res[1].trim();
            }
            else if (val.startsWith("Remote Command")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Remote Command'] = res[1].trim();
            }
            else if (val.startsWith("Remote Path")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Remote Path'] = res[1].trim();
            }
            else if (val.startsWith("Local Path")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Local Path'] = res[1].trim();
            }
            else if (val.startsWith("Service string")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Service string'] = res[1].trim();
            }
            else if (val.startsWith("Time")) {
                let res = val.split(/:(.*)/s);
                if (res.length > 1)
                    obj['Time Model'] = res[1].trim();
            }
        }
        console.log("obj =", obj);
        this.actionSelected = { "name": obj['Action'].trim().toUpperCase() };
        console.log("actionSelected =", this.actionSelected);
        this.commandDescription = _constants_pre_post_constants__WEBPACK_IMPORTED_MODULE_4__["ACTION_DESCRIPTION"][this.actionSelected['name']];
        this.serverSelected = { "name": "" };
        if (obj['Action'].trim() != 'sleep') {
            this.serverSelected = { "name": obj['Server'].trim() };
        }
        console.log("Action = ", obj['Action'].toUpperCase().trim() + ", Server: ", obj['Server']);
        if (obj['Action'].trim() == 'remove_file') {
            console.log("in remove file ...");
            this.removeFile = obj['File_path'];
        }
        else if (obj['Action'].trim() == 'copy_file') {
            console.log('in copy file ...');
            this.source = obj['Source'],
                this.destination = obj['Destination'];
        }
        else if (obj['Action'].trim() == 'start_command' || obj['Action'].trim() == 'stop_command') {
            console.log("in start stop command ...");
            this.startStopCommand = obj['Service_string'];
        }
        else if (obj['Action'].trim() == 'sudo_start_service' || obj['Action'].trim() == 'sudo_stop_service') {
            console.log("in start stop service ...");
            this.startStopServiceString = obj['Service string'];
        }
        else if (obj['Action'].trim() == 'remote_execution') {
            console.log("in remote execution ...");
            this.remoteExecution = obj['Remote Command'];
        }
        else if (obj['Action'].trim() == 'upload' || obj['Action'].trim() == 'download') {
            console.log("in upload download ...");
            this.serverPath = obj['Remote Path'];
            this.netstormPath = obj['Local Path'];
        }
        else if (obj['Action'].trim() == 'sleep') {
            this.timeModel = obj['Time Model'];
        }
    }
    deleteAction(index) {
        if (!this.aclMode) {
            return;
        }
        console.log("deleteAction called ...index =", index);
        this.addedActionList.splice(index, 1);
        console.log("after deleting array =", this.addedActionList);
        this._testConfig.setAddedActions(this.addedActionList, 'Pre');
    }
    getArrayForActionsToBeAdded(listOfAddedActionsPre) {
        try {
            console.log("listOfAddedActionsPre =", listOfAddedActionsPre);
            let finalData = [];
            if (listOfAddedActionsPre.length > 0) {
                console.log("list length =", listOfAddedActionsPre.length);
                for (let i = 0; i < listOfAddedActionsPre.length; i++) {
                    let obj = {};
                    let arr = listOfAddedActionsPre[i]['Added actions for service'].split(",");
                    console.log("arr=", arr);
                    for (let i = 0; i < arr.length; i++) {
                        let val = arr[i].trim();
                        console.log("val = ", val);
                        if (val.startsWith("Action")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Action'] = res[1].trim();
                        }
                        else if (val.startsWith("Server")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Server'] = res[1].trim();
                        }
                        else if (val.startsWith("File_path")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['File_path'] = res[1].trim();
                        }
                        else if (val.startsWith("Source")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Source'] = res[1].trim();
                        }
                        else if (val.startsWith("Destination")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Destination'] = res[1].trim();
                        }
                        else if (val.startsWith("Service_string")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Service_string'] = res[1].trim();
                        }
                        else if (val.startsWith("Sudo Command")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Sudo Command'] = res[1].trim();
                        }
                        else if (val.startsWith("Remote Command")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Remote Command'] = res[1].trim();
                        }
                        else if (val.startsWith("Remote Path")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Remote Path'] = res[1].trim();
                        }
                        else if (val.startsWith("Local Path")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Local Path'] = res[1].trim();
                        }
                        else if (val.startsWith("Service string")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Service string'] = res[1].trim();
                        }
                        else if (val.startsWith("Time")) {
                            let res = val.split(/:(.*)/s);
                            if (res.length > 1)
                                obj['Time Model'] = res[1].trim();
                        }
                    }
                    console.log("obj formed =", obj);
                    if (obj['Action'].trim() == 'copy_file') {
                        let addedString = obj['Action'].trim() + " " + obj['Server'] + " " + obj['Source'] + " " + obj['Destination'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'remove_file') {
                        let addedString = obj['Action'].trim() + " " + obj['Server'] + " " + obj['File_path'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'start_command' || obj['Action'].trim() == 'stop_command') {
                        let actionName = "";
                        if (obj['Action'].trim() == 'start_command') {
                            actionName = 'start_service';
                        }
                        else {
                            actionName = 'stop_service';
                        }
                        let addedString = actionName + " " + obj['Server'] + " " + obj['Service_string'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'sudo_start_service' || obj['Action'].trim() == 'sudo_stop_service') {
                        let addedString = obj['Action'].trim() + " " + obj['Server'] + " " + obj['Service string'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'remote_execution') {
                        let addedString = 'remote_exec' + " " + obj['Server'] + " " + obj['Remote Command'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'upload' || obj['Action'].trim() == 'download') {
                        let addedString = obj['Action'].trim() + '_file' + " " + obj['Server'] + " " + obj['Remote Path'] + " " + obj['Local Path'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'sleep') {
                        let addedString = obj['Action'].trim() + " " + obj['Time Model'];
                        finalData.push(addedString);
                    }
                    console.log("finalData =", finalData);
                }
            }
            else {
                finalData = [];
            }
            return finalData;
        }
        catch (e) {
            console.error(e);
        }
    }
    getPath(path) {
        switch (this.valueOfCopyLink) {
            case "source":
                this.source = path;
                break;
            case "destination":
                this.destination = path;
                break;
            case "removeFile":
                this.removeFile = path;
                break;
            case "serverPath":
                this.serverPath = path;
                break;
            case "netstormPath":
                this.netstormPath = path;
                break;
            default:
                alert("Wrong Selection");
                break;
        }
    }
    clickButtonEvent(event) {
        var _a, _b, _c, _d, _e, _f;
        try {
            if (((_b = (_a = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _a === void 0 ? void 0 : _a.actionConfig) === null || _b === void 0 ? void 0 : _b.action) == "deleteRow") {
                this.deleteAction((_c = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _c === void 0 ? void 0 : _c.rowIndex);
            }
            if (((_e = (_d = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _d === void 0 ? void 0 : _d.actionConfig) === null || _e === void 0 ? void 0 : _e.action) == "edit") {
                this.editAction((_f = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _f === void 0 ? void 0 : _f.rowIndex);
            }
        }
        catch (error) {
            console.error("Error in clickButtonEvent", error);
        }
    }
    ngOnDestroy() {
        if (this.dataSubscription != null)
            this.dataSubscription.unsubscribe();
        if (this.fileSubscription != null)
            this.fileSubscription.unsubscribe();
    }
};
PreTestScriptTabComponent.ctorParameters = () => [
    { type: _services_testsuite_http_service__WEBPACK_IMPORTED_MODULE_7__["TestsuiteHttpService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__["SessionService"] },
    { type: _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_5__["TestsuiteConfigService"] },
    { type: _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_6__["TestsuiteDataHandlerService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(src_app_shared_file_manager_file_manager_component__WEBPACK_IMPORTED_MODULE_3__["FileManagerComponent"], { read: src_app_shared_file_manager_file_manager_component__WEBPACK_IMPORTED_MODULE_3__["FileManagerComponent"] })
], PreTestScriptTabComponent.prototype, "fileManager", void 0);
PreTestScriptTabComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-pre-test-script-tab',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./pre-test-script-tab.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./pre-test-script-tab.component.scss */ "./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.component.scss")).default]
    })
], PreTestScriptTabComponent);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.module.ts":
/*!***********************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.module.ts ***!
  \***********************************************************************************************************************/
/*! exports provided: PreTestScriptTabModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreTestScriptTabModule", function() { return PreTestScriptTabModule; });
/* 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 src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/header/header.module */ "./src/app/shared/header/header.module.ts");
/* harmony import */ var primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js");
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
/* harmony import */ var primeng_card__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/card */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-card.js");
/* harmony import */ var primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js");
/* harmony import */ var primeng_dialog__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
/* harmony import */ var primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
/* harmony import */ var primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
/* harmony import */ var primeng_menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng/menu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menu.js");
/* harmony import */ var primeng_message__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/message */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-message.js");
/* harmony import */ var primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! primeng/multiselect */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
/* harmony import */ var primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js");
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _pre_test_script_tab_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./pre-test-script-tab.component */ "./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.component.ts");
/* harmony import */ var src_app_shared_file_manager_file_manager_module__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! src/app/shared/file-manager/file-manager.module */ "./src/app/shared/file-manager/file-manager.module.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");






















let PreTestScriptTabModule = class PreTestScriptTabModule {
};
PreTestScriptTabModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_pre_test_script_tab_component__WEBPACK_IMPORTED_MODULE_19__["PreTestScriptTabComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__["ToolbarModule"],
            src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__["HeaderModule"],
            primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__["InputTextModule"],
            primeng_button__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"],
            primeng_message__WEBPACK_IMPORTED_MODULE_12__["MessageModule"],
            primeng_dialog__WEBPACK_IMPORTED_MODULE_8__["DialogModule"],
            primeng_card__WEBPACK_IMPORTED_MODULE_6__["CardModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_17__["FormsModule"],
            primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__["DropdownModule"],
            primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__["CheckboxModule"],
            primeng_table__WEBPACK_IMPORTED_MODULE_14__["TableModule"],
            primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__["MultiSelectModule"],
            primeng_menu__WEBPACK_IMPORTED_MODULE_11__["MenuModule"],
            primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__["BreadcrumbModule"],
            primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__["TooltipModule"],
            primeng__WEBPACK_IMPORTED_MODULE_18__["SidebarModule"],
            src_app_shared_file_manager_file_manager_module__WEBPACK_IMPORTED_MODULE_20__["FileManagerModule"],
            primeng__WEBPACK_IMPORTED_MODULE_18__["SelectButtonModule"],
            primeng__WEBPACK_IMPORTED_MODULE_18__["InputTextareaModule"],
            src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_21__["CavTableModule"],
            primeng__WEBPACK_IMPORTED_MODULE_18__["SpinnerModule"]
        ],
        exports: [_pre_test_script_tab_component__WEBPACK_IMPORTED_MODULE_19__["PreTestScriptTabComponent"]]
    })
], PreTestScriptTabModule);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.component.scss":
/*!************************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.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-test-case-configuration .testPanel .ui-panel .ui-panel-titlebar {\n  padding: 5px 0 5px 8px;\n  background-color: var(--neutral-100);\n}\napp-test-case-configuration .pageLoading {\n  background-color: rgba(0, 0, 0, 0.3) !important;\n}\napp-test-case-configuration .test-case-configuration {\n  height: calc(100vh - 90px);\n  overflow: auto;\n}\napp-test-case-configuration .card-header.border-5.bottom-border.p-0 {\n  display: block;\n}\napp-test-case-configuration .dropdownwidth200 .ui-dropdown {\n  width: 200px;\n}\napp-test-case-configuration .dislabel {\n  display: inline-block;\n  position: absolute;\n  width: 65px;\n  left: -65px;\n  top: 30%;\n}\napp-test-case-configuration .action-btn {\n  border: none;\n  outline: none;\n  background-color: transparent;\n  cursor: pointer;\n}\napp-test-case-configuration .logs-panel {\n  line-height: 1.53322;\n  height: 200px;\n  overflow: auto;\n}\napp-test-case-configuration .mx-1em {\n  min-height: 200px;\n  max-height: 360px;\n  overflow: auto;\n}\napp-test-case-configuration .label-width {\n  width: 120px;\n  float: left;\n  line-height: 24px;\n}\napp-test-case-configuration .switch-label {\n  display: block;\n  float: left;\n  width: 50px;\n  line-height: 23px;\n}\napp-test-case-configuration .d-table {\n  display: table;\n  width: 100%;\n}\napp-test-case-configuration .d-table > .cell {\n  display: table-cell;\n  width: auto;\n  vertical-align: top;\n}\napp-test-case-configuration .d-table > .cell > button {\n  margin-bottom: 0.5em;\n  margin-left: 0.25em;\n  margin-right: 0.25em;\n}\napp-test-case-configuration .d-table > .cell:last-child {\n  display: table-cell;\n  width: 130px;\n}\napp-test-case-configuration .uploadbtn .ui-button {\n  padding: 0.1em 0.5em;\n  display: inline-flex;\n}\napp-test-case-configuration .scrollable {\n  max-height: calc(100vh - 180px);\n  overflow: auto;\n}\napp-test-case-configuration .drop {\n  margin-top: -17px;\n  margin-left: 24px;\n  height: 19px;\n  display: flex;\n  position: relative;\n  z-index: 99;\n  align-items: center;\n}\napp-test-case-configuration .normal-disable .ui-state-disabled {\n  opacity: 1 !important;\n}");

/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.component.ts":
/*!**********************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.component.ts ***!
  \**********************************************************************************************************************************/
/*! exports provided: TestCaseConfigurationComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestCaseConfigurationComponent", function() { return TestCaseConfigurationComponent; });
/* 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 _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../services/testsuite-config.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-config.service.ts");
/* harmony import */ var _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../services/testsuite-data-handler.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-data-handler.service.ts");
/* harmony import */ var _services_testsuite_http_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../services/testsuite-http.service */ "./src/app/pages/home/load-test/testsuite/services/testsuite-http.service.ts");
/* harmony import */ var _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../services/testsuite.state */ "./src/app/pages/home/load-test/testsuite/services/testsuite.state.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var _services_load_test_utils_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../services/load-test-utils.service */ "./src/app/pages/home/load-test/services/load-test-utils.service.ts");
/* harmony import */ var _containers_check_status_file__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../containers/check-status-file */ "./src/app/pages/home/load-test/testsuite/containers/check-status-file.ts");
/* harmony import */ var _containers_check_script_conf__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../containers/check-script-conf */ "./src/app/pages/home/load-test/testsuite/containers/check-script-conf.ts");
/* harmony import */ var _services_load_test_common_services__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../services/load-test-common.services */ "./src/app/pages/home/load-test/services/load-test-common.services.ts");
/* harmony import */ var src_app_pages_home_script_manager_services_script_utils_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/app/pages/home/script-manager/services/script-utils.service */ "./src/app/pages/home/script-manager/services/script-utils.service.ts");
/* harmony import */ var _cav_scen_open_cav_scen_open_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../cav-scen-open/cav-scen-open.component */ "./src/app/pages/home/load-test/cav-scen-open/cav-scen-open.component.ts");
/* harmony import */ var src_app_pages_scenario_service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! src/app/pages/scenario/service/scenario-utils.service */ "./src/app/pages/scenario/service/scenario-utils.service.ts");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
















let TestCaseConfigurationComponent = class TestCaseConfigurationComponent {
    constructor(loadTestUtilService, sessionService, _testConfig, http, dataHandler, testsuiteHTTPService, router, loadTestCommonService, scriptUtilService, _scenUtils) {
        this.loadTestUtilService = loadTestUtilService;
        this.sessionService = sessionService;
        this._testConfig = _testConfig;
        this.http = http;
        this.dataHandler = dataHandler;
        this.testsuiteHTTPService = testsuiteHTTPService;
        this.router = router;
        this.loadTestCommonService = loadTestCommonService;
        this.scriptUtilService = scriptUtilService;
        this._scenUtils = _scenUtils;
        this.checked1 = true;
        this.testCaseName = "";
        this.description = "";
        this.scenarioSelected = { name: "Select Test" };
        this.disableDropdown = false;
        this.selCheckProfiles = [];
        this.isCheckProfileList = true;
        this.addParameterDialog = false;
        this.paramName = "";
        this.parameter = "scenario";
        this.modeForIteration = "GUI";
        this.validationLetter = /^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/;
        this.tooltipTestCaseName = "\nValidation:\n1. Max length should not be more than 64 characters.\n2. First character should be an alphabet\n3. Other allowed characters are Alphabets(a-z)(A-Z),Numbers(0-9), Dash (-) and Underscore (_)";
        this.openScenTab = false;
        this.aclMode = true;
        this.permissionArray = [];
        this.customObj = {};
        this.projectSubproject = false;
        this.userLoginName = "";
        this.loader = false;
        this.mailBodyTable = [];
        this.emailDialogOpen = false;
        this.addEmail = true;
        this.editEmail = false;
        this.headerRelativePath = "testSuite/testCases/mail-configuration.json";
        this.userLoginName = this.sessionService.session.cctx.u;
    }
    ngOnInit() {
        this.cols1 = [
            { field: 'subject', header: 'Subject' },
            { field: 'to', header: 'To' },
            { field: 'cc', header: 'CC' },
            { field: 'bcc', header: 'BCC' },
            { field: 'mailBody', header: 'Mail Body' }
        ];
        this.aclMode = this._testConfig.$testCaseMode;
        console.log("acl Mode in ngOnInit =", this.aclMode);
        this.permissionArray = this._testConfig.$permission;
        this.modeForIteration = this._testConfig.$modeForIteration;
        this.mode = this._testConfig.getTestCaseMode();
        this._testConfig.setTestCaseData(new _containers_check_status_file__WEBPACK_IMPORTED_MODULE_9__["CheckStatusContainer"]);
        this._testConfig.setcheckScriptData(new _containers_check_script_conf__WEBPACK_IMPORTED_MODULE_10__["CheckScriptConf"]);
        this._testConfig.setAddedActions({}, "Pre");
        this._testConfig.setAddedActions({}, "Post");
        this.getTestCaseList();
        if (this.mode == 'Edit') {
            this.openInEditMode();
        }
        else {
            this.openInNewMode();
        }
        this._testConfig.$testCaseConfig = '/home/testConf';
        this.dataSubscription = this._testConfig.checkProfileDataObservable$.subscribe(action => {
            this.updateEventData(action);
        });
    }
    showEmailTable() {
        if (this._testConfig.$ccList !== "" || this._testConfig.$bccList !== "") {
            if (this._testConfig.$toList == "") {
                alert("Enter recipient's address in \"To\" field");
                return;
            }
        }
        let obj = {};
        obj['to'] = this._testConfig.$toList;
        obj['cc'] = this._testConfig.$ccList;
        obj['bcc'] = this._testConfig.$bccList;
        obj['mailBody'] = this._testConfig.$body;
        obj['subject'] = this._testConfig.$subject;
        if (this.mailBodyTable == undefined || this.mailBodyTable.length == null || this.mailBodyTable.length == undefined || this.mailBodyTable.length == 0)
            this.mailBodyTable.push(obj);
        else
            this.mailBodyTable[0] = obj;
        this.mailConfigTable = true;
        if (this._testConfig.$toList != null && this._testConfig.$toList != undefined && this._testConfig.$toList.length > 0)
            this.mailConfigTable = true;
        else
            this.mailConfigTable = false;
        this.emailDialogOpen = false;
        this.editEmail = true;
        this.addEmail = false;
    }
    updateEventData(action) {
        try {
            /* Checking for actions. */
            switch (action.action) {
                case 'SCENARIO_LIST':
                    {
                        let arr = action.data;
                        this._testConfig.$scenarioList = arr;
                        this.scenarioList = [];
                        this.scenarioList.push({ "name": "Select Test" });
                        for (let i = 0; i < arr.length; i++) {
                            let obj = { "name": arr[i] };
                            this.scenarioList.push(obj);
                        }
                        this.getSelectedScenario(this.scenarioSelected);
                        break;
                    }
                case 'CHECK_SCRIPT_FILE_DATA':
                    {
                        if (action.data) {
                            let checkScriptData = action.data;
                            this.setInitialValues(checkScriptData);
                        }
                        break;
                    }
                case 'CHECK_PROFILE_SELECTED':
                    {
                        if (action.data) {
                            let checkScriptData = action.data;
                            this.setInitialValues(checkScriptData);
                        }
                        break;
                    }
                case 'UPDATE_ITERATION_MODE':
                    {
                        this.modeForIteration = this._testConfig.$modeForIteration;
                    }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    setInitialValues(checkScriptData) {
        try {
            if (checkScriptData) {
                this.projectSubproject = checkScriptData.anotherProjSubProj;
                let selectedProjSubproj = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
                //checks if selected scenario has same project subproject as of the testcase
                if (selectedProjSubproj != this.scenarioSelected['name'].substring(0, this.scenarioSelected['name'].lastIndexOf("/"))) {
                    this.projectSubproject = true;
                }
                this.loader = true;
                if (this.projectSubproject) {
                    this.dataHandler.getScenarioList("");
                    this.getProjectListForCheckProfile();
                    let data = this._testConfig.getSelectedRowForTestCase();
                    this.selectedProjectCheckProfile = { 'name': data['Project'] };
                    this.selectedSubProjectCheckProfile = { 'name': data['Sub Project'] };
                }
                else
                    this.dataHandler.getScenarioList("-p " + this._testConfig.$projectSubProject);
                this.loader = false;
                this.selCheckProfiles = [];
                let profileData = [];
                if (checkScriptData.checkStatusBufferData != "")
                    profileData = checkScriptData.checkStatusBufferData.split("\n");
                if (profileData.length > 0) {
                    for (let i = 0; i < profileData.length; i++) {
                        if (profileData[i] == "") {
                            profileData.splice(i, 1);
                            continue;
                        }
                        if (this.projectSubproject == true && profileData[i].indexOf("/") != -1) {
                            let projsubproj = profileData[i].substring(0, profileData[i].lastIndexOf("/"));
                            if (projsubproj == (this.selectedProjectCheckProfile['name'] + "/" + this.selectedSubProjectCheckProfile['name'])) {
                                if (profileData[i].indexOf('.') == -1)
                                    this.selCheckProfiles.push(profileData[i].substring(profileData[i].lastIndexOf("/") + 1, profileData[i].length) + '.cprof');
                            }
                        }
                        else {
                            if (profileData[i].indexOf("/") != -1) {
                                if (profileData[i].indexOf('.') == -1)
                                    this.selCheckProfiles.push(profileData[i].substring(profileData[i].lastIndexOf("/") + 1, profileData[i].length) + '.cprof');
                            }
                            else {
                                if (profileData[i] != "" && profileData[i].indexOf('.') == -1)
                                    this.selCheckProfiles.push(profileData[i] + '.cprof');
                            }
                        }
                    }
                }
                this.loader = true;
                if (!this.projectSubproject)
                    this.getCheckProfileList(this.selectedProject, this.selectedSubProject);
                this.addCheckProfileInTable('0', profileData);
                this.loader = false;
                this.selCheckProfiles = [];
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    openScenarioInAdvance() {
        if (this.scenarioSelected['name'] == 'Select Test') {
            alert("Test is not selected");
            return;
        }
        if (this.openScenTab) {
            this.openScenTab = false;
        }
        else {
            this.openScenTab = true;
            let scenText;
            scenText = document.getElementById("txt");
        }
    }
    getCheckProfileList(project, subproject) {
        try {
            let selProject = project['name'];
            let selSubProject = subproject['name'];
            let param = '&projectSubProject=' + selProject + '/' + selSubProject;
            this.testsuiteHTTPService.getListOfCheckProf(param).subscribe((state) => {
                if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["GetListOfCheckProfLoadingState"]) {
                    this.onLoadingGetListOfCheckProf(state);
                    return;
                }
                if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["GetListOfCheckProfLoadedState"]) {
                    this.onLoadedGetListOfCheckProf(state);
                    return;
                }
            }, (state) => {
                this.onLoadingErrorGetListOfCheckProf(state);
            });
        }
        catch (e) {
            console.error(e);
        }
    }
    onLoadingGetListOfCheckProf(state) { }
    onLoadedGetListOfCheckProf(state) {
        this.getCheckProfList(state.data);
    }
    onLoadingErrorGetListOfCheckProf(state) { }
    getCheckProfList(data) {
        let chkProfileList = data;
        this.checkProfileList = [];
        for (let i = 0; i < chkProfileList.length; i++) {
            let profile = chkProfileList[i];
            if (chkProfileList[i].indexOf('.cprof') !== -1) {
                profile = chkProfileList[i].split('.cprof')[0];
            }
            if (profile.lastIndexOf("/") != -1) {
                profile = profile.substring(profile.lastIndexOf("/") + 1, profile.length);
                chkProfileList[i] = chkProfileList[i].substring(chkProfileList[i].lastIndexOf("/") + 1, chkProfileList[i].length);
            }
            let obj = { label: profile, value: chkProfileList[i] };
            this.checkProfileList.push(obj);
        }
    }
    addCheckProfileInTable(value, profileData) {
        try {
            console.log("selCheckProfiles : ", this.selCheckProfiles);
            if (value == '1' && !this.aclMode) {
                return;
            }
            if (this.scenarioSelected['name'] == 'Select Test') {
                return;
            }
            if (!this.projectSubproject && this.selCheckProfiles.length == 0) {
                return;
            }
            else {
                let profileList = "";
                /**profileData contains checkrofile name with project and subproject in case of another project subproj checkbox is selected and opening gui in edit mode*/
                if (profileData.length > 0) {
                    profileData = profileData.map(i => i + ".cprof");
                    profileList = profileData.join();
                }
                /** In case of selecting check profile and adding in table.*/
                else if (this.selCheckProfiles && this.selCheckProfiles.length > 0) {
                    let checkprofilewithsubproject = [];
                    for (let i = 0; i < this.selCheckProfiles.length; i++) {
                        let name = "";
                        if (this.projectSubproject) {
                            name = this.selectedProjectCheckProfile['name'] + "/" + this.selectedSubProjectCheckProfile['name'] + "/" + this.selCheckProfiles[i];
                            checkprofilewithsubproject.push(name);
                        }
                        else {
                            name = this.selectedProject['name'] + "/" + this.selectedSubProject['name'] + "/" + this.selCheckProfiles[i];
                            checkprofilewithsubproject.push(name);
                        }
                    }
                    profileList = checkprofilewithsubproject.join();
                }
                if (profileList != "") {
                    let selProject = this.selectedProject['name'];
                    let selSubProject = this.selectedSubProject['name'];
                    let param = '&projSubproject=' + selProject + '/' + selSubProject + '&chkProfileList=' + profileList;
                    this.testsuiteHTTPService.getSelChkProfile(param).subscribe((state) => {
                        if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["GetChkProfileLoadingState"]) {
                            this.onLoadingGetChkProfList(state);
                            return;
                        }
                        if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["GetChkProfileLoadedState"]) {
                            this.onLoadedGetChkProfList(state);
                            return;
                        }
                    }, (state) => {
                        this.onLoadingErrorGetChkProfList(state);
                    });
                }
                this.selCheckProfiles = [];
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onLoadingGetChkProfList(state) { }
    onLoadedGetChkProfList(state) {
        this.loadChkProfList(state.data);
    }
    onLoadingErrorGetChkProfList(state) {
    }
    loadChkProfList(data) {
        this._testConfig.checkProfileData(data);
    }
    openInNewMode() {
        try {
            this.disableDropdown = false;
            this._testConfig.$actualTestCaseName = "";
            this._testConfig.$toList = "";
            this._testConfig.$ccList = "";
            this._testConfig.$bccList = "";
            this._testConfig.getTestCaseData().preTestBufferData = "";
            this._testConfig.getTestCaseData().postTestBufferData = "";
            this._testConfig.setAddedActions({}, "Pre");
            this._testConfig.setAddedActions({}, "Post");
            this.getListOfProjSubproj("");
            this.dataHandler.getMailSMSSetting();
        }
        catch (e) {
            console.error(e);
        }
    }
    openInEditMode() {
        try {
            this.disableDropdown = true;
            let data = this._testConfig.getSelectedRowForTestCase();
            this.project = [];
            this.subproject = [];
            this._testConfig.$toList = "";
            this._testConfig.$ccList = "";
            this._testConfig.$bccList = "";
            this.selectedProject = { "name": data['Project'] };
            this.selectedSubProject = { "name": data['Sub Project'] };
            this.project.push(this.selectedProject);
            this.subproject.push(this.selectedSubProject);
            this.testCaseName = data['Test Case'];
            this.description = data['Description'];
            this.scenarioSelected = { "name": data['Scenario'] };
            console.log("scenarioSelected in edit mode :", this.scenarioSelected);
            this._testConfig.$actualTestCaseName = this.testCaseName;
            this._testConfig.$projectSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
            let testCaseData = this._testConfig.getTestCaseData();
            testCaseData.scenarioProSubProject = this._testConfig.$projectSubProject;
            this.loader = true;
            this.getListOfProjSubproj("checkboxClick");
            this.dataHandler.getSavedIterations(this.selectedProject['name'], this.selectedSubProject['name'], this.testCaseName);
            this.dataHandler.getSavedPrePostList(this.selectedProject['name'], this.selectedSubProject['name'], this.testCaseName);
            this.dataHandler.getCheckScriptData(this.selectedProject['name'], this.selectedSubProject['name'], this.testCaseName);
            this.dataHandler.getSavedMailConfiguration(this.selectedProject['name'], this.selectedSubProject['name'], this.testCaseName).then((res) => {
                this.dataHandler.getMailSMSSetting();
                if (this._testConfig.$toList !== "")
                    this.showEmailTable();
                this.loader = false;
            });
        }
        catch (e) {
            console.error(e);
        }
    }
    getListOfProjSubproj(isCheckboxCall) {
        this.testsuiteHTTPService.getProjList(this.userLoginName).subscribe((state) => {
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["GetProjListLoadingState"]) {
                this.onLoadingGetProjList(state);
                return;
            }
            if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["GetProjListLoadedState"]) {
                this.onLoadedGetProjList(state, isCheckboxCall);
                return;
            }
        }, (state) => {
            this.onLoadingErrorGetProjList(state);
        });
    }
    onLoadingGetProjList(state) { }
    onLoadingErrorGetProjList(state) { }
    onLoadedGetProjList(state, isCheckBoxCall) {
        this.setProjectList(state.data, isCheckBoxCall);
    }
    setProjectList(response, isCheckboxCall) {
        if (response) {
            this.projectSubProjectList = response;
            if (isCheckboxCall == "checkboxClick")
                this.getProjectListForCheckProfile();
            else
                this.getProjectList();
        }
        else {
            this.project = [];
            this.subproject = [];
        }
    }
    getProjectList() {
        try {
            this.project = [];
            this.subproject = [];
            if (this.permissionArray && this.permissionArray.length > 0) {
                for (let i = 0; i < this.permissionArray.length; i++) {
                    let arr = [];
                    if (this.project && this.project.length > 0 && this.project.some(proj => proj.name === this.permissionArray[i]['project'])) {
                        if (this.permissionArray[i]['Permission'] !== '4') {
                            arr = this.customObj[this.permissionArray[i]['project']];
                            arr.push({ name: this.permissionArray[i]['subproject'] });
                            this.customObj[this.permissionArray[i]['project']] = arr;
                        }
                    }
                    else if (this.permissionArray[i]['Permission'] !== '4') {
                        this.project.push({ name: this.permissionArray[i]['project'] });
                        arr.push({ name: this.permissionArray[i]['subproject'] });
                        this.customObj[this.permissionArray[i]['project']] = arr;
                    }
                }
                if (this.project.some(proj => proj.name === 'default')) {
                    this.selectedProject = { "name": "default" };
                }
                else {
                    this.selectedProject = this.project[0];
                }
            }
            else if (this.projectSubProjectList) {
                this._testConfig.setProjSubprojList(this.projectSubProjectList);
                let arr = Object.keys(this.projectSubProjectList);
                for (let i = 0; i < arr.length; i++) {
                    this.project.push({ "name": arr[i] });
                }
                if (arr.includes('default')) {
                    this.selectedProject = { "name": "default" };
                }
                else {
                    this.selectedProject = this.project[0];
                }
            }
            this.getSubProjectList(this.selectedProject);
            this.getProjectListForCheckProfile();
            this.scenarioSelected = { name: "Select Test" };
        }
        catch (e) {
            console.error(e);
        }
    }
    getProjectListForCheckProfile() {
        try {
            this.projectCheckProfile = [];
            this.subprojectCheckProfile = [];
            if (this.permissionArray && this.permissionArray.length > 0) {
                for (let i = 0; i < this.permissionArray.length; i++) {
                    let arr = [];
                    if (this.projectCheckProfile && this.projectCheckProfile.length > 0 && this.projectCheckProfile.some(proj => proj.name === this.permissionArray[i]['project'])) {
                        if (this.permissionArray[i]['Permission'] !== '4') {
                            arr = this.customObj[this.permissionArray[i]['project']];
                            arr.push({ name: this.permissionArray[i]['subproject'] });
                            this.customObj[this.permissionArray[i]['project']] = arr;
                        }
                    }
                    else if (this.permissionArray[i]['Permission'] !== '4') {
                        this.projectCheckProfile.push({ name: this.permissionArray[i]['project'] });
                        arr.push({ name: this.permissionArray[i]['subproject'] });
                        this.customObj[this.permissionArray[i]['project']] = arr;
                    }
                }
                if (this.projectCheckProfile.some(proj => proj.name === 'default')) {
                    this.selectedProjectCheckProfile = { "name": "default" };
                }
                else {
                    this.selectedProjectCheckProfile = this.projectCheckProfile[0];
                }
            }
            else if (this.projectSubProjectList) {
                let arr = Object.keys(this.projectSubProjectList);
                for (let i = 0; i < arr.length; i++) {
                    this.projectCheckProfile.push({ "name": arr[i] });
                }
                if (arr.includes('default')) {
                    this.selectedProjectCheckProfile = { "name": "default" };
                }
                else {
                    this.selectedProjectCheckProfile = this.projectCheckProfile[0];
                }
            }
            this.getSubProjectListCheckProfile();
        }
        catch (e) {
            console.error(e);
        }
    }
    getSubProjectListCheckProfile() {
        try {
            if (this.permissionArray && this.permissionArray.length > 0) {
                this.subprojectCheckProfile = this.customObj[this.selectedProjectCheckProfile['name']];
            }
            else {
                let obj = this._testConfig.getProjSubprojList();
                let arr = obj[this.selectedProjectCheckProfile['name']];
                this.subprojectCheckProfile = [];
                for (let i = 0; i < arr.length; i++) {
                    this.subprojectCheckProfile.push({ "name": arr[i] });
                }
            }
            this.selectedSubProjectCheckProfile = this.subprojectCheckProfile[0];
            this.getCheckProfileList(this.selectedProjectCheckProfile, this.selectedSubProjectCheckProfile);
        }
        catch (e) {
        }
    }
    onSubProjectClickCheckProf() {
        try {
            this.getCheckProfileList(this.selectedProjectCheckProfile, this.selectedSubProjectCheckProfile);
        }
        catch (e) {
            console.error(e);
        }
    }
    getSubProjectList(projectName) {
        try {
            if (this.permissionArray && this.permissionArray.length > 0) {
                this.subproject = this.customObj[projectName['name']];
            }
            else {
                let obj = this._testConfig.getProjSubprojList();
                let arr = obj[projectName['name']];
                this.subproject = [];
                for (let i = 0; i < arr.length; i++) {
                    this.subproject.push({ "name": arr[i] });
                }
            }
            this.selectedSubProject = this.subproject[0];
            let testCaseObj = {};
            testCaseObj['Project'] = this.selectedProject['name'];
            testCaseObj['Sub Project'] = this.selectedSubProject['name'];
            testCaseObj['Test Case'] = this.testCaseName;
            testCaseObj['Description'] = this.description;
            testCaseObj['Scenario'] = this.scenarioSelected['name'];
            this.loader = true;
            this._testConfig.setSelectedRowForTestCase(testCaseObj);
            this.dataHandler.getScenarioList("-p " + this.selectedProject['name'] + "/" + this.selectedSubProject['name']);
            this.loader = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    onSubProjectClick() {
        try {
            let testCaseObj = {};
            testCaseObj['Project'] = this.selectedProject['name'];
            testCaseObj['Sub Project'] = this.selectedSubProject['name'];
            testCaseObj['Test Case'] = this.testCaseName;
            testCaseObj['Description'] = this.description;
            testCaseObj['Scenario'] = this.scenarioSelected['name'];
            this._testConfig.setSelectedRowForTestCase(testCaseObj);
            if (this.projectSubproject)
                this.loader = true;
            this.dataHandler.getScenarioList("-p " + this.selectedProject['name'] + "/" + this.selectedSubProject['name']);
            this.loader = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    onKeyTestCase(event) {
        try {
            let testCaseObj = {};
            testCaseObj['Project'] = this.selectedProject['name'];
            testCaseObj['Sub Project'] = this.selectedSubProject['name'];
            testCaseObj['Test Case'] = this.testCaseName;
            testCaseObj['Description'] = this.description;
            testCaseObj['Scenario'] = this.scenarioSelected['name'];
            this._testConfig.setSelectedRowForTestCase(testCaseObj);
        }
        catch (e) {
            console.error(e);
        }
    }
    onKeyTestDescription(event) {
        try {
            let testCaseObj = {};
            testCaseObj['Project'] = this.selectedProject['name'];
            testCaseObj['Sub Project'] = this.selectedSubProject['name'];
            testCaseObj['Test Case'] = this.testCaseName;
            testCaseObj['Description'] = this.description;
            testCaseObj['Scenario'] = this.scenarioSelected['name'];
            this._testConfig.setSelectedRowForTestCase(testCaseObj);
        }
        catch (e) {
            console.error(e);
        }
    }
    getSelectedScenario(scenarioName) {
        try {
            if (scenarioName['name'] === "Select Test" || scenarioName['name'] === "" || scenarioName['name'] === null || scenarioName['name'] === undefined) {
                this.text = "";
                this.isCheckProfileList = true;
            }
            else {
                this.isCheckProfileList = false;
                let param = "&path=" + scenarioName['name'] + ".conf&keyword=NA";
                this.testsuiteHTTPService.GetLogs(param).subscribe((state) => {
                    if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["GetLogsLoadingState"]) {
                        this.onLoadingGetLogs(state);
                        return;
                    }
                    if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["GetLogsLoadedState"]) {
                        this.onLoadedGetLogs(state);
                        return;
                    }
                }, (state) => {
                    this.onLoadingErrorGetLogs(state);
                });
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onLoadingGetLogs(state) { }
    onLoadedGetLogs(state) {
        this.getScenarioData(state.data);
    }
    onLoadingErrorGetLogs(state) { }
    getScenarioData(response) {
        let data = response;
        this.loadScen(data);
        let testCaseObj = {};
        testCaseObj['Project'] = this.selectedProject['name'];
        testCaseObj['Sub Project'] = this.selectedSubProject['name'];
        testCaseObj['Test Case'] = this.testCaseName;
        testCaseObj['Description'] = this.description;
        testCaseObj['Scenario'] = this.scenarioSelected['name'];
        this._testConfig.setSelectedRowForTestCase(testCaseObj);
        if (this.scenarioSelected['name'] !== 'Select Test') {
            let index = this.scenarioSelected['name'].lastIndexOf("/");
            let scenName = this.scenarioSelected['name'].substring(index + 1, this.scenarioSelected['name'].length);
            this._testConfig.getTestCaseData().scenarioName = scenName;
        }
    }
    openScenario(scenarioName) {
        try {
            if (this.scenarioSelected['name'] == 'Select Test') {
                alert('Please select scenario.');
                return;
            }
            this.loadTestCommonService.$fromTestCase = "/home/load-test/test-case/test-case-list/test-config";
            let isBrowserTab = Number(localStorage.getItem('isBrowserTab'));
            /* setting all values for opening scenario to be used in openScenarioInNewTab method */
            let values = scenarioName['name'].split("/");
            console.log("value : ", values);
            this.cavScenOpen.scenObj['isUserReadOnly'] = false;
            this.cavScenOpen.scenObj['rowData'] = { project: values[0], subproject: values[1], scenario: values[2] };
            this.cavScenOpen.scenObj['scenarioName'] = `${values[0]}/${values[1]}/${values[2]}`;
            this.cavScenOpen.scenObj['scenMode'] = "0";
            this.cavScenOpen.isScenOpen();
        }
        catch (e) {
            console.error(e);
        }
    }
    saveConfiguration(scenario) {
        if (this.testCaseName == "") {
            alert("Please fill the testcase Name.");
            return;
        }
        else if (!this.testCaseName.match(this.validationLetter)) {
            alert("Test case name is not valid.\nMax length should not be more than 64 characters\nFirst character should be an alphabet\nOther allowed characters are Numbers(0-9), Dash (-) and Underscore (_)");
            return;
        }
        if (!this.selectedProject || this.selectedProject == "" || !this.selectedSubProject || this.selectedSubProject == "") {
            alert("Please select project and subproject.");
            return;
        }
        if (this.description == "") {
            alert("Please fill the testcase description.");
            return;
        }
        if (this.scenarioSelected['name'] == 'Select Test') {
            alert('Please select scenario name.');
            return;
        }
        if (this.mode != 'Edit') {
            let overriteTestCase = this.matchTestCaseNameAlreadyExists();
            if (overriteTestCase == false) {
                return;
            }
        }
        let index = scenario['name'].lastIndexOf("/");
        let scenProjSubProj = scenario['name'].substring(0, index);
        let scenName = scenario['name'].substring(index + 1, scenario['name'].length);
        let actualtestcaseName = "";
        if (this._testConfig.$actualTestCaseName == "") {
            actualtestcaseName = this.testCaseName;
        }
        else {
            actualtestcaseName = this._testConfig.$actualTestCaseName;
        }
        let checkScriptData = this._testConfig.getcheckScriptData();
        console.log("base line check :: ", checkScriptData.baselineCheckBox);
        if (checkScriptData.baselineCheckBox) {
            if (checkScriptData.baselineScenario == "Select Test") {
                alert('Compare with Baseline option is selected but test run for Baseline is not selected');
                return;
            }
            else if (checkScriptData.baselineTestRun == "Select TestRun") {
                alert('Compare with Baseline option is selected but test run for Baseline is not selected');
                return;
            }
            else if (checkScriptData.baselineMSR == "") {
                alert('Measurement name for baseline1 cannot be blank');
                return;
            }
        }
        console.log("check box :: ", checkScriptData.InitialCheckBox);
        if (checkScriptData.InitialCheckBox) {
            if (checkScriptData.InitialScenario == "Select Test") {
                alert('Please select scenario.');
                return;
            }
            else if (checkScriptData.InitialTestRun == "Select TestRun") {
                alert('Please select Test Run.');
                return;
            }
            else if (checkScriptData.initialMSR == "") {
                alert('Measurement name for baseline2 cannot be blank');
                return;
            }
        }
        if (checkScriptData.previousCheckBox) {
            if (checkScriptData.previousScenario == "Select Test") {
                alert('Please select scenario.');
                return;
            }
            else if (checkScriptData.previousTestRun == "Select TestRun") {
                alert('Please select Test Run.');
                return;
            }
            else if (checkScriptData.previousMSR == "") {
                alert('Measurement name for baseline3 cannot be blank');
                return;
            }
        }
        if (checkScriptData.overallSlaCheckBox && (checkScriptData.overallSlaDropDown == "Select TestRun")) {
            alert('Please select testrun to overrite Sla.');
            return;
        }
        if (checkScriptData.warningThreshold == "") {
            alert('Threshold value to highlight metric as green cannot be empty.');
            return;
        }
        else if (checkScriptData.criticalThreshold == "") {
            alert('Threshold value to highlight metric as yellow cannot be empty.');
            return;
        }
        else if (checkScriptData.overallFailCriteria == "") {
            alert('Threshold value to make overall test fail cannot be empty');
        }
        if (isNaN(parseFloat(checkScriptData.warningThreshold))) {
            alert('Threshold value to highlight metric as green should be an integer.');
            return;
        }
        else if (isNaN(parseFloat(checkScriptData.criticalThreshold))) {
            alert('Threshold value to highlight metric as yellow should be an integer.');
            return;
        }
        else if (parseFloat(checkScriptData.warningThreshold) < 0) {
            alert('Threshold value to highlight metric as green can not be less than 0.');
            return;
        }
        else if (parseFloat(checkScriptData.criticalThreshold) < 0) {
            alert('Threshold value to highlight metric as yellow can not be less than 0.');
            return;
        }
        else if (parseFloat(checkScriptData.criticalThreshold) < parseFloat(checkScriptData.warningThreshold)) {
            alert('Green threshold value can not be greater than yellow threshold value.');
            return;
        }
        else if (checkScriptData.overallFailCriteria == "") {
            alert('Overall Fail criteria can not be empty.');
            return;
        }
        else if (isNaN(parseInt(checkScriptData.overallFailCriteria))) {
            alert('Fail criteria should be integer value.');
            return;
        }
        if (parseFloat(checkScriptData.warningThreshold) > 100 || parseFloat(checkScriptData.criticalThreshold) > 100 || parseInt(checkScriptData.overallFailCriteria) > 100) {
            alert("Threshold value can not be greater than 100");
            return;
        }
        let chekcStatusData = this._testConfig.getTestCaseData();
        chekcStatusData.scenarioName = scenName;
        chekcStatusData.scenarioProSubProject = scenProjSubProj;
        chekcStatusData.scenarioConfFileData = this.text;
        chekcStatusData.scenarioDescription = this.description;
        let testCaseData = chekcStatusData;
        testCaseData.scenarioDescription = this.description;
        testCaseData.runPostCheckScriptOnFail = +checkScriptData.runPostScript + "";
        testCaseData.durationPhase = +checkScriptData.durationPhas + "";
        /* to save mail configuration */
        testCaseData.mailTo = this._testConfig.$toList;
        testCaseData.mailCc = this._testConfig.$ccList;
        testCaseData.mailBcc = this._testConfig.$bccList;
        testCaseData.mailSubject = this._testConfig.$subject;
        testCaseData.mailBody = this._testConfig.$body;
        testCaseData.isMailEnabled = this._testConfig.$isMailEnabled;
        if (checkScriptData.previousCheckBox) {
            testCaseData.previousTestRun = checkScriptData.previousTestRun;
            testCaseData.previousMSR = checkScriptData.previousMSR;
            testCaseData.scenNamePrevious = checkScriptData.previousScenario;
        }
        else {
            testCaseData.previousTestRun = "-1";
            testCaseData.previousMSR = "";
            testCaseData.scenNamePrevious = "";
        }
        testCaseData.normalThreshold = checkScriptData.warningThreshold;
        testCaseData.criticalThreshold = checkScriptData.criticalThreshold;
        testCaseData.worningThreshold = checkScriptData.warningThreshold + "-" + checkScriptData.criticalThreshold;
        testCaseData.serverPath = "NA";
        testCaseData.serverName = "NA";
        testCaseData.releaseVersion = "NA";
        if (checkScriptData.baselineCheckBox) {
            testCaseData.baseLineTestRun = checkScriptData.baselineTestRun;
            testCaseData.scenNameIs = checkScriptData.baselineScenario;
            testCaseData.baselineMSR = checkScriptData.baselineMSR;
        }
        else {
            testCaseData.baseLineTestRun = "-1";
            testCaseData.scenNameIs = "";
            testCaseData.baselineMSR = "";
        }
        if (checkScriptData.InitialCheckBox) {
            testCaseData.initialTestRun = checkScriptData.InitialTestRun;
            testCaseData.scenNameIntial = checkScriptData.InitialScenario;
            testCaseData.initialMSR = checkScriptData.initialMSR;
        }
        else {
            testCaseData.initialTestRun = "-1";
            testCaseData.scenNameIntial = "";
            testCaseData.initialMSR = "";
        }
        testCaseData.successCol = +checkScriptData.sucessTransaction + "";
        if (checkScriptData.overallSlaCheckBox) {
            if (checkScriptData.overallSlaDropDown.trim() == "Baseline1 TR") {
                if (!checkScriptData.baselineCheckBox) {
                    alert('Please select baseline1 scenario and test run.');
                    return;
                }
                else {
                    testCaseData.slaVal = '1';
                }
            }
            else if (checkScriptData.overallSlaDropDown.trim() == "Baseline2 TR") {
                if (!checkScriptData.InitialCheckBox) {
                    alert('Please select baseline2 scenario and test run.');
                    return;
                }
                else {
                    testCaseData.slaVal = '2';
                }
            }
            else if (checkScriptData.overallSlaDropDown.trim() == "Baseline3 TR") {
                if (!checkScriptData.previousCheckBox) {
                    alert('Please select baseline3 scenario and test run.');
                    return;
                }
                else {
                    testCaseData.slaVal = '3';
                }
            }
        }
        else {
            testCaseData.slaVal = '0';
        }
        testCaseData.range = "1";
        testCaseData.unexecuted = +checkScriptData.UnexecutedTrans + "";
        testCaseData.transCount = +checkScriptData.transCount + "";
        testCaseData.failCriteria = checkScriptData.overallFailCriteria;
        if (checkScriptData.criticalOf.trim() == 'All (Current and Baselines)')
            testCaseData.failValue = "0";
        else if (checkScriptData.criticalOf.trim() == 'Current')
            testCaseData.failValue = "1";
        else if (checkScriptData.criticalOf.trim() == 'Baseline1') {
            if (!checkScriptData.baselineCheckBox) {
                alert('Please select baseline1 Test Run.');
                return;
            }
            else {
                testCaseData.failValue = "2";
            }
        }
        else if (checkScriptData.criticalOf.trim() == 'Baseline2') {
            if (!checkScriptData.InitialCheckBox) {
                alert('Please select baseline2 Test Run.');
                return;
            }
            else {
                testCaseData.failValue = "3";
            }
        }
        else if (checkScriptData.criticalOf.trim() == 'Baseline3') {
            if (!checkScriptData.InitialCheckBox) {
                alert('Please select baseline2 Test Run.');
                return;
            }
            else {
                testCaseData.failValue = "3";
            }
        }
        testCaseData.trendTr = "NA";
        testCaseData.trendDateTime = "NA";
        testCaseData.trendEnviornmentName = "NA";
        testCaseData.anotherProjSubProj = this.projectSubproject;
        this.loader = true;
        this._testConfig.$projectSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
        let listOfAddedActionsPre = this._testConfig.getAddedActions('Pre');
        this.saveAddedActionListPre('Pre');
        this.saveAddedActionListPre('Post');
        console.log("pre action data", testCaseData.preTestBufferData);
        console.log("post action data", testCaseData.postTestBufferData);
        this.loader = false;
    }
    saveScenario(scenario) {
        try {
            if (this.testCaseName == "") {
                alert("Please fill the testcase Name.");
                return;
            }
            else if (!this.testCaseName.match(this.validationLetter)) {
                alert("Test case name is not valid.\nMax length should not be more than 64 characters\nFirst character should be an alphabet\nOther allowed characters are Numbers(0-9), Dash (-) and Underscore (_)");
                return;
            }
            if (!this.selectedProject || this.selectedProject == "" || !this.selectedSubProject || this.selectedSubProject == "") {
                alert("Please select project and subproject.");
                return;
            }
            if (this.description == "") {
                alert("Please fill the testcase description.");
                return;
            }
            if (this.scenarioSelected['name'] == 'Select Test') {
                alert('Please select scenario name.');
                return;
            }
            if (this.mode != 'Edit') {
                let overriteTestCase = this.matchTestCaseNameAlreadyExists();
                if (overriteTestCase == false) {
                    return;
                }
            }
            let index = scenario['name'].lastIndexOf("/");
            let scenProjSubProj = scenario['name'].substring(0, index);
            let scenName = scenario['name'].substring(index + 1, scenario['name'].length);
            let actualtestcaseName = "";
            if (this._testConfig.$actualTestCaseName == "") {
                actualtestcaseName = this.testCaseName;
            }
            else {
                actualtestcaseName = this._testConfig.$actualTestCaseName;
            }
            let chekcStatusData = this._testConfig.getTestCaseData();
            chekcStatusData.scenarioName = scenName;
            chekcStatusData.scenarioProSubProject = scenProjSubProj;
            chekcStatusData.scenarioConfFileData = this.text;
            chekcStatusData.scenarioDescription = this.description;
            /* to save mail configuration */
            chekcStatusData.mailSubject = this._testConfig.$subject;
            chekcStatusData.mailTo = this._testConfig.$toList;
            chekcStatusData.mailCc = this._testConfig.$ccList;
            chekcStatusData.mailBcc = this._testConfig.$bccList;
            chekcStatusData.mailBody = this._testConfig.$body;
            chekcStatusData.isMailEnabled = this._testConfig.$isMailEnabled;
            chekcStatusData.anotherProjSubProj = this.projectSubproject;
            this.loader = true;
            this._testConfig.$projectSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
            this.loader = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    changeScenario(scenarioName) {
        try {
            this.getSelectedScenario(scenarioName);
            this.getCheckProfileList(this.selectedProject, this.selectedSubProject);
        }
        catch (e) {
            console.error(e);
        }
    }
    loadScen(data) {
        try {
            this.text = data.join("\n");
            this._testConfig.getTestCaseData().scenarioConfFileData = this.text;
        }
        catch (e) {
            console.error(e);
        }
    }
    getArrayForActionsToBeAdded(listOfAddedActionsPre) {
        try {
            let finalData = [];
            if (listOfAddedActionsPre.length > 0) {
                for (let i = 0; i < listOfAddedActionsPre.length; i++) {
                    let obj = {};
                    let arr = listOfAddedActionsPre[i]['Added actions for service'].split(",");
                    for (let i = 0; i < arr.length; i++) {
                        let val = arr[i].trim();
                        if (val.startsWith("Action")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['Action'] = res[1];
                        }
                        else if (val.startsWith("Server")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['Server'] = res[1];
                        }
                        else if (val.startsWith("File_path")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['File_path'] = res[1];
                        }
                        else if (val.startsWith("Source")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['Source'] = res[1];
                        }
                        else if (val.startsWith("Destination")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['Destination'] = res[1];
                        }
                        else if (val.startsWith("Service_string")) {
                            let idx = val.indexOf(":");
                            let res = val.substring(idx + 1);
                            if (res)
                                obj['Service_string'] = res;
                        }
                        else if (val.startsWith("Sudo Command")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['Sudo Command'] = res[1];
                        }
                        else if (val.startsWith("Remote Command")) {
                            let res = val.split(":");
                            if (res.length > 1) {
                                let cmd = "";
                                for (let i = 1; i < res.length; i++) {
                                    if (i == 1)
                                        cmd = res[i];
                                    else
                                        cmd += ":" + res[i];
                                }
                                obj['Remote Command'] = cmd;
                            }
                        }
                        else if (val.startsWith("Remote Path")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['Remote Path'] = res[1];
                        }
                        else if (val.startsWith("Local Path")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['Local Path'] = res[1];
                        }
                        else if (val.startsWith("Service string")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['Service string'] = res[1];
                        }
                        else if (val.startsWith("Time")) {
                            let res = val.split(":");
                            if (res.length > 1)
                                obj['Time Model'] = res[1];
                        }
                    }
                    if (obj['Action'].trim() == 'copy_file') {
                        let addedString = obj['Action'].trim() + obj['Server'] + obj['Source'] + obj['Destination'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'remove_file') {
                        let addedString = obj['Action'].trim() + obj['Server'] + obj['File_path'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'start_command' || obj['Action'].trim() == 'stop_command') {
                        let actionName = "";
                        if (obj['Action'].trim() == 'start_command') {
                            actionName = 'start_service';
                        }
                        else {
                            actionName = 'stop_service';
                        }
                        let addedString = actionName + obj['Server'] + obj['Service_string'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'sudo_start_service' || obj['Action'].trim() == 'sudo_stop_service') {
                        let addedString = obj['Action'].trim() + obj['Server'] + obj['Service string'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'remote_execution') {
                        let addedString = 'remote_exec' + obj['Server'] + obj['Remote Command'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'upload' || obj['Action'].trim() == 'download') {
                        let addedString = obj['Action'].trim() + '_file' + obj['Server'] + obj['Remote Path'] + obj['Local Path'];
                        finalData.push(addedString);
                    }
                    else if (obj['Action'].trim() == 'sleep') {
                        let addedString = obj['Action'].trim() + obj['Time Model'];
                        finalData.push(addedString);
                    }
                }
            }
            else {
                finalData = [];
            }
            return finalData;
        }
        catch (e) {
            console.error(e);
        }
    }
    saveAddedActionListPre(mode) {
        try {
            console.log("listOfAddedActionsPre=", this._testConfig.getAddedActions(mode));
            if (mode == 'Pre') {
                if (!this.aclMode) {
                    return;
                }
            }
            else {
                if (!this.aclMode) {
                    return;
                }
            }
            let editMode = "";
            if (mode == 'Pre')
                editMode = this._testConfig.$preEditMode;
            else if (mode == 'Post')
                editMode = this._testConfig.$postEditMode;
            let listOfAddedActionsPre = this._testConfig.getAddedActions(mode);
            console.log("list of added actions", listOfAddedActionsPre);
            if (this.mode != 'Edit') {
                let overriteTestCase = this.matchTestCaseNameAlreadyExists();
                if (overriteTestCase == false) {
                    return;
                }
            }
            /* Making json object for post request for saving actions in file */
            if (editMode == "Advance") {
                /* Saving data from advance mode */
                /* Making actionList param */
                let arr = this.getArrayForActionsToBeAdded(listOfAddedActionsPre);
                /* Getting selected project/subproject */
                let projSubproj = "";
                if ((this.selectedProject['name'] !== null || this.selectedProject['name'] !== "" || this.selectedProject['name'] !== undefined) && (this.selectedSubProject['name'] !== null || this.selectedSubProject['name'] !== "" || this.selectedSubProject['name'] !== undefined)) {
                    projSubproj = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
                }
                else {
                    alert("Please select project and sub project values");
                    return;
                }
                /* Making post request for saving final actions for pre-post */
                let requestJsonParm = {
                    actionList: arr,
                    mode: mode,
                    uiMode: this._testConfig.$editMode,
                    projectSubproject: projSubproj,
                    testCaseName: this.testCaseName,
                    username: this.sessionService.session.cctx.u
                };
                this.testsuiteHTTPService.saveActions(requestJsonParm).subscribe((state) => {
                    if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["SaveActionLoadingState"]) {
                        this.onLoadingSaveAction(state);
                        return;
                    }
                    if (state instanceof _services_testsuite_state__WEBPACK_IMPORTED_MODULE_6__["SaveActionLoadedState"]) {
                        this.onLoadedSaveAction(state, mode);
                        return;
                    }
                }, (state) => {
                    this.onLoadingErrorSaveAction(state);
                });
            }
            else {
                let testCaseData = this._testConfig.getTestCaseData();
                if (mode == 'Pre') {
                    testCaseData.preTestBufferData = listOfAddedActionsPre;
                    this.preData = testCaseData.preTestBufferData;
                }
                else if (mode == 'Post') {
                    testCaseData.postTestBufferData = listOfAddedActionsPre;
                    this.postData = testCaseData.postTestBufferData;
                }
                console.log("Pre test data", testCaseData.preTestBufferData);
                console.log("Post test data", testCaseData.postTestBufferData);
                testCaseData.scenarioDescription = this.description;
                /* Saving data from text mode */
                let actualtestcaseName = "";
                if (this._testConfig.$actualTestCaseName == "") {
                    actualtestcaseName = this.testCaseName;
                }
                else {
                    actualtestcaseName = this._testConfig.$actualTestCaseName;
                }
                // this.loader=true;
                this._testConfig.$projectSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
                if (mode == "Post")
                    this._testConfig.saveIterationData();
                this.loader = false;
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    onLoadingSaveAction(state) { this.loader = true; }
    onLoadedSaveAction(state, mode) {
        this.savePrePostData(state.data, mode);
        this.loader = false;
    }
    onLoadingErrorSaveAction(state) { this.loader = false; }
    savePrePostData(result, mode) {
        let data = result['prePostData'];
        let testCaseData = this._testConfig.getTestCaseData();
        /* to save mail configuration */
        testCaseData.mailTo = this._testConfig.$toList;
        testCaseData.mailCc = this._testConfig.$ccList;
        testCaseData.mailBcc = this._testConfig.$bccList;
        testCaseData.mailSubject = this._testConfig.$subject;
        testCaseData.mailBody = this._testConfig.$body;
        testCaseData.isMailEnabled = this._testConfig.$isMailEnabled;
        if (mode == 'Pre') {
            testCaseData.preTestBufferData = data;
            this.preData = data;
        }
        else if (mode == 'Post') {
            testCaseData.postTestBufferData = data;
            this.postData = data;
        }
        testCaseData.preTestBufferData = this.preData;
        testCaseData.postTestBufferData = this.postData;
        testCaseData.scenarioDescription = this.description;
        testCaseData.anotherProjSubProj = this.projectSubproject;
        let actualtestcaseName = "";
        if (this._testConfig.$actualTestCaseName == "") {
            actualtestcaseName = this.testCaseName;
        }
        else {
            actualtestcaseName = this._testConfig.$actualTestCaseName;
        }
        this._testConfig.$projectSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
        if (mode == "Post")
            this._testConfig.saveIterationData();
    }
    matchTestCaseNameAlreadyExists() {
        try {
            let testCaseTable = this.testCaseList;
            for (let i = 0; i < testCaseTable.length; i++) {
                if (testCaseTable[i]['Test Case'] == this.testCaseName) {
                    let overwriteTestCase = confirm('Test Case with same name already exists. Do you want to overwrite it?');
                    if (overwriteTestCase) {
                        this.mode = 'Edit';
                        this._testConfig.setTestCaseMode(this.mode);
                        return true;
                    }
                    else {
                        return false;
                    }
                }
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    extractData(res) {
        try {
            let body = res.json(); // If response is a JSON use json()
            if (body) {
                return body.data || body;
            }
            else {
                return {};
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    preUI() {
        try {
            this._testConfig.setPreTestEditMode('UI');
        }
        catch (e) {
            console.error(e);
        }
    }
    preAdvance() {
        try {
            this._testConfig.setPreTestEditMode('Advance');
        }
        catch (e) {
            console.error(e);
        }
    }
    addCheckProfile() {
        try {
            if (!this.aclMode) {
                return;
            }
            if (!this.scenarioSelected || this.scenarioSelected['name'] == 'Select Test') {
                return;
            }
            this._testConfig.$checkProfileMode = true;
            this._testConfig.$projectSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
            this._testConfig.$profileName = "";
            this._testConfig.$checkProfileUrl = '/home/testcase/checkProfile';
            this.router.navigate(['/home/load-test/check-profile/check-profile-list/add-check-profile']);
        }
        catch (e) {
            console.error(e);
        }
    }
    ngOnDestroy() {
        try {
            this._testConfig.$actualTestCaseName = "";
            this._testConfig.setTestCaseData(new _containers_check_status_file__WEBPACK_IMPORTED_MODULE_9__["CheckStatusContainer"]);
            this._testConfig.setcheckScriptData(new _containers_check_script_conf__WEBPACK_IMPORTED_MODULE_10__["CheckScriptConf"]);
            this._testConfig.setAddedActions({}, "Pre");
            this._testConfig.setAddedActions({}, "Post");
            this.dataSubscription.unsubscribe();
        }
        catch (e) {
            console.error(e);
        }
    }
    backtoTestCaseList() {
        try {
            this._scenUtils.goBack();
            this._testConfig.$testCaseConfig = "";
        }
        catch (e) {
            console.error(e);
        }
    }
    onAccordionClick(number) {
        try {
            if (this.scenarioSelected['name'] == 'Select Test') {
                if (this.accord['first']['tabList']['_results'][number]['selected'] = true) {
                    alert('Please select scenario.');
                    return;
                }
                else if (this.accord['first']['tabList']['_results'][number]['selected'] = true) {
                    alert('Please select scenario.');
                    return;
                }
                else if (this.accord['first']['tabList']['_results'][number]['selected'] = true) {
                    alert('Please select scenario.');
                    return;
                }
                else if (this.accord['first']['tabList']['_results'][number]['selected'] = true) {
                    alert('Please select scenario.');
                    return;
                }
                else if (this.accord['first']['tabList']['_results'][number]['selected'] = true) {
                    alert('Please select scenario.');
                    return;
                }
            }
            if (this.openScenTab)
                this.openScenTab = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    openScript(scenarioName) {
        try {
            if (scenarioName['name'] == "Select Test") {
                alert("Please select scenario.");
                return;
            }
            else {
                this.scriptUtilService.sendEditScenarioObj(scenarioName['name']);
                this.router.navigate(['/script']);
            }
        }
        catch (e) {
            console.error(e);
        }
    }
    saveCheckProfileInFile() {
        try {
            if (!this.aclMode) {
                return;
            }
            if (this.testCaseName == "") {
                alert("Please fill the testcase Name.");
                return;
            }
            else if (!this.testCaseName.match(this.validationLetter)) {
                alert("Test case name is not valid.\nMax length should not be more than 64 characters\nFirst character should be an alphabet\nOther allowed characters are Numbers(0-9), Dash (-) and Underscore (_)");
                return;
            }
            if (!this.selectedProject || this.selectedProject == "" || !this.selectedSubProject || this.selectedSubProject == "") {
                alert("Please select project and subproject.");
                return;
            }
            if (this.description == "") {
                alert("Please fill the testcase description.");
                return;
            }
            if (this.mode != 'Edit') {
                let overriteTestCase = this.matchTestCaseNameAlreadyExists();
                if (overriteTestCase == false) {
                    return;
                }
            }
            let testCaseData = this._testConfig.getTestCaseData();
            /* to save mail configuration */
            testCaseData.mailTo = this._testConfig.$toList;
            testCaseData.mailCc = this._testConfig.$ccList;
            testCaseData.mailBcc = this._testConfig.$bccList;
            testCaseData.mailSubject = this._testConfig.$subject;
            testCaseData.mailBody = this._testConfig.$body;
            testCaseData.isMailEnabled = this._testConfig.$isMailEnabled;
            testCaseData.anotherProjSubProj = this.projectSubproject;
            this.loader = true;
            this._testConfig.$projectSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
            this._testConfig.saveCheckProfile();
            this.loader = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    saveCheckScriptData() {
        try {
            console.log("acl mode while saving check script =", this.aclMode);
            if (!this.aclMode) {
                return;
            }
            if (this.testCaseName == "") {
                alert("Please fill the testcase Name.");
                return;
            }
            else if (!this.testCaseName.match(this.validationLetter)) {
                alert("Test case name is not valid.\nMax length should not be more than 64 characters\nFirst character should be an alphabet\nOther allowed characters are Numbers(0-9), Dash (-) and Underscore (_)");
                return;
            }
            if (!this.selectedProject || this.selectedProject == "" || !this.selectedSubProject || this.selectedSubProject == "") {
                alert("Please select project and subproject.");
                return;
            }
            if (this.description == "") {
                alert("Please fill the testcase description.");
                return;
            }
            if (this.mode != 'Edit') {
                let overriteTestCase = this.matchTestCaseNameAlreadyExists();
                if (overriteTestCase == false) {
                    return;
                }
            }
            let checkScriptData = this._testConfig.getcheckScriptData();
            if (checkScriptData.baselineCheckBox) {
                if (checkScriptData.baselineScenario == "Select Test") {
                    alert('Compare with Baseline option is selected but test run for Baseline is not selected');
                    return;
                }
                else if (checkScriptData.baselineTestRun == "Select TestRun") {
                    alert('Compare with Baseline option is selected but test run for Baseline is not selected');
                    return;
                }
                else if (checkScriptData.baselineMSR == "") {
                    alert('Measurement name for baseline1 cannot be blank');
                    return;
                }
            }
            if (checkScriptData.InitialCheckBox) {
                if (checkScriptData.InitialScenario == "Select Test") {
                    alert('Please select scenario.');
                    return;
                }
                else if (checkScriptData.InitialTestRun == "Select TestRun") {
                    alert('Please select Test Run.');
                    return;
                }
                else if (checkScriptData.initialMSR == "") {
                    alert('Measurement name for baseline2 cannot be blank');
                    return;
                }
            }
            if (checkScriptData.previousCheckBox) {
                if (checkScriptData.previousScenario == "Select Test") {
                    alert('Please select scenario.');
                    return;
                }
                else if (checkScriptData.previousTestRun == "Select TestRun") {
                    alert('Please select Test Run.');
                    return;
                }
                else if (checkScriptData.previousMSR == "") {
                    alert('Measurement name for baseline3 cannot be blank');
                    return;
                }
            }
            if (checkScriptData.overallSlaCheckBox && (checkScriptData.overallSlaDropDown == "Select TestRun")) {
                alert('Please select testrun to overrite Sla.');
                return;
            }
            if (checkScriptData.warningThreshold == "") {
                alert('Threshold value to highlight metric as green cannot be empty.');
                return;
            }
            else if (checkScriptData.criticalThreshold == "") {
                alert('Threshold value to highlight metric as yellow cannot be empty.');
                return;
            }
            else if (checkScriptData.overallFailCriteria == "") {
                alert('Threshold value to make overall test fail cannot be empty');
            }
            if (isNaN(parseFloat(checkScriptData.warningThreshold))) {
                alert('Threshold value to highlight metric as green should be an integer.');
                return;
            }
            else if (isNaN(parseFloat(checkScriptData.criticalThreshold))) {
                alert('Threshold value to highlight metric as yellow should be an integer.');
                return;
            }
            else if (parseFloat(checkScriptData.warningThreshold) < 0) {
                alert('Threshold value to highlight metric as green can not be less than 0.');
                return;
            }
            else if (parseFloat(checkScriptData.criticalThreshold) < 0) {
                alert('Threshold value to highlight metric as yellow can not be less than 0.');
                return;
            }
            else if (parseFloat(checkScriptData.criticalThreshold) < parseFloat(checkScriptData.warningThreshold)) {
                alert('Green threshold value can not be greater than yellow threshold value.');
                return;
            }
            else if (checkScriptData.overallFailCriteria == "") {
                alert('Overall Fail criteria can not be empty.');
                return;
            }
            else if (isNaN(parseInt(checkScriptData.overallFailCriteria))) {
                alert('Fail criteria should be integer value.');
                return;
            }
            if (parseFloat(checkScriptData.warningThreshold) > 100 || parseFloat(checkScriptData.criticalThreshold) > 100 || parseInt(checkScriptData.overallFailCriteria) > 100) {
                alert("Threshold value can not be greater than 100");
                return;
            }
            let testCaseData = this._testConfig.getTestCaseData();
            testCaseData.scenarioDescription = this.description;
            testCaseData.runPostCheckScriptOnFail = +checkScriptData.runPostScript + "";
            testCaseData.durationPhase = +checkScriptData.durationPhas + "";
            /* to save mail configuration */
            testCaseData.mailTo = this._testConfig.$toList;
            testCaseData.mailCc = this._testConfig.$ccList;
            testCaseData.mailBcc = this._testConfig.$bccList;
            testCaseData.mailSubject = this._testConfig.$subject;
            testCaseData.mailBody = this._testConfig.$body;
            testCaseData.isMailEnabled = this._testConfig.$isMailEnabled;
            if (checkScriptData.previousCheckBox) {
                testCaseData.previousTestRun = checkScriptData.previousTestRun;
                testCaseData.previousMSR = checkScriptData.previousMSR;
                testCaseData.scenNamePrevious = checkScriptData.previousScenario;
            }
            else {
                testCaseData.previousTestRun = "-1";
                testCaseData.previousMSR = "";
                testCaseData.scenNamePrevious = "";
            }
            testCaseData.normalThreshold = checkScriptData.warningThreshold;
            testCaseData.criticalThreshold = checkScriptData.criticalThreshold;
            testCaseData.worningThreshold = checkScriptData.warningThreshold + "-" + checkScriptData.criticalThreshold;
            testCaseData.serverPath = "NA";
            testCaseData.serverName = "NA";
            testCaseData.releaseVersion = "NA";
            if (checkScriptData.baselineCheckBox) {
                testCaseData.baseLineTestRun = checkScriptData.baselineTestRun;
                testCaseData.scenNameIs = checkScriptData.baselineScenario;
                testCaseData.baselineMSR = checkScriptData.baselineMSR;
            }
            else {
                testCaseData.baseLineTestRun = "-1";
                testCaseData.scenNameIs = "";
                testCaseData.baselineMSR = "";
            }
            if (checkScriptData.InitialCheckBox) {
                testCaseData.initialTestRun = checkScriptData.InitialTestRun;
                testCaseData.scenNameIntial = checkScriptData.InitialScenario;
                testCaseData.initialMSR = checkScriptData.initialMSR;
            }
            else {
                testCaseData.initialTestRun = "-1";
                testCaseData.scenNameIntial = "";
                testCaseData.initialMSR = "";
            }
            testCaseData.successCol = +checkScriptData.sucessTransaction + "";
            if (checkScriptData.overallSlaCheckBox) {
                if (checkScriptData.overallSlaDropDown.trim() == "Baseline1 TR") {
                    if (!checkScriptData.baselineCheckBox) {
                        alert('Please select baseline1 scenario and test run.');
                        return;
                    }
                    else {
                        testCaseData.slaVal = '1';
                    }
                }
                else if (checkScriptData.overallSlaDropDown.trim() == "Baseline2 TR") {
                    if (!checkScriptData.InitialCheckBox) {
                        alert('Please select baseline2 scenario and test run.');
                        return;
                    }
                    else {
                        testCaseData.slaVal = '2';
                    }
                }
                else if (checkScriptData.overallSlaDropDown.trim() == "Baseline3 TR") {
                    if (!checkScriptData.previousCheckBox) {
                        alert('Please select baseline3 scenario and test run.');
                        return;
                    }
                    else {
                        testCaseData.slaVal = '3';
                    }
                }
            }
            else {
                testCaseData.slaVal = '0';
            }
            testCaseData.range = "1";
            testCaseData.unexecuted = +checkScriptData.UnexecutedTrans + "";
            testCaseData.transCount = +checkScriptData.transCount + "";
            testCaseData.failCriteria = checkScriptData.overallFailCriteria;
            if (checkScriptData.criticalOf.trim() == 'All (Current and Baselines)')
                testCaseData.failValue = "0";
            else if (checkScriptData.criticalOf.trim() == 'Current')
                testCaseData.failValue = "1";
            else if (checkScriptData.criticalOf.trim() == 'Baseline1') {
                if (!checkScriptData.baselineCheckBox) {
                    alert('Please select baseline1 Test Run.');
                    return;
                }
                else {
                    testCaseData.failValue = "2";
                }
            }
            else if (checkScriptData.criticalOf.trim() == 'Baseline2') {
                if (!checkScriptData.InitialCheckBox) {
                    alert('Please select baseline2 Test Run.');
                    return;
                }
                else {
                    testCaseData.failValue = "3";
                }
            }
            else if (checkScriptData.criticalOf.trim() == 'Baseline3') {
                if (!checkScriptData.InitialCheckBox) {
                    alert('Please select baseline2 Test Run.');
                    return;
                }
                else {
                    testCaseData.failValue = "3";
                }
            }
            testCaseData.trendTr = "NA";
            testCaseData.trendDateTime = "NA";
            testCaseData.trendEnviornmentName = "NA";
            testCaseData.anotherProjSubProj = this.projectSubproject;
            let actualtestcaseName = "";
            if (this._testConfig.$actualTestCaseName == "") {
                actualtestcaseName = this.testCaseName;
            }
            else {
                actualtestcaseName = this._testConfig.$actualTestCaseName;
            }
            this.loader = true;
            this._testConfig.$projectSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
            this.loader = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    addParameter() {
        try {
            if (!this.aclMode) {
                return;
            }
            this.addParameterDialog = true;
            this.paramName = "";
        }
        catch (e) {
            console.error(e);
        }
    }
    addIteration() {
        try {
            if (!this.aclMode) {
                return;
            }
            this.addParameterDialog = false;
            if (this.paramName == "")
                alert('Please fill the Parameter name');
            else if (this.paramName.length > 32)
                alert('Parameter name should be less than of 32 characters');
            else if (!this.paramName.match("^[^0-9][a-zA-Z0-9_]*$"))
                alert('Parameter name should not be start with number');
            else
                this._testConfig.updateAddParameter(this.paramName, this.parameter);
        }
        catch (e) {
            console.error(e);
        }
    }
    addRow() {
        try {
            if (!this.aclMode) {
                return;
            }
            this._testConfig.updateRowInIteration();
        }
        catch (e) {
            console.error(e);
        }
    }
    saveIteration() {
        try {
            if (!this.aclMode) {
                return;
            }
            if (this.testCaseName == "") {
                alert("Please fill the testcase Name.");
                return;
            }
            else if (!this.testCaseName.match(this.validationLetter)) {
                alert("Test case name is not valid.\nMax length should not be more than 64 characters\nFirst character should be an alphabet\nOther allowed characters are Numbers(0-9), Dash (-) and Underscore (_)");
                return;
            }
            if (!this.selectedProject || this.selectedProject == "" || !this.selectedSubProject || this.selectedSubProject == "") {
                alert("Please select project and subproject.");
                return;
            }
            if (this.description == "") {
                alert("Please fill the testcase description.");
                return;
            }
            if (this.mode != 'Edit') {
                let overriteTestCase = this.matchTestCaseNameAlreadyExists();
                if (overriteTestCase == false) {
                    return;
                }
            }
            let testCaseData = this._testConfig.getTestCaseData();
            /* to save mail configuration */
            testCaseData.mailTo = this._testConfig.$toList;
            testCaseData.mailCc = this._testConfig.$ccList;
            testCaseData.mailBcc = this._testConfig.$bccList;
            testCaseData.mailSubject = this._testConfig.$subject;
            testCaseData.mailBody = this._testConfig.$body;
            testCaseData.isMailEnabled = this._testConfig.$isMailEnabled;
            testCaseData.scenarioProSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
            testCaseData.anotherProjSubProj = this.projectSubproject;
            this.loader = true;
            this._testConfig.saveIterationData();
            this.loader = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    saveAddedMailConfiguration() {
        try {
            console.log("saveAddedMailConfiguration called ....");
            if (!this.aclMode) {
                return;
            }
            if (this.testCaseName == "") {
                alert("Please fill the testcase Name.");
                return;
            }
            else if (!this.testCaseName.match(this.validationLetter)) {
                alert("Test case name is not valid.\nMax length should not be more than 64 characters\nFirst character should be an alphabet\nOther allowed characters are Numbers(0-9), Dash (-) and Underscore (_)");
                return;
            }
            if (!this.selectedProject || this.selectedProject == "" || !this.selectedSubProject || this.selectedSubProject == "") {
                alert("Please select project and subproject.");
                return;
            }
            if (this.description == "") {
                alert("Please fill the testcase description.");
                return;
            }
            if (this.mode != 'Edit') {
                let overriteTestCase = this.matchTestCaseNameAlreadyExists();
                if (overriteTestCase == false) {
                    return;
                }
            }
            if (this._testConfig.$ccList !== "" || this._testConfig.$bccList !== "") {
                if (this._testConfig.$toList == "") {
                    alert("Enter recipient's address in \"To\" field");
                    return;
                }
            }
            let index = this.scenarioSelected['name'].lastIndexOf("/");
            let scenProjSubProj = this.scenarioSelected['name'].substring(0, index);
            let testCaseData = this._testConfig.getTestCaseData();
            testCaseData.mailTo = this._testConfig.$toList;
            testCaseData.mailCc = this._testConfig.$ccList;
            testCaseData.mailBcc = this._testConfig.$bccList;
            testCaseData.mailSubject = this._testConfig.$subject;
            testCaseData.mailBody = this._testConfig.$body;
            testCaseData.isMailEnabled = this._testConfig.$isMailEnabled;
            testCaseData.scenarioProSubProject = scenProjSubProj;
            testCaseData.anotherProjSubProj = this.projectSubproject;
            let actualtestcaseName = "";
            if (this._testConfig.$actualTestCaseName == "") {
                actualtestcaseName = this.testCaseName;
            }
            else {
                actualtestcaseName = this._testConfig.$actualTestCaseName;
            }
            this.loader = true;
            this._testConfig.$projectSubProject = this.selectedProject['name'] + "/" + this.selectedSubProject['name'];
            this.loader = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    anotherProjectSubproject() {
        try {
            this.loader = true;
            if (this.projectSubproject) {
                this.dataHandler.getScenarioList("");
                this.getListOfProjSubproj("checkboxClick");
            }
            else {
                this.dataHandler.getScenarioList("-p " + this.selectedProject['name'] + "/" + this.selectedSubProject['name']);
                this.getCheckProfileList(this.selectedProject, this.selectedSubProject);
            }
            this._testConfig.updateCheckboxForProjSubProj(this.projectSubproject);
            this.loader = false;
        }
        catch (e) {
            console.error(e);
        }
    }
    validateParamName(e) {
        var keyCode = e.keyCode || e.which;
        var pattern = new RegExp("^[a-zA-Z0-9_]*$");
        var isValid = pattern.test(String.fromCharCode(keyCode));
        if (!isValid) {
            return false;
        }
        return isValid;
    }
    getTestCaseList() {
        try {
            let base = "/DashboardServer/tsSuite/testSuiteTestCase/";
            let url = "getTestSuiteList?listToFetch=TestCase&strArgs= -s 90";
            let param = '';
            this.testsuiteHTTPService.getDataByRestAPI(url, base, param).subscribe(response => {
                this.testCaseList = response;
            });
        }
        catch (e) {
            console.log(e);
        }
    }
};
TestCaseConfigurationComponent.ctorParameters = () => [
    { type: _services_load_test_utils_service__WEBPACK_IMPORTED_MODULE_8__["LoadTestUtilsService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__["SessionService"] },
    { type: _services_testsuite_config_service__WEBPACK_IMPORTED_MODULE_3__["TestsuiteConfigService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_15__["HttpClient"] },
    { type: _services_testsuite_data_handler_service__WEBPACK_IMPORTED_MODULE_4__["TestsuiteDataHandlerService"] },
    { type: _services_testsuite_http_service__WEBPACK_IMPORTED_MODULE_5__["TestsuiteHttpService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] },
    { type: _services_load_test_common_services__WEBPACK_IMPORTED_MODULE_11__["LoadTestCommonService"] },
    { type: src_app_pages_home_script_manager_services_script_utils_service__WEBPACK_IMPORTED_MODULE_12__["ScriptUtilService"] },
    { type: src_app_pages_scenario_service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_14__["ScenarioUtilsService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChildren"])("acc")
], TestCaseConfigurationComponent.prototype, "accord", void 0);
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(_cav_scen_open_cav_scen_open_component__WEBPACK_IMPORTED_MODULE_13__["CavScenOpenComponent"], { read: _cav_scen_open_cav_scen_open_component__WEBPACK_IMPORTED_MODULE_13__["CavScenOpenComponent"] })
], TestCaseConfigurationComponent.prototype, "cavScenOpen", void 0);
TestCaseConfigurationComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-test-case-configuration',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./test-case-configuration.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./test-case-configuration.component.scss */ "./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.component.scss")).default]
    })
], TestCaseConfigurationComponent);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.module.ts":
/*!*******************************************************************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.module.ts ***!
  \*******************************************************************************************************************************/
/*! exports provided: TestCaseConfigurationModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestCaseConfigurationModule", function() { return TestCaseConfigurationModule; });
/* 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 src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/header/header.module */ "./src/app/shared/header/header.module.ts");
/* harmony import */ var primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js");
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
/* harmony import */ var primeng_card__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/card */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-card.js");
/* harmony import */ var primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js");
/* harmony import */ var primeng_dialog__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
/* harmony import */ var primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
/* harmony import */ var primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
/* harmony import */ var primeng_menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng/menu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menu.js");
/* harmony import */ var primeng_message__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/message */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-message.js");
/* harmony import */ var primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! primeng/multiselect */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
/* harmony import */ var primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js");
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js");
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! primeng/accordion */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-accordion.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var primeng_chips__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! primeng/chips */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-chips.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var _check_script_tab_check_script_tab_module__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../check-script-tab/check-script-tab.module */ "./src/app/pages/home/load-test/testsuite/components/test-case/check-script-tab/check-script-tab.module.ts");
/* harmony import */ var _check_profile_tab_check_profile_tab_module__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../check-profile-tab/check-profile-tab.module */ "./src/app/pages/home/load-test/testsuite/components/test-case/check-profile-tab/check-profile-tab.module.ts");
/* harmony import */ var _iteration_tab_iteration_tab_module__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../iteration-tab/iteration-tab.module */ "./src/app/pages/home/load-test/testsuite/components/test-case/iteration-tab/iteration-tab.module.ts");
/* harmony import */ var _mail_configuration_mail_configuration_module__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../mail-configuration/mail-configuration.module */ "./src/app/pages/home/load-test/testsuite/components/test-case/mail-configuration/mail-configuration.module.ts");
/* harmony import */ var _post_test_script_tab_post_test_script_tab_module__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../post-test-script-tab/post-test-script-tab.module */ "./src/app/pages/home/load-test/testsuite/components/test-case/post-test-script-tab/post-test-script-tab.module.ts");
/* harmony import */ var _pre_test_script_tab_pre_test_script_tab_module__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../pre-test-script-tab/pre-test-script-tab.module */ "./src/app/pages/home/load-test/testsuite/components/test-case/pre-test-script-tab/pre-test-script-tab.module.ts");
/* harmony import */ var _test_case_configuration_component__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./test-case-configuration.component */ "./src/app/pages/home/load-test/testsuite/components/test-case/test-case-configuration/test-case-configuration.component.ts");
/* harmony import */ var _cav_scen_open_cav_scen_open_module__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../../cav-scen-open/cav-scen-open.module */ "./src/app/pages/home/load-test/cav-scen-open/cav-scen-open.module.ts");
/* harmony import */ var primeng_panel__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! primeng/panel */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-panel.js");
/* harmony import */ var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! src/app/shared/help/help.module */ "./src/app/shared/help/help.module.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");


































const routes = [
    {
        path: '', component: _test_case_configuration_component__WEBPACK_IMPORTED_MODULE_29__["TestCaseConfigurationComponent"]
    }
];
let TestCaseConfigurationModule = class TestCaseConfigurationModule {
};
TestCaseConfigurationModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_test_case_configuration_component__WEBPACK_IMPORTED_MODULE_29__["TestCaseConfigurationComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            primeng_toolbar__WEBPACK_IMPORTED_MODULE_15__["ToolbarModule"],
            src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_3__["HeaderModule"],
            primeng_inputtext__WEBPACK_IMPORTED_MODULE_10__["InputTextModule"],
            primeng_panel__WEBPACK_IMPORTED_MODULE_31__["PanelModule"],
            primeng_button__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"],
            primeng_message__WEBPACK_IMPORTED_MODULE_12__["MessageModule"],
            primeng_dialog__WEBPACK_IMPORTED_MODULE_8__["DialogModule"],
            primeng_card__WEBPACK_IMPORTED_MODULE_6__["CardModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_17__["FormsModule"],
            primeng_dropdown__WEBPACK_IMPORTED_MODULE_9__["DropdownModule"],
            primeng_checkbox__WEBPACK_IMPORTED_MODULE_7__["CheckboxModule"],
            primeng_table__WEBPACK_IMPORTED_MODULE_14__["TableModule"],
            primeng_multiselect__WEBPACK_IMPORTED_MODULE_13__["MultiSelectModule"],
            primeng_menu__WEBPACK_IMPORTED_MODULE_11__["MenuModule"],
            primeng_breadcrumb__WEBPACK_IMPORTED_MODULE_4__["BreadcrumbModule"],
            primeng_tooltip__WEBPACK_IMPORTED_MODULE_16__["TooltipModule"],
            primeng_sidebar__WEBPACK_IMPORTED_MODULE_18__["SidebarModule"],
            primeng_accordion__WEBPACK_IMPORTED_MODULE_19__["AccordionModule"],
            primeng_chips__WEBPACK_IMPORTED_MODULE_21__["ChipsModule"],
            primeng__WEBPACK_IMPORTED_MODULE_20__["RadioButtonModule"],
            _angular_router__WEBPACK_IMPORTED_MODULE_22__["RouterModule"].forChild(routes),
            _check_profile_tab_check_profile_tab_module__WEBPACK_IMPORTED_MODULE_24__["CheckProfileTabModule"],
            _check_script_tab_check_script_tab_module__WEBPACK_IMPORTED_MODULE_23__["CheckScriptTabModule"],
            _iteration_tab_iteration_tab_module__WEBPACK_IMPORTED_MODULE_25__["IterationTabModule"],
            _mail_configuration_mail_configuration_module__WEBPACK_IMPORTED_MODULE_26__["MailConfigurationModule"],
            _post_test_script_tab_post_test_script_tab_module__WEBPACK_IMPORTED_MODULE_27__["PostTestScriptTabModule"],
            _pre_test_script_tab_pre_test_script_tab_module__WEBPACK_IMPORTED_MODULE_28__["PreTestScriptTabModule"],
            _cav_scen_open_cav_scen_open_module__WEBPACK_IMPORTED_MODULE_30__["CavScenOpenModule"],
            primeng__WEBPACK_IMPORTED_MODULE_20__["SelectButtonModule"],
            src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_33__["CavTableModule"],
            src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_32__["HelpModule"]
        ],
        exports: [_test_case_configuration_component__WEBPACK_IMPORTED_MODULE_29__["TestCaseConfigurationComponent"], _angular_router__WEBPACK_IMPORTED_MODULE_22__["RouterModule"]]
    })
], TestCaseConfigurationModule);



/***/ }),

/***/ "./src/app/pages/home/load-test/testsuite/constants/pre-post-constants.ts":
/*!********************************************************************************!*\
  !*** ./src/app/pages/home/load-test/testsuite/constants/pre-post-constants.ts ***!
  \********************************************************************************/
/*! exports provided: PRE_POST_ACTION_LIST, ACTION_DESCRIPTION */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PRE_POST_ACTION_LIST", function() { return PRE_POST_ACTION_LIST; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ACTION_DESCRIPTION", function() { return ACTION_DESCRIPTION; });
const PRE_POST_ACTION_LIST = [{ "name": "Select Action" },
    { "name": "COPY_FILE" },
    { "name": "START_COMMAND" },
    { "name": "STOP_COMMAND" },
    { "name": "REMOVE_FILE" },
    { "name": "SUDO_START_SERVICE" },
    { "name": "SUDO_STOP_SERVICE" },
    { "name": "REMOTE_EXECUTION" },
    { "name": "UPLOAD" },
    { "name": "DOWNLOAD" },
    { "name": "SLEEP" }];
const ACTION_DESCRIPTION = {
    'COPY_FILE': "COPY_FILE is a utility to copy a file from source path to destination path on the selected server. The command is executed via Cavisson agent if available on the server otherwise it is executed using ssh. Authentication information is taken from the Nestorm server database.",
    'START_COMMAND': "START_COMMAND is a utility to start the service on selected server, a 'start' signal is appended to the service string before executing the command on the server. The command is executed via Cavisson agent if available on the server otherwise it is executed using ssh. Authentication information is taken from the Nestorm server database.",
    'STOP_COMMAND': "STOP_COMMAND is a utility to stop the service on selected server, a 'stop' signal is appended to the service string before executing the command on the server. The command is executed via Cavisson agent if available on the server otherwise it is executed using ssh. Authentication information is taken from the Nestorm server database.",
    'REMOVE_FILE': "REMOVE_FILE is a utility to remove a file on the selected server. The command is executed via Cavisson agent if available on the server otherwise it is executed using ssh. Authentication information is taken from the Nestorm server database.",
    'SUDO_START_SERVICE': "SUDO_START_SERVICE is a utility to start the service with sudo on selected server, a 'start' signal is appended to the service string before executing the command on the server. User needs to provide the complete path to the sudo executable. The command is executed via Cavisson agent if available on the server otherwise it is executed using ssh. Authentication information is taken from the Nestorm server database.",
    'SUDO_STOP_SERVICE': "SUDO_STOP_SERVICE is a utility to stop the service with sudo on selected server, a 'stop' signal is appended to the service string before executing the command on the server. User needs to provide the absolute path to sudo executable. The command is executed via Cavisson agent if available on the server otherwise it is executed using ssh. Authentication information is taken from the Nestorm server database.",
    'REMOTE_EXECUTION': "REMOTE_EXECUTION allows user to execute any command which doesn't gives a Continuous output for example ping. The command will be executed on the selected server via Cavisson agent otherwise we use ssh.  Authentication information is taken from the Nestorm server database.",
    'UPLOAD': "UPLOAD utility allows user to upload files from netstorm path on the selected server at the specified server path. The file is uploaded using Cavisson agent if available otherwise we send via sftp.  Authentication information is taken from the Nestorm server database.",
    'DOWNLOAD': "DOWNLOAD utility allows user to download a file at server path on the selected server to local netstorm path. The file is downloaded using scp.  Authentication information is taken from the Nestorm server database.",
    'SLEEP': "SLEEP is to induce sleep between actions. Time is in seconds."
};


/***/ })

}]);