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

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/db-query-logs/db-query-logs.component.html":
/*!*********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/db-query-logs/db-query-logs.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=\"db-query-logs-container\" #widget>\n    <div class=\"p-grid p-col-12\">\n        <app-help #help></app-help>\n        <cav-table class=\"all-tables\" [value]=\"dataTable.data\" [headerRelativePath]=\"headerRelativePath\"  (clickButtonEvent)=\"clickButtonEvent($event)\"  scrollHeight=\"350px\"></cav-table>\n        <div *ngIf=\"loading\"\n            [ngClass]=\"{'loading-indicator pageLoading':dbMonService.spinnerClass === false, 'spinner':dbMonService.spinnerClass === true}\">\n            <p-progressSpinner [style]=\"{width: '40px', height: '40px'}\" strokeWidth=\"4\" animationDuration=\".5s\">\n            </p-progressSpinner>\n        </div>\n    </div>\n    <app-common-stats-filter #commonFilterSidebar></app-common-stats-filter>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.component.html":
/*!*****************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.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=\"db-query-stats-filter-container\">\n    <p-sidebar #sidebar [(visible)]=\"visible\" [showCloseIcon]=\"false\" blockScroll=\"true\" appendTo=\"body\"\n        [styleClass]=\"classes\">\n        <div class=\"sidebar-header\">\n            <div class=\"sidebar-title\">\n                <i class=\"icons8 icons8-clock\"></i>\n                <span>Stats Filter</span>\n                <i class=\"icons8 icons8-delete\" (click)=\"closeClick()\"></i>\n            </div>\n        </div>\n        <div class=\"sidebar-content ui-fluid\">\n            <p-accordion [multiple]=\"true\" expandIcon=\"icons8-forward\" collapseIcon=\"icons8-collapse-arrow\">\n                <p-accordionTab header=\"Preset\" [selected]=\"true\">\n                    <app-stats-filter></app-stats-filter>\n                </p-accordionTab>\n                <p-accordionTab header=\"DB Server\" [selected]=\"true\">\n                    <app-datasource-navigation></app-datasource-navigation>\n                </p-accordionTab>\n            </p-accordion>\n        </div>\n        <!-- <div class=\"sidebar-footer\">\n        <button pButton type=\"submit\" label=\"Save\" class=\"w-100-p\"></button>\n    </div> -->\n    </p-sidebar>\n</div>\n");

/***/ }),

