THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

This is Gitea test Portainer repository mirror from Github
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

285 lines
14 KiB

  1. <rd-header>
  2. <rd-header-title title-text="Container details">
  3. </rd-header-title>
  4. <rd-header-content>
  5. <a ui-sref="docker.containers">Containers</a> &gt; <a ui-sref="docker.containers.container({id: container.Id})">{{ container.Name|trimcontainername }}</a>
  6. </rd-header-content>
  7. </rd-header>
  8. <div class="row" authorization="DockerContainerStart, DockerContainerStop, DockerContainerKill, DockerContainerRestart, DockerContainerPause, DockerContainerUnpause, DockerContainerDelete, DockerContainerCreate">
  9. <div class="col-lg-12 col-md-12 col-xs-12">
  10. <rd-widget>
  11. <rd-widget-header icon="fa-cogs" title-text="Actions"></rd-widget-header>
  12. <rd-widget-body classes="padding">
  13. <div class="btn-group" role="group" aria-label="...">
  14. <button authorization="DockerContainerStart" class="btn btn-success btn-sm" ng-click="start()" ng-disabled="container.State.Running"><i class="fa fa-play space-right" aria-hidden="true"></i>Start</button>
  15. <button authorization="DockerContainerStop" class="btn btn-danger btn-sm" ng-click="stop()" ng-disabled="!container.State.Running"><i class="fa fa-stop space-right" aria-hidden="true"></i>Stop</button>
  16. <button authorization="DockerContainerKill" class="btn btn-danger btn-sm" ng-click="kill()" ng-disabled="!container.State.Running"><i class="fa fa-bomb space-right" aria-hidden="true"></i>Kill</button>
  17. <button authorization="DockerContainerRestart" class="btn btn-primary btn-sm" ng-click="restart()" ng-disabled="!container.State.Running"><i class="fa fa-sync space-right" aria-hidden="true"></i>Restart</button>
  18. <button authorization="DockerContainerPause" class="btn btn-primary btn-sm" ng-click="pause()" ng-disabled="!container.State.Running || container.State.Paused"><i class="fa fa-pause space-right" aria-hidden="true"></i>Pause</button>
  19. <button authorization="DockerContainerUnpause" class="btn btn-primary btn-sm" ng-click="unpause()" ng-disabled="!container.State.Paused"><i class="fa fa-play space-right" aria-hidden="true"></i>Resume</button>
  20. <button authorization="DockerContainerDelete" class="btn btn-danger btn-sm" ng-click="confirmRemove()"><i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove</button>
  21. </div>
  22. <div class="btn-group" role="group" aria-label="..." ng-if="displayRecreateButton" authorization="DockerContainerCreate">
  23. <button type="button" class="btn btn-danger btn-sm" ng-disabled="state.recreateContainerInProgress" ng-click="recreate()" button-spinner="state.recreateContainerInProgress">
  24. <span ng-hide="state.recreateContainerInProgress"><i class="fa fa-sync space-right" aria-hidden="true"></i>Recreate</span>
  25. <span ng-show="state.recreateContainerInProgress">Recreation in progress...</span>
  26. </button>
  27. <a class="btn btn-primary btn-sm" type="button" ui-sref="docker.containers.new({ from: container.Id, nodeName: nodeName })"><i class="fa fa-copy space-right" aria-hidden="true"></i>Duplicate/Edit</a>
  28. </div>
  29. </rd-widget-body>
  30. </rd-widget>
  31. </div>
  32. </div>
  33. <div class="row">
  34. <div class="col-lg-12 col-md-12 col-xs-12">
  35. <rd-widget>
  36. <rd-widget-header icon="fa-server" title-text="Container status"></rd-widget-header>
  37. <rd-widget-body classes="no-padding">
  38. <table class="table">
  39. <tbody>
  40. <tr>
  41. <td>ID</td>
  42. <td>{{ container.Id }}</td>
  43. </tr>
  44. <tr>
  45. <td>Name</td>
  46. <td ng-if="!container.edit">
  47. {{ container.Name|trimcontainername }}
  48. <a authorization="DockerContainerRename" href="" data-toggle="tooltip" title="Edit container name" ng-click="container.edit = true;"><i class="fa fa-edit"></i></a>
  49. </td>
  50. <td ng-if="container.edit">
  51. <form ng-submit="renameContainer()">
  52. <input type="text" class="containerNameInput" ng-model="container.newContainerName">
  53. <a href="" ng-click="container.edit = false;"><i class="fa fa-times"></i></a>
  54. <a href="" ng-click="renameContainer()"><i class="fa fa-check-square"></i></a>
  55. </form>
  56. </td>
  57. </tr>
  58. <tr ng-if="container.NetworkSettings.IPAddress">
  59. <td>IP address</td>
  60. <td>{{ container.NetworkSettings.IPAddress }}</td>
  61. </tr>
  62. <tr>
  63. <td>Status</td>
  64. <td>
  65. <i class="fa fa-heartbeat space-right green-icon" ng-if="container.State.Running"></i>
  66. <i class="fa fa-heartbeat space-right red-icon" ng-if="!container.State.Running && container.State.Status !== 'created'"></i>
  67. {{ container.State|getstatetext }} for {{ activityTime }}<span ng-if="!container.State.Running && container.State.Status !== 'created'"> with exit code {{ container.State.ExitCode }}</span>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td>Created</td>
  72. <td>{{ container.Created|getisodate }}</td>
  73. </tr>
  74. <tr ng-if="container.State.Running">
  75. <td>Start time</td>
  76. <td>{{ container.State.StartedAt|getisodate }}</td>
  77. </tr>
  78. <tr ng-if="!container.State.Running && container.State.Status !== 'created'">
  79. <td>Finished</td>
  80. <td>{{ container.State.FinishedAt|getisodate }}</td>
  81. </tr>
  82. <tr authorization="DockerContainerLogs, DockerContainerInspect, DockerContainerStats, DockerExecStart">
  83. <td colspan="2">
  84. <div class="btn-group" role="group" aria-label="...">
  85. <a authorization="DockerContainerLogs" class="btn" type="button" ui-sref="docker.containers.container.logs({ id: container.Id })"><i class="fa fa-file-alt space-right" aria-hidden="true"></i>Logs</a>
  86. <a authorization="DockerContainerInspect" class="btn" type="button" ui-sref="docker.containers.container.inspect({ id: container.Id })"><i class="fa fa-info-circle space-right" aria-hidden="true"></i>Inspect</a>
  87. <a authorization="DockerContainerStats" class="btn" type="button" ui-sref="docker.containers.container.stats({ id: container.Id })"><i class="fa fa-chart-area space-right" aria-hidden="true"></i>Stats</a>
  88. <a authorization="DockerExecStart" class="btn" type="button" ui-sref="docker.containers.container.exec({ id: container.Id })"><i class="fa fa-terminal space-right" aria-hidden="true"></i>Console</a>
  89. <a authorization="DockerContainerAttach" class="btn" type="button" ui-sref="docker.containers.container.attach({ id: container.Id })"><i class="fa fa-plug space-right" aria-hidden="true"></i>Attach</a>
  90. </div>
  91. </td>
  92. </tr>
  93. </tbody>
  94. </table>
  95. </rd-widget-body>
  96. </rd-widget>
  97. </div>
  98. </div>
  99. <!-- access-control-panel -->
  100. <por-access-control-panel
  101. ng-if="container && applicationState.application.authentication"
  102. resource-id="container.Id"
  103. resource-control="container.ResourceControl"
  104. resource-type="'container'">
  105. </por-access-control-panel>
  106. <!-- !access-control-panel -->
  107. <div ng-if="container.State.Health" class="row">
  108. <div class="col-lg-12 col-md-12 col-xs-12">
  109. <rd-widget>
  110. <rd-widget-header icon="fa-server" title-text="Container health"></rd-widget-header>
  111. <rd-widget-body classes="no-padding">
  112. <table class="table">
  113. <tbody>
  114. <tr>
  115. <td>Status</td>
  116. <td>
  117. <i ng-class="{'healthy': 'fa fa-heartbeat space-right green-icon', 'unhealthy': 'fa fa-heartbeat space-right red-icon', 'starting': 'fa fa-heartbeat space-right orange-icon'}[container.State.Health.Status]"></i>
  118. {{ container.State.Health.Status }}
  119. </td>
  120. </tr>
  121. <tr>
  122. <td>Failure count</td>
  123. <td>{{ container.State.Health.FailingStreak }}</td>
  124. </tr>
  125. <tr>
  126. <td>Last output</td>
  127. <td>{{ container.State.Health.Log[container.State.Health.Log.length - 1].Output }}</td>
  128. </tr>
  129. </tbody>
  130. </table>
  131. </rd-widget-body>
  132. </rd-widget>
  133. </div>
  134. </div>
  135. <div class="row" authorization="DockerImageCreate">
  136. <div class="col-lg-12 col-md-12 col-xs-12">
  137. <rd-widget>
  138. <rd-widget-header icon="fa-clone" title-text="Create image"></rd-widget-header>
  139. <rd-widget-body>
  140. <form class="form-horizontal">
  141. <!-- tag-description -->
  142. <div class="form-group">
  143. <div class="col-sm-12">
  144. <span class="small text-muted">
  145. You can create an image from this container, this allows you to backup important data or save
  146. helpful configurations. You'll be able to spin up another container based on this image afterward.
  147. </span>
  148. </div>
  149. </div>
  150. <!-- !tag-description -->
  151. <!-- image-and-registry -->
  152. <por-image-registry
  153. model="config.RegistryModel"
  154. auto-complete="true"
  155. label-class="col-sm-1" input-class="col-sm-11"
  156. ></por-image-registry>
  157. <!-- !image-and-registry -->
  158. <!-- tag-note -->
  159. <div class="form-group">
  160. <div class="col-sm-12">
  161. <span class="small text-muted">Note: if you don't specify the tag in the image name, <span class="label label-default">latest</span> will be used.</span>
  162. </div>
  163. </div>
  164. <!-- !tag-note -->
  165. <div class="form-group">
  166. <div class="col-sm-12">
  167. <button type="button" class="btn btn-primary btn-sm" ng-disabled="!config.RegistryModel.Image || config.commitInProgress" ng-click="commit()">Create</button>
  168. </div>
  169. </div>
  170. </form>
  171. </rd-widget-body>
  172. </rd-widget>
  173. </div>
  174. </div>
  175. <div class="row">
  176. <div class="col-lg-12 col-md-12 col-xs-12">
  177. <rd-widget>
  178. <rd-widget-header icon="fa-server" title-text="Container details"></rd-widget-header>
  179. <rd-widget-body classes="no-padding">
  180. <table class="table">
  181. <tbody>
  182. <tr>
  183. <td>Image</td>
  184. <td><a ui-sref="docker.images.image({ id: container.Image, nodeName: nodeName })">{{ container.Config.Image}}@{{container.Image}}</a></td>
  185. </tr>
  186. <tr ng-if="portBindings.length > 0">
  187. <td>Port configuration</td>
  188. <td>
  189. <div ng-repeat="portMapping in portBindings">
  190. {{ portMapping.host }} <i class="fa fa-long-arrow-alt-right"></i> {{ portMapping.container }}
  191. </div>
  192. </td>
  193. </tr>
  194. <tr>
  195. <td>CMD</td>
  196. <td><code>{{ container.Config.Cmd|command }}</code></td>
  197. </tr>
  198. <tr>
  199. <td>ENTRYPOINT</td>
  200. <td><code>{{ container.Config.Entrypoint ? (container.Config.Entrypoint|command) : "null" }}</code></td>
  201. </tr>
  202. <tr>
  203. <td>ENV</td>
  204. <td>
  205. <table class="table table-bordered table-condensed">
  206. <tr ng-repeat="var in container.Config.Env track by $index">
  207. <td>{{ var|key: '=' }}</td>
  208. <td>{{ var|value: '=' }}</td>
  209. </tr>
  210. </table>
  211. </td>
  212. </tr>
  213. <tr ng-if="!(container.Config.Labels | emptyobject)">
  214. <td>Labels</td>
  215. <td>
  216. <table class="table table-bordered table-condensed">
  217. <tr ng-repeat="(k, v) in container.Config.Labels">
  218. <td>{{ k }}</td>
  219. <td>{{ v }}</td>
  220. </tr>
  221. </table>
  222. </td>
  223. </tr>
  224. <tr>
  225. <td>Restart policies</td>
  226. <td>
  227. <container-restart-policy ng-if="container"
  228. name="container.HostConfig.RestartPolicy.Name"
  229. maximum-retry-count="container.HostConfig.RestartPolicy.MaximumRetryCount"
  230. update-restart-policy="updateRestartPolicy(name, maximumRetryCount)">
  231. </td>
  232. </tr>
  233. </tbody>
  234. </table>
  235. </rd-widget-body>
  236. </rd-widget>
  237. </div>
  238. </div>
  239. <div class="row" ng-if="container.Mounts.length > 0">
  240. <div class="col-lg-12 col-md-12 col-xs-12">
  241. <rd-widget>
  242. <rd-widget-header icon="fa-cubes" title-text="Volumes"></rd-widget-header>
  243. <rd-widget-body classes="no-padding">
  244. <table class="table">
  245. <thead>
  246. <tr>
  247. <th>Host/volume</th>
  248. <th>Path in container</th>
  249. </tr>
  250. </thead>
  251. <tbody>
  252. <tr ng-repeat="vol in container.Mounts">
  253. <td ng-if="vol.Type === 'bind'">{{ vol.Source }}</td>
  254. <td ng-if="vol.Type === 'volume'"><a ui-sref="docker.volumes.volume({ id: vol.Name, nodeName: nodeName })">{{ vol.Name }}</a></td>
  255. <td>{{ vol.Destination }}</td>
  256. </tr>
  257. </tbody>
  258. </table>
  259. </rd-widget-body>
  260. </rd-widget>
  261. </div>
  262. </div>
  263. <div class="row">
  264. <div class="col-sm-12">
  265. <container-networks-datatable
  266. title-text="Connected networks" title-icon="fa-sitemap"
  267. dataset="container.NetworkSettings.Networks" table-key="container-networks"
  268. container="container"
  269. available-networks="availableNetworks"
  270. join-network-action="containerJoinNetwork"
  271. join-network-action-in-progress="state.joinNetworkInProgress"
  272. leave-network-action="containerLeaveNetwork"
  273. leave-network-action-in-progress="state.leaveNetworkInProgress"
  274. node-name="nodeName"
  275. ></container-networks-datatable>
  276. </div>
  277. </div>