YARN-9729. [UI2] Fix error message for logs when ATSv2 is offline. Contributed by Zoltan Siegl.
(cherry picked from commit 1c5b28659f
)
This commit is contained in:
parent
f2007818fc
commit
58ad5ad493
|
@ -263,5 +263,12 @@ export default Ember.Controller.extend({
|
||||||
isLogAggregationNotSucceeded: Ember.computed("model.app", function() {
|
isLogAggregationNotSucceeded: Ember.computed("model.app", function() {
|
||||||
const logAggregationStatus = this.get("model.app.logAggregationStatus");
|
const logAggregationStatus = this.get("model.app.logAggregationStatus");
|
||||||
return logAggregationStatus !== "SUCCEEDED";
|
return logAggregationStatus !== "SUCCEEDED";
|
||||||
})
|
}),
|
||||||
|
|
||||||
|
isTimelineUnHealthy: function() {
|
||||||
|
if (this.model && this.model.timelineHealth) {
|
||||||
|
return this.model.timelineHealth.get('isTimelineUnHealthy');
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}.property('model.timelineHealth')
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,7 +31,10 @@ export default AbstractRoute.extend(AppAttemptMixin, {
|
||||||
attempts: this.fetchAttemptListFromRMorATS(app_id, this.store).catch(function() {
|
attempts: this.fetchAttemptListFromRMorATS(app_id, this.store).catch(function() {
|
||||||
return [];
|
return [];
|
||||||
}),
|
}),
|
||||||
app: this.fetchAppInfoFromRMorATS(app_id, this.store)
|
app: this.fetchAppInfoFromRMorATS(app_id, this.store),
|
||||||
|
timelineHealth: this.store.queryRecord('timeline-health', {}).catch(function() {
|
||||||
|
return null;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,14 @@
|
||||||
<img src="assets/images/spinner.gif" alt="Loading...">
|
<img src="assets/images/spinner.gif" alt="Loading...">
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#if isTimelineUnHealthy}}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8 col-md-offset-2 alert alert-warning text-center">
|
||||||
|
<span class="glyphicon glyphicon-warning-sign" style="padding-right: 10px"></span>
|
||||||
|
<span>Logs are unavailable because Application Timeline Service seems unhealthy.</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
{{#if attemptList}}
|
{{#if attemptList}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
@ -70,6 +78,7 @@
|
||||||
<h4 class="text-center">No data available!</h4>
|
<h4 class="text-center">No data available!</h4>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue