<div class="page-header page-header-no-border">
    <h1>
        <div class="main">Dependencies report</div>
    </h1>
    <div class="desc">
        This report displays all Java packaged dependencies found within the application.
    </div>
</div>

<div class="panel panel-default panel-primary">
    <div class="container" role="main">
        <div class="row">
            <div *ngIf="dependencies.length == 0">
                <h1>Loading...</h1>
            </div>
            <div *ngIf="dependencies?.length > 0" class="dependencies">
                <div *ngFor="let dependency of dependencies">
                    <div class="dependency">
                        <h4>{{dependency.filename}}</h4>
                        <dl class="traits dl-horizontal">
                            <ng-template [ngIf]="dependency.gav">
                                <dt class="trait">Maven coordinates:</dt>
                                <dd id="{{dependency.archiveName}}-maven">
                                    <span *ngIf="dependency.sha1Url">
                                        <a id="{{dependency.archiveName}}-gav" href="{{dependency.sha1url}}" target="_blank">{{dependency.gav}}</a>
                                    </span>
                                </dd>
                            </ng-template>
                            <ng-template [ngIf]="dependency.sha1">
                                <dt class="trait">SHA1 hash:</dt>
                                <dd>{{dependency.sha1}}</dd>
                            </ng-template>
                            <ng-template [ngIf]="dependency.name && dependency.name !== dependency.filename">
                                <dt class="trait">Name:</dt>
                                <dd>{{dependency.name}}</dd>
                            </ng-template>
                            <ng-template [ngIf]="dependency.version">
                                <dt class="trait">Version:</dt>
                                <dd>{{dependency.version}}</dd>
                            </ng-template>
                            <ng-template [ngIf]="dependency.organization">
                                <dt class="trait">Organization:</dt>
                                <dd>{{dependency.organization}}</dd>
                            </ng-template>
                            <dt class="trait">Found at path:</dt>
                            <dd>
                                <ul class="list-unstyled">
                                    <li *ngFor="let path of dependency.paths">{{path}}</li>
                                </ul>
                            </dd>
                        </dl>
                    </div>
                </div>
            </div>
        </div><!--/row-->

    </div><!-- /container main-->
</div>
