diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/yarn-queue-partition-capacity-labels.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/yarn-queue-partition-capacity-labels.js index e7f9c03f35..788155c387 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/yarn-queue-partition-capacity-labels.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/yarn-queue-partition-capacity-labels.js @@ -37,12 +37,24 @@ export default Ember.Component.extend({ const userLimit = queue.get("userLimit"); const userLimitFactor = queue.get("userLimitFactor"); const isLeafQueue = queue.get("isLeafQueue"); + const isWeightMode = queue.get("isWeightMode"); + const isFlexibleDynamicQueue = queue.get("isFlexibleDynamicQueue"); + const weight = queue.get("weight"); + const orderingPolicy = queue.get("orderingPolicy"); + const normalizedWeight = queue.get("normalizedWeight"); + const creationMethod = queue.get("creationMethod"); return { ...partitionMap[filteredParition], userLimit, userLimitFactor, - isLeafQueue + isLeafQueue, + isWeightMode, + weight, + normalizedWeight, + orderingPolicy, + creationMethod, + isFlexibleDynamicQueue }; } }); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/capacity-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/capacity-queue.js index ebcccb9eec..885c6a5215 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/capacity-queue.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/capacity-queue.js @@ -21,6 +21,7 @@ import Converter from 'yarn-ui/utils/converter'; export default DS.Model.extend({ name: DS.attr("string"), + path: DS.attr("string"), children: DS.attr("array"), parent: DS.attr("string"), capacity: DS.attr("number"), @@ -31,6 +32,10 @@ export default DS.Model.extend({ absCapacity: DS.attr("number"), absMaxCapacity: DS.attr("number"), absUsedCapacity: DS.attr("number"), + weight: DS.attr("number"), + normalizedWeight: DS.attr("number"), + creationMethod: DS.attr("string"), + orderingPolicy: DS.attr("string"), state: DS.attr("string"), userLimit: DS.attr("number"), userLimitFactor: DS.attr("number"), @@ -49,6 +54,14 @@ export default DS.Model.extend({ return len <= 0; }.property("children"), + isWeightMode: function() { + return this.get("weight") !== -1; + }.property("children"), + + isFlexibleDynamicQueue: function() { + return this.get("creationMethod") === "dynamicFlexible"; + }.property("children"), + capacitiesBarChartData: function() { var floatToFixed = Converter.floatToFixed; return [ diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js index 2dec5205fd..e9ce25d2cb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js @@ -92,6 +92,7 @@ export default DS.JSONAPISerializer.extend({ type: primaryModelClass.modelName, // yarn-queue attributes: { name: payload.queueName, + path: payload.queuePath, parent: payload.myParent, children: children, capacity: payload.capacity, @@ -100,7 +101,11 @@ export default DS.JSONAPISerializer.extend({ absCapacity: payload.absoluteCapacity, absMaxCapacity: payload.absoluteMaxCapacity, absUsedCapacity: payload.absoluteUsedCapacity, + weight: payload.weight, + normalizedWeight: payload.normalizedWeight, + creationMethod: payload.creationMethod, state: payload.state, + orderingPolicy: payload.orderingPolicyInfo, userLimit: payload.userLimit, userLimitFactor: payload.userLimitFactor, preemptionDisabled: payload.preemptionDisabled, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue-partition-capacity-labels.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue-partition-capacity-labels.hbs index fdecb2de31..a84538da8d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue-partition-capacity-labels.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue-partition-capacity-labels.hbs @@ -30,6 +30,18 @@ {{data.absoluteMaxCapacity}}% +{{#if data.isWeightMode}} +