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

pull/30995/head
Torkel Ödegaard 4 years ago committed by GitHub
parent 549a2bab3b
commit 907d3a2aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/grafana-data/src/field/displayProcessor.ts
  2. 2
      packages/grafana-ui/src/utils/standardEditors.tsx

@ -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,
};

Loading…
Cancel
Save