(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["custom-query-view-custom-query-view-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.component.html":
/*!*****************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.component.html ***!
  \*****************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"custom-query-view\">\r\n  <div class=\"p-grid mb-5 w-100-p\">\r\n    <app-procedure-name class=\"w-100-p\"></app-procedure-name>\r\n  </div>\r\n  <div class=\"w-100-p\">\r\n    <app-custom-query></app-custom-query>\r\n  </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.component.html":
/*!*******************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.component.html ***!
  \*******************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"custom-query-container\">\r\n    <div class=\"w-100-p\">\r\n            <ng-container>\r\n                <cav-table #dt [value]=\"dataTable.data\" [paginator]=\"showpaginator\" \r\n                [totalRecords]=\"totalRecords\" [rows]=\"rows\" [first]=\"first\" \r\n                [headers] = \"header\"\r\n                 [showCurrentPageReport]=\"true\"  [tableConfig]=\"tableConfig\"\r\n                 [scrollable]=\"true\"  scrollHeight=\"150px\"></cav-table>\r\n            </ng-container>\r\n    </div>\r\n</div>\r\n<app-db-query-stats-filter #customQuery></app-db-query-stats-filter>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.component.html":
/*!***********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.component.html ***!
  \***********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"procedure-name-container\">\r\n    <div class=\"p-grid p-col-12\">\r\n        <p-panel #pnl1 expandIcon=\"\" collapseIcon=\"\" [toggleable]=\"true\" class=\"w-100-p\" styleClass=\"w-100-p\">\r\n            <p-header class=\"cav-panel-header pt-5\">\r\n                <div class=\"cav-panel-content p-grid p-justify-between p-align-center\">\r\n                    <div class=\"panel-title\" (click)=\"pnl1.toggle($event)\">\r\n                        <a><span\r\n                                [class]=\"pnl1.collapsed? 'icons8 icons8-expand-arrow': 'icons8 icons8-collapse-arrow'\"></span></a>\r\n                        Query Execution\r\n                    </div>\r\n                </div>\r\n            </p-header>\r\n            <div class=\"p-grid p-dir-col p-col-12\">\r\n                <div>\r\n                    <ng-container>\r\n                        <div *ngFor=\"let query of queryData; let i = index\" class=\"mb-5\">\r\n                            <p-radioButton name=\"procedure\" value=\"{{query.op}}\" label=\"{{query.op}}\"\r\n                                 [(ngModel)]=\"selectedQuery\" pTooltip =\"{{query.title}}\">{{query}}</p-radioButton>\r\n                        </div>\r\n                          <div>\r\n                            <p-radioButton name=\"procedure\" value='CustomQuery' label='Custom Query'  \r\n                                 [(ngModel)]=\"selectedQuery\">{{customQuery}}</p-radioButton>\r\n                        </div>\r\n                    </ng-container>\r\n                </div>\r\n                <div class=\"mt-5\" *ngIf = \"(selectedQuery == 'CustomQuery')\">\r\n                    <textarea [(ngModel)]=\"textInCustom\" [rows]=\"5\" class=\"w-100-p\"\r\n                        pInputTextarea autoResize=\"false\"></textarea>\r\n                </div>\r\n\r\n\r\n            </div>\r\n\r\n\r\n            <div class=\"p-grid p-justify-end mx-5\">\r\n\r\n                <button pTooltip=\"Execute Query\" type=\"button\" class=\"ui-button-rounded ui-button-success\" pButton (click)= \"dataCorrespondingToQuery()\" label=\"Execute\"\r\n                    [disabled]=\"(textInCustom.length <0)\"></button>\r\n            </div>\r\n        </p-panel>\r\n    </div>\r\n</div>\r\n\r\n");

/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.component.scss":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.component.scss ***!
  \***************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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

/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.component.ts":
/*!*************************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.component.ts ***!
  \*************************************************************************************************************/
/*! exports provided: CustomQueryViewComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomQueryViewComponent", function() { return CustomQueryViewComponent; });
/* 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");


let CustomQueryViewComponent = class CustomQueryViewComponent {
    constructor() { }
    ngOnInit() {
    }
    ngOnDestroy() {
    }
};
CustomQueryViewComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-custom-query-view',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./custom-query-view.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./custom-query-view.component.scss */ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.component.scss")).default]
    })
], CustomQueryViewComponent);



/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.module.ts":
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.module.ts ***!
  \**********************************************************************************************************/
/*! exports provided: CustomQueryViewModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomQueryViewModule", function() { return CustomQueryViewModule; });
/* 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 _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var _shared_common_stats_filter_common_stats_filter_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/common-stats-filter/common-stats-filter.module */ "./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.module.ts");
/* harmony import */ var src_app_shared_pipes_pipes_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/shared/pipes/pipes.module */ "./src/app/shared/pipes/pipes.module.ts");
/* harmony import */ var _custom_query_view_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./custom-query-view.component */ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query-view/custom-query-view.component.ts");
/* harmony import */ var _custom_query_custom_query_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../custom-query/custom-query.module */ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.module.ts");
/* harmony import */ var _procedure_name_procedure_name_module__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../procedure-name/procedure-name.module */ "./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.module.ts");











const imports = [
    _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["TabMenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["InputTextModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["ButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["MessageModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["CardModule"],
    _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormsModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["DropdownModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["CheckboxModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["TableModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["MultiSelectModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["MenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["TooltipModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["RadioButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["RatingModule"],
    _shared_common_stats_filter_common_stats_filter_module__WEBPACK_IMPORTED_MODULE_6__["CommonStatsFilterModule"],
    src_app_shared_pipes_pipes_module__WEBPACK_IMPORTED_MODULE_7__["PipeModule"],
    _custom_query_custom_query_module__WEBPACK_IMPORTED_MODULE_9__["CustomQueryModule"],
    _procedure_name_procedure_name_module__WEBPACK_IMPORTED_MODULE_10__["ProcedureNameModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["PanelModule"],
];
const components = [_custom_query_view_component__WEBPACK_IMPORTED_MODULE_8__["CustomQueryViewComponent"]];
const routes = [
    {
        path: '',
        component: _custom_query_view_component__WEBPACK_IMPORTED_MODULE_8__["CustomQueryViewComponent"],
        pathMatch: 'full',
    }
];
let CustomQueryViewModule = class CustomQueryViewModule {
};
CustomQueryViewModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [components,],
        imports: [imports, _angular_router__WEBPACK_IMPORTED_MODULE_3__["RouterModule"].forChild(routes)],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_3__["RouterModule"], components],
    })
], CustomQueryViewModule);



/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.component.scss":
/*!*****************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.component.scss ***!
  \*****************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("app-custom-query .custom-query-container .ui-table-globalfilter-container .global-search {\n  position: absolute;\n  top: -55px;\n  left: 53px;\n  width: 250px;\n  padding: 0.429em 0.429em 0.429em 2em;\n}\napp-custom-query .custom-query-container .ui-table-globalfilter-container i {\n  position: absolute;\n  top: -49px;\n  left: 58px;\n  z-index: 99;\n  font-size: 1.5em;\n}\napp-custom-query .custom-query-container .action-container .filter-icon-button {\n  margin: 0px 5px;\n}\napp-custom-query .custom-query-container .action-container .input-field-search {\n  padding: 0.429em 0.429em 0.429em 2em;\n  width: 200px;\n}\napp-custom-query .custom-query-container .action-container .search-div-css {\n  position: relative;\n  width: 80%;\n}\napp-custom-query .custom-query-container .action-container .search-div-css i {\n  font-size: 1.5em;\n  position: absolute;\n  color: #1d5290;\n  top: 5px;\n  left: 5px;\n}\napp-custom-query .custom-query-container .action-container .ui-multiselect {\n  border: none;\n  background: transparent;\n}\napp-custom-query .custom-query-container .action-container .ui-multiselect .ui-helper-hidden-accessible {\n  display: none;\n}\napp-custom-query .custom-query-container .action-container .ui-multiselect .ui-multiselect-label {\n  display: none;\n}\napp-custom-query .custom-query-container .action-container .ui-multiselect .ui-multiselect-trigger {\n  background-color: transparent;\n}\napp-custom-query .custom-query-container .action-container .icons-container {\n  display: inline-flex;\n}\napp-custom-query .custom-query-container .action-container .ip-alert-group {\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n}\napp-custom-query .custom-query-container .column-icon {\n  font-size: 1.5em;\n  color: #1d5290;\n  margin: 0 10px;\n}\napp-custom-query .custom-query-container .ui-table .columnwidth {\n  width: 40px;\n}\napp-custom-query .custom-query-container .ui-table .action-olumnwidth {\n  width: 180px;\n}\napp-custom-query .custom-query-container .ui-table .switch-column {\n  width: 60px;\n}\napp-custom-query .custom-query-container .ui-table .icons8 {\n  color: #1d5290;\n}\napp-custom-query .custom-query-container .mh-10 {\n  margin: 0 10px;\n}\napp-custom-query .custom-query-container p-panel {\n  width: 100%;\n}\napp-custom-query .custom-query-container .mulitselectRight .ui-multiselect-panel {\n  right: 0px !important;\n  left: auto !important;\n}");

/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.component.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.component.ts ***!
  \***************************************************************************************************/
/*! exports provided: CustomQueryComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomQueryComponent", function() { return CustomQueryComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var src_app_shared_scheduler_scheduler_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/shared/scheduler/scheduler.service */ "./src/app/shared/scheduler/scheduler.service.ts");
/* harmony import */ var _services_db_monitoring_services__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../services/db-monitoring.services */ "./src/app/pages/db-monitoring/services/db-monitoring.services.ts");
/* harmony import */ var _custom_query_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./custom-query.service */ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.service.ts");
/* harmony import */ var src_app_shared_time_bar_service_time_bar_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/shared/time-bar/service/time-bar.service */ "./src/app/shared/time-bar/service/time-bar.service.ts");








let CustomQueryComponent = class CustomQueryComponent {
    constructor(dbMonService, schedulerService, sessionSerivce, customQueryService, messageService, cdRef, timebarService) {
        this.dbMonService = dbMonService;
        this.schedulerService = schedulerService;
        this.sessionSerivce = sessionSerivce;
        this.customQueryService = customQueryService;
        this.messageService = messageService;
        this.cdRef = cdRef;
        this.timebarService = timebarService;
        this.table = primeng__WEBPACK_IMPORTED_MODULE_2__["Table"];
        this.totalRecords = 0;
        this.cols = [];
        this.data = [];
        this.first = { first: 0 };
        this.rows = { rows: 50 };
    }
    ngOnInit() {
        const me = this;
        me.showpaginator = true;
        this.dataSubscription = me.customQueryService.receiveProvider$.subscribe(result => {
            this.dataOfSelectedQuery(result);
        }, err => {
            this.dataSubscription.unsubscribe();
        }, () => {
            this.dataSubscription.unsubscribe();
        });
        me.dataTable = {
            data: [],
        };
        let tableConfig = {
            config: {
                "globalFilter": true,
                "tableName": "Query Output",
                "download": true
            },
        };
        me.tableConfig = tableConfig;
    }
    dataOfSelectedQuery(state) {
        if (state == undefined || Object.keys(state[0]).length == 0) {
            this.dataTable.data = [];
            this.header = [];
            this.totalRecords = 0;
            return;
        }
        if (state != null && state != undefined) {
            const me = this;
            me.totalRecords = state[0].length;
            me.insertDataInTable(state);
        }
    }
    insertDataInTable(state) {
        const me = this;
        this.dataTable.data = [];
        me.data = [];
        for (let key in state[0]) {
            me.data.push({ 'label': key, 'key': key, 'type': 0, 'width': "150px" });
            me.header = [
                {
                    cols: me.data,
                },
            ];
        }
        this.dataTable.data = [...state];
    }
    exportExcel() {
        const me = this;
        __webpack_require__.e(/*! import() | xlsx */ "default~logstab-logstab-module~nettest-nettest-module~xlsx").then(__webpack_require__.t.bind(null, /*! xlsx */ "./node_modules/xlsx/xlsx.js", 7)).then(xlsx => {
            const worksheet = xlsx.utils.json_to_sheet(me.dataTable.data);
            const workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };
            const excelBuffer = xlsx.write(workbook, { bookType: 'xlsx', type: 'array' });
            this.saveAsExcelFile(excelBuffer, "customQueryOutput");
        });
        me.popup();
    }
    popup() {
        const me = this;
        let msg = {
            severity: 'info',
            summary: 'Info',
            detail: "Downloaded Successfully",
        };
        me.messageService.add(msg);
    }
    saveAsExcelFile(buffer, fileName) {
        Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(null, /*! file-saver */ "./node_modules/file-saver/dist/FileSaver.min.js", 7)).then(FileSaver => {
            let EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
            let EXCEL_EXTENSION = '.xlsx';
            const data = new Blob([buffer], {
                type: EXCEL_TYPE
            });
            FileSaver.saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);
        });
    }
    ngOnDestroy() {
        const me = this;
    }
};
CustomQueryComponent.ctorParameters = () => [
    { type: _services_db_monitoring_services__WEBPACK_IMPORTED_MODULE_5__["DBMonitoringService"] },
    { type: src_app_shared_scheduler_scheduler_service__WEBPACK_IMPORTED_MODULE_4__["SchedulerService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_3__["SessionService"] },
    { type: _custom_query_service__WEBPACK_IMPORTED_MODULE_6__["CustomQueryService"] },
    { type: primeng__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] },
    { type: src_app_shared_time_bar_service_time_bar_service__WEBPACK_IMPORTED_MODULE_7__["TimebarService"] }
];
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('dt')
], CustomQueryComponent.prototype, "table", void 0);
CustomQueryComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-custom-query',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./custom-query.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./custom-query.component.scss */ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.component.scss")).default]
    })
], CustomQueryComponent);



/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.module.ts":
/*!************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.module.ts ***!
  \************************************************************************************************/
/*! exports provided: CustomQueryModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomQueryModule", function() { return CustomQueryModule; });
/* 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 _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var _shared_common_stats_filter_common_stats_filter_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/common-stats-filter/common-stats-filter.module */ "./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.module.ts");
/* harmony import */ var src_app_shared_pipes_pipes_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/shared/pipes/pipes.module */ "./src/app/shared/pipes/pipes.module.ts");
/* harmony import */ var _custom_query_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./custom-query.component */ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.component.ts");
/* harmony import */ var _sql_activity_db_query_stats_db_query_stats_filter_db_query_stats_filter_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../sql-activity/db-query-stats/db-query-stats-filter/db-query-stats-filter.module */ "./src/app/pages/db-monitoring/sql-activity/db-query-stats/db-query-stats-filter/db-query-stats-filter.module.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");










// import {GrowlModule} from 'growl';

const imports = [
    _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["TabMenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["InputTextModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["ButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["MessageModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["CardModule"],
    _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormsModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["DropdownModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["CheckboxModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["TableModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["MultiSelectModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["MenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["TooltipModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["RadioButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["RatingModule"],
    _shared_common_stats_filter_common_stats_filter_module__WEBPACK_IMPORTED_MODULE_6__["CommonStatsFilterModule"],
    src_app_shared_pipes_pipes_module__WEBPACK_IMPORTED_MODULE_7__["PipeModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["ToolbarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["PanelModule"],
    _sql_activity_db_query_stats_db_query_stats_filter_db_query_stats_filter_module__WEBPACK_IMPORTED_MODULE_9__["DbQueryStatsFilterModule"],
    src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_10__["CavTableModule"]
];
const components = [_custom_query_component__WEBPACK_IMPORTED_MODULE_8__["CustomQueryComponent"]];
// const routes: Routes = [
//   {
//     path: '',
//     component: CustomQueryComponent,
//     pathMatch: 'full'
//   },
// ];
let CustomQueryModule = class CustomQueryModule {
};
CustomQueryModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [components,],
        imports: [imports, _angular_router__WEBPACK_IMPORTED_MODULE_3__["RouterModule"]],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_3__["RouterModule"], components],
    })
], CustomQueryModule);



/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.service.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.service.ts ***!
  \*************************************************************************************************/
/*! exports provided: CustomQueryService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomQueryService", function() { return CustomQueryService; });
/* 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 rxjs_internal_Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/internal/Subject */ "./node_modules/rxjs/internal/Subject.js");
/* harmony import */ var rxjs_internal_Subject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(rxjs_internal_Subject__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var src_app_core_store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/store/store */ "./src/app/core/store/store.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _db_monitoring_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../db-monitoring.state */ "./src/app/pages/db-monitoring/db-monitoring.state.ts");
/* harmony import */ var _services_db_monitoring_services__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../services/db-monitoring.services */ "./src/app/pages/db-monitoring/services/db-monitoring.services.ts");








let CustomQueryService = class CustomQueryService extends src_app_core_store_store__WEBPACK_IMPORTED_MODULE_4__["Store"].AbstractService {
    constructor(sessionService, dbmonService) {
        super();
        this.sessionService = sessionService;
        this.dbmonService = dbmonService;
        this.sendBroadcaster = new rxjs_internal_Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
        this.receiveProvider$ = this.sendBroadcaster.asObservable();
    }
    /*Method for sending all the required params into the payload for the request */
    load(payload, requestedQuery) {
        const me = this;
        const output = new rxjs_internal_Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
        setTimeout(() => {
            output.next(new _db_monitoring_state__WEBPACK_IMPORTED_MODULE_6__["DBMonitoringLoadingState"]());
        }, 0);
        const session = me.sessionService.session;
        requestedQuery = requestedQuery.replace(/\n/g, " ");
        if (session) {
            payload.cctx = me.sessionService.session.cctx;
            payload.tr = me.sessionService.session.testRun.id;
            payload.timezone = me.sessionService.selectedTimeZone.zoneLabel;
        }
        payload.dataSourceName = me.dbmonService.dataSource;
        payload.dbType = me.dbmonService.dbType;
        payload.globalId = me.dbmonService.globalId; //need to bind
        if (me.sessionService.isMultiDC) {
            payload.subject = me.dbmonService.subject;
        }
        const path = src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].api.dbMonitoring.queryInfo.endpoint;
        payload.query = requestedQuery;
        me.controller.post(path, payload).subscribe((result) => {
            const state = new _db_monitoring_state__WEBPACK_IMPORTED_MODULE_6__["DBMonitoringLoadedState"]();
            if (result != undefined) {
                state.data = result;
                output.next(state);
                me.sendBroadcaster.next(state.data['jsonArray']);
                return;
            }
        }, (e) => {
            output.error(new _db_monitoring_state__WEBPACK_IMPORTED_MODULE_6__["DBMonitoringLoadingErrorStatus"](e));
            output.complete();
            me.logger.error('Custom-query is not loaded successfully');
        });
        return output;
    }
};
CustomQueryService.ctorParameters = () => [
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_3__["SessionService"] },
    { type: _services_db_monitoring_services__WEBPACK_IMPORTED_MODULE_7__["DBMonitoringService"] }
];
CustomQueryService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    })
], CustomQueryService);



