(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["netocean-config-ssl-settings-netocean-config-ssl-settings-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.component.html":
/*!***************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.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=\"w-100-p\">\n    <div class=\"w-100-p headerSection\">\n        <div class=\"w-100-p mt-5 p-grid py-5 pl-16 p-align-center p-justify-between\">\n        <div class=\"p-grid p-align-center py-5\">\n            <span class=\"font-16 text-uppercase font-weight-700\">ssl Configuration</span>\n            <span class=\"mx-5\">\n                <app-help  [helpFileName]=\"'sslConfiguration'\"  [helpTitle]=\"'SSL Configuration'\" [helpFolder]=\"'netOcean'\"></app-help>\n            </span>\n        </div>\n        </div>\n    </div>\n    <div class=\"w-100-p p-grid p-align-center  border-all border-5 border-radius-3 my-24 p-8\">\n        <div class=\"p-col-6 p-grid p-align-center\">\n            <div class=\"p-col-5 p-0\">\n                TLS Version\n            </div>\n            <div class=\"p-col-6 p-0\">\n                <p-dropdown class=\"my-select\"  [style]=\"{'min-width':'100%'}\" [options]=\"tlsArr\" [(ngModel)]=\"tlsVersionInfo\"\n                [filter]=\"true\" filterBy=\"label\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n            </div>\n        </div>\n        <div class=\"p-col-6 p-grid p-align-center\">\n            <div class=\"p-col-5 p-0\">\n                Cipher Suite\n                <li class=\"icons8 icons8-info\" style=\"cursor: pointer;\" tooltipPosition=\"left\"\n                    pTooltip=\"If user does not select the cipher suite then default cipher suite will be considered according to selected TLS Version.\">\n                </li>\n            </div>\n            <div class=\"p-col-6 p-0\">\n                <p-multiSelect class=\"my-select\" [style]=\"{'width':'100%'}\" defaultLabel=\"Select Cipher Suite\" [maxSelectedLabels] = \"1\" selectedItemsLabel = \"{0} cipher suite selected\"\n                    [options]=\"cipherArr\" resetFilterOnHide = \"true\" [(ngModel)]=\"cipherSuiteInfo\" [panelStyle]=\"{minWidth:'309px'}\">\n                </p-multiSelect>\n            </div>\n        </div>\n        <div class=\"p-col-6 p-grid p-align-center\">\n            <div class=\"p-col-5 p-0\">\n                Server Certificate Chain\n            </div>\n            <div class=\"p-col-6 p-0\">\n                <p-dropdown class=\"my-select\" styleClass=\"cav-w-100\" [options]=\"chainFileList\"\n                [(ngModel)]=\"chainFile\" [filter]=\"true\" filterBy=\"label\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n            </div>\n        </div>\n        <div class=\"p-col-6 p-grid p-align-center\">\n            <div class=\"p-col-5 p-0\">\n                Certificate Authority (CA)\n            </div>\n            <div class=\"p-col-6 p-0\">\n                <p-dropdown class=\"my-select\" styleClass=\"cav-w-100\" [options]=\"certList\" [(ngModel)]=\"certFile\"\n                [filter]=\"true\" filterBy=\"label\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n            </div>\n        </div>\n        <div class=\"p-col-6 p-grid p-align-center\">\n            <div class=\"p-col-5 p-0\">\n                SSL Extra Certificate Chain Files\n                    <li class=\"icons8 icons8-info\" style=\"cursor: pointer;\"\n                        pTooltip=\"Certificates only support in .der, .pem and .pfx format.\"></li>\n            </div>\n            <div class=\"p-col-6 p-0\">\n                <p-multiSelect class=\"my-select\" [style]=\"{'width':'100%'}\"\n                        defaultLabel=\"Select Extra SSL Chain Files Certificate\" [options]=\"certListExtraOpt\"\n                        [(ngModel)]=\"extraCert\" [panelStyle]=\"{minWidth:'309px'}\"></p-multiSelect>\n            </div>\n        </div>\n        <div class=\"p-col-6 p-grid p-align-center\">\n            <div class=\"p-col-5 p-0\">\n                Certificate Revocation Lists (CRL)\n            </div>\n            <div class=\"p-col-6 p-0\">\n                <p-dropdown class=\"my-select\"  [style]=\"{'width':'100%'}\" [options]=\"certRevocationList\"\n                        [(ngModel)]=\"certRevocation\" [filter]=\"true\" filterBy=\"label\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n            </div>\n        </div>\n        <div class=\"p-col-12 p-grid p-justify-between p-align-center\">\n            <mat-checkbox [(ngModel)]=\"clientAuth\">Authenticate Client Certificate During Handshake</mat-checkbox>\n            <div class=\"p-col-6 p-grid p-align-center p-0\">\n                <div class=\"p-col-5 pl-5 p-0\">\n                    Client Authentication Depth\n                </div>\n                <div class=\"p-col-6 pl-3 p-0\">\n                    <input type=\"text\" [(ngModel)]=\"clientAuthDepth\" pInputText (input)=\"change($event)\"\n                    [value]=\"1\" class=\"w-100-p\" [disabled]=\"!clientAuth\" (keypress)=\"isNumCheck($event)\" />\n                </div>\n            </div>\n        </div>\n\n\n\n    </div>\n</div>\n\n\n<div class=\"p-grid p-justify-end my-5\">\n    <button pButton type=\"button\" label=\"Save\" [disabled]=\"!_commonService.$globalConfigPermission\" (click)=\"setSslSettings('')\"\n        class=\"ui-button-rounded mr-16\" [pTooltip]=\"_commonService.saveTooltipConfig\"></button>\n    <button pButton type=\"button\" label=\"Save & Activate\" [disabled]=\"!_commonService.$globalConfigPermission\" (click)=\"setSslSettings('activate')\"\n        class=\"btn-primary-outline  mr-12\" [pTooltip]=\"_commonService.saveActivateTooltipConfig\"></button>\n</div>\n\n<div class=\"\" *ngIf=\"isEnabledSpinner\">\n    <p-progressBar mode=\"indeterminate\"\n        [style]=\"{'position':'fixed','top':'0px','left':'0px','right':'0px','height': '4px'}\"></p-progressBar>\n    <div class=\"loader-container\"><i class=\"pi pi-spin pi-spinner\"\n            style=\"position: fixed;font-size: 35px;top: 0px;left: 0px;color: darkorange;animation-duration: .6s;\"></i>\n    </div>\n</div>\n<p-confirmDialog class=\"confirmdialog\" header=\"Confirmation\" acceptButtonStyleClass=\"ui-button-rounded px-10\"\n    rejectButtonStyleClass=\"ui-button-rounded ui-button-secondary px-10 mx-6\" acceptIcon=\"null\" rejectIcon=\"null\"\n    acceptLabel=\"Yes\" rejectLabel=\"No\"></p-confirmDialog>\n\n<!-- <p-growl [value]=\"msgs\"></p-growl> -->\n<p-toast key=\"msgs\"></p-toast>");

/***/ }),

