<div class="top-pad"></div>

<div class="content-padding">

	<h1 class="title"><i class="fa fa-bookmark"></i>Deployment #{{version.id_deploy_version}}</h1>
	<div class="box-content2 box-content-table">
		<table>
			<tr>
				<th>Date</th>
				<td>
					<? /* {{version.date | localtime | timestamp | date:'MM/dd @ HH:mm'}} */ ?>
					{{version.timestamp*1000 | date:'MM/dd @ HH:mm'}}
				</td>
			</tr>
			<tr>
				<th>Server</th>
				<td>{{version.server.name}}</td>
			</tr>
			
			<tr>
				<th>Admin</th>
				<td><a href="/staff/{{version.id_admin}}">{{version.admin.name}}</a></td>
			</tr>
			
			
			
			<tr>
				<th>Git Version / Tag</th>
				<td>
					<span ng-if="version.version">
						<a href="https://github.com/{{version.server.repo}}/commit/{{version.version}}" target="_system">{{version.version}}</a>
					</span>
					<span ng-if="version.version && version.tag">
						&nbsp;/&nbsp;
					</span>				
					<span ng-if="version.tag">
						<a href="https://github.com/{{version.server.repo}}/tree/{{version.tag}}" target="_system">{{version.tag}}</a>
					</span>
				</td>
			</tr>
			<tr>
				<th>Status</th>
				<td class="deploy-status-{{version.status}}">
					{{version.status}}
					<span ng-if="version.status=='deploying'">&nbsp;&nbsp;&nbsp;<i class="fa fa-cog fa-spin"></i></span>
					<span ng-if="version.status=='new'">&nbsp;&nbsp;&nbsp;<a href="" ng-click="cancel(version.id_deploy_version)" ng-if="account.user.permissions['SERVER-DEPLOY-ADMIN']"><i class="fa fa-times-circle"></i></a></span>
				</td>
			</tr>

			<tr>
				<th>Log</th>
				<td><pre class="deploy-log">{{version.log}}</pre></td>
			</tr>
		</table>
	</div>


</div>
