forked from openshift/origin-web-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug-terminal.html
60 lines (60 loc) · 2.49 KB
/
debug-terminal.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<div class="modal-debug-terminal">
<div class="modal-header">
<h2>Debug Container {{container.name}}</h2>
<small class="text-muted">
{{debugPod.metadata.name}} —
<status-icon status="debugPod | podStatus"></status-icon>
{{debugPod | podStatus | humanizePodStatus}}
</small>
</div>
<div class="modal-body">
<div ng-if="!containerState.running" class="empty-state-message text-center">
<!-- Waiting for debug container to start. -->
<h2 ng-if="debugPod.status.phase !== 'Failed'" class="text-muted">
Waiting for container {{container.name}} to start...
</h2>
<!-- Debug container failed. -->
<div ng-if="debugPod.status.phase === 'Failed'">
<h2>
<span class="pficon pficon-error-circle-o" aria-hidden="true"></span>
Could not start container {{container.name}}.
</h2>
<p>
An error occurred starting the debug pod.
<span ng-if="containerState.terminated.message">{{containerState.terminated.message}}</span>
<span ng-if="containerState.terminated.exitCode" class="text-muted">Exit code: {{containerState.terminated.exitCode}}</span>
</p>
</div>
</div>
<!-- Debug container running. -->
<div ng-if="containerState.running">
<div class="help-block">
This temporary pod has a modified entrypoint command to debug a failing container. The pod
will be available for one hour and will be deleted when the terminal window is closed.
</div>
<div ng-if="container | entrypoint : image" class="original-cmd-msg">
<label>Original Command:</label>
<code>
<truncate-long-text
content="container | entrypoint : image"
limit="80"
newline-limit="1"
expandable="false"
use-word-boundary="false">
</truncate-long-text>
</code>
<!-- Don't add the copy-to-clipboard button for now since we have problems with paste in the terminal. -->
<!-- <copy-to-clipboard clipboard-text="container | entrypoint : image"></copy-to-clipboard> -->
</div>
<kubernetes-container-terminal
pod="debugPod"
container="container.name"
autofocus="true"
command='["/bin/sh", "-i", "-c", "TERM=xterm /bin/sh"]'>
</kubernetes-container-terminal>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-lg btn-primary" type="button" ng-click="close()">Close</button>
</div>
</div>