<div #dashboardViewEl [ngClass]="{'db-view-drilldown' : (isDrillDown && !isCompositeDrillDown) , 'single-dashboard' : (isSingleDashboard && viewData.type == 'flatonly' && !isDrillDown) , 'angDBViewCntainer' : !isCompositeDrillDown }" >
    <div *ngIf="viewData.type == 'flat'" class="angChartContainerHead" id="Cardgwt-uid-41head">
    <div class="mainPanel" [ngClass]="{'mainPanel-drillDown' : (isDrillDown && !isCompositeDrillDown)}">
        <div style="height: 32px;width: 32px;background-color: #465775;border-radius: 50%; display: inline-block;">
            <img src="dashboard/assets/images/dashboard/{{viewData.icon}}" class="componantTtlImg"/> 
        </div>
        <div class="refreshDatePanel">
            <div class="componantTtl truncateText" title="{{viewData.title}}">{{viewData.title}}</div>
            <div class = "refreshIconWithDate ">
                <span class="refreshDate">Refreshed Today, {{refreshDate | date:'h:mm a'}}</span>
                <span class="vision-ui-refresh_small icon-refresh-small" (click)="refresh();"></span>
            </div>
        </div>
        <div *ngIf="obj_links  && obj_links.length > 0" class="angDashboadLink">
			<img src="dashboard/assets/images/dashboard/dashboard_links.png" class="angDashboadLinkImg" [matMenuTriggerFor]="linkMenu">    
		</div>
    </div>
    <div *ngIf="(isDrillDown && !isCompositeDrillDown)" class="ang-drilldown-close-cont">
            <span class="ang-drilldown-close-btn visionicon" (click)="closeDrillDown();"></span>
    </div>
    </div>
	<div *ngIf="viewData.fixed_refresh" class="fixed-refresh">
		<span class="vision-ui-refresh_small icon-refresh-small " (click)=" refreshComponents(); " [id] ="metadataname"></span>
	</div>
	
    <dashboard-component #dashboardComps *ngFor="let component of viewData.component" [isSingleDashboard]="isSingleDashboard" [compConfig]="component" [dashboardName]="metadataname" (onDrillDown)="openDrillDown($event)" [isLinkComponent]="isLinkComponent" [vieWtype]="viewData.type" [isDrillDown]="isDrillDown" [filterInfo]="filterInfo" [filters]="filters" (onDrillDownClose)="closeDrillDown();" (onRowSelect)="setFeedData($event);">
    </dashboard-component>
</div>

<div #drillDownContainer>

</div>


<mat-menu #linkMenu="matMenu" xPosition="before">
	<div *ngFor="let link of obj_links" (click)="performLinkAction(link);" class="ang-db-Link"> 
	    <span class="dashboard-link-img" *ngIf ="link.FormNo=='1'">
			<img *ngIf="link.Image && link.LinkType != 'CL'" #imgRef [src]="link.Image" alt="" class="actionIcons" title="{{link.LinkTitle}}" (error)="imgRef.style.display='none'; defImgRef.style.display='block'">
				
			<img class="ang-Link-Image defaultImg" 
			      #defImgRef
			      [style.display]="!link.Image ? 'block' : ''"
				  [ngClass]="{
					    		'ang-sideEditLblView':link.LinkType == 2,
					    		'ang-sideReportLblView':link.LinkType == 3,
							    'ang-sideAddLblView':link.LinkType == 4,
					    		'ang-sideProcessLblView':link.LinkType == 6
					    	}"		  		  
		  		  [src]="getImgSrc(link)"
			      title="{{link.LinkTitle}}"
			      alt="">
		     <span *ngIf="link.LinkType == 'CL' && link.Image" [ngClass]="link.Image" class="def-link-icon"></span>
		</span>	      
	    <span class="dashboard-link-title">{{link.LinkTitle}}</span>
	</div>		
</mat-menu>
