YARN-10630. [UI2] Ambiguous queue name resolution (#3214)
Co-authored-by: Andras Gyori <gandras@cloudera.com>
This commit is contained in:
parent
de41ce8a16
commit
e634bf33f3
@ -160,9 +160,9 @@ export default Ember.Component.extend({
|
||||
.on(
|
||||
"click",
|
||||
function(d) {
|
||||
if (d.queueData.get("name") !== this.get("selected")) {
|
||||
if (d.queueData.get("queuePath") !== this.get("selected")) {
|
||||
document.location.href =
|
||||
"#/yarn-queues/" + d.queueData.get("name") + "!";
|
||||
"#/yarn-queues/" + d.queueData.get("queuePath") + "!";
|
||||
}
|
||||
|
||||
Ember.run.later(
|
||||
@ -183,7 +183,7 @@ export default Ember.Component.extend({
|
||||
)
|
||||
.on("dblclick", function(d) {
|
||||
document.location.href =
|
||||
"#/yarn-queue/" + d.queueData.get("name") + "/apps";
|
||||
"#/yarn-queue/" + d.queueData.get("queuePath") + "/apps";
|
||||
});
|
||||
|
||||
nodeEnter
|
||||
@ -235,7 +235,7 @@ export default Ember.Component.extend({
|
||||
.attr("dy", "45px")
|
||||
.attr("text-anchor", "middle")
|
||||
.text(function(d) {
|
||||
return d.name;
|
||||
return d.queueData.get("name");
|
||||
})
|
||||
.style("fill-opacity", 1e-6);
|
||||
|
||||
@ -251,12 +251,12 @@ export default Ember.Component.extend({
|
||||
.select("circle")
|
||||
.attr("r", 30)
|
||||
.attr("href", function(d) {
|
||||
return "#/yarn-queues/" + d.queueData.get("name");
|
||||
return "#/yarn-queues/" + d.queueData.get("queuePath");
|
||||
})
|
||||
.style(
|
||||
"stroke-width",
|
||||
function(d) {
|
||||
if (d.queueData.get("name") === this.get("selected")) {
|
||||
if (d.queueData.get("queuePath") === this.get("selected")) {
|
||||
return 7;
|
||||
} else {
|
||||
return 2;
|
||||
@ -266,7 +266,7 @@ export default Ember.Component.extend({
|
||||
.style(
|
||||
"stroke",
|
||||
function(d) {
|
||||
if (d.queueData.get("name") === this.get("selected")) {
|
||||
if (d.queueData.get("queuePath") === this.get("selected")) {
|
||||
return "gray";
|
||||
} else {
|
||||
return "gray";
|
||||
|
@ -21,7 +21,7 @@ import Converter from 'yarn-ui/utils/converter';
|
||||
|
||||
export default DS.Model.extend({
|
||||
name: DS.attr("string"),
|
||||
path: DS.attr("string"),
|
||||
queuePath: DS.attr("string"),
|
||||
children: DS.attr("array"),
|
||||
parent: DS.attr("string"),
|
||||
capacity: DS.attr("number"),
|
||||
|
@ -26,7 +26,7 @@ export default DS.JSONAPISerializer.extend({
|
||||
var children = [];
|
||||
if (payload.queues && payload.queues.queue) {
|
||||
payload.queues.queue.forEach(function(queue) {
|
||||
children.push(queue.queueName);
|
||||
children.push(queue.queuePath);
|
||||
});
|
||||
}
|
||||
|
||||
@ -40,10 +40,10 @@ export default DS.JSONAPISerializer.extend({
|
||||
var maxAMResource = defaultPartitionResource.amLimit;
|
||||
includedData.push({
|
||||
type: "YarnUser",
|
||||
id: u.username + "_" + payload.queueName,
|
||||
id: u.username + "_" + payload.queuePath,
|
||||
attributes: {
|
||||
name: u.username,
|
||||
queueName: payload.queueName,
|
||||
queueName: payload.queuePath,
|
||||
usedMemoryMB: u.resourcesUsed.memory || 0,
|
||||
usedVCore: u.resourcesUsed.vCores || 0,
|
||||
maxMemoryMB: u.userResourceLimit.memory || 0,
|
||||
@ -60,7 +60,7 @@ export default DS.JSONAPISerializer.extend({
|
||||
|
||||
relationshipUserData.push({
|
||||
type: "YarnUser",
|
||||
id: u.username + "_" + payload.queueName,
|
||||
id: u.username + "_" + payload.queuePath,
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -92,7 +92,7 @@ export default DS.JSONAPISerializer.extend({
|
||||
type: primaryModelClass.modelName, // yarn-queue
|
||||
attributes: {
|
||||
name: payload.queueName,
|
||||
path: payload.queuePath,
|
||||
queuePath: payload.queuePath,
|
||||
parent: payload.myParent,
|
||||
children: children,
|
||||
capacity: payload.capacity,
|
||||
@ -141,9 +141,9 @@ export default DS.JSONAPISerializer.extend({
|
||||
if (payload.queues && payload.queues.queue) {
|
||||
for (var i = 0; i < payload.queues.queue.length; i++) {
|
||||
var queue = payload.queues.queue[i];
|
||||
queue.myParent = payload.queueName;
|
||||
queue.myParent = payload.queuePath;
|
||||
var childResult = this.handleQueue(store, primaryModelClass, queue,
|
||||
queue.queueName,
|
||||
queue.queuePath,
|
||||
requestType);
|
||||
|
||||
data = data.concat(childResult.data);
|
||||
|
Loading…
Reference in New Issue
Block a user