Plugin can use enum for modes now.
This commit is contained in:
parent
ae22adc920
commit
3b6c5898fe
@ -66,9 +66,8 @@ export const configurationSchema = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mode: {
|
mode: {
|
||||||
type: 'boolean',
|
enum: [ 'Performance mode', 'Density mode' ],
|
||||||
title: 'Mode',
|
title: 'Mode'
|
||||||
description: 'performance mode if enabled, else density mode'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
pools: {
|
pools: {
|
||||||
@ -573,7 +572,7 @@ class LoadBalancerPlugin {
|
|||||||
|
|
||||||
if (plans) {
|
if (plans) {
|
||||||
for (const plan of plans) {
|
for (const plan of plans) {
|
||||||
this._addPlan(plan.mode ? PERFORMANCE_MODE : DENSITY_MODE, plan)
|
this._addPlan(plan.mode === 'Performance mode' ? PERFORMANCE_MODE : DENSITY_MODE, plan)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user