/***/ "./src/app/pages/db-monitoring/configuration-and-logs/db-query-logs/db-query-logs.component.scss":
/*!*******************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/configuration-and-logs/db-query-logs/db-query-logs.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-db-query-logs .db-query-logs-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-db-query-logs .db-query-logs-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-db-query-logs .db-query-logs-container .action-container .filter-icon-button {\n  margin: 0px 5px;\n}\napp-db-query-logs .db-query-logs-container .action-container .input-field-search {\n  padding: 0.429em 0.429em 0.429em 2em;\n  width: 200px;\n}\napp-db-query-logs .db-query-logs-container .action-container .search-div-css {\n  position: relative;\n  width: 80%;\n}\napp-db-query-logs .db-query-logs-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-db-query-logs .db-query-logs-container .action-container .ui-multiselect {\n  border: none;\n  background: transparent;\n}\napp-db-query-logs .db-query-logs-container .action-container .ui-multiselect .ui-helper-hidden-accessible {\n  display: none;\n}\napp-db-query-logs .db-query-logs-container .action-container .ui-multiselect .ui-multiselect-label {\n  display: none;\n}\napp-db-query-logs .db-query-logs-container .action-container .ui-multiselect .ui-multiselect-trigger {\n  margin-top: 1px;\n  background-color: transparent;\n}\napp-db-query-logs .db-query-logs-container .action-container .ui-multiselect .ui-multiselect-trigger .ui-multiselect-trigger-icon {\n  font-size: 1.5em;\n}\napp-db-query-logs .db-query-logs-container .action-container .icons-container {\n  display: inline-flex;\n}\napp-db-query-logs .db-query-logs-container .action-container .ip-alert-group {\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n}\napp-db-query-logs .db-query-logs-container .column-icon {\n  font-size: 1.5em;\n  color: #1d5290;\n  margin: 0 10px;\n}\napp-db-query-logs .db-query-logs-container .ui-table .columnwidth {\n  width: 40px;\n}\napp-db-query-logs .db-query-logs-container .ui-table .action-olumnwidth {\n  width: 180px;\n}\napp-db-query-logs .db-query-logs-container .ui-table .switch-column {\n  width: 60px;\n}\napp-db-query-logs .db-query-logs-container .ui-table .ui-table-scrollable-body {\n  overflow-x: hidden;\n}\napp-db-query-logs .db-query-logs-container .ui-table .icons8 {\n  color: #1d5290;\n}\napp-db-query-logs .db-query-logs-container .mh-10 {\n  margin: 0 10px;\n}\napp-db-query-logs .db-query-logs-container p-panel {\n  width: 100%;\n}\napp-db-query-logs .db-query-logs-container .mulitselectRight .ui-multiselect-panel {\n  right: 0px !important;\n  left: auto !important;\n}\napp-db-query-logs .db-query-logs-container .loading-indicator {\n  position: fixed;\n  z-index: 9999;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  background-color: rgba(0, 0, 0, 0.15);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\napp-db-query-logs .db-query-logs-container .spinner {\n  position: fixed;\n  top: 85px;\n  right: 37px;\n}");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DbQueryLogsComponent", function() { return DbQueryLogsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var src_app_shared_scheduler_scheduler_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/shared/scheduler/scheduler.service */ "./src/app/shared/scheduler/scheduler.service.ts");
/* harmony import */ var _db_monitoring_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../db-monitoring.state */ "./src/app/pages/db-monitoring/db-monitoring.state.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 _service_db_query_log_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./service/db-query-log.service */ "./src/app/pages/db-monitoring/configuration-and-logs/db-query-logs/service/db-query-log.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 DbQueryLogsComponent = class DbQueryLogsComponent {
    constructor(dbQueryLogService, dbMonService, schedulerService, sessionSerivce, timebarService) {
        this.dbQueryLogService = dbQueryLogService;
        this.dbMonService = dbMonService;
        this.schedulerService = schedulerService;
        this.sessionSerivce = sessionSerivce;
        this.timebarService = timebarService;
    }
    ngOnInit() {
        const me = this;
        me.headerRelativePath = "DBMonitoring/MSSQL_DB_Query_Logs.json";
        me.dataTable = {
            data: []
        };
        me.load();
        me.subscribeScheduleLoad();
    }
    ngAfterViewInit() {
        const me = this;
        setTimeout(() => {
            //For the change in progress spinner css
            me.dbMonService.spinnerClass = false;
        });
    }
    subscribeScheduleLoad() {
        const me = this;
        me.dataSubsciption = me.dbMonService.scheduleDataRequestObservable$.subscribe(result => {
            if (result && this.dbQueryLogService.resPending) {
                this.dbQueryLogService.resPending = false;
                me.load();
            }
        });
    }
    load() {
        const me = this;
        me.loading = true;
        if (!me.sessionSerivce.isActive()) {
            return;
        }
        me.dbQueryLogService.getPresetAndLoad().subscribe((state) => {
            if (state instanceof _db_monitoring_state__WEBPACK_IMPORTED_MODULE_4__["DBMonitoringLoadingState"]) {
                me.onLoading(state);
                return;
            }
            if (state instanceof _db_monitoring_state__WEBPACK_IMPORTED_MODULE_4__["DBMonitoringLoadedState"]) {
                me.onLoaded(state);
                return;
            }
        }, (state) => {
            me.onLoadingError(state);
        });
    }
    onLoading(state) {
        const me = this;
        me.loading = true;
    }
    onLoadingError(state) {
        const me = this;
        me.dataTable.data = [];
        me.loading = false;
    }
    /*  Method to load table data.  */
    onLoaded(state) {
        const me = this;
        me.loading = false;
        me.timebarService.isTimeChangedFromGlobal = false;
        me.dataTable.data = state.data;
        if (!me.dataTable.data) {
            me.dataTable.data = [];
        }
        //For the change in progress spinner css
        me.dbMonService.spinnerClass = true;
    }
    // Making custom function for sorting numbers, dates and strings
    customSort(event) {
        event.data.sort((data1, data2) => {
            let value1 = data1[event.key];
            let value2 = data2[event.key];
            let result = null;
            // Sorting null values
            if (value1 == null && value2 != null)
                result = -1;
            else if (value1 != null && value2 == null)
                result = 1;
            else if (value1 == null && value2 == null)
                result = 0;
            else if (event['key'] == 'executionTime') {
                let newarr1 = data1[event.key].split("ms");
                let newarr2 = data2[event.key].split("ms");
                value1 = Number(newarr1[0]);
                value2 = Number(newarr2[0]);
                result = (value1 < value2) ? -1 : (value1 > value2) ? 1 : 0;
            }
            //Checking fields individually for their type and sort data accordingly.
            else if (event['key'] == 'timestamp' || event['key'] == 'dbName' || event['key'] == 'className' || event['key'] == 'methodName' || event['key'] == 'query')
                //for string type fields
                result = value1.localeCompare(value2);
            else {
                result = (value1 < value2) ? -1 : (value1 > value2) ? 1 : 0;
            }
            return (event.order * result);
        });
    }
    ngOnDestroy() {
        const me = this;
        me.schedulerService.unsubscribe('load-dbquerylog');
        me.dataSubsciption.unsubscribe();
    }
    clickButtonEvent(event) {
        var _a, _b;
        const me = this;
        if (((_b = (_a = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _a === void 0 ? void 0 : _a.actionConfig) === null || _b === void 0 ? void 0 : _b.action) == "help") {
            me.help.show('msSqlDBQueryLogs', 'DB Query Logs', 'db-monitoring');
        }
    }
};
DbQueryLogsComponent.ctorParameters = () => [
    { type: _service_db_query_log_service__WEBPACK_IMPORTED_MODULE_6__["DBQueryLogService"] },
    { type: _services_db_monitoring_services__WEBPACK_IMPORTED_MODULE_5__["DBMonitoringService"] },
    { type: src_app_shared_scheduler_scheduler_service__WEBPACK_IMPORTED_MODULE_3__["SchedulerService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__["SessionService"] },
    { 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"])('help')
], DbQueryLogsComponent.prototype, "help", void 0);
DbQueryLogsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-db-query-logs',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./db-query-logs.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/configuration-and-logs/db-query-logs/db-query-logs.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./db-query-logs.component.scss */ "./src/app/pages/db-monitoring/configuration-and-logs/db-query-logs/db-query-logs.component.scss")).default]
    })
], DbQueryLogsComponent);



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DbQueryLogsModule", function() { return DbQueryLogsModule; });
/* 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 _db_query_logs_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./db-query-logs.component */ "./src/app/pages/db-monitoring/configuration-and-logs/db-query-logs/db-query-logs.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 _shared_common_stats_filter_common_stats_filter_module__WEBPACK_IMPORTED_MODULE_7__ = __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_8__ = __webpack_require__(/*! src/app/shared/pipes/pipes.module */ "./src/app/shared/pipes/pipes.module.ts");
/* harmony import */ var _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/material/tooltip */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/tooltip.js");
/* harmony import */ var _shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");
/* harmony import */ var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/shared/help/help.module */ "./src/app/shared/help/help.module.ts");












