Merge branch 'feature/design' into settings/searchbar

This commit is contained in:
Shelby Sturgis 2016-03-17 09:49:06 -07:00
commit c42d9c214f
603 changed files with 1384 additions and 985 deletions

View file

@ -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?
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.

View file

@ -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 () {

View file

@ -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 doesnt 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

View file

@ -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.

View file

@ -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.

View file

@ -87,7 +87,7 @@
"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.7.1",
"clipboard": "1.5.5",
@ -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",

View file

@ -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');

View file

@ -4,7 +4,7 @@ const { format: formatUrl } = require('url');
import Hapi from 'hapi';
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,7 +83,7 @@ module.exports = class ClusterManager {
setupWatching(extraPaths) {
const chokidar = require('chokidar');
const fromRoot = require('../../utils/fromRoot');
const fromRoot = require('../../utils/from_root');
const watchPaths = uniq(
[

View file

@ -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']);

View file

@ -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');

View file

@ -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 () {

View file

@ -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';

View file

@ -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';

View file

@ -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

View file

@ -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();

View file

@ -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) {

View file

@ -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';

View file

@ -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';

View file

@ -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;

View file

@ -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:

View file

@ -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';

View file

@ -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(

View file

@ -3,7 +3,7 @@ module.exports = (kibana) => {
return new kibana.Plugin({
uiExports: {
spyModes: [
'plugins/devMode/visDebugSpyPanel'
'plugins/dev_mode/vis_debug_spy_panel'
]
}
});

View file

@ -1,4 +1,4 @@
{
"name": "devMode",
"name": "dev_mode",
"version": "1.0.0"
}

View file

@ -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);

View file

@ -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)
}
}
};

View file

@ -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());

View file

@ -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) {

View file

@ -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';

View file

@ -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) {

View file

@ -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) {

View file

@ -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'));

View file

@ -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) {

View file

@ -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) {

View file

@ -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';

View file

@ -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({
@ -71,6 +72,7 @@ module.exports = function (kibana) {
init: function (server, options) {
ingest(server);
search(server);
}
});

View file

@ -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';

View file

@ -4,7 +4,6 @@
<span ng-show="dash.id" class="kibana-nav-info-title">
<span ng-bind="::dash.title"></span>
</span>
</div>
<div class="button-group kibana-nav-actions" role="toolbar">

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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>

View file

@ -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';

View file

@ -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';

View file

@ -21,7 +21,7 @@ uiRoutes
redirectTo: '/settings/indices'
});
require('ui/index_patterns/routeSetup/loadDefault')({
require('ui/index_patterns/route_setup/load_default')({
notRequiredRe: /^\/settings\//,
whenMissingRedirectTo: '/settings/indices'
});

View file

@ -106,6 +106,8 @@ kbn-settings-objects-view {
}
.advanced-settings {
overflow-x: scroll;
table {
width: 100%;

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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')

View file

@ -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
};

View file

@ -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
@ -74,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
};

View file

@ -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));
}
);
}
});
}

View file

@ -0,0 +1,5 @@
import registerCount from './count/register_count';
export default function (server) {
registerCount(server);
}

View file

@ -1,4 +1,4 @@
import ngMock from 'ngMock';
import ngMock from 'ng_mock';
import expect from 'expect.js';
describe('markdown vis controller', function () {

View file

@ -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

View file

@ -1,4 +1,4 @@
import ngMock from 'ngMock';
import ngMock from 'ng_mock';
import expect from 'expect.js';
describe('metric vis', function () {

View file

@ -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

View file

@ -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'
]
}
});

View file

@ -1,4 +1,4 @@
{
"name": "spyModes",
"name": "spy_modes",
"version": "1.0.0"
}

View file

@ -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]');

View file

@ -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);

View file

@ -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'
}

View file

@ -1,4 +1,4 @@
{
"name": "statusPage",
"name": "status_page",
"version": "1.0.0"
}

View file

@ -1,5 +1,5 @@
import formatNumber from './formatNumber';
import formatNumber from './format_number';
module.exports = function makeChartOptions(type) {
return {

View file

@ -2,12 +2,12 @@ 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')
.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;

View file

@ -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) {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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

View file

@ -1,4 +0,0 @@
{
"name": "testsBundle",
"version": "0.0.0"
}

View file

@ -1,5 +1,5 @@
import fromRoot from '../../utils/fromRoot';
import fromRoot from '../../utils/from_root';
import { chain, memoize } from 'lodash';
import { resolve } from 'path';
import { map, fromNode } from 'bluebird';

View file

@ -1,6 +1,7 @@
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) => {
return new kibana.Plugin({
@ -18,7 +19,7 @@ export default (kibana) => {
let config = kibana.config;
const testGlobs = ['src/ui/public/**/*.js'];
const testingPluginId = config.get('testsBundle.pluginId');
const testingPluginId = config.get('tests_bundle.pluginId');
if (testingPluginId) {
const plugin = plugins.byId[testingPluginId];
@ -48,7 +49,7 @@ export default (kibana) => {
const testFiles = await findSourceFiles(testGlobs);
for (let f of testFiles) modules.push(f);
if (config.get('testsBundle.instrument')) {
if (config.get('tests_bundle.instrument')) {
env.addPostLoader({
test: /\.jsx?$/,
exclude: /[\/\\](__tests__|node_modules|bower_components|webpackShims)[\/\\]/,
@ -59,15 +60,15 @@ export default (kibana) => {
return new UiBundle({
id: 'tests',
modules: modules,
template: require('./testsEntryTemplate'),
template: require('./tests_entry_template'),
env: env
});
},
modules: {
ngMock$: fromRoot('src/plugins/devMode/public/ngMock'),
ng_mock$: fromRoot('src/plugins/dev_mode/public/ng_mock'),
fixtures: fromRoot('src/fixtures'),
testUtils: fromRoot('src/testUtils'),
test_utils: fromRoot('src/test_utils'),
'angular-mocks': {
path: require.resolve('angular-mocks'),
imports: 'angular'

View file

@ -0,0 +1,4 @@
{
"name": "tests_bundle",
"version": "0.0.0"
}

View file

@ -31,9 +31,9 @@ window.__KBN__ = {
}
};
require('ui/testHarness');
require('ui/test_harness');
${requires}
require('ui/testHarness').bootstrap(/* go! */);
require('ui/test_harness').bootstrap(/* go! */);
`;

View file

@ -1,4 +1,4 @@
import deepCloneWithBuffers from '../deepCloneWithBuffers';
import deepCloneWithBuffers from '../deep_clone_with_buffers';
import expect from 'expect.js';
describe('deepCloneWithBuffers()', function () {

View file

@ -1,4 +1,4 @@
import explodeBy from '../explodeBy';
import explodeBy from '../explode_by';
import expect from 'expect.js';
describe('explode_by(dot, flatObject)', function () {

View file

@ -1,4 +1,4 @@
import flattenWith from '../flattenWith';
import flattenWith from '../flatten_with';
import expect from 'expect.js';
describe('flatten_with(dot, nestedObj)', function () {

Some files were not shown because too many files have changed in this diff Show more