Revert "YARN-9729. [UI2] Fix error message for logs without ATSv2. Contributed by Zoltan Siegl."

This reverts commit 50cec5a704.
This commit is contained in:
Sunil G 2019-08-10 21:10:22 +05:30
parent 50cec5a704
commit e69db45e50
3 changed files with 34 additions and 53 deletions

View File

@ -263,12 +263,5 @@ 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')
}); });

View File

@ -31,10 +31,7 @@ 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;
})
}); });
}, },

View File

@ -32,52 +32,43 @@
<img src="assets/images/spinner.gif" alt="Loading..."> <img src="assets/images/spinner.gif" alt="Loading...">
</div> </div>
{{/if}} {{/if}}
{{#if isTimelineUnHealthy}} {{#if attemptList}}
<div class="row panel-heading"> <div class="row">
<div class="col-md-2"></div> <div class="col-md-6">
<div class="col-md-8 alert alert-warning glyphicon glyphicon-warning-sign text-center"> <label>Choose attempt to fetch containers</label>
<span>Logs are unavailable because Application Timeline Service seems unhealthy.</span> <div>
</div> <select class="js-fetch-attempt-containers" onchange={{action "showContainersForAttemptId" value="target.value"}} style="max-width:350px;">
<option value="" selected={{eq selectedAttemptId ''}}>None</option>
{{#each attemptList as |attempt|}}
<option value="{{attempt.id}}" selected={{eq selectedAttemptId attempt.id}}>{{attempt.id}}</option>
{{/each}}
</select>
</div>
</div> </div>
{{else}} {{#if attemptContainerList}}
{{#if attemptList}} <div class="col-md-6">
<div class="row"> <label>Choose container to fetch logs</label>
<div class="col-md-6"> <div>
<label>Choose attempt to fetch containers</label> <select class="js-fetch-logs-containers" onchange={{action "showLogFilesForContainerId" value="target.value"}} style="max-width:350px">
<div> <option value="" selected={{eq selectedContainerId ''}}>None</option>
<select class="js-fetch-attempt-containers" onchange={{action "showContainersForAttemptId" value="target.value"}} style="max-width:350px;"> {{#each attemptContainerList as |container|}}
<option value="" selected={{eq selectedAttemptId ''}}>None</option> <option value="{{container.id}}" selected={{eq selectedContainerId container.id}}>{{container.id}}</option>
{{#each attemptList as |attempt|}} {{/each}}
<option value="{{attempt.id}}" selected={{eq selectedAttemptId attempt.id}}>{{attempt.id}}</option> </select>
{{/each}}
</select>
</div>
</div>
{{#if attemptContainerList}}
<div class="col-md-6">
<label>Choose container to fetch logs</label>
<div>
<select class="js-fetch-logs-containers" onchange={{action "showLogFilesForContainerId" value="target.value"}} style="max-width:350px">
<option value="" selected={{eq selectedContainerId ''}}>None</option>
{{#each attemptContainerList as |container|}}
<option value="{{container.id}}" selected={{eq selectedContainerId container.id}}>{{container.id}}</option>
{{/each}}
</select>
</div>
</div>
{{else}}
{{#if (and selectedAttemptId (not _isLoadingTopPanel))}}
<div class="col-md-4">
<h4 class="text-center" style="margin-top:25px;">No container data available!</h4>
</div>
{{/if}}
{{/if}}
</div> </div>
</div>
{{else}} {{else}}
<div class="col-md-12"> {{#if (and selectedAttemptId (not _isLoadingTopPanel))}}
<h4 class="text-center">No data available!</h4> <div class="col-md-4">
<h4 class="text-center" style="margin-top:25px;">No container data available!</h4>
</div> </div>
{{/if}}
{{/if}} {{/if}}
</div>
{{else}}
<div class="col-md-12">
<h4 class="text-center">No data available!</h4>
</div>
{{/if}} {{/if}}
</div> </div>
</div> </div>