mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Merge branch 'master' into visualizeTestChange
This commit is contained in:
commit
3eeea899f5
624 changed files with 1946 additions and 1482 deletions
|
@ -1 +1 @@
|
|||
4.3.1
|
||||
4.3.2
|
||||
|
|
|
@ -218,9 +218,10 @@ 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?
|
||||
|
||||
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. **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. **Read the code**. Understanding the changes will help you find additional things to test. Contact the submitter if you don't understand something.
|
||||
1. **Go line-by-line**. Are there [style guide](https://github.com/elastic/kibana/blob/master/STYLEGUIDE.md) violations? Strangely named variables? Magic numbers? Do the abstractions make sense to you? Are things arranged in a testable way?
|
||||
1. **Speaking of tests** Are they there? If a new function was added does it have tests? Do the tests, well, TEST anything? Do they just run the function or do they properly check the output?
|
||||
|
|
|
@ -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) {
|
||||
// set the config once before calling load-grunt-config
|
||||
// and once during so that we have access to it via
|
||||
// grunt.config.get() within the config files
|
||||
var config = {
|
||||
const config = {
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
root: __dirname,
|
||||
src: __dirname + '/src',
|
||||
|
@ -12,7 +13,7 @@ module.exports = function (grunt) {
|
|||
plugins: __dirname + '/src/plugins',
|
||||
server: __dirname + '/src/server',
|
||||
target: __dirname + '/target', // location of the compressed build targets
|
||||
testUtilsDir: __dirname + '/src/testUtils',
|
||||
testUtilsDir: __dirname + '/src/test_utils',
|
||||
configFile: __dirname + '/src/config/kibana.yml',
|
||||
|
||||
karmaBrowser: (function () {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# that connects to this Kibana instance.
|
||||
# elasticsearch.preserveHost: true
|
||||
|
||||
# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
|
||||
# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
|
||||
# dashboards. Kibana creates a new index if the index doesn’t already exist.
|
||||
# kibana.index: ".kibana"
|
||||
|
||||
|
@ -28,12 +28,12 @@
|
|||
|
||||
# If your Elasticsearch is protected with basic authentication, these settings provide
|
||||
# the username and password that the Kibana server uses to perform maintenance on the Kibana
|
||||
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
|
||||
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
|
||||
# is proxied through the Kibana server.
|
||||
# elasticsearch.username: "user"
|
||||
# elasticsearch.password: "pass"
|
||||
|
||||
# Paths to the PEM-format SSL certificate and SSL key files, respectively. These
|
||||
# Paths to the PEM-format SSL certificate and SSL key files, respectively. These
|
||||
# files enable SSL for outgoing requests from the Kibana server to the browser.
|
||||
# server.ssl.cert: /path/to/your/server.crt
|
||||
# server.ssl.key: /path/to/your/server.key
|
||||
|
@ -43,7 +43,7 @@
|
|||
# elasticsearch.ssl.cert: /path/to/your/client.crt
|
||||
# elasticsearch.ssl.key: /path/to/your/client.key
|
||||
|
||||
# Optional setting that enables you to specify a path to the PEM file for the certificate
|
||||
# Optional setting that enables you to specify a path to the PEM file for the certificate
|
||||
# authority for your Elasticsearch instance.
|
||||
# elasticsearch.ssl.ca: /path/to/your/CA.pem
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
|||
# the elasticsearch.requestTimeout setting.
|
||||
# elasticsearch.pingTimeout: 1500
|
||||
|
||||
# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
|
||||
# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
|
||||
# must be a positive integer.
|
||||
# elasticsearch.requestTimeout: 30000
|
||||
|
||||
|
@ -76,6 +76,10 @@
|
|||
# Set the value of this setting to true to suppress all logging output other than error messages.
|
||||
# logging.quiet: false
|
||||
|
||||
# Set the value of this setting to true to log all events, including system usage information
|
||||
# Set the value of this setting to true to log all events, including system usage information
|
||||
# and all requests.
|
||||
# logging.verbose: false
|
||||
|
||||
# Set the interval in milliseconds to sample system and process performance
|
||||
# metrics. Minimum is 100ms. Defaults to 10000.
|
||||
# ops.interval: 10000
|
||||
|
|
|
@ -39,3 +39,4 @@ retrying.
|
|||
error messages.
|
||||
`logging.verbose`:: *Default: false* Set the value of this setting to `true` to log all events, including system usage
|
||||
information and all requests.
|
||||
`ops.interval`:: *Default: 10000* Set the interval in milliseconds to sample system and process performance metrics. Minimum is 100ms. Defaults to 10 seconds.
|
||||
|
|
|
@ -28,7 +28,7 @@ remove a range.
|
|||
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.
|
||||
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 images: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.
|
||||
*Significant Terms*:: Displays the results of the experimental
|
||||
{ref}/search-aggregations-bucket-significantterms-aggregation.html[_significant terms_] aggregation.
|
||||
|
|
15
package.json
15
package.json
|
@ -87,9 +87,9 @@
|
|||
"babel-runtime": "5.8.20",
|
||||
"bluebird": "2.9.34",
|
||||
"boom": "2.8.0",
|
||||
"bootstrap": "3.3.5",
|
||||
"bootstrap": "3.3.6",
|
||||
"brace": "0.5.1",
|
||||
"bunyan": "1.4.0",
|
||||
"bunyan": "1.7.1",
|
||||
"clipboard": "1.5.5",
|
||||
"commander": "2.8.1",
|
||||
"css-loader": "0.17.0",
|
||||
|
@ -146,7 +146,7 @@
|
|||
"angular-mocks": "1.4.7",
|
||||
"auto-release-sinon": "1.0.3",
|
||||
"babel-eslint": "4.1.8",
|
||||
"chokidar": "1.0.5",
|
||||
"chokidar": "1.4.3",
|
||||
"eslint": "1.10.3",
|
||||
"eslint-plugin-mocha": "1.1.0",
|
||||
"expect.js": "0.3.1",
|
||||
|
@ -156,7 +156,7 @@
|
|||
"grunt-cli": "0.1.13",
|
||||
"grunt-contrib-clean": "0.6.0",
|
||||
"grunt-contrib-copy": "0.8.1",
|
||||
"grunt-esvm": "2.1.1",
|
||||
"grunt-esvm": "3.0.3",
|
||||
"grunt-karma": "0.12.0",
|
||||
"grunt-run": "0.5.0",
|
||||
"grunt-s3": "0.2.0-alpha.3",
|
||||
|
@ -174,9 +174,8 @@
|
|||
"karma-ie-launcher": "0.2.0",
|
||||
"karma-mocha": "0.2.0",
|
||||
"karma-safari-launcher": "0.1.1",
|
||||
"libesvm": "3.3.0",
|
||||
"license-checker": "3.1.0",
|
||||
"load-grunt-config": "0.7.2",
|
||||
"load-grunt-config": "0.19.1",
|
||||
"makelogs": "3.0.0-beta3",
|
||||
"marked-text-renderer": "0.1.0",
|
||||
"mocha": "2.3.0",
|
||||
|
@ -189,7 +188,7 @@
|
|||
"supertest-as-promised": "2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.3.1",
|
||||
"npm": "2.14.21"
|
||||
"node": "4.3.2",
|
||||
"npm": "2.14.22"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import pkg from '../utils/packageJson';
|
||||
import Command from './Command';
|
||||
import pkg from '../utils/package_json';
|
||||
import Command from './command';
|
||||
|
||||
let argv = process.env.kbnWorkerArgv ? JSON.parse(process.env.kbnWorkerArgv) : process.argv.slice();
|
||||
let program = new Command('bin/kibana');
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import cluster from 'cluster';
|
||||
const { join } = require('path');
|
||||
const { join, resolve } = require('path');
|
||||
const { format: formatUrl } = require('url');
|
||||
import Hapi from 'hapi';
|
||||
const { debounce, compact, get, invoke, bindAll, once, sample } = 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 BasePathProxy from './base_path_proxy';
|
||||
|
||||
|
@ -83,16 +83,21 @@ module.exports = class ClusterManager {
|
|||
|
||||
setupWatching(extraPaths) {
|
||||
const chokidar = require('chokidar');
|
||||
const fromRoot = require('../../utils/fromRoot');
|
||||
const fromRoot = require('../../utils/from_root');
|
||||
|
||||
this.watcher = chokidar.watch([
|
||||
'src/plugins',
|
||||
'src/server',
|
||||
'src/ui',
|
||||
'src/utils',
|
||||
'config',
|
||||
...extraPaths
|
||||
], {
|
||||
const watchPaths = uniq(
|
||||
[
|
||||
fromRoot('src/plugins'),
|
||||
fromRoot('src/server'),
|
||||
fromRoot('src/ui'),
|
||||
fromRoot('src/utils'),
|
||||
fromRoot('config'),
|
||||
...extraPaths
|
||||
]
|
||||
.map(path => resolve(path))
|
||||
);
|
||||
|
||||
this.watcher = chokidar.watch(watchPaths, {
|
||||
cwd: fromRoot('.'),
|
||||
ignored: /[\\\/](\..*|node_modules|bower_components|public|__tests__)[\\\/]/
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@ import cluster from 'cluster';
|
|||
let { resolve } = require('path');
|
||||
let { EventEmitter } = require('events');
|
||||
|
||||
import fromRoot from '../../utils/fromRoot';
|
||||
import fromRoot from '../../utils/from_root';
|
||||
|
||||
let cliPath = fromRoot('src/cli');
|
||||
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
|
||||
// before calling babel/register
|
||||
const babelOptions = require('../optimize/babelOptions').node;
|
||||
const babelOptions = require('../optimize/babel_options').node;
|
||||
require('babel/register')(babelOptions);
|
||||
require('./cli');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import path from 'path';
|
||||
import expect from 'expect.js';
|
||||
|
||||
import fromRoot from '../../../utils/fromRoot';
|
||||
import fromRoot from '../../../utils/from_root';
|
||||
import settingParser from '../setting_parser';
|
||||
|
||||
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 installer from './plugin_installer';
|
||||
import remover from './plugin_remover';
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import _ from 'lodash';
|
||||
import fromRoot from '../../utils/fromRoot';
|
||||
import fromRoot from '../../utils/from_root';
|
||||
import pluginDownloader from './plugin_downloader';
|
||||
import pluginCleaner from './plugin_cleaner';
|
||||
import pluginExtractor from './plugin_extractor';
|
||||
import KbnServer from '../../server/KbnServer';
|
||||
import KbnServer from '../../server/kbn_server';
|
||||
import readYamlConfig from '../serve/read_yaml_config';
|
||||
import Promise from 'bluebird';
|
||||
import { sync as rimrafSync } from 'rimraf';
|
||||
|
|
|
@ -2,7 +2,7 @@ import _ from 'lodash';
|
|||
import fs from 'fs';
|
||||
import yaml from 'js-yaml';
|
||||
|
||||
import fromRoot from '../../utils/fromRoot';
|
||||
import fromRoot from '../../utils/from_root';
|
||||
|
||||
let legacySettingMap = {
|
||||
// server
|
||||
|
|
|
@ -3,7 +3,7 @@ const { isWorker } = require('cluster');
|
|||
const { resolve } = require('path');
|
||||
|
||||
const cwd = process.cwd();
|
||||
import fromRoot from '../../utils/fromRoot';
|
||||
import fromRoot from '../../utils/from_root';
|
||||
|
||||
let canCluster;
|
||||
try {
|
||||
|
@ -126,7 +126,7 @@ module.exports = function (program) {
|
|||
}
|
||||
|
||||
let kbnServer = {};
|
||||
const KbnServer = require('../../server/KbnServer');
|
||||
const KbnServer = require('../../server/kbn_server');
|
||||
try {
|
||||
kbnServer = new KbnServer(settings);
|
||||
await kbnServer.ready();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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 FixturesLogstashFieldsProvider from 'fixtures/logstash_fields';
|
||||
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 CommonsChunkPlugin from 'webpack/lib/optimize/CommonsChunkPlugin';
|
||||
|
||||
import fromRoot from '../utils/fromRoot';
|
||||
import babelOptions from './babelOptions';
|
||||
import fromRoot from '../utils/from_root';
|
||||
import babelOptions from './babel_options';
|
||||
import { inherits } from 'util';
|
||||
import { defaults, transform } from 'lodash';
|
||||
import { resolve } from 'path';
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
import BaseOptimizer from './BaseOptimizer';
|
||||
import fromRoot from '../utils/fromRoot';
|
||||
import BaseOptimizer from './base_optimizer';
|
||||
import fromRoot from '../utils/from_root';
|
||||
import { fromNode } from 'bluebird';
|
||||
import { writeFile } from 'fs';
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import FsOptimizer from './FsOptimizer';
|
||||
import FsOptimizer from './fs_optimizer';
|
||||
module.exports = async (kbnServer, server, config) => {
|
||||
if (!config.get('optimize.enabled')) return;
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ module.exports = async (kbnServer, server, config) => {
|
|||
*/
|
||||
switch (process.env.kbnWorkerType) {
|
||||
case 'optmzr':
|
||||
await kbnServer.mixin(require('./optmzrRole'));
|
||||
await kbnServer.mixin(require('./optmzr_role'));
|
||||
break;
|
||||
|
||||
case 'server':
|
||||
await kbnServer.mixin(require('./proxyRole'));
|
||||
await kbnServer.mixin(require('./proxy_role'));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Boom from 'boom';
|
||||
|
||||
import BaseOptimizer from '../BaseOptimizer';
|
||||
import WeirdControlFlow from './WeirdControlFlow';
|
||||
import BaseOptimizer from '../base_optimizer';
|
||||
import WeirdControlFlow from './weird_control_flow';
|
||||
import { once, pick, size } from 'lodash';
|
||||
import { join } from 'path';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import LazyServer from './LazyServer';
|
||||
import LazyOptimizer from './LazyOptimizer';
|
||||
import fromRoot from '../../utils/fromRoot';
|
||||
import LazyServer from './lazy_server';
|
||||
import LazyOptimizer from './lazy_optimizer';
|
||||
import fromRoot from '../../utils/from_root';
|
||||
|
||||
export default async (kbnServer, kibanaHapiServer, config) => {
|
||||
let server = new LazyServer(
|
|
@ -3,7 +3,7 @@ module.exports = (kibana) => {
|
|||
return new kibana.Plugin({
|
||||
uiExports: {
|
||||
spyModes: [
|
||||
'plugins/devMode/visDebugSpyPanel'
|
||||
'plugins/dev_mode/vis_debug_spy_panel'
|
||||
]
|
||||
}
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "devMode",
|
||||
"name": "dev_mode",
|
||||
"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
|
||||
require('ui/registry/spy_modes').register(VisDetailsSpyProvider);
|
||||
|
|
@ -54,7 +54,7 @@ module.exports = function ({ Plugin }) {
|
|||
return reply.continue();
|
||||
}
|
||||
|
||||
function noCreateIndex({ path }, reply) {
|
||||
function noDirectIndex({ path }, reply) {
|
||||
const requestPath = trimRight(trim(path), '/');
|
||||
const matchPath = createPath(kibanaIndex);
|
||||
|
||||
|
@ -75,7 +75,7 @@ module.exports = function ({ Plugin }) {
|
|||
['PUT', 'POST', 'DELETE'],
|
||||
`/${kibanaIndex}/{paths*}`,
|
||||
{
|
||||
pre: [ noCreateIndex, noBulkCheck ]
|
||||
pre: [ noDirectIndex, noBulkCheck ]
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import _ from 'lodash';
|
||||
import Promise from 'bluebird';
|
||||
import sinon from 'sinon';
|
||||
import url from 'url';
|
||||
|
||||
import serverConfig from '../../../../../test/server_config';
|
||||
import checkEsVersion from '../check_es_version';
|
||||
|
||||
describe('plugins/elasticsearch', function () {
|
||||
|
@ -23,7 +25,7 @@ describe('plugins/elasticsearch', function () {
|
|||
status: {
|
||||
red: sinon.stub()
|
||||
},
|
||||
url: 'http://localhost:9210'
|
||||
url: url.format(serverConfig.servers.elasticsearch)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
import Promise from 'bluebird';
|
||||
import sinon from 'sinon';
|
||||
import expect from 'expect.js';
|
||||
import url from 'url';
|
||||
|
||||
const NoConnections = require('elasticsearch').errors.NoConnections;
|
||||
|
||||
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('lib/health_check', function () {
|
||||
|
@ -39,7 +45,7 @@ describe('plugins/elasticsearch', function () {
|
|||
nodes: {
|
||||
'node-01': {
|
||||
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'
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +79,7 @@ describe('plugins/elasticsearch', 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('kibana.index').returns('.my-kibana');
|
||||
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');
|
||||
sinon.assert.calledOnce(plugin.status.red);
|
||||
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.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 () {
|
||||
get.withArgs('elasticsearch.url').returns('http://localhost:9210');
|
||||
get.withArgs('elasticsearch.url').returns(esUrl);
|
||||
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
|
||||
get.withArgs('kibana.index').returns('.my-kibana');
|
||||
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 () {
|
||||
get.withArgs('elasticsearch.url').returns('http://localhost:9210');
|
||||
get.withArgs('elasticsearch.url').returns(esUrl);
|
||||
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
|
||||
get.withArgs('kibana.index').returns('.my-kibana');
|
||||
client.ping.returns(Promise.resolve());
|
||||
|
|
|
@ -3,11 +3,11 @@ import expect from 'expect.js';
|
|||
import sinon from 'sinon';
|
||||
|
||||
import isUpgradeable from '../is_upgradeable';
|
||||
import pkg from '../../../../utils/packageJson';
|
||||
import pkg from '../../../../utils/package_json';
|
||||
let version = pkg.version;
|
||||
|
||||
describe('plugins/elasticsearch', function () {
|
||||
describe('lib/isUpgradeable', function () {
|
||||
describe('lib/is_upgradeable', function () {
|
||||
let server = {
|
||||
config: _.constant({
|
||||
get: function (key) {
|
||||
|
|
|
@ -11,7 +11,7 @@ describe('plugins/elasticsearch', function () {
|
|||
let kbnServer;
|
||||
|
||||
before(function () {
|
||||
this.timeout(15000); // sometimes waiting for server takes longer than 10
|
||||
this.timeout(60000); // sometimes waiting for server takes longer than 10
|
||||
|
||||
kbnServer = kbnTestServer.createServer();
|
||||
return kbnServer.ready()
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import SetupError from './setup_error';
|
||||
import { format } from 'util';
|
||||
import { mappings } from './kibana_index_mappings';
|
||||
|
||||
module.exports = function (server) {
|
||||
const client = server.plugins.elasticsearch.client;
|
||||
const index = server.config().get('kibana.index');
|
||||
|
@ -16,16 +18,7 @@ module.exports = function (server) {
|
|||
settings: {
|
||||
number_of_shards: 1
|
||||
},
|
||||
mappings: {
|
||||
config: {
|
||||
properties: {
|
||||
buildNum: {
|
||||
type: 'string',
|
||||
index: 'not_analyzed'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mappings
|
||||
}
|
||||
})
|
||||
.catch(handleError('Unable to create Kibana index "<%= kibana.index %>"'))
|
||||
|
|
|
@ -9,6 +9,19 @@ import callWithRequest from './call_with_request';
|
|||
module.exports = function (server) {
|
||||
const config = server.config();
|
||||
|
||||
class ElasticsearchClientLogging {
|
||||
error(err) {
|
||||
server.log(['error', 'elasticsearch'], err);
|
||||
}
|
||||
warning(message) {
|
||||
server.log(['warning', 'elasticsearch'], message);
|
||||
}
|
||||
info() {}
|
||||
debug() {}
|
||||
trace() {}
|
||||
close() {}
|
||||
}
|
||||
|
||||
function createClient(options) {
|
||||
options = _.defaults(options || {}, {
|
||||
url: config.get('elasticsearch.url'),
|
||||
|
@ -52,18 +65,7 @@ module.exports = function (server) {
|
|||
defer: function () {
|
||||
return Bluebird.defer();
|
||||
},
|
||||
log: function () {
|
||||
this.error = function (err) {
|
||||
server.log(['error', 'elasticsearch'], err);
|
||||
};
|
||||
this.warning = function (message) {
|
||||
server.log(['warning', 'elasticsearch'], message);
|
||||
};
|
||||
this.info = _.noop;
|
||||
this.debug = _.noop;
|
||||
this.trace = _.noop;
|
||||
this.close = _.noop;
|
||||
}
|
||||
log: ElasticsearchClientLogging
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -73,6 +75,7 @@ module.exports = function (server) {
|
|||
const noAuthClient = createClient({ auth: false });
|
||||
server.on('close', _.bindKey(noAuthClient, 'close'));
|
||||
|
||||
server.expose('ElasticsearchClientLogging', ElasticsearchClientLogging);
|
||||
server.expose('client', client);
|
||||
server.expose('createClient', createClient);
|
||||
server.expose('callWithRequestFactory', callWithRequest);
|
||||
|
|
10
src/plugins/elasticsearch/lib/kibana_index_mappings.js
Normal file
10
src/plugins/elasticsearch/lib/kibana_index_mappings.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
export const mappings = {
|
||||
config: {
|
||||
properties: {
|
||||
buildNum: {
|
||||
type: 'string',
|
||||
index: 'not_analyzed'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
|
@ -1,4 +1,5 @@
|
|||
import upgrade from './upgrade_config';
|
||||
import { mappings } from './kibana_index_mappings';
|
||||
|
||||
module.exports = function (server) {
|
||||
const config = server.config();
|
||||
|
@ -8,11 +9,16 @@ module.exports = function (server) {
|
|||
type: 'config',
|
||||
body: {
|
||||
size: 1000,
|
||||
sort: [ { buildNum: { order: 'desc', ignore_unmapped: true } } ]
|
||||
sort: [
|
||||
{
|
||||
buildNum: {
|
||||
order: 'desc',
|
||||
unmapped_type: mappings.config.properties.buildNum.type
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
return client.search(options).then(upgrade(server));
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import angular from 'angular';
|
|||
import _ from 'lodash';
|
||||
import sinon from 'auto-release-sinon';
|
||||
import expect from 'expect.js';
|
||||
import ngMock from 'ngMock';
|
||||
import ngMock from 'ng_mock';
|
||||
import $ from 'jquery';
|
||||
import 'ui/render_directive';
|
||||
import 'plugins/kbn_doc_views/views/table';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/VislibVisType';
|
||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||
import VisSchemasProvider from 'ui/vis/schemas';
|
||||
import areaTemplate from 'plugins/kbn_vislib_vis_types/editors/area.html';
|
||||
|
||||
export default function HistogramVisType(Private) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/VislibVisType';
|
||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||
import VisSchemasProvider from 'ui/vis/schemas';
|
||||
import histogramTemplate from 'plugins/kbn_vislib_vis_types/editors/histogram.html';
|
||||
|
||||
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/pie'));
|
||||
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 VisSchemasProvider from 'ui/Vis/Schemas';
|
||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||
import VisSchemasProvider from 'ui/vis/schemas';
|
||||
import lineTemplate from 'plugins/kbn_vislib_vis_types/editors/line.html';
|
||||
|
||||
export default function HistogramVisType(Private) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/VislibVisType';
|
||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||
import VisSchemasProvider from 'ui/vis/schemas';
|
||||
import pieTemplate from 'plugins/kbn_vislib_vis_types/editors/pie.html';
|
||||
|
||||
export default function HistogramVisType(Private) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import _ from 'lodash';
|
||||
import supports from 'ui/utils/supports';
|
||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/VislibVisType';
|
||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
||||
import VislibVisTypeVislibVisTypeProvider from 'ui/vislib_vis_type/vislib_vis_type';
|
||||
import VisSchemasProvider from 'ui/vis/schemas';
|
||||
import AggResponseGeoJsonGeoJsonProvider from 'ui/agg_response/geo_json/geo_json';
|
||||
import FilterBarPushFilterProvider from 'ui/filter_bar/push_filter';
|
||||
import tileMapTemplate from 'plugins/kbn_vislib_vis_types/editors/tile_map.html';
|
|
@ -1,4 +1,5 @@
|
|||
import ingest from './server/routes/api/ingest';
|
||||
import search from './server/routes/api/search';
|
||||
|
||||
module.exports = function (kibana) {
|
||||
return new kibana.Plugin({
|
||||
|
@ -38,6 +39,7 @@ module.exports = function (kibana) {
|
|||
|
||||
init: function (server, options) {
|
||||
ingest(server);
|
||||
search(server);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import _ from 'lodash';
|
||||
import $ from 'jquery';
|
||||
import Binder from 'ui/Binder';
|
||||
import Binder from 'ui/binder';
|
||||
import 'gridster';
|
||||
import uiModules from 'ui/modules';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div dashboard-app class="app-container dashboard-container">
|
||||
<navbar ng-show="chrome.getVisible()" name="dashboard">
|
||||
<span class="name" ng-if="dash.id" ng-bind="::dash.title" tooltip="{{::dash.title}}"></span>
|
||||
<span class="name" ng-if="dash.id" ng-bind="::dash.title" tooltip="{{::dash.title}}" tooltip-append-to-body="true"></span>
|
||||
|
||||
<form name="queryInput"
|
||||
class="fill inline-form"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import _ from 'lodash';
|
||||
import $ from 'jquery';
|
||||
import angular from 'angular';
|
||||
import ConfigTemplate from 'ui/ConfigTemplate';
|
||||
import ConfigTemplate from 'ui/config_template';
|
||||
import chrome from 'ui/chrome';
|
||||
import 'ui/directives/config';
|
||||
import 'ui/courier';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import sinon from 'auto-release-sinon';
|
||||
import ngMock from 'ngMock';
|
||||
import ngMock from 'ng_mock';
|
||||
import expect from 'expect.js';
|
||||
import $ from 'jquery';
|
||||
import 'ui/private';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
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 expect from 'expect.js';
|
||||
import 'ui/private';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
import angular from 'angular';
|
||||
import ngMock from 'ngMock';
|
||||
import ngMock from 'ng_mock';
|
||||
import _ from 'lodash';
|
||||
import sinon from 'auto-release-sinon';
|
||||
import expect from 'expect.js';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
import _ from 'lodash';
|
||||
import ngMock from 'ngMock';
|
||||
import ngMock from 'ng_mock';
|
||||
import expect from 'expect.js';
|
||||
import PluginsKibanaDiscoverHitSortFnProvider from 'plugins/kibana/discover/_hit_sort_fn';
|
||||
|
||||
|
|
|
@ -3,8 +3,15 @@
|
|||
<h5 ng-show="!field.details.error">Quick Count <kbn-info info="Top 5 values based on documents in the table" placement="right"></kbn-info>
|
||||
<span ng-if="!field.details.error" class="small discover-field-details-count">
|
||||
(
|
||||
<a ng-show="field.indexed" ng-click="updateFilterInQuery('_exists_', field.name, '+')">{{::field.details.exists}}</a>
|
||||
<span ng-show="!field.indexed">{{::field.details.exists}}</span>
|
||||
<a
|
||||
ng-show="!indexPattern.metaFields.includes(field.name)"
|
||||
ng-click="updateFilterInQuery('_exists_', field.name, '+')">
|
||||
{{::field.details.exists}}
|
||||
</a>
|
||||
<span
|
||||
ng-show="indexPattern.metaFields.includes(field.name)">
|
||||
{{::field.details.exists}}
|
||||
</span>
|
||||
/{{::field.details.total}} records
|
||||
)
|
||||
</span>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import _ from 'lodash';
|
||||
import angular from 'angular';
|
||||
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 rison from 'ui/utils/rison';
|
||||
import dateMath from 'ui/utils/dateMath';
|
||||
import dateMath from 'ui/utils/date_math';
|
||||
import 'ui/doc_table';
|
||||
import 'ui/visualize';
|
||||
import 'ui/notify';
|
||||
import 'ui/fixedScroll';
|
||||
import 'ui/fixed_scroll';
|
||||
import 'ui/directives/validate_json';
|
||||
import 'ui/filters/moment';
|
||||
import 'ui/courier';
|
||||
|
@ -17,7 +17,7 @@ import 'ui/state_management/app_state';
|
|||
import 'ui/timefilter';
|
||||
import 'ui/highlight/highlight_tags';
|
||||
import 'ui/share';
|
||||
import VisProvider from 'ui/Vis';
|
||||
import VisProvider from 'ui/vis';
|
||||
import DocTitleProvider from 'ui/doc_title';
|
||||
import UtilsBrushEventProvider from 'ui/utils/brush_event';
|
||||
import PluginsKibanaDiscoverHitSortFnProvider from 'plugins/kibana/discover/_hit_sort_fn';
|
||||
|
@ -126,7 +126,7 @@ app.controller('discover', function ($scope, config, courier, $route, $window, N
|
|||
return {
|
||||
query: $scope.searchSource.get('query') || '',
|
||||
sort: getSort.array(savedSearch.sort, $scope.indexPattern),
|
||||
columns: savedSearch.columns || ['_source'],
|
||||
columns: savedSearch.columns.length > 0 ? savedSearch.columns : config.get('defaultColumns'),
|
||||
index: $scope.indexPattern.id,
|
||||
interval: 'auto',
|
||||
filters: _.cloneDeep($scope.searchSource.getOwn('filter'))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Load the kibana app dependencies.
|
||||
import ngMock from 'ngMock';
|
||||
import ngMock from 'ng_mock';
|
||||
import expect from 'expect.js';
|
||||
import 'plugins/kibana/doc/index';
|
||||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
|
|
|
@ -20,7 +20,7 @@ uiRoutes
|
|||
redirectTo: '/settings/indices'
|
||||
});
|
||||
|
||||
require('ui/index_patterns/routeSetup/loadDefault')({
|
||||
require('ui/index_patterns/route_setup/load_default')({
|
||||
notRequiredRe: /^\/settings\//,
|
||||
whenMissingRedirectTo: '/settings/indices'
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Caution: You can break stuff here</h4>
|
||||
Be careful in here, these settings are for very advanced users only.
|
||||
Tweaks you make here can break large portionsof Kibana. Some of these
|
||||
Tweaks you make here can break large portions of Kibana. Some of these
|
||||
settings may be undocumented, unsupported or experimental. If a field has
|
||||
a default value, blanking the field will reset it to its default which
|
||||
may be unacceptable given other configuration directives. Deleting a
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import expect from 'expect.js';
|
||||
import ngMock from 'ngMock';
|
||||
import ngMock from 'ng_mock';
|
||||
import $ from 'jquery';
|
||||
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 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 'jquery';
|
||||
import aggSelectHtml from 'plugins/kibana/visualize/editor/agg_select.html';
|
||||
|
|
|
@ -7,7 +7,7 @@ import 'ui/visualize';
|
|||
import 'ui/collapsible_sidebar';
|
||||
import 'ui/share';
|
||||
import angular from 'angular';
|
||||
import ConfigTemplate from 'ui/ConfigTemplate';
|
||||
import ConfigTemplate from 'ui/config_template';
|
||||
import Notifier from 'ui/notify/notifier';
|
||||
import RegistryVisTypesProvider from 'ui/registry/vis_types';
|
||||
import DocTitleProvider from 'ui/doc_title';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
import VisProvider from 'ui/Vis';
|
||||
import VisProvider from 'ui/vis';
|
||||
import uiModules from 'ui/modules';
|
||||
uiModules
|
||||
.get('app/visualize')
|
||||
|
|
|
@ -15,8 +15,6 @@ module.exports = function createMappingsFromPatternFields(fields) {
|
|||
mapping = {
|
||||
type: 'string',
|
||||
index: 'analyzed',
|
||||
omit_norms: true,
|
||||
fielddata: {format: 'disabled'},
|
||||
fields: {
|
||||
raw: {type: 'string', index: 'not_analyzed', doc_values: true, ignore_above: 256}
|
||||
}
|
||||
|
|
|
@ -7,9 +7,10 @@ module.exports = function registerDelete(server) {
|
|||
path: '/api/kibana/ingest/{id}',
|
||||
method: 'DELETE',
|
||||
handler: function (req, reply) {
|
||||
const kibanaIndex = server.config().get('kibana.index');
|
||||
const callWithRequest = server.plugins.elasticsearch.callWithRequest;
|
||||
const deletePatternParams = {
|
||||
index: '.kibana',
|
||||
index: kibanaIndex,
|
||||
type: 'index-pattern',
|
||||
id: req.params.id
|
||||
};
|
||||
|
|
|
@ -17,6 +17,7 @@ module.exports = function registerPost(server) {
|
|||
}
|
||||
},
|
||||
handler: function (req, reply) {
|
||||
const kibanaIndex = server.config().get('kibana.index');
|
||||
const callWithRequest = server.plugins.elasticsearch.callWithRequest;
|
||||
const requestDocument = _.cloneDeep(req.payload);
|
||||
const indexPatternId = requestDocument.id;
|
||||
|
@ -36,7 +37,7 @@ module.exports = function registerPost(server) {
|
|||
}
|
||||
|
||||
const patternCreateParams = {
|
||||
index: '.kibana',
|
||||
index: kibanaIndex,
|
||||
type: 'index-pattern',
|
||||
id: indexPatternId,
|
||||
body: indexPattern
|
||||
|
@ -59,8 +60,6 @@ module.exports = function registerPost(server) {
|
|||
mapping: {
|
||||
type: 'string',
|
||||
index: 'analyzed',
|
||||
omit_norms: true,
|
||||
fielddata: {format: 'disabled'},
|
||||
fields: {
|
||||
raw: {type: 'string', index: 'not_analyzed', doc_values: true, ignore_above: 256}
|
||||
}
|
||||
|
@ -76,7 +75,7 @@ module.exports = function registerPost(server) {
|
|||
return callWithRequest(req, 'indices.putTemplate', templateParams)
|
||||
.catch((templateError) => {
|
||||
const deleteParams = {
|
||||
index: '.kibana',
|
||||
index: kibanaIndex,
|
||||
type: 'index-pattern',
|
||||
id: indexPatternId
|
||||
};
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
import _ from 'lodash';
|
||||
import handleESError from '../../../../lib/handle_es_error';
|
||||
|
||||
export default function registerCount(server) {
|
||||
server.route({
|
||||
path: '/api/kibana/{id}/_count',
|
||||
method: ['POST', 'GET'],
|
||||
handler: function (req, reply) {
|
||||
const boundCallWithRequest = _.partial(server.plugins.elasticsearch.callWithRequest, req);
|
||||
|
||||
boundCallWithRequest('count', {
|
||||
allowNoIndices: false,
|
||||
index: req.params.id
|
||||
})
|
||||
.then(
|
||||
function (res) {
|
||||
reply({count: res.count});
|
||||
},
|
||||
function (error) {
|
||||
reply(handleESError(error));
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
5
src/plugins/kibana/server/routes/api/search/index.js
Normal file
5
src/plugins/kibana/server/routes/api/search/index.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
import registerCount from './count/register_count';
|
||||
|
||||
export default function (server) {
|
||||
registerCount(server);
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
import ngMock from 'ngMock';
|
||||
import ngMock from 'ng_mock';
|
||||
import expect from 'expect.js';
|
||||
|
||||
describe('markdown vis controller', function () {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'plugins/markdown_vis/markdown_vis.less';
|
||||
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 markdownVisParamsTemplate from 'plugins/markdown_vis/markdown_vis_params.html';
|
||||
// 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';
|
||||
|
||||
describe('metric vis', function () {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'plugins/metric_vis/metric_vis.less';
|
||||
import 'plugins/metric_vis/metric_vis_controller';
|
||||
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/TemplateVisType';
|
||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
||||
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/template_vis_type';
|
||||
import VisSchemasProvider from 'ui/vis/schemas';
|
||||
import metricVisTemplate from 'plugins/metric_vis/metric_vis.html';
|
||||
import metricVisParamsTemplate from 'plugins/metric_vis/metric_vis_params.html';
|
||||
// we need to load the css ourselves
|
||||
|
|
|
@ -2,8 +2,8 @@ module.exports = function (kibana) {
|
|||
return new kibana.Plugin({
|
||||
uiExports: {
|
||||
spyModes: [
|
||||
'plugins/spyModes/tableSpyMode',
|
||||
'plugins/spyModes/reqRespStatsSpyMode'
|
||||
'plugins/spy_modes/table_spy_mode',
|
||||
'plugins/spy_modes/req_resp_stats_spy_mode'
|
||||
]
|
||||
}
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "spyModes",
|
||||
"name": "spy_modes",
|
||||
"version": "1.0.0"
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
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) {
|
||||
$scope.$bind('req', 'searchSource.history[searchSource.history.length - 1]');
|
|
@ -2,7 +2,7 @@ import { saveAs } from '@spalger/filesaver';
|
|||
import _ from 'lodash';
|
||||
import 'ui/agg_table';
|
||||
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) {
|
||||
const tabifyAggResponse = Private(AggResponseTabifyTabifyProvider);
|
||||
|
|
@ -3,7 +3,7 @@ module.exports = function (kibana) {
|
|||
uiExports: {
|
||||
app: {
|
||||
title: 'Server Status',
|
||||
main: 'plugins/statusPage/statusPage',
|
||||
main: 'plugins/status_page/status_page',
|
||||
hidden: true,
|
||||
url: '/status'
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "statusPage",
|
||||
"name": "status_page",
|
||||
"version": "1.0.0"
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
import formatNumber from './formatNumber';
|
||||
import formatNumber from './format_number';
|
||||
|
||||
module.exports = function makeChartOptions(type) {
|
||||
return {
|
|
@ -2,8 +2,8 @@ import _ from 'lodash';
|
|||
import notify from 'ui/notify';
|
||||
import $ from 'jquery';
|
||||
import 'ui/autoload/styles';
|
||||
import 'plugins/statusPage/statusPageMetric';
|
||||
import 'plugins/statusPage/statusPage.less';
|
||||
import 'plugins/status_page/status_page_metric';
|
||||
import 'plugins/status_page/status_page.less';
|
||||
|
||||
|
||||
const chrome = require('ui/chrome')
|
||||
|
@ -14,7 +14,7 @@ const chrome = require('ui/chrome')
|
|||
activeIndicatorColor: '#EFF0F2'
|
||||
}
|
||||
])
|
||||
.setRootTemplate(require('plugins/statusPage/statusPage.html'))
|
||||
.setRootTemplate(require('plugins/status_page/status_page.html'))
|
||||
.setRootController('ui', function ($http, $scope) {
|
||||
const ui = this;
|
||||
ui.loading = false;
|
|
@ -2,11 +2,11 @@ import _ from 'lodash';
|
|||
import moment from 'moment';
|
||||
import numeral from 'numeral';
|
||||
|
||||
import toTitleCase from './lib/toTitleCase';
|
||||
import formatNumber from './lib/formatNumber';
|
||||
import readStatData from './lib/readStatData';
|
||||
import toTitleCase from './lib/to_title_case';
|
||||
import formatNumber from './lib/format_number';
|
||||
import readStatData from './lib/read_stat_data';
|
||||
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) {
|
||||
return metricList.map(function (data) {
|
|
@ -1,10 +1,10 @@
|
|||
import $ from 'jquery';
|
||||
import _ from 'lodash';
|
||||
import expect from 'expect.js';
|
||||
import ngMock from 'ngMock';
|
||||
import ngMock from 'ng_mock';
|
||||
import sinon from 'auto-release-sinon';
|
||||
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';
|
||||
describe('Integration', function () {
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import $ from 'jquery';
|
||||
import _ from 'lodash';
|
||||
import expect from 'expect.js';
|
||||
import ngMock from 'ngMock';
|
||||
import ngMock from 'ng_mock';
|
||||
import sinon from 'auto-release-sinon';
|
||||
import tabifyPm from 'ui/agg_response/tabify/tabify';
|
||||
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';
|
||||
describe('Controller', function () {
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ import 'plugins/table_vis/table_vis_controller';
|
|||
import 'plugins/table_vis/table_vis_params';
|
||||
import 'ui/agg_table';
|
||||
import 'ui/agg_table/agg_table_group';
|
||||
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/TemplateVisType';
|
||||
import VisSchemasProvider from 'ui/Vis/Schemas';
|
||||
import TemplateVisTypeTemplateVisTypeProvider from 'ui/template_vis_type/template_vis_type';
|
||||
import VisSchemasProvider from 'ui/vis/schemas';
|
||||
import tableVisTemplate from 'plugins/table_vis/table_vis.html';
|
||||
// we need to load the css ourselves
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"name": "testsBundle",
|
||||
"version": "0.0.0"
|
||||
}
|
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