moved exluded keys to external file

This commit is contained in:
JuanCarlos 2018-11-27 11:30:45 +01:00
parent 64d96ea00a
commit 852627be70
2 changed files with 19 additions and 7 deletions

View File

@ -11,6 +11,7 @@
*/
import CodeMirror from '../../utils/codemirror/lib/codemirror';
import jsonLint from '../../utils/codemirror/json-lint';
import { ExcludedIntelliSenseTriggerKeys } from '../../util/excluded-devtools-autocomplete-keys';
import queryString from 'querystring-browser';
import $ from 'jquery';
@ -249,13 +250,6 @@ export class DevToolsController {
init() {
this.apiInputBox.setSize('auto', '100%');
const ExcludedIntelliSenseTriggerKeys = {
'9': 'tab', '13': 'enter', '16': 'shift', '17': 'ctrl', '18': 'alt', '19': 'pause', '20': 'capslock',
'27': 'escape', '33': 'pageup', '34': 'pagedown', '35': 'end', '36': 'home', '37': 'left', '38': 'up',
'39': 'right', '40': 'down', '45': 'insert', '91': 'left window key', '92': 'right window key', '93': 'select',
'112': 'f1', '113': 'f2', '114': 'f3', '115': 'f4', '116': 'f5', '117': 'f6', '118': 'f7', '119': 'f8',
'120': 'f9', '121': 'f10', '122': 'f11', '123': 'f12', '144': 'numlock', '145': 'scrolllock'
};
this.apiInputBox.model = [];
this.getAvailableMethods();
this.apiInputBox.on('keyup', function (cm, e) {

View File

@ -0,0 +1,18 @@
/*
* Wazuh app - Wazuh DevTools autocomplete excluded keys
* Copyright (C) 2018 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Find more information about this on the LICENSE file.
*/
export const ExcludedIntelliSenseTriggerKeys = {
'9': 'tab', '13': 'enter', '16': 'shift', '17': 'ctrl', '18': 'alt', '19': 'pause', '20': 'capslock',
'27': 'escape', '33': 'pageup', '34': 'pagedown', '35': 'end', '36': 'home', '37': 'left', '38': 'up',
'39': 'right', '40': 'down', '45': 'insert', '91': 'left window key', '92': 'right window key', '93': 'select',
'112': 'f1', '113': 'f2', '114': 'f3', '115': 'f4', '116': 'f5', '117': 'f6', '118': 'f7', '119': 'f8',
'120': 'f9', '121': 'f10', '122': 'f11', '123': 'f12', '144': 'numlock', '145': 'scrolllock'
};