/***/ "./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.component.scss":
/*!*************************************************************************************************************************!*\
  !*** ./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.component.scss ***!
  \*************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".ui-multiselect {\n  width: 100%;\n}");

/***/ }),

/***/ "./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.component.ts":
/*!***********************************************************************************************************************!*\
  !*** ./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.component.ts ***!
  \***********************************************************************************************************************/
/*! exports provided: NetoceanConfigSslSettingsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NetoceanConfigSslSettingsComponent", function() { return NetoceanConfigSslSettingsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
/* harmony import */ var _services_netocean_common_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/netocean-common.service */ "./src/app/pages/home/netocean/services/netocean-common.service.ts");
/* harmony import */ var _services_netocean_configuration_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../services/netocean-configuration.service */ "./src/app/pages/home/netocean/services/netocean-configuration.service.ts");
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js");
/* harmony import */ var _services_manage_services_info_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../services/manage-services-info.service */ "./src/app/pages/home/netocean/services/manage-services-info.service.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");


// import { NetoceanCommonService } from '../../../services/netocean/netocean-common.service';





let NetoceanConfigSslSettingsComponent = class NetoceanConfigSslSettingsComponent {
    constructor(messageService, _router, 
    // private log: Logger,
    _config, _manageService, _commonService) {
        this.messageService = messageService;
        this._router = _router;
        this._config = _config;
        this._manageService = _manageService;
        this._commonService = _commonService;
        this.isHelp = false;
        this.clientAuth = false;
        this.servcerCertChain = '';
        this.certAuth = '';
        this.certRevocation = '';
        this.clientAuthDepth = '1';
        this.msgs = [];
        this.tlsVersionInfo = "ssl2_3";
        this.cipherSuiteInfo = [];
        this.chainFile = 'cav-test-server.pem';
        this.certFile = 'cav-test-root.pem';
        this.certListExtraOpt = [];
        this.certRevocationList = [];
        this.chainFileList = [];
        this.certList = [];
        this.isEnabledSpinner = false;
        this.unsavedChanges = false;
        // Cipher Array
        this.tlsArr = [
            { label: 'All Version(s)', value: 'ssl2_3' },
            { label: 'SSL V3', value: 'ssl3' },
            // { label: 'TLS 1.0', value: 'tls1' },
            // { label: 'TLS 1.1', value: 'tls1_1' },
            { label: 'TLS 1.2', value: 'tls1_2' },
            { label: 'TLS 1.3', value: 'tls1_3' }
        ];
        this.cipherArr = [
            { label: "AES128-GCM-SHA256", value: "AES128-GCM-SHA256" },
            { label: "AES128-SHA256", value: "AES128-SHA256" },
            { label: "AES128-SHA", value: "AES128-SHA" },
            { label: "AES256-GCM-SHA384", value: "AES256-GCM-SHA384" },
            { label: "AES256-SHA256", value: "AES256-SHA256" },
            { label: "AES256-SHA", value: "AES256-SHA" },
            { label: "CAMELLIA128-SHA", value: "CAMELLIA128-SHA" },
            { label: "CAMELLIA256-SHA", value: "CAMELLIA256-SHA" },
            { label: "DES-CBC3-SHA", value: "DES-CBC3-SHA" },
            { label: "DH-DSS-AES128-GCM-SHA256", value: "DH-DSS-AES128-GCM-SHA256" },
            { label: "DH-DSS-AES128-SHA256", value: "DH-DSS-AES128-SHA256" },
            { label: "DH-DSS-AES128-SHA", value: "DH-DSS-AES128-SHA" },
            { label: "DH-DSS-AES256-GCM-SHA384", value: "DH-DSS-AES256-GCM-SHA384" },
            { label: "DH-DSS-AES256-SHA256", value: "DH-DSS-AES256-SHA256" },
            { label: "DH-DSS-AES256-SHA", value: "DH-DSS-AES256-SHA" },
            { label: "DH-DSS-CAMELLIA128-SHA", value: "DH-DSS-CAMELLIA128-SHA" },
            { label: "DH-DSS-CAMELLIA256-SHA", value: "DH-DSS-CAMELLIA256-SHA" },
            { label: "DH-DSS-DES-CBC3-SHA", value: "DH-DSS-DES-CBC3-SHA" },
            { label: "DH-DSS-SEED-SHA", value: "DH-DSS-SEED-SHA" },
            { label: "DH-RSA-AES128-GCM-SHA256", value: "DH-RSA-AES128-GCM-SHA256" },
            { label: "DH-RSA-AES128-SHA256", value: "DH-RSA-AES128-SHA256" },
            { label: "DH-RSA-AES128-SHA", value: "DH-RSA-AES128-SHA" },
            { label: "DH-RSA-AES256-GCM-SHA384", value: "DH-RSA-AES256-GCM-SHA384" },
            { label: "DH-RSA-AES256-SHA256", value: "DH-RSA-AES256-SHA256" },
            { label: "DH-RSA-AES256-SHA", value: "DH-RSA-AES256-SHA" },
            { label: "DH-RSA-CAMELLIA128-SHA", value: "DH-RSA-CAMELLIA128-SHA" },
            { label: "DH-RSA-CAMELLIA256-SHA", value: "DH-RSA-CAMELLIA256-SHA" },
            { label: "DH-RSA-DES-CBC3-SHA", value: "DH-RSA-DES-CBC3-SHA" },
            { label: "DH-RSA-SEED-SHA", value: "DH-RSA-SEED-SHA" },
            { label: "DHE-DSS-AES128-GCM-SHA256", value: "DHE-DSS-AES128-GCM-SHA256" },
            { label: "DHE-DSS-AES128-SHA256", value: "DHE-DSS-AES128-SHA256" },
            { label: "DHE-DSS-AES128-SHA", value: "DHE-DSS-AES128-SHA" },
            { label: "DHE-DSS-AES256-GCM-SHA384", value: "DHE-DSS-AES256-GCM-SHA384" },
            { label: "DHE-DSS-AES256-SHA256", value: "DHE-DSS-AES256-SHA256" },
            { label: "DHE-DSS-AES256-SHA", value: "DHE-DSS-AES256-SHA" },
            { label: "DHE-DSS-CAMELLIA128-SHA", value: "DHE-DSS-CAMELLIA128-SHA" },
            { label: "DHE-DSS-CAMELLIA256-SHA", value: "DHE-DSS-CAMELLIA256-SHA" },
            { label: "DHE-DSS-SEED-SHA", value: "DHE-DSS-SEED-SHA" },
            { label: "DHE-RSA-AES128-GCM-SHA256", value: "DHE-RSA-AES128-GCM-SHA256" },
            { label: "DHE-RSA-AES128-SHA256", value: "DHE-RSA-AES128-SHA256" },
            { label: "DHE-RSA-AES128-SHA", value: "DHE-RSA-AES128-SHA" },
            { label: "DHE-RSA-AES256-GCM-SHA384", value: "DHE-RSA-AES256-GCM-SHA384" },
            { label: "DHE-RSA-AES256-SHA256", value: "DHE-RSA-AES256-SHA256" },
            { label: "DHE-RSA-AES256-SHA", value: "DHE-RSA-AES256-SHA" },
            { label: "DHE-RSA-CAMELLIA128-SHA", value: "DHE-RSA-CAMELLIA128-SHA" },
            { label: "DHE-RSA-CAMELLIA256-SHA", value: "DHE-RSA-CAMELLIA256-SHA" },
            { label: "DHE-RSA-SEED-SHA", value: "DHE-RSA-SEED-SHA" },
            { label: "ECDH-ECDSA-AES128-GCM-SHA256", value: "ECDH-ECDSA-AES128-GCM-SHA256" },
            { label: "ECDH-ECDSA-AES128-SHA256", value: "ECDH-ECDSA-AES128-SHA256" },
            { label: "ECDH-ECDSA-AES128-SHA", value: "ECDH-ECDSA-AES128-SHA" },
            { label: "ECDH-ECDSA-AES256-GCM-SHA384", value: "ECDH-ECDSA-AES256-GCM-SHA384" },
            { label: "ECDH-ECDSA-AES256-SHA384", value: "ECDH-ECDSA-AES256-SHA384" },
            { label: "ECDH-ECDSA-AES256-SHA", value: "ECDH-ECDSA-AES256-SHA" },
            { label: "ECDH-ECDSA-DES-CBC3-SHA", value: "ECDH-ECDSA-DES-CBC3-SHA" },
            { label: "ECDH-ECDSA-RC4-SHA", value: "ECDH-ECDSA-RC4-SHA" },
            { label: "ECDH-RSA-AES128-GCM-SHA256", value: "ECDH-RSA-AES128-GCM-SHA256" },
            { label: "ECDH-RSA-AES128-SHA256", value: "ECDH-RSA-AES128-SHA256" },
            { label: "ECDH-RSA-AES128-SHA", value: "ECDH-RSA-AES128-SHA" },
            { label: "ECDH-RSA-AES256-GCM-SHA384", value: "ECDH-RSA-AES256-GCM-SHA384" },
            { label: "ECDH-RSA-AES256-SHA384", value: "ECDH-RSA-AES256-SHA384" },
            { label: "ECDH-RSA-AES256-SHA", value: "ECDH-RSA-AES256-SHA" },
            { label: "ECDH-RSA-DES-CBC3-SHA", value: "ECDH-RSA-DES-CBC3-SHA" },
            { label: "ECDH-RSA-RC4-SHA", value: "ECDH-RSA-RC4-SHA" },
            { label: "ECDHE-ECDSA-AES128-GCM-SHA256", value: "ECDHE-ECDSA-AES128-GCM-SHA256" },
            { label: "ECDHE-ECDSA-AES128-SHA256", value: "ECDHE-ECDSA-AES128-SHA256" },
            { label: "ECDHE-ECDSA-AES128-SHA", value: "ECDHE-ECDSA-AES128-SHA" },
            { label: "ECDHE-ECDSA-AES256-GCM-SHA384", value: "ECDHE-ECDSA-AES256-GCM-SHA384" },
            { label: "ECDHE-ECDSA-AES256-SHA384", value: "ECDHE-ECDSA-AES256-SHA384" },
            { label: "ECDHE-ECDSA-AES256-SHA", value: "ECDHE-ECDSA-AES256-SHA" },
            { label: "ECDHE-ECDSA-DES-CBC3-SHA", value: "ECDHE-ECDSA-DES-CBC3-SHA" },
            { label: "ECDHE-ECDSA-RC4-SHA", value: "ECDHE-ECDSA-RC4-SHA" },
            { label: "ECDHE-RSA-AES128-GCM-SHA256", value: "ECDHE-RSA-AES128-GCM-SHA256" },
            { label: "ECDHE-RSA-AES128-SHA256", value: "ECDHE-RSA-AES128-SHA256" },
            { label: "ECDHE-RSA-AES128-SHA", value: "ECDHE-RSA-AES128-SHA" },
            { label: "ECDHE-RSA-AES256-GCM-SHA384", value: "ECDHE-RSA-AES256-GCM-SHA384" },
            { label: "ECDHE-RSA-AES256-SHA384", value: "ECDHE-RSA-AES256-SHA384" },
            { label: "ECDHE-RSA-AES256-SHA", value: "ECDHE-RSA-AES256-SHA" },
            { label: "ECDHE-RSA-DES-CBC3-SHA", value: "ECDHE-RSA-DES-CBC3-SHA" },
            { label: "ECDHE-RSA-RC4-SHA", value: "ECDHE-RSA-RC4-SHA" },
            { label: "EDH-DSS-DES-CBC3-SHA", value: "EDH-DSS-DES-CBC3-SHA" },
            { label: "EDH-RSA-DES-CBC3-SHA", value: "EDH-RSA-DES-CBC3-SHA" },
            { label: "PSK-3DES-EDE-CBC-SHA", value: "PSK-3DES-EDE-CBC-SHA" },
            { label: "PSK-AES128-CBC-SHA", value: "PSK-AES128-CBC-SHA" },
            { label: "PSK-AES256-CBC-SHA", value: "PSK-AES256-CBC-SHA" },
            { label: "PSK-RC4-SHA", value: "PSK-RC4-SHA" },
            { label: "RC4-MD5", value: "RC4-MD5" },
            { label: "RC4-SHA", value: "RC4-SHA" },
            { label: "SEED-SHA", value: "SEED-SHA" },
            { label: "SRP-3DES-EDE-CBC-SHA", value: "SRP-3DES-EDE-CBC-SHA" },
            { label: "SRP-AES-128-CBC-SHA", value: "SRP-AES-128-CBC-SHA" },
            { label: "SRP-AES-256-CBC-SHA", value: "SRP-AES-256-CBC-SHA" },
            { label: "SRP-DSS-3DES-EDE-CBC-SHA", value: "SRP-DSS-3DES-EDE-CBC-SHA" },
            { label: "SRP-DSS-AES-128-CBC-SHA", value: "SRP-DSS-AES-128-CBC-SHA" },
            { label: "SRP-DSS-AES-256-CBC-SHA", value: "SRP-DSS-AES-256-CBC-SHA" },
            { label: "SRP-RSA-3DES-EDE-CBC-SHA", value: "SRP-RSA-3DES-EDE-CBC-SHA" },
            { label: "SRP-RSA-AES-128-CBC-SHA", value: "SRP-RSA-AES-128-CBC-SHA" },
            { label: "SRP-RSA-AES-256-CBC-SHA", value: "SRP-RSA-AES-256-CBC-SHA" }
        ];
    }
    canDeactivate() {
        if (this.unsavedChanges) {
            const result = confirm('Are you sure you want to navigate? Any unsaved changes will be lost.');
            console.log(result);
            if (!result) {
                this._commonService.confirmCommandSubject.next(this._router.url);
            }
            return result;
        }
        else {
            return true;
        }
    }
    change(event) {
        this.unsavedChanges = true;
    }
    /**get a operation status */
    getSslSettings() {
        try {
            // this.log.debug('getting a status of ssl fields');
            this.activeSubscriber = this._config.configProvider$.subscribe(result => {
                if (this._config.action == 'GETSSLSETTINGS') {
                    this._config.loading = false;
                    this.fillSSlFields(result);
                }
                if (this._config.action == 'SETSSLSETTINGS') {
                    this._config.loading = false;
                    this.messageService.clear();
                    this.messageService.add({ key: 'msgs', severity: 'success', summary: 'Message', detail: 'SSL Settings saved successfully' });
                    if (this.isRestart == "activate") {
                        this.isEnabledSpinner = true;
                        this._manageService.activateHPD();
                    }
                }
            });
        }
        catch (error) {
            console.error('error in getting git fields', error);
        }
    }
    /**filla ssl setting on fill details */
    fillSSlFields(result) {
        try {
            // this.log.debug('setting ssl information');
            // console.log('result====>', result);
            this.chainFileList = [];
            this.certList = [];
            this.certListExtraOpt = [];
            this.cipherArr = [];
            this.certRevocationList = [];
            for (let i = 0; i < result['certList'].length; i++) {
                this.chainFileList.push({ label: result['certList'][i], value: result['certList'][i] });
                this.certList.push({ label: result['certList'][i], value: result['certList'][i] });
            }
            for (let j = 0; j < result['extraSSLCert'].length; j++) {
                this.certListExtraOpt.push({ label: result['extraSSLCert'][j], value: result['extraSSLCert'][j] });
            }
            for (let k = 0; k < result['cipherList'].length; k++) {
                this.cipherArr.push({ label: result['cipherList'][k], value: result['cipherList'][k] });
            }
            this.certRevocationList.push({ label: 'Select Revocation Certificate', value: '' });
            for (let k = 0; k < result['crlList'].length; k++) {
                this.certRevocationList.push({ label: result['crlList'][k], value: result['crlList'][k] });
            }
            this.chainFile = result['chainFile'];
            this.certFile = result['certFile'];
            if (result['tlsVersion'] != undefined && result['tlsVersion'] != '')
                this.tlsVersionInfo = result['tlsVersion'];
            this.certRevocation = result['revocationFile'];
            this.clientAuthDepth = result['verifyPath'];
            if (result['authenticate'] == '1') {
                this.clientAuth = true;
            }
            else {
                this.clientAuth = false;
            }
            /**fill a cipherSuiteInfo fields  */
            if (result['sslCert'] != undefined && result['sslCert'] != '') {
                this.cipherSuiteInfo = [];
                if (result['sslCert'].indexOf(':') != -1) {
                    let arr = result['sslCert'].split(':');
                    this.cipherSuiteInfo = arr;
                }
                else {
                    this.cipherSuiteInfo.push(result['sslCert']);
                }
            }
            this.extraCert = [];
            /**fill a extra cert fields  */
            if (result['extraCert'] != undefined && result['extraCert'] != '') {
                if (result['extraCert'].indexOf(',') != -1) {
                    let arr = result['extraCert'].split(',');
                    this.extraCert = arr;
                }
                else {
                    this.extraCert.push(result['extraCert']);
                }
            }
        }
        catch (error) {
            console.error('error in set a ssl information', error);
        }
    }
    getHPDStatus() {
        this.sslSubscription = this._manageService.activateProvider$.subscribe(result => {
            // if (this._manageService.action == 'restartHpd') {
            this.isEnabledSpinner = false;
            // let status = result['status'].replace(/\\n/g, "\n");
            // if (status == 'Changes Activated Successfully')
            //   alert('Service virtualization server restarted successfully');
            // else {
            //   alert(status);
            // }
        }
        // }
        );
    }
    ngOnDestroy() {
        this._config.loading = false;
        if (this.sslSubscription != null)
            this.sslSubscription.unsubscribe();
        if (this.activeSubscriber != undefined)
            this.activeSubscriber.unsubscribe();
        this._manageService.action = "";
    }
    /**set a ssl settings */
    setSslSettings(data) {
        try {
            // this.log.debug('setting a ssl fields');
            this.isRestart = data;
            let clAuth = '0';
            if (this.clientAuth) {
                clAuth = '1';
            }
            /**check if there are multiple extra certificate files */
            let sslCipher = '';
            if (this.cipherSuiteInfo.length > 0) {
                sslCipher = this.cipherSuiteInfo[0];
            }
            for (let i = 1; i < this.cipherSuiteInfo.length; i++) {
                sslCipher = sslCipher + ':' + this.cipherSuiteInfo[i];
            }
            let extraString = '';
            if (this.extraCert.length > 0) {
                extraString = this.extraCert[0];
            }
            for (let j = 1; j < this.extraCert.length; j++) {
                extraString = extraString + ',' + this.extraCert[j];
            }
            let sslSetting = {
                'tlsVersion': this.tlsVersionInfo,
                'sslCipher': sslCipher,
                'chkSSLClientAuthentication': clAuth,
                'txtSSLCertificateChainFile': this.chainFile,
                'txtSSLCACertificateFile': this.certFile,
                'txtSSLCARevocationFile': this.certRevocation,
                'txtSSLVerifyDepth': this.clientAuthDepth,
                'txtExtraCertFile': extraString
            };
            this._config.loading = true;
            this.unsavedChanges = false;
            this._config.setSslSetting(sslSetting);
        }
        catch (error) {
            console.error('error in set a ssl settings', error);
        }
    }
    /* Function to check the value in a input box is numbery or not
       If number returns true, else false and does not allow the non numeric value to enter the input box;
       (parseInt($event.key) returns NAN (NOT A NUMBER) if alphabet added , else returns number..
     */
    isNumCheck($event) {
        if (parseInt($event.key) < 9 || parseInt($event.key) > 0) {
            return true;
        }
        else {
            return false;
        }
    }
    ngOnInit() {
        this._config.loading = true;
        this.getSslSettings();
        this._config.getSSlSetting();
        this.getHPDStatus();
    }
};
NetoceanConfigSslSettingsComponent.ctorParameters = () => [
    { type: primeng_api__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _services_netocean_configuration_service__WEBPACK_IMPORTED_MODULE_3__["NetoceanConfigurationService"] },
    { type: _services_manage_services_info_service__WEBPACK_IMPORTED_MODULE_5__["ManageServicesInfoService"] },
    { type: _services_netocean_common_service__WEBPACK_IMPORTED_MODULE_2__["NetoceanCommonService"] }
];
NetoceanConfigSslSettingsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-netocean-config-ssl-settings',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./netocean-config-ssl-settings.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./netocean-config-ssl-settings.component.scss */ "./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.component.scss")).default]
    })
], NetoceanConfigSslSettingsComponent);



