function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }

function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }

function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }

function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }

function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["scenario-logs-and-reports-scenario-logs-and-reports-module"], {
  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.component.html":
  /*!*******************************************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.component.html ***!
    \*******************************************************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_scenario_groupBasedSettingsMain_scenarioLogsAndReports_scenarioLogsAndReportsComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<div class=\"my-32 pt-24 pb-8 px-24 borderTabClass border-4 mr-10\"  >\n    <div class=\"mb-16 p-grid w-100-p p-align-center\">\n        <div class=\"font-14 font-weight-500 mr-10\">DRILL DOWN REPORTS AND NETWORK LOGS</div>\n        <div pTooltip=\"Enable capturing of drill down (diagnostics) data for VUser sessions. You can enable it for maximum 10% of sessions.\"\n            tooltipZIndex=\"12000\" class=\"\"><i class=\"icons8 icons8-info\"></i></div>\n    </div>\n    <div class=\"w-100-p my-6 p-grid p-align-center\">\n            <p-checkbox label=\"Enable drill down reports\" class=\"mb-16\" labelStyleClass=\"font-weight-700\" binary=\"true\" [disabled]=\"enableDisKeywordList.G_REPORTING\"\n                [(ngModel)]=\"reportCheck\"></p-checkbox>\n                \n            <div class=\"w-100-p my-6 p-grid p-align-center pl-25\">\n                <div>Capture </div>\n                <div class=\"mx-10 width-90 p-col-nogutter\">\n                    <div class=\"ui-inputgroup w-100-p\">\n                        <p-spinner inputStyleClass=\"w-100-p\" min=\"0\" max=\"10\" step=\"0.10\"\n                            [disabled]=\"enableDisKeywordList.G_REPORTING || !reportCheck\" [(ngModel)]=\"ddrSessionPercentage\"\n                            (keypress)=\"validateQty($event, false)\" (input)=\"checkAndLimitValue($event, false, false)\"></p-spinner>\n                        <span class=\"ui-inputgroup-addon px-10\">%</span>\n                    </div>\n                </div>\n                <span> of all sessions</span>\n            </div>\n            \n            <div class=\"w-100-p my-6 p-grid p-align-center pl-25\">\n                <div>Capture </div>\n                <div class=\"mx-10 width-90 p-col-nogutter\">\n                    <div class=\"ui-inputgroup w-100-p\">\n                        <p-spinner inputStyleClass=\"w-100-p\" min=\"0\" max=\"100\" \n                            [disabled]=\"enableDisKeywordList.G_REPORTING || !reportCheck\" [(ngModel)]=\"ddrErrorPercentage\"\n                            (keypress)=\"validateQty($event, false)\" (input)=\"checkAndLimitValue($event, true, false)\"></p-spinner>\n                        <span class=\"ui-inputgroup-addon px-10\">%</span>\n                    </div>\n                </div>\n                <span>of error session whose page/transaction failed</span>\n            </div>\n            \n            <div class=\"w-100-p my-6 p-grid p-align-center pl-25\">\n                <div>Capture </div>\n                <div class=\"mx-10 width-90 p-col-nogutter\">\n                    <div class=\"ui-inputgroup w-100-p\">\n                        <p-spinner inputStyleClass=\"w-100-p\" min=\"0\" max=\"10\" [disabled]=\"enableDisKeywordList.G_TRACING || !reportCheck\" [(ngModel)]=\"urlPercentage\" (keypress)=\"validateQty($event)\" (input)=\"checkAndLimitValue($event, false, true)\"></p-spinner>\n                        <span class=\"ui-inputgroup-addon px-10\">%</span>\n                    </div>\n                </div>\n                <span> of sessions where any URL of page's response time is higher than</span>\n                <div class=\"width-90 p-col-nogutter mx-10\">\n                    <div class=\"ui-inputgroup w-100-p\">\n                        <p-spinner inputStyleClass=\"w-100-p\" min=\"100\" max=\"10000\" [disabled]=\"enableDisKeywordList.G_TRACING || !reportCheck\" [(ngModel)]=\"thresholdVal\" (keypress)=\"validateQty($event)\"></p-spinner>\n                        <span class=\"ui-inputgroup-addon px-10\">ms</span>               \n                    </div>\n                </div> \n            </div>\n            \n        <div class=\"w-100-p pl-16  my-8\">\n            <p-checkbox label=\"Enable Network Logs\" binary=\"true\" [disabled]=\"!reportCheck\" [(ngModel)]=\"chkTrace\"></p-checkbox>\n        </div>\n        <div class=\"w-100-p  my-8 pl-42 p-grid p-align-center\">\n            <div class=\"mr-10\">\n                From drill down reports, capture\n            </div>\n            <div class=\"width-90 p-col-nogutter mr-10\">\n                <div class=\"ui-inputgroup w-100-p\">\n                    <p-spinner inputStyleClass=\"w-100-p\" min=\"0\" max=\"100\" step=\"0.1\" [disabled]=\"!chkTrace || enableDisKeywordList.G_TRACING || !reportCheck\"\n                        [(ngModel)]=\"txtSession\" (keypress)=\"validateQty($event, false)\"></p-spinner>\n                    <span class=\"ui-inputgroup-addon px-10\">%</span>\n                </div>\n            </div>\n            <div class=\"mr-10\">\n                of all sessions and \n            </div>\n            <div class=\"width-90 p-col-nogutter mr-10\">\n                <div class=\"ui-inputgroup w-100-p\">\n                    <p-spinner inputStyleClass=\"w-100-p\" min=\"0\" max=\"100\" step=\"0.1\" [disabled]=\"!chkTrace || enableDisKeywordList.G_TRACING || !reportCheck\"\n                        [(ngModel)]=\"capErrorSession\" (keypress)=\"validateQty($event, false)\"></p-spinner>\n                    <span class=\"ui-inputgroup-addon px-10\">%</span>\n                </div>\n            </div>\n            <div class=\"mr-10\">\n                of error sessions with\n            </div>\n            <div class=\"width-170 p-col-nogutter mr-10\">\n                <p-dropdown [options]=\"sessionOptions\" [disabled]=\"!chkTrace || enableDisKeywordList.G_TRACING || !reportCheck\"\n                    [style]=\"{ 'min-width' : '100%' }\" [pTooltip]=\"tooltipObj[radTraceSession]\" [(ngModel)]=\"radTraceSession\"\n                    dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n            </div>\n            <span> in network logs</span>\n        </div>\n        \n        <div class=\"w-100-p  my-8 p-grid p-align-center pl-42\">\n            <span class=\"mr-10\">Additionally, capture</span>\n            <div class=\"p-col-3 p-col-nogutter mr-10\">\n                <p-dropdown [options]=\"requestLogOptions\" [disabled]=\"!chkTrace || enableDisKeywordList.G_TRACING || !reportCheck\"\n                    [style]=\"{ 'min-width' : '100%' }\" [(ngModel)]=\"radTraceLevel\" [pTooltip]=\"tooltipTraceLevel[radTraceLevel]\"\n                    dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n            </div>\n            <span>of main URL in network logs </span>\n        </div>\n        <div class=\"mb-16 p-grid w-100-p p-align-center\">\n            <div>\n                <p-toggleButton styleClass=\"toggle-button-link\" [(ngModel)]=\"limitSettings\" onLabel=\"Limit&nbsp;Settings\"\n                    offLabel=\"Limit&nbsp;Settings\" onIcon=\"pi&nbsp;pi-chevron-up\"\n                    offIcon=\"pi pi-chevron-down\" iconPos=\"right\">\n                </p-toggleButton>\n            </div>\n            <div class=\"p-grid p-align-center pl-15 w-100-p\" *ngIf=\"limitSettings\" binary=\"true\">\n                <div class=\"w-100-p mb-16 mt-8 \">\n                    <p-checkbox label=\"Capture inline request and response in Network Logs\" [disabled]=\"!chkTrace || !reportCheck\"\n                        class=\"mr-10\" binary=\"true\" [(ngModel)]=\"inlineCheck\"></p-checkbox>\n                </div>\n                <div class=\"p-grid w-100-p\">\n                    <div class=\"p-col-5 p-col-nogutter mb-16 p-grid p-align-center pl-0\">\n                        <div class=\"p-col-8 p-col-nogutter\">Maximum parameter count per session for network log data</div>\n                        <div class=\"width-110  \">\n                            <p-spinner inputStyleClass=\"w-100-p\" min=\"1\" max=\"64000\" [disabled]=\"!chkTrace || !reportCheck\" [(ngModel)]=\"traceEntries\"\n                                (keypress)=\"validateQty($event)\"></p-spinner>\n                        </div>\n                    </div>\n                    <div class=\"p-col-6 p-col-nogutter mb-16 p-grid p-align-center pl-0 pl-25\">\n                        <div class=\"p-col-8 p-col-nogutter\">Maximum buffer size per session for network log data <i\n                                pTooltip=\"Network log data like step name, URL, parameters excluding request and response.\"\n                                class=\"icons8 icons8-info clickable\"></i> </div>\n                        <div class=\"width-110  \">\n                            <div class=\"ui-inputgroup w-100-p\">\n                                <p-spinner inputStyleClass=\"w-100-p\" min=\"1\" max=\"65536\" [(ngModel)]=\"traceLength\" [disabled]=\"!chkTrace || !reportCheck\"\n                                    (keypress)=\"validateQty($event)\"></p-spinner>\n                                <span class=\"ui-inputgroup-addon px-10\">KB</span>\n                            </div>                    \n                        </div>\n                    </div>\n                    <div class=\"p-col-5 p-col-nogutter mb-16 p-grid p-align-center pl-0\">\n                        <div class=\"p-col-8 p-col-nogutter\">Maximum size of single request data</div>\n                        <div class=\"width-110  \">\n                            <div class=\"ui-inputgroup w-100-p\">\n                                <!-- putting max limit as only 2gb is supported by core \n                                    refer following bug:\n                                    Bug 107129 - Not able to download large files using NetStorm script -->\n                                <p-spinner inputStyleClass=\"w-100-p\" step=\"0.1\" min=\"1\" max=\"2097152\" [(ngModel)]=\"reqData\" [disabled]=\"!chkTrace || !reportCheck\"\n                                    (keypress)=\"validateQty($event)\"></p-spinner>\n                                <span class=\"ui-inputgroup-addon px-10\">KB</span>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"p-col-6 p-col-nogutter mb-16 p-grid p-align-center pl-0 pl-25\">\n                        <div class=\"p-col-8 p-col-nogutter\">Maximum size of single response data</div>\n                        <div class=\"width-110  \">\n                            <div class=\"ui-inputgroup w-100-p\">\n                                <p-spinner inputStyleClass=\"w-100-p\" step=\"0.1\" min=\"1\" max=\"2097152\" [(ngModel)]=\"resData\" [disabled]=\"!chkTrace || !reportCheck\"\n                                    (keypress)=\"validateQty($event)\"></p-spinner>\n                                <span class=\"ui-inputgroup-addon px-10\">KB</span>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"w-100-p p-grid p-align-center\">\n                        <span>Keep last</span>\n                        <div class=\"width-110 p-col-nogutter mx-10\">\n                            <div class=\"ui-inputgroup w-100-p\">\n                                <p-spinner inputStyleClass=\"w-100-p\" min=\"0\" max=\"100\" [(ngModel)]=\"ddrMaxCount\"\n                                    [disabled]=\"!inlineCheck && !reportCheck \" (keypress)=\"validateQty($event)\"></p-spinner>\n                                <span class=\"ui-inputgroup-addon px-15\">pages</span>\n                            </div>\n                        </div>\n                        <span>and all further pages in case of error session and higher response time</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n    \n    <div class=\"w-100-p\">\n        <div class=\"  p-10 my-16 p-grid p-align-center showMoreClass \">\n            <span class=\"mr-5\">For smoke/debug and RBU tests, 100% sessions will be captured for drill down reports. Refer Group based settings -> Developer Options -> Smoke/Validation Test Criteria. </span>\n        </div>\n    </div>\n</div>\n<div class=\"my-32 pt-24 pb-8 px-24 borderTabClass border-4 mr-10\"  >\n    <div class=\"mb-16 p-grid w-100-p p-align-center\">\n        <div class=\"font-14 font-weight-500 mr-10\">LOGGING</div>\n        <div pTooltip=\"Logging settings control what logs are logged in the test run. Logged messages have a log level associated with it. Log level specifies the verbosity of the message. Messages with higher log level represent higher level of verbosity.\"\n            tooltipStyleClass=\"w-55-p word-break\"><i class=\"icons8 icons8-info\"></i></div>\n    </div>\n    <div class=\"p-grid w-100-p p-align-center\">\n        <div class=\"p-col-1 p-col-nogutter\">Log Level</div>\n        <div class=\"p-col-2 p-col-nogutter\">\n            <p-dropdown [options]=\"logLevelOptions\" [disabled]=\"enableDisKeywordList.G_LOGGING\"\n                [style]=\"{ 'min-width' : '100%' }\" [pTooltip]=\"tooltipObjLogLevel[radLogLevel]\" [(ngModel)]=\"radLogLevel\"\n                dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n        </div>\n    </div>\n</div>\n<div class=\"mb-32 p-grid w-100-p p-align-center\">\n    <p-toggleButton styleClass=\"toggle-button-link\" [(ngModel)]=\"additionalSettings\" onLabel=\"Additional&nbsp;Settings\"\n        offLabel=\"Additional&nbsp;Settings\" onIcon=\"pi&nbsp;pi-chevron-up\"\n        offIcon=\"pi pi-chevron-down\" iconPos=\"right\">\n    </p-toggleButton>\n</div>\n<div *ngIf=\"additionalSettings\" class=\"p-grid p-align-center\">\n    <div class=\"p-col-fixed ml-20 mr-100\">\n        <p-checkbox label=\"Enable Virtual User Trace\" binary=\"true\" [disabled]=\"enableDisKeywordList.G_VUSER_TRACE\"\n            [(ngModel)]=\"chkVUser\"></p-checkbox>\n    </div>\n    <div class=\"p-col-fixed ml-20 mr-100\">\n        <p-checkbox label=\"Show runtime progress of runlogic\" binary=\"true\"\n            [disabled]=\"enableDisKeywordList.G_SHOW_RUNTIME_RUNLOGIC_PROGRESS\" [(ngModel)]=\"chkRunlogic\"></p-checkbox>\n    </div>\n</div>\n";
    /***/
  },

  /***/
  "./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.component.scss":
  /*!*****************************************************************************************************************************!*\
    !*** ./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.component.scss ***!
    \*****************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_scenario_groupBasedSettingsMain_scenarioLogsAndReports_scenarioLogsAndReportsComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "app-scenario-logs-and-reports .borderTabClass {\n  border-style: solid;\n  border-width: 1px;\n  border-radius: 3px;\n}\napp-scenario-logs-and-reports .invisible {\n  display: none;\n}\napp-scenario-logs-and-reports .showMoreClass {\n  background-color: var(--warning-100);\n  border: 1px solid var(--alert-color);\n}";
    /***/
  },

  /***/
  "./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.component.ts":
  /*!***************************************************************************************************************************!*\
    !*** ./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.component.ts ***!
    \***************************************************************************************************************************/

  /*! exports provided: ScenarioLogsAndReportsComponent */

  /***/
  function _src_app_pages_scenario_groupBasedSettingsMain_scenarioLogsAndReports_scenarioLogsAndReportsComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ScenarioLogsAndReportsComponent", function () {
      return ScenarioLogsAndReportsComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var primeng__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! primeng */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
    /* harmony import */


    var _service_scen_keyword_definition_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../../service/scen-keyword-definition.service */
    "./src/app/pages/scenario/service/scen-keyword-definition.service.ts");
    /* harmony import */


    var _service_scenario_http_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../../service/scenario-http.service */
    "./src/app/pages/scenario/service/scenario-http.service.ts");
    /* harmony import */


    var _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../../service/scenario-utils.service */
    "./src/app/pages/scenario/service/scenario-utils.service.ts");
    /* harmony import */


    var _service_sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! ../../service/sch-schedule-data.service */
    "./src/app/pages/scenario/service/sch-schedule-data.service.ts");
    /* harmony import */


    var _service_group_based_settings_data_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! ../service/group-based-settings-data.service */
    "./src/app/pages/scenario/group-based-settings-main/service/group-based-settings-data.service.ts");
    /* harmony import */


    var _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! ../../constants/scen-schedule-constants */
    "./src/app/pages/scenario/constants/scen-schedule-constants.ts");
    /* harmony import */


    var _interface_scenario_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! ../../interface/scenario-state */
    "./src/app/pages/scenario/interface/scenario-state.ts");
    /* harmony import */


    var _service_test_mode_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
    /*! ../../service/test-mode.service */
    "./src/app/pages/scenario/service/test-mode.service.ts");

    var ScenarioLogsAndReportsComponent = /*#__PURE__*/function () {
      function ScenarioLogsAndReportsComponent(keywordDefinition, dataService, confirmationService, scenarioUtilsService, scenarioHttpService, schData, testModeService) {
        var _this = this;

        _classCallCheck(this, ScenarioLogsAndReportsComponent);

        this.keywordDefinition = keywordDefinition;
        this.dataService = dataService;
        this.confirmationService = confirmationService;
        this.scenarioUtilsService = scenarioUtilsService;
        this.scenarioHttpService = scenarioHttpService;
        this.schData = schData;
        this.testModeService = testModeService;
        this.enableDisKeywordList = {
          "G_LOGGING": false,
          "G_TRACING": false,
          "G_REPORTING": false,
          "G_TRACING_LIMIT": false,
          "G_VUSER_TRACE": false,
          "G_SHOW_RUNTIME_RUNLOGIC_PROGRESS": false
        };
        this.screenKeywordList = Object.keys(this.enableDisKeywordList);
        this.arrKeywordData = {}; //main obj of screen Keyword data.

        /** enable vuser radio button */

        this.chkTrace = true;
        this.inlineCheck = false;
        /** enable vuser checkbox */

        this.chkVUser = true;
        this.chkRunlogic = false;
        this.txtSession = 1;
        this.capErrorSession = 1;
        this.reqData = 10;
        this.resData = 1024; //trace level

        this.radTraceLevel = 3; //trace session - as trace failure

        this.radTraceSession = 0; //trace limit

        this.traceEntries = 1024;
        this.traceLength = 10;
        /** logging */

        this.radLogLevel = 1;
        this.reportCheck = false;
        /** reporting  */

        this.ddrSessionPercentage = 1;
        this.selectedGrpInfo = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"];
        this.limitSettings = false;
        this.additionalSettings = false;
        this.tooltipObj = {
          1: 'Failed Pages/Transactions',
          2: 'Complete session'
        };
        this.tooltipObjLogLevel = {
          1: 'Standard Log Level',
          2: 'Standard and Extended Log level',
          3: 'Standard, Extended and Debug level'
        };
        this.tooltipTraceLevel = {
          3: 'Used Parameter substitution',
          4: 'Used Parameter substitution and network logs'
        };
        this.isGroupEnabled = ''; //set none if want to disable in that case where there is no groups

        this.flag = false; //this flag is used to check, if the group name tab is present or not.

        this.arrGrpList = [];
        this.ddrErrorPercentage = 10;
        this.ddrMaxCount = 25;
        this.urlPercentage = 0;
        this.thresholdVal = 500;
        this.saveData = this.scenarioUtilsService.$saveGroupbasedSetting.subscribe(function (res) {
          _this.validateAndSaveData();
        });
        this.requestLogOptions = [{
          label: "Used Parameter substitution",
          value: 3
        }, {
          label: "Used Parameter substitution and network logs",
          value: 4
        }];
        this.consoleOptions = [{
          label: "Console",
          value: 1
        }, {
          label: "Screen",
          value: 0
        }, {
          label: "Both",
          value: 2
        }];
        this.sessionOptions = [{
          label: "Failed Pages/Transactions",
          value: 1
        }, {
          label: "Complete session",
          value: 2
        }];
        this.logLevelOptions = [{
          label: "Standard Log Level",
          value: 1
        }, {
          label: "Standard and Extended Log level",
          value: 2
        }, {
          label: "Standard, Extended and Debug level",
          value: 3
        }];
        /**
        * Subscribing to events like add group, delete group or switch group from group based top menu.
        */

        this.grpAddDelSub = this.dataService.addGrpObservable$.subscribe(function (res) {
          var validation = true;

          if (res['from'] == 'addGrp') {
            validation = _this.addGroup(res['grpName']);

            _this.dataService.emitOnAddedGrpObservable({
              validation: validation,
              grpName: _this.selectedGrpInfo,
              from: res['from']
            });
          }

          if (res['from'] == 'deleteGrp') {
            validation = _this.deleteSelectedGroup(res['grpName']);

            _this.dataService.emitOnAddedGrpObservable({
              validation: validation,
              grpName: _this.selectedGrpInfo,
              from: res['from']
            });
          }

          if (res['from'] == 'grpInfo') {
            validation = _this.openGroupInfo(res['grpName']);

            _this.dataService.emitOnAddedGrpObservable({
              validation: validation,
              grpName: _this.selectedGrpInfo,
              from: res['from']
            });
          }
        });
      }

      return _createClass(ScenarioLogsAndReportsComponent, [{
        key: "canDeactivate",
        value: function canDeactivate() {
          //insert logic to check if there are pending changes here;
          //returning true will navigate without confirmation
          //returning false will show a confirm alert before navigating away
          try {
            if (this.validateAndSetKeywordArray() == false) {
              return false;
            }
          } catch (e) {
            console.log("can Deactivate in compponents", e);
          }

          return true;
        }
        /**
          * This method is called, when user navigate from one component to another, and want to save data in conf file before navigation.
          */

      }, {
        key: "setDataInConf",
        value: function setDataInConf() {
          return true;
        }
      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          this.addGroupTab();
          this.arrKeywordData = this.keywordDefinition.chkAndGetKeywrdDataWithAdditionalKeys(this.screenKeywordList);

          if (this.keywordDefinition.isArrKeywordDataEmpty(this.arrKeywordData, this.screenKeywordList)) {
            this.keywordDefinition.setRequestKeywordListInBody(this.screenKeywordList, "");
            var obj = this.keywordDefinition.getRequestJsonParm();
            this.getKeywordData(obj); //error case

            if (this.arrKeywordData == null) this.arrKeywordData = {};
          } else {
            this.fillDataInComp();
          }
        }
      }, {
        key: "addGroupTab",
        value: function addGroupTab() {
          this.arrGrpList = this.dataService.getGroupNameList();

          if (this.arrGrpList.length == 0) {
            this.isGroupEnabled = 'none';
          } else {
            this.isGroupEnabled = '';
          }
        }
      }, {
        key: "addGroup",
        value: function addGroup(grpName) {
          if (this.validateAndSetKeywordArray() == false) return false;
          this.setDataOnGrpAdd(grpName);
          return true;
        }
      }, {
        key: "getKeywordData",
        value: function getKeywordData(obj) {
          var _this2 = this;

          this.scenarioHttpService.getDefaultKeywordData(obj).subscribe(function (state) {
            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_9__["GetDefaultKeywordDataLoadingState"]) {
              return;
            }

            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_9__["GetDefaultKeywordDataLoadedState"]) {
              _this2.keywordDefinition.setArrKeywordData(_this2.arrKeywordData, state.data, _this2.keywordDefinition.mergeKeywordData);

              _this2.fillDataInComp();

              return;
            }
          }, function (state) {
            console.log(state.error);
            return;
          });
        }
      }, {
        key: "fillDataInComp",
        value: function fillDataInComp() {
          var keys = Object.keys(this.arrKeywordData);

          for (var i = 0; i < keys.length; i++) //keyword iteration
          {
            var strKeyword = keys[i];
            var keyObj = this.arrKeywordData[strKeyword];
            var dataObj = this.arrKeywordData[strKeyword][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA];
            this.enableDisKeywordList[strKeyword] = this.dataService.isCompEnable(this.dataService.getScenMode(), keyObj, strKeyword);

            if (dataObj == undefined) {
              continue;
            }

            var grpKeys = Object.keys(dataObj); //no group present

            if (grpKeys.length == 0) continue;else if (strKeyword == 'G_REPORTING') {
              for (var ii = 0; ii < grpKeys.length; ii++) {
                if (grpKeys[ii] != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]) this.showGrpTab(grpKeys[ii]);else //this is the default tab case
                  {
                    var grpArr = dataObj[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]];
                    this.setReportingData(grpArr);
                  }
              }
            } else if (strKeyword == 'G_VUSER_TRACE') //screenKeywordList[0] means 'G_SESSION_PACING'
              {
                for (var _ii = 0; _ii < grpKeys.length; _ii++) {
                  if (grpKeys[_ii] != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]) this.showGrpTab(grpKeys[_ii]);else //this is the default tab case
                    {
                      var _grpArr = dataObj[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]];
                      this.setVUserTraceData(_grpArr);
                    }
                }
              } else if (strKeyword == 'G_SHOW_RUNTIME_RUNLOGIC_PROGRESS') {
              for (var _ii2 = 0; _ii2 < grpKeys.length; _ii2++) {
                if (grpKeys[_ii2] != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]) this.showGrpTab(grpKeys[_ii2]);else //this is the default tab case
                  {
                    var _grpArr2 = dataObj[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]];
                    this.setRuntimeRunlogicData(_grpArr2);
                  }
              }
            } else if (strKeyword == 'G_LOGGING') {
              for (var _ii3 = 0; _ii3 < grpKeys.length; _ii3++) {
                if (grpKeys[_ii3] != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]) this.showGrpTab(grpKeys[_ii3]);else //this is the default tab case
                  {
                    var _grpArr3 = dataObj[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]];
                    this.setLoggingData(_grpArr3);
                  }
              }
            } else if (strKeyword == 'G_TRACING') {
              for (var _ii4 = 0; _ii4 < grpKeys.length; _ii4++) {
                if (grpKeys[_ii4] != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]) this.showGrpTab(grpKeys[_ii4]);else //this is the default tab case
                  {
                    var _grpArr4 = dataObj[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]];
                    this.setTracingData(_grpArr4, _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]);
                  }
              }
            } else if (strKeyword == 'G_TRACING_LIMIT') {
              for (var _ii5 = 0; _ii5 < grpKeys.length; _ii5++) {
                if (grpKeys[_ii5] != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]) this.showGrpTab(grpKeys[_ii5]);else {
                  var _grpArr5 = dataObj[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]];
                  this.setTracingLimit(_grpArr5, _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]);
                }
              }
            }
          }

          this.dataService.upDateGroupMenuIcon();
        }
        /** G_VUSER_TRACE */

      }, {
        key: "validateAndSetVUser",
        value: function validateAndSetVUser() {
          var dataObj = [];
          if (this.chkVUser) dataObj.push(1);else dataObj.push(0);
          this.setArrayWithKeyWord('G_VUSER_TRACE', dataObj);
          return true;
        }
      }, {
        key: "deleteSelectedGroup",
        value: function deleteSelectedGroup(groupName) {
          if (confirm("Clear Logs And Reports Settings for group '" + groupName + "' ? \n It will use default settings.")) {
            if (groupName != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]) {
              for (var i = 0; i < this.dataService.groupList.length; i++) {
                if (this.dataService.groupList[i].label == groupName) {
                  this.dataService.groupList.splice(i, 1);
                  i = i - 1;
                }
              }

              if (this.validateAndSetKeywordArray() == false) return;
              this.flag = false;
              var sessdata = this.arrKeywordData["G_LOGGING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];

              if (sessdata != undefined) {
                delete this.arrKeywordData["G_LOGGING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
              }

              var firstData = this.arrKeywordData["G_TRACING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];

              if (firstData != undefined) {
                delete this.arrKeywordData["G_TRACING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
              }

              var secondData = this.arrKeywordData["G_REPORTING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];

              if (secondData != undefined) {
                delete this.arrKeywordData["G_REPORTING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
              }

              var thirdData = this.arrKeywordData["G_VUSER_TRACE"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];

              if (thirdData != undefined) {
                delete this.arrKeywordData["G_VUSER_TRACE"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
              }

              var fifthData = this.arrKeywordData["G_TRACING_LIMIT"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];

              if (fifthData != undefined) {
                delete this.arrKeywordData["G_TRACING_LIMIT"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
              }

              var sixthData = this.arrKeywordData["G_SHOW_RUNTIME_RUNLOGIC_PROGRESS"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];

              if (sixthData != undefined) {
                delete this.arrKeywordData["G_SHOW_RUNTIME_RUNLOGIC_PROGRESS"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
              }

              if (groupName == this.selectedGrpInfo) this.openGroupInfo(_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"], true);else this.openGroupInfo(this.selectedGrpInfo, true);
            }
          }

          return true;
        }
      }, {
        key: "setDataOnGrpAdd",
        value: function setDataOnGrpAdd(grpName) {
          this.selectedGrpInfo = grpName;
          this.flag = false;
          this.showGrpTab(grpName);
          this.copyKeywordFromDefault();
        }
        /**this function is used to add the Group Tab, selected by user */

      }, {
        key: "showGrpTab",
        value: function showGrpTab(groupLabel) {
          try {
            if (this.arrGrpList.indexOf(groupLabel) == -1) return;

            if (this.dataService.groupList.length != 0) {
              for (var i = 0; i < this.dataService.groupList.length; i++) {
                if (this.dataService.groupList[i].label == groupLabel) this.flag = true;
              }

              if (!this.flag) {
                this.dataService.groupList.push({
                  label: groupLabel,
                  value: groupLabel
                });

                for (var j = 0; j < this.groupList.length; j++) {
                  if (this.groupList[j].label == groupLabel) this.groupList.splice(j, 1);
                }

                this.flag = false;
              }
            } else {
              this.dataService.groupList.push({
                label: groupLabel,
                value: groupLabel
              });

              for (var _j = 0; _j < this.groupList.length; _j++) {
                if (this.groupList[_j].label == groupLabel) this.groupList.splice(_j, 1);
              }
            }
          } catch (e) {
            console.log("Exception in showGrpTab method = ", e);
          }
        }
      }, {
        key: "copyKeywordFromDefault",
        value: function copyKeywordFromDefault() {
          for (var i = 0; i < this.screenKeywordList.length; i++) {
            var grpArr = this.arrKeywordData[this.screenKeywordList[i]][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]];
            if (this.screenKeywordList[i] == "G_VUSER_TRACE") this.setVUserTraceData(grpArr);
            if (this.screenKeywordList[i] == "G_REPORTING") this.setReportingData(grpArr);else if (this.screenKeywordList[i] == "G_LOGGING") this.setLoggingData(grpArr);else if (this.screenKeywordList[i] == "G_TRACING") this.setTracingData(grpArr, _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]);else if (this.screenKeywordList[i] == "G_TRACING_LIMIT") this.setTracingLimit(grpArr, _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]);else if (this.screenKeywordList[i] == "G_SHOW_RUNTIME_RUNLOGIC_PROGRESS") this.setRuntimeRunlogicData(grpArr);
          }
        }
        /**
         * this function is called, when user clicks on any group tab
         */

      }, {
        key: "openGroupInfo",
        value: function openGroupInfo(groupName, isValidate) {
          if (isValidate == undefined) {
            if (this.validateAndSetKeywordArray() == false) return;
          } //setting selected group


          this.selectedGrpInfo = groupName;
          this.showDefaultValues();
          var reportingDataArr = this.arrKeywordData["G_REPORTING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
          this.setReportingData(reportingDataArr);
          var loggingDataArr = this.arrKeywordData["G_LOGGING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
          this.setLoggingData(loggingDataArr);
          var tracingDataArr = this.arrKeywordData["G_TRACING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
          this.setTracingData(tracingDataArr, groupName);
          var traceLimitArr = this.arrKeywordData["G_TRACING_LIMIT"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
          this.setTracingLimit(traceLimitArr, groupName);
          var vuserArr = this.arrKeywordData["G_VUSER_TRACE"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
          this.setVUserTraceData(vuserArr);
          var runlogicArr = this.arrKeywordData["G_SHOW_RUNTIME_RUNLOGIC_PROGRESS"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][groupName];
          this.setRuntimeRunlogicData(runlogicArr);
          return true;
        }
      }, {
        key: "setVUserTraceData",
        value: function setVUserTraceData(grpArr) {
          if (grpArr == undefined) grpArr = this.arrKeywordData["G_VUSER_TRACE"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]][0];else grpArr = grpArr[0]; //Need to review chkTrace is associated with G_TRACING

          if (grpArr[0] == 1) this.chkVUser = true;else this.chkVUser = false;
        }
      }, {
        key: "showDefaultValues",
        value: function showDefaultValues() {
          this.chkTrace = true;
          this.reportCheck = false;
          this.ddrSessionPercentage = 1;
          this.radLogLevel = 1;
          this.radTraceLevel = 3;
          this.radTraceSession = 0;
          this.traceEntries = 1024;
          this.traceLength = 10;
          this.inlineCheck = true;
          this.reqData = 10;
          this.resData = 1024;
          this.chkVUser = true;
          this.chkRunlogic = false;
        }
      }, {
        key: "setReportingData",
        value: function setReportingData(grpArr) {
          if (grpArr == undefined) grpArr = this.arrKeywordData["G_REPORTING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]][0];else grpArr = grpArr[0];
          this.reportCheck = grpArr[0] == "2" ? true : false;
          this.ddrSessionPercentage = grpArr[1] != null ? Number(grpArr[1]) : 1;
          this.ddrErrorPercentage = grpArr[2] != null ? Number(grpArr[2]) : 10;
          this.ddrMaxCount = grpArr[3] ? grpArr[3] : 25;
          this.urlPercentage = grpArr[4] != null ? Number(grpArr[4]) : 0;
          this.thresholdVal = grpArr[5] ? Number(grpArr[5]) : 500;
        }
      }, {
        key: "setLoggingData",
        value: function setLoggingData(grpArr) {
          if (grpArr == undefined) grpArr = this.arrKeywordData["G_LOGGING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]][0];else grpArr = grpArr[0];
          this.radLogLevel = grpArr[0];
        }
        /**
         * This method converts old (4.6.1/4.11.0/4.12.0) G_TRACING keyword to new format(4.13.0 onwards)
         */

      }, {
        key: "convertOldTracingKeyToNew",
        value: function convertOldTracingKeyToNew() {
          var tracingKeyGrpArr = Object.keys(this.arrKeywordData["G_TRACING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA]);
          var tracingKeyDataArr = this.arrKeywordData["G_TRACING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA];

          for (var _i = 0, _tracingKeyGrpArr = tracingKeyGrpArr; _i < _tracingKeyGrpArr.length; _i++) {
            var grpKey = _tracingKeyGrpArr[_i];
            var tracingData = tracingKeyDataArr[grpKey][0];

            if (!this.checkTracingKey(tracingData)) {
              var radTraceLevel = !tracingData[0] ? 0 : isNaN(parseInt(tracingData[0])) ? 0 : parseInt(tracingData[0]);

              if (radTraceLevel == 1 || radTraceLevel == 2) {
                tracingData[0] = 3;
              }

              var radTraceSession = isNaN(parseInt(tracingData[2])) ? 0 : parseInt(tracingData[2]);
              var isErrTracing = true;

              if (radTraceLevel != 0 && radTraceSession == 0) {
                isErrTracing = false;
                tracingData[2] = 1;
              }

              var limitMode = tracingData[5] == undefined ? 0 : isNaN(parseInt(tracingData[5])) ? 0 : parseInt(tracingData[5]);

              if (radTraceLevel != 0 && limitMode == 0 || limitMode == 2) {
                tracingData[5] = 1;

                if (isErrTracing) {
                  tracingData[6] = 100;
                  tracingData[7] = 100;
                } else {
                  tracingData[6] = 100;
                  tracingData[7] = 0;
                }
              } else {
                if (isErrTracing) {
                  tracingData[7] = tracingData[6];
                } else tracingData[7] = 0;
              }
            }
          }
        }
        /**
         * This methdo checks if G_TRACING keyword is as per new format(4.13.0 onwards) or not.
         */

      }, {
        key: "checkTracingKey",
        value: function checkTracingKey(grpArr) {
          var radTraceLevel = !grpArr[0] ? 0 : isNaN(parseInt(grpArr[0])) ? 0 : parseInt(grpArr[0]);

          if (radTraceLevel == 1 || radTraceLevel == 2) {
            return false;
          }

          var radTraceSession = isNaN(parseInt(grpArr[2])) ? 0 : parseInt(grpArr[2]);
          if (radTraceLevel != 0 && radTraceSession == 0) return false;
          var limitMode = grpArr[5] == undefined ? 0 : isNaN(parseInt(grpArr[5])) ? 0 : parseInt(grpArr[5]);
          if (radTraceLevel != 0 && limitMode == 0 || limitMode == 2) return false;
          if (radTraceLevel != 0 && grpArr.length <= 7) return false;
          return true;
        }
      }, {
        key: "setTracingData",
        value: function setTracingData(grpArr, grpName) {
          if (grpArr == undefined) grpArr = this.arrKeywordData["G_TRACING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]][0];else grpArr = grpArr[0];

          if (!this.checkTracingKey(grpArr)) {
            this.convertOldTracingKeyToNew();
            grpArr = this.arrKeywordData["G_TRACING"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][grpName][0];
          }

          this.radTraceLevel = !grpArr[0] ? 0 : isNaN(parseInt(grpArr[0])) ? 0 : parseInt(grpArr[0]);
          if (this.radTraceLevel == 0) this.chkTrace = false;else this.chkTrace = true;
          this.radTraceSession = isNaN(parseInt(grpArr[2])) ? 0 : parseInt(grpArr[2]);
          this.txtSession = grpArr[6] == undefined ? 1 : isNaN(parseInt(grpArr[6])) ? 1 : parseInt(grpArr[6]);
          this.inlineCheck = grpArr[4] == undefined ? false : grpArr[4] == "0" ? false : true;
          this.capErrorSession = grpArr[7] == undefined ? 1 : grpArr[7];
        }
        /**
        * This method converts old (4.6.1/4.11.0/4.12.0) G_TRACING_LIMIT keyword to new format(4.13.0 onwards)
        */

      }, {
        key: "convertOldTracingLimitKeyToNew",
        value: function convertOldTracingLimitKeyToNew() {
          var tracingLimitKeyGrpArr = Object.keys(this.arrKeywordData["G_TRACING_LIMIT"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA]);
          var tracingLimitKeyDataArr = this.arrKeywordData["G_TRACING_LIMIT"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA];

          for (var _i2 = 0, _tracingLimitKeyGrpAr = tracingLimitKeyGrpArr; _i2 < _tracingLimitKeyGrpAr.length; _i2++) {
            var grpKey = _tracingLimitKeyGrpAr[_i2];
            var tracingLimitData = tracingLimitKeyDataArr[grpKey][0];

            if (!this.checkTracingLimitKey(tracingLimitData)) {
              if (!tracingLimitData[2]) tracingLimitData[2] = 10240;
              if (!tracingLimitData[3]) tracingLimitData[3] = 1024 * 1024;
            }
          }
        }
        /**
         * This methdo checks if G_TRACING_LIMIT keyword is as per new format(4.13.0 onwards) or not.
         */

      }, {
        key: "checkTracingLimitKey",
        value: function checkTracingLimitKey(grpArr) {
          if (grpArr.length <= 2) return false;
          return true;
        }
      }, {
        key: "setTracingLimit",
        value: function setTracingLimit(grpArr, grpName) {
          var _a, _b, _c, _d;

          if (grpArr == undefined) grpArr = this.arrKeywordData["G_TRACING_LIMIT"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]][0];else grpArr = grpArr[0];

          if (!this.checkTracingLimitKey(grpArr)) {
            this.convertOldTracingLimitKeyToNew();
            grpArr = this.arrKeywordData["G_TRACING_LIMIT"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][grpName][0];
          }

          this.traceEntries = (_a = grpArr[0]) !== null && _a !== void 0 ? _a : 1024;
          this.traceLength = (_b = this.bytesToKB(grpArr[1]) == 0 ? 1 : this.bytesToKB(grpArr[1])) !== null && _b !== void 0 ? _b : 10;
          this.reqData = this.bytesToKB(grpArr[2]) == 0 || !this.bytesToKB(grpArr[2]) ? 10 : (_c = this.bytesToKB(grpArr[2])) !== null && _c !== void 0 ? _c : 10;
          this.resData = this.bytesToKB(grpArr[3]) == 0 || this.bytesToKB(grpArr[3]) == 1 || !this.bytesToKB(grpArr[3]) ? 1024 : (_d = this.bytesToKB(grpArr[3])) !== null && _d !== void 0 ? _d : 1024;
        }
      }, {
        key: "validateAndSetKeywordArray",
        value: function validateAndSetKeywordArray() {
          /**vallidation  */
          if (this.validateAndSetReporting() == false) return false;
          if (this.validateAndSetLogging() == false) return false;
          if (this.validateAndSetTracing() == false) return false;
          if (this.validateAndSetTraceLimit() == false) return false;
          if (this.validateAndSetVUser() == false) return false;
          if (this.validateAndSetRuntimeLogic() == false) return false; //All validation success

          for (var i = 0; i < this.screenKeywordList.length; i++) {
            this.schData.saveKeywordData[this.screenKeywordList[i]] = this.arrKeywordData[this.screenKeywordList[i]].data;
          }

          return true;
        }
      }, {
        key: "checkAndLimitValue",
        value: function checkAndLimitValue(event, error, url) {
          var enteredValue = Number(event.target.value);

          if (!error) {
            if (enteredValue > 10) {
              if (url) {
                this.urlPercentage = 10;
              } else {
                this.ddrSessionPercentage = 10;
              }

              this.scenarioUtilsService.errorMessage("Value cannot be greater than 10");
            }
          } else {
            if (enteredValue > 100) {
              this.ddrErrorPercentage = 100;
              this.scenarioUtilsService.errorMessage("Value cannot be greater than 100");
            }
          }
        }
        /** G_REPORTING */

      }, {
        key: "validateAndSetReporting",
        value: function validateAndSetReporting() {
          var dataObj = [];

          if (this.ddrSessionPercentage == 0 && this.ddrErrorPercentage == 0 && this.urlPercentage == 0) {
            this.scenarioUtilsService.errorMessage("You cannot assign 0% to all sessions, error sessions, and high response sessions at the same time.");
            return false;
          }

          if ((this.ddrSessionPercentage < 0 || this.ddrSessionPercentage > 10) && this.reportCheck) {
            this.scenarioUtilsService.errorMessage("Number of session percentage for DDR report should be limited to 0-10");
            return false;
          }

          if ((this.ddrErrorPercentage < 0 || this.ddrErrorPercentage > 100) && this.reportCheck) {
            this.scenarioUtilsService.errorMessage("Number of error percentage for DDR report should be limited to 0-100.");
            return false;
          }

          if (this.ddrMaxCount < 1 && this.reportCheck) {
            this.scenarioUtilsService.errorMessage("Maximum count for DDR report should not be lower than 1.");
            return false;
          }

          if (this.reportCheck) {
            dataObj.push(2);
            dataObj.push(this.ddrSessionPercentage);
            dataObj.push(this.ddrErrorPercentage);
            dataObj.push(this.ddrMaxCount);
            dataObj.push(this.urlPercentage);
            dataObj.push(this.thresholdVal);
          } else {
            dataObj.push(1);
            dataObj.push(0);
          }

          this.setArrayWithKeyWord('G_REPORTING', dataObj);
          return true;
        }
      }, {
        key: "setArrayWithKeyWord",
        value: function setArrayWithKeyWord(keyword, temObj) {
          var dataObj = this.arrKeywordData[keyword][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA];

          if (dataObj[this.selectedGrpInfo] != undefined) {
            dataObj[this.selectedGrpInfo] = [];
            dataObj[this.selectedGrpInfo].push(temObj);
          } else {
            dataObj[this.selectedGrpInfo] = [temObj];
          }
        }
        /**
        * G_LOGGING
        */

      }, {
        key: "validateAndSetLogging",
        value: function validateAndSetLogging() {
          var dataObj = [];
          dataObj.push(this.radLogLevel);
          dataObj.push(0);
          this.setArrayWithKeyWord('G_LOGGING', dataObj);
          return true;
        }
        /** G_TRACING */

      }, {
        key: "validateAndSetTracing",
        value: function validateAndSetTracing() {
          var dataObj = [];

          if (this.reportCheck && this.chkTrace) {
            //Need to set greater than 0 always if tracing is enabled
            dataObj.push(this.radTraceLevel == 0 ? 3 : this.radTraceLevel);
            dataObj.push(1);
            dataObj.push(this.radTraceSession);
            dataObj.push(0);
            if (this.inlineCheck == false) //Max-log-size... it is always zero and handled by backend.
              dataObj.push(0);else dataObj.push(1);
            if (this.txtSession > 0 || this.capErrorSession > 0) dataObj.push(1);else dataObj.push(0);
            if (this.validateNumber(this.txtSession) == false) return false;

            if (this.txtSession == null) {
              this.scenarioUtilsService.errorMessage('Network log percentage value for all sessions can not be blank.');
              return false;
            }

            if (this.txtSession < 0 || this.txtSession > 100) {
              this.scenarioUtilsService.errorMessage("Network logs percentage value for all sessions can not be greater than 100 or less than 0.");
              return false;
            }

            if (this.txtSession > 0) dataObj.push(this.txtSession);else dataObj.push(0);
            if (this.validateNumber(this.capErrorSession) == false) return false;

            if (this.capErrorSession == null) {
              this.scenarioUtilsService.errorMessage('Network logs percentage value for error sessions can not be blank.');
              return false;
            }

            if (this.capErrorSession < 0 || this.capErrorSession > 100) {
              this.scenarioUtilsService.errorMessage("Network logs percentage value for error sessions can not be greater than 100 or less than 0.");
              return false;
            }

            if (this.capErrorSession > 0) dataObj.push(this.capErrorSession);else dataObj.push(0);

            if (this.txtSession == 0 && this.capErrorSession == 0) {
              this.scenarioUtilsService.errorMessage("Capture network log fields for both all sessions and error sessions can not be 0 at the same time.");
              return false;
            }
          } else {
            dataObj = ["0", "1", "1", "0", "0", "1", "1", "1"];
          }

          this.setArrayWithKeyWord('G_TRACING', dataObj);
          return true;
        }
      }, {
        key: "validateNumber",
        value: function validateNumber(value) {
          var pattern = /^[0-9.]*$/;

          if (!pattern.test(value)) {
            this.scenarioUtilsService.errorMessage("Please enter valid number.");
            return false;
          }

          return true;
        }
      }, {
        key: "validateAndSetTraceLimit",
        value: function validateAndSetTraceLimit() {
          if (this.validateNumber(this.traceEntries) == false) return false;

          if (this.chkTrace && this.traceEntries == null) {
            this.scenarioUtilsService.errorMessage("Trace Entries mode cannot be null");
            return false;
          }

          if (this.chkTrace && (this.traceEntries > 64000 || this.traceEntries < 1)) {
            this.scenarioUtilsService.errorMessage("Trace Entries mode cannot be greater than 64000 or less than 1");
            return false;
          }

          if (this.validateNumber(this.traceLength) == false) return false;

          if (this.chkTrace && this.traceLength == null) {
            this.scenarioUtilsService.errorMessage("Trace length mode cannot be null");
            return false;
          }

          if (this.chkTrace && (this.traceLength > 65536 || this.traceLength < 1)) {
            this.scenarioUtilsService.errorMessage("Trace length mode cannot be greater than 65536 or less than 1");
            return false;
          }

          if (this.validateNumber(this.reqData) == false) return false;

          if (this.chkTrace && this.reqData == null) {
            this.scenarioUtilsService.errorMessage("Size of single request data mode cannot be null");
            return false;
          }

          if (this.chkTrace && this.reqData < 1) {
            this.scenarioUtilsService.errorMessage("Size of single request data mode cannot be less than 1");
            return false;
          }

          if (this.validateNumber(this.resData) == false) return false;

          if (this.chkTrace && this.resData == null) {
            this.scenarioUtilsService.errorMessage("Size of single response data mode cannot be null");
            return false;
          }

          if (this.chkTrace && this.resData < 1) {
            this.scenarioUtilsService.errorMessage("Size of single response data mode cannot be less than 1");
            return false;
          }

          var dataObj = [];

          if (this.chkTrace) {
            dataObj.push(this.traceEntries);
            dataObj.push(this.KBToBytes(this.traceLength));
            dataObj.push(this.KBToBytes(this.reqData));
            dataObj.push(this.KBToBytes(this.resData));
          } else {
            dataObj.push(1024);
            dataObj.push(10240);
            dataObj.push(10240);
            dataObj.push(1048576);
          }

          this.setArrayWithKeyWord('G_TRACING_LIMIT', dataObj);
          return true;
        }
      }, {
        key: "validateAndSaveData",
        value: function validateAndSaveData() {
          if (this.validateAndSetKeywordArray()) {
            this.scenarioUtilsService.saveComponentData(0, {});
          }
        }
      }, {
        key: "validateQty",
        value: function validateQty(event, isZeroAllowed) {
          if (!isZeroAllowed && event.charCode > 31 && event.charCode != 46 && (event.charCode < 48 || event.charCode > 57)) return false;else if (isZeroAllowed && event.charCode > 31 && event.charCode != 46 && (event.charCode < 47 || event.charCode > 57)) return false;
          return true;
        }
      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          if (this.grpAddDelSub) this.grpAddDelSub.unsubscribe();
          if (this.saveData) this.saveData.unsubscribe();
          this.dataService.resetGrpBasedTopMenuData();
        }
        /** G_SHOW_RUNTIME_RUNLOGIC_PROGRESS */

      }, {
        key: "validateAndSetRuntimeLogic",
        value: function validateAndSetRuntimeLogic() {
          var dataObj = [];
          if (this.chkRunlogic) dataObj.push(1);else dataObj.push(0);
          this.setArrayWithKeyWord('G_SHOW_RUNTIME_RUNLOGIC_PROGRESS', dataObj);
          return true;
        }
      }, {
        key: "setRuntimeRunlogicData",
        value: function setRuntimeRunlogicData(grpArr) {
          if (grpArr == undefined) grpArr = this.arrKeywordData["G_SHOW_RUNTIME_RUNLOGIC_PROGRESS"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD_DATA_KEY"].DATA][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_GROUP"]][0];else grpArr = grpArr[0];
          if (grpArr[0] == 1) this.chkRunlogic = true;else this.chkRunlogic = false;
        }
      }, {
        key: "bytesToKB",
        value: function bytesToKB(bytes) {
          return Math.round(bytes / 1024);
        }
      }, {
        key: "bytesToMB",
        value: function bytesToMB(bytes) {
          return parseInt((bytes / (1024 * 1024)).toFixed(1));
        }
      }, {
        key: "KBToBytes",
        value: function KBToBytes(kilobytes) {
          return kilobytes * 1024;
        }
      }, {
        key: "MBToBytes",
        value: function MBToBytes(mb) {
          return Math.round(mb * 1024 * 1024);
        }
      }]);
    }();

    ScenarioLogsAndReportsComponent.ctorParameters = function () {
      return [{
        type: _service_scen_keyword_definition_service__WEBPACK_IMPORTED_MODULE_3__["ScenKeywordDefinitionService"]
      }, {
        type: _service_group_based_settings_data_service__WEBPACK_IMPORTED_MODULE_7__["GroupBasedSettingDataService"]
      }, {
        type: primeng__WEBPACK_IMPORTED_MODULE_2__["ConfirmationService"]
      }, {
        type: _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_5__["ScenarioUtilsService"]
      }, {
        type: _service_scenario_http_service__WEBPACK_IMPORTED_MODULE_4__["ScenarioHttpService"]
      }, {
        type: _service_sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_6__["SchScheduleDataService"]
      }, {
        type: _service_test_mode_service__WEBPACK_IMPORTED_MODULE_10__["TestModeService"]
      }];
    };

    ScenarioLogsAndReportsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-scenario-logs-and-reports',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./scenario-logs-and-reports.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./scenario-logs-and-reports.component.scss */
      "./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.component.scss"))["default"]]
    })], ScenarioLogsAndReportsComponent);
    /***/
  },

  /***/
  "./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.module.ts":
  /*!************************************************************************************************************************!*\
    !*** ./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.module.ts ***!
    \************************************************************************************************************************/

  /*! exports provided: ScenarioLogsAndReportsModule */

  /***/
  function _src_app_pages_scenario_groupBasedSettingsMain_scenarioLogsAndReports_scenarioLogsAndReportsModuleTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ScenarioLogsAndReportsModule", function () {
      return ScenarioLogsAndReportsModule;
    });
    /* 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 _scenario_logs_and_reports_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./scenario-logs-and-reports.component */
    "./src/app/pages/scenario/group-based-settings-main/scenario-logs-and-reports/scenario-logs-and-reports.component.ts");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


    var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! @angular/router */
    "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
    /* harmony import */


    var primeng__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! primeng */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
    /* harmony import */


    var _interface_scenario_routing_guard__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! ../../interface/scenario-routing-guard */
    "./src/app/pages/scenario/interface/scenario-routing-guard.ts");
    /* harmony import */


    var primeng_toast__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! primeng/toast */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toast.js");

    var route = [{
      path: '',
      component: _scenario_logs_and_reports_component__WEBPACK_IMPORTED_MODULE_3__["ScenarioLogsAndReportsComponent"],
      canDeactivate: [_interface_scenario_routing_guard__WEBPACK_IMPORTED_MODULE_7__["ScenRoutingGuard"]]
    }];

    var ScenarioLogsAndReportsModule = /*#__PURE__*/_createClass(function ScenarioLogsAndReportsModule() {
      _classCallCheck(this, ScenarioLogsAndReportsModule);
    });

    ScenarioLogsAndReportsModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
      declarations: [_scenario_logs_and_reports_component__WEBPACK_IMPORTED_MODULE_3__["ScenarioLogsAndReportsComponent"]],
      imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["FileUploadModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormsModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["ToggleButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["DropdownModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["ButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["SelectButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["InputTextModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["TableModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["CardModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["CheckboxModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["MessageModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["RadioButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["SpinnerModule"], primeng__WEBPACK_IMPORTED_MODULE_6__["TooltipModule"], primeng_toast__WEBPACK_IMPORTED_MODULE_8__["ToastModule"], _angular_router__WEBPACK_IMPORTED_MODULE_5__["RouterModule"].forChild(route)],
      exports: [_scenario_logs_and_reports_component__WEBPACK_IMPORTED_MODULE_3__["ScenarioLogsAndReportsComponent"]]
    })], ScenarioLogsAndReportsModule);
    /***/
  }
}]);