StatPanel: Fixes issue formatting date values using unit option (#30979) (#30991)

(cherry picked from commit 907d3a2aac)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
This commit is contained in:
Grot (@grafanabot)andTorkel Ödegaard authored and GitHub committed 2021-02-08 17:24:47 +01:00
1 parent a4f8c56a0a
commit 68597e8cfb
2 files changed
+4 -3

No files matched your search

@@ -27,9 +27,10 @@ interface DisplayProcessorOptions {
// Reasonable units for time
const timeFormats: KeyValue<boolean> = {
dateTimeAsIso: true,
dateTimeAsIsoSmart: true,
dateTimeAsIsoNoDateIfToday: true,
dateTimeAsUS: true,
dateTimeAsUSSmart: true,
dateTimeAsUSNoDateIfToday: true,
dateTimeAsLocal: true,
dateTimeFromNow: true,
};
@@ -77,7 +77,7 @@ export const getStandardFieldConfigs = () => {
placeholder: 'none',
},
shouldApply: (field) => field.type === FieldType.number,
shouldApply: () => true,
category,
};