/***/ }),

/***/ "./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.module.ts":
/*!********************************************************************************************************************!*\
  !*** ./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.module.ts ***!
  \********************************************************************************************************************/
/*! exports provided: onMonacoLoad, NetoceanConfigSslSettingsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onMonacoLoad", function() { return onMonacoLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NetoceanConfigSslSettingsModule", function() { return NetoceanConfigSslSettingsModule; });
/* 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 _netocean_config_ssl_settings_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./netocean-config-ssl-settings.component */ "./src/app/pages/home/netocean/components/netocean-config-ssl-settings/netocean-config-ssl-settings.component.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/checkbox */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/checkbox.js");
/* harmony import */ var _angular_material_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/menu */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/menu.js");
/* harmony import */ var _angular_material_radio__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/radio */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/radio.js");
/* harmony import */ var _angular_material_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/material/select */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/select.js");
/* harmony import */ var _angular_material_tabs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/material/tabs */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/tabs.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* 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");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var ngx_monaco_editor__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ngx-monaco-editor */ "./node_modules/ngx-monaco-editor/__ivy_ngcc__/fesm2015/ngx-monaco-editor.js");
/* harmony import */ var _interfaces_confirmUnsavedChangesroutingguard__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../interfaces/confirmUnsavedChangesroutingguard */ "./src/app/pages/home/netocean/interfaces/confirmUnsavedChangesroutingguard.ts");















