mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Fixed view mode switching keyboard shortcuts (#2471)
* Replaced toggleGridMode with working actions. * Addressed @foot's comment.
This commit is contained in:
@@ -12,8 +12,20 @@ import Status from './status';
|
||||
import Topologies from './topologies';
|
||||
import TopologyOptions from './topology-options';
|
||||
import { getApiDetails, getTopologies } from '../utils/web-api-utils';
|
||||
import { focusSearch, pinNextMetric, hitBackspace, hitEnter, hitEsc, unpinMetric,
|
||||
selectMetric, toggleHelp, toggleGridMode, shutdown } from '../actions/app-actions';
|
||||
import {
|
||||
focusSearch,
|
||||
pinNextMetric,
|
||||
hitBackspace,
|
||||
hitEnter,
|
||||
hitEsc,
|
||||
unpinMetric,
|
||||
selectMetric,
|
||||
toggleHelp,
|
||||
setGraphView,
|
||||
setTableView,
|
||||
setResourceView,
|
||||
shutdown
|
||||
} from '../actions/app-actions';
|
||||
import Details from './details';
|
||||
import Nodes from './nodes';
|
||||
import ViewModeSelector from './view-mode-selector';
|
||||
@@ -92,8 +104,12 @@ class App extends React.Component {
|
||||
dispatch(pinNextMetric(-1));
|
||||
} else if (char === '>') {
|
||||
dispatch(pinNextMetric(1));
|
||||
} else if (char === 't' || char === 'g') {
|
||||
dispatch(toggleGridMode());
|
||||
} else if (char === 'g') {
|
||||
dispatch(setGraphView());
|
||||
} else if (char === 't') {
|
||||
dispatch(setTableView());
|
||||
} else if (char === 'r') {
|
||||
dispatch(setResourceView());
|
||||
} else if (char === 'q') {
|
||||
dispatch(unpinMetric());
|
||||
dispatch(selectMetric(null));
|
||||
|
||||
@@ -10,8 +10,9 @@ const GENERAL_SHORTCUTS = [
|
||||
{key: 'esc', label: 'Close active panel'},
|
||||
{key: '/', label: 'Activate search field'},
|
||||
{key: '?', label: 'Toggle shortcut menu'},
|
||||
{key: 't', label: 'Toggle Table mode'},
|
||||
{key: 'g', label: 'Toggle Graph mode'},
|
||||
{key: 'g', label: 'Switch to Graph view'},
|
||||
{key: 't', label: 'Switch to Table view'},
|
||||
{key: 'r', label: 'Switch to Resources view'},
|
||||
];
|
||||
|
||||
|
||||
|
||||
@@ -1638,7 +1638,7 @@
|
||||
box-shadow: inset 0 -1px 0 #bbb;
|
||||
}
|
||||
div.key {
|
||||
width: 80px;
|
||||
width: 60px;
|
||||
display: inline-block;
|
||||
}
|
||||
div.label {
|
||||
|
||||
Reference in New Issue
Block a user