Added all unit formats to new unit selector, #1331

pull/1341/head
Torkel Ödegaard 11 years ago
parent 3dc30e4d8b
commit 3a27b610d5
  1. 19
      src/app/components/kbn.js
  2. 6
      src/app/panels/graph/axisEditor.html

@ -492,6 +492,7 @@ function($, _, moment) {
submenu: [
{text: 'none' , value: 'none'},
{text: 'short', value: 'short'},
{text: 'percent', value: 'percent'},
]
},
{
@ -500,16 +501,32 @@ function($, _, moment) {
{text: 'nanoseconds (ns)' , value: 'ns'},
{text: 'microseconds (µs)', value: 'µs'},
{text: 'milliseconds (ms)', value: 'ms'},
{text: 'seconds (s)', value: 's'},
]
},
{
text: 'data',
submenu: [
{text: 'bit', value: 'bit'},
{text: 'bits', value: 'bits'},
{text: 'bytes', value: 'bytes'},
{text: 'kilobytes', value: 'kbytes'},
]
},
{
text: 'data rate',
submenu: [
{text: 'bits/sec', value: 'bps'},
{text: 'bytes/sec', value: 'Bps'},
]
},
{
text: 'energy',
submenu: [
{text: 'watt', value: 'watt'},
{text: 'joule', value: 'joule'},
{text: 'eV', value: 'ev'},
]
},
];
};

@ -10,7 +10,7 @@
<li class="grafana-target-segment">
Unit
</li>
<li class="dropdown" style="width: 150px;"
<li class="dropdown" style="width: 140px;"
ng-model="panel.y_formats[0]"
dropdown-typeahead="unitFormats"
dropdown-typeahead-on-select="setUnitFormat(0, $subItem)">
@ -47,7 +47,7 @@
<li class="grafana-target-segment">
Unit
</li>
<li class="dropdown" style="width: 150px"
<li class="dropdown" style="width: 140px"
ng-model="panel.y_formats[1]"
dropdown-typeahead="unitFormats"
dropdown-typeahead-on-select="setUnitFormat(1, $subItem)">
@ -104,7 +104,7 @@
<input type="text" class="input-small grafana-target-segment-input">
</li>
<li class="grafana-target-segment">
<spectrum-picker ng-model="panel.grid.threshold1Color" ng-change="render()" ></spectrum-picker>
<spectrum-picker ng-model="panel.grid.threshold2Color" ng-change="render()" ></spectrum-picker>
</li>
<li class="grafana-target-segment">
Line mode

Loading…
Cancel
Save