<page-title title="Container Info"></page-title>

<div class="container-fluid">
	<div class="row">	
		<div class="col">
			<p>
				<input type="text" class="form-control form-control-sm" ng-model="infoFilter" placeholder="Filter..."/>
			</p>

			<div class="card mb-3" ng-repeat="section in info" ng-show="(section.data|filter:infoFilter).length > 0">
						
				<div class="card-body">
					<h5 class="card-title">{{section.name}}</h5>
				
					<table class="table table-striped table-sm small" style="table-layout: fixed;">
						<thead ng-if="section.name == 'Modules'">
							<tr>
								<th>Group ID</th>
								<th>Artifact ID</th>
								<th>Version</th>
								<th>POM</th>
							</tr>
						</thead>
						<tbody>
							<tr ng-repeat="r in section.data|filter:infoFilter" ng-if="section.name != 'Modules'">
								<th style="width: 25%;">{{r.k}}</th>
								<td style="overflow-x: auto;"><pre style="margin: 0;">{{r.v}}</pre></td>
							</tr>
							<tr ng-repeat="r in section.data|filter:infoFilter" ng-if="section.name == 'Modules'" ng-class="{'table-warning' : r.files.length > 1}">
								<td>{{r.group}}</td>
								<td>{{r.name}}</td>
								<td class="text-monospace"><span ng-repeat="v in r.versions">{{v}}<br /></span></td>
								<td class="text-monospace"><span ng-repeat="f in r.files">{{f}}<br /></span></td>
							</tr>								
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
