mirror of
https://github.com/grafana/grafana.git
synced 2026-07-29 15:59:50 -05:00
Merge remote-tracking branch 'upstream/master' into prometheus-heatmap
This commit is contained in:
@@ -8,6 +8,7 @@ export function geminiScrollbar() {
|
||||
link: function(scope, elem, attrs) {
|
||||
let scrollbar = new PerfectScrollbar(elem[0], {
|
||||
wheelPropagation: true,
|
||||
wheelSpeed: 3,
|
||||
});
|
||||
let lastPos = 0;
|
||||
|
||||
|
||||
@@ -1,73 +1,78 @@
|
||||
<a class="sidemenu__logo" ng-click="ctrl.toggleSideMenu()">
|
||||
<img src="public/img/grafana_icon.svg"></img>
|
||||
<img src="public/img/grafana_icon.svg"></img>
|
||||
</a>
|
||||
|
||||
<a class="sidemenu__logo_small_breakpoint" ng-click="ctrl.toggleSideMenuSmallBreakpoint()">
|
||||
<i class="fa fa-bars"></i>
|
||||
<span class="sidemenu__close"><i class="fa fa-times"></i> Close</span>
|
||||
<span class="sidemenu__close">
|
||||
<i class="fa fa-times"></i> Close</span>
|
||||
</a>
|
||||
|
||||
<div class="sidemenu__top">
|
||||
<div ng-repeat="item in ::ctrl.mainLinks" class="sidemenu-item dropdown">
|
||||
<a href="{{::item.url}}" class="sidemenu-link" target="{{::item.target}}">
|
||||
<span class="icon-circle sidemenu-icon">
|
||||
<i class="{{::item.icon}}" ng-show="::item.icon"></i>
|
||||
<img ng-src="{{::item.img}}" ng-show="::item.img">
|
||||
</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu--sidemenu" role="menu" ng-if="::item.children">
|
||||
<li class="side-menu-header">
|
||||
<span class="sidemenu-item-text">{{::item.text}}</span>
|
||||
</li>
|
||||
<li ng-repeat="child in ::item.children" ng-class="{divider: child.divider}">
|
||||
<a href="{{::child.url}}">
|
||||
<i class="{{::child.icon}}" ng-show="::child.icon"></i>
|
||||
{{::child.text}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div ng-repeat="item in ::ctrl.mainLinks" class="sidemenu-item dropdown">
|
||||
<a href="{{::item.url}}" class="sidemenu-link" target="{{::item.target}}">
|
||||
<span class="icon-circle sidemenu-icon">
|
||||
<i class="{{::item.icon}}" ng-show="::item.icon"></i>
|
||||
<img ng-src="{{::item.img}}" ng-show="::item.img">
|
||||
</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu--sidemenu" role="menu" ng-if="::item.children">
|
||||
<li class="side-menu-header">
|
||||
<span class="sidemenu-item-text">{{::item.text}}</span>
|
||||
</li>
|
||||
<li ng-repeat="child in ::item.children" ng-class="{divider: child.divider}">
|
||||
<a href="{{::child.url}}">
|
||||
<i class="{{::child.icon}}" ng-show="::child.icon"></i>
|
||||
{{::child.text}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidemenu__bottom">
|
||||
<div ng-show="::!ctrl.isSignedIn" class="sidemenu-item">
|
||||
<a href="{{ctrl.loginUrl}}" class="sidemenu-link" target="_self">
|
||||
<span class="icon-circle sidemenu-icon"><i class="fa fa-fw fa-sign-in"></i></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu--sidemenu" role="menu">
|
||||
<li class="side-menu-header">
|
||||
<span class="sidemenu-item-text">Sign In</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div ng-show="::!ctrl.isSignedIn" class="sidemenu-item">
|
||||
<a href="{{ctrl.loginUrl}}" class="sidemenu-link" target="_self">
|
||||
<span class="icon-circle sidemenu-icon">
|
||||
<i class="fa fa-fw fa-sign-in"></i>
|
||||
</span>
|
||||
</a>
|
||||
<a href="{{ctrl.loginUrl}}">
|
||||
<ul class="dropdown-menu dropdown-menu--sidemenu" role="menu">
|
||||
<li class="side-menu-header">
|
||||
<span class="sidemenu-item-text">Sign In</span>
|
||||
</li>
|
||||
</ul>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="item in ::ctrl.bottomNav" class="sidemenu-item dropdown dropup">
|
||||
<a href="{{::item.url}}" class="sidemenu-link" target="{{::item.target}}">
|
||||
<span class="icon-circle sidemenu-icon">
|
||||
<i class="{{::item.icon}}" ng-show="::item.icon"></i>
|
||||
<img ng-src="{{::item.img}}" ng-show="::item.img">
|
||||
</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu--sidemenu" role="menu">
|
||||
<li ng-if="item.showOrgSwitcher" class="sidemenu-org-switcher">
|
||||
<a ng-click="ctrl.switchOrg()">
|
||||
<div>
|
||||
<div class="sidemenu-org-switcher__org-name">{{ctrl.contextSrv.user.orgName}}</div>
|
||||
<div class="sidemenu-org-switcher__org-current">Current Org:</div>
|
||||
</div>
|
||||
<div class="sidemenu-org-switcher__switch"><i class="fa fa-fw fa-random"></i>Switch</div>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-repeat="child in ::item.children" ng-class="{divider: child.divider}" ng-hide="::child.hideFromMenu">
|
||||
<a href="{{::child.url}}" target="{{::child.target}}" ng-click="ctrl.itemClicked(child, $event)">
|
||||
<i class="{{::child.icon}}" ng-show="::child.icon"></i>
|
||||
{{::child.text}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="side-menu-header">
|
||||
<span class="sidemenu-item-text">{{::item.text}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div ng-repeat="item in ::ctrl.bottomNav" class="sidemenu-item dropdown dropup">
|
||||
<a href="{{::item.url}}" class="sidemenu-link" target="{{::item.target}}">
|
||||
<span class="icon-circle sidemenu-icon">
|
||||
<i class="{{::item.icon}}" ng-show="::item.icon"></i>
|
||||
<img ng-src="{{::item.img}}" ng-show="::item.img">
|
||||
</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu--sidemenu" role="menu">
|
||||
<li ng-if="item.showOrgSwitcher" class="sidemenu-org-switcher">
|
||||
<a ng-click="ctrl.switchOrg()">
|
||||
<div>
|
||||
<div class="sidemenu-org-switcher__org-name">{{ctrl.contextSrv.user.orgName}}</div>
|
||||
<div class="sidemenu-org-switcher__org-current">Current Org:</div>
|
||||
</div>
|
||||
<div class="sidemenu-org-switcher__switch">
|
||||
<i class="fa fa-fw fa-random"></i>Switch</div>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-repeat="child in ::item.children" ng-class="{divider: child.divider}" ng-hide="::child.hideFromMenu">
|
||||
<a href="{{::child.url}}" target="{{::child.target}}" ng-click="ctrl.itemClicked(child, $event)">
|
||||
<i class="{{::child.icon}}" ng-show="::child.icon"></i>
|
||||
{{::child.text}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="side-menu-header">
|
||||
<span class="sidemenu-item-text">{{::item.text}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -455,7 +455,7 @@ kbn.valueFormats.decgbytes = kbn.formatBuilders.decimalSIPrefix('B', 3);
|
||||
// Data Rate
|
||||
kbn.valueFormats.pps = kbn.formatBuilders.decimalSIPrefix('pps');
|
||||
kbn.valueFormats.bps = kbn.formatBuilders.decimalSIPrefix('bps');
|
||||
kbn.valueFormats.Bps = kbn.formatBuilders.decimalSIPrefix('Bps');
|
||||
kbn.valueFormats.Bps = kbn.formatBuilders.decimalSIPrefix('B/s');
|
||||
kbn.valueFormats.KBs = kbn.formatBuilders.decimalSIPrefix('Bs', 1);
|
||||
kbn.valueFormats.Kbits = kbn.formatBuilders.decimalSIPrefix('bps', 1);
|
||||
kbn.valueFormats.MBs = kbn.formatBuilders.decimalSIPrefix('Bs', 2);
|
||||
@@ -464,13 +464,13 @@ kbn.valueFormats.GBs = kbn.formatBuilders.decimalSIPrefix('Bs', 3);
|
||||
kbn.valueFormats.Gbits = kbn.formatBuilders.decimalSIPrefix('bps', 3);
|
||||
|
||||
// Hash Rate
|
||||
kbn.valueFormats.Hs = kbn.formatBuilders.decimalSIPrefix('H/s');
|
||||
kbn.valueFormats.KHs = kbn.formatBuilders.decimalSIPrefix('H/s', 1);
|
||||
kbn.valueFormats.MHs = kbn.formatBuilders.decimalSIPrefix('H/s', 2);
|
||||
kbn.valueFormats.GHs = kbn.formatBuilders.decimalSIPrefix('H/s', 3);
|
||||
kbn.valueFormats.THs = kbn.formatBuilders.decimalSIPrefix('H/s', 4);
|
||||
kbn.valueFormats.PHs = kbn.formatBuilders.decimalSIPrefix('H/s', 5);
|
||||
kbn.valueFormats.EHs = kbn.formatBuilders.decimalSIPrefix('H/s', 6);
|
||||
kbn.valueFormats.Hs = kbn.formatBuilders.decimalSIPrefix('H/s');
|
||||
kbn.valueFormats.KHs = kbn.formatBuilders.decimalSIPrefix('H/s', 1);
|
||||
kbn.valueFormats.MHs = kbn.formatBuilders.decimalSIPrefix('H/s', 2);
|
||||
kbn.valueFormats.GHs = kbn.formatBuilders.decimalSIPrefix('H/s', 3);
|
||||
kbn.valueFormats.THs = kbn.formatBuilders.decimalSIPrefix('H/s', 4);
|
||||
kbn.valueFormats.PHs = kbn.formatBuilders.decimalSIPrefix('H/s', 5);
|
||||
kbn.valueFormats.EHs = kbn.formatBuilders.decimalSIPrefix('H/s', 6);
|
||||
|
||||
// Throughput
|
||||
kbn.valueFormats.ops = kbn.formatBuilders.simpleCountUnit('ops');
|
||||
@@ -571,6 +571,17 @@ kbn.valueFormats.degree = kbn.formatBuilders.fixedUnit('°');
|
||||
kbn.valueFormats.radian = kbn.formatBuilders.fixedUnit('rad');
|
||||
kbn.valueFormats.grad = kbn.formatBuilders.fixedUnit('grad');
|
||||
|
||||
// Radiation
|
||||
kbn.valueFormats.radbq = kbn.formatBuilders.decimalSIPrefix('Bq');
|
||||
kbn.valueFormats.radci = kbn.formatBuilders.decimalSIPrefix('Ci');
|
||||
kbn.valueFormats.radgy = kbn.formatBuilders.decimalSIPrefix('Gy');
|
||||
kbn.valueFormats.radrad = kbn.formatBuilders.decimalSIPrefix('rad');
|
||||
kbn.valueFormats.radsv = kbn.formatBuilders.decimalSIPrefix('Sv');
|
||||
kbn.valueFormats.radrem = kbn.formatBuilders.decimalSIPrefix('rem');
|
||||
kbn.valueFormats.radexpckg = kbn.formatBuilders.decimalSIPrefix('C/kg');
|
||||
kbn.valueFormats.radr = kbn.formatBuilders.decimalSIPrefix('R');
|
||||
kbn.valueFormats.radsvh = kbn.formatBuilders.decimalSIPrefix('Sv/h');
|
||||
|
||||
// Time
|
||||
kbn.valueFormats.hertz = kbn.formatBuilders.decimalSIPrefix('Hz');
|
||||
|
||||
@@ -772,6 +783,10 @@ kbn.valueFormats.dtdurations = function(size, decimals) {
|
||||
return kbn.toDuration(size, decimals, 'second');
|
||||
};
|
||||
|
||||
kbn.valueFormats.timeticks = function(size, decimals, scaledDecimals) {
|
||||
return kbn.valueFormats.s(size / 100, decimals, scaledDecimals);
|
||||
};
|
||||
|
||||
kbn.valueFormats.dateTimeAsIso = function(epoch) {
|
||||
var time = moment(epoch);
|
||||
|
||||
@@ -843,6 +858,7 @@ kbn.getUnitFormats = function() {
|
||||
{ text: 'days (d)', value: 'd' },
|
||||
{ text: 'duration (ms)', value: 'dtdurationms' },
|
||||
{ text: 'duration (s)', value: 'dtdurations' },
|
||||
{ text: 'Timeticks (s/100)', value: 'timeticks' },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -890,13 +906,13 @@ kbn.getUnitFormats = function() {
|
||||
{
|
||||
text: 'hash rate',
|
||||
submenu: [
|
||||
{text: 'hashes/sec', value: 'Hs'},
|
||||
{text: 'kilohashes/sec', value: 'KHs'},
|
||||
{text: 'megahashes/sec', value: 'MHs'},
|
||||
{text: 'gigahashes/sec', value: 'GHs'},
|
||||
{text: 'terahashes/sec', value: 'THs'},
|
||||
{text: 'petahashes/sec', value: 'PHs'},
|
||||
{text: 'exahashes/sec', value: 'EHs'},
|
||||
{ text: 'hashes/sec', value: 'Hs' },
|
||||
{ text: 'kilohashes/sec', value: 'KHs' },
|
||||
{ text: 'megahashes/sec', value: 'MHs' },
|
||||
{ text: 'gigahashes/sec', value: 'GHs' },
|
||||
{ text: 'terahashes/sec', value: 'THs' },
|
||||
{ text: 'petahashes/sec', value: 'PHs' },
|
||||
{ text: 'exahashes/sec', value: 'EHs' },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -1036,6 +1052,20 @@ kbn.getUnitFormats = function() {
|
||||
{ text: 'G unit', value: 'accG' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'radiation',
|
||||
submenu: [
|
||||
{ text: 'Becquerel (Bq)', value: 'radbq' },
|
||||
{ text: 'curie (Ci)', value: 'radci' },
|
||||
{ text: 'Gray (Gy)', value: 'radgy' },
|
||||
{ text: 'rad', value: 'radrad' },
|
||||
{ text: 'Sievert (Sv)', value: 'radsv' },
|
||||
{ text: 'rem', value: 'radrem' },
|
||||
{ text: 'Exposure (C/kg)', value: 'radexpckg' },
|
||||
{ text: 'roentgen (R)', value: 'radr' },
|
||||
{ text: 'Sievert/hour (Sv/h)', value: 'radsvh' },
|
||||
],
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user