(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["sync-point-gui-sync-point-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.component.html":
/*!*******************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.component.html ***!
  \*******************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<!-- <ng-progress></ng-progress> -->\n<p-toast ></p-toast>\n<p-blockUI [blocked]=\"blockedDocument\">\n  <div class=\"loader-container spinner\" *ngIf=\"blockedDocument\">\n    <i class=\"pi pi-spin pi-spinner\"></i>\n  </div>\n</p-blockUI>\n<app-sync-point-top-bar></app-sync-point-top-bar>\n\n<div class=\"block\">\n    <!-- if No TR is present on machine -->\n    <div *ngIf=\"this._syncPoint.noTestRun == 'true'\">\n<div class=\"ui-primary-toolbar\">\n  <div role=\"toolbar\" class=\"ui-toolbar ui-widget ui-widget-header\">\n    <div class=\"p-grid p-align-center p-justify-between py-6 px-10 font-14 height-32\">\n      <div class=\"inline-flex width-400\"><i class=\"las-retweet-solid mx-5\"></i>  <span>SyncPoint Summary</span></div>\n      <div class=\"inline-flex width-25\">\n       <app-help [helpFileName]=\"'sync-point'\" [helpTitle]=\"'Sync Points'\" [helpFolder]=\"'script'\"></app-help> \n      </div>\n    </div>\n  </div>\n</div>\n\n      <div class=\"error-msg\">\n        <p class=\"my-0\"><i class=\"icons8 icons8-error\"></i></p>\n        <p class=\"opc50 my-0\">No TestRun Available in the System.</p>\n      </div>\n    </div>\n\n    <!-- If Sync Point is not enabled -->\n    <div *ngIf=\"!this._syncPoint.isEnable\">\n<div class=\"ui-primary-toolbar\">\n  <div role=\"toolbar\" class=\"ui-toolbar ui-widget ui-widget-header\">\n    <div class=\"p-grid p-align-center p-justify-between py-6 px-10 font-14 height-32\">\n      <div class=\"inline-flex width-400\"><i class=\"las-retweet-solid mx-5\"></i>  <span>SyncPoint Summary</span></div>\n      <div class=\"inline-flex width-25\">\n       <app-help [helpFileName]=\"'sync-point'\" [helpTitle]=\"' Sync Points'\" [helpFolder]=\"'script'\"></app-help> \n      </div>\n    </div>\n  </div>\n</div>\n\n      <div class=\"error-msg\">\n        <p class=\"my-0\"><i class=\"icons8 icons8-error la-4x\"></i></p>\n        <p class=\"opc50 my-0\">SyncPoint are not enabled for this Test</p>\n      </div>\n    </div>\n\n    <!-- If Sync Point is not configured -->\n\n    <div *ngIf=\"this.isConfigured == 'false'\">\n      <p-toolbar>\n        <div class=\"p-grid p-align-center p-justify-between py-5\" title=\"SyncPoint Summary\">\n          <div class=\"p-grid p-align-center font-13 font-weight-600\">\n            <i class=\"las-retweet-solid mx-5\"></i> <span>SyncPoint Summary</span>\n            </div>\n            <button *ngIf=\"this._syncPoint.mode == 'online' && this._syncPoint.accessSyncPoint == true\"\n              tooltipPosition=\"bottom\" pButton pTooltip=\"Add SyncPoint\" type=\"button\" (click)=\"showDialogForAdd()\"\n              icon=\"icons8 icons8-plus-math\" class=\"ui-button-rounded\"></button>\n        </div>\n      </p-toolbar>\n      <div class=\"error-msg\">\n        <p class=\"my-0\"><i class=\"icons8 icons8-error la-4x\"></i></p>\n        <p class=\"opc50 my-0\">SyncPoint Not configured</p>\n      </div>\n    </div>\n  \n\n    <!-- If Sync Point is enabled and configured also for Summary Table -->\n\n    <div *ngIf=\"this._syncPoint.isEnable && (this.isConfigured == 'true')\">\n      <div class=\"p-5\">\n        <cav-table [value]=\"syncPointTableData\" [headerRelativePath]=\"headerRelPath\" selectionMode=\"single\" [(selection)]=\"selectedBox\"\n         [scrollable] = \"true\"  [rows]=\"summaryPaginationOptions[0]\"\n        (clickButtonEvent)=\"clickButtonEvent($event)\"  [scrollHeight]=\"summaryScrollHeight\">\n        </cav-table>\n      </div>\n    </div>\n\n    <div class=\"p-5\">\n        <cav-table [value]=\"runTimeHeadersData\" [headers]=\"header\" [tableConfig]=\"tableConfig\" [rows]=\"rows\"\n          scrollHeight=\"calc(100vh - 370px)\" [scrollable]=\"true\" [rowsPerPageOptions]=\"rowsPerPageOptions\"\n          [showCurrentPageReport]=\"true\">\n        </cav-table>\n  </div>\n\n</div>\n\n<p-dialog modal=\"true\" header={{dialogHeader}} [(visible)]=\"showHideDialog\"  [style]=\"{'width':'720px'}\">\n  <p-panel header=\"SyncPoint Settings\">\n\n    <div class=\"p-grid cav-align-items-center cav-mb-2\">\n      <div class=\"ui-g-12\">\n        <mat-checkbox (change)=\"OnEnablesyncPoint()\" [(ngModel)]=\"isEnableSyncPoint\">\n          Enable SyncPoint\n        </mat-checkbox>\n      </div>\n    </div>\n\n    <div class=\"p-grid p-align-center\">\n      <label class=\"p-col-4\">Scenario Group</label>\n      <div class=\"ui-g-8\">\n        <p-dropdown class=\"sync-DrpDwn\" [options]=\"lstOptGroupName\" [(ngModel)]=\"lstGroupName\"\n          (onChange)=\"getSyncNameList()\" [disabled]=\"isDisableupdate\" appendTo=\"body\" filter=\"true\"\n          dropdownIcon=\"icons8 icons8-expand-arrow\" [style]=\"{ 'min-width': '100%'}\">\n        </p-dropdown>\n      </div>\n    </div>\n    \n    <div class=\"p-grid p-align-center\">\n      <div class=\"ui-g-4\">VUser enter SyncPoint on start of</div>\n      <div class=\"ui-g-4\">\n        <p-dropdown class=\"sync-DrpDwn\" [options]=\"lstOptType\" [(ngModel)]=\"lstType\" (onChange)=\"getSyncNameList()\"\n          [disabled]=\"isDisableupdate\" appendTo=\"body\" dropdownIcon=\"icons8 icons8-expand-arrow\"\n          [style]=\"{ 'min-width': '100%'}\"></p-dropdown>\n      </div>\n      <div class=\"ui-g-4\">\n        <p-dropdown class=\"sync-DrpDwn\" [options]=\"lstOptName\" [(ngModel)]=\"lstName\" [title]=\"lstName\"\n          (onChange)=\"fillScriptLabel()\" appendTo=\"body\" [disabled]=\"isDisableupdate\"\n          dropdownIcon=\"icons8 icons8-expand-arrow\" [style]=\"{ 'min-width': '100%'}\" filter=\"true\"></p-dropdown>\n      </div>\n    </div>\n\n    <div class=\"p-grid p-align-center\">\n      <label class=\"p-col-4\">Participating VUsers</label>\n      <div class=\"p-col-4\">\n        <div class=\"ui-inputgroup\">\n          <input type=\"number\" pInputText [(ngModel)]=\"txtParticipatingVuser\" min=\"0\" max=\"100\"\n            [step]=\"0.1\" class=\"w-100-p\" />\n          <span class=\"ui-inputgroup-addon\">%</span>\n        </div>\n      </div>\n    </div>\n    \n    <div class=\"p-grid p-align-center\">\n      <label class=\"p-col-4\">Release SyncPoint when</label>\n      <div class=\"p-col-4\">\n        <input type=\"text\" pInputText [(ngModel)]=\"txtReleaseTargetVuser\" [title]=\"txtReleaseTargetVuser\"\n          (focusout)=\"validateQty($event)\" (keypress)=\"validateQty($event)\" [disabled]=\"disableTargetVuser\" min=\"0\"\n          class=\"w-100-p\" />\n      </div>\n      <div class=\"ui-g-4\">\n        VUsers arrive at SyncPoint\n        <!-- <i class=\"icons8 icons8-help clickable\" title=\"'*' means Vusers(mentioned previously) released repetitive until test Stopped.\n          '*' can be added in the last position.\n          Valid Inputs examples:\n          100 means Vusers released when it reached to 100(non repetitive).\n          100,* means 'first time 100 VUsers released, and it will repeated with same 100 VUsers'.\n          100,200,* means 'first 100 VUsers released, then 200 VUsers released then it will repeated with 200 VUsers'.\n          Invalid Inputs examples:\n          *\n          *,100\n          100,*,*\n          100,*,100\"></i> -->\n\n            <i class=\"icons8 icons8-help\"  (mouseenter)=\"op2.show($event)\"></i>\n\n              <p-overlayPanel #op2 appendTo=\"body\" [style]=\"{'width':'400px'}\" >\n                <ng-template pTemplate>\n                  <div class=\"p-10\">\n                    <p>This is used to specify how many Vuser should reach sync point for releasing of sync point. Since sync point can be reached many times, we can give this for each time using comma separated value. If it is same, then * can be used. But * should be used only once and that too at the end.\n                     </p>\n                     <ul class=\"px-0\">\n                       <li class=\"mb-5\">Valid Examples:</li>\n                       <li class=\"mb-5 ml-10\">100</li>\n                       <li class=\"mb-5 ml-10\">200,300,*</li>\n                       <li class=\"mb-5 ml-10\">100,100,100,500,*</li>\n                       <li class=\"mb-5\">Invalid Examples:</li>\n                       <li class=\"mb-5 ml-10\">*</li>\n                       <li class=\"mb-5 ml-10\">*,100</li>\n                       <li class=\"mb-5 ml-10\">200,*,300,*</li>\n                       <li class=\"mb-5 ml-10\">100,100,100,500,*,*</li>\n                     </ul>\n                    </div>\n                        </ng-template>\n            </p-overlayPanel>\n\n      </div>\n    </div>\n    </p-panel>\n    \n    \n    <p-accordion >\n    <p-accordionTab header=\"Advanced Settings\" >\n    <!-- <div class=\"p-grid cav-align-items-center cav-mb-2\">\n    <div class=\"cav-mr-2 labelWidth\"> <label> Release Mode </label> </div>\n    <div class=\"cav-mr-2\">\n    <span><p-dropdown [options]=\"lstOptMode\" [(ngModel)]=\"releaseMode\" appendTo=\"body\" (onChange)=\"OnReleaseMode()\" [style]=\"{ 'width': '100%'}\">\n    </p-dropdown></span>\n    </div>\n    </div> -->\n\n      <div class=\"p-grid p-align-center\">\n        <div class=\"ui-g-12\">\n          <mat-checkbox (change)=\"OnReleaseMode()\" [(ngModel)]=\"releaseModeCheckbox\">\n            Do not release SyncPoint automatically\n          </mat-checkbox>\n        </div>\n      </div>\n\n\n      <ng-container *ngIf=\"isShowReleaseType\">\n        <div class=\"p-grid p-align-center\">\n          <div class=\"ui-g-4\">Release SyncPoint</div>\n          <div class=\"ui-g-4\">\n            <p-dropdown [options]=\"lstOptReleaseType\" [(ngModel)]=\"releaseType\" [disabled]=\"isDisableReleaseType\"\n              (onChange)=\"OnReleaseType()\" appendTo=\"body\" dropdownIcon=\"icons8 icons8-expand-arrow\"\n              [style]=\"{ 'min-width': '100%'}\">\n            </p-dropdown>\n          </div>\n          <ng-container *ngIf=\"isShowAbsolute\">\n            <div class=\"ui-g-2\">\n              <p-calendar [(ngModel)]=\"absoluteDate\" inputStyleClass=\"w-100-p\" appendTo=\"body\"></p-calendar>\n            </div>\n      \n            <div class=\"ui-g-2\">\n              <input pInputText class=\"cav-w-100\" maxlength=\"8\" [(ngModel)]=\"absoluteTime\" placeholder=\"HH:mm:ss\"\n                (keypress)=\"isTimeCheck($event)\" class=\"w-100-p\">\n            </div>\n          </ng-container>\n      \n          <div class=\"p-col-4 p-grid p-align-center\" *ngIf=\"isShowTimePeriod\">\n            <input type=\"text\" pInputText [(ngModel)]=\"timePeriod\" maxlength=\"8\" class=\"w-50-p mr-5\"\n              (keypress)=\"isTimeCheck($event)\" />\n            <span>(HH:MM:SS)</span>\n          </div>\n        </div>\n      </ng-container>\n\n    <div  class=\"p-grid cav-align-items-center cav-mb-2\"  *ngIf =\"(isShowFrequency && isShowAbsolute)\">\n      <div class=\"cav-mr-2 labelWidth\"> <label>Release next Target VUsers after duration</label> </div>\n      <div class=\"cav-mr-2\">\n        <span><input type=\"text\" pInputText [(ngModel)]=\"frequency\" maxlength=\"8\"\n          style=\"width:55px\" (keypress) = \"isTimeCheck($event)\" /> (HH:MM:SS)</span>\n        </div>\n      </div>\n    \n    <div class=\"p-grid\" *ngIf=\"isShowReleasedForcefully\">\n      <div class=\"p-col-12\">\n        <mat-checkbox (change)=\"onCheckBox()\" [(ngModel)]=\"isReleasedForcefully\">\n          {{checkBoxMsg}}\n        </mat-checkbox>\n      </div>\n    </div>\n    \n    \n\n  \n    <div class=\"p-grid\" >\n      <div class=\"ui-g-4\">Release SyncPoint VUsers</div>\n      <div class=\"ui-g-4\">\n    <p-dropdown [options]=\"lstOptReleasePlan\" [(ngModel)]=\"releasePlan\" (onChange)=\"OnReleasePlan()\" appendTo=\"body\" dropdownIcon=\"icons8 icons8-expand-arrow\" [style]=\"{ 'min-width': '100%'}\">\n    </p-dropdown>\n    </div>\n    <div class=\"ui-g-4 p-grid p-align-center\" *ngIf = \"isShowDuration\">\n      <input type=\"text\" pInputText [(ngModel)]=\"duration\" maxlength=\"8\"\n      class=\"w-40-p\" (keypress) = \"isTimeCheck($event)\" /> \n        <span>(HH:MM:SS)</span>\n      </div>\n\n      <div class=\"ui-g-4 p-grid p-align-center\" *ngIf = \"isShowRate\">\n       <input type=\"number\" pInputText [(ngModel)]=\"rate\" min=\"0\" (keypress) =\"validateQty($event)\"\n          class=\"w-40-p\" />  <span>(Vusers/min)</span>\n        </div>\n\n\n        \n        <ng-container *ngIf=\"isShowStepDuration\">\n          <div class=\"ui-g-4 p-grid p-align-center\">\n            <div class=\"p-grid p-align-center mb-5\">\n              <input type=\"text\" pInputText [(ngModel)]=\"stepDuration\" maxlength=\"8\" class=\"width-60 px-3\"\n                (keypress)=\"isTimeCheck($event)\" />\n              <div class=\"mx-2 font-10\">(HH:MM:SS)</div>\n              <div class=\"p-grid p-align-center\">\n                <input type=\"number\" pInputText [(ngModel)]=\"stepPercentage\" maxlength=\"8\" class=\"width-50 pr-0\" />\n                <div class=\"mx-2\"> %</div>\n              </div>\n              <button type=\"button\" pButton class=\"btn-icon\" icon=\"las-plus-circle-solid\" (click)=\"addStepDuration()\"></button>\n            </div>\n            <ng-container *ngIf=\"showValue\">\n              <div *ngFor=\"let h of arrStepDuration;let index = index;trackBy:trackByIndex;\" class=\"p-grid p-align-center\">\n                <!--repeat box-->\n                <input type=\"text\" pInputText [(ngModel)]=\"arrStepDuration[index]['duration']\" maxlength=\"8\"\n                  class=\"width-60 px-3\" (keypress)=\"isTimeCheck($event)\" />\n                <div class=\"mx-2 font-10\">(HH:MM:SS)</div>\n        \n                <div class=\"p-grid p-align-center\">\n                  <input type=\"number\" pInputText [(ngModel)]=\"arrStepDuration[index]['percentage']\" class=\"width-50 pr-0\"\n                    min=\"0\" max=\"100\" />\n                  <div class=\"mx-2\"> %</div>\n                </div>\n                <!-- <i class=\"fa fa-pencil fa-lg cav-mx-1\"  (click)=\"updateStepDuration($event)\"></i> -->\n                <button type=\"button\" pButton class=\"btn-icon\" icon=\"icons8 icons8-trash\"\n                  (click)=\"deleteStepDuration(index)\"></button>\n              </div>\n            </ng-container>\n          </div>\n        </ng-container>\n        <!-- ----------------------------------------- -->\n    </div>\n    \n    \n    <div class=\"p-grid p-align-center\">\n      <div class=\"p-col-4\">Script(s) part of SyncPoint</div>\n      <div class=\"p-col-8\">\n        <input type=\"text\" pInputText [(ngModel)]=\"scriptLabel\" [disabled]=\"true\" class=\"w-100-p\" [title]=\"scriptLabel\" />\n      </div>\n    </div>\n\n    \n    </p-accordionTab>\n    </p-accordion>\n    \n    \n    <p-footer class=\"p-justify-end p-grid\">\n    <button pButton type=\"button\" (click)=\"validate()\" label=\"Save\" class=\"ui-button-rounded\"></button>\n</p-footer>\n    \n\n</p-dialog>\n\n<!--Dialog for confirmation before releasing user in Case of manual-->\n<!-- <p-dialog class=\"profile-dialog\" header=\"Confirmation\" [modal] = \"true\" [(visible)]=\"confirmationForManual\">\n\n  <div class=\"cav-my-3\"><i class=\"fa fa-paper-plane\"></i> {{completeConfirmationMsg}}</div>\n\n  <div class=\"p-grid cav-align-items-center cav-mb-2\">\n      <div class=\"cav-mr-2 width150\"> <label> Release Schedule </label> </div>\n      <div>\n        <p-dropdown [options]=\"lstOptReleasePlan\" [(ngModel)]=\"releasePlan\" (onChange)=\"OnReleasePlan()\" appendTo=\"body\" [style]=\"{ 'width': '80px'}\">\n        </p-dropdown>\n      </div>\n      <div class=\"p-grid cav-align-items-center\" *ngIf = \"isShowDuration\">\n        <div class=\"cav-mx-2\">\n          <input type=\"text\" pInputText [(ngModel)]=\"duration\"  maxlength=\"8\"\n          style=\"width: 60px\" (keypress) = \"isTimeCheck($event)\" (focusout)=\"forDynamicMessage($event)\" /> \n        </div>\n          <div>(HH:MM:SS)</div>\n      </div>\n      <div class=\"cav-ml-1 p-grid cav-align-items-center\" *ngIf = \"isShowRate\" >\n        <div class=\"cav-mx-2\">\n          <input type=\"number\" pInputText [(ngModel)]=\"rate\" (focusout)=\"forDynamicMessage($event)\" (keypress) = \"validateQty($event)\" min=\"0\" \n          style=\"width: 60px\" />\n          </div>\n          <div>(Vusers/min)</div> \n        </div>\n      </div>\n\n  <div class=\"p-grid cav-justify-content-end\">\n    <p-button icon=\"fa fa-check\" label=\"Yes\" (click) = \"ManualRelease()\"></p-button>\n    <p-button icon=\"fa fa-times\" label=\"No\" (click) = \"closeConfirmationDialog()\"></p-button>\n  </div>\n  \n</p-dialog> -->\n\n\n\n\n\n\n\n<p-dialog class=\"profile-dialog\" header=\"Confirmation\" [style]=\"{'width':'550px'}\" [modal] = \"true\" [(visible)]=\"confirmationForManual\" [resizable] = \"false\">\n\n  <div class=\"my-15 p-grid p-align-center\"><i class=\"las-telegram-plane\"></i> {{completeConfirmationMsg}}</div>\n\n      <div class=\"p-grid p-align-center\">\n        <div class=\"p-col-4\">Release SyncPoint VUsers</div>\n        <div class=\"p-col-8\">\n        <p-dropdown [options]=\"lstOptReleasePlan\" [(ngModel)]=\"releasePlan\" (onChange)=\"OnReleasePlan()\" appendTo=\"body\" \n        [style]=\"{ 'min-width': '100%'}\" dropdownIcon=\"icons8 icons8-expand-arrow\">\n        </p-dropdown>\n        </div>\n        <ng-container *ngIf = \"isShowDuration\"> \n        <div class=\"p-col-3 p-offset-4\">\n          <input type=\"text\" pInputText [(ngModel)]=\"duration\" maxlength=\"8\" class=\"w-100-p\" (keypress) = \"isTimeCheck($event)\" (focusout)=\"forDynamicMessage($event)\"/> \n          </div>\n          <div class=\"p-col-5\">(HH:MM:SS)</div>\n          </ng-container>\n    \n          <ng-container *ngIf=\"isShowRate\"> \n          <div class=\"p-col-3 p-offset-4\">\n            <input type=\"number\" class=\"w-100-p\" pInputText [(ngModel)]=\"rate\" min=\"0\" (keypress) =\"validateQty($event)\" (focusout)=\"forDynamicMessage($event)\" />\n            </div>\n            <div class=\"p-col-5\">(Vusers/min)</div>\n          </ng-container>\n    \n    \n          <ng-container *ngIf =\"isShowStepDuration\">   \n                <div class=\"p-col-3 p-offset-4\">\n                  <input type=\"text\" pInputText [(ngModel)]=\"stepDuration\" maxlength=\"8\" class=\"w-100-p\"\n                    (keypress)=\"isTimeCheck($event)\" />\n                </div>\n                <div class=\"p-col-2\"> (HH:MM:SS)</div>\n                <div class=\"p-col-2\">\n                  <div class=\"ui-inputgroup\">\n                  <input type=\"number\" pInputText [(ngModel)]=\"stepPercentage\"  min=\"0\" max=\"100\"\n                      class=\"w-100-p\">\n                      <span class=\"ui-inputgroup-addon\"> %</span>\n                      </div>\n                </div>\n                <div class=\"p-col-1 text-right\">\n                  <button pButton type=\"button\" class=\"btn-icon\" icon=\"las-plus-circle-solid\" (click)=\"addStepDuration()\"></button>\n                </div>\n              \n           \n    \n    \n                <ng-container *ngIf = \"showValue\">\n                <ng-template *ngFor=\"let h of arrStepDuration;let index = index;trackBy:trackByIndex;\"> <!--repeat box-->\n                  <div class=\"p-col-3 p-offset-4\">\n                  <input type=\"text\" pInputText [(ngModel)]=\"arrStepDuration[index]['duration']\" maxlength=\"8\" (keypress) = \"isTimeCheck($event)\" class=\"w-100-p\"> \n                  </div>\n                  <div class=\"p-col-2\"> (HH:MM:SS)</div>\n\n                  <div class=\"p-col-2\">\n                    <div class=\"ui-inputgroup\">\n                      <input type=\"number\" pInputText [(ngModel)]=\"arrStepDuration[index]['percentage']\" class=\"w-100-p\" min=\"0\"\n                        max=\"100\" />\n                      <span class=\"ui-inputgroup-addon\"> %</span>\n                    </div>\n                  </div>\n                  <div class=\"p-col-1 text-right\">\n                    <button pButton type=\"button\" class=\"btn-icon\" icon=\"icons8 icons8-trash\" (click)=\"deleteStepDuration(index)\"></button>\n                </div>\n              </ng-template>\n             </ng-container>\n            </ng-container>\n            <!-- ----------------------------------------- -->\n        </div>\n<p-footer>\n  <div class=\"p-grid p-justify-end\">\n    <button pButton  class=\"ui-button-secondary ui-button-rounded mx-6 px-15\" label=\"No\" (click) = \"closeConfirmationDialog()\"></button>\n    <button pButton class=\" ui-button-rounded px-15\" label=\"Yes\" (click) = \"ManualRelease()\"></button>\n  </div>\n</p-footer>\n</p-dialog>\n\n\n\n\n<p-confirmDialog class=\"confirmdialog\"  header=\"Confirmation\" acceptButtonStyleClass=\"ui-button-rounded px-10\" rejectButtonStyleClass=\"ui-button-rounded ui-button-secondary px-10 mx-6\" acceptIcon=\"null\"  rejectIcon=\"null\"  acceptLabel=\"Yes\"\nrejectLabel=\"No\"></p-confirmDialog>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/sync-point-gui/components/sync-point-top-bar/sync-point-top-bar.component.html":
/*!*************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/sync-point-gui/components/sync-point-top-bar/sync-point-top-bar.component.html ***!
  \*************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<!-- <ng-progress></ng-progress> -->\r\n    <div class=\"p-grid p-align-center p-justify-between p-8\">\r\n        <div class=\" p-grid p-align-center\">\r\n            <i class=\"icons8 icons8-sync-settings\"></i>\r\n            <span class=\"mx-5\">SyncPoint</span>\r\n\r\n            <span class=\"mx-15\">\r\n                <span *ngIf=\"this._syncPoint.mode == 'online'\">\r\n                    <i class=\"icons8 icons8-loading spin btn-white\"></i></span>\r\n                <strong>Test Run:</strong> {{this._syncPoint.testRun}}\r\n            </span>\r\n            <span class=\"clickable mx-15\" title=\"Date/Time Format:- MM/dd/yyyy HH:mm:ss(TimeZone)\">\r\n                <strong>Start Time:</strong> {{this._syncPoint.startTime}}\r\n            </span>\r\n            <span *ngIf=\"this._syncPoint.mode == 'online'\" class=\"mx-15 clickable\" title=\"Time Format:- HH:mm:ss(TimeZone)\">\r\n                <strong>Duration:</strong> {{this._syncPoint.duration}}\r\n            </span>\r\n            <span *ngIf=\"this._syncPoint.scenario !=''\" class=\"mx-15\" title=\"{{this._syncPoint.scenario}}\">\r\n                <strong>Scenario Name:</strong> {{this._syncPoint.scenario | stringFormatPipe}}\r\n            </span>\r\n        </div>\r\n\r\n\r\n        <div class=\"p-grid p-align-center p-justify-end\">\r\n            <span *ngIf=\"this._syncPoint.isEnable && this._syncPoint.mode == 'online' && this._syncPoint.accessSyncPoint == true\">\r\n            <span class=\"setFontType setdisplay\">\r\n                <p-checkbox name=\"group1\" label=\" Auto Refresh\" binary=\"true\" (change)=\"autoRefreshTimePeriod()\" [(ngModel)]=\"_syncPoint.autoRefresh\"></p-checkbox>\r\n            </span>\r\n\r\n            <span class=\"mx-5\">\r\n                <i class=\"icons8 icons8-clock\"></i>\r\n                <span class=\"setFontType setmarginTR setdisplay\" [title]=\"this._syncPoint.autorefreshval/1000 | timerPipe\">{{this._syncPoint.autorefreshval/1000 | timerPipe}}</span>      \r\n            </span>\r\n        </span>\r\n\r\n          <span class=\"mx-4\">\r\n             <!-- <i class=\"icons8 icons8-help clickable\" (click)=\"pageHelp()\"></i> -->\r\n            <!-- <button title=\"SyncPoint Help\" type=\"text\" pButton icon=\"fa fa-question-circle\" (click)=\"pageHelp()\"></button> -->\r\n          </span>\r\n        </div>\r\n        </div>\r\n");

/***/ }),

/***/ "./src/app/pages/home/netHavoc/services/nethavoc-rest-api.service.ts":
/*!***************************************************************************!*\
  !*** ./src/app/pages/home/netHavoc/services/nethavoc-rest-api.service.ts ***!
  \***************************************************************************/
/*! exports provided: NetHavocRestApi */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NetHavocRestApi", function() { return NetHavocRestApi; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core_store_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../../../core/store/store */ "./src/app/core/store/store.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
/* harmony import */ var _app_core_session_session_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../app/core/session/session.service */ "./src/app/core/session/session.service.ts");




// import { Logger } from '../../../../vendors/angular2-logger/core';
// import { MatDialog } from '@angular/material';
// import { CavCommonUtils } from '../../../main/services/cav-common-utils.service';


//import {Controller} from "../../../../../app/core/store/"
// import { NgProgress } from '../../../../vendors/ngx-progressbar/core/src/ng-progress.service';
let NetHavocRestApi = class NetHavocRestApi extends _core_store_store__WEBPACK_IMPORTED_MODULE_1__["Store"].AbstractService {
    constructor(http, 
    //public Controller:Store.Controller,
    sessionService) {
        super();
        this.http = http;
        this.sessionService = sessionService;
    }
    getHostUrl() {
        let hostDcName = window.location.protocol + '//' + window.location.host;
        return hostDcName;
    }
    /*Getting Data Through REST API by using GET Method.*/
    getDataByRESTAPI(url, param) {
        try {
            // console.log('value of url',url);
            // url = this.getHostUrl() + '/' +url;
            // this.log.info('Getting data from url = ' + url + ', param = ' + param);
            return this.http.get(url).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((response) => response)
            // .catch((e) => {
            //   if (e.status === 400) {
            //     // this._dialog.closeAll();
            //     // this._utils.clearSessiononSessionClose();
            //     // this.ngProgress.destroy('sql');
            //   }
            //   return Observable.throw(
            //     new Error(`${e.status} ${e.statusText}`)
            //   );
            // })
            );
        }
        catch (e) {
            //this.log.error('Error while getting data from REST API. url = ' + url + ', param = ' + param);
            //this.log.error(e);
        }
    }
    getDataByRestAPI(url, baseValue) {
        try {
            if (baseValue) {
                // If baseValue is provided, build the base URL using getBasePath().
                //Setting masterOnly = true ensures the request always targets the master Tomcat server (/tomcat/master).
                let base = this.sessionService.getBasePath(true, null, baseValue);
                return this.controller.get(url, null, base);
            }
            else // If no baseValue is provided, call the API using the default base URL.
                return this.controller.get(url, null, "/");
        }
        catch (e) {
            console.error("Error in getDataByRestAPI()", e);
        }
    }
    /*Getting Data Through REST API by using GET Method. V1 calls*/
    getDataByRESTAPIWithPost(url, param, data) {
        try {
            // this.log.info('Getting data from url = ' + url + ', param = ' + param);
            // this.log.info('Post Data' + JSON.stringify(data));
            return this.http.post(url + param, data).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((response) => response)
            // .catch((e) => {
            //   if (e.staus === 400) {
            //     // this._dialog.closeAll();
            //     // this._utils.clearSessiononSessionClose();
            //     // this.ngProgress.destroy('sql');
            //   }
            //   return Observable.throw(
            //     new Error(`${e.status} ${e.statusText}`)
            //   );
            // })
            );
        }
        catch (e) {
            //this.log.error('Error while getting data from REST API With Post request. url = ' + url + ', param = ' + param);
            //this.log.error(e);
        }
    }
    /*Getting Data Through REST API by using GET Method node all handling v2 calls.*/
    getDataFromRESTUsingPOSTReq(url, param, data, baseValue, cname) {
        try {
            // let base;
            let base = baseValue;
            if (base) {
                if (this.sessionService.preSession.multiDc) {
                    // console.log("this.sessionService.preSession.dcData -->>",this.sessionService.preSession.dcData);
                    // const masterURL = this.sessionService.preSession.dcData.filter(e => e.master).map(e => e.url)[0];
                    let masterURL;
                    if (cname != '' && cname != undefined) {
                        masterURL = "/tomcat/" + cname;
                    }
                    else {
                        masterURL = "/node/ALL";
                    }
                    baseValue = masterURL + baseValue;
                }
                return this.controller.post(url + param, data, baseValue);
            }
            // this.log.info('Getting data from url = ' + url + ', param = ' + param);
            return this.http.post(url + param, data).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((response) => response)
            // .catch((e) => {
            //   return e;
            // })
            );
        }
        catch (e) {
            console.error("Error in getDataFromRESTUsingPOSTReq()", e);
        }
    }
};
NetHavocRestApi.ctorParameters = () => [
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_4__["HttpClient"] },
    { type: _app_core_session_session_service__WEBPACK_IMPORTED_MODULE_5__["SessionService"] }
];
NetHavocRestApi = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Injectable"])({
        providedIn: 'root',
    })
], NetHavocRestApi);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.component.scss":
/*!*****************************************************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.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-sync-point-main .ui-accordion-content {\n  padding-left: 0px !important;\n  padding-right: 0px !important;\n}\napp-sync-point-main .block {\n  display: block;\n  width: 100%;\n  height: calc(100vh - 186px);\n  position: relative;\n}\napp-sync-point-main .inline-flex {\n  display: inline-flex;\n  width: 100%;\n}\napp-sync-point-main .error-msg {\n  position: absolute;\n  left: 50%;\n  text-align: center;\n  top: 50%;\n  transform: translate(-50%, -50%);\n}\napp-sync-point-main .error-msg i {\n  color: #ffbf00;\n  font-size: 4em !important;\n}\napp-sync-point-main .error-msg .opc50 {\n  opacity: 0.5;\n  font-size: 24px;\n}\n@keyframes blinkingBtn {\n  0% {\n    background-color: blue;\n  }\n  33% {\n    background-color: red;\n  }\n  66% {\n    background-color: green;\n  }\n  100% {\n    background-color: blue;\n  }\n}\n@keyframes blinkingText {\n  0% {\n    color: #FFF;\n  }\n  33% {\n    color: #FFF;\n  }\n  66% {\n    color: #fff;\n  }\n  100% {\n    color: #FFF;\n  }\n}\napp-sync-point-main .blinking {\n  animation: blinkingText 2s infinite;\n}\napp-sync-point-main .blinkingBtn_1 {\n  animation: blinkingBtn 2s infinite;\n  color: #FFF;\n  outline: none;\n  border: none;\n  padding: 4px 10px;\n}");

/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.component.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.component.ts ***!
  \***************************************************************************************************/
/*! exports provided: SyncPointMainComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyncPointMainComponent", function() { return SyncPointMainComponent; });
/* 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_pages_tools_configuration_nd_config_services_cav_config_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/pages/tools/configuration/nd-config/services/cav-config.service */ "./src/app/pages/tools/configuration/nd-config/services/cav-config.service.ts");
/* harmony import */ var _netocean_services_netocean_rest_api_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../netocean/services/netocean-rest-api.service */ "./src/app/pages/home/netocean/services/netocean-rest-api.service.ts");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _services_sync_point_common_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../services/sync-point-common.service */ "./src/app/pages/home/sync-point-gui/services/sync-point-common.service.ts");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js");
/* harmony import */ var _netHavoc_services_nethavoc_rest_api_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../netHavoc/services/nethavoc-rest-api.service */ "./src/app/pages/home/netHavoc/services/nethavoc-rest-api.service.ts");


// import { Logger } from '../../../../../vendors/angular2-logger/core';
// import { CavConfigService } from '../../../../main/services/cav-config.service';

// import { CavDataApiService } from '../../../../main/services/cav-data-api.service';



// import { BlockUI, NgBlockUI } from 'ng-block-ui';




let SyncPointMainComponent = class SyncPointMainComponent {
    constructor(_cavConfig, _cavApi, _netHavocApi, confirmationService, _syncPoint, sessionService, messageService) {
        // public log: Logger,
        this._cavConfig = _cavConfig;
        this._cavApi = _cavApi;
        this._netHavocApi = _netHavocApi;
        this.confirmationService = confirmationService;
        this._syncPoint = _syncPoint;
        this.sessionService = sessionService;
        this.messageService = messageService;
        this.syncPointcolumnNames = [];
        this.runTimeHeaders = [];
        this.appendSyncPointFlag = ''; // 0: for addition,1:for updation.
        this.lstOptGroupName = [];
        this.lstOptType = [];
        this.lstOptName = [];
        this.lstOptActive = [];
        this.lstOptMode = [];
        this.lstOptReleaseType = [];
        this.lstOptReleasePlan = [];
        this.scriptLabel = '';
        this.txtReleaseTargetVuser = '';
        this.absoluteDate = '';
        this.absoluteTime = '';
        this.timePeriod = '';
        this.periodic = '';
        this.duration = '';
        this.selectedBox = [];
        this.msgs = [];
        this.uniqueScriptList = [];
        this.scenarioName = "";
        this.scriptArray = [];
        this.groupArray = [];
        this.scriptDetails = [];
        this.script = ''; //for getting value from json.
        this.userArray = [];
        this.keyForReleaseUser = "";
        this.sum = '';
        this.userName = '';
        this.releaseUser = [];
        this.setTableHeightSummary = '40vh';
        this.setTableHeightEvent = '45vh';
        this.sortColumnName = {};
        this.isConfigured = "";
        this.isMax = '1';
        this.isMaxEvent = '1';
        this.eventHeader = '';
        this.eventScrollHeight = '180px';
        this.summaryScrollHeight = '155px';
        this.summaryPaginationOptions = [5, 10, 15, 20, 40];
        this.summaryRows = '5';
        this.width = "8%";
        this.checkForSummary = "min";
        this.checkForEvent = "min";
        this.releasedValue = "0";
        this.absoluteMsg = "VUsers will be released when either Absolute time has occurred or VUsers target is met.";
        this.periodMsg = "VUsers will be released when either specified period is elapsed or VUsers target is met.";
        this.checkBoxMsg = "";
        this.confirmationMsg = "Do you want to Release SyncPoint";
        this.completeConfirmationMsg = "";
        this.rowValue = [];
        this.frequency = '';
        this.stepDuration = '';
        this.arrStepDuration = [];
        this.showValue = false;
        // Wires up BlockUI instance
        // @BlockUI() blockUI: NgBlockUI;
        this.blockedDocument = false;
        this.rows = { rows: 400 };
        this.eventWidth = [
            { width: '10%' },
            { width: '15%' },
            { width: '75%' },
        ];
    }
    ngOnInit() {
        this.tableConfig = {
            "config": {
                "globalFilter": true,
                "toggleFilter": true,
                "tableName": "SyncPoint History"
            }
        };
        this.header = [
            {
                "cols": [
                    {
                        "label": "Elapsed Time",
                        "key": "elapsedTime",
                        "type": 0,
                        "classes": "text-right",
                        "width": "200px"
                    },
                    {
                        "label": "Absolute Time",
                        "key": "absulteTime",
                        "type": 0,
                        "classes": "text-right",
                        "width": "270px"
                    },
                    {
                        "label": "Event Description",
                        "key": "description",
                        "type": 0
                    }
                ]
            }
        ];
        this.rowsPerPageOptions = [
            400,
            700,
            1000
        ];
        // //this.log.debug('In init ');
        this.setDefaultFields();
        this.userName = this.sessionService.session.cctx.u;
        this.firstTime = true;
        this.firstTimeForInitialisingGroupData = true;
        this.sortColumnName = { groupName: 'groupName', syncPointType: 'syncPointType', syncPointName: 'syncPointName', status: 'status', participatingUser: 'participatingUser', releaseUser: 'releaseUser', currentuser: 'currentuser', releaseCount: 'releaseCount', releaseTime: 'releaseTime', releaseReason: 'releaseReason', scripts: 'scripts' };
        // this.runTimeHeaders = [' Elapsed Time', 'Absolute Time', 'Event Description'];
        this.runTimeHeaders = [
            { field: "elapsedTime", header: 'Elapsed Time' },
            { field: "absulteTime", header: 'Absolute Time' },
            { field: "description", header: 'Event Description' }
        ];
        this.getSubscriberdata();
        this.getEventLogData();
        if (this._syncPoint.mode == 'online' && this._syncPoint.accessSyncPoint == true) {
            this.headerRelPath = "/scenario/Sync-Point-Main/Sync-point-main.json";
        }
        else {
            this.headerRelPath = "/scenario/Sync-Point-Main/Sync-point.json";
        }
    }
    customSort(event) {
        event.data.sort((data1, data2) => {
            let value1 = data1[event.field];
            let value2 = data2[event.field];
            let result = null;
            let temp1;
            let temp2;
            // 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 {
                //Checking fields individually and sort data accordingly.
                if (event['field'] == 'groupName') {
                    //for string type fields
                    result = value1.localeCompare(value2);
                }
                else if (event['field'] == 'syncPointType') {
                    //for string type fields
                    result = value1.localeCompare(value2);
                }
                else if (event['field'] == 'syncPointName') {
                    //for string type fields
                    result = value1.localeCompare(value2);
                }
                else if (event['field'] == 'status') {
                    //for string type fields
                    result = value1.localeCompare(value2);
                }
                else if (event['field'] == 'participatingUser') {
                    //for Integer type fields
                    temp1 = parseInt(value1);
                    temp2 = parseInt(value2);
                    result = (temp1 < temp2) ? -1 : (temp1 > temp2) ? 1 : 0;
                }
                else if (event['field'] == 'releaseUser') {
                    //for Integer type fields
                    temp1 = parseInt(value1);
                    temp2 = parseInt(value2);
                    result = (temp1 < temp2) ? -1 : (temp1 > temp2) ? 1 : 0;
                }
                else if (event['field'] == 'currentuser') {
                    //for Integer type fields
                    temp1 = parseInt(value1);
                    temp2 = parseInt(value2);
                    result = (temp1 < temp2) ? -1 : (temp1 > temp2) ? 1 : 0;
                }
                else if (event['field'] == 'releaseCount') {
                    //for Integer type fields
                    temp1 = parseInt(value1);
                    temp2 = parseInt(value2);
                    result = (temp1 < temp2) ? -1 : (temp1 > temp2) ? 1 : 0;
                }
                else if (event['field'] == 'releaseTime') {
                    / To split duration /;
                    temp1 = value1.split(":");
                    temp2 = value2.split(":");
                    if (parseInt(temp1[0]) < parseInt(temp2[0])) {
                        result = -1;
                    }
                    else if (parseInt(temp1[0]) > parseInt(temp2[0])) {
                        result = 1;
                    }
                    else {
                        if (parseInt(temp1[1]) < parseInt(temp2[1])) {
                            result = -1;
                        }
                        else if (parseInt(temp1[1]) > parseInt(temp2[1])) {
                            result = 1;
                        }
                        else {
                            if (parseInt(temp1[2]) < parseInt(temp2[2])) {
                                result = -1;
                            }
                            else if (parseInt(temp1[2]) > parseInt(temp2[2])) {
                                result = 1;
                            }
                            else
                                result = 0;
                        }
                    }
                }
                else if (event['field'] == 'releaseReason') {
                    //for string type fields
                    result = value1.localeCompare(value2);
                }
            }
            return (event.order * result);
        });
    }
    getSubscriberdata() {
        try {
            let temp = this._syncPoint.syncPointInfo.subscribe(result => {
                if (this._syncPoint.action = "GETDATA") {
                    this.syncPointTableData = [];
                    this.readSummaryFile(result);
                }
            }, error => {
                //this.log.error("error in getting data")
                temp.unsubscribe();
            }, () => {
                //this.log.debug('data delivered successfully');
                temp.unsubscribe();
            });
        }
        catch (error) {
            //this.log.error('error in getting subscriber data', error);
        }
    }
    getEventLogData() {
        try {
            let temp = this._syncPoint.syncPointEventLog.subscribe(result => {
                this.getEventData(result);
                this._syncPoint.destroyProg();
                if (this._syncPoint.mode == 'online' && this._syncPoint.accessSyncPoint == true) {
                    this.headerRelPath = "/scenario/Sync-Point-Main/Sync-point-main.json";
                }
                else {
                    this.headerRelPath = "/scenario/Sync-Point-Main/Sync-point.json";
                }
            }, error => {
                //this.log.error("error in getting data")
                temp.unsubscribe();
            }, () => {
                //this.log.debug('data delivered successfully');
                temp.unsubscribe();
            });
        }
        catch (error) {
            //this.log.error('error in getting subscriber data', error);
        }
    }
    /**For Initialising Default Fields in Dropdown */
    setDefaultFields() {
        try {
            this.isShowResizeOperationSummary = false;
            this.hideSummary = false;
            this.isShowResizeOperationEvent = false;
            this.hideEvent = false;
            this.isSummary = false;
            this.isEvent = false;
            this.isDisableupdate = false;
            this.display = false;
            this.showHideDialog = false;
            this.dialogHeader = "Add SyncPoint";
            this.txtParticipatingVuser = 100;
            this.isRelease = true;
            this.firstTime = false;
            this.isDelete = false;
            this.isDisableReleaseType = false;
            this.isShowAbsolute = false;
            this.isShowTimePeriod = false;
            this.isShowReleasedForcefully = false;
            this.isShowRate = false;
            this.isShowDuration = false;
            this.isShowReleaseType = true;
            this.isReleasedForcefully = false;
            this.confirmationForManual = false;
            this.blinking = false;
            this.lstOptType.push({ 'label': '--Select Type--', 'value': 'Select Type' });
            this.lstOptType.push({ 'label': 'Transaction', 'value': 'transList' });
            this.lstOptType.push({ 'label': 'Page', 'value': 'pageList' });
            this.lstOptType.push({ 'label': 'Script', 'value': 'Start Script' });
            this.lstOptType.push({ 'label': 'API', 'value': 'syncList' });
            this.lstOptActive.push({ 'label': 'Yes', 'value': '1' });
            this.lstOptActive.push({ 'label': 'No', 'value': '0' });
            this.lstOptMode.push({ 'label': 'Auto', 'value': '0' });
            this.lstOptMode.push({ 'label': 'Manual', 'value': '1' });
            this.lstOptReleaseType.push({ 'label': 'on reaching Target VUsers', 'value': 'Target Vusers' });
            this.lstOptReleaseType.push({ 'label': 'at absolute time', 'value': 'Absolute Time' });
            this.lstOptReleaseType.push({ 'label': 'after duration', 'value': 'Period' });
            // this.lstOptReleaseType.push({'label': 'Periodic','value':'Periodic'});
            this.lstOptReleasePlan.push({ 'label': 'immediately', 'value': 'Immediate' });
            this.lstOptReleasePlan.push({ 'label': 'at rate of ', 'value': 'Rate' });
            this.lstOptReleasePlan.push({ 'label': 'in specified duration', 'value': 'Duration' });
            this.lstOptReleasePlan.push({ 'label': 'in specified multi-step duration', 'value': 'Multistep Duration' });
            this.duration = '00:01:00';
            this.timePeriod = '00:00:00';
            this.frequency = '00:15:00';
            this.rate = 120;
            this.txtParticipatingVuser = 100;
            this.releaseModeCheckbox = false;
            this.isShowFrequency = false;
            this.isShowStepDuration = false;
            this.stepDuration = '00:00:00';
            this.stepPercentage = 0;
            this.arrStepDuration = [];
            this.showValue = false;
            this.disabledStepDuration = false;
            this.disableTargetVuser = false;
        }
        catch (error) {
            //this.log.error("error in initialising default value in array", error);
        }
    }
    /**call for getting data from summary report */
    readSummaryFile(result) {
        try {
            this.syncPointTableData = result.map(rowData => {
                rowData['enableDelete'] = rowData['currentuser'] == 0 && rowData['releaseCount'] == 0;
                return rowData;
            });
            console.log("value of result in readSummaryFile", result);
            for (let i = 0; i < result.length; i++) {
                let key = result[i]['groupName'] + '/' + result[i]['syncPointType'] + '/' + result[i]['syncPointName'];
                if (key == this.selectionDataKey) {
                    this.selectedBox = result[i];
                }
            }
            /**check for sync point configure or not */
            if (this.syncPointTableData.length != 0) {
                this.isConfigured = 'true';
            }
            else {
                this.isConfigured = 'false';
            }
            /**portion for handeling paginater of Group Table */
            if (this.checkForSummary == "min") {
                if (this.syncPointTableData.length >= 5) {
                    this.isSummary = true;
                }
                else {
                    this.isSummary = false;
                }
            }
            else {
                if (this.syncPointTableData.length >= 20) {
                    this.isSummary = true;
                }
                else {
                    this.isSummary = false;
                }
            }
            if (this.firstTime) {
                this.selectedBox = this.syncPointTableData[0];
                let syncPointName = "";
                if (this.selectedBox['syncPointName'].indexOf('/') != -1) {
                    let value = [];
                    value = this.selectedBox['syncPointName'].split('/');
                    syncPointName = value[2];
                }
                else {
                    syncPointName = this.selectedBox['syncPointName'];
                }
                this.eventHeader = '(' + this.selectedBox['groupName'] + '/' + this.selectedBox['syncPointType'] + '/' + syncPointName + ')';
                this.tableConfig.config.tableName = "SyncPoint History" + this.eventHeader;
                this._syncPoint.rowData = this.selectedBox;
            }
            this.firstTime = false;
            // this._syncPoint.eventDataFromLogFile();
        }
        catch (error) {
            //this.log.error('error in getData()');
        }
    }
    initialisingGroupData(res) {
        try {
            this.groupArray = res['Group'];
            this.scriptArray = res['Script'];
            this.userArray = res['User'];
            this.sum = res['Sum'];
            this.lstOptGroupName = [];
            this.lstOptGroupName.push({ 'label': 'ALL', 'value': 'ALL' });
            for (let i = 0; i < this.groupArray.length; i++) {
                this.lstOptGroupName.push({ 'label': this.groupArray[i], 'value': this.groupArray[i] });
            }
            let scriptList = this.scriptArray[0];
            for (let i = 1; i < this.scriptArray.length; i++) {
                scriptList = scriptList + '|' + this.scriptArray[i];
            }
            this.scenarioName = res['Scenario'];
            this.getScriptInfo(scriptList);
            /**for pushing unique value of script to show in script label */
            for (let key in this.scriptArray) {
                if (this.scriptArray.hasOwnProperty(key)) {
                    if (this.uniqueScriptList.indexOf(this.scriptArray[key]) == -1) { //for removing duplicate value from array
                        this.uniqueScriptList.push(this.scriptArray[key]);
                    }
                }
            }
        }
        catch (error) {
            //this.log.error("error in initalising values", error);
        }
    }
    /**call for getting transaction list,page list,syncpoint list */
    getScriptInfo(data) {
        try {
            let scriptList = data;
            // let userName = sessionStorage.getItem("sesLoginName");
            let url = 'getTransPageSyncData?' + 'scriptList=' + scriptList +
                '&scenMode=0' + '&scenName=' + this.scenarioName;
            let add = this._netHavocApi.getDataByRestAPI(url, '/DashboardServer/v2/scenario/data/').subscribe(result => {
                if (result != '' && result != undefined) {
                    this.scriptDetails = result;
                    // this.firstTimeForInitialisingGroupData = false;
                }
                else {
                    // this.msgs.push({ severity: 'error', summary: 'Error', detail: 'Error in Getting NameList.' });
                    this.showErrorMsg('Error in Getting NameList.');
                }
            }, error => {
                //this.log.error('error in getting Name List', error);
                add.unsubscribe();
            }, () => {
                add.unsubscribe();
            });
        }
        catch (error) {
            //this.log.error("error in getting name list ", error);
        }
    }
    /**Method call onchnage of group and Type */
    getSyncNameList() {
        try {
            this.scriptLabel = '';
            this.lstOptName = this.getArrayList();
        }
        catch (error) {
            //this.log.error("error in getting getSyncNameList()", error)
        }
    }
    /**Main logic for filling name List */
    getArrayList() {
        try {
            let array = [];
            let nameList = [];
            if (this.lstType == 'Select Type') {
                this.lstName = 'Select Name';
                nameList.push({ 'label': '--Select Name--', 'value': 'Select Name' });
            }
            else if (this.lstType == 'pageList') {
                this.lstName = 'Select Page';
                nameList.push({ 'label': '--Select Page--', 'value': 'Select Page' });
            }
            else if (this.lstType == 'transList') {
                this.lstName = 'Select Transaction';
                nameList.push({ 'label': '--Select Transaction--', 'value': 'Select Transaction' });
            }
            else if (this.lstType == 'syncList') {
                this.lstName = 'Select Syncpoint';
                nameList.push({ 'label': '--Select Syncpoint--', 'value': 'Select Syncpoint' });
            }
            else {
                this.lstName = 'Select Script';
                nameList.push({ 'label': '--Select Script--', 'value': 'Select Script' });
            }
            if (this.lstGroupName == 'ALL') {
                if (this.lstType == 'Start Script') {
                    // for (let key in this.scriptArray) {
                    //   if (this.scriptArray.hasOwnProperty(key)) {
                    //     if (array.indexOf(this.scriptArray[key]) == -1) { //for removing duplicate value from array
                    //       array.push(this.scriptArray[key]);
                    //     }
                    //   }
                    // }
                    // this.uniqueScriptList = array;
                    array = this.uniqueScriptList;
                }
                else {
                    for (let key in this.scriptArray) {
                        if (this.scriptArray.hasOwnProperty(key)) {
                            let value = [];
                            value = this.scriptDetails[key][this.scriptArray[key]][this.lstType];
                            for (let key in value) {
                                if (value.hasOwnProperty(key)) {
                                    if (array.indexOf(value[key]) == -1) {
                                        array.push(value[key]);
                                    }
                                }
                            }
                        }
                    }
                }
                /**For pushing unique name value in nameList */
                for (let key in array) {
                    if (array.hasOwnProperty(key)) {
                        nameList.push({ 'label': array[key], 'value': array[key] });
                    }
                }
                return nameList;
            }
            else {
                this.keyForReleaseUser = this.getScriptValue();
                if (this.lstType == 'Start Script') {
                    ``;
                    // nameList.push({'label':'--Select Script--','value': 'Select Script'});
                    nameList.push({ 'label': this.script, 'value': this.script });
                }
                else {
                    array = this.scriptDetails[this.keyForReleaseUser][this.script][this.lstType];
                    for (let key in array) {
                        if (array.hasOwnProperty(key)) {
                            nameList.push({ 'label': array[key], 'value': array[key] });
                        }
                    }
                }
                return nameList;
            }
        }
        catch (error) {
            //this.log.error("error in getting arrayList", error);
        }
    }
    /**For getting script value and index for groups only */
    getScriptValue() {
        try {
            for (let key in this.groupArray) {
                if (this.groupArray.hasOwnProperty(key)) {
                    if (this.lstGroupName == this.groupArray[key]) {
                        this.script = this.scriptArray[key];
                        return key;
                    }
                }
            }
        }
        catch (error) {
            //this.log.error("error in getting script value", error);
        }
    }
    /**For filling script text box on the basis of group and name */
    fillScriptLabel() {
        try {
            if (this.lstGroupName == 'ALL') {
                if (this.lstType != 'Start Script') {
                    this.scriptLabel = this.uniqueScriptList[0];
                    for (let i = 1; i < this.uniqueScriptList.length; i++) {
                        this.scriptLabel = this.scriptLabel + ',' + this.uniqueScriptList[i];
                    }
                }
                else {
                    if (this.lstName != 'Select Script') {
                        this.scriptLabel = this.lstName;
                    }
                    else {
                        this.scriptLabel = "";
                    }
                }
            }
            else {
                this.scriptLabel = this.script;
            }
        }
        catch (error) {
            //this.log.error("error in filling script label", error);
        }
    }
    /**For Getting Event Table Data */
    getEventData(result) {
        try {
            if (this.firstTimeForInitialisingGroupData) {
                this.initialisingGroupData(this._syncPoint.groupDataResult);
            }
            this.firstTimeForInitialisingGroupData = false;
            this.runTimeHeadersData = [];
            this.runTimeHeadersData = result;
            /**portion for handeling paginater of eventLogData Table */
            if (this.checkForEvent == "min") {
                if (this.runTimeHeadersData.length > 400) {
                    this.isEvent = true;
                    this.eventScrollHeight = '180px';
                }
                else {
                    this.isEvent = false;
                    this.eventScrollHeight = '180px';
                }
            }
            else {
                if (this.runTimeHeadersData.length > 400) {
                    this.isEvent = true;
                    this.eventScrollHeight = '470px';
                }
                else {
                    this.isEvent = false;
                    this.eventScrollHeight = '470px';
                }
            }
        }
        catch (error) {
            //this.log.error('Error in getEventData() ', error)
        }
    }
    /**Common method call on adding a sync point and updating a sync point */
    appendData() {
        try {
            let releaseType;
            let releaseTypeValue;
            let releasePlanValue;
            let stepDuration;
            console.log('value of s-----', this.arrStepDuration);
            if (this.isShowStepDuration) {
                stepDuration = this.arrStepDuration[0]['duration'] + ',' + this.arrStepDuration[0]['percentage'];
                for (let i = 1; i < this.arrStepDuration.length; i++) {
                    stepDuration = stepDuration + ';' + this.arrStepDuration[i]['duration'] + ',' + this.arrStepDuration[i]['percentage'];
                }
                console.log('value of s-----', stepDuration);
            }
            if (this.releaseModeCheckbox) {
                this.releaseMode = '1';
            }
            else {
                this.releaseMode = '0';
            }
            console.log('value of releaseMode', this.releaseMode);
            console.log('value of releaseMode', this.releaseType);
            if (this.releaseMode == '1') {
                releaseType = 'NA';
                releaseTypeValue = 'NA';
            }
            else {
                releaseType = this.releaseType;
                // if(releaseType == 'Periodic')
                // releaseTypeValue = this.periodic;
                if (releaseType == 'Absolute Time') {
                    let absoluteDate;
                    if (this.isShowFrequency) {
                        absoluteDate = moment__WEBPACK_IMPORTED_MODULE_6__(new Date(this.absoluteDate)).format('MM/DD/YY');
                        releaseTypeValue = absoluteDate + '-' + this.absoluteTime + ',' + this.frequency;
                    }
                    else {
                        absoluteDate = moment__WEBPACK_IMPORTED_MODULE_6__(new Date(this.absoluteDate)).format('MM/DD/YY');
                        releaseTypeValue = absoluteDate + '-' + this.absoluteTime;
                    }
                }
                else if (releaseType == 'Period')
                    releaseTypeValue = this.timePeriod;
                else
                    releaseTypeValue = 'NA';
            }
            if (this.releasePlan == 'Rate')
                releasePlanValue = this.rate;
            else if (this.releasePlan == 'Duration')
                releasePlanValue = this.duration;
            else if (this.releasePlan == 'Multistep Duration')
                releasePlanValue = stepDuration;
            else
                releasePlanValue = 'NA';
            //this.log.debug(' In appendData()');
            let user = this.sessionService.session.cctx.u;
            this.blockedDocument = true;
            let jsonData = {
                'GroupName': this.lstGroupName,
                'GroupType': this.lstType,
                'Name': this.lstName,
                'Active': this.lstActive,
                'ParticipatingVUsers': this.txtParticipatingVuser,
                'RealeaseTargetUsrs': this.txtReleaseTargetVuser,
                'Scripts': this.scriptLabel,
                'testRun': this._syncPoint.testRun,
                'scenario': this._syncPoint.scenario,
                'releaseMode': this.releaseMode,
                'releaseType': releaseType,
                'releaseTypeValue': releaseTypeValue,
                'releasePlan': this.releasePlan,
                'releasePlanValue': releasePlanValue,
                'checkBox': this.releasedValue,
            };
            console.log("value of jsonData-->", jsonData);
            //  this._syncPoint.destroyProg();
            /**Rest call For Adding Data */
            if (this.appendSyncPointFlag == '0') {
                let url = '/DashboardServer/syncPoint/SyncPointService/addSyncPointData?productKey=' + this.sessionService.session.cctx.pk + '&user=' + user;
                // let add = this._cavApi.getDataFromRESTUsingPOSTReq(url, '', jsonData).subscribe(
                let add = this._netHavocApi.getDataFromRESTUsingPOSTReq("addSyncPointData", "", jsonData, "/DashboardServer/syncPoint/SyncPointService/").subscribe(res => {
                    if (res['success'] != undefined && res['success'] != '') {
                        this.showHideDialog = false;
                        this.blockedDocument = false;
                        // this.msgs = [{ severity: 'success', summary: 'Success Message', detail: res['success'] }];
                        this.showSucess(res['success']);
                        this._syncPoint.getData();
                    }
                    else if (res['error'] != undefined && res['error'] != '') {
                        this.blockedDocument = false;
                        // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: res['error'] }];
                        this.showErrorMsg(res['error']);
                    }
                    else {
                        // this.msgs = [{ severity: 'success', summary: 'Error Message', detail: 'Error in adding SyncPoint:' }];
                        this.showErrorMsg('Error in adding SyncPoint.');
                    }
                }, error => {
                    add.unsubscribe();
                    //this.log.error("Error in adding data", error);
                }, () => {
                    //this.log.debug("Data added Sucessfully");
                    add.unsubscribe();
                });
            }
            /**Rest call For Updating Data */
            if (this.appendSyncPointFlag == '1') {
                let url = '/DashboardServer/syncPoint/SyncPointService/updateRow?user=' + user + '&productKey=' + this.sessionService.session.cctx.pk;
                // let temp = this._cavApi.getDataFromRESTUsingPOSTReq(url, '', jsonData).subscribe(
                let temp = this._netHavocApi.getDataFromRESTUsingPOSTReq("updateRow", "", jsonData, "/DashboardServer/syncPoint/SyncPointService/").subscribe(res => {
                    if (res['success'] != undefined && res['success'] != '') {
                        this.showHideDialog = false;
                        this.blockedDocument = false;
                        // this.msgs = [{ severity: 'success', summary: 'Success Message', detail: res['success'] }];
                        this.showSucess(res['success']);
                        this._syncPoint.getData();
                    }
                    else if (res['error'] != undefined && res['error'] != '') {
                        this.blockedDocument = false;
                        // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: res['error'] }];
                        this.showErrorMsg(res['error']);
                    }
                    else {
                        // this.msgs = [{ severity: 'success', summary: 'Error Message', detail: 'Error in Updating SyncPoint:' }];
                        this.showErrorMsg('Error in Updating SyncPoint');
                    }
                }, error => {
                    temp.unsubscribe();
                    //this.log.error("Error in Updating Data", error);
                }, () => {
                    //this.log.debug("Data Updated Sucessfully");
                    temp.unsubscribe();
                });
            }
        }
        catch (error) {
            console.log('Error in AppendData()', error);
        }
    }
    /**for Deleting synpoint */
    delSyncPoint(rowData) {
        try {
            let user = this.sessionService.session.cctx.u;
            this.confirmationService.confirm({
                message: 'Do you want to delete this SyncPoint ?',
                header: 'Confirmation',
                icon: 'fa fa-trash',
                accept: () => {
                    this._syncPoint.unsubscribeReq();
                    if (rowData['releaseType'] == "Absolute Time") {
                        // let timeZoneId = sessionStorage.getItem('timeZoneId');
                        // let date = moment.tz(Date.now(), timeZoneId).format('HH:mm:ss_MM/DD/YYYY');
                        // let curDate = date.split('_');
                        // let stDate = curDate[0];
                        // let stTime = curDate[1];
                        /*converting date to format. */
                        // let absoluteDate;
                        // let currString;
                        // console.log('value0 of releaseTypeValue',rowData['releaseTypeValue']);
                        /**check a Absolute Time */
                        // absoluteDate =  rowData['releaseTypeValue'];
                        // currString = stDate + ' ' + stTime;
                        // if (new Date(absoluteDate) < new Date(currString)) {
                        //   this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Absolute date/time can not be less than Current date/time.' }];
                        //   return;
                        // }
                        if (rowData['absFrequencyVal'] != '') {
                            rowData['releaseTypeValue'] = rowData['releaseTypeValue'] + ',' + rowData['absFrequencyVal'];
                        }
                    }
                    // this.blockUI.start();
                    this.blockedDocument = true;
                    //this.log.debug('In delSyncPoint()');
                    let url = '/DashboardServer/syncPoint/SyncPointService/delSyncPointData?user=' + user + '&productKey' + this.sessionService.session.cctx.pk;
                    let jsonData = {
                        'testRunNumber': this._syncPoint.testRun,
                        'selectedBox': rowData,
                    };
                    // let temp = this._cavApi.getDataFromRESTUsingPOSTReq(url, '', jsonData).subscribe(
                    let temp = this._netHavocApi.getDataFromRESTUsingPOSTReq("delSyncPointData", "", jsonData, "/DashboardServer/syncPoint/SyncPointService/").subscribe(result => {
                        if (result['success'] != undefined && result['success'] != '') {
                            this.selectedBox = [];
                            this.firstTime = true;
                            // this.msgs.push({ severity: 'success', summary: 'Success Message', detail: result['success'] });
                            this.showSucess(result['success']);
                            //this.blockUI.stop();
                            this.blockedDocument = false;
                            if (this._syncPoint.autoRefresh) {
                                this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                                ;
                            }
                            this._syncPoint.getData();
                        }
                        else if (result['error'] != undefined && result['error'] != '') {
                            // this.blockUI.start();
                            this.blockedDocument = true;
                            // this.msgs.push({ severity: 'error', summary: 'Error Message', detail: result['error'] });
                            this.showErrorMsg(result['error']);
                            if (this._syncPoint.autoRefresh) {
                                this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                            }
                        }
                        else {
                            // this.msgs.push({ severity: 'error', summary: 'Error Message', detail: 'Error in deleting SyncPoint:' });
                            this.showErrorMsg('Error in deleting SyncPoint.');
                        }
                    }, error => {
                        //this.log.error("error in deleting data", error);
                        temp.unsubscribe();
                        // this.blockUI.stop();
                        this.blockedDocument = false;
                    }, () => {
                        //this.log.debug("Data Deleted sucessfully");
                        temp.unsubscribe();
                        // this.blockUI.stop();
                        this.blockedDocument = false;
                    });
                },
                reject: () => {
                    return;
                }
            });
        }
        catch (error) {
            //this.log.error('error in deleting service and url fields', error);
        }
    }
    /**For Activating Sync Point */
    activate(rowData) {
        try {
            let user = this.sessionService.session.cctx.u;
            this.confirmationService.confirm({
                message: 'Do you want to Activate this SyncPoint ?',
                header: 'Confirmation',
                icon: 'fa fa-check-circle',
                accept: () => {
                    if (rowData['releaseType'] == "Absolute Time") {
                        let timeZoneId = this._cavConfig.$timeZoneId;
                        let date = moment__WEBPACK_IMPORTED_MODULE_6__["tz"](Date.now(), timeZoneId).format('HH:mm:ss_MM/DD/YYYY');
                        let curDate = date.split('_');
                        let stDate = curDate[0];
                        let stTime = curDate[1];
                        /*converting date to format. */
                        let absoluteDate;
                        let currString;
                        console.log('value0 of rowdata', rowData['releaseTypeValue']);
                        /**check a Absolute Time */
                        absoluteDate = rowData['releaseTypeValue'];
                        currString = stDate + ' ' + stTime;
                        if (new Date(absoluteDate) < new Date(currString)) {
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Absolute date/time can not be less than Current date/time.' }];
                            this.showErrorMsg('Absolute date/time can not be less than Current date/time.');
                            return;
                        }
                        if (rowData['absFrequencyVal'] != '') {
                            rowData['releaseTypeValue'] = rowData['releaseTypeValue'] + ',' + rowData['absFrequencyVal'];
                        }
                    }
                    console.log('value0 of rowdata', rowData);
                    // console.log("after if ");
                    // this.blockUI.start();
                    this.blockedDocument = true;
                    this._syncPoint.unsubscribeReq();
                    let url = '/DashboardServer/syncPoint/SyncPointService/activeSyncPointData?user=' + user + '&productKey=' + this.sessionService.session.cctx.pk;
                    let jsonData = {
                        'testRunNumber': this._syncPoint.testRun,
                        'selectedBox': rowData,
                    };
                    // let temp = this._cavApi.getDataFromRESTUsingPOSTReq(url, '', jsonData).subscribe(
                    let temp = this._netHavocApi.getDataFromRESTUsingPOSTReq("activeSyncPointData", "", jsonData, "/DashboardServer/syncPoint/SyncPointService/").subscribe(result => {
                        if (result['success'] != undefined && result['success'] != '') {
                            // this.blockUI.stop();
                            this.blockedDocument = false;
                            // this.msgs = [{ severity: 'success', summary: 'Success Message', detail: result['success'] }];
                            this.showSucess(result['success']);
                            if (this._syncPoint.autoRefresh) {
                                this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                            }
                            this._syncPoint.getData();
                        }
                        else if (result['error'] != undefined && result['error'] != '') {
                            // this.blockUI.stop();
                            this.blockedDocument = false;
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: result['error'] }];
                            this.showErrorMsg(result['error']);
                            if (this._syncPoint.autoRefresh) {
                                this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                            }
                        }
                        else {
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Error in Activate SyncPoint.' }];
                            this.showErrorMsg('Error in Activate SyncPoint.');
                        }
                    }, error => {
                        //this.log.error("error in Activating Sync Point", error);
                        temp.unsubscribe();
                        // this.blockUI.stop();
                        this.blockedDocument = false;
                    }, () => {
                        //this.log.debug('Sync Point Activated Sucessfully');
                        temp.unsubscribe();
                        // this.blockUI.stop();
                        this.blockedDocument = false;
                    });
                },
                reject: () => {
                    return;
                }
            });
        }
        catch (error) {
            //this.log.error('Error In activate()', error);
        }
    }
    /**For deActivating Sync Point */
    deActivate(rowData) {
        try {
            let user = this.sessionService.session.cctx.u;
            console.log('value0 of rowdata', rowData);
            this.confirmationService.confirm({
                message: 'Do you want to Deactivate this SyncPoint ?',
                header: 'Confirmation',
                icon: 'fa fa-times-circle',
                accept: () => {
                    if (rowData['releaseType'] == "Absolute Time") {
                        // let timeZoneId = sessionStorage.getItem('timeZoneId');
                        // let date = moment.tz(Date.now(), timeZoneId).format('HH:mm:ss_MM/DD/YYYY');
                        // let curDate = date.split('_');
                        // let stDate = curDate[0];
                        // let stTime = curDate[1];
                        // /*converting date to format. */
                        // let absoluteDate;
                        // let currString;
                        // console.log('value0 of releaseTypeValue',rowData['releaseTypeValue']);
                        //  /**check a Absolute Time */
                        //   absoluteDate =  rowData['releaseTypeValue'];
                        //   currString = stDate + ' ' + stTime;
                        //   if (new Date(absoluteDate) < new Date(currString)) {
                        //     this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Absolute date/time can not be less than Current date/time.' }];
                        //     return;
                        //   }
                        if (rowData['absFrequencyVal'] != '') {
                            rowData['releaseTypeValue'] = rowData['releaseTypeValue'] + ',' + rowData['absFrequencyVal'];
                        }
                    }
                    console.log('value0 of rowdata', rowData);
                    // this.blockUI.start();
                    this.blockedDocument = true;
                    this._syncPoint.unsubscribeReq();
                    let url = '/DashboardServer/syncPoint/SyncPointService/activeSyncPointData?user=' + user + '&productKey=' + this.sessionService.session.cctx.pk;
                    let jsonData = {
                        'testRunNumber': this._syncPoint.testRun,
                        'selectedBox': rowData,
                    };
                    // let temp = this._cavApi.getDataFromRESTUsingPOSTReq(url, '', jsonData).subscribe(
                    let temp = this._netHavocApi.getDataFromRESTUsingPOSTReq("activeSyncPointData", "", jsonData, "/DashboardServer/syncPoint/SyncPointService/").subscribe(result => {
                        if (result['success'] != undefined && result['success'] != '') {
                            // this.blockUI.stop();
                            this.blockedDocument = false;
                            // this.msgs = [{ severity: 'success', summary: 'Success Message', detail: result['success'] }];
                            this.showSucess(result['success']);
                            if (this._syncPoint.autoRefresh) {
                                this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                            }
                            this._syncPoint.getData();
                        }
                        else if (result['error'] != undefined && result['error'] != '') {
                            // this.blockUI.stop();
                            this.blockedDocument = false;
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: result['error'] }];
                            this.showErrorMsg(result['error']);
                            if (this._syncPoint.autoRefresh) {
                                this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                            }
                        }
                        else {
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Error in Deactivate SyncPoint.' }];
                            this.showErrorMsg('Error in Deactivate SyncPoint.');
                        }
                    }, error => {
                        //this.log.error("error in Deactivate Sync Point", error);
                        temp.unsubscribe();
                        // this.blockUI.stop();
                        this.blockedDocument = false;
                    }, () => {
                        //this.log.debug('Sync Point Deactivate Sucessfully');
                        temp.unsubscribe();
                        // this.blockUI.stop();
                        this.blockedDocument = false;
                    });
                },
                reject: () => {
                    return;
                }
            });
        }
        catch (error) {
            //this.log.error('Error In activate()', error);
        }
    }
    /**For Prematurely Releasing Sync Point */
    release(rowData) {
        try {
            this.rowValue = rowData;
            // console.log("value of rowData-->",rowData);
            let user = this.sessionService.session.cctx.u;
            if (rowData['releaseMode'] == "Manual") {
                this.confirmationForManual = true;
                this.duration = '00:01:00';
                this.rate = 120;
                this.stepPercentage = 0;
                this.stepDuration = '00:00:00';
                if (rowData['releaseSchedule'] == "Immediate") {
                    this.showValue = false;
                    this.isShowStepDuration = false;
                    this.releasePlan = rowData['releaseSchedule'];
                    this.isShowDuration = false;
                    this.isShowRate = false;
                    this.completeConfirmationMsg = "";
                    this.completeConfirmationMsg = this.confirmationMsg + " " + 'Immediate?';
                }
                else if (rowData['releaseSchedule'] == "Duration") {
                    this.showValue = false;
                    this.isShowStepDuration = false;
                    this.releasePlan = rowData['releaseSchedule'];
                    this.isShowDuration = true;
                    this.isShowRate = false;
                    this.duration = rowData["releaseScheduleValue"];
                    this.completeConfirmationMsg = "";
                    this.completeConfirmationMsg = this.confirmationMsg + " " + rowData['combineReleaseScheduleValue'] + "?";
                }
                else if (rowData['releaseSchedule'] == "Rate") {
                    this.showValue = false;
                    this.isShowStepDuration = false;
                    this.releasePlan = rowData['releaseSchedule'];
                    this.isShowDuration = false;
                    this.isShowRate = true;
                    this.rate = rowData["releaseScheduleValue"];
                    this.completeConfirmationMsg = "";
                    this.completeConfirmationMsg = this.confirmationMsg + " " + "with" + " " + "Rate" + " " + rowData['releaseScheduleValue'] + "/" + "Min?";
                }
                else if (rowData['releaseSchedule'] == 'Multistep Duration') {
                    this.releasePlan = rowData['releaseSchedule'];
                    this.isShowStepDuration = true;
                    this.isShowRate = false;
                    this.isShowDuration = false;
                    this.showValue = true;
                    this.arrStepDuration = rowData['multiStepDurationList'];
                    this.stepDuration = '00:00:00';
                    this.stepPercentage = 0;
                    this.completeConfirmationMsg = "";
                    this.completeConfirmationMsg = this.confirmationMsg + " " + "with" + " " + "Step Duration" + "?";
                }
            }
            else {
                this.confirmationForManual = false;
                this.confirmationService.confirm({
                    message: 'Do you want to release this SyncPoint ?',
                    header: 'Confirmation',
                    icon: 'fa fa-paper-plane',
                    accept: () => {
                        // this.blockUI.start();
                        this.blockedDocument = true;
                        this._syncPoint.unsubscribeReq();
                        let url = '/DashboardServer/syncPoint/SyncPointService/releaseSyncPointData?user=' + user + '&productKey' + this.sessionService.session.cctx.pk;
                        let jsonData = {
                            'testRunNumber': this._syncPoint.testRun,
                            'selectedBox': rowData,
                        };
                        console.log("value of json data in mannual release", jsonData);
                        // let temp = this._cavApi.getDataFromRESTUsingPOSTReq(url, '', jsonData).subscribe(
                        let temp = this._netHavocApi.getDataFromRESTUsingPOSTReq("releaseSyncPointData", "", jsonData, "/DashboardServer/syncPoint/SyncPointService/").subscribe(result => {
                            if (result['success'] != undefined && result['success'] != '') {
                                // this.blockUI.stop();
                                this.blockedDocument = false;
                                this._syncPoint.getData();
                                this.msgs = [{ severity: 'success', summary: 'Success Message', detail: result['success'] }];
                                if (this._syncPoint.autoRefresh) {
                                    this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                                }
                            }
                            else if (result['error'] != undefined && result['error'] != '') {
                                // this.blockUI.stop();
                                this.blockedDocument = false;
                                this.msgs = [{ severity: 'error', summary: 'Error Message', detail: result['error'] }];
                                if (this._syncPoint.autoRefresh) {
                                    this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                                }
                            }
                            else {
                                this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Error in releasing SyncPoint.' }];
                            }
                        }, error => {
                            //this.log.error("Error in Releasing Data", error);
                            temp.unsubscribe();
                            // this.blockUI.stop();
                            this.blockedDocument = false;
                        }, () => {
                            //this.log.debug("Sync Point Releases Sucessfully");
                            temp.unsubscribe();
                            // this.blockUI.stop();
                            this.blockedDocument = false;
                        });
                    },
                    reject: () => {
                        return;
                    }
                });
            }
        }
        catch (error) {
            //this.log.error(' Error In release()', error);
        }
    }
    /**Method call on Manual release if release mode is Manual */
    ManualRelease() {
        try {
            let user = this.sessionService.session.cctx.u;
            let rowData = this.rowValue;
            // console.log("value of rowData from manual release",rowData);
            rowData["releaseSchedule"] = this.releasePlan;
            if (this.releasePlan == "Immediate") {
                rowData["releaseScheduleValue"] = "-";
            }
            else if (this.releasePlan == "Duration") {
                let pattern = new RegExp('([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])');
                if (this.duration == "00:00:00") {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Specified Duration is mandatory (hh:mm:ss).'}];
                    this.showErrorMsg('Specified Duration is mandatory (hh:mm:ss).');
                    return;
                }
                else if (!pattern.test(this.duration)) {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Specified Duration should be in "hh:mm:ss" format.' }];
                    this.showErrorMsg('Specified Duration should be in "hh:mm:ss" format.');
                    return false;
                }
                rowData["releaseScheduleValue"] = this.duration;
            }
            else if (this.releasePlan == "Rate") {
                if (this.rate <= 0) {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Rate is mandatory and should be greater than 0.' }];
                    this.showErrorMsg('Rate is mandatory and should be greater than 0.');
                    return;
                }
                rowData["releaseScheduleValue"] = this.rate;
            }
            else if (this.releasePlan == 'Multistep Duration') {
                if (this.isShowStepDuration) {
                    let sumPercentageForStepDuration;
                    if (this.arrStepDuration.length == 0) {
                        // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'MultiStep Duration is mandatory.'}];
                        this.showErrorMsg('MultiStep Duration is mandatory.');
                        return;
                    }
                    sumPercentageForStepDuration = 0;
                    //  sumDurationForStepDuration = this.arrStepDuration[0]['duration'];
                    for (let i = 0; i < this.arrStepDuration.length; i++) {
                        let pattern = new RegExp('([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])');
                        if (this.arrStepDuration[i]['duration'] == '00:00:00') {
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Duration is mandatory (hh:mm:ss).' }];
                            this.showErrorMsg('Multistep Duration is mandatory (hh:mm:ss).');
                            return;
                        }
                        if (!pattern.test(this.arrStepDuration[i]['duration'])) {
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Duration must be in HH:MM:SS format.' }];
                            this.showErrorMsg('Multistep Duration must be in HH:MM:SS format.');
                            return;
                        }
                        if (this.arrStepDuration[i]['percentage'] <= 0) {
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Percentage is mandatory and should be greater than 0.' }];
                            this.showErrorMsg('Multistep Percentage is mandatory and should be greater than 0.');
                            return;
                        }
                        sumPercentageForStepDuration = sumPercentageForStepDuration + parseInt(this.arrStepDuration[i]['percentage']);
                        // sumDurationForStepDuration = sumDurationForStepDuration + this.arrStepDuration[i]['duration']
                    }
                    console.log('value of s-----', sumPercentageForStepDuration);
                    if (sumPercentageForStepDuration > 100) {
                        // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Overall Multistep Percentage can not be greater than 100.' }];
                        this.showErrorMsg('Overall Multistep Percentage can not be greater than 100.');
                        return;
                    }
                    let stepDuration = this.arrStepDuration[0]['duration'] + ',' + this.arrStepDuration[0]['percentage'];
                    for (let i = 1; i < this.arrStepDuration.length; i++) {
                        stepDuration = stepDuration + ';' + this.arrStepDuration[i]['duration'] + ',' + this.arrStepDuration[i]['percentage'];
                    }
                    console.log('value of s-----', stepDuration);
                    rowData["releaseScheduleValue"] = stepDuration;
                }
            }
            // console.log("value of rowData from manual release after",rowData);
            this.confirmationForManual = false;
            // this.blockUI.start();
            this.blockedDocument = true;
            this._syncPoint.unsubscribeReq();
            let url = '/DashboardServer/syncPoint/SyncPointService/releaseSyncPointData?user=' + user + '&productKey' + this.sessionService.session.cctx.pk;
            let jsonData = {
                'testRunNumber': this._syncPoint.testRun,
                'selectedBox': rowData,
            };
            console.log("value of json data in mannual release", jsonData);
            // let temp = this._cavApi.getDataFromRESTUsingPOSTReq(url, '', jsonData).subscribe(
            let temp = this._netHavocApi.getDataFromRESTUsingPOSTReq("releaseSyncPointData", "", jsonData, "/DashboardServer/syncPoint/SyncPointService/").subscribe(result => {
                if (result['success'] != undefined && result['success'] != '') {
                    // this.blockUI.stop();
                    this.blockedDocument = false;
                    this._syncPoint.getData();
                    // this.msgs = [{ severity: 'success', summary: 'Success Message', detail: result['success'] }];
                    this.showSucess(result['success']);
                    if (this._syncPoint.autoRefresh) {
                        this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                    }
                }
                else if (result['error'] != undefined && result['error'] != '') {
                    // this.blockUI.stop();
                    this.blockedDocument = false;
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: result['error'] }];
                    this.showErrorMsg(result['error']);
                    if (this._syncPoint.autoRefresh) {
                        this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
                    }
                }
                else {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Error in releasing SyncPoint.' }];
                    this.showErrorMsg('Error in releasing SyncPoint.');
                }
            }, error => {
                //this.log.error("Error in Releasing Data", error);
                temp.unsubscribe();
                // this.blockUI.stop();
                this.blockedDocument = false;
            }, () => {
                //this.log.debug("Sync Point Releases Sucessfully");
                temp.unsubscribe();
                // this.blockUI.stop();
                this.blockedDocument = false;
            });
        }
        catch (error) {
            console.error("error in ManualRelease()", error);
        }
    }
    /**Method call on Manual release if release mode is manual and user click on No */
    closeConfirmationDialog() {
        try {
            this.confirmationForManual = false;
        }
        catch (error) {
            console.error("Error in closeConfirmationDialog()", error);
        }
    }
    validateQty(event) {
        if (this.txtReleaseTargetVuser.length > 0 && this.txtReleaseTargetVuser.indexOf(",") != -1) {
            this.isShowFrequency = true;
        }
        else {
            this.isShowFrequency = false;
        }
        if ((event.charCode > 31 && event.charCode != 42) && ((event.charCode < 48 && event.charCode != 44) || event.charCode > 57))
            return false;
        return true;
    }
    /* shoew sucess */
    showSucess(message) {
        message = message.replace(/\\n/g, "\n");
        this.messageService.clear();
        this.messageService.add({ severity: 'success', summary: 'Service', detail: message });
        //this.msgs = [{ severity: 'success', summary: 'Success', detail: message }];
    }
    /**error */
    showErrorMsg(message) {
        if (message == "")
            return;
        message = message.replace(/\\n/g, "\n");
        this.messageService.clear();
        this.messageService.add({ severity: 'error', summary: 'Error', detail: message });
        //this.msgs = [{ severity: 'error', summary: 'Error', detail: message }];
    }
    /**warning */
    showWarning(message) {
        message = message.replace(/\\n/g, "\n");
        this.messageService.clear();
        this.messageService.add({ severity: 'warn', summary: 'Warning', detail: message });
        //this.msgs = [{ severity: 'warn', summary: 'Warning', detail: message }];
    }
    /**info */
    showInfo(message) {
        message = message.replace(/\\n/g, "\n");
        this.messageService.clear();
        this.messageService.add({ severity: 'info', summary: 'Info', detail: message });
        // this.msgs = [{ severity: 'info', summary: 'Info', detail: message }];
    }
    /**validation for addition and updation of sync point */
    validate() {
        try {
            // console.log('comming in validate()');
            let sumPercentageForStepDuration;
            let hh = 0;
            let mm = 0;
            let ss = 0;
            if (this.isShowStepDuration) {
                if (this.arrStepDuration.length == 0) {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Duration is mandatory.'}];
                    this.showErrorMsg('Multistep Duration is mandatory.');
                    return;
                }
                sumPercentageForStepDuration = 0;
                //  sumDurationForStepDuration = this.arrStepDuration[0]['duration'];
                for (let i = 0; i < this.arrStepDuration.length; i++) {
                    let pattern = new RegExp('([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])');
                    if (this.arrStepDuration[i]['duration'] == '00:00:00') {
                        // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Duration is mandatory (hh:mm:ss).' }];
                        this.showErrorMsg('Multistep Duration is mandatory (hh:mm:ss).');
                        return;
                    }
                    if (!pattern.test(this.arrStepDuration[i]['duration'])) {
                        // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Duration must be in HH:MM:SS format.' }];
                        this.showErrorMsg('Multistep Duration must be in HH:MM:SS format.');
                        return;
                    }
                    if (this.arrStepDuration[i]['percentage'] <= 0) {
                        // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Percentage is mandatory and should be greater than 0.' }];
                        this.showErrorMsg('Multistep Percentage is mandatory and should be greater than 0.');
                        return;
                    }
                    sumPercentageForStepDuration = sumPercentageForStepDuration + parseInt(this.arrStepDuration[i]['percentage']);
                    // sumDurationForStepDuration = sumDurationForStepDuration + this.arrStepDuration[i]['duration']
                }
                if (this.isShowFrequency) {
                    for (let i = 0; i < this.arrStepDuration.length; i++) {
                        let arrDuration = this.arrStepDuration[i]["duration"].split(":");
                        hh += Number.parseInt(arrDuration[0]);
                        mm += Number.parseInt(arrDuration[1]);
                        ss += Number.parseInt(arrDuration[2]);
                    }
                    mm += Number.parseInt(ss / 60 + "");
                    hh += Number.parseInt(mm / 60 + "");
                    mm = mm % 60;
                    ss = ss % 60;
                    let multiStepDurSum = hh + ":" + mm + ":" + ss;
                    console.log('value of s-dutauion----', multiStepDurSum);
                    let multiStepDurDate = new Date("1/1/1972 " + multiStepDurSum);
                    let freqeuncyDate = new Date("1/1/1972 " + this.frequency);
                    console.log('value of multiStepDurDate', multiStepDurDate);
                    console.log('value of multiStepDurDate', freqeuncyDate);
                    // if(freqeuncyDate < multiStepDurDate){
                    //   this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Overall Multistep Duration can not be greater than' + ' ' + this.frequency + '.'}];
                    //   return;
                    // }
                }
                console.log('value of s-----', sumPercentageForStepDuration);
                if (sumPercentageForStepDuration > 100) {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Overall Multistep Percentage can not be greater than 100.' }];
                    this.showErrorMsg('Overall Multistep Percentage can not be greater than 100.');
                    return;
                }
            }
            let lstOptTypeCommon = '';
            if (this.lstType == 'transList')
                lstOptTypeCommon = 'Transaction';
            else if (this.lstType == 'pageList')
                lstOptTypeCommon = 'Page';
            else if (this.lstType == 'Start Script')
                lstOptTypeCommon = 'Script';
            else if (this.lstType == 'syncList')
                lstOptTypeCommon = 'API';
            else
                lstOptTypeCommon = this.lstType;
            this.releaseUser = this.txtReleaseTargetVuser.split(',');
            /**Validation For Addition */
            if (this.appendSyncPointFlag == '0') {
                /**Validation for duplicate entry of SyncPoint */
                for (let i = 0; i < this.syncPointTableData.length; i++) {
                    if (this.lstGroupName == 'ALL') {
                        if (lstOptTypeCommon == this.syncPointTableData[i]['syncPointType'] && this.lstName == this.syncPointTableData[i]['syncPointName']) {
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'SyncPoint already Configured on Same Group ,Type and Name.' }];
                            this.showErrorMsg('SyncPoint already Configured on Same Group ,Type and Name.');
                            return false;
                        }
                    }
                    else {
                        if ((this.lstGroupName == this.syncPointTableData[i]['groupName'] || this.syncPointTableData[i]['groupName'] == 'ALL') && lstOptTypeCommon == this.syncPointTableData[i]['syncPointType'] && this.lstName == this.syncPointTableData[i]['syncPointName']) {
                            // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'SyncPoint already Configured on Same Group ,Type and Name.' }];
                            this.showErrorMsg('SyncPoint already Configured on Same Group ,Type and Name.');
                            return false;
                        }
                    }
                }
                if (this.lstType == 'Select Type') {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'SyncPoint type is mandatory.' }];
                    this.showErrorMsg('SyncPoint type is mandatory.');
                    return;
                }
                else if (this.lstName == 'Select Page' || this.lstName == 'Select Transaction' || this.lstName == 'Select Syncpoint' || this.lstName == 'Select Script') {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'SyncPoint name is mandatory.' }];
                    this.showErrorMsg('SyncPoint name is mandatory.');
                    return;
                }
                // common validation
                if (this.commonValidation() == false) {
                    return;
                }
                this.appendData();
                //  return;
            }
            /**validation For Updation */
            if (this.appendSyncPointFlag == '1') {
                if (this.lstActive == this.selectedBox['status'] && this.txtParticipatingVuser == this.selectedBox['participatingUser'] && this.txtReleaseTargetVuser == this.selectedBox['releaseUser']) {
                    // this.msgs = [{ severity: 'warn', summary: 'Error Message', detail: 'Fields are not Updated.' }];
                    this.showErrorMsg('Fields are not Updated.');
                    return;
                }
                //common validation
                if (this.commonValidation() == false) {
                    return;
                }
                this.appendData();
            }
        }
        catch (error) {
            console.log("Error in calling validate()", error);
        }
    }
    commonValidation() {
        try {
            /**Date and time validation */
            let timeZoneId = this._cavConfig.$timeZoneId;
            // console.log("value of timiezoneid",timeZoneId)
            let date = moment__WEBPACK_IMPORTED_MODULE_6__["tz"](Date.now(), timeZoneId).format('HH:mm:ss_MM/DD/YYYY');
            let curDate = date.split('_');
            let stDate = curDate[0];
            let stTime = curDate[1];
            /*converting date to format. */
            let absoluteDate;
            let currString;
            /**check a time */
            let pattern = new RegExp('([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])');
            if (this.isShowAbsolute) {
                absoluteDate = this.absoluteDate + ' ' + this.absoluteTime;
                currString = stDate + ' ' + stTime;
                if (new Date(absoluteDate) < new Date(currString)) {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Absolute date/time should be greater than Current date/time.' }];
                    this.showErrorMsg('Absolute date/time should be greater than Current date/time.');
                    return false;
                }
                if (!pattern.test(this.absoluteTime)) {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Absolute Time should be in "hh:mm:ss" format.' }];
                    this.showErrorMsg('Absolute Time should be in "hh:mm:ss" format.');
                    return false;
                }
            }
            if (this.isShowFrequency) {
                if (!pattern.test(this.frequency)) {
                    //  this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Duration must be in HH:MM:SS format for release next target VUser(s).'}];
                    this.showErrorMsg('Duration must be in HH:MM:SS format for release next target VUser(s).');
                    return false;
                }
            }
            if (this.isShowDuration) {
                if (this.frequency == "00:00:00") {
                    //  this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Duration is mandatory for release next target VUser(s).'}];
                    this.showErrorMsg('Duration is mandatory for release next target VUser(s).');
                    return false;
                }
            }
            if (this.isShowTimePeriod) {
                if (!pattern.test(this.timePeriod)) {
                    //  this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Period should be in "hh:mm:ss" format.' }];
                    this.showErrorMsg('Period should be in "hh:mm:ss" format.');
                    return false;
                }
            }
            if (this.isShowTimePeriod) {
                if (this.timePeriod == "00:00:00") {
                    //  this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Period is mandatory (hh:mm:ss).'}];
                    this.showErrorMsg('Period is mandatory (hh:mm:ss).');
                    return false;
                }
            }
            if (this.isShowDuration) {
                if (!pattern.test(this.duration)) {
                    //  this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Specified Duration should be in "hh:mm:ss" format.'}];
                    this.showErrorMsg('Specified Duration should be in "hh:mm:ss" format.');
                    return false;
                }
            }
            if (this.isShowDuration) {
                if (this.duration == "00:00:00") {
                    //  this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Specified Duration is mandatory (hh:mm:ss).'}];
                    this.showErrorMsg('Specified Duration is mandatory (hh:mm:ss).');
                    return false;
                }
            }
            if (this.isShowDuration && this.isShowFrequency) {
                if (this.duration > this.frequency) {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Specified Duration must be greater than ' + ' ' + this.frequency + '.'}];
                    this.showErrorMsg('Specified Duration must be greater than' + ' ' + this.frequency + '.');
                    return false;
                }
            }
            if (this.isShowRate) {
                if (this.rate <= 0) {
                    //  this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Rate is mandatory and should be greater than 0.' }];
                    this.showErrorMsg('Rate is mandatory and should be greater than 0.');
                    return false;
                }
            }
            /**Common Validation */
            if (this.txtParticipatingVuser == 0 || this.txtParticipatingVuser > 100) {
                // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Please enter participating users 1-100.' }];
                this.showErrorMsg('Please enter participating users 1-100.');
                return false;
            }
            if (this.txtReleaseTargetVuser == '') {
                // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Please enter Release Target users.' }];
                this.showErrorMsg('Please enter Release Target users.');
                return false;
            }
            if (this.releaseUser[0] == "*" || this.releaseUser[0] == "," || this.releaseUser[this.releaseUser.length - 1] == ",") {
                // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: '* or , can not be 1st entry for ReleaseUser.' }];
                this.showErrorMsg('* or , can not be 1st entry for ReleaseUser.');
                return false;
            }
            if (this.txtReleaseTargetVuser.indexOf('*') != -1) {
                if (this.txtReleaseTargetVuser.indexOf(',*') == -1) {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Invalid entry.' }];
                    this.showErrorMsg('Invalid entry.');
                    return false;
                }
                if (this.txtReleaseTargetVuser.substring(this.txtReleaseTargetVuser.length - 1, this.txtReleaseTargetVuser.length) != '*') {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Invalid entry.' }];
                    this.showErrorMsg('Invalid entry.');
                    return false;
                }
                let count = this.txtReleaseTargetVuser.split("*").length - 1;
                if (count != 1) {
                    // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'more than one * not supported.' }];
                    this.showErrorMsg('more than one * not supported.');
                    return false;
                }
            }
            if (this.lstGroupName != 'ALL') {
                for (let j = 0; j < this.releaseUser.length; j++) {
                    if (parseInt(this.releaseUser[j]) > parseInt(this.userArray[this.keyForReleaseUser])) {
                        // this.msgs = [{ severity: 'warn', summary: 'Warning Message', detail: 'Release Vusers can not be greater than users defined in Scenario i.e.' + this.userArray[this.keyForReleaseUser] }];
                        this.showErrorMsg('Release Vusers can not be greater than users defined in Scenario i.e.' + this.userArray[this.keyForReleaseUser]);
                        return false;
                    }
                    if (parseInt(this.releaseUser[j]) == 0 || (this.releaseUser[j] == '*' && j != this.releaseUser.length - 1) || this.releaseUser[j] == "") {
                        // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: "'Invalid entry for '. ( Use only Once, Can't be at first Position, Should be placed in the last Position.)" }];
                        this.showErrorMsg('Invalid entry for * Use only Once, Can not be at first Position Should be placed in the last Position.');
                        return false;
                    }
                }
            }
            else {
                for (let j = 0; j < this.releaseUser.length; j++) {
                    if (parseInt(this.releaseUser[j]) > parseInt(this.sum)) {
                        // this.msgs = [{ severity: 'warn', summary: 'Warning Message', detail: 'Release VUsers can not be greater than users defined in Scenario i.e.' + this.sum }];
                        this.showErrorMsg('Release VUsers can not be greater than users defined in Scenario i.e.' + this.sum);
                        return false;
                    }
                    if (parseInt(this.releaseUser[j]) == 0 || (this.releaseUser[j] == '*' && j != this.releaseUser.length - 1) || this.releaseUser[j] == "") {
                        // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: "'Invalid entry for '. ( Use only Once, Can't be at first Position, Should be placed in the last Position.)" }];
                        this.showErrorMsg('Invalid entry for *  Use only Once, Can not  be at first Position, Should be placed in the last Position.');
                        return false;
                    }
                }
            }
            return true;
        }
        catch (error) {
            //this.log.error("error in common validation", error);
        }
    }
    /**For Getting default Fields Value */
    getDefaultFields() {
        try {
            this.lstGroupName = 'ALL';
            this.lstType = 'pageList';
            this.lstName = 'Select Name';
            this.lstActive = '1';
            this.isEnableSyncPoint = true;
            this.releaseMode = '0';
            this.releaseModeCheckbox = false;
            this.releaseType = 'Target Vusers';
            this.releasePlan = 'Immediate';
            this.isShowAbsolute = false;
            this.isShowReleasedForcefully = false;
            this.isShowTimePeriod = false;
            this.isShowDuration = false;
            this.isShowRate = false;
            this.isDisableReleaseType = false;
            this.isShowReleaseType = true;
            this.isReleasedForcefully = false;
            this.duration = '00:01:00';
            this.timePeriod = '00:00:00';
            this.rate = 120;
            this.txtParticipatingVuser = 100;
            this.txtReleaseTargetVuser = '';
            this.releaseUser = [];
            this.scriptLabel = '';
            this.lstOptReleaseType = [];
            this.lstOptReleaseType.push({ 'label': 'on reaching Target VUsers', 'value': 'Target Vusers' });
            this.lstOptReleaseType.push({ 'label': 'at absolute time', 'value': 'Absolute Time' });
            this.lstOptReleaseType.push({ 'label': 'after duration', 'value': 'Period' });
            this.stepDuration = '00:00:00';
            this.stepPercentage = 0;
            this.arrStepDuration = [];
            this.showValue = false;
            this.isShowStepDuration = false;
            this.frequency = '00:15:00';
            this.disableTargetVuser = false;
        }
        catch (error) {
            //this.log.error("error in getting default values", error)
        }
    }
    // @ViewChild('tableReference')
    //   tableReferenceObj;
    onRowSelect($event) {
        try {
            this.runTimeHeadersData = [];
            let syncPointName = "";
            if (this.selectedBox['syncPointName'].indexOf('/') != -1) {
                let value = [];
                value = this.selectedBox['syncPointName'].split('/');
                syncPointName = value[2];
            }
            else {
                syncPointName = this.selectedBox['syncPointName'];
            }
            this.eventHeader = "(" + this.selectedBox['groupName'] + '/' + this.selectedBox['syncPointType'] + '/' + syncPointName + ")";
            this.selectionDataKey = this.selectedBox['groupName'] + '/' + this.selectedBox['syncPointType'] + '/' + this.selectedBox['syncPointName'];
            this._syncPoint.rowData = this.selectedBox;
            this.isEvent = false;
            this._syncPoint.eventDataFromLogFile();
            this.tableConfig.config.tableName = "SyncPoint History" + this.eventHeader;
        }
        catch (error) {
            //this.log.error("Error in onRowSelect()", error);
        }
    }
    onRowUnselect($event) {
        try {
            this.selectedBox = [];
            this.runTimeHeadersData = [];
            this.eventHeader = '';
        }
        catch (error) {
            //this.log.error("Error in onRowUnselect()", error);
        }
    }
    /**For Showing Add Dialogue of Sync Point */
    showDialogForAdd() {
        try {
            //  this.initialisingGroupData(this._syncPoint.groupDataResult);
            this.lstOptName = [];
            this.isDisableupdate = false;
            //this.log.debug('addSyncPoint called');
            this.showHideDialog = true;
            this.getDefaultFields();
            this.getSyncNameList();
            this.appendSyncPointFlag = '0';
            this.dialogHeader = "Add SyncPoint";
            // this.disableTargetVuser = false;
        }
        catch (error) {
            //this.log.error("error in adding sync point", error)
        }
    }
    /**for Showing  Update Dialogue of  sync point */
    showDialogForUpdate(rowData) {
        try {
            console.log("value of row data", rowData);
            this.isDisableupdate = true;
            //this.log.debug('updateSyncPoint called');
            this.dialogHeader = "Update SyncPoint";
            this.lstGroupName = rowData['groupName'];
            if (rowData['syncPointType'] == 'Transaction') {
                this.lstType = 'transList';
            }
            else if (rowData['syncPointType'] == 'Page') {
                this.lstType = 'pageList';
            }
            else if (rowData['syncPointType'] == 'API') {
                this.lstType = 'syncList';
            }
            else {
                this.lstType = 'Start Script';
            }
            this.getSyncNameList();
            let splitScript = [];
            let actualScriptName = '';
            if (this.lstType == 'Start Script') {
                this.lstOptName = [];
                for (let key in this.scriptArray) {
                    this.lstOptName.push({ 'label': this.scriptArray[key], 'value': this.scriptArray[key] });
                    splitScript = this.scriptArray[key].split("/");
                    actualScriptName = splitScript[2];
                    if (actualScriptName == rowData['syncPointName']) {
                        this.lstName = this.scriptArray[key];
                    }
                }
            }
            this.lstName = rowData['syncPointName'];
            if (rowData['status'] == "No") {
                this.lstActive = '0';
                this.isEnableSyncPoint = false;
                this.disableTargetVuser = false;
            }
            else {
                this.lstActive = '1';
                this.isEnableSyncPoint = true;
                this.disableTargetVuser = true;
            }
            let valuebeforedecimal = [];
            valuebeforedecimal = rowData['participatingUser'].split("%");
            this.txtParticipatingVuser = valuebeforedecimal[0];
            this.txtReleaseTargetVuser = rowData['releaseUser'];
            if (rowData['releaseMode'] == 'Manual') {
                this.releaseMode = "1";
                this.releaseModeCheckbox = true;
            }
            else {
                this.releaseMode = "0";
                this.releaseModeCheckbox = false;
            }
            if (this.releaseMode == "1") {
                this.isDisableReleaseType = true;
                this.isShowAbsolute = false;
                this.isShowReleasedForcefully = false;
                this.isShowTimePeriod = false;
                this.isShowReleaseType = false;
            }
            else {
                this.isDisableReleaseType = false;
                this.isShowReleaseType = true;
                if (rowData['releaseType'] != "-") {
                    this.releaseType = rowData['releaseType'];
                }
                console.log('value of releatse type', this.releaseType, this.lstOptReleaseType);
                if (this.releaseType == "Absolute Time") {
                    console.log('comming in if block of release type');
                    if (this.txtReleaseTargetVuser.length > 0 && this.txtReleaseTargetVuser.indexOf(",") != -1) {
                        this.isShowFrequency = true;
                        this.frequency = rowData['absFrequencyVal'];
                    }
                    else {
                        this.isShowFrequency = false;
                        this.frequency = '00:15:00';
                    }
                    this.isShowAbsolute = true;
                    this.isShowTimePeriod = false;
                    this.isShowReleasedForcefully = true;
                    this.checkBoxMsg = this.absoluteMsg;
                    let absoluteDateTime = [];
                    absoluteDateTime = rowData['releaseTypeValue'].split("-");
                    this.absoluteDate = moment__WEBPACK_IMPORTED_MODULE_6__(new Date(absoluteDateTime[0])).format('MM/DD/YYYY');
                    this.absoluteTime = absoluteDateTime[1];
                }
                else if (this.releaseType == "Period") {
                    this.isShowTimePeriod = true;
                    this.isShowAbsolute = false;
                    this.isShowReleasedForcefully = true;
                    this.checkBoxMsg = this.periodMsg;
                    this.timePeriod = rowData['releaseTypeValue'];
                }
                else {
                    this.isShowAbsolute = false;
                    this.isShowReleasedForcefully = false;
                    this.isShowTimePeriod = false;
                }
                if (rowData['checkBox'] == '0') {
                    this.isReleasedForcefully = false;
                }
                else {
                    this.isReleasedForcefully = true;
                }
            }
            this.releasePlan = "";
            this.releasePlan = rowData['releaseSchedule'];
            if (this.releasePlan == 'Rate') {
                this.isShowStepDuration = false;
                this.isShowRate = true;
                this.isShowDuration = false;
                // this.rate = 120;
                this.rate = rowData['releaseScheduleValue'];
            }
            else if (this.releasePlan == 'Multistep Duration') {
                this.isShowStepDuration = true;
                this.isShowRate = false;
                this.isShowDuration = false;
                this.showValue = true;
                this.arrStepDuration = rowData['multiStepDurationList'];
                this.stepDuration = '00:00:00';
                this.stepPercentage = 0;
                // this.rate = rowData['releaseScheduleValue'];
            }
            else if (this.releasePlan == 'Duration') {
                this.isShowStepDuration = false;
                this.isShowDuration = true;
                this.isShowRate = false;
                // this.duration = "00:01:00";
                this.duration = rowData['releaseScheduleValue'];
            }
            else {
                this.isShowRate = false;
                this.isShowDuration = false;
                this.isShowStepDuration = false;
            }
            // this.fillReleaseType();
            this.scriptLabel = rowData['scripts'];
            this.showHideDialog = true;
            this.appendSyncPointFlag = '1';
        }
        catch (error) {
            //this.log.error('error updateSyncPoint', error);
        }
    }
    /**Min Max for summary */
    minMaxforSummary() {
        try {
            console.log("comming of minmaxforsummary", this.isMax);
            if (this.isMax == '0') {
                this.checkForSummary = "min";
                this.isMax = '1';
                this.isShowResizeOperationSummary = false;
                this.summaryPaginationOptions = [5, 10, 15, 20, 40];
                this.summaryRows = '5';
                this.summaryScrollHeight = '155px';
                /**portion for handeling paginater of Group Table */
                if (this.syncPointTableData.length >= 5) {
                    this.isSummary = true;
                }
                else {
                    this.isSummary = false;
                }
                return;
            }
            else if (this.isMax == '1') {
                this.checkForSummary = 'max';
                this.isMax = '0';
                this.isShowResizeOperationSummary = true;
                this.summaryPaginationOptions = [20, 30, 40, 80];
                this.summaryRows = '20';
                this.summaryScrollHeight = '421px';
                /**portion for handeling paginater of Group Table */
                if (this.syncPointTableData.length >= 20) {
                    this.isSummary = true;
                }
                else {
                    this.isSummary = false;
                }
                return;
            }
        }
        catch (error) {
            //this.log.error("Error in Max/min in summary", error);
        }
    }
    minMaxforEvent() {
        try {
            if (this.isMaxEvent == '0') {
                this.checkForEvent = "min";
                this.isMaxEvent = '1';
                this.isMax = '1';
                this.isShowResizeOperationSummary = false;
                this.eventScrollHeight = '180px';
                /**portion for handeling paginater of eventLogData Table */
                if (this.runTimeHeadersData.length > 400) {
                    this.isEvent = true;
                }
                else {
                    this.isEvent = false;
                }
                return;
            }
            else if (this.isMaxEvent == '1') {
                this.checkForEvent = "max";
                this.isMaxEvent = '0';
                this.isMax = '2';
                this.isShowResizeOperationSummary = true;
                this.eventScrollHeight = '470px';
                /**portion for handeling paginater of eventLogData Table */
                if (this.runTimeHeadersData.length > 400) {
                    this.isEvent = true;
                }
                else {
                    this.isEvent = false;
                }
                return;
            }
        }
        catch (error) {
            //this.log.error("Error in Max/min in event", error);
        }
    }
    fillReleaseType() {
        try {
            if (this.txtReleaseTargetVuser.length > 0 && this.txtReleaseTargetVuser.indexOf(",") != -1) {
                this.releaseType = 'Target Vusers';
                this.isShowFrequency = true;
                //  this.lstOptReleaseType = [];
                //  this.lstOptReleaseType.push({'label': 'on reaching Target VUsers','value':'Target Vusers'});
                //  this.lstOptReleaseType.push({'label': 'after duration','value':'Period'});
            }
            else {
                this.releaseType = 'Target Vusers';
                this.isShowFrequency = false;
                //  this.lstOptReleaseType = [];
                //  this.lstOptReleaseType.push({'label': 'on reaching Target VUsers','value':'Target Vusers'});
                //  this.lstOptReleaseType.push({'label': 'at absolute time','value':'Absolute Time'});
                //  this.lstOptReleaseType.push({'label': 'after duration','value':'Period'});
                //  this.lstOptReleaseType.push({'label': 'Periodic','value':'Periodic'});
            }
        }
        catch (error) {
            console.error("error in filling Release Type", error);
        }
    }
    /**Method call on change of Release Mode */
    OnReleaseMode() {
        try {
            if (this.releaseModeCheckbox) {
                this.releaseMode = 1;
            }
            else {
                this.releaseMode = 0;
            }
            if (this.releaseMode == 1) {
                this.isDisableReleaseType = true;
                this.isShowAbsolute = false;
                this.isShowReleasedForcefully = false;
                this.isShowTimePeriod = false;
                this.isShowReleaseType = false;
            }
            else {
                this.isDisableReleaseType = false;
                this.isShowReleaseType = true;
                this.fillReleaseType();
            }
        }
        catch (error) {
            console.error("error in OnReleaseMode()", error);
        }
    }
    /**Method call on change of enable syncpoint */
    OnEnablesyncPoint() {
        try {
            if (this.isEnableSyncPoint) {
                this.lstActive = 1;
            }
            else {
                this.lstActive = 0;
            }
        }
        catch (error) {
            console.error("error in OnEnablesyncPoint()", error);
        }
    }
    /**Method call on change of Release Type */
    OnReleaseType() {
        try {
            if (this.releaseType == 'Absolute Time') {
                this.isShowAbsolute = true;
                let date = this.getCurrentDate();
                let curDate = date.split('_');
                this.absoluteTime = curDate[0];
                this.absoluteDate = curDate[1];
                this.isShowReleasedForcefully = true;
                this.checkBoxMsg = this.absoluteMsg;
                this.isShowTimePeriod = false;
                if (this.txtReleaseTargetVuser.length > 0 && this.txtReleaseTargetVuser.indexOf(",") != -1) {
                    this.isShowFrequency = true;
                    this.frequency = '00:15:00';
                }
                else {
                    this.isShowFrequency = false;
                }
            }
            else if (this.releaseType == 'Period') {
                this.isShowAbsolute = false;
                this.isShowReleasedForcefully = true;
                this.checkBoxMsg = this.periodMsg;
                this.isShowTimePeriod = true;
                this.timePeriod = '00:00:00';
                this.isShowFrequency = false;
            }
            else {
                this.isShowAbsolute = false;
                this.isShowReleasedForcefully = false;
                this.isShowTimePeriod = false;
                this.isShowFrequency = false;
            }
        }
        catch (error) {
            console.error("error in OnReleaseType()", error);
        }
    }
    /**Method call on change of Release Plan */
    OnReleasePlan() {
        try {
            this.duration = '00:01:00';
            this.rate = 120;
            if (this.releasePlan == 'Duration') {
                this.isShowStepDuration = false;
                this.isShowRate = false;
                this.isShowDuration = true;
                this.completeConfirmationMsg = "";
                this.completeConfirmationMsg = this.confirmationMsg + " " + "Within" + " " + this.duration + "?";
            }
            else if (this.releasePlan == 'Rate') {
                this.isShowStepDuration = false;
                this.isShowRate = true;
                this.isShowDuration = false;
                this.completeConfirmationMsg = "";
                this.completeConfirmationMsg = this.confirmationMsg + " " + "with" + " " + "Rate" + " " + this.rate + "/" + "Min?";
            }
            else if (this.releasePlan == 'Multistep Duration') {
                this.arrStepDuration = [];
                this.isShowStepDuration = true;
                this.isShowRate = false;
                this.isShowDuration = false;
                this.completeConfirmationMsg = "";
                this.completeConfirmationMsg = this.confirmationMsg + " " + "with" + " " + "Multistep Duration" + "?";
            }
            else {
                this.isShowStepDuration = false;
                this.isShowRate = false;
                this.isShowDuration = false;
                this.completeConfirmationMsg = "";
                this.completeConfirmationMsg = this.confirmationMsg + " " + 'Immediate?';
            }
        }
        catch (error) {
            console.error("error in OnReleaseType()", error);
        }
    }
    /**get a current date/time */
    getCurrentDate() {
        try {
            let timeZoneId = this._cavConfig.$timeZoneId;
            let date = moment__WEBPACK_IMPORTED_MODULE_6__["tz"](Date.now(), timeZoneId).format('HH:mm:ss_MM/DD/YYYY');
            console.log("curren date", date);
            return date;
        }
        catch (e) {
            console.error(e);
        }
    }
    /**function for number and colons  */
    isTimeCheck(event) {
        if ((parseInt(event.charCode) >= 48 && parseInt(event.charCode) <= 57) || ((parseInt(event.charCode) == 58))) {
            return true;
        }
        else {
            return false;
        }
    }
    ngOnDestroy() {
        //this.log.debug("inside ngondestroy from Sync Point main component");
    }
    downloadCSV(data) {
        for (let i = 0; i < data.value.length; i++) {
            data.value[i]['elapsedTime'] = "'" + data.value[i]['elapsedTime'] + "'";
            data.value[i]['absulteTime'] = "'" + data.value[i]['absulteTime'] + "'";
            data.value[i]['description'] = "'" + data.value[i]['description'] + "'";
        }
        data.exportCSV();
    }
    onCheckBox() {
        try {
            // console.log("comming in onCheckBox");
            if (this.isReleasedForcefully) {
                this.releasedValue = "1";
            }
            else {
                this.releasedValue = "0";
            }
        }
        catch (error) {
            console.error("error in click onCheckBox", error);
        }
    }
    forDynamicMessage(event) {
        try {
            // console.log("comming in forDynamicMessage");
            if (this.releasePlan == "Duration") {
                this.completeConfirmationMsg = "";
                this.completeConfirmationMsg = this.confirmationMsg + " " + "Within" + " " + this.duration + "?";
            }
            else if (this.releasePlan == "Rate") {
                this.completeConfirmationMsg = "";
                this.completeConfirmationMsg = this.confirmationMsg + " " + "with" + " " + "Rate" + " " + this.rate + "/" + "Min?";
            }
            else if (this.releasePlan == 'Multistep Duration') {
                this.completeConfirmationMsg = "";
                this.completeConfirmationMsg = this.confirmationMsg + " " + "with" + " " + "Step Duration" + "?";
            }
        }
        catch (error) {
            console.error("error in forDynamicMessage", error);
        }
    }
    addStepDuration() {
        try {
            console.log('comming in step duration', this.arrStepDuration);
            let pattern = new RegExp('([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])');
            if (this.stepDuration == '00:00:00') {
                // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Duration is mandatory (hh:mm:ss).'}];
                this.showErrorMsg('Multistep Duration is mandatory (hh:mm:ss).');
                return;
            }
            if (!pattern.test(this.stepDuration)) {
                // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Duration must be in HH:MM:SS format.'}];
                this.showErrorMsg('Multistep Duration must be in HH:MM:SS format.');
                return;
            }
            if (this.stepPercentage <= 0) {
                // this.msgs = [{ severity: 'error', summary: 'Error Message', detail: 'Multistep Percentage is mandatory and should be greater than 0.' }];
                this.showErrorMsg('Multistep Percentage is mandatory and should be greater than 0.');
                return;
            }
            let json = {
                'duration': this.stepDuration,
                'percentage': this.stepPercentage,
            };
            this.arrStepDuration.push(json);
            console.log('comming in step duration', this.arrStepDuration);
            // this.arrStepPercentage.push(this.stepPercentage);
            this.showValue = true;
            this.stepDuration = '00:00:00';
            this.stepPercentage = 0;
        }
        catch (error) {
            console.error("error in addStepDuration", error);
        }
    }
    updateStepDuration(index) {
        try {
            console.log('comming in step duration', index);
            console.log('value at index', this.arrStepDuration[index]['duration']);
            // this.arrStepDuration[index]['disabled'] = false;
        }
        catch (error) {
            console.error("error in updateStepDuration", error);
        }
    }
    deleteStepDuration(index) {
        try {
            console.log('comming in step duration', this.arrStepDuration);
            this.arrStepDuration.splice(index, 1);
            console.log('comming in step duration', this.arrStepDuration);
        }
        catch (error) {
            console.error("error in deleteStepDuration", error);
        }
    }
    trackByIndex(index, obj) {
        return index;
    }
    clickButtonEvent(event) {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
        console.log("Event: ", event);
        console.log("event?.cavEventExt?.actionConfig?: ", (_a = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _a === void 0 ? void 0 : _a.actionConfig);
        if (((_c = (_b = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _b === void 0 ? void 0 : _b.actionConfig) === null || _c === void 0 ? void 0 : _c.action) == 'onRowSelect') {
            this.selectedBox = (_d = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _d === void 0 ? void 0 : _d.row;
            this.onRowSelect((_e = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _e === void 0 ? void 0 : _e.row);
        }
        else if (((_g = (_f = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _f === void 0 ? void 0 : _f.actionConfig) === null || _g === void 0 ? void 0 : _g.action) == "onRowUnSelect") {
            this.onRowUnselect((_h = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _h === void 0 ? void 0 : _h.row);
        }
        if (((_k = (_j = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _j === void 0 ? void 0 : _j.actionConfig) === null || _k === void 0 ? void 0 : _k.action) == "edit") {
            this.showDialogForUpdate((_l = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _l === void 0 ? void 0 : _l.row);
        }
        if (((_o = (_m = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _m === void 0 ? void 0 : _m.actionConfig) === null || _o === void 0 ? void 0 : _o.action) == "add") {
            this.showDialogForAdd();
        }
        if (((_q = (_p = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _p === void 0 ? void 0 : _p.actionConfig) === null || _q === void 0 ? void 0 : _q.action) == "delete") {
            this.delSyncPoint((_r = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _r === void 0 ? void 0 : _r.row);
        }
        if (((_t = (_s = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _s === void 0 ? void 0 : _s.actionConfig) === null || _t === void 0 ? void 0 : _t.action) == "activate") {
            this.activate((_u = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _u === void 0 ? void 0 : _u.row);
        }
        if (((_w = (_v = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _v === void 0 ? void 0 : _v.actionConfig) === null || _w === void 0 ? void 0 : _w.action) == "deactivate") {
            this.deActivate((_x = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _x === void 0 ? void 0 : _x.row);
        }
        if (((_z = (_y = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _y === void 0 ? void 0 : _y.actionConfig) === null || _z === void 0 ? void 0 : _z.action) == "release") {
            this.release((_0 = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _0 === void 0 ? void 0 : _0.row);
        }
        if (((_2 = (_1 = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _1 === void 0 ? void 0 : _1.actionConfig) === null || _2 === void 0 ? void 0 : _2.action) == "") {
            this.release((_3 = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _3 === void 0 ? void 0 : _3.row);
        }
    }
};
SyncPointMainComponent.ctorParameters = () => [
    { type: src_app_pages_tools_configuration_nd_config_services_cav_config_service__WEBPACK_IMPORTED_MODULE_2__["CavConfigService"] },
    { type: _netocean_services_netocean_rest_api_service__WEBPACK_IMPORTED_MODULE_3__["NetoceanRestApi"] },
    { type: _netHavoc_services_nethavoc_rest_api_service__WEBPACK_IMPORTED_MODULE_9__["NetHavocRestApi"] },
    { type: primeng__WEBPACK_IMPORTED_MODULE_4__["ConfirmationService"] },
    { type: _services_sync_point_common_service__WEBPACK_IMPORTED_MODULE_5__["SyncPointCommonService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__["SessionService"] },
    { type: primeng_api__WEBPACK_IMPORTED_MODULE_8__["MessageService"] }
];
SyncPointMainComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-sync-point-main',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./sync-point-main.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./sync-point-main.component.scss */ "./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.component.scss")).default]
    })
], SyncPointMainComponent);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/components/sync-point-top-bar/sync-point-top-bar.component.scss":
/*!***********************************************************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/components/sync-point-top-bar/sync-point-top-bar.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/home/sync-point-gui/components/sync-point-top-bar/sync-point-top-bar.component.ts":
/*!*********************************************************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/components/sync-point-top-bar/sync-point-top-bar.component.ts ***!
  \*********************************************************************************************************/
/*! exports provided: SyncPointTopBar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyncPointTopBar", function() { return SyncPointTopBar; });
/* 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_sync_point_common_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/sync-point-common.service */ "./src/app/pages/home/sync-point-gui/services/sync-point-common.service.ts");
/* harmony import */ var src_app_pages_tools_configuration_nd_config_services_cav_config_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/pages/tools/configuration/nd-config/services/cav-config.service */ "./src/app/pages/tools/configuration/nd-config/services/cav-config.service.ts");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");



// import { Logger } from '../../../../../vendors/angular2-logger/core';
// import { CavConfigService } from '../../../../main/services/cav-config.service';

// import { CavCommonUtils } from '../../../../main/services/cav-common-utils.service'

let SyncPointTopBar = class SyncPointTopBar {
    /**constructor */
    constructor(_syncPoint, _cavConfig, sessionService) {
        this._syncPoint = _syncPoint;
        this._cavConfig = _cavConfig;
        this.sessionService = sessionService;
        // isonline = true;
        // refreashVal = [];
        this.dashboardtestRun = '-1';
        this.checkPermission();
    }
    /**Ng Oninit */
    ngOnInit() {
        try {
            /* If dashboard is opened then sync point opens with corresponding TR */
            this._syncPoint.autoRefresh = true;
            //  console.log("value of global array from  top",this._syncPoint.globalArray);
            console.log("value of global array first time from top-bar", this._syncPoint.globalArray);
            // console.log("value of test run from top bar",this._syncPoint.testRun)
            this._syncPoint.onLoad = true;
            this._syncPoint.ispending = true;
            if (sessionStorage.getItem('dashboardTestRun') != null) {
                this._syncPoint.dashboardtestRun = this.sessionService.session.testRun['id'];
                // console.log("this._syncPoint.dashboardtestRun- >>> ", this._syncPoint.dashboardtestRun);
                this._syncPoint.isDashboard = true;
            }
            else {
                this._syncPoint.isDashboard = false;
            }
            this.autoRefreshTimePeriod();
            this._syncPoint.firstTime = true;
            if (!this._syncPoint.autoRefresh) {
                this._syncPoint.getOverallSyncPointData();
            }
        }
        catch (error) {
            // this.log.error('érror in ngonint-- > ', error);
        }
    }
    checkPermission() {
        // let featurePermissionList = JSON.parse(sessionStorage.getItem('featurePermission'));
        // // console.log("value of feature permission list",featurePermissionList)
        // if(featurePermissionList['WebDashboard'][17] !== undefined || featurePermissionList['WebDashboard'][17] !== null){
        //   let value = featurePermissionList['WebDashboard'][17]['permission'];
        //   if(value > 4) {
        //     this._syncPoint.accessSyncPoint = true;
        //   }else {
        //     this._syncPoint.accessSyncPoint = false;
        //   }
        // }
        this._syncPoint.accessSyncPoint = true;
    }
    /**Auto refreshing a value */
    autoRefreshTimePeriod() {
        try {
            // console.log("value of auto refreshval",this._syncPoint.autorefreshval);
            this._syncPoint.timer = this._syncPoint.autorefreshval;
            if (this._syncPoint.autoRefresh) {
                this._syncPoint.dataRequestForNH(true, this._syncPoint.autorefreshval);
            }
            else {
                this._syncPoint.dataRequestForNH(false, 10 * 1000);
            }
        }
        catch (error) {
            // this.log.error('error in auto refreshing -- ', error);
        }
    }
    pageHelp() {
        try {
            let serialNumber = this._cavConfig.$serialNumberOfServer;
            let productname = "SyncPoint";
            let machineIP = this._cavConfig.$host;
            let machineInfo = { 'serialNumber': serialNumber, 'productName': productname, 'machineIP': machineIP };
            // this._commonUtils.post('https://www.cavisson.com/product-help', machineInfo, 'post')
        }
        catch (error) {
            console.error("error in opening Page help", error);
        }
    }
    ngOnDestroy() {
        // this.log.debug("inside ngondestroy from top bar");
        this._syncPoint.unsubscribeReq();
        // sessionStorage.setItem('isSyncPointFromTestRunUI', '2');
        //this.actSubscriber.unsubscribe();
    }
};
SyncPointTopBar.ctorParameters = () => [
    { type: _services_sync_point_common_service__WEBPACK_IMPORTED_MODULE_2__["SyncPointCommonService"] },
    { type: src_app_pages_tools_configuration_nd_config_services_cav_config_service__WEBPACK_IMPORTED_MODULE_3__["CavConfigService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_4__["SessionService"] }
];
SyncPointTopBar = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-sync-point-top-bar',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./sync-point-top-bar.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/sync-point-gui/components/sync-point-top-bar/sync-point-top-bar.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./sync-point-top-bar.component.scss */ "./src/app/pages/home/sync-point-gui/components/sync-point-top-bar/sync-point-top-bar.component.scss")).default]
    })
], SyncPointTopBar);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/container/Syn-point-gui-data-info.ts":
/*!********************************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/container/Syn-point-gui-data-info.ts ***!
  \********************************************************************************/
/*! exports provided: SyncPointGuiDataInfo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyncPointGuiDataInfo", function() { return SyncPointGuiDataInfo; });
class SyncPointGuiDataInfo {
}


/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/pipes/blinkingPipe.ts":
/*!*****************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/pipes/blinkingPipe.ts ***!
  \*****************************************************************/
/*! exports provided: blinkingPipe */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blinkingPipe", function() { return blinkingPipe; });
/* 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 blinkingPipe = class blinkingPipe {
    transform(actual, mode, status, releaseUser, currentUser) {
        let value = false;
        if (releaseUser.indexOf(',') != -1) {
            console.log("value of release User length", releaseUser);
            if (mode == 'Manual' && status == 'Yes') {
                let relaseUserArray = [];
                relaseUserArray = releaseUser.split(',');
                for (let i = 0; i < relaseUserArray.length; i++) {
                    if (relaseUserArray[i] == currentUser) {
                        value = true;
                    }
                    if (relaseUserArray[i] == '*') {
                        if (relaseUserArray[i - 1] == currentUser) {
                            value = true;
                        }
                    }
                }
            }
        }
        else {
            // console.log("value of mode",mode);
            // console.log("value of status",status);
            // console.log("value of releaseUser",releaseUser);
            // console.log("value of currentUser",currentUser);
            if (mode == "Manual" && status == "Yes" && releaseUser == currentUser) {
                value = true;
            }
            else {
                value = false;
            }
        }
        return value;
    }
};
blinkingPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({ name: "blinkingPipe" })
], blinkingPipe);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/pipes/messageOnTooltipPipe.ts":
/*!*************************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/pipes/messageOnTooltipPipe.ts ***!
  \*************************************************************************/
/*! exports provided: messageOnTooltipPipe */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "messageOnTooltipPipe", function() { return messageOnTooltipPipe; });
/* 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 messageOnTooltipPipe = class messageOnTooltipPipe {
    transform(value) {
        // For each argument
        let getValue = value;
        // console.log("comming in message pipe");
        if (value == "Target Reached") {
            // console.log("value of value",value)
            getValue = "Sync Point released due to release target reached";
            //   console.log("value of value",getValue) 
            return getValue;
        }
        else if (value == "Timeout [IATO]") {
            getValue = "Sync Point released due to inter Vuser arrival timeout";
            return getValue;
        }
        else if (value == "Period Completed") {
            getValue = "Sync Point released due to Period Completed";
            return getValue;
        }
        else if (value == "Absolute Time Completed") {
            getValue = "Sync Point released due to Absolute Time Completed";
            return getValue;
        }
        else if (value == "Timeout [OATO]") {
            getValue = " Sync Point released due to overall timeout";
            return getValue;
        }
        else if (value == "Test Completed") {
            getValue = "Sync Point released due to test is complete";
            return getValue;
        }
        else if (value.indexOf("By User") != -1) {
            getValue = "Sync Point released on request from user";
            return getValue;
        }
    }
};
messageOnTooltipPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({ name: "messageOnTooltipPipe" })
], messageOnTooltipPipe);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/pipes/participatingUserFormatPipe.ts":
/*!********************************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/pipes/participatingUserFormatPipe.ts ***!
  \********************************************************************************/
/*! exports provided: participatingUserFormatPipe */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "participatingUserFormatPipe", function() { return participatingUserFormatPipe; });
/* 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 participatingUserFormatPipe = class participatingUserFormatPipe {
    transform(value) {
        // For each argument
        let getValue = value;
        let value1 = '';
        let value2 = '';
        value1 = value.substring(0, value.length - 1);
        let arr = [];
        arr = value1.split('.');
        if (arr[1] == '00') {
            value2 = arr[0] + '%';
            return value2;
        }
        else {
            value2 = value;
            return value2;
        }
    }
};
participatingUserFormatPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({ name: "participatingUserFormatPipe" })
], participatingUserFormatPipe);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/pipes/stringFormatPipe.ts":
/*!*********************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/pipes/stringFormatPipe.ts ***!
  \*********************************************************************/
/*! exports provided: stringFormatPipe */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringFormatPipe", function() { return stringFormatPipe; });
/* 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 stringFormatPipe = class stringFormatPipe {
    transform(value) {
        // For each argument
        let getValue = value;
        if (value.indexOf('/') != -1) {
            if (value.indexOf(',') != -1) {
                let arrValue = [];
                let scriptValue = [];
                arrValue = value.split(',');
                // console.log("value for arrValue",arrValue)
                for (let i = 0; i < arrValue.length; i++) {
                    getValue = arrValue[i].split('/')[2];
                    scriptValue.push(getValue);
                    // console.log("value for scriptValue",scriptValue)
                }
                let value1 = '';
                value1 = scriptValue[0];
                for (let i = 1; i < scriptValue.length; i++) {
                    value1 = value1 + ',' + scriptValue[i];
                    let regex = new RegExp(',', 'g');
                    value1 = value1.replace(regex, '\n');
                    // console.log("value for scriptValue",value1)
                }
                return value1;
            }
            else {
                // console.log("coming in /")
                getValue = value.split('/')[2];
                return getValue;
            }
        }
        else {
            return getValue;
        }
    }
};
stringFormatPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({ name: "stringFormatPipe" })
], stringFormatPipe);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/pipes/timerPipe.ts":
/*!**************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/pipes/timerPipe.ts ***!
  \**************************************************************/
/*! exports provided: timerPipe */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timerPipe", function() { return timerPipe; });
/* 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 timerPipe = class timerPipe {
    transform(value) {
        // For each argument
        let getValue = value;
        if (value % 60 == 0) {
            let value1 = value / 60 + " " + 'min';
            return value1;
        }
        else {
            getValue = value + " " + 'sec';
            return getValue;
        }
    }
};
timerPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({ name: "timerPipe" })
], timerPipe);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/pipes/transform-release-target-vusers.pipe.ts":
/*!*****************************************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/pipes/transform-release-target-vusers.pipe.ts ***!
  \*****************************************************************************************/
/*! exports provided: TransformReleaseTargetVUsers */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransformReleaseTargetVUsers", function() { return TransformReleaseTargetVUsers; });
/* 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 TransformReleaseTargetVUsers = class TransformReleaseTargetVUsers {
    transform(value) {
        let val = value;
        val = val.replace(/,/g, ":");
        let arr = val.split(":");
        for (let i = 0; i < arr.length; i++) {
            let str = arr[i].split("");
            let start = str.length - 1;
            if (str[str.length - 1] == "*" && str[str.length - 2] == ",")
                start = str.length - 3;
            else if (str[str.length - 1] == "*")
                start = str.length - 2;
            let counter = 0;
            for (let j = start; j > 0; j--) {
                ++counter;
                if (counter == 3) {
                    str[j] = "," + str[j];
                    counter = 0;
                }
            }
            arr[i] = str.join("");
        }
        val = arr.join(":");
        return val;
    }
};
TransformReleaseTargetVUsers = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
        name: "transfromVuser"
    })
], TransformReleaseTargetVUsers);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/routes/sync-point-route.ts":
/*!**********************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/routes/sync-point-route.ts ***!
  \**********************************************************************/
/*! exports provided: SYNCPOINT_ROUTES */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYNCPOINT_ROUTES", function() { return SYNCPOINT_ROUTES; });
/* harmony import */ var _components_sync_point_main_sync_point_main_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/sync-point-main/sync-point-main.component */ "./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.component.ts");

const SYNCPOINT_ROUTES = [
    {
        path: '', component: _components_sync_point_main_sync_point_main_component__WEBPACK_IMPORTED_MODULE_0__["SyncPointMainComponent"],
    }
];


/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/services/sync-point-common.service.ts":
/*!*********************************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/services/sync-point-common.service.ts ***!
  \*********************************************************************************/
/*! exports provided: SyncPointCommonService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyncPointCommonService", function() { return SyncPointCommonService; });
/* 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_Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/Subject */ "./node_modules/rxjs-compat/_esm2015/Subject.js");
/* harmony import */ var src_app_pages_tools_configuration_nd_config_services_cav_config_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/pages/tools/configuration/nd-config/services/cav-config.service */ "./src/app/pages/tools/configuration/nd-config/services/cav-config.service.ts");
/* harmony import */ var _netocean_services_netocean_rest_api_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../netocean/services/netocean-rest-api.service */ "./src/app/pages/home/netocean/services/netocean-rest-api.service.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
/* harmony import */ var _container_Syn_point_gui_data_info__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../container/Syn-point-gui-data-info */ "./src/app/pages/home/sync-point-gui/container/Syn-point-gui-data-info.ts");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var _netHavoc_services_nethavoc_rest_api_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../netHavoc/services/nethavoc-rest-api.service */ "./src/app/pages/home/netHavoc/services/nethavoc-rest-api.service.ts");



// import { CavConfigService } from '../../../main/services/cav-config.service';



// import { Logger } from '../../../../vendors/angular2-logger/core';



let SyncPointCommonService = class SyncPointCommonService {
    constructor(_cavConfig, _cavApi, _netHavocApi, sessionService) {
        this._cavConfig = _cavConfig;
        this._cavApi = _cavApi;
        this._netHavocApi = _netHavocApi;
        this.sessionService = sessionService;
        /** action to identify call */
        this.action = '';
        /**Observable tier name string for middle component */
        this.syncPointInfo = new rxjs_Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
        /*Service Observable for getting Tier name*/
        this.syncPointProvider$ = this.syncPointInfo.asObservable();
        /**Observable tier name string for middle component */
        this.syncPointEventLog = new rxjs_Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
        /*Service Observable for getting Tier name*/
        this.syncPointEventDataProvider$ = this.syncPointEventLog.asObservable();
        this.rowData = [];
        this.accessSyncPoint = false;
        this.isDashboard = false;
        this.dashboardtestRun = '';
        this.onLoad = false;
        this.noTestRun = '';
        this.group = "";
        this.type = "";
        this.name = "";
        this.progressInterval = "";
        this.firstTime = false;
        this.ispending = true;
        this.isLoading = false;
        this.defaultValue();
    }
    // summaryDetails = [];
    defaultValue() {
        try {
            // this.testRun = '';
            this.startTime = '';
            this.duration = '';
            this.scenario = '';
            this.groupDataResult = [];
            this.timer = 60 * 1000;
            this.dataRefreshTimer = null;
            this.autoRefresh = true;
            this.globalArray = [];
            this.mode = '';
            this.index = 0;
            this.isEnable = true;
            this.key = -1;
        }
        catch (error) {
            // //this.log.error("error in initialising default fields", error)
        }
    }
    /**First call which bring Test run data,scenario data, summary table data,event log data
     * we call this on auto refresh also
     */
    getOverallSyncPointData() {
        try {
            console.log("comming in get overall ----------");
            this.startProg();
            let user = this.sessionService.session.cctx.u;
            // console.log("comming in getOverallSyncPointData---");
            if (sessionStorage.getItem('isSyncPointFromTestRunUI') == '0') {
                console.log("comming in isSyncPointFromTestRunUI==0---");
                this.testRun = sessionStorage.getItem('SyncPointTestRun');
                // console.log("comming in isSyncPointFromTestRunUI==0--- testrun",this.testRun);
                this.duration = sessionStorage.getItem('SyncPointTestRunDuration');
                this.startTime = sessionStorage.getItem('SyncPointTestRunstartTime');
                let mode = '';
                mode = sessionStorage.getItem('SyncPointTestRunmode');
                if (mode == 'RU') {
                    this.mode = 'online';
                }
                else {
                    this.mode = 'offline';
                }
            }
            else if (sessionStorage.getItem('isSyncPointFromTestRunUI') == '1' || sessionStorage.getItem('isSyncPointFromTestRunUI') == '2') {
                console.log("comming in isSyncPointFromTestRunUI==1or2", this.testRun);
                if (this.isDashboard) {
                    console.log("comming in isSyncPointFromTestRunUI==1or2", this.isDashboard);
                    this.testRun = this.dashboardtestRun;
                    console.log("comming in isSyncPointFromTestRunUI==1or2", this.testRun);
                }
                // else
                // {
                //   this.testRun = '';
                // }
            }
            let mode = "";
            // console.log('before  onload this.testRun',this.onLoad)
            if (this.onLoad) {
                if (this.globalArray != undefined && this.globalArray.length != 0) {
                    // console.log(' onload this.testRun',this.testRun)
                    console.log('test run at global aaray ', this.globalArray[0]['testRn']);
                    if (this.testRun == this.globalArray[0]['testRn']) {
                        this.group = this.globalArray[0]['group'];
                        this.type = this.globalArray[0]['type'];
                        this.name = this.globalArray[0]['name'];
                        mode = this.globalArray[0]['mode'];
                    }
                    else {
                        this.globalArray = [];
                        this.group = "";
                        this.type = "";
                        this.name = "";
                        mode = '';
                        // this.testRun = '';
                    }
                }
                else {
                    this.group = "";
                    this.type = "";
                    this.name = "";
                    mode = '';
                    // this.testRun = '';
                }
            }
            else {
                // console.log('value of rowdata',this.rowData)
                this.group = this.rowData['groupName'];
                this.type = this.rowData['syncPointType'];
                this.name = this.rowData['syncPointName'];
                mode = this.mode;
            }
            this.fetchingIndexValue(); // it will fetch the value of index correspondence to the syncPoint
            if (this.testRun == undefined) {
                this.testRun = '';
            }
            console.log("value of group type name index test run  before get overall call", this.group, this.type, this.name, this.index, this.testRun);
            // this.index = 0;
            let ip = 'getOverallSyncPointData?testrun=' + this.sessionService.session.testRun.id + '&index=' + this.index + '&grpName=' + this.group + '&syncPointType=' + this.type + '&syncPointName=' + this.name + '&mode=' + mode + '&productKey=' + this.sessionService.session.cctx.pk;
            let temp = this._netHavocApi.getDataByRestAPI(ip, '/DashboardServer/syncPoint/SyncPointService/').subscribe(
            //   let ip = '/DashboardServer/syncPoint/SyncPointService/getOverallSyncPointData?testrun=' + this.sessionService.session.testRun.id + '&index=' + this.index + '&grpName='+ this.group +'&syncPointType=' + this.type + '&syncPointName=' + this.name + '&mode=' + mode + '&user=' + user + '&productKey=' + this.sessionService.session.cctx.pk;
            // let temp = this._cavApi.getDataByRESTAPI(ip, '').subscribe(
            result => {
                console.log("value of getOverallSyncPointData data", result);
                this.ispending = true;
                let Tr = result['details']['testRun'];
                console.log("value of Tr", Tr);
                console.log("value of result", result);
                if (Tr != -1 && result != "" && result != undefined) {
                    this.noTestRun = 'false';
                    this.action = '';
                    this.testRun = result['details']['testRun'];
                    this.duration = result['details']['duration'];
                    this.startTime = result['details']['startTime'];
                    this.mode = result['details']['mode'];
                    this.isEnable = result['isEnabledSyncPoint'];
                    this.autorefreshval = result['progressInterval'];
                    if (this.autorefreshval < 10000) {
                        this.autorefreshval = 10000;
                    }
                    // this.autorefreshval = 600000;
                    if (this.mode == 'offline') {
                        this.unsubscribeReq();
                    }
                    if (result['getGroupData'] != undefined && result['getGroupData'] != '')
                        this.scenario = result['getGroupData']['Scenario'];
                    else
                        this.scenario = '';
                    console.log("value of scenario name ---->", this.scenario);
                    if (!this.isEnable) {
                        console.log("value  of is enable", this.isEnable);
                        this.destroyProg();
                        return;
                    }
                    // this.scenario = result['getGroupData']['Scenario'];
                    if (result['getGroupData'] != undefined && result['getGroupData'] != '') {
                        this.groupDataResult = result['getGroupData'];
                    }
                    if (result['groupOverallInfo'] != undefined && result['groupOverallInfo'] != '') {
                        this.syncPointInfo.next(result['groupOverallInfo']['records']);
                    }
                    else {
                        let result = [];
                        this.syncPointInfo.next(result);
                    }
                    if (this.firstTime) {
                        this.unsubscribeReq();
                        this.clearAndInitializeRefreshInterval(this.autorefreshval);
                        this.firstTime = false;
                    }
                    if (result['summary'] != '' && result['summary'] != undefined)
                        this.StoringToGlobalArray(result['summary']);
                    // this.syncPointEventLog.next(result['summary']);
                    this.onLoad = false;
                }
                else {
                    this.destroyProg();
                    this.unsubscribeReq();
                    console.log("coming in else value of noTestrun", this.noTestRun);
                    this.noTestRun = 'true';
                    alert("Test Run not found!");
                }
                temp.unsubscribe();
                this.destroyProg();
            }, error => {
                console.log("comming in error");
                this.destroyProg();
                //this.log.error('error in getting group data', error);
                temp.unsubscribe();
            }, () => {
                console.log("comming in promise");
                this.destroyProg();
                temp.unsubscribe();
            });
        }
        catch (error) {
            this.destroyProg();
            //this.log.error("error in getOverallSyncPointData()", error);
        }
    }
    /**call For bringing Summary table Data */
    getData() {
        try {
            //this.log.debug(' in getDataFrogetDatamReport() method');
            let user = sessionStorage.getItem('sesLoginName');
            let ip = 'syncPointDetailsData?testRunNum=' + this.testRun;
            let temp = this._netHavocApi.getDataByRestAPI(ip, '/DashboardServer/syncPoint/SyncPointService/').subscribe(result => {
                // console.log("value of summary report",result)
                if (result != '' && result != undefined) {
                    this.action = "GETDATA";
                    // this.destroyProg();
                    temp.unsubscribe();
                    // this.summaryDetails = result['records'];
                    // console.log("value of summary detais from getData",this.summaryDetails)
                    this.syncPointInfo.next(result['records']);
                }
                else {
                    this.destroyProg();
                    alert('error in getting summary report data');
                }
            }, error => {
                //this.log.error('error in getting data from summary report', error);
                temp.unsubscribe();
            }, () => {
                //this.log.debug('Data Deliverd Sucessfully for summary report.');
                temp.unsubscribe();
            });
        }
        catch (error) {
            //this.log.error('error in getData()');
        }
    }
    /**Call For Bringing Event Logs */
    eventDataFromLogFile() {
        try {
            //this.log.debug(' in getDataFrogetDatamReport() method');
            this.startProg();
            let user = sessionStorage.getItem('sesLoginName');
            this.group = this.rowData['groupName'];
            this.type = this.rowData['syncPointType'];
            this.name = this.rowData['syncPointName'];
            this.fetchingIndexValue();
            // this.index = 0;
            // this.testRun = '1820';
            this.isLoading = true;
            console.log("value of group type name index test run  before event data log", this.group, this.type, this.name, this.index, this.testRun);
            let ip = 'getEventLogData?testRunNum=' + this.testRun + '&index=' + this.index + '&group=' + this.group + '&type=' + this.type + '&name=' + this.name + '&testStartDate=' + this.startTime + '&mode=' + this.mode;
            let temp = this._netHavocApi.getDataByRestAPI(ip, '/DashboardServer/syncPoint/SyncPointService/').subscribe(result => {
                // console.log("value of event",result)
                if (result != '' && result != undefined) {
                    this.action = "GETEVENTDATA";
                    temp.unsubscribe();
                    this.StoringToGlobalArray(result['summary']);
                    // this.syncPointEventLog.next(result['summary']);
                }
                else {
                    this.destroyProg();
                }
                this.isLoading = false;
            }, error => {
                this.destroyProg();
                temp.unsubscribe();
                this.isLoading = false;
            }, () => {
                //this.log.debug('Data Deliverd Sucessfully for summary report.');
                this.destroyProg();
                temp.unsubscribe();
            });
        }
        catch (error) {
            this.destroyProg();
            this.isLoading = false;
            //this.log.error('error in eventDataFromLogFile()');
        }
    }
    /**data request for the NH */
    dataRequestForNH(val, refreshInterval) {
        try {
            if (val) {
                this.unsubscribeReq();
                this.clearAndInitializeRefreshInterval(refreshInterval);
            }
            else {
                this.unsubscribeReq();
            }
        }
        catch (error) {
            //this.log.error('data request for the nethavoc -- > ', error);
        }
    }
    /**unsubscribe a request */
    unsubscribeReq() {
        try {
            console.log("comming in unsubscribe");
            if (this.dataUpdateSubscription !== null && this.dataUpdateSubscription !== undefined) {
                this.dataUpdateSubscription.unsubscribe();
            }
        }
        catch (error) {
            //this.log.error('error in unsubscriber === ', error);
        }
    }
    /* Method to clear and initialize the refresh interval.*/
    clearAndInitializeRefreshInterval(refreshInterval) {
        try {
            this.clearSubscriber();
            if (refreshInterval === null || refreshInterval === undefined) {
                console.log("value of refreshInterval if null", refreshInterval);
                refreshInterval = 10000; //  10 seconds 
            }
            console.log("value of refreshInterval", refreshInterval);
            this.dataRefreshTimer = rxjs__WEBPACK_IMPORTED_MODULE_5__["Observable"].timer(0, refreshInterval);
            this.dataUpdateSubscription = this.dataRefreshTimer.subscribe(timer => {
                console.log("value of this.dataRefreshTimer", this.ispending);
                if (this.ispending) {
                    this.ispending = false;
                    this.getOverallSyncPointData();
                }
            }, error => {
                this.dataUpdateSubscription.unsubscribe();
            }, () => {
                this.dataUpdateSubscription.unsubscribe();
            });
        }
        catch (e) {
            //this.log.error('exception in clearAndInitializeProgressInterval ', e);
        }
    }
    /**For fetching index value  */
    fetchingIndexValue() {
        try {
            console.log("commng in fetchingIndexValue");
            if (this.globalArray.length == 0) {
                console.log("comming in if global aray length =0 ", this.globalArray.length);
                this.index = 0;
                this.key = -1;
            }
            else {
                console.log("comming in else block global array length != 0", this.globalArray.length);
                let isvalue = false;
                console.log("value of global array from fetching before for loop", this.globalArray);
                for (let i = 0; i < this.globalArray.length; i++) {
                    if (this.globalArray[i]['group'] == this.group && this.globalArray[i]['type'] == this.type && this.globalArray[i]['name'] == this.name) {
                        this.index = this.globalArray[i]['indexValue'] + 1;
                        this.key = i;
                        isvalue = true;
                        break;
                    }
                }
                if (!isvalue) {
                    this.index = 0;
                    this.key = -1;
                }
                // console.log("value of isvalue",isvalue)
                // console.log("value of index",this.index)    
            }
        }
        catch (error) {
            console.error("error in fetchingIndexValue", error);
        }
    }
    /**storing value to global array only events */
    StoringToGlobalArray(events) {
        try {
            let syncPointObj = new _container_Syn_point_gui_data_info__WEBPACK_IMPORTED_MODULE_6__["SyncPointGuiDataInfo"]();
            console.log("comming in storing to global array StoringToGlobal");
            if (this.group == '' && this.type == '' && this.name == '' && this.globalArray.length == 0) // very first call 
             {
                console.log("comming inside if where group type name is blank");
                let type = '';
                let index;
                if (events['index'] < 0) {
                    index = 0;
                }
                else {
                    index = events['index'];
                }
                syncPointObj.indexValue = index;
                syncPointObj.group = events['groupName'];
                syncPointObj.name = events['name'];
                syncPointObj.testRn = this.testRun;
                type = events['synType'];
                syncPointObj.type = this.returnType(type);
                syncPointObj.eventData = events['eventLog'];
                syncPointObj.mode = this.mode;
                this.globalArray.push(syncPointObj);
                this.syncPointEventLog.next(events['eventLog']);
                console.log("comming inside if where group type name is blank global array==>", this.globalArray);
            }
            else {
                console.log("comming inside else where group type name is not blank", this.group);
                let type12;
                type12 = this.returnType(events['synType']);
                // if syncPoint group type name is equal to event 
                if (this.group == events['groupName'] && this.type == type12 && this.name == events['name']) {
                    console.log("event match with group");
                    if (this.globalArray.length == 0) {
                        console.log("comming in if global aray length =0 in 2n else ", this.globalArray.length);
                        // this.index = 0;
                        this.key = -1;
                    }
                    else {
                        // console.log("comming in else block global array length != 0",this.globalArray.length);
                        let isvalue = false;
                        // console.log("value of global array from fetching before for loop",this.globalArray);
                        for (let i = 0; i < this.globalArray.length; i++) {
                            if (this.globalArray[i]['group'] == this.group && this.globalArray[i]['type'] == this.type && this.globalArray[i]['name'] == this.name) {
                                // this.index = this.globalArray[i]['indexValue'] + 1;
                                this.key = i;
                                isvalue = true;
                                break;
                            }
                        }
                        if (!isvalue) {
                            // this.index = 0;
                            this.key = -1;
                        }
                        // console.log("value of isvalue",isvalue)
                        // console.log("value of index",this.index)    
                    }
                    //common code
                    if (this.key == -1) // value comming for first time 
                     {
                        console.log("coing if key==-1 StoringToGlobalArrayOnlyEvents", this.globalArray);
                        let type = '';
                        let index;
                        if (events['index'] < 0) {
                            index = 0;
                        }
                        else {
                            index = events['index'];
                        }
                        syncPointObj.indexValue = index;
                        syncPointObj.group = events['groupName'];
                        syncPointObj.name = events['name'];
                        syncPointObj.testRn = this.testRun;
                        type = events['synType'];
                        syncPointObj.type = this.returnType(type);
                        syncPointObj.eventData = events['eventLog'];
                        syncPointObj.mode = this.mode;
                        this.globalArray.push(syncPointObj);
                        this.syncPointEventLog.next(events['eventLog']);
                        console.log("value of key ==-1 and syncpoint match global array", this.globalArray);
                    }
                    else {
                        console.log("value of key not equal to -1 and syncpoint match", this.key, this.group);
                        let existData = [];
                        existData = this.globalArray[this.key]['eventData'];
                        if (events['index'] == this.globalArray[this.key]['indexValue']) {
                            console.log('index match in case of syncpoint match');
                            this.syncPointEventLog.next(existData);
                            return;
                        }
                        else {
                            // console.log("exist data StoringToGlobalArrayOnlyEvents",existData);
                            let newData = [];
                            newData = events['eventLog'];
                            if (newData.length != 0) {
                                console.log("new data", newData);
                                let mergeData = [];
                                mergeData = [...existData, ...newData];
                                console.log("merge data", mergeData);
                                this.globalArray[this.key]['eventData'] = mergeData;
                                console.log("value of global array after merging data StoringToGlobalArrayOnlyEvents", this.globalArray);
                                this.syncPointEventLog.next(mergeData);
                            }
                            else {
                                console.log("getting blank data StoringToGlobalArrayOnlyEvents");
                                this.syncPointEventLog.next(this.globalArray[this.key]['eventData']);
                            }
                            let index;
                            if (events['index'] < 0) {
                                index = 0;
                            }
                            else {
                                index = events['index'];
                            }
                            this.globalArray[this.key]['indexValue'] = index;
                        }
                    }
                }
                // if syncpoint group type name is not equal to the event
                else {
                    // currently i am not storing the data just broadcasting the selected row data
                    console.log("commiing if condition not match", this.group);
                    let isvalue = false;
                    console.log("value of global array from fetching before for loop", this.globalArray);
                    for (let i = 0; i < this.globalArray.length; i++) {
                        if (this.globalArray[i]['group'] == this.group && this.globalArray[i]['type'] == this.type && this.globalArray[i]['name'] == this.name) {
                            // this.index = this.globalArray[i]['indexValue'] + 1;
                            this.key = i;
                            isvalue = true;
                            break;
                        }
                    }
                    if (!isvalue) {
                        // this.index = 0;
                        this.key = -1;
                    }
                    // console.log("value of isvalue",isvalue)
                    // console.log("value of index",this.index)   
                    if (this.key == -1) {
                        console.log('value of event in miss match -1 case ', events, this.group);
                        let type = '';
                        let index;
                        if (events['index'] < 0) {
                            index = 0;
                        }
                        else {
                            index = events['index'];
                        }
                        syncPointObj.indexValue = index;
                        syncPointObj.group = events['groupName'];
                        syncPointObj.name = events['name'];
                        syncPointObj.testRn = this.testRun;
                        type = events['synType'];
                        syncPointObj.type = this.returnType(type);
                        syncPointObj.eventData = events['eventLog'];
                        syncPointObj.mode = this.mode;
                        this.globalArray.push(syncPointObj);
                        this.syncPointEventLog.next(events['eventLog']);
                    }
                    else {
                        console.log('mismatch key is not -1', this.globalArray[this.key]['eventData']);
                        this.syncPointEventLog.next(this.globalArray[this.key]['eventData']);
                    }
                }
            }
            console.log("value of global array at the last StoringToGlobalArrayOnlyEvents", this.globalArray);
        }
        catch (error) {
            console.error("error in storing value to global array", error);
        }
    }
    /** for converting Type from start Page to Page  */
    returnType(type) {
        try {
            if (type == 'Start Page') {
                type = 'Page';
            }
            else if (type == 'Start Transaction') {
                type = 'Transaction';
            }
            else if (type == 'Start Script') {
                type = 'Script';
            }
            else {
                type = 'API';
            }
            return type;
        }
        catch (error) {
            console.error("error in return type", error);
        }
    }
    /**clear a subscribe */
    clearSubscriber() {
        try {
            if (this.dataUpdateSubscription !== null && this.dataUpdateSubscription !== undefined) {
                this.dataUpdateSubscription.unsubscribe();
            }
            if (this.dataRefreshTimer !== null && this.dataRefreshTimer !== undefined) {
                this.dataRefreshTimer.unsubscribe();
            }
        }
        catch (error) {
            //this.log.error('error in clearing a subscriber', error);
        }
    }
    startProg() {
        // this.ngProgress.start();
    }
    destroyProg() {
        // this.ngProgress.complete();
    }
};
SyncPointCommonService.ctorParameters = () => [
    { type: src_app_pages_tools_configuration_nd_config_services_cav_config_service__WEBPACK_IMPORTED_MODULE_3__["CavConfigService"] },
    { type: _netocean_services_netocean_rest_api_service__WEBPACK_IMPORTED_MODULE_4__["NetoceanRestApi"] },
    { type: _netHavoc_services_nethavoc_rest_api_service__WEBPACK_IMPORTED_MODULE_8__["NetHavocRestApi"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_7__["SessionService"] }
];
SyncPointCommonService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])()
], SyncPointCommonService);



/***/ }),

/***/ "./src/app/pages/home/sync-point-gui/sync-point.module.ts":
/*!****************************************************************!*\
  !*** ./src/app/pages/home/sync-point-gui/sync-point.module.ts ***!
  \****************************************************************/
/*! exports provided: SyncPointModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyncPointModule", function() { return SyncPointModule; });
/* 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_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var _routes_sync_point_route__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./routes/sync-point-route */ "./src/app/pages/home/sync-point-gui/routes/sync-point-route.ts");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
/* harmony import */ var angular2_highcharts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! angular2-highcharts */ "./node_modules/angular2-highcharts/__ivy_ngcc__/index.js");
/* harmony import */ var angular2_highcharts__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(angular2_highcharts__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _components_sync_point_main_sync_point_main_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/sync-point-main/sync-point-main.component */ "./src/app/pages/home/sync-point-gui/components/sync-point-main/sync-point-main.component.ts");
/* harmony import */ var _components_sync_point_top_bar_sync_point_top_bar_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/sync-point-top-bar/sync-point-top-bar.component */ "./src/app/pages/home/sync-point-gui/components/sync-point-top-bar/sync-point-top-bar.component.ts");
/* harmony import */ var _services_sync_point_common_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./services/sync-point-common.service */ "./src/app/pages/home/sync-point-gui/services/sync-point-common.service.ts");
/* harmony import */ var _angular_material_progress_bar__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/material/progress-bar */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/progress-bar.js");
/* harmony import */ var _angular_material_icon__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/icon */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/icon.js");
/* harmony import */ var _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/material/sidenav */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/sidenav.js");
/* harmony import */ var _angular_material_select__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/material/select */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/select.js");
/* harmony import */ var _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/material/toolbar */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/toolbar.js");
/* harmony import */ var _angular_material_tabs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/material/tabs */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/tabs.js");
/* harmony import */ var _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @angular/material/checkbox */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/checkbox.js");
/* harmony import */ var _angular_material_menu__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @angular/material/menu */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/menu.js");
/* harmony import */ var primeng_fieldset__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! primeng/fieldset */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-fieldset.js");
/* harmony import */ var primeng_radiobutton__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! primeng/radiobutton */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-radiobutton.js");
/* harmony import */ var primeng_listbox__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! primeng/listbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-listbox.js");
/* harmony import */ var primeng_dropdown__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
/* harmony import */ var primeng_multiselect__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! primeng/multiselect */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
/* harmony import */ var primeng_panel__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! primeng/panel */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-panel.js");
/* harmony import */ var primeng_toast__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! primeng/toast */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toast.js");
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js");
/* harmony import */ var primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! primeng/confirmdialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-confirmdialog.js");
/* harmony import */ var _pipes_stringFormatPipe__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./pipes/stringFormatPipe */ "./src/app/pages/home/sync-point-gui/pipes/stringFormatPipe.ts");
/* harmony import */ var _pipes_messageOnTooltipPipe__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./pipes/messageOnTooltipPipe */ "./src/app/pages/home/sync-point-gui/pipes/messageOnTooltipPipe.ts");
/* harmony import */ var _pipes_transform_release_target_vusers_pipe__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./pipes/transform-release-target-vusers.pipe */ "./src/app/pages/home/sync-point-gui/pipes/transform-release-target-vusers.pipe.ts");
/* harmony import */ var _pipes_timerPipe__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./pipes/timerPipe */ "./src/app/pages/home/sync-point-gui/pipes/timerPipe.ts");
/* harmony import */ var _pipes_participatingUserFormatPipe__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./pipes/participatingUserFormatPipe */ "./src/app/pages/home/sync-point-gui/pipes/participatingUserFormatPipe.ts");
/* harmony import */ var _pipes_blinkingPipe__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./pipes/blinkingPipe */ "./src/app/pages/home/sync-point-gui/pipes/blinkingPipe.ts");
/* harmony import */ var _netocean_services_netocean_rest_api_service__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../netocean/services/netocean-rest-api.service */ "./src/app/pages/home/netocean/services/netocean-rest-api.service.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! src/app/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_38__ = __webpack_require__(/*! src/app/shared/help/help.module */ "./src/app/shared/help/help.module.ts");














/*Material Modules*/


















// import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
// import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar';









// const PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
//   suppressScrollX: true
// };
let SyncPointModule = class SyncPointModule {
    constructor() { }
};
SyncPointModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [
            _components_sync_point_main_sync_point_main_component__WEBPACK_IMPORTED_MODULE_10__["SyncPointMainComponent"],
            _components_sync_point_top_bar_sync_point_top_bar_component__WEBPACK_IMPORTED_MODULE_11__["SyncPointTopBar"],
            _pipes_stringFormatPipe__WEBPACK_IMPORTED_MODULE_30__["stringFormatPipe"],
            _pipes_messageOnTooltipPipe__WEBPACK_IMPORTED_MODULE_31__["messageOnTooltipPipe"],
            _pipes_transform_release_target_vusers_pipe__WEBPACK_IMPORTED_MODULE_32__["TransformReleaseTargetVUsers"],
            _pipes_timerPipe__WEBPACK_IMPORTED_MODULE_33__["timerPipe"],
            _pipes_participatingUserFormatPipe__WEBPACK_IMPORTED_MODULE_34__["participatingUserFormatPipe"],
            _pipes_blinkingPipe__WEBPACK_IMPORTED_MODULE_35__["blinkingPipe"]
        ],
        entryComponents: [],
        imports: [
            _angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forChild(_routes_sync_point_route__WEBPACK_IMPORTED_MODULE_3__["SYNCPOINT_ROUTES"]),
            _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_15__["MatSidenavModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["TieredMenuModule"],
            _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClientModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_7__["FormsModule"],
            _angular_common__WEBPACK_IMPORTED_MODULE_8__["CommonModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["SplitButtonModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["TooltipModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["ToolbarModule"],
            _angular_material_icon__WEBPACK_IMPORTED_MODULE_14__["MatIconModule"],
            angular2_highcharts__WEBPACK_IMPORTED_MODULE_9__["ChartModule"],
            // NgProgressModule,
            // NgProgressModule.forRoot({
            //   spinnerPosition: 'left',
            //   color: '#66FF00',
            //   thick: true
            // }),
            // NgProgressHttpModule,
            // DataTableModule,
            primeng_table__WEBPACK_IMPORTED_MODULE_5__["TableModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["ButtonModule"],
            _angular_material_select__WEBPACK_IMPORTED_MODULE_16__["MatSelectModule"],
            _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_17__["MatToolbarModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["DialogModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["CalendarModule"],
            _angular_material_tabs__WEBPACK_IMPORTED_MODULE_18__["MatTabsModule"],
            _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_19__["MatCheckboxModule"],
            primeng_fieldset__WEBPACK_IMPORTED_MODULE_21__["FieldsetModule"],
            primeng_radiobutton__WEBPACK_IMPORTED_MODULE_22__["RadioButtonModule"],
            primeng_listbox__WEBPACK_IMPORTED_MODULE_23__["ListboxModule"],
            primeng_dropdown__WEBPACK_IMPORTED_MODULE_24__["DropdownModule"],
            primeng_multiselect__WEBPACK_IMPORTED_MODULE_25__["MultiSelectModule"],
            primeng_panel__WEBPACK_IMPORTED_MODULE_26__["PanelModule"],
            primeng_toast__WEBPACK_IMPORTED_MODULE_27__["ToastModule"],
            // GrowlModule,
            primeng__WEBPACK_IMPORTED_MODULE_4__["ChipsModule"],
            primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_29__["ConfirmDialogModule"],
            _angular_material_progress_bar__WEBPACK_IMPORTED_MODULE_13__["MatProgressBarModule"],
            // PerfectScrollbarModule,
            _angular_material_menu__WEBPACK_IMPORTED_MODULE_20__["MatMenuModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["AccordionModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["BlockUIModule"],
            primeng__WEBPACK_IMPORTED_MODULE_4__["OverlayPanelModule"],
            src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_37__["CavTableModule"],
            src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_38__["HelpModule"]
        ],
        providers: [
            primeng_api__WEBPACK_IMPORTED_MODULE_28__["ConfirmationService"],
            primeng_api__WEBPACK_IMPORTED_MODULE_28__["MessageService"],
            _services_sync_point_common_service__WEBPACK_IMPORTED_MODULE_12__["SyncPointCommonService"],
            _netocean_services_netocean_rest_api_service__WEBPACK_IMPORTED_MODULE_36__["NetoceanRestApi"]
        ],
        bootstrap: []
    })
], SyncPointModule);



/***/ })

}]);