Skip to content

Commit e23f898

Browse files
committed
ux(dashboard): minor tweaks and polish, added g a shortcut for go to alerting list
1 parent cdea420 commit e23f898

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

public/app/core/components/search/search.html

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,13 @@
2727
</div>
2828

2929
<div class="search-results-container" ng-if="ctrl.tagsMode">
30-
<div class="row">
31-
<div class="span6 offset1">
32-
<div ng-repeat="tag in ctrl.results" class="pointer" style="width: 180px; float: left;"
33-
ng-class="{'selected': $index === ctrl.selectedIndex }"
34-
ng-click="ctrl.filterByTag(tag.term, $event)">
35-
<a class="search-result-tag label label-tag" tag-color-from-name="tag.term">
36-
<i class="fa fa-tag"></i>
37-
<span>{{tag.term}} &nbsp;({{tag.count}})</span>
38-
</a>
39-
</div>
40-
</div>
30+
<div ng-repeat="tag in ctrl.results" class="pointer" style="width: 180px; float: left;"
31+
ng-class="{'selected': $index === ctrl.selectedIndex }"
32+
ng-click="ctrl.filterByTag(tag.term, $event)">
33+
<a class="search-result-tag label label-tag" tag-color-from-name="tag.term">
34+
<i class="fa fa-tag"></i>
35+
<span>{{tag.term}} &nbsp;({{tag.count}})</span>
36+
</a>
4137
</div>
4238
</div>
4339

public/app/core/services/keybindingSrv.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class KeybindingSrv {
1111
helpModal: boolean;
1212

1313
/** @ngInject */
14-
constructor(private $rootScope, private $modal, private $location) {
14+
constructor(private $rootScope, private $modal, private $location, private contextSrv) {
1515
// clear out all shortcuts on route change
1616
$rootScope.$on('$routeChangeSuccess', () => {
1717
Mousetrap.reset();
@@ -26,6 +26,7 @@ export class KeybindingSrv {
2626
setupGlobal() {
2727
this.bind("?", this.showHelpModal);
2828
this.bind("g h", this.goToHome);
29+
this.bind("g a", this.openAlerting);
2930
this.bind("g p", this.goToProfile);
3031
this.bind("s s", this.openSearchStarred);
3132
this.bind(['f'], this.openSearch);
@@ -39,12 +40,16 @@ export class KeybindingSrv {
3940
this.$rootScope.appEvent('show-dash-search');
4041
}
4142

43+
openAlerting() {
44+
this.$location.url("/alerting");
45+
}
46+
4247
goToHome() {
43-
this.$location.path("/");
48+
this.$location.url("/");
4449
}
4550

4651
goToProfile() {
47-
this.$location.path("/profile");
52+
this.$location.url("/profile");
4853
}
4954

5055
showHelpModal() {

public/app/features/panel/panel_ctrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class PanelCtrl {
155155
if (this.fullscreen) {
156156
var docHeight = $(window).height();
157157
var editHeight = Math.floor(docHeight * 0.4);
158-
var fullscreenHeight = Math.floor(docHeight * 0.6);
158+
var fullscreenHeight = Math.floor(docHeight * 0.8);
159159
this.containerHeight = this.editMode ? editHeight : fullscreenHeight;
160160
} else {
161161
this.containerHeight = this.panel.height || this.row.height;

public/app/features/panel/panel_directive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ module.directive('grafanaPanel', function($rootScope) {
133133
}
134134
}, scope);
135135

136-
panelContainer.on('mouseenter', mouseEnter);
137-
panelContainer.on('mouseleave', mouseLeave);
136+
elem.on('mouseenter', mouseEnter);
137+
elem.on('mouseleave', mouseLeave);
138138

139139
scope.$on('$destroy', function() {
140-
panelContainer.off();
140+
elem.off();
141141
});
142142
}
143143
};

public/sass/pages/_dashboard.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ div.flot-text {
156156
}
157157

158158
.panel-hover-highlight {
159-
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 1px rgba(82,168,236,10.8)
159+
box-shadow: inset 0 1px 1px rgba(0,0,0,0.025), 0 0 1px rgba(82,168,236,0.5)
160160
}
161161

162162
.on-drag-hover {

0 commit comments

Comments
 (0)