The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grafana/public/app/core/components/help/help.ts

65 lines
2.1 KiB

///<reference path="../../../headers/common.d.ts" />
import coreModule from '../../core_module';
import appEvents from 'app/core/app_events';
export class HelpCtrl {
tabIndex: any;
shortcuts: any;
/** @ngInject */
constructor(private $scope, $sce) {
this.tabIndex = 0;
this.shortcuts = {
'Global': [
{keys: ['g', 'h'], description: 'Go to Home Dashboard'},
{keys: ['g', 'p'], description: 'Go to Profile'},
{keys: ['s', 'o'], description: 'Open search'},
{keys: ['s', 's'], description: 'Open search with starred filter'},
{keys: ['s', 't'], description: 'Open search in tags view'},
{keys: ['esc'], description: 'Exit edit/setting views'},
],
'Focused Panel': [
{keys: ['e'], description: 'Toggle panel edit view'},
{keys: ['v'], description: 'Toggle panel fullscreen view'},
{keys: ['p', 's'], description: 'Open Panel Share Modal'},
{keys: ['p', 'r'], description: 'Remove Panel'},
],
'Focused Row': [
{keys: ['r', 'c'], description: 'Collapse Row'},
{keys: ['r', 'r'], description: 'Remove Row'},
],
'Dashboard': [
{keys: ['mod+s'], description: 'Save dashboard'},
{keys: ['mod+h'], description: 'Hide row controls'},
{keys: ['d', 'r'], description: 'Refresh all panels'},
{keys: ['d', 's'], description: 'Dashboard settings'},
{keys: ['mod+o'], description: 'Toggle shared graph crosshair'},
],
'Time Range': [
{keys: ['t', 'z'], description: 'Zoom out time range'},
{keys: ['t', '<i class="fa fa-long-arrow-left"></i>'], description: 'Move time range back'},
{keys: ['t', '<i class="fa fa-long-arrow-right"></i>'], description: 'Move time range forward'},
],
};
}
dismiss() {
appEvents.emit('hide-modal');
}
}
export function helpModal() {
return {
restrict: 'E',
templateUrl: 'public/app/core/components/help/help.html',
controller: HelpCtrl,
bindToController: true,
transclude: true,
controllerAs: 'ctrl',
scope: {},
};
}
coreModule.directive('helpModal', helpModal);