/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.component.scss":
/*!*********************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.component.scss ***!
  \*********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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

/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.component.ts":
/*!*******************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.component.ts ***!
  \*******************************************************************************************************/
/*! exports provided: ProcedureNameComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProcedureNameComponent", function() { return ProcedureNameComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var _db_monitoring_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../db-monitoring.state */ "./src/app/pages/db-monitoring/db-monitoring.state.ts");
/* harmony import */ var _custom_query_custom_query_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../custom-query/custom-query.service */ "./src/app/pages/db-monitoring/configuration-and-logs/custom-query/custom-query.service.ts");
/* harmony import */ var _procedure_name_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./procedure-name.service */ "./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.service.ts");






let ProcedureNameComponent = class ProcedureNameComponent {
    constructor(procedureService, sessionSerivce, customQueryService) {
        this.procedureService = procedureService;
        this.sessionSerivce = sessionSerivce;
        this.customQueryService = customQueryService;
        this.cols = [];
        this._selectedColumns = [];
        this.globalFilterFields = [];
        this.isShowColumnFilter = false;
        this.filterTitle = 'Enable Filters';
        this.tooltipzindex = 100000;
        this.isDisabled = false;
        this.enableDisbaleTextArea = false;
        this.enableForward = false;
        this.enableRewind = false;
        this.lazy = false;
        this.isRewind = false;
        this.rewindOn = false;
        this.isPagination = false;
        this.isEnableFilter = false;
        this.textInCustom = '';
    }
    ngOnInit() {
        const me = this;
        me.load();
    }
    load() {
        const me = this;
        const payload = {};
        if (!me.sessionSerivce.isActive()) {
            return;
        }
        me.procedureService.load(payload).subscribe((state) => {
            if (state instanceof _db_monitoring_state__WEBPACK_IMPORTED_MODULE_3__["DBMonitoringLoadingState"]) {
                me.onLoading(state);
                return;
            }
            if (state instanceof _db_monitoring_state__WEBPACK_IMPORTED_MODULE_3__["DBMonitoringLoadedState"]) {
                me.onLoaded(state);
                return;
            }
        }, (state) => {
            me.onLoadingError(state);
        });
    }
    onLoading(state) {
        const me = this;
        me.empty = false;
        me.loading = true;
    }
    onLoadingError(state) {
        const me = this;
        me.empty = false;
        me.loading = false;
    }
    onLoaded(state) {
        const me = this;
        me.updateProcedureDataView(state);
    }
    /**Method to select the radiobutton be default */
    updateProcedureDataView(result) {
        this.title = 'Procedure Name';
        if (result != null) {
            if (result.data[0]['op'] != "NA") {
                this.selectedQuery = result.data[0]['op'];
                this.setListOfQuery(result.data);
            }
            else {
                this.selectedQuery = 'CustomQuery';
            }
        }
    }
    /* push queries in the array */
    setListOfQuery(data) {
        try {
            this.queryData = [];
            for (let i = 0; i < data.length; i++) {
                if (data[i]['op'] != 'NA' && data[i]['op'] != '' && data[i]['op'] != undefined) //to check for other db types 
                    this.queryData.push(data[i]);
            }
            if (this.queryData.length == 0) {
                this.enableDisbaleTextArea = false;
            }
        }
        catch (error) {
            console.log('SqlProcedureNameComponent', 'setListOfQuery', 'exception', error);
        }
    }
    dataCorrespondingToQuery() {
        const me = this;
        const payload = {};
        if (me.selectedQuery == 'CustomQuery') {
            me.customQueryService.load(payload, me.textInCustom);
        }
        else {
            me.customQueryService.load(payload, me.selectedQuery);
        }
    }
};
ProcedureNameComponent.ctorParameters = () => [
    { type: _procedure_name_service__WEBPACK_IMPORTED_MODULE_5__["ProcedureNameService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__["SessionService"] },
    { type: _custom_query_custom_query_service__WEBPACK_IMPORTED_MODULE_4__["CustomQueryService"] }
];
ProcedureNameComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-procedure-name',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./procedure-name.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./procedure-name.component.scss */ "./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.component.scss")).default]
    })
], ProcedureNameComponent);



