Plugin can use enum for modes now.

This commit is contained in:
wescoeur 2016-03-11 15:57:29 +01:00
parent ae22adc920
commit 3b6c5898fe

View File

@ -66,9 +66,8 @@ export const configurationSchema = {
},
mode: {
type: 'boolean',
title: 'Mode',
description: 'performance mode if enabled, else density mode'
enum: [ 'Performance mode', 'Density mode' ],
title: 'Mode'
},
pools: {
@ -573,7 +572,7 @@ class LoadBalancerPlugin {
if (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)
}
}