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 userLimit = queue.get("userLimit");
|
||||||
const userLimitFactor = queue.get("userLimitFactor");
|
const userLimitFactor = queue.get("userLimitFactor");
|
||||||
const isLeafQueue = queue.get("isLeafQueue");
|
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 {
|
return {
|
||||||
...partitionMap[filteredParition],
|
...partitionMap[filteredParition],
|
||||||
userLimit,
|
userLimit,
|
||||||
userLimitFactor,
|
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({
|
export default DS.Model.extend({
|
||||||
name: DS.attr("string"),
|
name: DS.attr("string"),
|
||||||
|
path: 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"),
|
||||||
@ -31,6 +32,10 @@ export default DS.Model.extend({
|
|||||||
absCapacity: DS.attr("number"),
|
absCapacity: DS.attr("number"),
|
||||||
absMaxCapacity: DS.attr("number"),
|
absMaxCapacity: DS.attr("number"),
|
||||||
absUsedCapacity: 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"),
|
state: DS.attr("string"),
|
||||||
userLimit: DS.attr("number"),
|
userLimit: DS.attr("number"),
|
||||||
userLimitFactor: DS.attr("number"),
|
userLimitFactor: DS.attr("number"),
|
||||||
@ -49,6 +54,14 @@ export default DS.Model.extend({
|
|||||||
return len <= 0;
|
return len <= 0;
|
||||||
}.property("children"),
|
}.property("children"),
|
||||||
|
|
||||||
|
isWeightMode: function() {
|
||||||
|
return this.get("weight") !== -1;
|
||||||
|
}.property("children"),
|
||||||
|
|
||||||
|
isFlexibleDynamicQueue: function() {
|
||||||
|
return this.get("creationMethod") === "dynamicFlexible";
|
||||||
|
}.property("children"),
|
||||||
|
|
||||||
capacitiesBarChartData: function() {
|
capacitiesBarChartData: function() {
|
||||||
var floatToFixed = Converter.floatToFixed;
|
var floatToFixed = Converter.floatToFixed;
|
||||||
return [
|
return [
|
||||||
|
@ -92,6 +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,
|
||||||
parent: payload.myParent,
|
parent: payload.myParent,
|
||||||
children: children,
|
children: children,
|
||||||
capacity: payload.capacity,
|
capacity: payload.capacity,
|
||||||
@ -100,7 +101,11 @@ export default DS.JSONAPISerializer.extend({
|
|||||||
absCapacity: payload.absoluteCapacity,
|
absCapacity: payload.absoluteCapacity,
|
||||||
absMaxCapacity: payload.absoluteMaxCapacity,
|
absMaxCapacity: payload.absoluteMaxCapacity,
|
||||||
absUsedCapacity: payload.absoluteUsedCapacity,
|
absUsedCapacity: payload.absoluteUsedCapacity,
|
||||||
|
weight: payload.weight,
|
||||||
|
normalizedWeight: payload.normalizedWeight,
|
||||||
|
creationMethod: payload.creationMethod,
|
||||||
state: payload.state,
|
state: payload.state,
|
||||||
|
orderingPolicy: payload.orderingPolicyInfo,
|
||||||
userLimit: payload.userLimit,
|
userLimit: payload.userLimit,
|
||||||
userLimitFactor: payload.userLimitFactor,
|
userLimitFactor: payload.userLimitFactor,
|
||||||
preemptionDisabled: payload.preemptionDisabled,
|
preemptionDisabled: payload.preemptionDisabled,
|
||||||
|
@ -30,6 +30,18 @@
|
|||||||
<span class="label-value">{{data.absoluteMaxCapacity}}%</span>
|
<span class="label-value">{{data.absoluteMaxCapacity}}%</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</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">
|
<div class="top-1">
|
||||||
<span class="yarn-label secondary">
|
<span class="yarn-label secondary">
|
||||||
<span class="label-key">configured capacity</span>
|
<span class="label-key">configured capacity</span>
|
||||||
@ -40,6 +52,7 @@
|
|||||||
<span class="label-value">{{data.maxCapacity}}%</span>
|
<span class="label-value">{{data.maxCapacity}}%</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{#if data.isLeafQueue}}
|
{{#if data.isLeafQueue}}
|
||||||
<div class="top-1">
|
<div class="top-1">
|
||||||
<span class="yarn-label secondary">
|
<span class="yarn-label secondary">
|
||||||
@ -51,4 +64,11 @@
|
|||||||
<span class="label-value">{{data.userLimitFactor}}</span>
|
<span class="label-value">{{data.userLimitFactor}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/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,14 +31,34 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq model.queues.firstObject.type "capacity")}}
|
{{#if (eq model.queues.firstObject.type "capacity")}}
|
||||||
<div class="top-1">
|
<div class="top-1">
|
||||||
<span class="yarn-label secondary">
|
{{#if model.selectedQueue.isWeightMode}}
|
||||||
<span class="label-key">configured capacity</span>
|
<span class="yarn-label secondary">
|
||||||
<span class="label-value">{{model.selectedQueue.capacity}}%</span>
|
<span class="label-key">weight</span>
|
||||||
</span>
|
<span class="label-value">{{model.selectedQueue.weight}}</span>
|
||||||
<span class="yarn-label secondary">
|
</span>
|
||||||
<span class="label-key">configured max capacity</span>
|
<span class="yarn-label secondary">
|
||||||
<span class="label-value">{{model.selectedQueue.maxCapacity}}%</span>
|
<span class="label-key">normalized weight</span>
|
||||||
</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>
|
||||||
|
</span>
|
||||||
|
<span class="yarn-label secondary">
|
||||||
|
<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}}
|
{{#if model.selectedQueue.isLeafQueue}}
|
||||||
<span class="yarn-label secondary">
|
<span class="yarn-label secondary">
|
||||||
<span class="label-key">user limit</span>
|
<span class="label-key">user limit</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user