const imports = [
    _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["ToolbarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["BreadcrumbModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["TabMenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["InputTextModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["MessageModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["DialogModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["ToolbarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["CardModule"],
    _angular_forms__WEBPACK_IMPORTED_MODULE_6__["FormsModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["DropdownModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["CheckboxModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["TableModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["MultiSelectModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["MenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["BreadcrumbModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["TooltipModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["RadioButtonModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["RatingModule"],
    primeng__WEBPACK_IMPORTED_MODULE_5__["ProgressSpinnerModule"],
    _shared_common_stats_filter_common_stats_filter_module__WEBPACK_IMPORTED_MODULE_7__["CommonStatsFilterModule"],
    src_app_shared_pipes_pipes_module__WEBPACK_IMPORTED_MODULE_8__["PipeModule"],
    _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_9__["MatTooltipModule"],
    _shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_10__["CavTableModule"],
    src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_11__["HelpModule"]
];
const components = [_db_query_logs_component__WEBPACK_IMPORTED_MODULE_3__["DbQueryLogsComponent"]];
const routes = [
    {
        path: '',
        component: _db_query_logs_component__WEBPACK_IMPORTED_MODULE_3__["DbQueryLogsComponent"],
        pathMatch: 'full'
    },
];
let DbQueryLogsModule = class DbQueryLogsModule {
};
DbQueryLogsModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [components,],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"]],
        imports: [imports, _angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"].forChild(routes), _shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_10__["CavTableModule"]]
    })
], DbQueryLogsModule);



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DBQueryLogService", function() { return DBQueryLogService; });
/* 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_app_shared_time_bar_service_time_bar_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/shared/time-bar/service/time-bar.state */ "./src/app/shared/time-bar/service/time-bar.state.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _db_monitoring_state__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../db-monitoring.state */ "./src/app/pages/db-monitoring/db-monitoring.state.ts");
/* harmony import */ var _services_db_monitoring_services__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../services/db-monitoring.services */ "./src/app/pages/db-monitoring/services/db-monitoring.services.ts");









let DBQueryLogService = class DBQueryLogService 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;
    }
    /* Method for sending all the required params into the payload for the request*/
    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_7__["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.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_6__["environment"].api.dbMonitoring.queryLogs.endpoint;
        me.controller.post(path, payload).subscribe((result) => {
            const state = new _db_monitoring_state__WEBPACK_IMPORTED_MODULE_7__["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_7__["DBMonitoringLoadingErrorStatus"](e));
            output.complete();
            me.logger.error('DB-query logs are not loaded successfully');
        });
        return output;
    }
    /* Method for preset */
    getPresetAndLoad() {
        const me = this;
        const payload = {};
        const output = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
        me.dbmonService.getPresetTime().subscribe((state) => {
            if (state instanceof src_app_shared_time_bar_service_time_bar_state__WEBPACK_IMPORTED_MODULE_5__["GlobalTimebarTimeLoadedState"]) {
                me.load(payload).subscribe((state) => {
                    if (state instanceof _db_monitoring_state__WEBPACK_IMPORTED_MODULE_7__["DBMonitoringLoadedState"]) {
                        output.next(state);
                    }
                });
                return;
            }
        });
        return output;
    }
};
DBQueryLogService.ctorParameters = () => [
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_3__["SessionService"] },
    { type: _services_db_monitoring_services__WEBPACK_IMPORTED_MODULE_8__["DBMonitoringService"] }
];
DBQueryLogService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    })
], DBQueryLogService);