function onMonacoLoad() {
    console.log(window.monaco);
    return window.monaco;
}
const monacoConfig = {
    baseUrl: './assets',
    defaultOptions: { scrollBeyondLastLine: false },
    onMonacoLoad: onMonacoLoad // here monaco object will be available as window.monaco use this function to extend monaco editor functionalities.
};
const routes = [
    {
        path: '',
        component: _netocean_config_ssl_settings_component__WEBPACK_IMPORTED_MODULE_3__["NetoceanConfigSslSettingsComponent"], canDeactivate: [_interfaces_confirmUnsavedChangesroutingguard__WEBPACK_IMPORTED_MODULE_14__["ConfirmUnsavedChangesGuard"]]
    }
];
let NetoceanConfigSslSettingsModule = class NetoceanConfigSslSettingsModule {
};
NetoceanConfigSslSettingsModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_netocean_config_ssl_settings_component__WEBPACK_IMPORTED_MODULE_3__["NetoceanConfigSslSettingsComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            _angular_router__WEBPACK_IMPORTED_MODULE_12__["RouterModule"].forChild(routes),
            _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormsModule"], src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_11__["HelpModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["DynamicDialogModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TabMenuModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TreeModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["TieredMenuModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["DialogModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["CalendarModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["InputTextareaModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["AccordionModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["SidebarModule"], ngx_monaco_editor__WEBPACK_IMPORTED_MODULE_13__["MonacoEditorModule"].forRoot(monacoConfig),
            primeng__WEBPACK_IMPORTED_MODULE_10__["SplitButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TooltipModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["MenuModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ToolbarModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TableModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ScrollPanelModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TabViewModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["CheckboxModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["DropdownModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ConfirmDialogModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["FieldsetModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["PanelModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["FileUploadModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ToastModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["MultiSelectModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["RadioButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["OverlayPanelModule"], _angular_material_menu__WEBPACK_IMPORTED_MODULE_6__["MatMenuModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["SpinnerModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ToggleButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["OrderListModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["ChipsModule"], _angular_material_radio__WEBPACK_IMPORTED_MODULE_7__["MatRadioModule"], _angular_material_select__WEBPACK_IMPORTED_MODULE_8__["MatSelectModule"], _angular_material_tabs__WEBPACK_IMPORTED_MODULE_9__["MatTabsModule"], _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_5__["MatCheckboxModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["BreadcrumbModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ProgressBarModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["CardModule"]
        ],
        providers: [],
        schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]]
    })
], NetoceanConfigSslSettingsModule);



/***/ })

}]);