YARN-7861. [UI2] Logs page shows duplicated containers with ATS. (Sunil G via wangda)
Change-Id: Id07d1ff8d519e0d9291ab037236641ceb901582c
This commit is contained in:
parent
5ca4bf22dd
commit
1453a04e92
|
@ -47,10 +47,14 @@ export default Ember.Controller.extend({
|
||||||
this.fetchContainersForAttemptId(attemptId)
|
this.fetchContainersForAttemptId(attemptId)
|
||||||
.then(hash => {
|
.then(hash => {
|
||||||
let containers = null;
|
let containers = null;
|
||||||
|
let containerIdArr = [];
|
||||||
if (
|
if (
|
||||||
hash.rmContainers.get("length") > 0 &&
|
hash.rmContainers.get("length") > 0 &&
|
||||||
hash.rmContainers.get("content")
|
hash.rmContainers.get("content")
|
||||||
) {
|
) {
|
||||||
|
hash.rmContainers.get("content").forEach(function(o) {
|
||||||
|
containerIdArr.push(o.id);
|
||||||
|
}.bind(this));
|
||||||
containers = (containers || []).concat(
|
containers = (containers || []).concat(
|
||||||
hash.rmContainers.get("content")
|
hash.rmContainers.get("content")
|
||||||
);
|
);
|
||||||
|
@ -59,9 +63,14 @@ export default Ember.Controller.extend({
|
||||||
hash.tsContainers.get("length") > 0 &&
|
hash.tsContainers.get("length") > 0 &&
|
||||||
hash.tsContainers.get("content")
|
hash.tsContainers.get("content")
|
||||||
) {
|
) {
|
||||||
|
let tscontainer = [];
|
||||||
|
hash.tsContainers.get("content").forEach(function(o) {
|
||||||
|
if(!containerIdArr.contains(o.id)) {
|
||||||
|
tscontainer.push(o);
|
||||||
|
}
|
||||||
|
}.bind(this));
|
||||||
containers = (containers || []).concat(
|
containers = (containers || []).concat(
|
||||||
hash.tsContainers.get("content")
|
tscontainer);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
this.set("attemptContainerList", containers);
|
this.set("attemptContainerList", containers);
|
||||||
this.initializeSelect(".js-fetch-logs-containers");
|
this.initializeSelect(".js-fetch-logs-containers");
|
||||||
|
|
|
@ -36,6 +36,7 @@ export default AbstractRoute.extend(AppAttemptMixin, {
|
||||||
|
|
||||||
activate() {
|
activate() {
|
||||||
const controller = this.controllerFor("yarn-app.logs");
|
const controller = this.controllerFor("yarn-app.logs");
|
||||||
|
controller.resetAfterRefresh();
|
||||||
controller.initializeSelect();
|
controller.initializeSelect();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue