Commit 063a1acf by Peter Holmberg

started on options and groups

parent e4e41474
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import Select from 'react-select'; import Select, { components } from 'react-select';
import ResetStyles from 'app/core/components/Picker/ResetStyles'; import ResetStyles from 'app/core/components/Picker/ResetStyles';
import DescriptionOption from './DescriptionOption';
import kbn from '../../utils/kbn'; import kbn from '../../utils/kbn';
interface Props { interface Props {
width: number;
className?: string;
onSelected: (item: any) => {} | void; onSelected: (item: any) => {} | void;
placeholder?: string;
} }
export class UnitPicker extends PureComponent<Props> { export class UnitPicker extends PureComponent<Props> {
formatGroupLabel = data => { formatGroupLabel = data => {
console.log('format', data);
const groupStyles = { const groupStyles = {
margin: '0 15px',
fontSize: '16px',
fontWeight: 700,
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
}; } as React.CSSProperties;
const groupBadgeStyles = { const groupBadgeStyles = {
backgroundColor: '#EBECF0', backgroundColor: '#EBECF0',
...@@ -37,29 +34,39 @@ export class UnitPicker extends PureComponent<Props> { ...@@ -37,29 +34,39 @@ export class UnitPicker extends PureComponent<Props> {
return ( return (
<div style={groupStyles}> <div style={groupStyles}>
<span>{data.label}</span> <span>{data.label}</span>
<span style={groupBadgeStyles}>{data.submenu.length}</span> <span style={groupBadgeStyles}>{data.options.length}</span>
</div> </div>
); );
}; };
render() { renderOption = props => {
const { className, onSelected, placeholder, width } = this.props; return (
<components.Option {...props}>
<div className="description-picker-option__button btn btn-link">
<div className="gf-form">{props.children}</div>
</div>
</components.Option>
);
};
renderGroup = props => {
return <components.Group {...props} />;
};
render() {
const options = kbn.getUnitFormats(); const options = kbn.getUnitFormats();
return ( return (
<Select <Select
classNamePrefix="gf-form-select-box" classNamePrefix="gf-form-select-box"
className={`width-${width} gf-form-input gf-form-input--form-dropdown ${className || ''}`} className="width-20 gf-form-input"
components={{
Option: DescriptionOption,
}}
getOptionLabel={i => i.text}
getOptionValue={i => i.value}
isSearchable={false} isSearchable={false}
onChange={onSelected}
options={options} options={options}
placeholder={placeholder || 'Choose'} placeholder="Choose"
components={{
Option: this.renderOption,
Group: this.renderGroup,
}}
styles={ResetStyles} styles={ResetStyles}
formatGroupLabel={this.formatGroupLabel} formatGroupLabel={this.formatGroupLabel}
/> />
......
...@@ -905,284 +905,284 @@ kbn.valueFormats.dateTimeFromNow = (epoch, isUtc) => { ...@@ -905,284 +905,284 @@ kbn.valueFormats.dateTimeFromNow = (epoch, isUtc) => {
kbn.getUnitFormats = () => { kbn.getUnitFormats = () => {
return [ return [
{ {
text: 'none', label: 'none',
submenu: [ options: [
{ text: 'none', value: 'none' }, { label: 'none', value: 'none' },
{ text: 'short', value: 'short' }, { label: 'short', value: 'short' },
{ text: 'percent (0-100)', value: 'percent' }, { label: 'percent (0-100)', value: 'percent' },
{ text: 'percent (0.0-1.0)', value: 'percentunit' }, { label: 'percent (0.0-1.0)', value: 'percentunit' },
{ text: 'Humidity (%H)', value: 'humidity' }, { label: 'Humidity (%H)', value: 'humidity' },
{ text: 'decibel', value: 'dB' }, { label: 'decibel', value: 'dB' },
{ text: 'hexadecimal (0x)', value: 'hex0x' }, { label: 'hexadecimal (0x)', value: 'hex0x' },
{ text: 'hexadecimal', value: 'hex' }, { label: 'hexadecimal', value: 'hex' },
{ text: 'scientific notation', value: 'sci' }, { label: 'scientific notation', value: 'sci' },
{ text: 'locale format', value: 'locale' }, { label: 'locale format', value: 'locale' },
], ],
}, },
{ {
text: 'currency', label: 'currency',
submenu: [ options: [
{ text: 'Dollars ($)', value: 'currencyUSD' }, { label: 'Dollars ($)', value: 'currencyUSD' },
{ text: 'Pounds (£)', value: 'currencyGBP' }, { label: 'Pounds (£)', value: 'currencyGBP' },
{ text: 'Euro ()', value: 'currencyEUR' }, { label: 'Euro ()', value: 'currencyEUR' },
{ text: 'Yen (¥)', value: 'currencyJPY' }, { label: 'Yen (¥)', value: 'currencyJPY' },
{ text: 'Rubles ()', value: 'currencyRUB' }, { label: 'Rubles ()', value: 'currencyRUB' },
{ text: 'Hryvnias ()', value: 'currencyUAH' }, { label: 'Hryvnias ()', value: 'currencyUAH' },
{ text: 'Real (R$)', value: 'currencyBRL' }, { label: 'Real (R$)', value: 'currencyBRL' },
{ text: 'Danish Krone (kr)', value: 'currencyDKK' }, { label: 'Danish Krone (kr)', value: 'currencyDKK' },
{ text: 'Icelandic Króna (kr)', value: 'currencyISK' }, { label: 'Icelandic Króna (kr)', value: 'currencyISK' },
{ text: 'Norwegian Krone (kr)', value: 'currencyNOK' }, { label: 'Norwegian Krone (kr)', value: 'currencyNOK' },
{ text: 'Swedish Krona (kr)', value: 'currencySEK' }, { label: 'Swedish Krona (kr)', value: 'currencySEK' },
{ text: 'Czech koruna (czk)', value: 'currencyCZK' }, { label: 'Czech koruna (czk)', value: 'currencyCZK' },
{ text: 'Swiss franc (CHF)', value: 'currencyCHF' }, { label: 'Swiss franc (CHF)', value: 'currencyCHF' },
{ text: 'Polish Złoty (PLN)', value: 'currencyPLN' }, { label: 'Polish Złoty (PLN)', value: 'currencyPLN' },
{ text: 'Bitcoin (฿)', value: 'currencyBTC' }, { label: 'Bitcoin (฿)', value: 'currencyBTC' },
], ],
}, },
{ {
text: 'time', label: 'time',
submenu: [ options: [
{ text: 'Hertz (1/s)', value: 'hertz' }, { label: 'Hertz (1/s)', value: 'hertz' },
{ text: 'nanoseconds (ns)', value: 'ns' }, { label: 'nanoseconds (ns)', value: 'ns' },
{ text: 'microseconds (µs)', value: 'µs' }, { label: 'microseconds (µs)', value: 'µs' },
{ text: 'milliseconds (ms)', value: 'ms' }, { label: 'milliseconds (ms)', value: 'ms' },
{ text: 'seconds (s)', value: 's' }, { label: 'seconds (s)', value: 's' },
{ text: 'minutes (m)', value: 'm' }, { label: 'minutes (m)', value: 'm' },
{ text: 'hours (h)', value: 'h' }, { label: 'hours (h)', value: 'h' },
{ text: 'days (d)', value: 'd' }, { label: 'days (d)', value: 'd' },
{ text: 'duration (ms)', value: 'dtdurationms' }, { label: 'duration (ms)', value: 'dtdurationms' },
{ text: 'duration (s)', value: 'dtdurations' }, { label: 'duration (s)', value: 'dtdurations' },
{ text: 'duration (hh:mm:ss)', value: 'dthms' }, { label: 'duration (hh:mm:ss)', value: 'dthms' },
{ text: 'Timeticks (s/100)', value: 'timeticks' }, { label: 'Timeticks (s/100)', value: 'timeticks' },
{ text: 'clock (ms)', value: 'clockms' }, { label: 'clock (ms)', value: 'clockms' },
{ text: 'clock (s)', value: 'clocks' }, { label: 'clock (s)', value: 'clocks' },
], ],
}, },
{ {
text: 'date & time', label: 'date & time',
submenu: [ options: [
{ text: 'YYYY-MM-DD HH:mm:ss', value: 'dateTimeAsIso' }, { label: 'YYYY-MM-DD HH:mm:ss', value: 'dateTimeAsIso' },
{ text: 'DD/MM/YYYY h:mm:ss a', value: 'dateTimeAsUS' }, { label: 'DD/MM/YYYY h:mm:ss a', value: 'dateTimeAsUS' },
{ text: 'From Now', value: 'dateTimeFromNow' }, { label: 'From Now', value: 'dateTimeFromNow' },
], ],
}, },
{ {
text: 'data (IEC)', label: 'data (IEC)',
submenu: [ options: [
{ text: 'bits', value: 'bits' }, { label: 'bits', value: 'bits' },
{ text: 'bytes', value: 'bytes' }, { label: 'bytes', value: 'bytes' },
{ text: 'kibibytes', value: 'kbytes' }, { label: 'kibibytes', value: 'kbytes' },
{ text: 'mebibytes', value: 'mbytes' }, { label: 'mebibytes', value: 'mbytes' },
{ text: 'gibibytes', value: 'gbytes' }, { label: 'gibibytes', value: 'gbytes' },
], ],
}, },
{ {
text: 'data (Metric)', label: 'data (Metric)',
submenu: [ options: [
{ text: 'bits', value: 'decbits' }, { label: 'bits', value: 'decbits' },
{ text: 'bytes', value: 'decbytes' }, { label: 'bytes', value: 'decbytes' },
{ text: 'kilobytes', value: 'deckbytes' }, { label: 'kilobytes', value: 'deckbytes' },
{ text: 'megabytes', value: 'decmbytes' }, { label: 'megabytes', value: 'decmbytes' },
{ text: 'gigabytes', value: 'decgbytes' }, { label: 'gigabytes', value: 'decgbytes' },
], ],
}, },
{ {
text: 'data rate', label: 'data rate',
submenu: [ options: [
{ text: 'packets/sec', value: 'pps' }, { label: 'packets/sec', value: 'pps' },
{ text: 'bits/sec', value: 'bps' }, { label: 'bits/sec', value: 'bps' },
{ text: 'bytes/sec', value: 'Bps' }, { label: 'bytes/sec', value: 'Bps' },
{ text: 'kilobits/sec', value: 'Kbits' }, { label: 'kilobits/sec', value: 'Kbits' },
{ text: 'kilobytes/sec', value: 'KBs' }, { label: 'kilobytes/sec', value: 'KBs' },
{ text: 'megabits/sec', value: 'Mbits' }, { label: 'megabits/sec', value: 'Mbits' },
{ text: 'megabytes/sec', value: 'MBs' }, { label: 'megabytes/sec', value: 'MBs' },
{ text: 'gigabytes/sec', value: 'GBs' }, { label: 'gigabytes/sec', value: 'GBs' },
{ text: 'gigabits/sec', value: 'Gbits' }, { label: 'gigabits/sec', value: 'Gbits' },
], ],
}, },
{ {
text: 'hash rate', label: 'hash rate',
submenu: [ options: [
{ text: 'hashes/sec', value: 'Hs' }, { label: 'hashes/sec', value: 'Hs' },
{ text: 'kilohashes/sec', value: 'KHs' }, { label: 'kilohashes/sec', value: 'KHs' },
{ text: 'megahashes/sec', value: 'MHs' }, { label: 'megahashes/sec', value: 'MHs' },
{ text: 'gigahashes/sec', value: 'GHs' }, { label: 'gigahashes/sec', value: 'GHs' },
{ text: 'terahashes/sec', value: 'THs' }, { label: 'terahashes/sec', value: 'THs' },
{ text: 'petahashes/sec', value: 'PHs' }, { label: 'petahashes/sec', value: 'PHs' },
{ text: 'exahashes/sec', value: 'EHs' }, { label: 'exahashes/sec', value: 'EHs' },
], ],
}, },
{ {
text: 'throughput', label: 'throughput',
submenu: [ options: [
{ text: 'ops/sec (ops)', value: 'ops' }, { label: 'ops/sec (ops)', value: 'ops' },
{ text: 'requests/sec (rps)', value: 'reqps' }, { label: 'requests/sec (rps)', value: 'reqps' },
{ text: 'reads/sec (rps)', value: 'rps' }, { label: 'reads/sec (rps)', value: 'rps' },
{ text: 'writes/sec (wps)', value: 'wps' }, { label: 'writes/sec (wps)', value: 'wps' },
{ text: 'I/O ops/sec (iops)', value: 'iops' }, { label: 'I/O ops/sec (iops)', value: 'iops' },
{ text: 'ops/min (opm)', value: 'opm' }, { label: 'ops/min (opm)', value: 'opm' },
{ text: 'reads/min (rpm)', value: 'rpm' }, { label: 'reads/min (rpm)', value: 'rpm' },
{ text: 'writes/min (wpm)', value: 'wpm' }, { label: 'writes/min (wpm)', value: 'wpm' },
], ],
}, },
{ {
text: 'length', label: 'length',
submenu: [ options: [
{ text: 'millimetre (mm)', value: 'lengthmm' }, { label: 'millimetre (mm)', value: 'lengthmm' },
{ text: 'meter (m)', value: 'lengthm' }, { label: 'meter (m)', value: 'lengthm' },
{ text: 'feet (ft)', value: 'lengthft' }, { label: 'feet (ft)', value: 'lengthft' },
{ text: 'kilometer (km)', value: 'lengthkm' }, { label: 'kilometer (km)', value: 'lengthkm' },
{ text: 'mile (mi)', value: 'lengthmi' }, { label: 'mile (mi)', value: 'lengthmi' },
], ],
}, },
{ {
text: 'area', label: 'area',
submenu: [ options: [
{ text: 'Square Meters (m²)', value: 'areaM2' }, { label: 'Square Meters (m²)', value: 'areaM2' },
{ text: 'Square Feet (ft²)', value: 'areaF2' }, { label: 'Square Feet (ft²)', value: 'areaF2' },
{ text: 'Square Miles (mi²)', value: 'areaMI2' }, { label: 'Square Miles (mi²)', value: 'areaMI2' },
], ],
}, },
{ {
text: 'mass', label: 'mass',
submenu: [ options: [
{ text: 'milligram (mg)', value: 'massmg' }, { label: 'milligram (mg)', value: 'massmg' },
{ text: 'gram (g)', value: 'massg' }, { label: 'gram (g)', value: 'massg' },
{ text: 'kilogram (kg)', value: 'masskg' }, { label: 'kilogram (kg)', value: 'masskg' },
{ text: 'metric ton (t)', value: 'masst' }, { label: 'metric ton (t)', value: 'masst' },
], ],
}, },
{ {
text: 'velocity', label: 'velocity',
submenu: [ options: [
{ text: 'metres/second (m/s)', value: 'velocityms' }, { label: 'metres/second (m/s)', value: 'velocityms' },
{ text: 'kilometers/hour (km/h)', value: 'velocitykmh' }, { label: 'kilometers/hour (km/h)', value: 'velocitykmh' },
{ text: 'miles/hour (mph)', value: 'velocitymph' }, { label: 'miles/hour (mph)', value: 'velocitymph' },
{ text: 'knot (kn)', value: 'velocityknot' }, { label: 'knot (kn)', value: 'velocityknot' },
], ],
}, },
{ {
text: 'volume', label: 'volume',
submenu: [ options: [
{ text: 'millilitre (mL)', value: 'mlitre' }, { label: 'millilitre (mL)', value: 'mlitre' },
{ text: 'litre (L)', value: 'litre' }, { label: 'litre (L)', value: 'litre' },
{ text: 'cubic metre', value: 'm3' }, { label: 'cubic metre', value: 'm3' },
{ text: 'Normal cubic metre', value: 'Nm3' }, { label: 'Normal cubic metre', value: 'Nm3' },
{ text: 'cubic decimetre', value: 'dm3' }, { label: 'cubic decimetre', value: 'dm3' },
{ text: 'gallons', value: 'gallons' }, { label: 'gallons', value: 'gallons' },
], ],
}, },
{ {
text: 'energy', label: 'energy',
submenu: [ options: [
{ text: 'Watt (W)', value: 'watt' }, { label: 'Watt (W)', value: 'watt' },
{ text: 'Kilowatt (kW)', value: 'kwatt' }, { label: 'Kilowatt (kW)', value: 'kwatt' },
{ text: 'Milliwatt (mW)', value: 'mwatt' }, { label: 'Milliwatt (mW)', value: 'mwatt' },
{ text: 'Watt per square metre (W/m²)', value: 'Wm2' }, { label: 'Watt per square metre (W/m²)', value: 'Wm2' },
{ text: 'Volt-ampere (VA)', value: 'voltamp' }, { label: 'Volt-ampere (VA)', value: 'voltamp' },
{ text: 'Kilovolt-ampere (kVA)', value: 'kvoltamp' }, { label: 'Kilovolt-ampere (kVA)', value: 'kvoltamp' },
{ text: 'Volt-ampere reactive (var)', value: 'voltampreact' }, { label: 'Volt-ampere reactive (var)', value: 'voltampreact' },
{ text: 'Kilovolt-ampere reactive (kvar)', value: 'kvoltampreact' }, { label: 'Kilovolt-ampere reactive (kvar)', value: 'kvoltampreact' },
{ text: 'Watt-hour (Wh)', value: 'watth' }, { label: 'Watt-hour (Wh)', value: 'watth' },
{ text: 'Kilowatt-hour (kWh)', value: 'kwatth' }, { label: 'Kilowatt-hour (kWh)', value: 'kwatth' },
{ text: 'Kilowatt-min (kWm)', value: 'kwattm' }, { label: 'Kilowatt-min (kWm)', value: 'kwattm' },
{ text: 'Joule (J)', value: 'joule' }, { label: 'Joule (J)', value: 'joule' },
{ text: 'Electron volt (eV)', value: 'ev' }, { label: 'Electron volt (eV)', value: 'ev' },
{ text: 'Ampere (A)', value: 'amp' }, { label: 'Ampere (A)', value: 'amp' },
{ text: 'Kiloampere (kA)', value: 'kamp' }, { label: 'Kiloampere (kA)', value: 'kamp' },
{ text: 'Milliampere (mA)', value: 'mamp' }, { label: 'Milliampere (mA)', value: 'mamp' },
{ text: 'Volt (V)', value: 'volt' }, { label: 'Volt (V)', value: 'volt' },
{ text: 'Kilovolt (kV)', value: 'kvolt' }, { label: 'Kilovolt (kV)', value: 'kvolt' },
{ text: 'Millivolt (mV)', value: 'mvolt' }, { label: 'Millivolt (mV)', value: 'mvolt' },
{ text: 'Decibel-milliwatt (dBm)', value: 'dBm' }, { label: 'Decibel-milliwatt (dBm)', value: 'dBm' },
{ text: 'Ohm (Ω)', value: 'ohm' }, { label: 'Ohm (Ω)', value: 'ohm' },
{ text: 'Lumens (Lm)', value: 'lumens' }, { label: 'Lumens (Lm)', value: 'lumens' },
], ],
}, },
{ {
text: 'temperature', label: 'temperature',
submenu: [ options: [
{ text: 'Celsius (°C)', value: 'celsius' }, { label: 'Celsius (°C)', value: 'celsius' },
{ text: 'Farenheit (°F)', value: 'farenheit' }, { label: 'Farenheit (°F)', value: 'farenheit' },
{ text: 'Kelvin (K)', value: 'kelvin' }, { label: 'Kelvin (K)', value: 'kelvin' },
], ],
}, },
{ {
text: 'pressure', label: 'pressure',
submenu: [ options: [
{ text: 'Millibars', value: 'pressurembar' }, { label: 'Millibars', value: 'pressurembar' },
{ text: 'Bars', value: 'pressurebar' }, { label: 'Bars', value: 'pressurebar' },
{ text: 'Kilobars', value: 'pressurekbar' }, { label: 'Kilobars', value: 'pressurekbar' },
{ text: 'Hectopascals', value: 'pressurehpa' }, { label: 'Hectopascals', value: 'pressurehpa' },
{ text: 'Kilopascals', value: 'pressurekpa' }, { label: 'Kilopascals', value: 'pressurekpa' },
{ text: 'Inches of mercury', value: 'pressurehg' }, { label: 'Inches of mercury', value: 'pressurehg' },
{ text: 'PSI', value: 'pressurepsi' }, { label: 'PSI', value: 'pressurepsi' },
], ],
}, },
{ {
text: 'force', label: 'force',
submenu: [ options: [
{ text: 'Newton-meters (Nm)', value: 'forceNm' }, { label: 'Newton-meters (Nm)', value: 'forceNm' },
{ text: 'Kilonewton-meters (kNm)', value: 'forcekNm' }, { label: 'Kilonewton-meters (kNm)', value: 'forcekNm' },
{ text: 'Newtons (N)', value: 'forceN' }, { label: 'Newtons (N)', value: 'forceN' },
{ text: 'Kilonewtons (kN)', value: 'forcekN' }, { label: 'Kilonewtons (kN)', value: 'forcekN' },
], ],
}, },
{ {
text: 'flow', label: 'flow',
submenu: [ options: [
{ text: 'Gallons/min (gpm)', value: 'flowgpm' }, { label: 'Gallons/min (gpm)', value: 'flowgpm' },
{ text: 'Cubic meters/sec (cms)', value: 'flowcms' }, { label: 'Cubic meters/sec (cms)', value: 'flowcms' },
{ text: 'Cubic feet/sec (cfs)', value: 'flowcfs' }, { label: 'Cubic feet/sec (cfs)', value: 'flowcfs' },
{ text: 'Cubic feet/min (cfm)', value: 'flowcfm' }, { label: 'Cubic feet/min (cfm)', value: 'flowcfm' },
{ text: 'Litre/hour', value: 'litreh' }, { label: 'Litre/hour', value: 'litreh' },
{ text: 'Litre/min (l/min)', value: 'flowlpm' }, { label: 'Litre/min (l/min)', value: 'flowlpm' },
{ text: 'milliLitre/min (mL/min)', value: 'flowmlpm' }, { label: 'milliLitre/min (mL/min)', value: 'flowmlpm' },
], ],
}, },
{ {
text: 'angle', label: 'angle',
submenu: [ options: [
{ text: 'Degrees (°)', value: 'degree' }, { label: 'Degrees (°)', value: 'degree' },
{ text: 'Radians', value: 'radian' }, { label: 'Radians', value: 'radian' },
{ text: 'Gradian', value: 'grad' }, { label: 'Gradian', value: 'grad' },
], ],
}, },
{ {
text: 'acceleration', label: 'acceleration',
submenu: [ options: [
{ text: 'Meters/sec²', value: 'accMS2' }, { label: 'Meters/sec²', value: 'accMS2' },
{ text: 'Feet/sec²', value: 'accFS2' }, { label: 'Feet/sec²', value: 'accFS2' },
{ text: 'G unit', value: 'accG' }, { label: 'G unit', value: 'accG' },
], ],
}, },
{ {
text: 'radiation', label: 'radiation',
submenu: [ options: [
{ text: 'Becquerel (Bq)', value: 'radbq' }, { label: 'Becquerel (Bq)', value: 'radbq' },
{ text: 'curie (Ci)', value: 'radci' }, { label: 'curie (Ci)', value: 'radci' },
{ text: 'Gray (Gy)', value: 'radgy' }, { label: 'Gray (Gy)', value: 'radgy' },
{ text: 'rad', value: 'radrad' }, { label: 'rad', value: 'radrad' },
{ text: 'Sievert (Sv)', value: 'radsv' }, { label: 'Sievert (Sv)', value: 'radsv' },
{ text: 'rem', value: 'radrem' }, { label: 'rem', value: 'radrem' },
{ text: 'Exposure (C/kg)', value: 'radexpckg' }, { label: 'Exposure (C/kg)', value: 'radexpckg' },
{ text: 'roentgen (R)', value: 'radr' }, { label: 'roentgen (R)', value: 'radr' },
{ text: 'Sievert/hour (Sv/h)', value: 'radsvh' }, { label: 'Sievert/hour (Sv/h)', value: 'radsvh' },
], ],
}, },
{ {
text: 'concentration', label: 'concentration',
submenu: [ options: [
{ text: 'parts-per-million (ppm)', value: 'ppm' }, { label: 'parts-per-million (ppm)', value: 'ppm' },
{ text: 'parts-per-billion (ppb)', value: 'conppb' }, { label: 'parts-per-billion (ppb)', value: 'conppb' },
{ text: 'nanogram per cubic metre (ng/m³)', value: 'conngm3' }, { label: 'nanogram per cubic metre (ng/m³)', value: 'conngm3' },
{ text: 'nanogram per normal cubic metre (ng/Nm³)', value: 'conngNm3' }, { label: 'nanogram per normal cubic metre (ng/Nm³)', value: 'conngNm3' },
{ text: 'microgram per cubic metre (μg/m³)', value: 'conμgm3' }, { label: 'microgram per cubic metre (μg/m³)', value: 'conμgm3' },
{ text: 'microgram per normal cubic metre (μg/Nm³)', value: 'conμgNm3' }, { label: 'microgram per normal cubic metre (μg/Nm³)', value: 'conμgNm3' },
{ text: 'milligram per cubic metre (mg/m³)', value: 'conmgm3' }, { label: 'milligram per cubic metre (mg/m³)', value: 'conmgm3' },
{ text: 'milligram per normal cubic metre (mg/Nm³)', value: 'conmgNm3' }, { label: 'milligram per normal cubic metre (mg/Nm³)', value: 'conmgNm3' },
{ text: 'gram per cubic metre (g/m³)', value: 'congm3' }, { label: 'gram per cubic metre (g/m³)', value: 'congm3' },
{ text: 'gram per normal cubic metre (g/Nm³)', value: 'congNm3' }, { label: 'gram per normal cubic metre (g/Nm³)', value: 'congNm3' },
], ],
}, },
]; ];
......
...@@ -27,7 +27,7 @@ export class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> { ...@@ -27,7 +27,7 @@ export class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> {
<div> <div>
<div className="section gf-form-group"> <div className="section gf-form-group">
<h5 className="page-heading">Units</h5> <h5 className="page-heading">Units</h5>
<UnitPicker width={20} onSelected={() => {}} /> <UnitPicker onSelected={() => {}} />
</div> </div>
</div> </div>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment