BarGauge: Updated test dashboards and threshold fix (#16911)

This commit is contained in:
Torkel Ödegaard
2019-05-07 06:07:33 +02:00
committed by GitHub
parent f8393fb339
commit 108eb5f07c
8 changed files with 491 additions and 445 deletions

View File

@@ -11,7 +11,7 @@ export interface SingleStatBaseOptions {
orientation: VizOrientation;
}
const optionsToKeep = ['valueOptions', 'stat', 'maxValue', 'maxValue', 'thresholds', 'valueMappings'];
const optionsToKeep = ['fieldOptions', 'orientation'];
export const sharedSingleStatOptionsCheck = (
options: Partial<SingleStatBaseOptions> | any,
@@ -53,10 +53,13 @@ export const sharedSingleStatMigrationCheck = (panel: PanelModel<SingleStatBaseO
fieldOptions.calcs = getFieldReducers([valueOptions.stat]).map(s => s.id);
}
}
field.min = old.minValue;
field.max = old.maxValue;
return omit(old, 'valueMappings', 'thresholds', 'valueOptions');
// remove old props
return omit(old, 'valueMappings', 'thresholds', 'valueOptions', 'minValue', 'maxValue');
}
return panel.options;
};