/***/ }),

/***/ "./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.component.scss":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.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/shared/common-stats-filter/common-stats-filter.component.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.component.ts ***!
  \*************************************************************************************************/
/*! exports provided: CommonStatsFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonStatsFilterComponent", function() { return CommonStatsFilterComponent; });
/* 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_shared_page_sidebar_page_sidebar_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/shared/page-sidebar/page-sidebar.component */ "./src/app/shared/page-sidebar/page-sidebar.component.ts");



let CommonStatsFilterComponent = class CommonStatsFilterComponent extends src_app_shared_page_sidebar_page_sidebar_component__WEBPACK_IMPORTED_MODULE_2__["PageSidebarComponent"] {
    constructor() {
        super();
        this.classes = 'page-sidebar';
    }
    ngOnInit() {
    }
    show() {
        super.show();
    }
    closeClick() {
        const me = this;
        me.visible = !me.visible;
    }
};
CommonStatsFilterComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-common-stats-filter',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./common-stats-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.component.html")).default,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./common-stats-filter.component.scss */ "./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.component.scss")).default]
    })
], CommonStatsFilterComponent);



/***/ }),

/***/ "./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.module.ts":
/*!**********************************************************************************************!*\
  !*** ./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.module.ts ***!
  \**********************************************************************************************/
/*! exports provided: CommonStatsFilterModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonStatsFilterModule", function() { return CommonStatsFilterModule; });
/* 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 primeng__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var ng_pick_datetime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ng-pick-datetime */ "./node_modules/ng-pick-datetime/__ivy_ngcc__/picker.js");
/* harmony import */ var src_app_shared_date_time_picker_moment_moment_date_time_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/shared/date-time-picker-moment/moment-date-time.module */ "./src/app/shared/date-time-picker-moment/moment-date-time.module.ts");
/* harmony import */ var _common_stats_filter_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./common-stats-filter.component */ "./src/app/pages/db-monitoring/shared/common-stats-filter/common-stats-filter.component.ts");
/* harmony import */ var _stats_filter_stats_filter_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../stats-filter/stats-filter.module */ "./src/app/pages/db-monitoring/shared/stats-filter/stats-filter.module.ts");
/* harmony import */ var _datasource_navigation_datasource_navigation_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../datasource-navigation/datasource-navigation.module */ "./src/app/pages/db-monitoring/shared/datasource-navigation/datasource-navigation.module.ts");










const imports = [
    _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
    // HeaderModule,
    primeng__WEBPACK_IMPORTED_MODULE_3__["ToolbarModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["CardModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["TabViewModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["TabMenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["ButtonModule"],
    _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormsModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["InputSwitchModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["AccordionModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["SlideMenuModule"],
    ng_pick_datetime__WEBPACK_IMPORTED_MODULE_5__["OwlDateTimeModule"],
    src_app_shared_date_time_picker_moment_moment_date_time_module__WEBPACK_IMPORTED_MODULE_6__["OwlMomentDateTimeModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["MessageModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["MenuModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["OrderListModule"],
    primeng__WEBPACK_IMPORTED_MODULE_3__["SidebarModule"],
    _stats_filter_stats_filter_module__WEBPACK_IMPORTED_MODULE_8__["StatsFilterModule"],
    _datasource_navigation_datasource_navigation_module__WEBPACK_IMPORTED_MODULE_9__["DatasourceNavigationModule"]
];
const components = [
    _common_stats_filter_component__WEBPACK_IMPORTED_MODULE_7__["CommonStatsFilterComponent"]
];
let CommonStatsFilterModule = class CommonStatsFilterModule {
};
CommonStatsFilterModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [components],
        imports: [
            imports
        ],
        exports: [
            components
        ]
    })
], CommonStatsFilterModule);



/***/ })

}]);