Commit 3a27b610 by Torkel Ödegaard

Added all unit formats to new unit selector, #1331

parent 3dc30e4d
......@@ -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
......
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