|
31 | 31 | <tr> |
32 | 32 | <td class="text-break"><%= formatName(container.Names) %></td> |
33 | 33 | <td class="text-break"><%= container.Image %></td> |
34 | | - <td class="text-break"><%= container.Command %></td> |
| 34 | + <td class="command-cell" data-toggle="modal" data-target="#commandModal" data-command="<%= container.Command %>"><%= container.Command %></td> |
35 | 35 | <td> |
36 | 36 | <% if(container.Ports && container.Ports[0]){ %> |
37 | 37 | [TCP] <%= container.Ports[0].PrivatePort %> |
@@ -174,4 +174,29 @@ <h4 class="modal-title" id="myModalLabel">New container</h4> |
174 | 174 | </div> |
175 | 175 | </div> |
176 | 176 | </div> |
| 177 | +<!-- Command Detail Modal --> |
| 178 | +<div class="modal fade" id="commandModal" tabindex="-1" role="dialog" aria-labelledby="commandModalLabel"> |
| 179 | + <div class="modal-dialog" role="document"> |
| 180 | + <div class="modal-content"> |
| 181 | + <div class="modal-header"> |
| 182 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| 183 | + <span aria-hidden="true">×</span> |
| 184 | + </button> |
| 185 | + <h4 class="modal-title" id="commandModalLabel">Command</h4> |
| 186 | + </div> |
| 187 | + <div class="modal-body"> |
| 188 | + <pre id="commandContent" style="white-space: pre-wrap; word-break: break-all;"></pre> |
| 189 | + </div> |
| 190 | + <div class="modal-footer"> |
| 191 | + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
| 192 | + </div> |
| 193 | + </div> |
| 194 | + </div> |
| 195 | +</div> |
177 | 196 | <%- include('include/footer.html') %> |
| 197 | +<script> |
| 198 | + $('#commandModal').on('show.bs.modal', function (e) { |
| 199 | + var command = $(e.relatedTarget).data('command'); |
| 200 | + $('#commandContent').text(command); |
| 201 | + }); |
| 202 | +</script> |
0 commit comments