YARN-5912. Fix breadcrumb issues for various pages in new YARN UI. Contributed by Akhil P B.
This commit is contained in:
parent
b9f8491252
commit
1fa084c425
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -25,7 +25,7 @@ export default Ember.Controller.extend({
|
||||
routeName: 'application'
|
||||
}, {
|
||||
text: "Applications",
|
||||
routeName: 'yarn-apps',
|
||||
routeName: 'yarn-apps.apps',
|
||||
}]
|
||||
|
||||
});
|
||||
|
@ -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",
|
||||
}];
|
||||
|
@ -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} ]`,
|
||||
}];
|
||||
})
|
||||
|
||||
|
@ -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",
|
||||
}];
|
||||
|
@ -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} ]`
|
||||
}];
|
||||
})
|
||||
|
||||
});
|
@ -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",
|
||||
}];
|
||||
|
@ -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}`,
|
||||
}];
|
||||
})
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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() {
|
||||
|
@ -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 }
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -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 }
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -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);
|
||||
});
|
Loading…
Reference in New Issue
Block a user