YARN-8595. [UI2] Container diagnostic information is missing from container page. Contributed by Akhil PB.
This commit is contained in:
parent
a48a0cc7fd
commit
d920b9db77
|
@ -32,6 +32,7 @@ export default DS.Model.extend({
|
|||
logsLink: DS.attr('string'),
|
||||
state: DS.attr('string'),
|
||||
appAttemptId: DS.attr('string'),
|
||||
diagnosticsInfo: DS.attr('string'),
|
||||
|
||||
appId: Ember.computed("id",function () {
|
||||
var id = this.get("id");
|
||||
|
|
|
@ -31,6 +31,7 @@ export default DS.Model.extend({
|
|||
containerState: DS.attr('string'),
|
||||
nodeHttpAddress: DS.attr('string'),
|
||||
nodeId: DS.attr('string'),
|
||||
diagnosticsInfo: DS.attr('string'),
|
||||
|
||||
startTs: function() {
|
||||
return Converter.dateToTimeStamp(this.get("startedTime"));
|
||||
|
|
|
@ -40,7 +40,8 @@ export default DS.JSONAPISerializer.extend({
|
|||
hosts: payload.host,
|
||||
state: payload.appAttemptState,
|
||||
logsLink: payload.logsLink,
|
||||
appAttemptId: payload.appAttemptId
|
||||
appAttemptId: payload.appAttemptId,
|
||||
diagnosticsInfo: payload.diagnosticsInfo
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -22,11 +22,6 @@ import Converter from 'yarn-ui/utils/converter';
|
|||
|
||||
export default DS.JSONAPISerializer.extend({
|
||||
internalNormalizeSingleResponse(store, primaryModelClass, payload) {
|
||||
var payloadEvents = payload.events,
|
||||
createdEvent = payloadEvents.filterBy('id', 'YARN_CONTAINER_CREATED')[0],
|
||||
startedTime = createdEvent? createdEvent.timestamp : Date.now(),
|
||||
finishedEvent = payloadEvents.filterBy('id', 'YARN_CONTAINER_FINISHED')[0],
|
||||
finishedTime = finishedEvent? finishedEvent.timestamp : Date.now()
|
||||
|
||||
var fixedPayload = {
|
||||
id: payload.id,
|
||||
|
@ -42,6 +37,7 @@ export default DS.JSONAPISerializer.extend({
|
|||
containerExitStatus: payload.info.YARN_CONTAINER_EXIT_STATUS,
|
||||
containerState: payload.info.YARN_CONTAINER_STATE,
|
||||
nodeId: payload.info.YARN_CONTAINER_ALLOCATED_HOST + ':' + payload.info.YARN_CONTAINER_ALLOCATED_PORT,
|
||||
diagnosticsInfo: payload.info.YARN_CONTAINER_DIAGNOSTICS_INFO
|
||||
}
|
||||
};
|
||||
return fixedPayload;
|
||||
|
|
|
@ -728,3 +728,12 @@ div.service-action-mask img {
|
|||
word-wrap: nowrap;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.diagnostic-info {
|
||||
pre {
|
||||
margin-bottom: 0;
|
||||
white-space: pre-wrap;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
|
@ -62,5 +62,11 @@
|
|||
<td><a href="{{prepend-protocol attempt.logsLink}}" target="_blank">Link</a></td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{#if attempt.diagnosticsInfo}}
|
||||
<tr>
|
||||
<td>Diagnostics Info</td>
|
||||
<td>{{attempt.diagnosticsInfo}}</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane {{if (eq viewType "graph") "active" ""}}" id="graphViewTab">
|
||||
<br/><br/>
|
||||
<div class="row">
|
||||
<div class="col-md-7 container-fluid" id={{parent-id}}></div>
|
||||
<!-- diag info -->
|
||||
<div class="col-md-5 container-fluid">
|
||||
|
@ -56,6 +57,23 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{#unless attemptModel}}
|
||||
{{#if selected.diagnosticsInfo}}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Diagnostic Info for {{selected.id}}
|
||||
</div>
|
||||
<div class="diagnostic-info">
|
||||
<pre>{{selected.diagnosticsInfo}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane {{if (eq viewType "grid") "active" ""}}" id="gridViewTab">
|
||||
{{em-table columns=gridColumns rows=gridRows definition=tableDefinition}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue