Created
May 30, 2017 18:49
-
-
Save w33ble/8e952cd314e197ca059fc7d62c241749 to your computer and use it in GitHub Desktop.
module.exports use in kibana
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Searching 2612 files for "module.exports" (regex) | |
src/cli/cluster/cluster_manager.js: | |
8 process.env.kbnWorkerType = 'managr'; | |
9 | |
10: module.exports = class ClusterManager { | |
11 constructor(opts = {}, settings = {}) { | |
12 this.log = new Log(opts.quiet, opts.silent); | |
src/cli/cluster/worker.js: | |
18 }; | |
19 | |
20: module.exports = class Worker extends EventEmitter { | |
21 constructor(opts) { | |
22 opts = opts || {}; | |
src/cli/command.js: | |
92 }); | |
93 | |
94: module.exports = Command; | |
95 | |
src/cli/log.js: | |
7 import { green, yellow, red } from './color'; | |
8 | |
9: module.exports = class Log { | |
10 constructor(quiet, silent) { | |
11 this.good = quiet || silent ? _.noop : _.partial(log, green); | |
src/cli/serve/serve.js: | |
73 } | |
74 | |
75: module.exports = function (program) { | |
76 const command = program.command('serve'); | |
77 | |
src/core_plugins/console/api_server/api.js: | |
43 }(Api.prototype)); | |
44 | |
45: module.exports = Api; | |
46 | |
src/core_plugins/console/api_server/es_5_0.js: | |
54 })(ES_5_0.prototype); | |
55 | |
56: module.exports = new ES_5_0(); | |
57 | |
src/core_plugins/console/api_server/es_5_0/aggregations.js: | |
436 } | |
437 }; | |
438: module.exports = function (api) { | |
439 | |
440 api.addGlobalAutocompleteRules('aggregations', rules); | |
src/core_plugins/console/api_server/es_5_0/aliases.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_post_aliases', { | |
3 methods: ['POST'], | |
src/core_plugins/console/api_server/es_5_0/cat.js: | |
33 } | |
34 | |
35: module.exports = function (api) { | |
36 addSimpleCat('_cat/aliases', api); | |
37 addSimpleCat('_cat/allocation', api, null, ['_cat/allocation', '_cat/allocation/{nodes}']); | |
src/core_plugins/console/api_server/es_5_0/cluster.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_cluster/nodes/stats'); | |
3 api.addEndpointDescription('_cluster/state', { | |
src/core_plugins/console/api_server/es_5_0/count.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_count', { | |
3 methods: ['GET', 'POST'], | |
src/core_plugins/console/api_server/es_5_0/document.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_get_doc', { | |
3 methods: ['GET'], | |
src/core_plugins/console/api_server/es_5_0/field_stats.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_field_stats', { | |
3 methods: ['GET', 'POST'], | |
src/core_plugins/console/api_server/es_5_0/filter.js: | |
331 }; | |
332 | |
333: module.exports = function (api) { | |
334 api.addGlobalAutocompleteRules('filter', filters); | |
335 }; | |
src/core_plugins/console/api_server/es_5_0/globals.js: | |
1: module.exports = function (api) { | |
2 api.addGlobalAutocompleteRules('highlight', { | |
3 pre_tags: {}, | |
src/core_plugins/console/api_server/es_5_0/indices.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_refresh', { | |
3 methods: ['POST'], | |
src/core_plugins/console/api_server/es_5_0/ingest.js: | |
330 }; | |
331 | |
332: module.exports = function (api) { | |
333 | |
334 // Note: this isn't an actual API endpoint. It exists so the forEach processor's "processor" field | |
src/core_plugins/console/api_server/es_5_0/mappings.js: | |
5 }; | |
6 | |
7: module.exports = function (api) { | |
8 api.addEndpointDescription('_get_mapping', { | |
9 methods: ['GET'], | |
src/core_plugins/console/api_server/es_5_0/nodes.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_nodes/hot_threads', { | |
3 methods: ['GET'], | |
src/core_plugins/console/api_server/es_5_0/percolator.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_put_percolator', { | |
3 priority: 10, // to override doc | |
src/core_plugins/console/api_server/es_5_0/query.js: | |
68 }; | |
69 | |
70: module.exports = function (api) { | |
71 api.addGlobalAutocompleteRules('query', { | |
72 match: { | |
src/core_plugins/console/api_server/es_5_0/reindex.js: | |
1: module.exports = function (api) { | |
2 | |
3 api.addEndpointDescription('_post_reindex', { | |
src/core_plugins/console/api_server/es_5_0/search.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_search', { | |
3 methods: ['GET', 'POST'], | |
src/core_plugins/console/api_server/es_5_0/settings.js: | |
1: module.exports = function (api) { | |
2 | |
3 api.addEndpointDescription('_get_settings', { | |
src/core_plugins/console/api_server/es_5_0/snapshot_restore.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('restore_snapshot', { | |
3 methods: ['POST'], | |
src/core_plugins/console/api_server/es_5_0/templates.js: | |
1: module.exports = function (api) { | |
2 api.addEndpointDescription('_delete_template', { | |
3 methods: ['DELETE'], | |
src/core_plugins/console/api_server/server.js: | |
1 let _ = require("lodash"); | |
2 | |
3: module.exports.resolveApi = function (sense_version, apis, reply) { | |
4 let result = {}; | |
5 _.each(apis, function (name) { | |
src/core_plugins/console/public/src/autocomplete.js: | |
11 var LAST_EVALUATED_TOKEN = null; | |
12 | |
13: module.exports = function (editor) { | |
14 | |
15 function isSeparatorToken(token) { | |
src/core_plugins/console/public/src/autocomplete/body_completer.js: | |
379 | |
380 // a list of component that match anything but give auto complete suggestions based on global API entries. | |
381: module.exports.globalsOnlyAutocompleteComponents = function () { | |
382 return [new GlobalOnlyComponent("__global__")]; | |
383 }; | |
... | |
396 * } | |
397 */ | |
398: module.exports.compileBodyDescription = function (endpoint_id, description, parametrizedComponentFactories) { | |
399 return compileDescription(description, new CompilingContext(endpoint_id, parametrizedComponentFactories)); | |
400 }; | |
src/core_plugins/console/public/src/autocomplete/engine.js: | |
1 let _ = require('lodash'); | |
2 | |
3: module.exports.AutocompleteComponent = function (name) { | |
4 this.name = name; | |
5 }; | |
. | |
8 * the resolving chain (and thus can suggest possible continuation paths) | |
9 */ | |
10: module.exports.AutocompleteComponent.prototype.getTerms = function () { | |
11 return []; | |
12 }; | |
.. | |
22 } | |
23 */ | |
24: module.exports.AutocompleteComponent.prototype.match = function () { | |
25 return { | |
26 next: this.next | |
.. | |
29 | |
30 function SharedComponent(name, parent) { | |
31: module.exports.AutocompleteComponent.call(this, name); | |
32 this._nextDict = {}; | |
33 if (parent) { | |
.. | |
39 | |
40 SharedComponent.prototype = _.create( | |
41: module.exports.AutocompleteComponent.prototype, | |
42 { 'constructor': SharedComponent }); | |
43 | |
44: module.exports.SharedComponent = SharedComponent; | |
45 | |
46 (function (cls) { | |
.. | |
70 | |
71 ListComponent.prototype = _.create(SharedComponent.prototype, { "constructor": ListComponent }); | |
72: module.exports.ListComponent = ListComponent; | |
73 | |
74 | |
.. | |
143 | |
144 SimpleParamComponent.prototype = _.create(SharedComponent.prototype, { "constructor": SimpleParamComponent }); | |
145: module.exports.SimpleParamComponent = SimpleParamComponent; | |
146 | |
147 (function (cls) { | |
... | |
164 | |
165 ConstantComponent.prototype = _.create(SharedComponent.prototype, { "constructor": ConstantComponent }); | |
166: module.exports.ConstantComponent = ConstantComponent; | |
167 | |
168 (function (cls) { | |
... | |
189 })(ConstantComponent.prototype); | |
190 | |
191: module.exports.wrapComponentWithDefaults = function (component, defaults) { | |
192 function Wrapper() { | |
193 | |
... | |
305 } | |
306 | |
307: module.exports.resolvePathToComponents = function (tokenPath, context, editor, components) { | |
308 var walkStates = walkTokenPath(tokenPath, [new WalkingState("ROOT", components, [])], context, editor); | |
309 var result = [].concat.apply([], _.pluck(walkStates, 'components')); | |
... | |
311 }; | |
312 | |
313: module.exports.populateContext = function (tokenPath, context, editor, includeAutoComplete, components) { | |
314 | |
315 var walkStates = walkTokenPath(tokenPath, [new WalkingState("ROOT", components, [])], context, editor); | |
src/core_plugins/console/public/src/autocomplete/url_params.js: | |
8 | |
9 ParamComponent.prototype = _.create(engine.ConstantComponent.prototype, { "constructor": ParamComponent }); | |
10: module.exports.ParamComponent = ParamComponent; | |
11 | |
12 (function (cls) { | |
.. | |
57 })(UrlParams.prototype); | |
58 | |
59: module.exports.UrlParams = UrlParams; | |
60 | |
src/core_plugins/console/public/src/autocomplete/url_pattern_matcher.js: | |
2 let engine = require('./engine'); | |
3 | |
4: module.exports.URL_PATH_END_MARKER = "__url_path_end__"; | |
5 | |
6 | |
. | |
15 | |
16 cls.match = function (token, context, editor) { | |
17: if (token !== module.exports.URL_PATH_END_MARKER) { | |
18 return null; | |
19 } | |
.. | |
122 })(UrlPatternMatcher.prototype); | |
123 | |
124: module.exports.UrlPatternMatcher = UrlPatternMatcher; | |
125 | |
src/core_plugins/console/public/src/es.js: | |
5 let esVersion = []; | |
6 | |
7: module.exports.getVersion = function () { | |
8 return esVersion; | |
9 }; | |
10 | |
11: module.exports.send = function (method, path, data) { | |
12 var wrappedDfd = $.Deferred(); | |
13 | |
.. | |
60 }; | |
61 | |
62: module.exports.constructESUrl = function (baseUri, path) { | |
63 baseUri = baseUri.replace(/\/+$/, ''); | |
64 path = path.replace(/^\/+/, ''); | |
src/core_plugins/console/public/src/history.js: | |
2 const storage = require('./storage'); | |
3 | |
4: const history = module.exports = { | |
5 restoreFromHistory() { | |
6 // default method for history.restoreFromHistory | |
src/core_plugins/console/public/src/input_resize.js: | |
2 const storage = require('./storage'); | |
3 | |
4: module.exports = function (input, output) { | |
5 | |
6 const $left = input.$el.parent(); | |
src/core_plugins/console/public/src/kb.js: | |
232 setActiveApi('es_5_0'); | |
233 | |
234: module.exports.setActiveApi = setActiveApi; | |
235: module.exports.getGlobalAutocompleteComponents = getGlobalAutocompleteComponents; | |
236: module.exports.getEndpointDescriptionByEndpoint = getEndpointDescriptionByEndpoint; | |
237: module.exports.getEndpointBodyCompleteComponents = getEndpointBodyCompleteComponents; | |
238: module.exports.getTopLevelUrlCompleteComponents = getTopLevelUrlCompleteComponents; | |
239: module.exports.getUnmatchedEndpointComponents = getUnmatchedEndpointComponents; | |
240 | |
241: module.exports._test = { | |
242 loadApisFromJson: loadApisFromJson | |
243 }; | |
src/core_plugins/console/public/src/kb/api.js: | |
74 | |
75 | |
76: module.exports = Api; | |
77 | |
src/core_plugins/console/public/src/mappings.js: | |
279 } | |
280 | |
281: module.exports = _.assign(mappingObj, { | |
282 getFields: getFields, | |
283 getIndices: getIndices, | |
src/core_plugins/console/public/src/sense_editor/editor.js: | |
634 } | |
635 | |
636: module.exports = SenseEditor; | |
637 | |
src/core_plugins/console/public/src/sense_editor/mode/input.js: | |
74 }).call(Mode.prototype); | |
75 | |
76: module.exports.Mode = Mode; | |
77 | |
src/core_plugins/console/public/src/sense_editor/mode/input_highlight_rules.js: | |
72 | |
73 | |
74: module.exports.InputHighlightRules = InputHighlightRules; | |
75 | |
src/core_plugins/console/public/src/sense_editor/mode/output.js: | |
29 }).call(Mode.prototype); | |
30 | |
31: module.exports.Mode = Mode; | |
32 | |
src/core_plugins/console/public/src/sense_editor/mode/output_highlight_rules.js: | |
31 oop.inherits(OutputJsonHighlightRules, JsonHighlightRules); | |
32 | |
33: module.exports.OutputJsonHighlightRules = OutputJsonHighlightRules; | |
34 | |
src/core_plugins/console/public/src/sense_editor/mode/worker.js: | |
55 if (!module.initialized) { | |
56 module.initialized = true; | |
57: module.exports = module.factory().exports; | |
58 } | |
59: return module.exports; | |
60 } | |
61 | |
.. | |
105 return req | |
106 case 'exports': | |
107: return module.exports | |
108 case 'module': | |
109 return module | |
... | |
113 })); | |
114 if (returnExports) | |
115: module.exports = returnExports; | |
116 return module; | |
117 } | |
src/core_plugins/console/public/src/sense_editor/mode/x_json_highlight_rules.js: | |
102 }; | |
103 | |
104: module.exports.addToRules = function (otherRules, embedUnder) { | |
105 otherRules.$rules = _.defaultsDeep(otherRules.$rules, jsonRules(embedUnder)); | |
106 otherRules.embedRules(ScriptHighlightRules, "script-", [{ | |
src/core_plugins/console/public/src/sense_editor/row_parser.js: | |
121 RowParser.prototype.MODE = MODE; | |
122 | |
123: module.exports = RowParser; | |
124 | |
src/core_plugins/console/public/src/smart_resize.js: | |
1 import { throttle } from 'lodash'; | |
2 | |
3: module.exports = function (editor) { | |
4 const resize = editor.resize; | |
5 return throttle(() => resize.call(editor), 35) | |
src/core_plugins/console/public/src/storage.js: | |
56 } | |
57 | |
58: module.exports = new Storage(localStorage, 'sense:'); | |
59 | |
src/core_plugins/console/public/src/utils.js: | |
99 } | |
100 | |
101: module.exports = utils; | |
102 | |
src/core_plugins/console/public/webpackShims/ace.js: | |
1 require('ace/ace.js'); | |
2: module.exports = window.consoleAce; | |
3 | |
src/core_plugins/console/public/webpackShims/ace/worker-json.js: | |
53 if (!module.initialized) { | |
54 module.initialized = true; | |
55: module.exports = module.factory().exports; | |
56 } | |
57: return module.exports; | |
58 } | |
59 | |
.. | |
101 switch(dep) { | |
102 case 'require': return req | |
103: case 'exports': return module.exports | |
104 case 'module': return module | |
105 default: return req(dep) | |
... | |
107 })); | |
108 if (returnExports) | |
109: module.exports = returnExports; | |
110 return module; | |
111 } | |
src/core_plugins/console/public/webpackShims/acequire.js: | |
1: module.exports = require('./ace').require; | |
2 | |
src/core_plugins/dev_mode/public/ng_mock.js: | |
10 } | |
11 | |
12: module.exports = angular.mock; | |
13 | |
src/core_plugins/elasticsearch/index.js: | |
14 const DEFAULT_REQUEST_HEADERS = [ 'authorization' ]; | |
15 | |
16: module.exports = function (kibana) { | |
17 return new kibana.Plugin({ | |
18 require: ['kibana'], | |
src/core_plugins/elasticsearch/lib/__tests__/find_port.js: | |
2 import portscanner from 'portscanner'; | |
3 | |
4: module.exports = function findPort(start, end, host) { | |
5 host = host || 'localhost'; | |
6 return new Promise(function (resolve, reject) { | |
src/core_plugins/elasticsearch/lib/__tests__/fixtures/mappings.js: | |
1: module.exports = { | |
2 '_default_': { | |
3 'dynamic': 'strict' | |
src/core_plugins/elasticsearch/lib/create_kibana_index.js: | |
1: module.exports = function (server, mappings) { | |
2 const { callWithInternalUser } = server.plugins.elasticsearch.getCluster('admin'); | |
3 const index = server.config().get('kibana.index'); | |
src/core_plugins/elasticsearch/lib/health_check.js: | |
17 const READY = 'ready'; | |
18 | |
19: module.exports = function (plugin, server, { mappings }) { | |
20 const config = server.config(); | |
21 const callAdminAsKibanaUser = server.plugins.elasticsearch.getCluster('admin').callWithInternalUser; | |
src/core_plugins/elasticsearch/lib/is_upgradeable.js: | |
2 const rcVersionRegex = /(\d+\.\d+\.\d+)\-rc(\d+)/i; | |
3 | |
4: module.exports = function (server, doc) { | |
5 const config = server.config(); | |
6 if (/alpha|beta|snapshot/i.test(doc._id)) return false; | |
src/core_plugins/elasticsearch/lib/migrate_config.js: | |
2 import upgrade from './upgrade_config'; | |
3 | |
4: module.exports = function (server, { mappings }) { | |
5 const config = server.config(); | |
6 const { callWithInternalUser } = server.plugins.elasticsearch.getCluster('admin'); | |
src/core_plugins/elasticsearch/lib/upgrade_config.js: | |
3 import _ from 'lodash'; | |
4 | |
5: module.exports = function (server) { | |
6 const { callWithInternalUser } = server.plugins.elasticsearch.getCluster('admin'); | |
7 const config = server.config(); | |
src/core_plugins/kibana/common/lib/convert_pattern_and_ingest_name.js: | |
4 // This module provides utility functions for easily converting between template and pattern names. | |
5 | |
6: module.exports = { | |
7 ingestToPattern: (templateName) => { | |
8 if (templateName.indexOf('kibana-') === -1) { | |
src/core_plugins/kibana/index.js: | |
17 const mkdirp = Promise.promisify(mkdirpNode); | |
18 | |
19: module.exports = function (kibana) { | |
20 const kbnBaseUrl = '/app/kibana'; | |
21 return new kibana.Plugin({ | |
src/core_plugins/kibana/server/lib/create_mappings_from_pattern_fields.js: | |
2 | |
3 // Creates an ES field mapping from a single field object in a kibana index pattern | |
4: module.exports = function createMappingsFromPatternFields(fields) { | |
5 if (_.isEmpty(fields)) { | |
6 throw new Error('argument must not be empty'); | |
src/core_plugins/kibana/server/lib/handle_es_error.js: | |
3 import { errors as esErrors } from 'elasticsearch'; | |
4 | |
5: module.exports = function handleESError(error) { | |
6 if (!(error instanceof Error)) { | |
7 throw new Error('Expected an instance of Error'); | |
src/core_plugins/kibana/server/lib/schemas/resources/index_pattern_schema.js: | |
1 import Joi from 'joi'; | |
2 | |
3: module.exports = Joi.object({ | |
4 id: Joi.string().required(), | |
5 title: Joi.string().required(), | |
src/core_plugins/kibana/server/lib/schemas/resources/ingest_config_schema.js: | |
2 import indexPatternSchema from './index_pattern_schema'; | |
3 | |
4: module.exports = Joi.object({ | |
5 index_pattern: indexPatternSchema.required() | |
6 }); | |
src/core_plugins/metrics/public/visualizations/lib/flot.js: | |
11 require('flot-charts/jquery.flot.threshold'); | |
12 require('flot-charts/jquery.flot.fillbetween'); | |
13: module.exports = $; | |
14 | |
src/core_plugins/metrics/server/lib/vis_data/helpers/calculate_auto.js: | |
53 } | |
54 | |
55: module.exports = { | |
56 near: find(revRoundingRules, function near(bound, interval, target) { | |
57 if (bound > target) return interval; | |
src/core_plugins/metrics/server/lib/vis_data/helpers/index.js: | |
12 import unitToSeconds from './unit_to_seconds'; | |
13 | |
14: module.exports = { | |
15 bucketTransform, | |
16 getAggValue, | |
src/core_plugins/status_page/public/lib/format_number.js: | |
3 import numeral from 'numeral'; | |
4 | |
5: module.exports = function formatNumber(num, which) { | |
6 let format = '0.00'; | |
7 let postfix = ''; | |
src/core_plugins/status_page/public/lib/make_chart_options.js: | |
2 import formatNumber from './format_number'; | |
3 | |
4: module.exports = function makeChartOptions(type) { | |
5 return { | |
6 chart: { | |
src/core_plugins/status_page/public/lib/read_stat_data.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function readStatData(data, seriesNames) { | |
4 // Metric Values format | |
5 // metric: [[xValue, yValue], ...] | |
src/core_plugins/tests_bundle/find_source_files.js: | |
36 findSourceFiles.cache = {}; | |
37 | |
38: module.exports = findSourceFiles; | |
39 | |
src/core_plugins/tests_bundle/tests_entry_template.js: | |
1: module.exports = function ({ env, bundle }) { | |
2 | |
3 const pluginSlug = env.pluginInfo.sort() | |
src/core_plugins/timelion/index.js: | |
1 | |
2: module.exports = function (kibana) { | |
3 let mainFile = 'plugins/timelion/app'; | |
4 | |
src/core_plugins/timelion/init.js: | |
2 import processFunctionDefinition from './server/lib/process_function_definition'; | |
3 | |
4: module.exports = function (server) { | |
5 //var config = server.config(); | |
6 require('./server/routes/run.js')(server); | |
src/core_plugins/timelion/public/lib/calculate_interval.js: | |
1 const toMS = require('../../server/lib/to_milliseconds.js'); | |
2 | |
3: module.exports = function calculateInterval(from, to, size, interval, min) { | |
4 if (interval !== 'auto') return interval; | |
5 const dateMathInterval = roundInterval((to - from) / size); | |
src/core_plugins/timelion/public/lib/observe_resize.js: | |
1: module.exports = function ($elem, fn, frequency) { | |
2 | |
3 frequency = frequency || 500; | |
src/core_plugins/timelion/public/panels/panel.js: | |
1: module.exports = function Panel(name, config) { | |
2 | |
3 this.name = name; | |
src/core_plugins/timelion/public/panels/timechart/schema.js: | |
9 const SET_LEGEND_NUMBERS_DELAY = 50; | |
10 | |
11: module.exports = function timechartFn(Private, config, $rootScope, timefilter, $compile) { | |
12 return function () { | |
13 return { | |
src/core_plugins/timelion/public/panels/timechart/tick_generator.js: | |
1: module.exports = function generateTicksProvider() { | |
2 | |
3 function floorInBase(n, base) { | |
src/core_plugins/timelion/public/panels/timechart/xaxis_formatter.js: | |
1 import moment from 'moment'; | |
2 | |
3: module.exports = function xaxisFormatterProvider(config) { | |
4 | |
5 function getFormat(esInterval) { | |
src/core_plugins/timelion/public/services/dashboard_context.js: | |
4 | |
5 | |
6: module.exports = function dashboardContext(Private, getAppState) { | |
7 return function () { | |
8 const queryFilter = Private(FilterBarQueryFilterProvider); | |
src/core_plugins/timelion/public/services/timezone.js: | |
2 import moment from 'moment'; | |
3 | |
4: module.exports = function timezoneFn(config) { | |
5 return function () { | |
6 | |
src/core_plugins/timelion/server/fit_functions/average.js: | |
5 // Bad: sum, count | |
6 | |
7: module.exports = function (dataTuples, targetTuples) { | |
8 | |
9 // Phase 1: Downsample | |
src/core_plugins/timelion/server/fit_functions/carry.js: | |
6 | |
7 // Don't use this to down sample, it simply won't do the right thing. | |
8: module.exports = function (dataTuples, targetTuples) { | |
9 | |
10 if (dataTuples.length > targetTuples.length) { | |
src/core_plugins/timelion/server/fit_functions/nearest.js: | |
4 // Good: average, min, max | |
5 // Bad: sum, count | |
6: module.exports = function (dataTuples, targetTuples) { | |
7 return _.map(targetTuples, function (bucket) { | |
8 const time = bucket[0]; | |
src/core_plugins/timelion/server/fit_functions/none.js: | |
3 // Performing joins/math with other sets that don't match perfectly will be wrong | |
4 // Does not resample at all. | |
5: module.exports = function (dataTuples) { | |
6 return dataTuples; | |
7 }; | |
src/core_plugins/timelion/server/fit_functions/scale.js: | |
14 } | |
15 | |
16: module.exports = function (dataTuples, targetTuples) { | |
17 | |
18 let i = 0; | |
src/core_plugins/timelion/server/handlers/chain_runner.js: | |
9 import validateTime from './lib/validate_time.js'; | |
10 | |
11: module.exports = function (tlConfig) { | |
12 const preprocessChain = require('./lib/preprocess_chain')(tlConfig); | |
13 | |
src/core_plugins/timelion/server/handlers/lib/arg_type.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function argType(arg) { | |
4 if (_.isArray(arg)) { | |
5 return _.chain(arg) | |
src/core_plugins/timelion/server/handlers/lib/index_arguments.js: | |
2 | |
3 // Only applies to already resolved arguments | |
4: module.exports = function indexArguments(functionDef, orderedArgs) { | |
5 | |
6 const validateArg = require('./validate_arg')(functionDef); | |
src/core_plugins/timelion/server/handlers/lib/parse_sheet.js: | |
6 const Parser = PEG.buildParser(grammar); | |
7 | |
8: module.exports = function parseSheet(sheet) { | |
9 return _.map(sheet, function (plot) { | |
10 try { | |
src/core_plugins/timelion/server/handlers/lib/preprocess_chain.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function preProcessChainFn(tlConfig) { | |
4 return function preProcessChain(chain, queries) { | |
5 queries = queries || {}; | |
src/core_plugins/timelion/server/handlers/lib/reposition_arguments.js: | |
2 | |
3 // Applies to unresolved arguments in the AST | |
4: module.exports = function repositionArguments(functionDef, unorderedArgs) { | |
5 const args = []; | |
6 | |
src/core_plugins/timelion/server/handlers/lib/tl_config.js: | |
2 import buildTarget from '../../lib/build_target.js'; | |
3 | |
4: module.exports = function (setup) { | |
5 let targetSeries; | |
6 | |
src/core_plugins/timelion/server/handlers/lib/validate_arg.js: | |
2 import _ from 'lodash'; | |
3 | |
4: module.exports = function (functionDef) { | |
5 return function validateArg(value, name, argDef) { | |
6 const type = argType(value); | |
src/core_plugins/timelion/server/handlers/lib/validate_time.js: | |
2 import toMS from '../../lib/to_milliseconds.js'; | |
3 | |
4: module.exports = function validateTime(time, tlConfig) { | |
5 const span = parseDateMath(time.to, true) - parseDateMath(time.from); | |
6 const interval = toMS(time.interval); | |
src/core_plugins/timelion/server/lib/alter.js: | |
9 */ | |
10 | |
11: module.exports = function alter(args, fn) { | |
12 // In theory none of the args should ever be promises. This is probably a waste. | |
13 return Promise.all(args).then(function (args) { | |
src/core_plugins/timelion/server/lib/asSorted.js: | |
2 import unzipPairs from './unzipPairs.js'; | |
3 | |
4: module.exports = function asSorted(timeValObject, fn) { | |
5 const data = unzipPairs(timeValObject); | |
6 return _.zipObject(fn(data)); | |
src/core_plugins/timelion/server/lib/build_target.js: | |
2 import splitInterval from './split_interval.js'; | |
3 | |
4: module.exports = function (tlConfig) { | |
5 const min = moment(tlConfig.time.from); | |
6 const max = moment(tlConfig.time.to); | |
src/core_plugins/timelion/server/lib/classes/chainable.js: | |
1 import TimelionFunction from './timelion_function'; | |
2 | |
3: module.exports = class Chainable extends TimelionFunction { | |
4 constructor(name, config) { | |
5 super(name, config); | |
src/core_plugins/timelion/server/lib/classes/datasource.js: | |
15 } | |
16 | |
17: module.exports = class Datasource extends TimelionFunction { | |
18 constructor(name, config) { | |
19 | |
src/core_plugins/timelion/server/lib/classes/timelion_function.js: | |
3 const fitFunctions = loadFunctions('fit_functions'); | |
4 | |
5: module.exports = class TimelionFunction { | |
6 constructor(name, config) { | |
7 this.name = name; | |
src/core_plugins/timelion/server/lib/date_math.js: | |
104 } | |
105 | |
106: module.exports = parse; | |
107 | |
src/core_plugins/timelion/server/lib/functions_md.js: | |
4 | |
5 | |
6: module.exports = (function () { | |
7 const functionArray = _.map(functions, function (val, key) { | |
8 // TODO: This won't work on frozen objects, it should be removed when everything is converted to datasources and chainables | |
src/core_plugins/timelion/server/lib/get_namespaced_settings.js: | |
2 import configFile from '../../timelion.json'; | |
3 | |
4: module.exports = function () { | |
5 function flattenWith(dot, nestedObj, flattenArrays) { | |
6 const stack = []; // track key stack | |
src/core_plugins/timelion/server/lib/load_functions.js: | |
4 import processFunctionDefinition from './process_function_definition'; | |
5 | |
6: module.exports = function (directory) { | |
7 | |
8 function getTuple(directory, name) { | |
src/core_plugins/timelion/server/lib/offset_time.js: | |
2 | |
3 // usually reverse = false on the request, true on the response | |
4: module.exports = function offsetTime(milliseconds, offset, reverse) { | |
5 if (!offset.match(/[-+][0-9]+[mshdwMy]/g)) { | |
6 throw new Error ('Malformed `offset` at ' + offset); | |
src/core_plugins/timelion/server/lib/process_function_definition.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (func) { | |
4 const functions = {}; | |
5 functions[func.name] = func; | |
src/core_plugins/timelion/server/lib/reduce.js: | |
13 * @return {seriesList} | |
14 */ | |
15: module.exports = function reduce(args, fn) { | |
16 return Promise.all(args).then(function (args) { | |
17 | |
src/core_plugins/timelion/server/lib/split_interval.js: | |
1: module.exports = function splitInterval(interval) { | |
2 if (!interval.match(/[0-9]+[mshdwMy]+/g)) { | |
3 throw new Error ('Malformed `interval`: ' + interval); | |
src/core_plugins/timelion/server/lib/to_milliseconds.js: | |
24 const parseRE = new RegExp('^(\\d+(?:\\.\\d*)?)?\\s*(' + _.keys(vals).join('|') + ')$'); | |
25 | |
26: module.exports = function (expr) { | |
27 const match = expr.match(parseRE); | |
28 if (match) { | |
src/core_plugins/timelion/server/lib/unzipPairs.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function unzipPairs(timeValObject) { | |
4 const paired = _.chain(timeValObject).pairs().map(function (point) { | |
5 return [parseInt(point[0], 10), point[1]]; | |
src/core_plugins/timelion/server/routes/functions.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (server) { | |
4 server.route({ | |
5 method: 'GET', | |
src/core_plugins/timelion/server/routes/run.js: | |
9 | |
10 | |
11: module.exports = (server) => { | |
12 server.route({ | |
13 method: ['POST', 'GET'], | |
src/core_plugins/timelion/server/routes/validate_es.js: | |
1: module.exports = function (server) { | |
2 server.route({ | |
3 method: 'GET', | |
src/core_plugins/timelion/server/series_functions/__tests__/fixtures/bucketList.js: | |
1 import moment from 'moment'; | |
2 | |
3: module.exports = [ | |
4 moment('1980-01-01T00:00:00.000Z'), | |
5 moment('1981-01-01T00:00:00.000Z'), | |
src/core_plugins/timelion/server/series_functions/__tests__/fixtures/es_response.js: | |
9 */ | |
10 | |
11: module.exports = { | |
12 _shards: { | |
13 total: 1 | |
src/core_plugins/timelion/server/series_functions/__tests__/fixtures/seriesList.js: | |
3 import getSeriesList from '../helpers/get_series_list'; | |
4 | |
5: module.exports = function () { | |
6 return getSeriesList([ | |
7 getSeries('Negative', buckets, [-51, 17, 82, 20]), | |
src/core_plugins/timelion/server/series_functions/__tests__/fixtures/tlConfig.js: | |
4 import esResponse from './es_response'; | |
5 | |
6: module.exports = function () { | |
7 | |
8 const functions = require('../../../lib/load_functions')('series_functions'); | |
src/core_plugins/timelion/server/series_functions/__tests__/helpers/get_series.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function getSeries(name, buckets, points) { | |
4 const fill = _.partial(_.zip, _.map(buckets, function (bucket) { return bucket.valueOf(); })); | |
5 return { | |
src/core_plugins/timelion/server/series_functions/__tests__/helpers/get_series_list.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (list, overrides) { | |
4 return _.merge({ | |
5 type: 'seriesList', | |
src/core_plugins/timelion/server/series_functions/__tests__/helpers/get_single_series_list.js: | |
3 import _ from 'lodash'; | |
4 | |
5: module.exports = function (name, data) { | |
6 return getSeriesList([getSeries(name, _.map(data, 0), _.map(data, 1))]); | |
7 }; | |
src/core_plugins/timelion/server/series_functions/__tests__/helpers/invoke_series_fn.js: | |
4 import indexArguments from '../../../handlers/lib/index_arguments'; | |
5 | |
6: module.exports = function invokeSeriesFn(fnDef, args, tlConfigOverrides) { | |
7 const tlConfig = _.merge(require('../fixtures/tlConfig')(), tlConfigOverrides); | |
8 | |
src/core_plugins/timelion/server/series_functions/abs.js: | |
2 import _ from 'lodash'; | |
3 import Chainable from '../lib/classes/chainable'; | |
4: module.exports = new Chainable('abs', { | |
5 args: [ | |
6 { | |
src/core_plugins/timelion/server/series_functions/aggregate/avg.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (points) { | |
4 return _.sum(points) / points.length; | |
5 }; | |
src/core_plugins/timelion/server/series_functions/aggregate/cardinality.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (points) { | |
4 return _.uniq(points).length; | |
5 }; | |
src/core_plugins/timelion/server/series_functions/aggregate/first.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (points) { | |
4 return _.first(points); | |
5 }; | |
src/core_plugins/timelion/server/series_functions/aggregate/index.js: | |
13 }; | |
14 | |
15: module.exports = new Chainable('aggregate', { | |
16 args: [ | |
17 { | |
src/core_plugins/timelion/server/series_functions/aggregate/last.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (points) { | |
4 return _.last(points); | |
5 }; | |
src/core_plugins/timelion/server/series_functions/aggregate/max.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (points) { | |
4 return _.max(points); | |
5 }; | |
src/core_plugins/timelion/server/series_functions/aggregate/min.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (points) { | |
4 return _.min(points); | |
5 }; | |
src/core_plugins/timelion/server/series_functions/aggregate/sum.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (points) { | |
4 return _.sum(points); | |
5 }; | |
src/core_plugins/timelion/server/series_functions/bars.js: | |
1 import alter from '../lib/alter.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('bars', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/color.js: | |
3 import tinygradient from 'tinygradient'; | |
4 | |
5: module.exports = new Chainable('color', { | |
6 args: [ | |
7 { | |
src/core_plugins/timelion/server/series_functions/condition.js: | |
4 import argType from '../handlers/lib/arg_type.js'; | |
5 | |
6: module.exports = new Chainable('condition', { | |
7 args: [ | |
8 { | |
src/core_plugins/timelion/server/series_functions/cusum.js: | |
2 import _ from 'lodash'; | |
3 import Chainable from '../lib/classes/chainable'; | |
4: module.exports = new Chainable('cusum', { | |
5 args: [ | |
6 { | |
src/core_plugins/timelion/server/series_functions/derivative.js: | |
2 import _ from 'lodash'; | |
3 import Chainable from '../lib/classes/chainable'; | |
4: module.exports = new Chainable('derivative', { | |
5 args: [ | |
6 { | |
src/core_plugins/timelion/server/series_functions/divide.js: | |
1 import reduce from '../lib/reduce.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('divide', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/es/index.js: | |
4 import toSeriesList from './lib/agg_response_to_series_list'; | |
5 | |
6: module.exports = new Datasource('es', { | |
7 args: [ | |
8 { | |
src/core_plugins/timelion/server/series_functions/es/lib/build_request.js: | |
2 import createDateAgg from './create_date_agg'; | |
3 | |
4: module.exports = function buildRequest(config, tlConfig) { | |
5 | |
6 const bool = { must: [] }; | |
src/core_plugins/timelion/server/series_functions/es/lib/create_date_agg.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function createDateAgg(config, tlConfig) { | |
4 const dateAgg = { | |
5 time_buckets: { | |
src/core_plugins/timelion/server/series_functions/first.js: | |
1 import alter from '../lib/alter.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('first', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/fit.js: | |
5 const fitFunctions = loadFunctions('fit_functions'); | |
6 | |
7: module.exports = new Chainable('fit', { | |
8 args: [ | |
9 { | |
src/core_plugins/timelion/server/series_functions/graphite.js: | |
5 | |
6 | |
7: module.exports = new Datasource ('graphite', { | |
8 args: [ | |
9 { | |
src/core_plugins/timelion/server/series_functions/hide.js: | |
1 import alter from '../lib/alter.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('hide', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/holt/index.js: | |
6 import toMilliseconds from '../../lib/to_milliseconds'; | |
7 | |
8: module.exports = new Chainable('holt', { | |
9 args: [ | |
10 { | |
src/core_plugins/timelion/server/series_functions/holt/lib/des.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function des(points, alpha, beta) { | |
4 let level; | |
5 let prevLevel; | |
src/core_plugins/timelion/server/series_functions/holt/lib/ses.js: | |
5 import _ from 'lodash'; | |
6 | |
7: module.exports = function ses(points, alpha) { | |
8 let origin; | |
9 let level; | |
src/core_plugins/timelion/server/series_functions/holt/lib/tes.js: | |
48 } | |
49 | |
50: module.exports = function tes(points, alpha, beta, gamma, seasonLength, seasonsToSample) { | |
51 | |
52 const samplePoints = points.slice(0, seasonLength * seasonsToSample); | |
src/core_plugins/timelion/server/series_functions/label.js: | |
1 import alter from '../lib/alter.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('label', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/legend.js: | |
1 import alter from '../lib/alter.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('legend', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/lines.js: | |
1 import alter from '../lib/alter.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('lines', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/log.js: | |
2 import _ from 'lodash'; | |
3 import Chainable from '../lib/classes/chainable'; | |
4: module.exports = new Chainable('log', { | |
5 args: [ | |
6 { | |
src/core_plugins/timelion/server/series_functions/max.js: | |
1 import reduce from '../lib/reduce.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('max', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/min.js: | |
1 import reduce from '../lib/reduce.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('min', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/movingaverage.js: | |
4 import toMS from '../lib/to_milliseconds.js'; | |
5 | |
6: module.exports = new Chainable('movingaverage', { | |
7 args: [ | |
8 { | |
src/core_plugins/timelion/server/series_functions/movingstd.js: | |
2 import _ from 'lodash'; | |
3 import Chainable from '../lib/classes/chainable'; | |
4: module.exports = new Chainable('movingstd', { | |
5 args: [ | |
6 { | |
src/core_plugins/timelion/server/series_functions/multiply.js: | |
1 import reduce from '../lib/reduce.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('multiply', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/points.js: | |
2 import _ from 'lodash'; | |
3 import Chainable from '../lib/classes/chainable'; | |
4: module.exports = new Chainable('points', { | |
5 args: [ | |
6 { | |
src/core_plugins/timelion/server/series_functions/precision.js: | |
2 import alter from '../lib/alter.js'; | |
3 import Chainable from '../lib/classes/chainable'; | |
4: module.exports = new Chainable('precision', { | |
5 args: [ | |
6 { | |
src/core_plugins/timelion/server/series_functions/props.js: | |
22 } | |
23 | |
24: module.exports = new Chainable('props', { | |
25 args: [ | |
26 { | |
src/core_plugins/timelion/server/series_functions/quandl.js: | |
10 | |
11 | |
12: module.exports = new Datasource ('quandl', { | |
13 dataSource: true, | |
14 args: [ | |
src/core_plugins/timelion/server/series_functions/range.js: | |
2 import _ from 'lodash'; | |
3 import Chainable from '../lib/classes/chainable'; | |
4: module.exports = new Chainable('range', { | |
5 args: [ | |
6 { | |
src/core_plugins/timelion/server/series_functions/scale_interval.js: | |
3 import _ from 'lodash'; | |
4 import Chainable from '../lib/classes/chainable'; | |
5: module.exports = new Chainable('scale_interval', { | |
6 args: [ | |
7 { | |
src/core_plugins/timelion/server/series_functions/static.js: | |
4 | |
5 | |
6: module.exports = new Datasource ('static', { | |
7 aliases: ['value'], | |
8 args: [ | |
src/core_plugins/timelion/server/series_functions/subtract.js: | |
1 import reduce from '../lib/reduce.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('subtract', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/sum.js: | |
1 import reduce from '../lib/reduce.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('sum', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/title.js: | |
1 import alter from '../lib/alter.js'; | |
2 import Chainable from '../lib/classes/chainable'; | |
3: module.exports = new Chainable('title', { | |
4 args: [ | |
5 { | |
src/core_plugins/timelion/server/series_functions/trend/index.js: | |
8 }; | |
9 | |
10: module.exports = new Chainable('trend', { | |
11 args: [ | |
12 { | |
src/core_plugins/timelion/server/series_functions/trim.js: | |
3 import Chainable from '../lib/classes/chainable'; | |
4 | |
5: module.exports = new Chainable('trim', { | |
6 args: [ | |
7 { | |
src/core_plugins/timelion/server/series_functions/worldbank.js: | |
4 import Datasource from '../lib/classes/datasource'; | |
5 | |
6: module.exports = new Datasource ('worldbank', { | |
7 args: [ | |
8 { | |
src/core_plugins/timelion/server/series_functions/worldbank_indicators.js: | |
5 | |
6 | |
7: module.exports = new Datasource ('worldbank_indicators', { | |
8 args: [ | |
9 { | |
src/core_plugins/timelion/server/series_functions/yaxis.js: | |
11 'custom':'custom(:prefix:suffix)' | |
12 }; | |
13: module.exports = new Chainable('yaxis', { | |
14 args: [ | |
15 { | |
src/fixtures/vislib/_vis_fixture.js: | |
32 }); | |
33 | |
34: module.exports = function VislibFixtures(Private) { | |
35 return function (visLibParams) { | |
36 const Vis = Private(VislibVisProvider); | |
src/fixtures/vislib/mock_data/date_histogram/_columns.js: | |
1 import moment from 'moment'; | |
2 | |
3: module.exports = { | |
4 'columns': [ | |
5 { | |
src/fixtures/vislib/mock_data/date_histogram/_rows.js: | |
1 import moment from 'moment'; | |
2 | |
3: module.exports = { | |
4 'rows': [ | |
5 { | |
src/fixtures/vislib/mock_data/date_histogram/_series.js: | |
1 import moment from 'moment'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': '@timestamp per 30 sec', | |
src/fixtures/vislib/mock_data/date_histogram/_series_neg.js: | |
1 import moment from 'moment'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': '@timestamp per 30 sec', | |
src/fixtures/vislib/mock_data/date_histogram/_series_pos_neg.js: | |
1 import moment from 'moment'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': '@timestamp per 30 sec', | |
src/fixtures/vislib/mock_data/date_histogram/_stacked_series.js: | |
1 import moment from 'moment'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': '@timestamp per 10 min', | |
src/fixtures/vislib/mock_data/filters/_columns.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'columns': [ | |
5 { | |
src/fixtures/vislib/mock_data/filters/_rows.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'rows': [ | |
5 { | |
src/fixtures/vislib/mock_data/filters/_series.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': 'filters', | |
src/fixtures/vislib/mock_data/geohash/_columns.js: | |
1 import _ from 'lodash'; | |
2: module.exports = { | |
3 'columns': [ | |
4 { | |
src/fixtures/vislib/mock_data/geohash/_geo_json.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'valueFormatter': _.identity, | |
5 'geohashGridAgg': { 'vis': { 'params': {} } }, | |
src/fixtures/vislib/mock_data/geohash/_rows.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'rows': [ | |
5 { | |
src/fixtures/vislib/mock_data/histogram/_columns.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'columns': [ | |
5 { | |
src/fixtures/vislib/mock_data/histogram/_rows.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'rows': [ | |
5 { | |
src/fixtures/vislib/mock_data/histogram/_series.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': 'machine.ram', | |
src/fixtures/vislib/mock_data/histogram/_slices.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'slices': { | |
src/fixtures/vislib/mock_data/not_enough_data/_one_point.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': '', | |
src/fixtures/vislib/mock_data/range/_columns.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'columns': [ | |
5 { | |
src/fixtures/vislib/mock_data/range/_rows.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'rows': [ | |
5 { | |
src/fixtures/vislib/mock_data/range/_series.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': 'bytes ranges', | |
src/fixtures/vislib/mock_data/significant_terms/_columns.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'columns': [ | |
5 { | |
src/fixtures/vislib/mock_data/significant_terms/_rows.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'rows': [ | |
5 { | |
src/fixtures/vislib/mock_data/significant_terms/_series.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': 'Top 5 unusual terms in @tags', | |
src/fixtures/vislib/mock_data/stacked/_stacked.js: | |
1 import moment from 'moment'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': '@timestamp per 30 sec', | |
src/fixtures/vislib/mock_data/terms/_columns.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'columns': [ | |
5 { | |
src/fixtures/vislib/mock_data/terms/_rows.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'rows': [ | |
5 { | |
src/fixtures/vislib/mock_data/terms/_series.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = { | |
4 'label': '', | |
5 'xAxisLabel': 'Top 5 extension', | |
src/jest/babelTransform.js: | |
4 const babelOptions = options.webpack; | |
5 | |
6: module.exports = babelJest.createTransformer(babelOptions); | |
7 | |
src/optimize/babel/helpers.js: | |
15 ], | |
16 plugins: [ | |
17: require.resolve('babel-plugin-add-module-exports'), | |
18 // stage 3 | |
19 require.resolve('babel-plugin-transform-async-generator-functions'), | |
src/optimize/base_optimizer.js: | |
230 } | |
231 | |
232: module.exports = BaseOptimizer; | |
233 | |
src/optimize/fs_optimizer.js: | |
3 import { fromNode } from 'bluebird'; | |
4 | |
5: module.exports = class FsOptimizer extends BaseOptimizer { | |
6 async init() { | |
7 await this.initCompiler(); | |
src/optimize/index.js: | |
1 import FsOptimizer from './fs_optimizer'; | |
2: module.exports = async (kbnServer, server, config) => { | |
3 if (!config.get('optimize.enabled')) return; | |
4 | |
src/optimize/lazy/lazy.js: | |
1 import { isWorker } from 'cluster'; | |
2: module.exports = async kbnServer => { | |
3 | |
4 | |
src/optimize/lazy/lazy_optimizer.js: | |
4 import { join } from 'path'; | |
5 | |
6: module.exports = class LazyOptimizer extends BaseOptimizer { | |
7 constructor(opts) { | |
8 super(opts); | |
src/optimize/lazy/lazy_server.js: | |
4 import registerHapiPlugins from '../../server/http/register_hapi_plugins'; | |
5 | |
6: module.exports = class LazyServer { | |
7 constructor(host, port, optimizer) { | |
8 this.optimizer = optimizer; | |
src/optimize/lazy/proxy_role.js: | |
2 import { get, once } from 'lodash'; | |
3 | |
4: module.exports = (kbnServer, server, config) => { | |
5 | |
6 server.route({ | |
src/optimize/lazy/weird_control_flow.js: | |
2 | |
3 | |
4: module.exports = class WeirdControlFlow { | |
5 constructor() { | |
6 this.handlers = []; | |
src/optimize/postcss.config.js: | |
1: module.exports = { | |
2 plugins: [ | |
3 require('autoprefixer')({ | |
src/server/config/config.js: | |
9 const vals = Symbol('config values'); | |
10 | |
11: module.exports = class Config { | |
12 static withDefaultSchema(settings = {}) { | |
13 return new Config(createDefaultSchema(), settings); | |
src/server/config/explode_by.js: | |
1 import _ from 'lodash'; | |
2: module.exports = function (dot, flatObject) { | |
3 const fullObject = {}; | |
4 _.each(flatObject, function (value, key) { | |
src/server/config/flatten_with.js: | |
1 import _ from 'lodash'; | |
2: module.exports = function (dot, nestedObj, flattenArrays) { | |
3 const stack = []; // track key stack | |
4 const flatObj = {}; | |
src/server/config/override.js: | |
3 import explodeBy from './explode_by'; | |
4 | |
5: module.exports = function (target, source) { | |
6 const _target = flattenWith('.', target); | |
7 const _source = flattenWith('.', source); | |
src/server/config/schema.js: | |
6 import { getData } from '../path'; | |
7 | |
8: module.exports = () => Joi.object({ | |
9 pkg: Joi.object({ | |
10 version: Joi.string().default(Joi.ref('$version')), | |
src/server/config/setup.js: | |
2 import { transformDeprecations } from './transform_deprecations'; | |
3 | |
4: module.exports = function (kbnServer) { | |
5 const settings = transformDeprecations(kbnServer.settings); | |
6 kbnServer.config = Config.withDefaultSchema(settings); | |
src/server/http/get_default_route.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = _.once(function (kbnServer) { | |
4 const { | |
5 config | |
src/server/http/index.js: | |
13 import xsrfMixin from './xsrf'; | |
14 | |
15: module.exports = async function (kbnServer, server, config) { | |
16 server = kbnServer.server = new Hapi.Server(); | |
17 | |
src/server/kbn_server.js: | |
24 const rootDir = fromRoot('.'); | |
25 | |
26: module.exports = class KbnServer { | |
27 constructor(settings) { | |
28 this.name = pkg.name; | |
src/server/logging/apply_filters_to_keys.js: | |
36 } | |
37 | |
38: module.exports = function (obj, actionsByKey) { | |
39 return Object.keys(actionsByKey).reduce((output, key) => { | |
40 return apply(output, key, actionsByKey[key]); | |
src/server/logging/log_format.js: | |
27 | |
28 | |
29: module.exports = class TransformObjStream extends Stream.Transform { | |
30 constructor(config) { | |
31 super({ | |
src/server/logging/log_format_json.js: | |
6 }; | |
7 | |
8: module.exports = class KbnLoggerJsonFormat extends LogFormat { | |
9 format(data) { | |
10 data.message = stripColors(data.message); | |
src/server/logging/log_format_string.js: | |
45 const workerType = process.env.kbnWorkerType ? `${type(process.env.kbnWorkerType)} ` : ''; | |
46 | |
47: module.exports = class KbnLoggerJsonFormat extends LogFormat { | |
48 format(data) { | |
49 const time = color('time')(moment(data.timestamp).utc().format('HH:mm:ss.SSS')); | |
src/server/logging/log_reporter.js: | |
6 import { LogInterceptor } from './log_interceptor'; | |
7 | |
8: module.exports = class KbnLogger { | |
9 constructor(events, config) { | |
10 this.squeeze = new Squeeze(events); | |
src/server/pid/index.js: | |
5 const writeFile = Promise.promisify(require('fs').writeFile); | |
6 | |
7: module.exports = Promise.method(function (kbnServer, server, config) { | |
8 const path = config.get('pid.file'); | |
9 if (!path) return; | |
src/server/plugins/initialize.js: | |
1 import pluginInit from './plugin_init'; | |
2 | |
3: module.exports = async function (kbnServer, server, config) { | |
4 | |
5 if (!config.get('plugins.initialize')) { | |
src/server/plugins/plugin.js: | |
49 * public directory | |
50 */ | |
51: module.exports = class Plugin { | |
52 constructor(kbnServer, path, pkg, opts) { | |
53 this.kbnServer = kbnServer; | |
src/server/plugins/plugin_api.js: | |
2 import { join } from 'path'; | |
3 | |
4: module.exports = class PluginApi { | |
5 constructor(kibana, pluginPath) { | |
6 this.config = kibana.config; | |
src/server/plugins/plugin_collection.js: | |
34 } | |
35 | |
36: module.exports = class Plugins extends Collection { | |
37 | |
38 constructor(kbnServer) { | |
src/server/plugins/scan.js: | |
4 import { resolve } from 'path'; | |
5 import PluginCollection from './plugin_collection'; | |
6: module.exports = async (kbnServer, server, config) => { | |
7 | |
8 const plugins = kbnServer.plugins = new PluginCollection(kbnServer); | |
src/server/status/samples.js: | |
24 }; | |
25 | |
26: module.exports = Samples; | |
27 | |
src/server/status/server_status.js: | |
5 import { version } from '../../../package.json'; | |
6 | |
7: module.exports = class ServerStatus { | |
8 constructor(server) { | |
9 this.server = server; | |
src/server/status/status.js: | |
87 }); | |
88 | |
89: module.exports = Status; | |
90 | |
src/test_utils/get_url.js: | |
21 */ | |
22 | |
23: module.exports = getUrl; | |
24 | |
25 function getUrl(config, app) { | |
src/test_utils/public/no_digest_promises.js: | |
30 function deactivate() { active = false; } | |
31 | |
32: module.exports = { | |
33 activate: activate, | |
34 deactivate: deactivate, | |
src/ui/__tests__/fixtures/test_app/index.js: | |
1: module.exports = kibana => new kibana.Plugin({ | |
2 uiExports: { | |
3 app: { | |
src/ui/app_entry_template.js: | |
1: module.exports = function ({ env, bundle }) { | |
2 | |
3 const pluginSlug = env.pluginInfo.sort() | |
src/ui/public/agg_types/__tests__/agg_param_writer.js: | |
4 import { VisTypesRegistryProvider } from 'ui/registry/vis_types'; | |
5 import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern'; | |
6: module.exports = function AggParamWriterHelper(Private) { | |
7 const Vis = Private(VisProvider); | |
8 const aggTypes = Private(AggTypesIndexProvider); | |
src/ui/public/agg_types/__tests__/param_types/_raw_json.js: | |
5 import { AggTypesParamTypesRawJsonProvider } from 'ui/agg_types/param_types/raw_json'; | |
6 | |
7: module.exports = describe('JSON', function () { | |
8 const paramName = 'json_test'; | |
9 let BaseAggParam; | |
src/ui/public/agg_types/__tests__/param_types/_string.js: | |
5 import { AggTypesParamTypesStringProvider } from 'ui/agg_types/param_types/string'; | |
6 | |
7: module.exports = describe('String', function () { | |
8 const paramName = 'json_test'; | |
9 let BaseAggParam; | |
src/ui/public/agg_types/__tests__/utils/_stub_agg_params.js: | |
27 * @return {undefined} | |
28 */ | |
29: module.exports = function stubParamClasses(Private) { | |
30 const BaseAggParam = Private.stub( | |
31 AggTypesParamTypesBaseProvider, | |
src/ui/public/chrome/api/apps.js: | |
2 import { resolve } from 'url'; | |
3 | |
4: module.exports = function (chrome, internals) { | |
5 | |
6 if (get(internals, 'app.navLink.url')) { | |
src/ui/public/chrome/api/controls.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (chrome, internals) { | |
4 /** | |
5 * ui/chrome Controls API | |
src/ui/public/chrome/api/template.js: | |
1: module.exports = function (chrome, internals) { | |
2 | |
3 /** | |
src/ui/public/chrome/api/theme.js: | |
1 import _ from 'lodash'; | |
2 | |
3: module.exports = function (chrome, internals) { | |
4 /** | |
5 * ui/chrome Theme API | |
src/ui/public/chrome/api/translations.js: | |
1: module.exports = function (chrome, internals) { | |
2 /** | |
3 * ui/chrome Translations API | |
src/ui/public/chrome/chrome.js: | |
52 }; | |
53 | |
54: module.exports = chrome; | |
55 | |
src/ui/public/jquery/find_test_subject.js: | |
1 import testSubjSelector from '@spalger/test-subj-selector'; | |
2 | |
3: module.exports = function bindToJquery($) { | |
4 | |
5 /** | |
src/ui/public/stringify/__tests__/_conformance.js: | |
24 ]; | |
25 | |
26: module.exports = describe('conformance', function () { | |
27 | |
28 beforeEach(ngMock.module('kibana')); | |
src/ui/public/vis_maps/maps_renderbot.js: | |
11 | |
12 | |
13: module.exports = function MapsRenderbotFactory(Private, $injector, tilemapSettings, Notifier, courier, getAppState) { | |
14 | |
15 const ResizeChecker = Private(ResizeCheckerProvider); | |
src/ui/public/vislib/vislib.js: | |
17 * @return {Object} Contains the version number and the Vis Class for creating visualizations | |
18 */ | |
19: module.exports = function VislibProvider(Private) { | |
20 | |
21 return { | |
src/ui/public/vislib_vis_type/vislib_renderbot.js: | |
4 import { VislibVisTypeBuildChartDataProvider } from 'ui/vislib_vis_type/build_chart_data'; | |
5 | |
6: module.exports = function VislibRenderbotFactory(Private, $injector) { | |
7 const AngularPromise = $injector.get('Promise'); | |
8 const vislib = Private(VislibProvider); | |
src/ui/ui_app.js: | |
67 } | |
68 | |
69: module.exports = UiApp; | |
70 | |
src/ui/ui_app_collection.js: | |
5 const byIdCache = Symbol('byId'); | |
6 | |
7: module.exports = class UiAppCollection extends Collection { | |
8 | |
9 constructor(uiExports, parent) { | |
src/ui/ui_bundle.js: | |
7 const stat = promisify(require('fs').stat); | |
8 | |
9: module.exports = class UiBundle { | |
10 constructor(opts) { | |
11 | |
src/ui/ui_bundle_collection.js: | |
97 } | |
98 | |
99: module.exports = UiBundleCollection; | |
100 | |
src/ui/ui_bundler_env.js: | |
4 const arr = v => [].concat(v || []); | |
5 | |
6: module.exports = class UiBundlerEnv { | |
7 constructor(workingDir) { | |
8 | |
src/ui/ui_exports.js: | |
173 } | |
174 | |
175: module.exports = UiExports; | |
176 | |
src/utils/collection.js: | |
2 const set = Symbol('internal set'); | |
3 | |
4: module.exports = class Collection { | |
5 constructor() { // Set's have a length of 0, mimic that | |
6 this[set] = new Set(arguments[0] || []); | |
src/utils/path_contains.js: | |
1 import { relative } from 'path'; | |
2 | |
3: module.exports = function pathContains(root, child) { | |
4 return relative(child, root).slice(0, 2) !== '..'; | |
5 }; | |
295 matches across 266 files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment