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