function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }

function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }

function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }

function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }

function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }

function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }

function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }

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([["nf-log-parser-config-nf-log-parser-config-module"], {
  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nf-log-parser-config/nf-log-parser-config.component.html":
  /*!**********************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nf-log-parser-config/nf-log-parser-config.component.html ***!
    \**********************************************************************************************************************/

  /*! exports provided: default */

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

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


    __webpack_exports__["default"] = "<div class=\"log-parser-config ns-scenario overflow h-100vh-80\">\n    <p-toolbar class=\"ui-primary-toolbar\" styleClass=\"radius2\">\n        <div class=\"p-grid p-justify-between p-align-center px-10 py-4\" style=\"height: 40px;\">\n            <div class=\"font-weight-600 font-14\">Log Parser Configuration </div>\n            <div *ngIf=\"showAdd\">\n                <button type=\"button\" [disabled]=\"isErrorFound || disableButton == true\" pButton class=\"ui-btn-primary\" label=\"Add Configuration\"\n                    (click)=\"isAddConfig()\"></button>\n            </div>\n        </div>\n    </p-toolbar>\n\n    <form [formGroup]=\"configurationForm\">\n        <div class=\"p-grid\" *ngIf=\"isAddConfiguration\">\n\n            <div class=\"p-col-3\">\n                <div class=\"my-8\">Tier Name</div>\n                <p-dropdown [options]=\"tierName\" formControlName=\"tier\" \n                    [style]=\"{'min-width':'100%'}\" editable=\"true\" placeholder=\"Type or Select\"></p-dropdown>\n            </div>\n\n            <div class=\"p-col-3\">\n                <div class=\"my-8\">Env Name</div>\n                <p-dropdown [options]=\"evnNode\" formControlName=\"env\" \n                    [style]=\"{'min-width':'100%'}\" editable=\"true\" placeholder=\"Type or Select\"></p-dropdown>\n            </div>\n\n            <div class=\"p-col-3\">\n                <div class=\"my-8\">Technology</div>\n                <p-dropdown [options]=\"technology\" formControlName=\"tech\" \n                    [style]=\"{'min-width':'100%'}\" (onChange)=\"selectTechValue($event)\"\n                    placeholder=\"Select\" [filter]=\"true\"></p-dropdown>\n            </div>\n\n            <div class=\"p-col-3\">\n                <div class=\"my-8\">Log Type</div>\n                <p-dropdown [options]=\"logType\" [(ngModel)]=\"logTypeVal\" formControlName=\"type\"\n                     [style]=\"{'min-width':'100%'}\"\n                    (onChange)=\"selectTypeValue($event)\" placeholder=\"Select\"></p-dropdown>\n            </div>\n\n            <div class=\"p-col-3\">\n                <div class=\"my-8\">Source</div>\n                <p-dropdown [options]=\"sourcePlugins\" formControlName=\"source\" \n                    [style]=\"{'min-width':'100%'}\" placeholder=\"Select\"></p-dropdown>\n            </div>\n            <div class=\"p-col-6\">\n                <div class=\"my-8\">Log Path</div>\n                <input type=\"text\" pInputText [(ngModel)]=\"pathData\" formControlName=\"path\"\n                    placeholder=\"Ex-/run/log/journal\" [style]=\"{'min-width':'100%'}\">\n            </div>\n          <app-cav-loader *ngIf=\"addLoading\"></app-cav-loader>\n            <div class=\"p-grid p-justify-center p-col-3 my-28\">\n                <button type=\"button\" pButton class=\"ui-btn-primary mx-6\" [disabled]=\"!(configurationForm.valid) || (disableButton)\"\n                    label=\"Add\" (click)=\"AddConfiguration()\"></button>\n                <button type=\"button\" pButton class=\"btn-secondary-outline mx-6\" label=\"Cancel\"\n                    (click)=\"cancelConfig()\"></button>\n            </div>\n        </div>\n    </form>\n\n    <div class=\"border-5 border-all p-4 radius2\" *ngIf=\"noLogIndexList\">\n        <div class=\"p-grid\">\n            <div class=\"p-col-3 mt-5\">\n                <p-table #dt [scrollable]=\"true\" [globalFilterFields]=\"['env','data.env','tier','data.tier']\"\n                   scrollHeight=\"{{changeTableHeight}}px\" [value]=\"logIndexLists\" selectionMode=\"single\" [resizableColumns]=\"true\"\n                    [(selection)]=\"selectedTier\">\n                    <ng-template pTemplate=\"caption\">\n                        <div class=\"p-grid p-justify-between p-align-center\">\n                            <div class=\"type-search p-col\">\n                                <i class=\"right-icon icons8 icons8-search mt-8 mr-8\"></i>\n                                <input type=\"text\" class=\"input-sm w-100-p\" pInputText placeholder=\"Search...\"\n                                    (input)=\"dt.filterGlobal($event.target.value, 'contains')\">\n                            </div>\n                            <div class=\"p-col-fixed\">\n                                <button type=\"button\" [disabled]=\"disableButton\" pTooltip=\"Delete selected Configuration\" pButton\n                                    class=\"btn-sm ui-button-danger\" (click)=\"deleteConfiguration()\"\n                                    icon=\"icons8 icons8-trash\"></button>\n                            </div>\n                        </div>\n                    </ng-template>\n                    <ng-template pTemplate=\"colgroup\" let-columns>\n                        <colgroup>\n                            <col style=\"width:15%\">\n                            <col style=\"width:45%\">\n                            <col style=\"width:40%\">\n                        </colgroup>\n                    </ng-template>\n                    <ng-template pTemplate=\"header\" let-columns>\n                        <tr>\n                            <th pResizableColumn>\n                                <p-checkbox name=\"groupname\" [(ngModel)]=\"isSelectedAll\" [binary]=\"true\"\n                                    (onChange)=\"selectAllValue(isSelectedAll)\"></p-checkbox>\n                            </th>\n                            <th pResizableColumn>Tier Name</th>\n                            <th pResizableColumn>Env Name</th>\n                        </tr>\n                    </ng-template>\n                    <ng-template pTemplate=\"body\" let-row let-columns=\"columns\" let-data let-i=\"rowIndex\">\n                        <tr [pSelectableRow]=\"row\" (click)=\"getSelectedIndexValue(data.tier,data.env,data.id)\">\n                            <td class=\"text-center\">\n                                <p-checkbox name=\"groupname\" [(ngModel)]=\"data.isSelected\" [binary]=\"true\"\n                                    (onChange)=\"addSelectedValue(data.isSelected, 'nfagent_config'+'_'+data.env +'_'+ data.tier, data.id)\"></p-checkbox>\n                            </td>\n                            <td class=\"text-center\" pTooltip=\"{{data.tier}}\">\n                                {{data.tier}}\n                            </td>\n                            <td class=\"text-center\" pTooltip=\"{{data.env}}\">\n                                {{data.env}}\n                            </td>\n                        </tr>\n                    </ng-template>\n                </p-table>\n            </div>\n            <div class=\"p-col\">\n                <div class=\"p-grid\">\n                    <div class=\"p-col-12\" *ngIf=\"getsummaryData.length > 0\">\n                        <p-table [scrollable]=\"true\" scrollHeight=\"110px\" [columns]=\"summaryCols\"\n                            [rows]=\"10\" [showCurrentPageReport]=\"true\" [rowsPerPageOptions]=\"[10,25,50]\"\n                            [paginator]=\"true\" currentPageReportTemplate=\"Showing {first} to {last} of {totalRecords} entries\"\n                            [value]=\"getsummaryData\" [(selection)]=\"selectedSummary\" selectionMode=\"single\">\n                            <ng-template pTemplate=\"colgroup\" let-columns>\n                                <colgroup>\n                                    <col style=\"width:45%\">\n                                    <col style=\"width:15%\">\n                                    <col style=\"width:25%\">\n                                    <col style=\"width:20%\">\n                                    <col style=\"width:25%\">\n                                    <col style=\"width:20%\">\n                                </colgroup>\n                            </ng-template>\n                            <ng-template pTemplate=\"header\" let-columns>\n                                <tr>\n                                    <th *ngFor=\"let col of columns\">\n                                        {{col.header}}\n                                    </th>\n                                    <th>\n                                        Action\n                                    </th>\n                                </tr>\n                            </ng-template>\n                            <ng-template pTemplate=\"body\" let-row let-rowData let-columns=\"columns\" let-i=\"rowIndex\">\n                                <tr [pSelectableRow]=\"row\" (click)=\"selectSummarydata(rowData)\">\n                                    <td *ngFor=\"let col of columns\" class=\"text-center\" pTooltip=\"{{rowData[col.field]}}\">\n                                        {{rowData[col.field]}}\n                                    </td>\n                                    <td class=\"width-120 text-center\">\n                                        <button pButton class=\"btn-icon\" pTooltip=\"{{ viewInput == true ? 'Hide' : 'View' }}\" type=\"button\"\n                                            icon=\"icons8 icons8-view\" (click)=\"viewConfiguration()\">\n                                        </button>\n                                        <button pButton class=\"btn-icon\" tooltipPosition=\"top\" pTooltip=\"{{ viewInput == true ? 'Edit Mode' : 'To edit the file click on view button' }}\" type=\"button\"\n                                        icon=\"icons8 icons8-edit\" [disabled]=\"!viewInput\" (click)=\"editConfiguration()\">\n                                        </button>\n                                        <button pButton type=\"button\" [disabled]=\"disableButton\" pTooltip=\"Delete\" icon=\"icons8 icons8-trash\"\n                                           (click)=\"deleteLogPathData(rowData,i)\" class=\"btn-icon\">\n                                        </button>\n                                    </td>\n                                </tr>\n                            </ng-template>\n                        </p-table>\n                    </div>\n                    <app-cav-loader *ngIf=\"isSumdataLoading\" ></app-cav-loader>\n                    <div class=\"p-col-6\" *ngIf=\"viewInput\">\n                        <div class=\"ui-primary-toolbar border-all border-5\">\n                            <div class=\"ui-toolbar px-8  p-grid p-align-center p-justify-between height-36\">\n                                <span><b>Log Source File</b></span>\n                                <span *ngIf=\"disableSave\"><i class=\"icons8 icons8-edit-2 blinking\"></i><b>Edit Mode</b></span>\n                            </div>\n                        </div>\n                        <div class=\"border-all border-5 p-5 w-100-p custombar\" *ngIf=\"noSummaryIndex\">\n                            <textarea class=\"w-100-p\" [ngClass]=\"changeTextAreaHeight\" id=\"input\" style=\"outline: none;resize: none;\" pInputTextarea\n                                [(ngModel)]=\"inputParserVal\" readonly> </textarea>\n                        </div>\n                        <div class=\"border-all border-5 p-5 w-100-p custombar\" *ngIf=\"!noSummaryIndex\">\n                            <textarea class=\"w-100-p\" [ngClass]=\"changeTextAreaHeight\" id=\"input\" style=\"outline: none;resize: none;\" pInputTextarea\n                                [(ngModel)]=\"inputParserVal\" readonly> </textarea>\n                        </div>\n                    </div>\n                    <div class=\"p-col-6\" *ngIf=\"viewInput\">\n                        <div class=\"ui-primary-toolbar border-all border-5\">\n                            <div class=\"ui-toolbar px-8  p-grid p-align-center p-justify-between height-36\">\n                                <span><b>Log Parser File</b></span>\n                                <span *ngIf=\"disableSave\"><i class=\"icons8 icons8-edit-2 blinking\"></i><b>Edit Mode</b></span>\n                                <span *ngIf=\"noSummaryIndex\">\n                                    <p-dropdown [options]=\"filterLabel\"  [(ngModel)]=\"selectedFilterName\"\n                                    (onChange)=\"selectFilterVal($event)\" [style]=\"{'min-width':'220px'}\"\n                                    placeholder=\"Select\" [filter]=\"true\"></p-dropdown>\n                                </span>\n                            </div>\n                        </div>\n                        <div class=\"border-all border-5 p-5 w-100-p custombar\" *ngIf=\"noSummaryIndex\">\n                            <textarea class=\"w-100-p\" [ngClass]=\"changeTextAreaHeight\" id=\"filter\" style=\"outline: none;resize: none;\" pInputTextarea\n                                [(ngModel)]=\"filterParserVal\" readonly> </textarea>\n                        </div>\n                        <div class=\"border-all border-5 p-5 w-100-p custombar\" *ngIf=\"!noSummaryIndex\">\n                            <textarea class=\"w-100-p\" [ngClass]=\"changeTextAreaHeight\" id=\"filter\" style=\"outline: none;resize: none;\" pInputTextarea\n                                [(ngModel)]=\"filterParserVal\" readonly> </textarea>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"p-grid p-justify-center\" *ngIf=\"disableSave\">\n                    <button type=\"button\" pButton [disabled]=\"disableButton\" class=\"ui-btn-primary\" label=\"SAVE\" (click)=\"editSaveJson()\"></button>\n                </div>\n            </div>\n        </div>\n    </div>\n    <app-cav-loader *ngIf=\"indexLoading\" ></app-cav-loader>\n\n    <p-dialog header=\"Connection Error\" [(visible)]=\"isErrorFound\" [style]=\"{width: '50vw'}\" [baseZIndex]=\"10000\">\n        <p><b>{{errorMessage}}</b></p>\n        <ul class=\"ul-styled\">\n            <li>Please check your database connection.</li>\n            <li>Please check for the LogMon server is running or not.</li>\n            <li>If issue still persist please contact to the support team.</li>\n        </ul>\n    </p-dialog>\n</div>";
    /***/
  },

  /***/
  "./src/app/pages/nf-log-parser-config/nf-log-parser-config.component.scss":
  /*!********************************************************************************!*\
    !*** ./src/app/pages/nf-log-parser-config/nf-log-parser-config.component.scss ***!
    \********************************************************************************/

  /*! exports provided: default */

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

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


    __webpack_exports__["default"] = "app-nf-log-parser-config .log-parser-config {\n  padding: 12px;\n}\napp-nf-log-parser-config .log-parser-config .opc8 {\n  opacity: 0.8;\n}\napp-nf-log-parser-config .log-parser-config .tab-navigation {\n  padding: 6px;\n  border-radius: 3px;\n  cursor: pointer;\n  position: relative;\n  margin-bottom: 10px;\n}\napp-nf-log-parser-config .log-parser-config .tab-navigation.active {\n  background-color: rgba(0, 118, 255, 0.1);\n}\napp-nf-log-parser-config .log-parser-config .tab-navigation .checkbox {\n  position: absolute;\n  right: 6px;\n  top: 6px;\n  z-index: 5;\n}\napp-nf-log-parser-config .log-parser-config .tab-navigation:last-child {\n  margin-bottom: 0px;\n}\napp-nf-log-parser-config .log-parser-config .customBar {\n  overflow: auto;\n}\napp-nf-log-parser-config .log-parser-config .toggle-button-link .ui-button-text.ui-unselectable-text {\n  display: none;\n}";
    /***/
  },

  /***/
  "./src/app/pages/nf-log-parser-config/nf-log-parser-config.component.ts":
  /*!******************************************************************************!*\
    !*** ./src/app/pages/nf-log-parser-config/nf-log-parser-config.component.ts ***!
    \******************************************************************************/

  /*! exports provided: NfLogParserConfigComponent */

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

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


    __webpack_require__.d(__webpack_exports__, "NfLogParserConfigComponent", function () {
      return NfLogParserConfigComponent;
    });
    /* 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_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


    var _nf_log_parser_service_nf_log_parser_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./nf-log-parser-service/nf-log-parser.service */
    "./src/app/pages/nf-log-parser-config/nf-log-parser-service/nf-log-parser.service.ts");
    /* harmony import */


    var _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./nf-log-parser-service/nf-log-parser.state */
    "./src/app/pages/nf-log-parser-config/nf-log-parser-service/nf-log-parser.state.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 _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! @angular/common/http */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
    /* harmony import */


    var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! rxjs/operators */
    "./node_modules/rxjs/_esm2015/operators/index.js");
    /* harmony import */


    var src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! src/app/shared/cav-nav-bar/cav-nav-bar.service */
    "./src/app/shared/cav-nav-bar/cav-nav-bar.service.ts");
    /* harmony import */


    var src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! src/app/shared/cav-toast/service/cav-message.service */
    "./src/app/shared/cav-toast/service/cav-message.service.ts");
    /* harmony import */


    var _tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
    /*! ../tools/admin/access-control-management/constants/cav-acl-features.constants */
    "./src/app/pages/tools/admin/access-control-management/constants/cav-acl-features.constants.ts");
    /* harmony import */


    var _tools_admin_access_control_services_access_control_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
    /*! ../tools/admin/access-control/services/access-control.model */
    "./src/app/pages/tools/admin/access-control/services/access-control.model.ts");
    /* harmony import */


    var src_app_core_breadcrumb_breadcrumb_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
    /*! src/app/core/breadcrumb/breadcrumb.service */
    "./src/app/core/breadcrumb/breadcrumb.service.ts");

    var NfLogParserConfigComponent = /*#__PURE__*/function () {
      function NfLogParserConfigComponent(http, nfLogParserService, messageService, sessionService, cavNavBarService, breadcrumbService) {
        var _this = this;

        _classCallCheck(this, NfLogParserConfigComponent);

        this.http = http;
        this.nfLogParserService = nfLogParserService;
        this.messageService = messageService;
        this.sessionService = sessionService;
        this.cavNavBarService = cavNavBarService;
        this.breadcrumbService = breadcrumbService;
        this.isAddConfiguration = false;
        this.tierName = [];
        this.evnNode = [];
        this.technology = [];
        this.isActive = false;
        this.logIndexLists = [];
        this.summaryData = [];
        this.inputConf = true;
        this.filterConf = true;
        this.outputConf = true;
        this.techObj = [];
        this.parserData = [];
        this.showConfigData = false;
        this.filterData = [];
        this.inputJsonPreview = [];
        this.filterJsonPreview = [];
        this.outputJsonPreview = [];
        this.selectedIndex = [];
        this.indicesList = [];
        this.isClicked = false;
        this.hostPort = [];
        this.filterValue = [];
        this.filterFile = [];
        this.isSaveConfig = false;
        this.isGetConfig = false;
        this.viewInput = false;
        this.outputTooltip = false;
        this.filterTooltip = false;
        this.getsummaryData = [];
        this.logType = [];
        this.isSelectedAll = false;
        this.parserKBJson = [];
        this.techDir = [];
        this.showAdd = true;
        this.headers = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpHeaders"]();
        this.index_id = [];
        this.configIndexData = [];
        this.sumDataArray = [];
        this.existIndex = false;
        this.configIndex = [];
        this.noLogIndexList = false;
        this.tierVal = [];
        this.disableButton = false;
        this.isErrorFound = false;
        this.indexLoading = true;
        this.isSummaryIndex = [];
        this.isSumdataLoading = true;
        this.filterArray = [];
        this.filterLabel = [];
        this.isPermissionForLogParser = false;
        this.addLoading = false; //configuration form of log parser manager

        this.configurationForm = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormGroup"]({
          tier: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]('', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required),
          env: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]('', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required),
          source: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]('', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required),
          type: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]('', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required),
          path: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]('', [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required, this.noWhitespaceValidator]),
          tech: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]('', _angular_forms__WEBPACK_IMPORTED_MODULE_2__["Validators"].required)
        });
        this.cavNavBarService.showNavBar = false;
        this.changeTableHeight = 465;
        this.changeTextAreaHeight = 'height-350';
        this.isPermissionForLogParser = this.sessionService.isFeatureWrite(_tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_10__["CAV_FEATURES"].LOGS.NAME, _tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_10__["CAV_FEATURES"].LOGS.SUB_FEATURES.LOG_PARSERS);

        if (this.isPermissionForLogParser == false) {
          this.disableButton = true;
        } //dropdown array for source field


        this.sourcePlugins = [{
          label: 'File',
          value: 'file'
        }, {
          label: 'Journald',
          value: 'journald'
        }];
        var testRun = this.sessionService.session.testRun.id;
        var url = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + "/DashboardServer/v2/monitor/topology/getTiers?tr=" + testRun + "&topoName=default";
        this.headers = this.headers.append('cctx', localStorage.getItem('cctx')); //http rest call for getting tier value

        this.http.get(url, {
          'headers': this.headers
        }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["map"])(function (res) {
          return res;
        })).subscribe(function (data) {
          for (var i = 0; i <= data['data'].length - 1; i++) {
            _this.tierVal.push({
              label: data['data'][i].tName,
              value: data['data'][i].tName
            });
          }

          console.log(_this.tierVal);
        });
      }

      return _createClass(NfLogParserConfigComponent, [{
        key: "ngOnInit",
        value: function ngOnInit() {
          var _this2 = this;

          this.summaryCols = [{
            field: 'log_path',
            header: 'Log Path'
          }, {
            field: 'type',
            header: 'Log Type'
          }, {
            field: 'filterid',
            header: 'Auto Detect/Configured'
          }, {
            field: 'index',
            header: 'Index Name'
          }, {
            field: 'parser',
            header: 'Parser'
          }];
          var envName = [];
          var tierName = []; //get tier data rest call().

          this.nfLogParserService.getTierData().subscribe(function (data) {
            _this2.indexLoading = false;

            if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
              data.data.forEach(function (element, index) {
                var text = element.substring(15);
                var env = text.substring(0, text.indexOf('_'));
                var tier = text.substring(text.indexOf('_') + 1, text.length);

                if (env != '') {
                  _this2.logIndexLists.push({
                    isChecked: false,
                    isActive: false,
                    id: index,
                    env: env,
                    tier: tier
                  });

                  envName.push({
                    label: env,
                    value: env
                  });
                  tierName.push({
                    label: tier,
                    value: tier
                  });
                } //filter out same env name from the array


                _this2.evnNode = envName.filter(function (obj, index) {
                  return index === envName.findIndex(function (o) {
                    return obj.label === o.label;
                  });
                }); //filter out same env name and concat the ndc tier val.

                _this2.tierName = _this2.tierVal.concat(tierName.filter(function (obj, index) {
                  return index === tierName.findIndex(function (o) {
                    return obj.label === o.label;
                  });
                }));
              });

              if (_this2.logIndexLists.length == 0) {
                _this2.isAddConfiguration = true;

                _this2.messageService.add({
                  severity: 'error',
                  summary: 'No Index Available please add configuration to view',
                  sticky: false,
                  life: 10000
                });

                return;
              } else {
                _this2.noLogIndexList = true;
                _this2.selectedTier = _this2.logIndexLists[0];

                _this2.getSelectedIndexValue(_this2.selectedTier['tier'], _this2.selectedTier['env'], _this2.selectedTier['id']);
              }
            }

            (function (error) {
              return console.log('error!', error);
            });

            return;
          }, function (data) {
            _this2.noLogIndexList = false;
            _this2.isErrorFound = true;
            _this2.indexLoading = false;
            _this2.errorMessage = data.error['error'].text;
          });
          this.getParserKbJsonInfo();
          this.getParserInfo();
          this.cavNavBarService.showBreadCrumb = true;
          this.breadcrumbService.add({
            label: 'Log Parser Manager'
          });
        }
      }, {
        key: "getParserKbJsonInfo",
        value: function getParserKbJsonInfo() {
          var _this3 = this;

          //request for getting parserKBjson data
          this.nfLogParserService.getSearchIndexData('parserkbjson').subscribe(function (data) {
            if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
              _this3.parserKBJson = data.data.resp.hits.hits[0]._source;
            }

            (function (error) {
              return console.log('error!', error);
            });

            return;
          });
        } //add configuratin click event

      }, {
        key: "isAddConfig",
        value: function isAddConfig() {
          this.isAddConfiguration = true;
          this.showAdd = false;
          this.changeTableHeight = 300;
          this.changeTextAreaHeight = 'height-189';
        } //cancel configuration click event

      }, {
        key: "cancelConfig",
        value: function cancelConfig() {
          this.isAddConfiguration = false;
          this.showAdd = true;
          this.changeTableHeight = 465;
          this.changeTextAreaHeight = 'height-350';
        } //space validation with input fields

      }, {
        key: "noWhitespaceValidator",
        value: function noWhitespaceValidator(control) {
          var isWhitespace = (control.value || '').trim().length === 0;
          return isWhitespace ? {
            whitespace: true
          } : null;
        } //get parser all index data 

      }, {
        key: "getParserInfo",
        value: function getParserInfo() {
          var _this4 = this;

          this.nfLogParserService.getSearchIndexData('parsers_all_index').subscribe(function (data) {
            if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
              //getting nfdb ip:port to send for output file
              var hostPort = data.data.nfdb_url;
              _this4.hostPort = [];
              var subHost = hostPort.split(':');
              var hostName = subHost[1].substring(2, 15);
              var port = subHost[2].split('/');

              if (subHost[0].includes('s')) {
                _this4.hostPort = subHost[0] + ':' + subHost[1] + ':' + port[0];
              } else {
                _this4.hostPort = hostName + ':' + port[0];
              }

              var technologyData = data.data['resp'].hits.hits;
              var obj = {};

              for (var i = 0; i <= technologyData.length - 1; i++) {
                var technologyName = technologyData[i]._source.technology;
                var lname = technologyData[i]._source.fname;
                var blob = technologyData[i]._source.blob; //filter out technology data and get the input technology

                var inputParser = technologyData.filter(function (td) {
                  return td._source.technology == technologyName && td._source.fname.includes('input');
                });
                var iPattern = {};

                if (inputParser.length > 0) {
                  var iblob = atob(inputParser[0]._source.blob);
                  var strSplitVal = iblob.replace(/ /g, "").replace(/[\r\n]+/g, '\n').split('\n'); //extract pattern value from input 

                  for (var _i = 0; _i < strSplitVal.length; _i++) {
                    if (strSplitVal[_i].trim().startsWith('pattern')) {
                      var patternVal = strSplitVal[_i].split('=>')[1].replace(/"/g, '');

                      iPattern = {
                        isMultiLine: true,
                        pattern: patternVal
                      };
                    }
                  }
                }

                if (obj[technologyName]) {
                  if (technologyData[i]._source.fname.includes('filter')) {
                    obj[technologyName].push({
                      parserName: lname,
                      parser: blob,
                      pattern: iPattern
                    });
                  }
                } else {
                  obj[technologyName] = [];

                  if (technologyData[i]._source.fname.includes('filter')) {
                    obj[technologyName].push({
                      parserName: lname,
                      parser: blob,
                      pattern: iPattern
                    });
                  }
                }
              } //collect the technology object


              _this4.techObj = obj;
              var unSortedTech = [];
              _this4.technology = [];

              for (var key in _this4.parserKBJson) {
                unSortedTech.push({
                  label: key,
                  value: key
                });
                _this4.technology = unSortedTech.sort(function (a, b) {
                  var nameA = a.label.toUpperCase(); // ignore upper and lowercase

                  var nameB = b.label.toUpperCase(); // ignore upper and lowercase

                  if (nameA < nameB) {
                    return -1; //nameA comes first
                  }

                  if (nameA > nameB) {
                    return 1; // nameB comes first
                  }

                  return 0; // names must be equal
                });
              }
            }
          });
        } //select technoly drop-down value

      }, {
        key: "selectTechValue",
        value: function selectTechValue($event) {
          var _this5 = this;

          this.logTypeVal = '';
          this.parserData = [];
          this.logType = [];
          this.sourceData = '';
          this.pathData = '';
          this.techDir = [];

          if (this.parserKBJson[$event.value].length == 1) {
            this.logTypeVal = this.parserKBJson[$event.value][0].logType;
            this.sourceData = this.parserKBJson[$event.value][0].sourceType;
            this.parserData = this.parserKBJson[$event.value][0].displayName;
            this.pathData = this.parserKBJson[$event.value][0].logPath;
          }

          this.parserKBJson[$event.value].forEach(function (val) {
            _this5.logType.push({
              label: val.logType,
              value: val.logType
            });

            _this5.techDir.push(val.directoryPath);

            var directory_Path = val.directoryPath.replace('/', '_');

            for (var key in _this5.techObj) {
              if (key == directory_Path) {
                _this5.techObj[key].forEach(function (val) {
                  _this5.parserName = val.parserName;

                  if (val.parserName.includes(_this5.parserData)) {
                    _this5.parserDecode = atob(val.parser);
                    _this5.pattern = val.pattern.pattern;
                  }
                });
              }
            }
          });
        } //select type drop-down value

      }, {
        key: "selectTypeValue",
        value: function selectTypeValue($event) {
          var _this6 = this;

          this.sourceData = '';
          this.parserData = [];
          this.pathData = '';

          for (var key in this.parserKBJson) {
            this.parserKBJson[key].forEach(function (val) {
              var directory_Path = ''; //binding value from technology directory

              _this6.techDir.forEach(function (dir) {
                if (dir == val.directoryPath && val.logType == $event.value) {
                  _this6.sourceData = val.sourceType;
                  _this6.parserData = val.displayName;
                  _this6.pathData = val.logPath;
                  directory_Path = val.directoryPath.replace('/', '_');
                }
              });

              for (var _key in _this6.techObj) {
                if (_key == directory_Path) {
                  _this6.techObj[_key].forEach(function (val) {
                    _this6.parserName = val.parserName;

                    if (val.parserName.includes(_this6.parserData)) {
                      _this6.parserDecode = atob(val.parser);
                      _this6.pattern = val.pattern.pattern;
                    }
                  });
                }
              }
            });
          }
        } //select parser value from drop-down

      }, {
        key: "selectParserValue",
        value: function selectParserValue($event) {
          this.filterValue = [];
          this.filterValue = $event.value['parserVal'];
          this.filterFile = $event.value;
        } //select all checkbox value

      }, {
        key: "selectAllValue",
        value: function selectAllValue(isSelectAll) {
          var _this7 = this;

          this.rowCheckbox = false;

          if (isSelectAll == true) {
            this.logIndexLists.forEach(function (val, index) {
              var indexName = 'nfagent_config' + '_' + val.env + '_' + val.tier;
              val.isSelected = true;

              _this7.selectedIndex.push({
                indexName: indexName,
                index: val.id
              });
            });
          } else {
            this.selectedIndex = [];
            this.logIndexLists.forEach(function (val) {
              val.isSelected = false;
            });
          }
        } //add selected check box value

      }, {
        key: "addSelectedValue",
        value: function addSelectedValue(checked, indexName, index) {
          window.event.stopPropagation();
          this.rowCheckbox = checked;

          if (checked == true) {
            this.selectedIndex.push({
              indexName: indexName,
              index: index
            });

            if (this.selectedIndex.length == this.logIndexLists.length) {
              this.isSelectedAll = true;
            }
          } else {
            console.log("delete index from remove");
            var deleteIndex = -1;
            this.selectedIndex.forEach(function (val, index) {
              if (val.indexName == indexName) {
                deleteIndex = index;
              }
            });

            if (deleteIndex > -1) {
              this.selectedIndex.splice(deleteIndex, 1);
            }

            if (this.selectedIndex.length < this.logIndexLists.length) {
              this.isSelectedAll = false;
            }
          }
        } //delete configuration function call()

      }, {
        key: "deleteConfiguration",
        value: function deleteConfiguration() {
          var _this8 = this;

          if (this.selectedIndex.length <= 0) {
            this.messageService.add({
              severity: 'error',
              summary: 'Please select any config index',
              sticky: false,
              life: 10000
            });
            return;
          } else {
            var isDelete = confirm('Do yo want to remove index?.');

            if (isDelete) {
              this.indicesList = [];
              this.selectedIndex.forEach(function (indices) {
                var confIndex = -1;

                _this8.logIndexLists.forEach(function (obj, ind) {
                  if (obj.id == indices.index) {
                    confIndex = ind;
                  }
                });

                if (confIndex > -1) {
                  _this8.logIndexLists.splice(confIndex, 1);
                }

                _this8.indicesList.push(indices.indexName);
              });
            }

            this.nfLogParserService.deleteTierData(this.indicesList).subscribe(function (data) {
              if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
                if (data.data['tittle']) {
                  _this8.messageService.add({
                    severity: 'success',
                    summary: data.data['tittle'],
                    sticky: false,
                    life: 10000
                  });

                  _this8.selectedIndex = [];
                  _this8.inputParserVal = [];
                  _this8.filterParserVal = [];
                  _this8.getsummaryData = [];
                  _this8.isSelectedAll = false;
                  _this8.rowCheckbox = false;
                  _this8.viewInput = false;
                  _this8.disableSave = false;
                }
              }

              (function (error) {
                return console.log('error!', error);
              });

              return;
            });
          }
        } //add/save configuration function call()

      }, {
        key: "AddConfiguration",
        value: function AddConfiguration() {
          var _this9 = this;

          this.addLoading = true;
          var tier = this.configurationForm.value['tier'].toLowerCase();
          var env = this.configurationForm.value['env'].toLowerCase();
          this.configIndex = [];

          if (tier.startsWith('_') || tier.endsWith('_')) {
            this.messageService.add({
              severity: 'error',
              summary: 'Tier Name should not start and end with underscore (_)',
              sticky: false,
              life: 10000
            });
            return;
          }

          if (env.includes('_')) {
            this.messageService.add({
              severity: 'error',
              summary: 'Environment name does not support underscore (_)',
              sticky: false,
              life: 10000
            });
            return;
          }

          if (tier.includes(' ')) {
            this.messageService.add({
              severity: 'error',
              summary: 'Tier Name does not support space ( )',
              sticky: false,
              life: 10000
            });
            return;
          }

          if (env.includes(' ')) {
            this.messageService.add({
              severity: 'error',
              summary: 'Env Name does not support space ( )',
              sticky: false,
              life: 10000
            });
            return;
          }

          var index;
          var id;
          this.logIndexLists.forEach(function (element) {
            if (element.tier == tier && element.env == env) {
              index = true;
              id = element.id;
            }
          });

          if (index == true) {
            this.existIndex = true;
          } else {
            this.existIndex = false;
          }

          if (this.existIndex == true) {
            var searchIndex = 'nfagent_config_' + env + '_' + tier;
            new Promise(function (resolve, reject) {
              _this9.nfLogParserService.getSearchIndexData(searchIndex).subscribe(function (data) {
                console.log('data', data);

                if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
                  _this9.configIndex = data.data['resp'].hits.hits;
                }

                resolve(_this9.configIndex);
              });
            }).then(function (v) {
              _this9.addConfigData();
            });
          } else {
            this.addConfigData();
          }
        } //add configuration data

      }, {
        key: "addConfigData",
        value: function addConfigData() {
          var _this0 = this;

          var tier = this.configurationForm.value['tier'].toLowerCase();
          var env = this.configurationForm.value['env'].toLowerCase();
          this.nfLogParserService.uploadTierData(tier, env).subscribe(function (data) {
            if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
              var indexList = [];
              var envName = [];
              var tierName = [];

              _this0.nfLogParserService.getTierData().subscribe(function (data) {
                return data['data'].forEach(function (element, index) {
                  var text = element.substring(15);
                  var env = text.substring(0, text.indexOf('_'));
                  var tier = text.substring(text.indexOf('_') + 1, text.length);
                  indexList.push({
                    isChecked: false,
                    isActive: false,
                    id: index,
                    env: env,
                    tier: tier
                  });
                  _this0.logIndexLists = indexList.filter(function (val) {
                    return val.env != '';
                  });

                  _this0.logIndexLists.forEach(function (val) {
                    envName.push({
                      label: val.env,
                      value: val.env
                    });
                    tierName.push({
                      label: val.tier,
                      value: val.tier
                    });
                  });

                  _this0.evnNode = envName.filter(function (obj, index) {
                    return index === envName.findIndex(function (o) {
                      return obj.label === o.label;
                    });
                  });
                  _this0.tierName = _this0.tierVal.concat(tierName.filter(function (obj, index) {
                    return index === tierName.findIndex(function (o) {
                      return obj.label === o.label;
                    });
                  }));
                });
              });

              _this0.saveJsonConfiguration();
            }

            (function (error) {
              return console.log('error!', error);
            });

            return;
          });
        } //reset configuration form

      }, {
        key: "resetConfiguration",
        value: function resetConfiguration() {
          this.configurationForm.reset();
        } //save input,filter and output configuration

      }, {
        key: "saveJsonConfiguration",
        value: function saveJsonConfiguration() {
          var _this1 = this;

          this.inputJsonPreview = [];
          this.filterJsonPreview = [];
          this.outputJsonPreview = [];
          var configurationArray = [];
          this.filterValue = [];
          this.inputParserVal = '';
          this.filterParserVal = '';
          configurationArray.push(this.configurationForm.value);
          var sumData = [];
          this.configIndex.forEach(function (element) {
            if (element._id == 'sumdata') {
              sumData = element._source.autodiscovery;
            }
          });
          var inputVal = configurationArray.map(function (element, index) {
            _this1.filterId = 'UDI' + _this1.configIndex.length;
            _this1.summaryData = [];

            if (_this1.existIndex == true) {
              _this1.summaryData = sumData;

              _this1.summaryData.push({
                "log_path": element.path,
                "type": _this1.parserData,
                "filterid": 'UDI' + _this1.configIndex.length,
                "parser": _this1.parserName
              });

              console.log(_this1.summaryData);
            } else {
              _this1.summaryData.push({
                "log_path": element.path,
                "type": _this1.parserData,
                "filterid": 'UDI' + _this1.configIndex.length,
                "parser": _this1.parserName
              });
            }

            var id = "2000" + _this1.configIndex.length;

            _this1.filterJsonPreview.push({
              isEditable: false,
              id: id,
              parserVal: _this1.parserDecode,
              parserName: _this1.parserName
            });

            if (element.source == "file" && _this1.pattern == undefined) {
              return " file {\n" + " path =>" + ' ' + '"' + element.path + '"' + "\n" + " type =>" + ' ' + '"' + _this1.parserData + '"' + "\n" + " start_position => " + ' ' + '"' + 'beginning' + '"' + "\n" + " sincedb_path => " + ' ' + '"' + '/home/cavisson/installer/logs/NF/registry.txt' + '"' + "\n" + " stat_interval => 5 \n" + " ignore_older => 0 \n" + " add_field => {\n" + ' tier => "${TIER:<tier>}" \n' + ' server => "${SERVER:<server>}" \n' + ' dc => "${DC:<dc>}" \n' + ' Env => "${ENV:<env>}" \n' + " technology_name => " + ' ' + '"' + element.tech + '"' + "\n" + " parser => " + ' ' + '"' + _this1.parserName + '"' + "\n" + " } \n" + " } \n";
            }

            if (element.source == "journald" && _this1.pattern == undefined) {
              return " journald {\n" + " lowercase => true \n" + ' seekto => "tail" \n' + " thisboot => true \n" + " type =>" + ' ' + '"' + _this1.parserData + '"' + "\n" + ' tags => [ "journald" ] \n' + " path =>" + ' ' + '"' + element.path + '"' + "\n" + " sincedb_path => " + ' ' + '"' + '/home/cavisson/installer/logs/NF/registry.txt' + '"' + "\n" + " add_field => {\n" + ' tier => "${TIER:<tier>}" \n' + ' server => "${SERVER:<server>}" \n' + ' dc => "${DC:<dc>}" \n' + ' Env => "${ENV:<env>}" \n' + " technology_name => " + ' ' + '"' + element.tech + '"' + "\n" + " parser => " + ' ' + '"' + _this1.parserName + '"' + "\n" + " } \n" + " } \n";
            } else if (_this1.pattern != undefined && element.source == 'file') {
              return " file {\n" + " path =>" + ' ' + '"' + element.path + '"' + "\n" + " type =>" + ' ' + '"' + _this1.parserData + '"' + "\n" + " start_position => " + ' ' + '"' + 'beginning' + '"' + "\n" + " sincedb_path => " + ' ' + '"' + '/home/cavisson/installer/logs/NF/registry.txt' + '"' + "\n" + " stat_interval => 5 \n" + " ignore_older => 0 \n" + " add_field => {\n" + ' tier => "${TIER:<tier>}" \n' + ' server => "${SERVER:<server>}" \n' + ' dc => "${DC:<dc>}" \n' + ' Env => "${ENV:<env>}" \n' + " technology_name => " + ' ' + '"' + element.tech + '"' + "\n" + " parser => " + ' ' + '"' + _this1.parserName + '"' + "\n" + " } \n" + " codec => multiline \n" + "     { \n" + "      pattern =>" + ' ' + '"' + _this1.pattern + '"' + "\n" + "      negate =>" + ' ' + '"' + 'true' + '"' + "\n" + "      what => " + ' ' + '"' + 'previous' + '"' + "\n" + "     } \n" + " } \n";
            } else {
              return " journald {\n" + " lowercase => true \n" + ' seekto => "tail" \n' + " thisboot => true \n" + " type =>" + ' ' + '"' + _this1.parserData + '"' + "\n" + ' tags => [ "journald" ] \n' + " path =>" + ' ' + '"' + element.path + '"' + "\n" + " sincedb_path => " + ' ' + '"' + '/home/cavisson/installer/logs/NF/registry.txt' + '"' + "\n" + " add_field => {\n" + ' tier => "${TIER:<tier>}" \n' + ' server => "${SERVER:<server>}" \n' + ' dc => "${DC:<dc>}" \n' + ' Env => "${ENV:<env>}" \n' + " technology_name => " + ' ' + '"' + element.tech + '"' + "\n" + " parser => " + ' ' + '"' + _this1.parserName + '"' + "\n" + " } \n" + " codec => multiline \n" + "     { \n" + "      pattern =>" + ' ' + '"' + _this1.pattern + '"' + "\n" + "      negate =>" + ' ' + '"' + 'true' + '"' + "\n" + "      what => " + ' ' + '"' + 'previous' + '"' + "\n" + "     } \n" + " } \n";
            }
          });
          var newInputConfig = "input { \n" + inputVal.join('') + '\n' + "}";
          var inObj = {
            id: "1000" + this.configIndex.length,
            isEditable: false,
            parserName: "1-input.conf",
            parserVal: newInputConfig
          };
          this.inputJsonPreview.push(inObj);
          var outputVal = configurationArray.map(function (element, index) {
            _this1.indexData = 'nfagent_config_' + element.env.toLowerCase() + '_' + element.tier.toLowerCase();
            return "if [type] == \"" + _this1.parserData + "\" {\n" + "nfdb {\n" + " use_bulk => true \n" + " index => " + '"' + 'nfdb' + '_%{Env}_%{tier}-%{+yyyy-MM-dd}"' + "\n" + " hosts => " + '[' + '"${OUTPUT_HOST1:localhost}:${OUTPUT_PORT1:9200}"' + ']' + "\n" + " action => \"index\" \n" + " manage_template => " + 'false' + "\n" + " ssl => \"${SSL_ENABLE:" + 'true' + "}\"\n " + "ssl_certificate_verification => \"${SSL_CERTIFICATE_VERIFICATION:" + 'false' + "}\"\n} \n}\n";
          });
          var newOutputConfig = "output { \n" + outputVal.join('') + '\n' + "}";
          var outputObj = {
            id: "3000" + this.configIndex.length,
            isEditable: false,
            parserName: "3-output.conf",
            parserVal: newOutputConfig
          };
          this.outputJsonPreview.push(outputObj); // request payload for save input,filter,output

          this.saveLogParserData = this.inputJsonPreview.concat(this.filterJsonPreview, this.outputJsonPreview);
          var savedParserArray = [];
          this.saveLogParserData.forEach(function (val) {
            savedParserArray.push({
              filterData: btoa(val.parserVal),
              name: val.parserName,
              id: val.id
            });
          });
          this.nfLogParserService.saveConfiguration(savedParserArray, this.indexData, this.summaryData, this.filterId).subscribe(function (data) {
            if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
              if (data.data['message']) {
                _this1.messageService.add({
                  severity: 'success',
                  summary: data.data['message'],
                  sticky: false,
                  life: 10000
                });
              }

              _this1.logType = [];
              _this1.noLogIndexList = true;
              _this1.isAddConfiguration = false;
              _this1.changeTableHeight = 465;
              _this1.changeTextAreaHeight = 'height-350';
              _this1.showAdd = true;

              _this1.configurationForm.reset();

              _this1.isSaveConfig = true;

              var textIndex = _this1.indexData.substring(15);

              var env = textIndex.substring(0, textIndex.indexOf('_'));
              var tier = textIndex.substring(textIndex.indexOf('_') + 1, textIndex.length);
              var indexId = ''; //for getting index of the data present in logindexlist

              _this1.logIndexLists.forEach(function (val, indx) {
                if (val.env == env && val.tier == tier) {
                  indexId = indx;
                }
              });

              _this1.selectedTier = _this1.logIndexLists[indexId];
              setTimeout(function () {
                _this1.getSelectedIndexValue(tier, env, indexId);
              }, 1000);
              _this1.addLoading = false;
            }

            (function (error) {
              return console.log('error!', error);
            });

            _this1.addLoading = false;
            return;
          });
        } //get the perticular config index value

      }, {
        key: "getSelectedIndexValue",
        value: function getSelectedIndexValue(tier, env, id) {
          var _this10 = this;

          this.sumDataArray = [];
          this.getsummaryData = [];
          this.inputParserVal = '';
          this.filterParserVal = '';
          this.disableSave = false;
          this.viewInput = false;
          this.selectedFilterName = '';
          this.isSummaryIndex = [];
          this.filterArray = [];
          this.filterLabel = [];
          this.configurationForm.reset();
          this.logIndexLists.forEach(function (list) {
            if (list.id === id) {
              list.isActive = !list.isActive;
            } else {
              list.isActive = false;
            }
          });
          this.rowIndex = 'nfagent_config' + '_' + env + '_' + tier;
          this.currentRowSelectedId = id;
          this.isSumdataLoading = true;
          this.nfLogParserService.getSearchIndexData(this.rowIndex).subscribe(function (data) {
            _this10.inputJsonPreview = [];
            _this10.filterJsonPreview = [];
            _this10.outputJsonPreview = [];
            _this10.index_id = [];

            if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
              _this10.isGetConfig = true;
              var blobData = data.data['resp'].hits.hits;
              _this10.configIndexData = data.data['resp'].hits.hits;

              for (var _i2 = 0; _i2 <= blobData.length - 1; _i2++) {
                _this10.index_id.push({
                  'id': blobData[_i2]._id
                });

                _this10.isSummaryIndex.push(blobData[_i2]._id);

                if (blobData[_i2]._source.lname != undefined && (blobData[_i2]._source.lname.includes('input') || blobData[_i2]._source.lname.includes('output') || blobData[_i2]._source.lname.includes('filter'))) {
                  var blobDecode = atob(blobData[_i2]._source.blob);

                  if (blobData[_i2]._source.lname.includes("input")) {
                    _this10.inputJsonPreview.push({
                      isEditable: false,
                      parserVal: blobDecode,
                      parserName: blobData[_i2]._source.name,
                      id: blobData[_i2]._id,
                      filterId: blobData[_i2]._source.filterid
                    });
                  }

                  if (blobData[_i2]._source.lname.includes("output")) {
                    _this10.outputJsonPreview.push({
                      isEditable: false,
                      parserVal: blobDecode,
                      parserName: blobData[_i2]._source.name,
                      id: blobData[_i2]._id,
                      filterId: blobData[_i2]._source.filterid
                    });
                  }

                  if (blobData[_i2]._source.lname.includes("filter")) {
                    _this10.filterJsonPreview.push({
                      isEditable: false,
                      id: blobData[_i2]._id,
                      parserVal: blobDecode,
                      parserName: blobData[_i2]._source.name,
                      filterId: blobData[_i2]._source.filterid
                    });

                    _this10.filterValue = [];

                    if (_this10.filterJsonPreview.length == 1) {
                      _this10.filterValue.push(_this10.filterJsonPreview[0].parserVal);

                      _this10.filterFile = _this10.filterJsonPreview[0];
                    } else {
                      _this10.filterValue.push(_this10.filterJsonPreview[0].parserVal);

                      _this10.filterFile = _this10.filterJsonPreview[0];
                    }
                  }
                }
              } //taking input parserval when dumped from backend


              for (var i = 0; i < _this10.inputJsonPreview.length; i++) {
                _this10.inputParserVal = _this10.inputJsonPreview[i].parserVal;
              } //taking filter parserval when dumped from backend


              for (var i = 0; i < _this10.filterJsonPreview.length; i++) {
                _this10.filterLabel.push({
                  label: _this10.filterJsonPreview[i].parserName,
                  value: _this10.filterJsonPreview[i].parserName
                });

                _this10.filterArray.push({
                  label: _this10.filterJsonPreview[i].parserName,
                  value: _this10.filterJsonPreview[i].parserVal
                });
              } //checking for sumdata or not


              if (_this10.isSummaryIndex.includes('sumdata')) {
                _this10.viewInput = false;
                _this10.noSummaryIndex = false;

                _this10.getSummary();
              } else {
                _this10.isSumdataLoading = false;
                _this10.viewInput = true;
                _this10.noSummaryIndex = true;
                _this10.selectedFilterName = _this10.filterArray[0].label;
                _this10.filterParserVal = _this10.filterArray[0].value;
              }
            }

            (function (error) {
              return console.log('error!', error);
            });

            return;
          });
        } //select the parser value when dumped through backend

      }, {
        key: "selectFilterVal",
        value: function selectFilterVal(event) {
          for (var i = 0; i < this.filterArray.length; i++) {
            if (this.filterArray[i].label == event.value) {
              this.filterParserVal = this.filterArray[i].value;
            }
          }
        } //get the sumdata value

      }, {
        key: "getSummary",
        value: function getSummary() {
          var _this11 = this;

          this.nfLogParserService.getSumData(this.rowIndex, 'sumdata').subscribe(function (data) {
            if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
              _this11.isSumdataLoading = false;
              _this11.getsummaryData = [];
              var sumData1 = [];
              sumData1 = data.data['_source']['autodiscovery'];
              _this11.sumDataArray = data.data['_source']['autodiscovery'];
              sumData1.forEach(function (val) {
                var filterId;

                if (val.filterid.includes('ADI')) {
                  filterId = 'Auto Detect';
                } else {
                  filterId = 'Configured';
                }

                _this11.getsummaryData.push({
                  "log_path": val.log_path,
                  "type": val.type,
                  "filterid": filterId,
                  "fId": val.filterid,
                  'index': _this11.rowIndex,
                  'parser': val.parser
                });

                _this11.selectedSummary = _this11.getsummaryData[0];

                _this11.selectSummarydata(_this11.selectedSummary);
              });
            }
          });
        } //bind input,filter value when selected sumdata

      }, {
        key: "selectSummarydata",
        value: function selectSummarydata(row) {
          this.inputParserVal = '';
          this.filterParserVal = '';
          this.summaryRow = row;

          for (var i = 0; i < this.inputJsonPreview.length; i++) {
            if (this.inputJsonPreview[i].filterId == row.fId) {
              this.inputParserVal = this.inputJsonPreview[i].parserVal;
            }
          }

          for (var i = 0; i < this.filterJsonPreview.length; i++) {
            if (this.filterJsonPreview[i].filterId == row.fId) {
              this.filterParserVal = this.filterJsonPreview[i].parserVal;
            }
          }
        } //click event for view input and filter configuration

      }, {
        key: "viewConfiguration",
        value: function viewConfiguration() {
          this.viewInput = !this.viewInput;
          this.disableSave = false;
        } //click event for edit input and filter

      }, {
        key: "editConfiguration",
        value: function editConfiguration() {
          document.getElementById('input')['readOnly'] = false;
          document.getElementById('filter')['readOnly'] = false;
          document.getElementById('input').focus();
          document.getElementById('filter').focus();
          this.disableSave = true;
        } //delete log path function call()

      }, {
        key: "deleteLogPathData",
        value: function deleteLogPathData(row, removeIndex) {
          var _this12 = this;

          var summaryBody = [];
          summaryBody.push({
            "log_path": row.log_path,
            "type": row.type,
            "filterid": row.fId
          });
          var isDelete = confirm('Do yo want to remove this data');

          if (isDelete) {
            var idsData = this.configIndexData.filter(function (data) {
              return data._source.filterid == row.fId;
            });
            idsData.forEach(function (val) {
              _this12.nfLogParserService.deleteLogPath(val._id, row.index).subscribe(function (data) {
                if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
                  console.log(data);
                  _this12.viewInput = false;
                  _this12.disableSave = false;
                }

                (function (error) {
                  return console.log('error!', error);
                });

                return;
              });
            });
            this.messageService.add({
              severity: 'success',
              summary: 'summary path deleteded successfully',
              sticky: false,
              life: 10000
            });
            this.getsummaryData.splice(removeIndex, 1);
            this.inputParserVal = '';
            this.filterParserVal = '';
            var updatedSumData = this.sumDataArray.filter(function (data) {
              return data.filterid != row.fId;
            });
            this.nfLogParserService.saveExistSummary('sumdata', updatedSumData, row.index).subscribe(function (data) {
              if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {}

              (function (error) {
                return console.log('error!', error);
              });

              return;
            });
          }
        } //edited configuration save method

      }, {
        key: "editSaveJson",
        value: function editSaveJson() {
          var _this13 = this;

          var index = '';

          if (this.isSaveConfig == true) {
            index = this.indexData;
          } else if (this.isGetConfig == true) {
            index = this.rowIndex;
          }

          var inputArr = [];
          var filterArr = [];
          var filterId = '';
          this.inputJsonPreview.forEach(function (element) {
            if (element.filterId == _this13.summaryRow['fId']) {
              return element.parserVal = _this13.inputParserVal;
            }
          });
          this.filterJsonPreview.forEach(function (element) {
            console.log(element);

            if (element.filterId == _this13.summaryRow['fId']) {
              return element.parserVal = _this13.filterParserVal;
            }
          });
          inputArr = this.inputJsonPreview.filter(function (data) {
            return data.filterId == _this13.summaryRow['fId'];
          });
          filterArr = this.filterJsonPreview.filter(function (data) {
            return data.filterId == _this13.summaryRow['fId'];
          }); //for getting filterId each time

          inputArr.forEach(function (val) {
            filterId = val.filterId;
          });
          var editSave = inputArr.concat(filterArr, this.outputJsonPreview);
          var savedParserArray = [];
          editSave.forEach(function (val) {
            savedParserArray.push({
              filterData: btoa(val.parserVal),
              name: val.parserName,
              id: val.id
            });
          });
          this.nfLogParserService.saveConfiguration(savedParserArray, index, this.sumDataArray, filterId).subscribe(function (data) {
            if (data instanceof _nf_log_parser_service_nf_log_parser_state__WEBPACK_IMPORTED_MODULE_4__["NfLogParserLoadedState"]) {
              if (data.data['message']) {
                _this13.messageService.add({
                  severity: 'success',
                  summary: data.data['message'],
                  sticky: false,
                  life: 10000
                });
              }

              _this13.isSaveConfig = false;
            }

            (function (error) {
              return console.log('error!', error);
            });

            return;
          });
        } //destroying nav bar when end of this page

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.cavNavBarService.showNavBar = true;
          this.cavNavBarService.showBreadCrumb = false;
        }
      }]);
    }();

    NfLogParserConfigComponent.ctorParameters = function () {
      return [{
        type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"]
      }, {
        type: _nf_log_parser_service_nf_log_parser_service__WEBPACK_IMPORTED_MODULE_3__["NfLogParserService"]
      }, {
        type: src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_9__["CavMessageService"]
      }, {
        type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_5__["SessionService"]
      }, {
        type: src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_8__["CavNavBarService"]
      }, {
        type: src_app_core_breadcrumb_breadcrumb_service__WEBPACK_IMPORTED_MODULE_12__["BreadcrumbService"]
      }];
    };

    NfLogParserConfigComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-nf-log-parser-config',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./nf-log-parser-config.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nf-log-parser-config/nf-log-parser-config.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
      providers: [[{
        provide: _tools_admin_access_control_services_access_control_model__WEBPACK_IMPORTED_MODULE_11__["ACL_PROPS"],
        useValue: {
          feature: _tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_10__["CAV_FEATURES"].LOGS.NAME,
          subFeature: _tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_10__["CAV_FEATURES"].LOGS.SUB_FEATURES.LOG_PARSERS
        }
      }]],
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./nf-log-parser-config.component.scss */
      "./src/app/pages/nf-log-parser-config/nf-log-parser-config.component.scss"))["default"]]
    })], NfLogParserConfigComponent);
    /***/
  },

  /***/
  "./src/app/pages/nf-log-parser-config/nf-log-parser-config.module.ts":
  /*!***************************************************************************!*\
    !*** ./src/app/pages/nf-log-parser-config/nf-log-parser-config.module.ts ***!
    \***************************************************************************/

  /*! exports provided: NfLogParserConfigModule */

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

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


    __webpack_require__.d(__webpack_exports__, "NfLogParserConfigModule", function () {
      return NfLogParserConfigModule;
    });
    /* 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 _nf_log_parser_config_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./nf-log-parser-config.component */
    "./src/app/pages/nf-log-parser-config/nf-log-parser-config.component.ts");
    /* harmony import */


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


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


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


    var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! src/app/shared/help/help.module */
    "./src/app/shared/help/help.module.ts");
    /* harmony import */


    var src_app_shared_cav_loader_cav_loader_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! src/app/shared/cav-loader/cav-loader.module */
    "./src/app/shared/cav-loader/cav-loader.module.ts");

    var routes = [{
      path: '',
      component: _nf_log_parser_config_component__WEBPACK_IMPORTED_MODULE_3__["NfLogParserConfigComponent"]
    }];

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

    NfLogParserConfigModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
      declarations: [_nf_log_parser_config_component__WEBPACK_IMPORTED_MODULE_3__["NfLogParserConfigComponent"]],
      imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["ToolbarModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["BreadcrumbModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["CardModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["OrderListModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["InputTextModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_6__["FormsModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_6__["ReactiveFormsModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["TableModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["CheckboxModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["TooltipModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["DropdownModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["ToggleButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["MultiSelectModule"], src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_7__["HelpModule"], src_app_shared_cav_loader_cav_loader_module__WEBPACK_IMPORTED_MODULE_8__["CavLoaderModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["DialogModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["InputTextareaModule"], _angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"].forChild(routes)],
      exports: [_angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"]]
    })], NfLogParserConfigModule);
    /***/
  },

  /***/
  "./src/app/pages/nf-log-parser-config/nf-log-parser-service/nf-log-parser.service.ts":
  /*!*******************************************************************************************!*\
    !*** ./src/app/pages/nf-log-parser-config/nf-log-parser-service/nf-log-parser.service.ts ***!
    \*******************************************************************************************/

  /*! exports provided: NfLogParserService */

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

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


    __webpack_require__.d(__webpack_exports__, "NfLogParserService", function () {
      return NfLogParserService;
    });
    /* 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_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common/http */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
    /* harmony import */


    var src_environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! src/environments/environment */
    "./src/environments/environment.ts");
    /* harmony import */


    var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! rxjs */
    "./node_modules/rxjs/_esm2015/index.js");
    /* harmony import */


    var src_app_core_store_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! src/app/core/store/store */
    "./src/app/core/store/store.ts");
    /* harmony import */


    var _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! ./nf-log-parser.state */
    "./src/app/pages/nf-log-parser-config/nf-log-parser-service/nf-log-parser.state.ts");
    /* harmony import */


    var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! src/app/core/session/session.service */
    "./src/app/core/session/session.service.ts");

    var NfLogParserService = /*#__PURE__*/function (_src_app_core_store_s) {
      function NfLogParserService(http, sessionService) {
        var _this14;

        _classCallCheck(this, NfLogParserService);

        _this14 = _callSuper(this, NfLogParserService);
        _this14.http = http;
        _this14.sessionService = sessionService;
        _this14.filterData = [];
        _this14.headers = new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpHeaders"]();
        return _this14;
      }

      _inherits(NfLogParserService, _src_app_core_store_s);

      return _createClass(NfLogParserService, [{
        key: "uploadTierData",
        value: function uploadTierData(tierName, envName) {
          var _this15 = this;

          var output = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
          var requestpayload = {
            requestType: 'createIndexTierList',
            tierName: tierName,
            envName: envName
          };
          var addTierUrl = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.logs.msearch.endpoint;
          var basePath = this.sessionService.getBasePath(true, null, null);
          this.controller.post(addTierUrl, requestpayload, basePath).subscribe(function (data) {
            output.next(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadedState"](data));
            output.complete();
          }, function (e) {
            output.error(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadingErrorState"](e));
            output.complete();

            _this15.logger.error('loading failed', e);
          });
          return output;
        }
      }, {
        key: "getTierData",
        value: function getTierData() {
          var _this16 = this;

          var output = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
          var requestpayload = {
            requestType: 'getAgentIndexList'
          };
          var addTierUrl = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.logs.msearch.endpoint;
          var basePath = this.sessionService.getBasePath(true, null, null);
          this.controller.post(addTierUrl, requestpayload, basePath).subscribe(function (data) {
            output.next(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadedState"](data));
            output.complete();
          }, function (e) {
            output.error(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadingErrorState"](e));
            output.complete();

            _this16.logger.error('loading failed', e);
          });
          return output;
        }
      }, {
        key: "deleteTierData",
        value: function deleteTierData(indexName) {
          var _this17 = this;

          var output = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
          var requestpayload = {
            requestType: 'deleteAgentIndexTierList',
            indexName: indexName
          };
          var deleteTierUrl = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.logs.msearch.endpoint;
          var basePath = this.sessionService.getBasePath(true, null, null);
          this.controller.post(deleteTierUrl, requestpayload, basePath).subscribe(function (data) {
            output.next(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadedState"](data));
            output.complete();
          }, function (e) {
            output.error(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadingErrorState"](e));
            output.complete();

            _this17.logger.error('loading failed', e);
          });
          return output;
        }
      }, {
        key: "getSearchIndexData",
        value: function getSearchIndexData(selectedTier) {
          var _this18 = this;

          var output = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
          var requestpayload = {
            requestType: 'searchIndex',
            indexName: selectedTier
          };
          var searchIndexUrl = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.logs.msearch.endpoint;
          var basePath = this.sessionService.getBasePath(true, null, null);
          this.controller.post(searchIndexUrl, requestpayload, basePath).subscribe(function (data) {
            output.next(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadedState"](data));
            output.complete();
          }, function (e) {
            output.error(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadingErrorState"](e));
            output.complete();

            _this18.logger.error('loading failed', e);
          });
          return output;
        }
      }, {
        key: "saveConfiguration",
        value: function saveConfiguration(configArray, indexName, summaryData, filterId) {
          var _this19 = this;

          var output = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
          var requestpayload = {
            requestType: 'saveConfigurationData',
            filterArray: configArray,
            indexName: indexName,
            summaryData: summaryData,
            filterId: filterId
          };
          var saveConfigUrl = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.logs.msearch.endpoint;
          var basePath = this.sessionService.getBasePath(true, null, null);
          this.controller.post(saveConfigUrl, requestpayload, basePath).subscribe(function (data) {
            output.next(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadedState"](data));
            output.complete();
          }, function (e) {
            output.error(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadingErrorState"](e));
            output.complete();

            _this19.logger.error('loading failed', e);
          });
          return output;
        }
      }, {
        key: "deleteLogPath",
        value: function deleteLogPath(id, index) {
          var _this20 = this;

          var output = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
          var requestpayload = {
            requestType: 'deletelogpath',
            id: id,
            indexName: index
          };
          var deletelogPathUrl = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.logs.msearch.endpoint;
          var basePath = this.sessionService.getBasePath(true, null, null);
          this.controller.post(deletelogPathUrl, requestpayload, basePath).subscribe(function (data) {
            output.next(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadedState"](data));
            output.complete();
          }, function (e) {
            output.error(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadingErrorState"](e));
            output.complete();

            _this20.logger.error('loading failed', e);
          });
          return output;
        }
      }, {
        key: "saveExistSummary",
        value: function saveExistSummary(id, body, index) {
          var _this21 = this;

          var output = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
          var requestpayload = {
            requestType: 'saveExistSummary',
            id: id,
            body: body,
            indexName: index
          };
          var saveExistUrl = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.logs.msearch.endpoint;
          var basePath = this.sessionService.getBasePath(true, null, null);
          this.controller.post(saveExistUrl, requestpayload, basePath).subscribe(function (data) {
            output.next(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadedState"](data));
            output.complete();
          }, function (e) {
            output.error(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadingErrorState"](e));
            output.complete();

            _this21.logger.error('loading failed', e);
          });
          return output;
        }
      }, {
        key: "getSumData",
        value: function getSumData(selectedTier, id) {
          var _this22 = this;

          var output = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
          var requestpayload = {
            requestType: '_searchbyid',
            indexName: selectedTier,
            id: id
          };
          var searchIdUrl = src_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].api.logs.msearch.endpoint;
          var basePath = this.sessionService.getBasePath(true, null, null);
          this.controller.post(searchIdUrl, requestpayload, basePath).subscribe(function (data) {
            output.next(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadedState"](data));
            output.complete();
          }, function (e) {
            output.error(new _nf_log_parser_state__WEBPACK_IMPORTED_MODULE_6__["NfLogParserLoadingErrorState"](e));
            output.complete();

            _this22.logger.error('loading failed', e);
          });
          return output;
        }
      }]);
    }(src_app_core_store_store__WEBPACK_IMPORTED_MODULE_5__["Store"].AbstractService);

    NfLogParserService.ctorParameters = function () {
      return [{
        type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]
      }, {
        type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__["SessionService"]
      }];
    };

    NfLogParserService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
      providedIn: 'root'
    })], NfLogParserService);
    /***/
  },

  /***/
  "./src/app/pages/nf-log-parser-config/nf-log-parser-service/nf-log-parser.state.ts":
  /*!*****************************************************************************************!*\
    !*** ./src/app/pages/nf-log-parser-config/nf-log-parser-service/nf-log-parser.state.ts ***!
    \*****************************************************************************************/

  /*! exports provided: NfLogParserLoadingState, NfLogParserLoadingErrorState, NfLogParserLoadedState */

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

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


    __webpack_require__.d(__webpack_exports__, "NfLogParserLoadingState", function () {
      return NfLogParserLoadingState;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "NfLogParserLoadingErrorState", function () {
      return NfLogParserLoadingErrorState;
    });
    /* harmony export (binding) */


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


    var src_app_core_store_store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! src/app/core/store/store */
    "./src/app/core/store/store.ts");

    var NfLogParserLoadingState = /*#__PURE__*/function (_src_app_core_store_s2) {
      function NfLogParserLoadingState() {
        _classCallCheck(this, NfLogParserLoadingState);

        return _callSuper(this, NfLogParserLoadingState, arguments);
      }

      _inherits(NfLogParserLoadingState, _src_app_core_store_s2);

      return _createClass(NfLogParserLoadingState);
    }(src_app_core_store_store__WEBPACK_IMPORTED_MODULE_0__["Store"].AbstractLoadingState);

    var NfLogParserLoadingErrorState = /*#__PURE__*/function (_src_app_core_store_s3) {
      function NfLogParserLoadingErrorState() {
        _classCallCheck(this, NfLogParserLoadingErrorState);

        return _callSuper(this, NfLogParserLoadingErrorState, arguments);
      }

      _inherits(NfLogParserLoadingErrorState, _src_app_core_store_s3);

      return _createClass(NfLogParserLoadingErrorState);
    }(src_app_core_store_store__WEBPACK_IMPORTED_MODULE_0__["Store"].AbstractErrorState);

    var NfLogParserLoadedState = /*#__PURE__*/function (_src_app_core_store_s4) {
      function NfLogParserLoadedState() {
        _classCallCheck(this, NfLogParserLoadedState);

        return _callSuper(this, NfLogParserLoadedState, arguments);
      }

      _inherits(NfLogParserLoadedState, _src_app_core_store_s4);

      return _createClass(NfLogParserLoadedState);
    }(src_app_core_store_store__WEBPACK_IMPORTED_MODULE_0__["Store"].AbstractIdealState);
    /***/

  }
}]);