/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.module.ts":
/*!****************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.module.ts ***!
  \****************************************************************************************************/
/*! exports provided: ProcedureNameModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProcedureNameModule", function() { return ProcedureNameModule; });
/* 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 _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var _shared_common_stats_filter_common_stats_filter_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/common-stats-filter/common-stats-filter.module */ "./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.module.ts");
/* harmony import */ var src_app_shared_pipes_pipes_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/shared/pipes/pipes.module */ "./src/app/shared/pipes/pipes.module.ts");
/* harmony import */ var _procedure_name_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./procedure-name.component */ "./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.component.ts");









const imports = [
    _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["TabMenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["InputTextModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["ButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["MessageModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["CardModule"],
    _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormsModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["DropdownModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["CheckboxModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["TableModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["MultiSelectModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["MenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["TooltipModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["RadioButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["RatingModule"],
    _shared_common_stats_filter_common_stats_filter_module__WEBPACK_IMPORTED_MODULE_6__["CommonStatsFilterModule"],
    src_app_shared_pipes_pipes_module__WEBPACK_IMPORTED_MODULE_7__["PipeModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["ToolbarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_4__["PanelModule"]
];
const components = [_procedure_name_component__WEBPACK_IMPORTED_MODULE_8__["ProcedureNameComponent"]];
// const routes: Routes = [
//   {
//     path: '',
//     component: ProcedureNameComponent,
//     pathMatch: 'full'
//   },
// ];
let ProcedureNameModule = class ProcedureNameModule {
};
ProcedureNameModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [components,],
        imports: [imports, _angular_router__WEBPACK_IMPORTED_MODULE_3__["RouterModule"]],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_3__["RouterModule"], components],
    })
], ProcedureNameModule);



/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.service.ts":
/*!*****************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/procedure-name/procedure-name.service.ts ***!
  \*****************************************************************************************************/
/*! exports provided: ProcedureNameService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProcedureNameService", function() { return ProcedureNameService; });
/* 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 rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var src_app_core_store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/store/store */ "./src/app/core/store/store.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _db_monitoring_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../db-monitoring.state */ "./src/app/pages/db-monitoring/db-monitoring.state.ts");
/* harmony import */ var _services_db_monitoring_services__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../services/db-monitoring.services */ "./src/app/pages/db-monitoring/services/db-monitoring.services.ts");








let ProcedureNameService = class ProcedureNameService extends src_app_core_store_store__WEBPACK_IMPORTED_MODULE_4__["Store"].AbstractService {
    constructor(sessionService, dbmonService) {
        super();
        this.sessionService = sessionService;
        this.dbmonService = dbmonService;
        this.resPending = false;
    }
    /*used to when dbMonitorUI.json is not present */
    load(payload) {
        const me = this;
        this.resPending = false;
        const output = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
        setTimeout(() => {
            output.next(new _db_monitoring_state__WEBPACK_IMPORTED_MODULE_6__["DBMonitoringLoadingState"]());
        }, 0);
        const session = me.sessionService.session;
        if (session) {
            payload.cctx = me.sessionService.session.cctx;
            payload.tr = me.sessionService.session.testRun.id;
            payload.timezone = me.sessionService.selectedTimeZone.zoneLabel;
        }
        payload.dataSourceName = me.dbmonService.dataSource;
        payload.dbType = me.dbmonService.dbType;
        payload.duration = me.dbmonService.duration;
        payload.globalId = me.dbmonService.globalId;
        payload.isAggregrate = me.dbmonService.isAggregate;
        payload.isFirstCall = false;
        payload.isPresetChanged = true;
        payload.drillDownTime = ''; //need to bind
        payload.isRealTimeAppled = false;
        payload.updateRealTimeStamp = -1;
        payload.drilldownSessionId = -1;
        payload.avgCount = me.dbmonService.avgCount;
        payload.avgCounter = me.dbmonService.avgCounter;
        if (me.sessionService.isMultiDC) {
            payload.subject = me.dbmonService.subject;
        }
        const path = src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].api.dbMonitoring.queryName.endpoint;
        me.controller.post(path, payload).subscribe((result) => {
            const state = new _db_monitoring_state__WEBPACK_IMPORTED_MODULE_6__["DBMonitoringLoadedState"]();
            this.resPending = true;
            if (result != undefined) {
                state.data = result;
                output.next(state);
                return;
            }
        }, (e) => {
            this.resPending = true;
            output.error(new _db_monitoring_state__WEBPACK_IMPORTED_MODULE_6__["DBMonitoringLoadingErrorStatus"](e));
            output.complete();
            me.logger.error('Procedure Name is not loaded successfully');
        });
        return output;
    }
};
ProcedureNameService.ctorParameters = () => [
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_3__["SessionService"] },
    { type: _services_db_monitoring_services__WEBPACK_IMPORTED_MODULE_7__["DBMonitoringService"] }
];
ProcedureNameService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    })
], ProcedureNameService);



/***/ })

}]);