mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
Merge branch 'master' of github.com:elastic/kibana into issue/6516
This commit is contained in:
commit
35bf5d491a
562 changed files with 920 additions and 716 deletions
|
@ -218,7 +218,7 @@ So, you've been assigned a pull to review. What's that look like?
|
||||||
|
|
||||||
Remember, someone is blocked by a pull awaiting review, make it count. Be thorough, the more action items you catch in the first review, the less back and forth will be required, and the better chance the pull has of being successful. Don't you like success?
|
Remember, someone is blocked by a pull awaiting review, make it count. Be thorough, the more action items you catch in the first review, the less back and forth will be required, and the better chance the pull has of being successful. Don't you like success?
|
||||||
|
|
||||||
1. **Understand the issue** that is being fixed, or the feature being added. Check the description on the pull, and check out the related issue. If you don't understand something, ask the person the submitter for clarification.
|
1. **Understand the issue** that is being fixed, or the feature being added. Check the description on the pull, and check out the related issue. If you don't understand something, ask the submitter for clarification.
|
||||||
1. **Reproduce the bug** (or the lack of feature I guess?) in the destination branch, usually `master`. The referenced issue will help you here. If you're unable to reproduce the issue, contact the issue submitter for clarification
|
1. **Reproduce the bug** (or the lack of feature I guess?) in the destination branch, usually `master`. The referenced issue will help you here. If you're unable to reproduce the issue, contact the issue submitter for clarification
|
||||||
1. **Check out the pull** and test it. Is the issue fixed? Does it have nasty side effects? Try to create suspect inputs. If it operates on the value of a field try things like: strings (including an empty string), null, numbers, dates. Try to think of edge cases that might break the code.
|
1. **Check out the pull** and test it. Is the issue fixed? Does it have nasty side effects? Try to create suspect inputs. If it operates on the value of a field try things like: strings (including an empty string), null, numbers, dates. Try to think of edge cases that might break the code.
|
||||||
1. **Merge the target branch**. It is possible that tests or the linter have been updated in the target branch since the pull was submitted. Merging the pull could cause core to start failing.
|
1. **Merge the target branch**. It is possible that tests or the linter have been updated in the target branch since the pull was submitted. Merging the pull could cause core to start failing.
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
require('babel/register')(require('./src/optimize/babelOptions').node);
|
const camelCase = require('lodash').camelCase;
|
||||||
|
require('babel/register')(require('./src/optimize/babel_options').node);
|
||||||
|
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
// set the config once before calling load-grunt-config
|
// set the config once before calling load-grunt-config
|
||||||
// and once during so that we have access to it via
|
// and once during so that we have access to it via
|
||||||
// grunt.config.get() within the config files
|
// grunt.config.get() within the config files
|
||||||
var config = {
|
const config = {
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
root: __dirname,
|
root: __dirname,
|
||||||
src: __dirname + '/src',
|
src: __dirname + '/src',
|
||||||
|
@ -12,7 +13,7 @@ module.exports = function (grunt) {
|
||||||
plugins: __dirname + '/src/plugins',
|
plugins: __dirname + '/src/plugins',
|
||||||
server: __dirname + '/src/server',
|
server: __dirname + '/src/server',
|
||||||
target: __dirname + '/target', // location of the compressed build targets
|
target: __dirname + '/target', // location of the compressed build targets
|
||||||
testUtilsDir: __dirname + '/src/testUtils',
|
testUtilsDir: __dirname + '/src/test_utils',
|
||||||
configFile: __dirname + '/src/config/kibana.yml',
|
configFile: __dirname + '/src/config/kibana.yml',
|
||||||
|
|
||||||
karmaBrowser: (function () {
|
karmaBrowser: (function () {
|
||||||
|
|
|
@ -28,7 +28,7 @@ remove a range.
|
||||||
or bottom _n_ elements of a given field to display, ordered by count or a custom metric.
|
or bottom _n_ elements of a given field to display, ordered by count or a custom metric.
|
||||||
*Filters*:: You can specify a set of {ref}/search-aggregations-bucket-filters-aggregation.html[_filters_] for the data.
|
*Filters*:: You can specify a set of {ref}/search-aggregations-bucket-filters-aggregation.html[_filters_] for the data.
|
||||||
You can specify a filter as a query string or in JSON format, just as in the Discover search bar. Click *Add Filter* to
|
You can specify a filter as a query string or in JSON format, just as in the Discover search bar. Click *Add Filter* to
|
||||||
add another filter. Click the image:labelbutton.png[] *label* button to open the label field, where you can type in a
|
add another filter. Click the image:images/labelbutton.png[] *label* button to open the label field, where you can type in a
|
||||||
name to display on the visualization.
|
name to display on the visualization.
|
||||||
*Significant Terms*:: Displays the results of the experimental
|
*Significant Terms*:: Displays the results of the experimental
|
||||||
{ref}/search-aggregations-bucket-significantterms-aggregation.html[_significant terms_] aggregation.
|
{ref}/search-aggregations-bucket-significantterms-aggregation.html[_significant terms_] aggregation.
|
||||||
|
|
|
@ -156,7 +156,7 @@
|
||||||
"grunt-cli": "0.1.13",
|
"grunt-cli": "0.1.13",
|
||||||
"grunt-contrib-clean": "0.6.0",
|
"grunt-contrib-clean": "0.6.0",
|
||||||
"grunt-contrib-copy": "0.8.1",
|
"grunt-contrib-copy": "0.8.1",
|
||||||
"grunt-esvm": "2.1.1",
|
"grunt-esvm": "3.0.3",
|
||||||
"grunt-karma": "0.12.0",
|
"grunt-karma": "0.12.0",
|
||||||
"grunt-run": "0.5.0",
|
"grunt-run": "0.5.0",
|
||||||
"grunt-s3": "0.2.0-alpha.3",
|
"grunt-s3": "0.2.0-alpha.3",
|
||||||
|
@ -174,9 +174,8 @@
|
||||||
"karma-ie-launcher": "0.2.0",
|
"karma-ie-launcher": "0.2.0",
|
||||||
"karma-mocha": "0.2.0",
|
"karma-mocha": "0.2.0",
|
||||||
"karma-safari-launcher": "0.1.1",
|
"karma-safari-launcher": "0.1.1",
|
||||||
"libesvm": "3.3.0",
|
|
||||||
"license-checker": "3.1.0",
|
"license-checker": "3.1.0",
|
||||||
"load-grunt-config": "0.7.2",
|
"load-grunt-config": "0.19.1",
|
||||||
"makelogs": "3.0.0-beta3",
|
"makelogs": "3.0.0-beta3",
|
||||||
"marked-text-renderer": "0.1.0",
|
"marked-text-renderer": "0.1.0",
|
||||||
"mocha": "2.3.0",
|
"mocha": "2.3.0",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import pkg from '../utils/packageJson';
|
import pkg from '../utils/package_json';
|
||||||
import Command from './Command';
|
import Command from './command';
|
||||||
|
|
||||||
let argv = process.env.kbnWorkerArgv ? JSON.parse(process.env.kbnWorkerArgv) : process.argv.slice();
|
let argv = process.env.kbnWorkerArgv ? JSON.parse(process.env.kbnWorkerArgv) : process.argv.slice();
|
||||||
let program = new Command('bin/kibana');
|
let program = new Command('bin/kibana');
|
||||||
|
|
|
@ -4,7 +4,7 @@ const { format: formatUrl } = require('url');
|
||||||
import Hapi from 'hapi';
|
import Hapi from 'hapi';
|
||||||
const { debounce, compact, get, invoke, bindAll, once, sample, uniq } = require('lodash');
|
const { debounce, compact, get, invoke, bindAll, once, sample, uniq } = require('lodash');
|
||||||
|
|
||||||
import Log from '../Log';
|
import Log from '../log';
|
||||||
import Worker from './worker';
|
import Worker from './worker';
|
||||||
import BasePathProxy from './base_path_proxy';
|
import BasePathProxy from './base_path_proxy';
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ module.exports = class ClusterManager {
|
||||||
|
|
||||||
setupWatching(extraPaths) {
|
setupWatching(extraPaths) {
|
||||||
const chokidar = require('chokidar');
|
const chokidar = require('chokidar');
|
||||||
const fromRoot = require('../../utils/fromRoot');
|
const fromRoot = require('../../utils/from_root');
|
||||||
|
|
||||||
const watchPaths = uniq(
|
const watchPaths = uniq(
|
||||||
[
|
[
|
||||||
|
|
|
@ -3,7 +3,7 @@ import cluster from 'cluster';
|
||||||
let { resolve } = require('path');
|
let { resolve } = require('path');
|
||||||
let { EventEmitter } = require('events');
|
let { EventEmitter } = require('events');
|
||||||
|
|
||||||
import fromRoot from '../../utils/fromRoot';
|
import fromRoot from '../../utils/from_root';
|
||||||
|
|
||||||
let cliPath = fromRoot('src/cli');
|
let cliPath = fromRoot('src/cli');
|
||||||
let baseArgs = _.difference(process.argv.slice(2), ['--no-watch']);
|
let baseArgs = _.difference(process.argv.slice(2), ['--no-watch']);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// load the babel options seperately so that they can modify the process.env
|
// load the babel options seperately so that they can modify the process.env
|
||||||
// before calling babel/register
|
// before calling babel/register
|
||||||
const babelOptions = require('../optimize/babelOptions').node;
|
const babelOptions = require('../optimize/babel_options').node;
|
||||||
require('babel/register')(babelOptions);
|
require('babel/register')(babelOptions);
|
||||||
require('./cli');
|
require('./cli');
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
|
|
||||||
import fromRoot from '../../../utils/fromRoot';
|
import fromRoot from '../../../utils/from_root';
|
||||||
import settingParser from '../setting_parser';
|
import settingParser from '../setting_parser';
|
||||||
|
|
||||||
describe('kibana cli', function () {
|
describe('kibana cli', function () {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import fromRoot from '../../utils/fromRoot';
|
import fromRoot from '../../utils/from_root';
|
||||||
import settingParser from './setting_parser';
|
import settingParser from './setting_parser';
|
||||||
import installer from './plugin_installer';
|
import installer from './plugin_installer';
|
||||||
import remover from './plugin_remover';
|
import remover from './plugin_remover';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import fromRoot from '../../utils/fromRoot';
|
import fromRoot from '../../utils/from_root';
|
||||||
import pluginDownloader from './plugin_downloader';
|
import pluginDownloader from './plugin_downloader';
|
||||||
import pluginCleaner from './plugin_cleaner';
|
import pluginCleaner from './plugin_cleaner';
|
||||||
import pluginExtractor from './plugin_extractor';
|
import pluginExtractor from './plugin_extractor';
|
||||||
import KbnServer from '../../server/KbnServer';
|
import KbnServer from '../../server/kbn_server';
|
||||||
import readYamlConfig from '../serve/read_yaml_config';
|
import readYamlConfig from '../serve/read_yaml_config';
|
||||||
import Promise from 'bluebird';
|
import Promise from 'bluebird';
|
||||||
import { sync as rimrafSync } from 'rimraf';
|
import { sync as rimrafSync } from 'rimraf';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import _ from 'lodash';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
|
|
||||||
import fromRoot from '../../utils/fromRoot';
|
import fromRoot from '../../utils/from_root';
|
||||||
|
|
||||||
let legacySettingMap = {
|
let legacySettingMap = {
|
||||||
// server
|
// server
|
||||||
|
|
|
@ -3,7 +3,7 @@ const { isWorker } = require('cluster');
|
||||||
const { resolve } = require('path');
|
const { resolve } = require('path');
|
||||||
|
|
||||||
const cwd = process.cwd();
|
const cwd = process.cwd();
|
||||||
import fromRoot from '../../utils/fromRoot';
|
import fromRoot from '../../utils/from_root';
|
||||||
|
|
||||||
let canCluster;
|
let canCluster;
|
||||||
try {
|
try {
|
||||||
|
@ -126,7 +126,7 @@ module.exports = function (program) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let kbnServer = {};
|
let kbnServer = {};
|
||||||
const KbnServer = require('../../server/KbnServer');
|
const KbnServer = require('../../server/kbn_server');
|
||||||
try {
|
try {
|
||||||
kbnServer = new KbnServer(settings);
|
kbnServer = new KbnServer(settings);
|
||||||
await kbnServer.ready();
|
await kbnServer.ready();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import TestUtilsStubIndexPatternProvider from 'testUtils/stub_index_pattern';
|
import TestUtilsStubIndexPatternProvider from 'test_utils/stub_index_pattern';
|
||||||
import IndexPatternsFieldTypesProvider from 'ui/index_patterns/_field_types';
|
import IndexPatternsFieldTypesProvider from 'ui/index_patterns/_field_types';
|
||||||
import FixturesLogstashFieldsProvider from 'fixtures/logstash_fields';
|
import FixturesLogstashFieldsProvider from 'fixtures/logstash_fields';
|
||||||
export default function stubbedLogstashIndexPatternService(Private) {
|
export default function stubbedLogstashIndexPatternService(Private) {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import DirectoryNameAsMain from 'webpack-directory-name-as-main';
|
||||||
import ExtractTextPlugin from 'extract-text-webpack-plugin';
|
import ExtractTextPlugin from 'extract-text-webpack-plugin';
|
||||||
import CommonsChunkPlugin from 'webpack/lib/optimize/CommonsChunkPlugin';
|
import CommonsChunkPlugin from 'webpack/lib/optimize/CommonsChunkPlugin';
|
||||||
|
|
||||||
import fromRoot from '../utils/fromRoot';
|
import fromRoot from '../utils/from_root';
|
||||||
import babelOptions from './babelOptions';
|
import babelOptions from './babel_options';
|
||||||
import { inherits } from 'util';
|
import { inherits } from 'util';
|
||||||
import { defaults, transform } from 'lodash';
|
import { defaults, transform } from 'lodash';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
import BaseOptimizer from './BaseOptimizer';
|
import BaseOptimizer from './base_optimizer';
|
||||||
import fromRoot from '../utils/fromRoot';
|
import fromRoot from '../utils/from_root';
|
||||||
import { fromNode } from 'bluebird';
|
import { fromNode } from 'bluebird';
|
||||||
import { writeFile } from 'fs';
|
import { writeFile } from 'fs';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import FsOptimizer from './FsOptimizer';
|
import FsOptimizer from './fs_optimizer';
|
||||||
module.exports = async (kbnServer, server, config) => {
|
module.exports = async (kbnServer, server, config) => {
|
||||||
if (!config.get('optimize.enabled')) return;
|
if (!config.get('optimize.enabled')) return;
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,11 @@ module.exports = async (kbnServer, server, config) => {
|
||||||
*/
|
*/
|
||||||
switch (process.env.kbnWorkerType) {
|
switch (process.env.kbnWorkerType) {
|
||||||
case 'optmzr':
|
case 'optmzr':
|
||||||
await kbnServer.mixin(require('./optmzrRole'));
|
await kbnServer.mixin(require('./optmzr_role'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'server':
|
case 'server':
|
||||||
await kbnServer.mixin(require('./proxyRole'));
|
await kbnServer.mixin(require('./proxy_role'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Boom from 'boom';
|
import Boom from 'boom';
|
||||||
|
|
||||||
import BaseOptimizer from '../BaseOptimizer';
|
import BaseOptimizer from '../base_optimizer';
|
||||||
import WeirdControlFlow from './WeirdControlFlow';
|
import WeirdControlFlow from './weird_control_flow';
|
||||||
import { once, pick, size } from 'lodash';
|
import { once, pick, size } from 'lodash';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import LazyServer from './LazyServer';
|
import LazyServer from './lazy_server';
|
||||||
import LazyOptimizer from './LazyOptimizer';
|
import LazyOptimizer from './lazy_optimizer';
|
||||||
import fromRoot from '../../utils/fromRoot';
|
import fromRoot from '../../utils/from_root';
|
||||||
|
|
||||||
export default async (kbnServer, kibanaHapiServer, config) => {
|
export default async (kbnServer, kibanaHapiServer, config) => {
|
||||||
let server = new LazyServer(
|
let server = new LazyServer(
|
|
@ -3,7 +3,7 @@ module.exports = (kibana) => {
|
||||||
return new kibana.Plugin({
|
return new kibana.Plugin({
|
||||||
uiExports: {
|
uiExports: {
|
||||||
spyModes: [
|
spyModes: [
|
||||||
'plugins/devMode/visDebugSpyPanel'
|
'plugins/dev_mode/vis_debug_spy_panel'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"name": "devMode",
|
"name": "dev_mode",
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
import visDebugSpyPanelTemplate from 'plugins/devMode/visDebugSpyPanel.html';
|
import visDebugSpyPanelTemplate from 'plugins/dev_mode/vis_debug_spy_panel.html';
|
||||||
// register the spy mode or it won't show up in the spys
|
// register the spy mode or it won't show up in the spys
|
||||||
require('ui/registry/spy_modes').register(VisDetailsSpyProvider);
|
require('ui/registry/spy_modes').register(VisDetailsSpyProvider);
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import Promise from 'bluebird';
|
import Promise from 'bluebird';
|
||||||
import sinon from 'sinon';
|
import sinon from 'sinon';
|
||||||
|
import url from 'url';
|
||||||
|
|
||||||
|
import serverConfig from '../../../../../test/server_config';
|
||||||
import checkEsVersion from '../check_es_version';
|
import checkEsVersion from '../check_es_version';
|
||||||
|
|
||||||
describe('plugins/elasticsearch', function () {
|
describe('plugins/elasticsearch', function () {
|
||||||
|
@ -23,7 +25,7 @@ describe('plugins/elasticsearch', function () {
|
||||||
status: {
|
status: {
|
||||||
red: sinon.stub()
|
red: sinon.stub()
|
||||||
},
|
},
|
||||||
url: 'http://localhost:9210'
|
url: url.format(serverConfig.servers.elasticsearch)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
import Promise from 'bluebird';
|
import Promise from 'bluebird';
|
||||||
import sinon from 'sinon';
|
import sinon from 'sinon';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
|
import url from 'url';
|
||||||
|
|
||||||
const NoConnections = require('elasticsearch').errors.NoConnections;
|
const NoConnections = require('elasticsearch').errors.NoConnections;
|
||||||
|
|
||||||
import healthCheck from '../health_check';
|
import healthCheck from '../health_check';
|
||||||
|
import serverConfig from '../../../../../test/server_config';
|
||||||
|
|
||||||
|
const esPort = serverConfig.servers.elasticsearch.port;
|
||||||
|
const esUrl = url.format(serverConfig.servers.elasticsearch);
|
||||||
|
|
||||||
describe('plugins/elasticsearch', function () {
|
describe('plugins/elasticsearch', function () {
|
||||||
describe('lib/health_check', function () {
|
describe('lib/health_check', function () {
|
||||||
|
@ -39,7 +45,7 @@ describe('plugins/elasticsearch', function () {
|
||||||
nodes: {
|
nodes: {
|
||||||
'node-01': {
|
'node-01': {
|
||||||
version: '1.5.0',
|
version: '1.5.0',
|
||||||
http_address: 'inet[/127.0.0.1:9210]',
|
http_address: `inet[/127.0.0.1:${esPort}]`,
|
||||||
ip: '127.0.0.1'
|
ip: '127.0.0.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +79,7 @@ describe('plugins/elasticsearch', function () {
|
||||||
|
|
||||||
it('should set the cluster red if the ping fails, then to green', function () {
|
it('should set the cluster red if the ping fails, then to green', function () {
|
||||||
|
|
||||||
get.withArgs('elasticsearch.url').returns('http://localhost:9210');
|
get.withArgs('elasticsearch.url').returns(esUrl);
|
||||||
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
|
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
|
||||||
get.withArgs('kibana.index').returns('.my-kibana');
|
get.withArgs('kibana.index').returns('.my-kibana');
|
||||||
client.ping.onCall(0).returns(Promise.reject(new NoConnections()));
|
client.ping.onCall(0).returns(Promise.reject(new NoConnections()));
|
||||||
|
@ -85,7 +91,7 @@ describe('plugins/elasticsearch', function () {
|
||||||
expect(plugin.status.yellow.args[0][0]).to.be('Waiting for Elasticsearch');
|
expect(plugin.status.yellow.args[0][0]).to.be('Waiting for Elasticsearch');
|
||||||
sinon.assert.calledOnce(plugin.status.red);
|
sinon.assert.calledOnce(plugin.status.red);
|
||||||
expect(plugin.status.red.args[0][0]).to.be(
|
expect(plugin.status.red.args[0][0]).to.be(
|
||||||
'Unable to connect to Elasticsearch at http://localhost:9210.'
|
`Unable to connect to Elasticsearch at ${esUrl}.`
|
||||||
);
|
);
|
||||||
sinon.assert.calledTwice(client.ping);
|
sinon.assert.calledTwice(client.ping);
|
||||||
sinon.assert.calledOnce(client.nodes.info);
|
sinon.assert.calledOnce(client.nodes.info);
|
||||||
|
@ -97,7 +103,7 @@ describe('plugins/elasticsearch', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should set the cluster red if the health check status is red, then to green', function () {
|
it('should set the cluster red if the health check status is red, then to green', function () {
|
||||||
get.withArgs('elasticsearch.url').returns('http://localhost:9210');
|
get.withArgs('elasticsearch.url').returns(esUrl);
|
||||||
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
|
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
|
||||||
get.withArgs('kibana.index').returns('.my-kibana');
|
get.withArgs('kibana.index').returns('.my-kibana');
|
||||||
client.ping.returns(Promise.resolve());
|
client.ping.returns(Promise.resolve());
|
||||||
|
@ -120,7 +126,7 @@ describe('plugins/elasticsearch', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should set the cluster yellow if the health check timed_out and create index', function () {
|
it('should set the cluster yellow if the health check timed_out and create index', function () {
|
||||||
get.withArgs('elasticsearch.url').returns('http://localhost:9210');
|
get.withArgs('elasticsearch.url').returns(esUrl);
|
||||||
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
|
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
|
||||||
get.withArgs('kibana.index').returns('.my-kibana');
|
get.withArgs('kibana.index').returns('.my-kibana');
|
||||||
client.ping.returns(Promise.resolve());
|
client.ping.returns(Promise.resolve());
|
||||||
|
|
|
@ -3,11 +3,11 @@ import expect from 'expect.js';
|
||||||
import sinon from 'sinon';
|
import sinon from 'sinon';
|
||||||
|
|
||||||
import isUpgradeable from '../is_upgradeable';
|
import isUpgradeable from '../is_upgradeable';
|
||||||
import pkg from '../../../../utils/packageJson';
|
import pkg from '../../../../utils/package_json';
|
||||||
let version = pkg.version;
|
let version = pkg.version;
|
||||||
|
|
||||||
describe('plugins/elasticsearch', function () {
|
describe('plugins/elasticsearch', function () {
|
||||||
describe('lib/isUpgradeable', function () {
|
describe('lib/is_upgradeable', function () {
|
||||||
let server = {
|
let server = {
|
||||||
config: _.constant({
|
config: _.constant({
|
||||||
get: function (key) {
|
get: function (key) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import angular from 'angular';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import sinon from 'auto-release-sinon';
|
import sinon from 'auto-release-sinon';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import 'ui/render_directive';
|
import 'ui/render_directive';
|
||||||
import 'plugins/kbn_doc_views/views/table';
|
import 'plugins/kbn_doc_views/views/table';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/VislibVisType';
|
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
import VisSchemasProvider from 'ui/vis/schemas';
|
||||||
import areaTemplate from 'plugins/kbn_vislib_vis_types/editors/area.html';
|
import areaTemplate from 'plugins/kbn_vislib_vis_types/editors/area.html';
|
||||||
|
|
||||||
export default function HistogramVisType(Private) {
|
export default function HistogramVisType(Private) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/VislibVisType';
|
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
import VisSchemasProvider from 'ui/vis/schemas';
|
||||||
import histogramTemplate from 'plugins/kbn_vislib_vis_types/editors/histogram.html';
|
import histogramTemplate from 'plugins/kbn_vislib_vis_types/editors/histogram.html';
|
||||||
|
|
||||||
export default function HistogramVisType(Private) {
|
export default function HistogramVisType(Private) {
|
||||||
|
|
|
@ -3,4 +3,4 @@ visTypes.register(require('plugins/kbn_vislib_vis_types/histogram'));
|
||||||
visTypes.register(require('plugins/kbn_vislib_vis_types/line'));
|
visTypes.register(require('plugins/kbn_vislib_vis_types/line'));
|
||||||
visTypes.register(require('plugins/kbn_vislib_vis_types/pie'));
|
visTypes.register(require('plugins/kbn_vislib_vis_types/pie'));
|
||||||
visTypes.register(require('plugins/kbn_vislib_vis_types/area'));
|
visTypes.register(require('plugins/kbn_vislib_vis_types/area'));
|
||||||
visTypes.register(require('plugins/kbn_vislib_vis_types/tileMap'));
|
visTypes.register(require('plugins/kbn_vislib_vis_types/tile_map'));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/VislibVisType';
|
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
import VisSchemasProvider from 'ui/vis/schemas';
|
||||||
import lineTemplate from 'plugins/kbn_vislib_vis_types/editors/line.html';
|
import lineTemplate from 'plugins/kbn_vislib_vis_types/editors/line.html';
|
||||||
|
|
||||||
export default function HistogramVisType(Private) {
|
export default function HistogramVisType(Private) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/VislibVisType';
|
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
import VisSchemasProvider from 'ui/vis/schemas';
|
||||||
import pieTemplate from 'plugins/kbn_vislib_vis_types/editors/pie.html';
|
import pieTemplate from 'plugins/kbn_vislib_vis_types/editors/pie.html';
|
||||||
|
|
||||||
export default function HistogramVisType(Private) {
|
export default function HistogramVisType(Private) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import supports from 'ui/utils/supports';
|
import supports from 'ui/utils/supports';
|
||||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/VislibVisType';
|
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
import VisSchemasProvider from 'ui/vis/schemas';
|
||||||
import AggResponseGeoJsonGeoJsonProvider from 'ui/agg_response/geo_json/geo_json';
|
import AggResponseGeoJsonGeoJsonProvider from 'ui/agg_response/geo_json/geo_json';
|
||||||
import FilterBarPushFilterProvider from 'ui/filter_bar/push_filter';
|
import FilterBarPushFilterProvider from 'ui/filter_bar/push_filter';
|
||||||
import tileMapTemplate from 'plugins/kbn_vislib_vis_types/editors/tile_map.html';
|
import tileMapTemplate from 'plugins/kbn_vislib_vis_types/editors/tile_map.html';
|
|
@ -1,6 +1,6 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import Binder from 'ui/Binder';
|
import Binder from 'ui/binder';
|
||||||
import 'gridster';
|
import 'gridster';
|
||||||
import uiModules from 'ui/modules';
|
import uiModules from 'ui/modules';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
import ConfigTemplate from 'ui/ConfigTemplate';
|
import ConfigTemplate from 'ui/config_template';
|
||||||
import chrome from 'ui/chrome';
|
import chrome from 'ui/chrome';
|
||||||
import 'ui/directives/config';
|
import 'ui/directives/config';
|
||||||
import 'ui/courier';
|
import 'ui/courier';
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import sinon from 'auto-release-sinon';
|
import sinon from 'auto-release-sinon';
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import 'ui/private';
|
import 'ui/private';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import fieldCalculator from 'plugins/kibana/discover/components/field_chooser/lib/field_calculator';
|
import fieldCalculator from 'plugins/kibana/discover/components/field_chooser/lib/field_calculator';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
import 'ui/private';
|
import 'ui/private';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import sinon from 'auto-release-sinon';
|
import sinon from 'auto-release-sinon';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
import PluginsKibanaDiscoverHitSortFnProvider from 'plugins/kibana/discover/_hit_sort_fn';
|
import PluginsKibanaDiscoverHitSortFnProvider from 'plugins/kibana/discover/_hit_sort_fn';
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import ConfigTemplate from 'ui/ConfigTemplate';
|
import ConfigTemplate from 'ui/config_template';
|
||||||
import getSort from 'ui/doc_table/lib/get_sort';
|
import getSort from 'ui/doc_table/lib/get_sort';
|
||||||
import rison from 'ui/utils/rison';
|
import rison from 'ui/utils/rison';
|
||||||
import dateMath from 'ui/utils/dateMath';
|
import dateMath from 'ui/utils/date_math';
|
||||||
import 'ui/doc_table';
|
import 'ui/doc_table';
|
||||||
import 'ui/visualize';
|
import 'ui/visualize';
|
||||||
import 'ui/notify';
|
import 'ui/notify';
|
||||||
import 'ui/fixedScroll';
|
import 'ui/fixed_scroll';
|
||||||
import 'ui/directives/validate_json';
|
import 'ui/directives/validate_json';
|
||||||
import 'ui/filters/moment';
|
import 'ui/filters/moment';
|
||||||
import 'ui/courier';
|
import 'ui/courier';
|
||||||
|
@ -17,7 +17,7 @@ import 'ui/state_management/app_state';
|
||||||
import 'ui/timefilter';
|
import 'ui/timefilter';
|
||||||
import 'ui/highlight/highlight_tags';
|
import 'ui/highlight/highlight_tags';
|
||||||
import 'ui/share';
|
import 'ui/share';
|
||||||
import VisProvider from 'ui/Vis';
|
import VisProvider from 'ui/vis';
|
||||||
import DocTitleProvider from 'ui/doc_title';
|
import DocTitleProvider from 'ui/doc_title';
|
||||||
import UtilsBrushEventProvider from 'ui/utils/brush_event';
|
import UtilsBrushEventProvider from 'ui/utils/brush_event';
|
||||||
import PluginsKibanaDiscoverHitSortFnProvider from 'plugins/kibana/discover/_hit_sort_fn';
|
import PluginsKibanaDiscoverHitSortFnProvider from 'plugins/kibana/discover/_hit_sort_fn';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Load the kibana app dependencies.
|
// Load the kibana app dependencies.
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
import 'plugins/kibana/doc/index';
|
import 'plugins/kibana/doc/index';
|
||||||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||||
|
|
|
@ -20,7 +20,7 @@ uiRoutes
|
||||||
redirectTo: '/settings/indices'
|
redirectTo: '/settings/indices'
|
||||||
});
|
});
|
||||||
|
|
||||||
require('ui/index_patterns/routeSetup/loadDefault')({
|
require('ui/index_patterns/route_setup/load_default')({
|
||||||
notRequiredRe: /^\/settings\//,
|
notRequiredRe: /^\/settings\//,
|
||||||
whenMissingRedirectTo: '/settings/indices'
|
whenMissingRedirectTo: '/settings/indices'
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import 'plugins/kibana/visualize/editor/agg';
|
import 'plugins/kibana/visualize/editor/agg';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import VisAggConfigProvider from 'ui/Vis/AggConfig';
|
import VisAggConfigProvider from 'ui/vis/agg_config';
|
||||||
import uiModules from 'ui/modules';
|
import uiModules from 'ui/modules';
|
||||||
import aggAddTemplate from 'plugins/kibana/visualize/editor/agg_add.html';
|
import aggAddTemplate from 'plugins/kibana/visualize/editor/agg_add.html';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import IndexedArray from 'ui/IndexedArray';
|
import IndexedArray from 'ui/indexed_array';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import aggSelectHtml from 'plugins/kibana/visualize/editor/agg_select.html';
|
import aggSelectHtml from 'plugins/kibana/visualize/editor/agg_select.html';
|
||||||
|
|
|
@ -7,7 +7,7 @@ import 'ui/visualize';
|
||||||
import 'ui/collapsible_sidebar';
|
import 'ui/collapsible_sidebar';
|
||||||
import 'ui/share';
|
import 'ui/share';
|
||||||
import angular from 'angular';
|
import angular from 'angular';
|
||||||
import ConfigTemplate from 'ui/ConfigTemplate';
|
import ConfigTemplate from 'ui/config_template';
|
||||||
import Notifier from 'ui/notify/notifier';
|
import Notifier from 'ui/notify/notifier';
|
||||||
import RegistryVisTypesProvider from 'ui/registry/vis_types';
|
import RegistryVisTypesProvider from 'ui/registry/vis_types';
|
||||||
import DocTitleProvider from 'ui/doc_title';
|
import DocTitleProvider from 'ui/doc_title';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import VisProvider from 'ui/Vis';
|
import VisProvider from 'ui/vis';
|
||||||
import uiModules from 'ui/modules';
|
import uiModules from 'ui/modules';
|
||||||
uiModules
|
uiModules
|
||||||
.get('app/visualize')
|
.get('app/visualize')
|
||||||
|
|
|
@ -7,9 +7,10 @@ module.exports = function registerDelete(server) {
|
||||||
path: '/api/kibana/ingest/{id}',
|
path: '/api/kibana/ingest/{id}',
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
handler: function (req, reply) {
|
handler: function (req, reply) {
|
||||||
|
const kibanaIndex = server.config().get('kibana.index');
|
||||||
const callWithRequest = server.plugins.elasticsearch.callWithRequest;
|
const callWithRequest = server.plugins.elasticsearch.callWithRequest;
|
||||||
const deletePatternParams = {
|
const deletePatternParams = {
|
||||||
index: '.kibana',
|
index: kibanaIndex,
|
||||||
type: 'index-pattern',
|
type: 'index-pattern',
|
||||||
id: req.params.id
|
id: req.params.id
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,6 +17,7 @@ module.exports = function registerPost(server) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handler: function (req, reply) {
|
handler: function (req, reply) {
|
||||||
|
const kibanaIndex = server.config().get('kibana.index');
|
||||||
const callWithRequest = server.plugins.elasticsearch.callWithRequest;
|
const callWithRequest = server.plugins.elasticsearch.callWithRequest;
|
||||||
const requestDocument = _.cloneDeep(req.payload);
|
const requestDocument = _.cloneDeep(req.payload);
|
||||||
const indexPatternId = requestDocument.id;
|
const indexPatternId = requestDocument.id;
|
||||||
|
@ -36,7 +37,7 @@ module.exports = function registerPost(server) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const patternCreateParams = {
|
const patternCreateParams = {
|
||||||
index: '.kibana',
|
index: kibanaIndex,
|
||||||
type: 'index-pattern',
|
type: 'index-pattern',
|
||||||
id: indexPatternId,
|
id: indexPatternId,
|
||||||
body: indexPattern
|
body: indexPattern
|
||||||
|
@ -74,7 +75,7 @@ module.exports = function registerPost(server) {
|
||||||
return callWithRequest(req, 'indices.putTemplate', templateParams)
|
return callWithRequest(req, 'indices.putTemplate', templateParams)
|
||||||
.catch((templateError) => {
|
.catch((templateError) => {
|
||||||
const deleteParams = {
|
const deleteParams = {
|
||||||
index: '.kibana',
|
index: kibanaIndex,
|
||||||
type: 'index-pattern',
|
type: 'index-pattern',
|
||||||
id: indexPatternId
|
id: indexPatternId
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
|
|
||||||
describe('markdown vis controller', function () {
|
describe('markdown vis controller', function () {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'plugins/markdown_vis/markdown_vis.less';
|
import 'plugins/markdown_vis/markdown_vis.less';
|
||||||
import 'plugins/markdown_vis/markdown_vis_controller';
|
import 'plugins/markdown_vis/markdown_vis_controller';
|
||||||
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/TemplateVisType';
|
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/template_vis_type';
|
||||||
import markdownVisTemplate from 'plugins/markdown_vis/markdown_vis.html';
|
import markdownVisTemplate from 'plugins/markdown_vis/markdown_vis.html';
|
||||||
import markdownVisParamsTemplate from 'plugins/markdown_vis/markdown_vis_params.html';
|
import markdownVisParamsTemplate from 'plugins/markdown_vis/markdown_vis_params.html';
|
||||||
// we need to load the css ourselves
|
// we need to load the css ourselves
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
|
|
||||||
describe('metric vis', function () {
|
describe('metric vis', function () {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'plugins/metric_vis/metric_vis.less';
|
import 'plugins/metric_vis/metric_vis.less';
|
||||||
import 'plugins/metric_vis/metric_vis_controller';
|
import 'plugins/metric_vis/metric_vis_controller';
|
||||||
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/TemplateVisType';
|
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/template_vis_type';
|
||||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
import VisSchemasProvider from 'ui/vis/schemas';
|
||||||
import metricVisTemplate from 'plugins/metric_vis/metric_vis.html';
|
import metricVisTemplate from 'plugins/metric_vis/metric_vis.html';
|
||||||
import metricVisParamsTemplate from 'plugins/metric_vis/metric_vis_params.html';
|
import metricVisParamsTemplate from 'plugins/metric_vis/metric_vis_params.html';
|
||||||
// we need to load the css ourselves
|
// we need to load the css ourselves
|
||||||
|
|
|
@ -2,8 +2,8 @@ module.exports = function (kibana) {
|
||||||
return new kibana.Plugin({
|
return new kibana.Plugin({
|
||||||
uiExports: {
|
uiExports: {
|
||||||
spyModes: [
|
spyModes: [
|
||||||
'plugins/spyModes/tableSpyMode',
|
'plugins/spy_modes/table_spy_mode',
|
||||||
'plugins/spyModes/reqRespStatsSpyMode'
|
'plugins/spy_modes/req_resp_stats_spy_mode'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"name": "spyModes",
|
"name": "spy_modes",
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import reqRespStatsHTML from 'plugins/spyModes/reqRespStatsSpyMode.html';
|
import reqRespStatsHTML from 'plugins/spy_modes/req_resp_stats_spy_mode.html';
|
||||||
|
|
||||||
const linkReqRespStats = function ($scope, config) {
|
const linkReqRespStats = function ($scope, config) {
|
||||||
$scope.$bind('req', 'searchSource.history[searchSource.history.length - 1]');
|
$scope.$bind('req', 'searchSource.history[searchSource.history.length - 1]');
|
|
@ -2,7 +2,7 @@ import { saveAs } from '@spalger/filesaver';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import 'ui/agg_table';
|
import 'ui/agg_table';
|
||||||
import AggResponseTabifyTabifyProvider from 'ui/agg_response/tabify/tabify';
|
import AggResponseTabifyTabifyProvider from 'ui/agg_response/tabify/tabify';
|
||||||
import tableSpyModeTemplate from 'plugins/spyModes/tableSpyMode.html';
|
import tableSpyModeTemplate from 'plugins/spy_modes/table_spy_mode.html';
|
||||||
function VisSpyTableProvider(Notifier, $filter, $rootScope, config, Private) {
|
function VisSpyTableProvider(Notifier, $filter, $rootScope, config, Private) {
|
||||||
const tabifyAggResponse = Private(AggResponseTabifyTabifyProvider);
|
const tabifyAggResponse = Private(AggResponseTabifyTabifyProvider);
|
||||||
|
|
|
@ -3,7 +3,7 @@ module.exports = function (kibana) {
|
||||||
uiExports: {
|
uiExports: {
|
||||||
app: {
|
app: {
|
||||||
title: 'Server Status',
|
title: 'Server Status',
|
||||||
main: 'plugins/statusPage/statusPage',
|
main: 'plugins/status_page/status_page',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
url: '/status'
|
url: '/status'
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"name": "statusPage",
|
"name": "status_page",
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
import formatNumber from './formatNumber';
|
import formatNumber from './format_number';
|
||||||
|
|
||||||
module.exports = function makeChartOptions(type) {
|
module.exports = function makeChartOptions(type) {
|
||||||
return {
|
return {
|
|
@ -2,8 +2,8 @@ import _ from 'lodash';
|
||||||
import notify from 'ui/notify';
|
import notify from 'ui/notify';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import 'ui/autoload/styles';
|
import 'ui/autoload/styles';
|
||||||
import 'plugins/statusPage/statusPageMetric';
|
import 'plugins/status_page/status_page_metric';
|
||||||
import 'plugins/statusPage/statusPage.less';
|
import 'plugins/status_page/status_page.less';
|
||||||
|
|
||||||
|
|
||||||
const chrome = require('ui/chrome')
|
const chrome = require('ui/chrome')
|
||||||
|
@ -14,7 +14,7 @@ const chrome = require('ui/chrome')
|
||||||
activeIndicatorColor: '#EFF0F2'
|
activeIndicatorColor: '#EFF0F2'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
.setRootTemplate(require('plugins/statusPage/statusPage.html'))
|
.setRootTemplate(require('plugins/status_page/status_page.html'))
|
||||||
.setRootController('ui', function ($http, $scope) {
|
.setRootController('ui', function ($http, $scope) {
|
||||||
const ui = this;
|
const ui = this;
|
||||||
ui.loading = false;
|
ui.loading = false;
|
|
@ -2,11 +2,11 @@ import _ from 'lodash';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import numeral from 'numeral';
|
import numeral from 'numeral';
|
||||||
|
|
||||||
import toTitleCase from './lib/toTitleCase';
|
import toTitleCase from './lib/to_title_case';
|
||||||
import formatNumber from './lib/formatNumber';
|
import formatNumber from './lib/format_number';
|
||||||
import readStatData from './lib/readStatData';
|
import readStatData from './lib/read_stat_data';
|
||||||
import uiModules from 'ui/modules';
|
import uiModules from 'ui/modules';
|
||||||
import statusPageMetricTemplate from 'plugins/statusPage/statusPageMetric.html';
|
import statusPageMetricTemplate from 'plugins/status_page/status_page_metric.html';
|
||||||
|
|
||||||
function calcAvg(metricList, metricNumberType) {
|
function calcAvg(metricList, metricNumberType) {
|
||||||
return metricList.map(function (data) {
|
return metricList.map(function (data) {
|
|
@ -1,10 +1,10 @@
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import sinon from 'auto-release-sinon';
|
import sinon from 'auto-release-sinon';
|
||||||
import AggResponseTabifyTableGroupProvider from 'ui/agg_response/tabify/_table_group';
|
import AggResponseTabifyTableGroupProvider from 'ui/agg_response/tabify/_table_group';
|
||||||
import VisProvider from 'ui/Vis';
|
import VisProvider from 'ui/vis';
|
||||||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||||
describe('Integration', function () {
|
describe('Integration', function () {
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
import ngMock from 'ngMock';
|
import ngMock from 'ng_mock';
|
||||||
import sinon from 'auto-release-sinon';
|
import sinon from 'auto-release-sinon';
|
||||||
import tabifyPm from 'ui/agg_response/tabify/tabify';
|
import tabifyPm from 'ui/agg_response/tabify/tabify';
|
||||||
import AggResponseTabifyTableGroupProvider from 'ui/agg_response/tabify/_table_group';
|
import AggResponseTabifyTableGroupProvider from 'ui/agg_response/tabify/_table_group';
|
||||||
import VisProvider from 'ui/Vis';
|
import VisProvider from 'ui/vis';
|
||||||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||||
describe('Controller', function () {
|
describe('Controller', function () {
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ import 'plugins/table_vis/table_vis_controller';
|
||||||
import 'plugins/table_vis/table_vis_params';
|
import 'plugins/table_vis/table_vis_params';
|
||||||
import 'ui/agg_table';
|
import 'ui/agg_table';
|
||||||
import 'ui/agg_table/agg_table_group';
|
import 'ui/agg_table/agg_table_group';
|
||||||
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/TemplateVisType';
|
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/template_vis_type';
|
||||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
import VisSchemasProvider from 'ui/vis/schemas';
|
||||||
import tableVisTemplate from 'plugins/table_vis/table_vis.html';
|
import tableVisTemplate from 'plugins/table_vis/table_vis.html';
|
||||||
// we need to load the css ourselves
|
// we need to load the css ourselves
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"name": "testsBundle",
|
|
||||||
"version": "0.0.0"
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
import fromRoot from '../../utils/fromRoot';
|
import fromRoot from '../../utils/from_root';
|
||||||
import { chain, memoize } from 'lodash';
|
import { chain, memoize } from 'lodash';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
import { map, fromNode } from 'bluebird';
|
import { map, fromNode } from 'bluebird';
|
|
@ -1,6 +1,7 @@
|
||||||
import { union } from 'lodash';
|
import { union } from 'lodash';
|
||||||
import findSourceFiles from './findSourceFiles';
|
|
||||||
import fromRoot from '../../utils/fromRoot';
|
import findSourceFiles from './find_source_files';
|
||||||
|
import fromRoot from '../../utils/from_root';
|
||||||
|
|
||||||
export default (kibana) => {
|
export default (kibana) => {
|
||||||
return new kibana.Plugin({
|
return new kibana.Plugin({
|
||||||
|
@ -18,7 +19,7 @@ export default (kibana) => {
|
||||||
let config = kibana.config;
|
let config = kibana.config;
|
||||||
|
|
||||||
const testGlobs = ['src/ui/public/**/*.js'];
|
const testGlobs = ['src/ui/public/**/*.js'];
|
||||||
const testingPluginId = config.get('testsBundle.pluginId');
|
const testingPluginId = config.get('tests_bundle.pluginId');
|
||||||
|
|
||||||
if (testingPluginId) {
|
if (testingPluginId) {
|
||||||
const plugin = plugins.byId[testingPluginId];
|
const plugin = plugins.byId[testingPluginId];
|
||||||
|
@ -48,7 +49,7 @@ export default (kibana) => {
|
||||||
const testFiles = await findSourceFiles(testGlobs);
|
const testFiles = await findSourceFiles(testGlobs);
|
||||||
for (let f of testFiles) modules.push(f);
|
for (let f of testFiles) modules.push(f);
|
||||||
|
|
||||||
if (config.get('testsBundle.instrument')) {
|
if (config.get('tests_bundle.instrument')) {
|
||||||
env.addPostLoader({
|
env.addPostLoader({
|
||||||
test: /\.jsx?$/,
|
test: /\.jsx?$/,
|
||||||
exclude: /[\/\\](__tests__|node_modules|bower_components|webpackShims)[\/\\]/,
|
exclude: /[\/\\](__tests__|node_modules|bower_components|webpackShims)[\/\\]/,
|
||||||
|
@ -59,15 +60,15 @@ export default (kibana) => {
|
||||||
return new UiBundle({
|
return new UiBundle({
|
||||||
id: 'tests',
|
id: 'tests',
|
||||||
modules: modules,
|
modules: modules,
|
||||||
template: require('./testsEntryTemplate'),
|
template: require('./tests_entry_template'),
|
||||||
env: env
|
env: env
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
modules: {
|
modules: {
|
||||||
ngMock$: fromRoot('src/plugins/devMode/public/ngMock'),
|
ng_mock$: fromRoot('src/plugins/dev_mode/public/ng_mock'),
|
||||||
fixtures: fromRoot('src/fixtures'),
|
fixtures: fromRoot('src/fixtures'),
|
||||||
testUtils: fromRoot('src/testUtils'),
|
test_utils: fromRoot('src/test_utils'),
|
||||||
'angular-mocks': {
|
'angular-mocks': {
|
||||||
path: require.resolve('angular-mocks'),
|
path: require.resolve('angular-mocks'),
|
||||||
imports: 'angular'
|
imports: 'angular'
|
4
src/plugins/tests_bundle/package.json
Normal file
4
src/plugins/tests_bundle/package.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"name": "tests_bundle",
|
||||||
|
"version": "0.0.0"
|
||||||
|
}
|
|
@ -31,9 +31,9 @@ window.__KBN__ = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
require('ui/testHarness');
|
require('ui/test_harness');
|
||||||
${requires}
|
${requires}
|
||||||
require('ui/testHarness').bootstrap(/* go! */);
|
require('ui/test_harness').bootstrap(/* go! */);
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import deepCloneWithBuffers from '../deepCloneWithBuffers';
|
import deepCloneWithBuffers from '../deep_clone_with_buffers';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
|
|
||||||
describe('deepCloneWithBuffers()', function () {
|
describe('deepCloneWithBuffers()', function () {
|
|
@ -1,4 +1,4 @@
|
||||||
import explodeBy from '../explodeBy';
|
import explodeBy from '../explode_by';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
|
|
||||||
describe('explode_by(dot, flatObject)', function () {
|
describe('explode_by(dot, flatObject)', function () {
|
|
@ -1,4 +1,4 @@
|
||||||
import flattenWith from '../flattenWith';
|
import flattenWith from '../flatten_with';
|
||||||
import expect from 'expect.js';
|
import expect from 'expect.js';
|
||||||
|
|
||||||
describe('flatten_with(dot, nestedObj)', function () {
|
describe('flatten_with(dot, nestedObj)', function () {
|
|
@ -3,8 +3,8 @@ import Joi from 'joi';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import override from './override';
|
import override from './override';
|
||||||
import createDefaultSchema from './schema';
|
import createDefaultSchema from './schema';
|
||||||
import pkg from '../../utils/packageJson';
|
import pkg from '../../utils/package_json';
|
||||||
import clone from './deepCloneWithBuffers';
|
import clone from './deep_clone_with_buffers';
|
||||||
import { zipObject } from 'lodash';
|
import { zipObject } from 'lodash';
|
||||||
|
|
||||||
const schema = Symbol('Joi Schema');
|
const schema = Symbol('Joi Schema');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import flattenWith from './flattenWith';
|
import flattenWith from './flatten_with';
|
||||||
import explodeBy from './explodeBy';
|
import explodeBy from './explode_by';
|
||||||
|
|
||||||
module.exports = function (target, source) {
|
module.exports = function (target, source) {
|
||||||
var _target = flattenWith('.', target);
|
var _target = flattenWith('.', target);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import path from 'path';
|
||||||
import { get } from 'lodash';
|
import { get } from 'lodash';
|
||||||
import { randomBytes } from 'crypto';
|
import { randomBytes } from 'crypto';
|
||||||
|
|
||||||
import fromRoot from '../../utils/fromRoot';
|
import fromRoot from '../../utils/from_root';
|
||||||
|
|
||||||
module.exports = () => Joi.object({
|
module.exports = () => Joi.object({
|
||||||
pkg: Joi.object({
|
pkg: Joi.object({
|
||||||
|
|
|
@ -4,7 +4,7 @@ import _ from 'lodash';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import Boom from 'boom';
|
import Boom from 'boom';
|
||||||
import Hapi from 'hapi';
|
import Hapi from 'hapi';
|
||||||
import getDefaultRoute from './getDefaultRoute';
|
import getDefaultRoute from './get_default_route';
|
||||||
module.exports = async function (kbnServer, server, config) {
|
module.exports = async function (kbnServer, server, config) {
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ module.exports = async function (kbnServer, server, config) {
|
||||||
path: '/',
|
path: '/',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
handler: function (req, reply) {
|
handler: function (req, reply) {
|
||||||
return reply.view('rootRedirect', {
|
return reply.view('root_redirect', {
|
||||||
hashRoute: `${config.get('server.basePath')}/app/kibana`,
|
hashRoute: `${config.get('server.basePath')}/app/kibana`,
|
||||||
defaultRoute: getDefaultRoute(kbnServer),
|
defaultRoute: getDefaultRoute(kbnServer),
|
||||||
});
|
});
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue