diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app-attempt.js index a458842f9e..4c02361090 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app-attempt.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app-attempt.js @@ -27,7 +27,7 @@ export default Ember.Controller.extend({ routeName: 'application' },{ text: "Applications", - routeName: 'yarn-apps' + routeName: 'yarn-apps.apps' }, { text: `App [${appId}]`, routeName: 'yarn-app', diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app-attempts.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app-attempts.js index 9ebc2a6325..92de2f99e6 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app-attempts.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app-attempts.js @@ -27,7 +27,7 @@ export default Ember.Controller.extend({ routeName: 'application' },{ text: "Applications", - routeName: 'yarn-apps' + routeName: 'yarn-apps.apps' }, { text: `App [${appId}]`, routeName: 'yarn-app', diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app.js index 309c895b57..9c1cb5d367 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app.js @@ -27,7 +27,7 @@ export default Ember.Controller.extend({ routeName: 'application' },{ text: "Applications", - routeName: 'yarn-apps' + routeName: 'yarn-apps.apps' }, { text: `App [${appId}]`, routeName: 'yarn-app', diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps.js index 396f83b58f..18bf68222a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps.js @@ -25,7 +25,7 @@ export default Ember.Controller.extend({ routeName: 'application' }, { text: "Applications", - routeName: 'yarn-apps', + routeName: 'yarn-apps.apps', }] }); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-container-log.js index 3352eaf498..db7470d548 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-container-log.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-container-log.js @@ -26,12 +26,15 @@ export default Ember.Controller.extend({ return [{ text: "Home", routeName: 'application' + }, { + text: "Nodes", + routeName: 'yarn-nodes.table' }, { text: `Node [ ${nodeInfo.id} ]`, - href: `/#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}`, + href: `#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}`, }, { text: `Container [ ${containerInfo.id} ]`, - href: `/#/yarn-node-container/${nodeInfo.id}/${nodeInfo.addr}/${containerInfo.id}`, + href: `#/yarn-node-container/${nodeInfo.id}/${nodeInfo.addr}/${containerInfo.id}`, }, { text: "Log", }]; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-app.js index 76da281cb2..3dc09fcf7e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-app.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-app.js @@ -26,10 +26,13 @@ export default Ember.Controller.extend({ text: "Home", routeName: 'application' }, { - text: `Node [ ${nodeInfo.id} ]`, - href: `/#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}`, + text: "Nodes", + routeName: 'yarn-nodes.table' }, { - text: "Application", + text: `Node [ ${nodeInfo.id} ]`, + href: `#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}`, + }, { + text: `Application [ ${nodeInfo.appId} ]`, }]; }) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-apps.js index 6e67ab08e6..6f53e74f28 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-apps.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-apps.js @@ -30,7 +30,7 @@ export default Ember.Controller.extend({ routeName: 'yarn-nodes.table' }, { text: `Node [ ${nodeInfo.id} ]`, - href: `/#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}`, + href: `#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}` }, { text: "Applications", }]; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-container.js new file mode 100644 index 0000000000..afcd518488 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-container.js @@ -0,0 +1,39 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Ember from 'ember'; + +export default Ember.Controller.extend({ + + breadcrumbs: Ember.computed("model.nodeInfo", function () { + var nodeInfo = this.get("model.nodeInfo"); + return [{ + text: "Home", + routeName: 'application' + },{ + text: "Nodes", + routeName: 'yarn-nodes.table' + }, { + text: `Node [ ${nodeInfo.id} ]`, + href: `#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}` + }, { + text: `Container [ ${nodeInfo.containerId} ]` + }]; + }) + +}); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-containers.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-containers.js index abe4098738..21d50a34d7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-containers.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node-containers.js @@ -30,7 +30,7 @@ export default Ember.Controller.extend({ routeName: 'yarn-nodes.table' }, { text: `Node [ ${nodeInfo.id} ]`, - href: `/#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}`, + href: `#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}` }, { text: "Containers", }]; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node.js index 06614151e4..55d9b3e32d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-node.js @@ -30,7 +30,7 @@ export default Ember.Controller.extend({ routeName: 'yarn-nodes.table' }, { text: `Node [ ${nodeInfo.id} ]`, - href: `/#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}`, + href: `#/yarn-node/${nodeInfo.id}/${nodeInfo.addr}`, }]; }) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-services.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-services.js index 597962aa59..75bebf6e33 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-services.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-services.js @@ -25,7 +25,7 @@ export default Ember.Controller.extend({ routeName: 'application' }, { text: "Applications", - routeName: 'yarn-apps', + routeName: 'yarn-apps.apps', }, { text: "Long Running Services", routeName: 'yarn-services', diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js index ea1334fa48..13663571ec 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js @@ -54,7 +54,7 @@ export default DS.Model.extend({ applicationExpiryTime: DS.attr('string'), isFailed: function() { - return this.get('finalStatus') == "FAILED"; + return this.get('finalStatus') === "FAILED"; }.property("finalStatus"), validatedFinishedTs: function() { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-app.js index 0a1193051d..8b2ad803f9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-app.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-app.js @@ -25,7 +25,7 @@ export default AbstractRoute.extend({ return Ember.RSVP.hash({ nodeApp: this.store.queryRecord('yarn-node-app', { nodeAddr : param.node_addr, appId: param.app_id }), - nodeInfo: { id: param.node_id, addr: param.node_addr } + nodeInfo: { id: param.node_id, addr: param.node_addr, appId: param.app_id } }); }, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-container.js index b7a79de976..5708feac03 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-container.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-container.js @@ -26,7 +26,7 @@ export default AbstractRoute.extend({ return Ember.RSVP.hash({ nodeContainer: this.store.queryRecord('yarn-node-container', { nodeHttpAddr: param.node_addr, containerId: param.container_id }), - nodeInfo: { id: param.node_id, addr: param.node_addr } + nodeInfo: { id: param.node_id, addr: param.node_addr, containerId: param.container_id } }); }, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-node-container-test.js new file mode 100644 index 0000000000..c35e413909 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-node-container-test.js @@ -0,0 +1,30 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('controller:yarn-node-container', 'Unit | Controller | yarn node container', { + // Specify the other units that are required for this test. + // needs: ['controller:foo'] +}); + +// Replace this with your real tests. +test('it exists', function(assert) { + let controller = this.subject(); + assert.ok(controller); +});