<div id="dashboardDiv" class="uploadStatusDiv" [style.height.px]="usDivHeight"  [style.width.px]="usDivWidth" style="overflow: auto;">

<!-- Added By Vikas Lagad on 03-Oct-2019 [Start]-->
<div *ngIf="dashboardData.data && dashboardData.data.length == 0" [style.height.px]="usDivHeight"  [style.width.px]="usDivWidth" class="dashboardCss">
    <span class="noUploadStatus">
        No Data to display
    </span> 
</div>
<!-- Added By Vikas Lagad on 03-Oct-2019 [End]-->
<table align="left" class="dahsboardHeaderTbl" *ngFor="let ss of dashboardData.data">
    <tbody>
        <tr>
            <td rowspan="3" style="width: 4%; padding: 8px;">
                 <!-- added *ngIf by sadique shaikh 29-1-2019  -->
                <ng-container *ngIf="ss.percentage != 100">
                        <img src='/ibase/webitm/images/Download.svg' alt='downloadstat' class='dahsboardHeaderImg bacthIcon'>
                </ng-container>
                 <!-- added *ngIf by sadique shaikh 29-1-2019  -->
                <ng-container *ngIf="(ss.errorRec!=0 && ss.percentage==100) || (ss.errorRec==0 && ss.percentage==100)">
                        <img src='/ibase/webitm/images/Upload.svg' alt='uploadstat' class='dahsboardHeaderImg bacthIcon'>
                </ng-container>
            </td>
            <td align="left">
                <span>
                      <!-- added *ngIf by sadique shaikh 29-1-2019  -->
                    <ng-container *ngIf="ss.percentage != 100">
                    <!-- Changed by Sainath t. on 01-NOV-2019 [added object description] -->
                    <div style="font-size:16px;">Uploading {{ss.jobTitle}} : {{ss.objDescr}} ({{ss.jobId}})</div>
                    </ng-container>
                      <!-- added  *ngIf by sadique shaikh 29-1-2019  -->
                    <ng-container *ngIf="(ss.errorRec!=0 && ss.percentage==100)">
                    <div style="font-size:16px;">{{ss.jobTitle}} : {{ss.objDescr}} ({{ss.jobId}})</div>  
                    </ng-container>
                    <!-- Changed by Pooja S on [12-July-19]  to display the upload image -->
                    <ng-container *ngIf="(ss.errorRec==0 && ss.percentage==100)">
                    <!--  Changed by Pooja S on [12-July-19]  to display JobTittle -->
                        <div style="font-size:16px;">{{ss.jobTitle}} : {{ss.objDescr}} ({{ss.jobId}})</div>  
                        </ng-container>
                    <div style="font-size:14px;">Started  : {{ss.startedDate}}, Completed in {{ss.takenTime}} </div>
                    <div style="font-size:12px; color: #666;">
                        <span>Progress: {{ss.progress}}</span>&nbsp;
                        <span>Successful : ({{ss.successRec}})</span>&nbsp;
                        <span>Error : ({{ss.errorRec}})</span>
                    </div>
                </span>
            </td>
            <td align="center" style="width:57px">
                <ng-container *ngIf="ss.percentage != 100; else elseif1">
                <!-- Changed by Sainath T. 04-03-2020 -->
                    <div><!-- (click)="onclick(ss.jobId,ss.objName,false)" -->
                        <div class="c100 p{{ss.percentage | number: '2.0-0'} yellow">
                            <!-- Added by Sainath T. on 09-OCT-2019 -->
                            <span [ngClass]="{'internalSpanForExport': fromExportToZip, 'internalSpan': !fromExportToZip }">
                                {{ss.percentage | number : '2.0-0'}}%
                            </span>
                            <div class="slice">
                                <div class="bar"></div>
                                <div class="fill"></div>
                            </div>
                        </div>
                    </div>
                </ng-container>
                <ng-template #elseif1>
                    <ng-container *ngIf="(ss.errorRec!=0 && ss.percentage==100); else else1">
                            <div (click)="onclick(ss.jobId,ss.objName,false)">
                         <!-- commented by sadique shaikh 29-1-2019 -->
                        <!--<div style="font-size:16px;"> Uploading Report : {{ss.jobId}}</div>--> 
                      
                          <!--  <div class="c100 p{{ss.percentage | number: '3.0-0'}} red">--> 
                              <div>
                                   <!-- added by sadique shaikh 29-1-2019  -->
                                    <img src="/ibase/webitm/images/Error.svg" alt="Erikhror" style="border-radius: 50% !important; height: 20px; width: 20px;" />
                                <div class="slice">
                                    <div class="bar"></div>
                                    <div class="fill"></div>
                                </div>
                            </div>
                        </div>
                    </ng-container>
                </ng-template>
                <ng-template #else1>
                    <div (click)="onclick(ss.jobId,ss.objName,true)">
                        <!-- commented by sadique shaikh 29-1-2019 -->
                       <!-- <div class="c100 p{{ss.percentage | number: '3.0-0'}} green">
                            <span class="internalSpan">{{ss.percentage | number : '3.0-0'}}%</span>-->
                           <!-- added by sadique shaikh 29-1-2019  -->
                            <div><img src="/ibase/webitm/images/Done.svg" alt="Done" style="border-radius: 50% !important; height: 20px; width: 20px;" />
                            <div class="slice">
                                <div class="bar"></div>
                                <div class="fill"></div>
                            </div>
                        </div>
                    </div>
                </ng-template>
            </td>
        </tr>
    </tbody>
</table>
</div>

<ng-template #portal>
    <div role="dialog" class="task-add-overlay" [style.width.px]="usDivWidth" [style.height.px] = "overlayDivHeight"> 
        <div class="headerPage-Container pophelp-Header">
            <!-- change by sadique shaikh 29-1-2019  added span for batchid-->
            <span class="pophelp-headerTitle">Background Details : <span class="pophelp-headerTitle2">{{batchId}}</span></span>
        </div>
        <div class="contentDiv" id="contentDiv" align="left" [style.height.px]="divHeight">
            <!-- change by sadique shaikh 29-1-2019 change from batch id to jobid-->
            <background-job-detail [jobId]="batchId" #dynamicTemp> </background-job-detail>
        </div>
        <div align="left">
            <table style="float: left;">
                <tr>
                    <td>
                        <div (click)="onclickView();" id="upload" class="button">View data</div>
                    </td>
                    <td *ngIf= "!fromExportToZip">
                        <div (click)="getDownloadStatus(batchId);" id="download" class="button">Download File</div>
                    </td>
                </tr>
            </table>
            <table style="float: right;">
                <tr>
                        <td>
                                <div (click)="closeOverlay();" id="close" class="button">Close</div>
                        </td>
                </tr>             
            </table>
        </div>
    </div>
</ng-template>