YARN-10513. CS Flexible Auto Queue Creation RM UIv2 modifications. Contributed by Andras Gyori.
This commit is contained in:
parent
7f64030314
commit
b722c52f4e
@ -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
|
||||
};
|
||||
}
|
||||
});
|
||||
|
@ -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 [
|
||||
|
@ -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,
|
||||
|
@ -30,6 +30,18 @@
|
||||
<span class="label-value">{{data.absoluteMaxCapacity}}%</span>
|
||||
</span>
|
||||
</div>
|
||||
{{#if data.isWeightMode}}
|
||||
<div class="top-1">
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">weight</span>
|
||||
<span class="label-value">{{data.weight}}</span>
|
||||
</span>
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">normalized weight</span>
|
||||
<span class="label-value">{{data.normalizedWeight}}</span>
|
||||
</span>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="top-1">
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">configured capacity</span>
|
||||
@ -40,6 +52,7 @@
|
||||
<span class="label-value">{{data.maxCapacity}}%</span>
|
||||
</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if data.isLeafQueue}}
|
||||
<div class="top-1">
|
||||
<span class="yarn-label secondary">
|
||||
@ -52,3 +65,10 @@
|
||||
</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if data.isFlexibleDynamicQueue}}
|
||||
<div class="top-1">
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">flexible dynamic queue</span>
|
||||
</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -31,6 +31,16 @@
|
||||
{{/if}}
|
||||
{{#if (eq model.queues.firstObject.type "capacity")}}
|
||||
<div class="top-1">
|
||||
{{#if model.selectedQueue.isWeightMode}}
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">weight</span>
|
||||
<span class="label-value">{{model.selectedQueue.weight}}</span>
|
||||
</span>
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">normalized weight</span>
|
||||
<span class="label-value">{{model.selectedQueue.normalizedWeight}}</span>
|
||||
</span>
|
||||
{{else}}
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">configured capacity</span>
|
||||
<span class="label-value">{{model.selectedQueue.capacity}}%</span>
|
||||
@ -39,6 +49,16 @@
|
||||
<span class="label-key">configured max capacity</span>
|
||||
<span class="label-value">{{model.selectedQueue.maxCapacity}}%</span>
|
||||
</span>
|
||||
{{/if}}
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">ordering policy</span>
|
||||
<span class="label-value">{{model.selectedQueue.orderingPolicy}}</span>
|
||||
</span>
|
||||
{{#if model.selectedQueue.isFlexibleDynamicQueue}}
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">flexible dynamic queue</span>
|
||||
</span>
|
||||
{{/if}}
|
||||
{{#if model.selectedQueue.isLeafQueue}}
|
||||
<span class="yarn-label secondary">
|
||||
<span class="label-key">user limit</span>
|
||||
|
Loading…
Reference in New Issue
Block a user