Commit 4d19375e authored by odlai's avatar odlai

if empty content[ports]

parent 4f6195de
......@@ -19,12 +19,16 @@
@foreach($contents as $content)
<tr>
<form method="post" action="{{route('api')}}">
<input type = "hidden" name = "_token" value = "<?php echo csrf_token(); ?>">
<input type = "hidden" name = "_token" value = "<?php echo csrf_token(); ?>">
<td>{{$content['Names'][0]}}</td>
<td>{{$content['State']}}</td>
@if(empty($content['Ports'][0]['PrivatePort']))
<td></td>
@else
<td>{{$content['Ports'][0]['PrivatePort']}}:{{$content['Ports'][0]['PublicPort']}}</td>
@endif
<td>{{$content['Status']}}</td>
<td>{{$content['Created']}}</td>
<td>{{date('Y-m-d H:i:s',$content['Created'])}}</td><!--timestamp to date-->
<td>
<input type = "hidden" name = "id" value = "{{$content['Id']}}">
<button type="submit" class="btn btn-Success" name="btn" value="start">啟動</button>
......@@ -37,6 +41,13 @@
</tbody>
</table>
<!-- </form> -->
<ul class="pagination justify-content-center" style="margin:20px 0">
<li class="page-item"><a class="page-link" href="#">Previous</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">Next</a></li>
</ul>
<p>Note that we start the search in tbody, to prevent filtering the table headers.</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment