mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
updated 'always included' list
This commit is contained in:
parent
8d2e8816dc
commit
40e2bd562f
158 changed files with 262 additions and 354 deletions
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"name": "kbn-vislib-vis-types",
|
||||
"version": "1.0.0"
|
||||
}
|
4
src/plugins/kbn_vislib_vis_types/package.json
Normal file
4
src/plugins/kbn_vislib_vis_types/package.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "kbn_vislib_vis_types",
|
||||
"version": "1.0.0"
|
||||
}
|
|
@ -2,7 +2,7 @@ define(function (require) {
|
|||
var _ = require('lodash');
|
||||
var $ = require('jquery');
|
||||
var module = require('modules').get('kibana');
|
||||
require('ui/directives/inequality');
|
||||
require('directives/inequality');
|
||||
|
||||
module.directive('pointSeriesOptions', function ($parse, $compile) {
|
||||
return {
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"extends": "../../.jshintrc.browser"
|
||||
"extends": "../../../../.jshintrc.browser"
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ define(function (require) {
|
|||
var angular = require('angular');
|
||||
var ConfigTemplate = require('utils/config_template');
|
||||
|
||||
require('ui/directives/config');
|
||||
require('directives/config');
|
||||
require('components/courier/courier');
|
||||
require('components/config/config');
|
||||
require('components/notify/notify');
|
||||
|
@ -49,7 +49,7 @@ define(function (require) {
|
|||
|
||||
app.directive('dashboardApp', function (Notifier, courier, AppState, timefilter, kbnUrl) {
|
||||
return {
|
||||
controller: function ($scope, $route, $routeParams, $location, configFile, Private, getAppState) {
|
||||
controller: function ($scope, $route, $routeParams, $location, Private, getAppState) {
|
||||
var queryFilter = Private(require('components/filter_bar/query_filter'));
|
||||
|
||||
var notify = new Notifier({
|
||||
|
|
|
@ -13,7 +13,7 @@ define(function (require) {
|
|||
});
|
||||
|
||||
// This is the only thing that gets injected into controllers
|
||||
module.service('savedDashboards', function (Promise, SavedDashboard, config, es, kbnUrl) {
|
||||
module.service('savedDashboards', function (Promise, SavedDashboard, kbnIndex, es, kbnUrl) {
|
||||
this.type = SavedDashboard.type;
|
||||
this.Class = SavedDashboard;
|
||||
|
||||
|
@ -54,7 +54,7 @@ define(function (require) {
|
|||
}
|
||||
|
||||
return es.search({
|
||||
index: config.file.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: 'dashboard',
|
||||
body: body,
|
||||
size: 100
|
||||
|
|
|
@ -4,8 +4,8 @@ define(function (require) {
|
|||
var html = require('text!plugins/discover/components/field_chooser/discover_field.html');
|
||||
var _ = require('lodash');
|
||||
|
||||
require('ui/directives/css_truncate');
|
||||
require('ui/directives/field_name');
|
||||
require('directives/css_truncate');
|
||||
require('directives/field_name');
|
||||
|
||||
|
||||
app.directive('discoverField', function ($compile) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(function (require) {
|
||||
var app = require('modules').get('apps/discover');
|
||||
|
||||
require('ui/directives/css_truncate');
|
||||
require('ui/directives/field_name');
|
||||
require('ui/filters/unique');
|
||||
require('directives/css_truncate');
|
||||
require('directives/field_name');
|
||||
require('filters/unique');
|
||||
require('plugins/discover/components/field_chooser/discover_field');
|
||||
|
||||
app.directive('discFieldChooser', function ($location, globalState, config, $route, Private) {
|
||||
|
|
|
@ -8,12 +8,14 @@ define(function (require) {
|
|||
|
||||
var datemath = require('utils/datemath');
|
||||
|
||||
require('components/doc_table/doc_table');
|
||||
require('components/visualize/visualize');
|
||||
require('components/notify/notify');
|
||||
require('components/timepicker/timepicker');
|
||||
require('components/fixedScroll');
|
||||
require('ui/directives/validate_json');
|
||||
require('directives/validate_json');
|
||||
require('components/validate_query/validate_query');
|
||||
require('ui/filters/moment');
|
||||
require('filters/moment');
|
||||
require('components/courier/courier');
|
||||
require('components/index_patterns/index_patterns');
|
||||
require('components/state_management/app_state');
|
||||
|
|
|
@ -15,7 +15,7 @@ define(function (require) {
|
|||
title: 'searches'
|
||||
});
|
||||
|
||||
module.service('savedSearches', function (Promise, config, configFile, es, createNotifier, SavedSearch, kbnUrl) {
|
||||
module.service('savedSearches', function (Promise, config, kbnIndex, es, createNotifier, SavedSearch, kbnUrl) {
|
||||
|
||||
|
||||
var notify = createNotifier({
|
||||
|
@ -58,7 +58,7 @@ define(function (require) {
|
|||
}
|
||||
|
||||
return es.search({
|
||||
index: configFile.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: 'search',
|
||||
body: body,
|
||||
size: 100
|
||||
|
|
|
@ -7,7 +7,7 @@ define(function (require) {
|
|||
.config(function ($tooltipProvider) {
|
||||
$tooltipProvider.setTriggers({ 'mouseenter': 'mouseleave click' });
|
||||
})
|
||||
.directive('kibana', function (Private, $rootScope, $injector, Promise, config, kbnSetup) {
|
||||
.directive('kibana', function (Private, $rootScope, $injector, Promise, config) {
|
||||
return {
|
||||
template: require('text!plugins/kibana/kibana.html'),
|
||||
controllerAs: 'kibana',
|
||||
|
@ -23,7 +23,7 @@ define(function (require) {
|
|||
|
||||
// run init functions before loading the mixins, so that we can ensure that
|
||||
// the environment is ready for them to get and use their dependencies
|
||||
self.ready = Promise.all([ kbnSetup(), config.init() ])
|
||||
self.ready = Promise.all([ config.init() ])
|
||||
.then(function () {
|
||||
// load some "mixins"
|
||||
var mixinLocals = { $scope: $scope, notify: notify };
|
||||
|
|
|
@ -2,7 +2,7 @@ define(function (require, module, exports) {
|
|||
var _ = require('lodash');
|
||||
|
||||
require('css!plugins/settings/styles/main.css');
|
||||
require('ui/filters/start_from');
|
||||
require('filters/start_from');
|
||||
|
||||
require('routes')
|
||||
.when('/settings', {
|
||||
|
|
|
@ -3,8 +3,8 @@ define(function (require) {
|
|||
var moment = require('moment');
|
||||
var errors = require('errors');
|
||||
|
||||
require('ui/directives/validate_index_name');
|
||||
require('ui/directives/auto_select_if_only_one');
|
||||
require('directives/validate_index_name');
|
||||
require('directives/auto_select_if_only_one');
|
||||
|
||||
require('routes')
|
||||
.when('/settings/indices/', {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
define(function (require) {
|
||||
return function RefreshKibanaIndexFn(es, configFile) {
|
||||
return function RefreshKibanaIndexFn(es, kbnIndex) {
|
||||
return function () {
|
||||
return es.indices.refresh({
|
||||
index: configFile.kibana_index
|
||||
index: kbnIndex
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@ define(function (require) {
|
|||
var registry = require('plugins/settings/saved_object_registry');
|
||||
var objectIndexHTML = require('text!plugins/settings/sections/objects/_objects.html');
|
||||
|
||||
require('ui/directives/file_upload');
|
||||
require('directives/file_upload');
|
||||
|
||||
require('routes')
|
||||
.when('/settings/objects', {
|
||||
|
@ -13,7 +13,7 @@ define(function (require) {
|
|||
});
|
||||
|
||||
require('modules').get('apps/settings')
|
||||
.directive('kbnSettingsObjects', function (config, Notifier, Private, kbnUrl) {
|
||||
.directive('kbnSettingsObjects', function (kbnIndex, Notifier, Private, kbnUrl) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
controller: function ($scope, $injector, $q, AppState, es) {
|
||||
|
@ -98,7 +98,7 @@ define(function (require) {
|
|||
|
||||
function retrieveAndExportDocs(objs) {
|
||||
es.mget({
|
||||
index: config.file.kibana_index,
|
||||
index: kbnIndex,
|
||||
body: {docs: objs.map(transformToMget)}
|
||||
})
|
||||
.then(function (response) {
|
||||
|
@ -125,7 +125,7 @@ define(function (require) {
|
|||
}
|
||||
|
||||
return es.mget({
|
||||
index: config.file.kibana_index,
|
||||
index: kbnIndex,
|
||||
body: {docs: docs.map(_.partialRight(_.pick, '_id', '_type'))}
|
||||
})
|
||||
.then(function (response) {
|
||||
|
@ -133,7 +133,7 @@ define(function (require) {
|
|||
var confirmMessage = 'The following objects will be overwritten:\n\n';
|
||||
if (existingDocs.length === 0 || window.confirm(confirmMessage + _.pluck(existingDocs, '_id').join('\n'))) {
|
||||
return es.bulk({
|
||||
index: config.file.kibana_index,
|
||||
index: kbnIndex,
|
||||
body: _.flattenDeep(docs.map(transformToBulk))
|
||||
})
|
||||
.then(refreshIndex)
|
||||
|
@ -152,7 +152,7 @@ define(function (require) {
|
|||
|
||||
function refreshIndex() {
|
||||
return es.indices.refresh({
|
||||
index: config.file.kibana_index
|
||||
index: kbnIndex
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ define(function (require) {
|
|||
});
|
||||
|
||||
require('modules').get('apps/settings')
|
||||
.directive('kbnSettingsObjectsView', function (config, Notifier) {
|
||||
.directive('kbnSettingsObjectsView', function (kbnIndex, Notifier) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
controller: function ($scope, $injector, $routeParams, $location, $window, $rootScope, es, Private) {
|
||||
|
@ -103,7 +103,7 @@ define(function (require) {
|
|||
$scope.title = service.type;
|
||||
|
||||
es.get({
|
||||
index: config.file.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: service.type,
|
||||
id: $routeParams.id
|
||||
})
|
||||
|
@ -159,7 +159,7 @@ define(function (require) {
|
|||
*/
|
||||
$scope.delete = function () {
|
||||
es.delete({
|
||||
index: config.file.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: service.type,
|
||||
id: $routeParams.id
|
||||
})
|
||||
|
@ -187,7 +187,7 @@ define(function (require) {
|
|||
});
|
||||
|
||||
es.index({
|
||||
index: config.file.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: service.type,
|
||||
id: $routeParams.id,
|
||||
body: source
|
||||
|
@ -200,7 +200,7 @@ define(function (require) {
|
|||
|
||||
function redirectHandler(action) {
|
||||
return es.indices.refresh({
|
||||
index: config.file.kibana_index
|
||||
index: kbnIndex
|
||||
})
|
||||
.then(function (resp) {
|
||||
var msg = 'You successfully ' + action + ' the "' + $scope.obj._source.title + '" ' + $scope.title.toLowerCase() + ' object';
|
||||
|
|
|
@ -4,7 +4,7 @@ define(function (require) {
|
|||
|
||||
require('angular-ui-ace');
|
||||
require('angular-elastic');
|
||||
require('ui/directives/confirm_click');
|
||||
require('directives/confirm_click');
|
||||
|
||||
// add the module deps to this module
|
||||
require('modules').get('apps/settings', ['ui.ace', 'monospaced.elastic']);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define(function (require) {
|
||||
var _ = require('lodash');
|
||||
var propFilter = require('ui/filters/_prop_filter');
|
||||
var propFilter = require('filters/_prop_filter');
|
||||
|
||||
require('modules')
|
||||
.get('kibana')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
var IndexedArray = require('utils/indexed_array/index');
|
||||
var IndexedArray = require('components/indexed_array/index');
|
||||
|
||||
require('modules')
|
||||
.get('app/visualize')
|
||||
|
@ -9,7 +9,7 @@ define(function (require) {
|
|||
var aggTypes = Private(require('components/agg_types/index'));
|
||||
var aggSelectHtml = require('text!plugins/visualize/editor/agg_select.html');
|
||||
var advancedToggleHtml = require('text!plugins/visualize/editor/advanced_toggle.html');
|
||||
require('ui/filters/match_any');
|
||||
require('filters/match_any');
|
||||
require('plugins/visualize/editor/agg_param');
|
||||
|
||||
var notify = new Notifier({
|
||||
|
|
|
@ -5,12 +5,12 @@ define(function (require) {
|
|||
require('plugins/visualize/editor/agg_filter');
|
||||
|
||||
|
||||
require('ui/directives/saved_object_finder');
|
||||
require('directives/saved_object_finder');
|
||||
require('components/visualize/visualize');
|
||||
require('components/clipboard/clipboard');
|
||||
require('components/comma_list_filter');
|
||||
|
||||
require('ui/filters/uriescape');
|
||||
require('filters/uriescape');
|
||||
|
||||
require('routes')
|
||||
.when('/visualize/create', {
|
||||
|
|
|
@ -11,7 +11,7 @@ define(function (require) {
|
|||
title: 'visualizations'
|
||||
});
|
||||
|
||||
app.service('savedVisualizations', function (Promise, es, config, SavedVis, Private, Notifier, kbnUrl) {
|
||||
app.service('savedVisualizations', function (Promise, es, kbnIndex, SavedVis, Private, Notifier, kbnUrl) {
|
||||
var visTypes = Private(require('registry/vis_types'));
|
||||
var notify = new Notifier({
|
||||
location: 'Saved Visualization Service'
|
||||
|
@ -53,7 +53,7 @@ define(function (require) {
|
|||
}
|
||||
|
||||
return es.search({
|
||||
index: config.file.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: 'visualization',
|
||||
body: body,
|
||||
size: 100,
|
||||
|
|
|
@ -2,7 +2,7 @@ define(function (require) {
|
|||
var _ = require('lodash');
|
||||
|
||||
require('plugins/visualize/saved_visualizations/saved_visualizations');
|
||||
require('ui/directives/saved_object_finder');
|
||||
require('directives/saved_object_finder');
|
||||
require('plugins/discover/saved_searches/saved_searches');
|
||||
|
||||
var templateStep = function (num, txt) {
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"name": "markdown-vis",
|
||||
"version": "1.0.0"
|
||||
}
|
4
src/plugins/markdown_vis/package.json
Normal file
4
src/plugins/markdown_vis/package.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "markdown_vis",
|
||||
"version": "1.0.0"
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "metric-vis",
|
||||
"name": "metric_vis",
|
||||
"version": "1.0.0"
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "table-vis",
|
||||
"name": "table_vis",
|
||||
"version": "1.0.0"
|
||||
}
|
|
@ -45,10 +45,8 @@ module.exports = function (kibana) {
|
|||
version: kibana.package.version,
|
||||
buildSha: _.get(kibana, 'package.build.sha', '@@buildSha'),
|
||||
buildNumber: _.get(kibana, 'package.build.number', '@@buildNum'),
|
||||
config: {
|
||||
kibana_index: config.get('kibana.index'),
|
||||
shard_timeout: config.get('elasticsearch.shardTimeout')
|
||||
},
|
||||
kbnIndex: config.get('kibana.index'),
|
||||
esShardTimeout: config.get('elasticsearch.shardTimeout')
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
3
src/plugins/ui/public/.jshintrc
Normal file
3
src/plugins/ui/public/.jshintrc
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "../../../../.jshintrc.browser"
|
||||
}
|
115
src/plugins/ui/public/bootstrap.js
vendored
115
src/plugins/ui/public/bootstrap.js
vendored
|
@ -8,70 +8,87 @@ define(function (require) {
|
|||
var modules = require('modules');
|
||||
var routes = require('routes');
|
||||
|
||||
require('elasticsearch');
|
||||
require('angular-route');
|
||||
require('angular-bindonce');
|
||||
require('angular-bootstrap');
|
||||
require('elasticsearch');
|
||||
|
||||
var configFile = JSON.parse(require('text!config'));
|
||||
require('components/bind');
|
||||
require('components/bound_to_config_obj');
|
||||
require('components/chrome');
|
||||
require('components/config/config');
|
||||
require('components/courier/courier');
|
||||
require('components/debounce');
|
||||
require('components/doc_title/doc_title');
|
||||
require('components/elastic_textarea');
|
||||
require('components/errors');
|
||||
require('components/es');
|
||||
require('components/events');
|
||||
require('components/fancy_forms/fancy_forms');
|
||||
require('components/filter_bar/filter_bar');
|
||||
require('components/filter_manager/filter_manager');
|
||||
require('components/index_patterns/index_patterns');
|
||||
require('components/listen');
|
||||
require('components/modules');
|
||||
require('components/notify/notify');
|
||||
require('components/persisted_log/persisted_log');
|
||||
require('components/private');
|
||||
require('components/promises');
|
||||
require('components/state_management/app_state');
|
||||
require('components/state_management/global_state');
|
||||
require('components/storage/storage');
|
||||
require('components/stringify/register');
|
||||
require('components/style_compile/style_compile');
|
||||
require('components/timefilter/timefilter');
|
||||
require('components/timepicker/timepicker');
|
||||
require('components/tooltip/tooltip');
|
||||
require('components/typeahead/typeahead');
|
||||
require('components/url/url');
|
||||
require('components/validateDateInterval');
|
||||
require('components/validate_query/validate_query');
|
||||
require('components/watch_multi');
|
||||
|
||||
var kibana = modules.get('kibana', [
|
||||
// list external requirements here
|
||||
'elasticsearch',
|
||||
'pasvaz.bindonce',
|
||||
'ngRoute',
|
||||
'ngClipboard'
|
||||
'ngClipboard',
|
||||
'ui.bootstrap'
|
||||
]);
|
||||
|
||||
|
||||
kibana
|
||||
// This stores the Kibana revision number, @REV@ is replaced by grunt.
|
||||
.constant('kbnVersion', window.KIBANA_VERSION)
|
||||
// The build number is placed by grunt, represents a sequence to provide nothing really but order.
|
||||
// If NaN, use the max value of a JS number, that way we always have a number here, even in dev
|
||||
.constant('buildNum', _.parseInt(window.KIBANA_BUILD_NUM) || Number.MAX_SAFE_INTEGER)
|
||||
// This stores the build number, @REV@ is replaced by grunt.
|
||||
.constant('commitSha', window.KIBANA_COMMIT_SHA)
|
||||
// Use this for cache busting partials
|
||||
.constant('cacheBust', window.KIBANA_COMMIT_SHA)
|
||||
// The minimum Elasticsearch version required to run Kibana
|
||||
.constant('minimumElasticsearchVersion', '2.0.0')
|
||||
// When we need to identify the current session of the app, ef shard preference
|
||||
.constant('sessionId', Date.now())
|
||||
// attach the route manager's known routes
|
||||
.config(routes.config)
|
||||
.config(['ngClipProvider', function (ngClipProvider) {
|
||||
ngClipProvider.setPath('bower_components/zeroclipboard/dist/ZeroClipboard.swf');
|
||||
}]);
|
||||
|
||||
// setup routes
|
||||
routes
|
||||
.otherwise({
|
||||
redirectTo: '/' + configFile.default_app_id
|
||||
});
|
||||
// This stores the Kibana revision number, @REV@ is replaced by grunt.
|
||||
.constant('kbnVersion', window.KIBANA_VERSION)
|
||||
// The build number is placed by grunt, represents a sequence to provide nothing really but order.
|
||||
// If NaN, use the max value of a JS number, that way we always have a number here, even in dev
|
||||
.constant('buildNum', window.KIBANA_BUILD_NUM)
|
||||
// the elasticserarch index where we will store saved objects and config
|
||||
.constant('kbnIndex', window.KIBANA_INDEX)
|
||||
// timeout config val specified in kibana.yml, passed from server
|
||||
.constant('esShardTimeout', window.ES_SHARD_TIMEOUT)
|
||||
// url we should use to talk to es
|
||||
.constant('esUrl', (function () {
|
||||
var a = document.createElement('a');
|
||||
a.href = 'elasticsearch';
|
||||
return a.href;
|
||||
}()))
|
||||
// This stores the build number, @REV@ is replaced by grunt.
|
||||
.constant('commitSha', window.KIBANA_COMMIT_SHA)
|
||||
// Use this for cache busting partials
|
||||
.constant('cacheBust', window.KIBANA_COMMIT_SHA)
|
||||
// The minimum Elasticsearch version required to run Kibana
|
||||
.constant('minimumElasticsearchVersion', '2.0.0')
|
||||
// When we need to identify the current session of the app, ef shard preference
|
||||
.constant('sessionId', Date.now())
|
||||
// attach the route manager's known routes
|
||||
.config(routes.config)
|
||||
.config(['ngClipProvider', function (ngClipProvider) {
|
||||
ngClipProvider.setPath('bower_components/zeroclipboard/dist/ZeroClipboard.swf');
|
||||
}]);
|
||||
|
||||
// tell the modules util to add it's modules as requirements for kibana
|
||||
modules.link(kibana);
|
||||
|
||||
kibana.load = _.onceWithCb(function (cb) {
|
||||
var firstLoad = [ 'plugins/kibana/index' ];
|
||||
var thenLoad = _.difference(configFile.plugins, firstLoad);
|
||||
require(firstLoad, function loadApps() {
|
||||
require(thenLoad, cb);
|
||||
});
|
||||
});
|
||||
|
||||
kibana.init = _.onceWithCb(function (cb) {
|
||||
kibana.load(function () {
|
||||
$(function () {
|
||||
angular
|
||||
.bootstrap(document, ['kibana'])
|
||||
.invoke(function () {
|
||||
$(document.body).children(':not(style-compile)').show();
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
return kibana;
|
||||
});
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
define(function (require) {
|
||||
return function AggParamsFactory(Private) {
|
||||
require('ui/filters/label');
|
||||
require('filters/label');
|
||||
var _ = require('lodash');
|
||||
var IndexedArray = require('utils/indexed_array/index');
|
||||
var IndexedArray = require('components/indexed_array/index');
|
||||
|
||||
var paramTypeMap = {
|
||||
field: Private(require('components/agg_types/param_types/field')),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
define(function (require) {
|
||||
return function IntervalOptionsService(Private) {
|
||||
var moment = require('moment');
|
||||
require('ui/directives/input_whole_number');
|
||||
require('directives/input_whole_number');
|
||||
|
||||
// shorthand
|
||||
var ms = function (type) { return moment.duration(1, type).asMilliseconds(); };
|
||||
|
|
|
@ -21,7 +21,7 @@ define(function (require) {
|
|||
agg.buckets.setBounds(agg.fieldIsTimeField() && timefilter.getActiveBounds());
|
||||
}
|
||||
|
||||
require('ui/filters/field_type');
|
||||
require('filters/field_type');
|
||||
require('components/validateDateInterval');
|
||||
|
||||
return new BucketAggType({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
define(function (require) {
|
||||
var moment = require('moment');
|
||||
var dateRange = require('utils/date_range');
|
||||
require('ui/directives/validate_date_math');
|
||||
require('directives/validate_date_math');
|
||||
|
||||
return function DateRangeAggDefinition(Private, config) {
|
||||
var BucketAggType = Private(require('components/agg_types/buckets/_bucket_agg_type'));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
define(function (require) {
|
||||
var _ = require('lodash');
|
||||
require('ui/directives/validate_ip');
|
||||
require('ui/directives/validate_cidr_mask');
|
||||
require('directives/validate_ip');
|
||||
require('directives/validate_cidr_mask');
|
||||
|
||||
return function RangeAggDefinition(Private) {
|
||||
var BucketAggType = Private(require('components/agg_types/buckets/_bucket_agg_type'));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define(function (require) {
|
||||
return function AggTypeService(Private) {
|
||||
var IndexedArray = require('utils/indexed_array/index');
|
||||
var IndexedArray = require('components/indexed_array/index');
|
||||
|
||||
var aggs = {
|
||||
metrics: [
|
||||
|
|
|
@ -2,7 +2,7 @@ define(function (require) {
|
|||
return function OptionedAggParamFactory(Private) {
|
||||
var _ = require('lodash');
|
||||
|
||||
var IndexedArray = require('utils/indexed_array/index');
|
||||
var IndexedArray = require('components/indexed_array/index');
|
||||
var BaseAggParam = Private(require('components/agg_types/param_types/base'));
|
||||
|
||||
_.class(OptionedAggParam).inherits(BaseAggParam);
|
||||
|
|
|
@ -1,45 +1,21 @@
|
|||
define(function (require) {
|
||||
require('angular-bootstrap');
|
||||
require('components/private');
|
||||
require('components/config/config');
|
||||
require('components/courier/courier');
|
||||
require('components/filter_bar/filter_bar');
|
||||
require('components/notify/notify');
|
||||
require('components/persisted_log/persisted_log');
|
||||
require('components/state_management/app_state');
|
||||
require('components/storage/storage');
|
||||
require('components/url/url');
|
||||
require('components/doc_title/doc_title');
|
||||
require('components/tooltip/tooltip');
|
||||
require('components/style_compile/style_compile');
|
||||
require('components/watch_multi');
|
||||
require('components/bind');
|
||||
require('components/listen');
|
||||
require('components/fancy_forms/fancy_forms');
|
||||
require('components/stringify/register');
|
||||
|
||||
require('modules')
|
||||
.get('kibana', ['ui.bootstrap'])
|
||||
.config(function ($tooltipProvider, kbnChromeProvider) {
|
||||
.get('kibana')
|
||||
.config(function ($tooltipProvider) {
|
||||
$tooltipProvider.setTriggers({ 'mouseenter': 'mouseleave click' });
|
||||
});
|
||||
|
||||
function Chrome() {
|
||||
var showCacheMessage = location.href.indexOf('?embed') < 0 && location.href.indexOf('&embed') < 0;
|
||||
if (!showCacheMessage) document.getElementById('cache-message').style.display = 'none';
|
||||
}
|
||||
|
||||
.controller('KibanaChromeController', function (Private, $rootScope, $injector, Promise, config, kbnSetup) {
|
||||
})
|
||||
.directive('kbnChrome', function () {
|
||||
return {
|
||||
template: require('text!plugins/kibana/kibana.html'),
|
||||
controllerAs: 'kibana',
|
||||
controller: function ($scope) {
|
||||
var _ = require('lodash');
|
||||
var self = this;
|
||||
var notify = new Notifier({ location: 'Kibana' });
|
||||
|
||||
// run init functions before loading the mixins, so that we can ensure that
|
||||
// the environment is ready for them to get and use their dependencies
|
||||
self.ready = Promise.all([ kbnSetup(), config.init() ])
|
||||
self.ready = Promise.all([ config.init() ])
|
||||
.then(function () {
|
||||
// load some "mixins"
|
||||
var mixinLocals = { $scope: $scope, notify: notify };
|
|
@ -3,18 +3,8 @@ define(function (require) {
|
|||
'kibana/notify'
|
||||
]);
|
||||
|
||||
var configFile = JSON.parse(require('text!config'));
|
||||
configFile.elasticsearch = (function () {
|
||||
var a = document.createElement('a');
|
||||
a.href = 'elasticsearch';
|
||||
return a.href;
|
||||
}());
|
||||
|
||||
// allow the rest of the app to get the configFile easily
|
||||
module.constant('configFile', configFile);
|
||||
|
||||
// service for delivering config variables to everywhere else
|
||||
module.service('config', function (Private, Notifier, kbnVersion, kbnSetup, $rootScope, buildNum) {
|
||||
module.service('config', function (Private, Notifier, kbnVersion, kbnIndex, $rootScope, buildNum) {
|
||||
var config = this;
|
||||
|
||||
var angular = require('angular');
|
||||
|
@ -33,7 +23,7 @@ define(function (require) {
|
|||
|
||||
var DocSource = Private(require('components/courier/data_source/doc_source'));
|
||||
var doc = (new DocSource())
|
||||
.index(configFile.kibana_index)
|
||||
.index(kbnIndex)
|
||||
.type('config')
|
||||
.id(kbnVersion);
|
||||
|
||||
|
@ -41,8 +31,6 @@ define(function (require) {
|
|||
* PUBLIC API
|
||||
******/
|
||||
|
||||
config.file = configFile;
|
||||
|
||||
/**
|
||||
* Executes once and returns a promise that is resolved once the
|
||||
* config has loaded for the first time.
|
||||
|
@ -51,8 +39,8 @@ define(function (require) {
|
|||
*/
|
||||
config.init = _.once(function () {
|
||||
var complete = notify.lifecycle('config init');
|
||||
return kbnSetup()
|
||||
.then(function getDoc() {
|
||||
|
||||
return (function getDoc() {
|
||||
|
||||
// used to apply an entire es response to the vals, silentAndLocal will prevent
|
||||
// event/notifications/writes from occuring.
|
||||
|
@ -77,7 +65,7 @@ define(function (require) {
|
|||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
}())
|
||||
.then(function () {
|
||||
$rootScope.$broadcast('init:config');
|
||||
})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
return function CourierFetchCallClient(Private, Promise, es, configFile, sessionId) {
|
||||
return function CourierFetchCallClient(Private, Promise, es, esShardTimeout, sessionId) {
|
||||
var _ = require('lodash');
|
||||
|
||||
var isRequest = Private(require('components/courier/fetch/_is_request'));
|
||||
|
@ -83,7 +83,7 @@ define(function (require) {
|
|||
}
|
||||
|
||||
return (esPromise = es[strategy.clientMethod]({
|
||||
timeout: configFile.shard_timeout,
|
||||
timeout: shardTimeout,
|
||||
ignore_unavailable: true,
|
||||
preference: sessionId,
|
||||
body: body
|
||||
|
@ -112,4 +112,4 @@ define(function (require) {
|
|||
|
||||
return callClient;
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
return function FetchStrategyForSearch(Private, Promise, timefilter, configFile) {
|
||||
return function FetchStrategyForSearch(Private, Promise, timefilter) {
|
||||
var _ = require('lodash');
|
||||
var angular = require('angular');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
return function SavedObjectFactory(es, configFile, Promise, Private, Notifier, indexPatterns) {
|
||||
return function SavedObjectFactory(es, kbnIndex, Promise, Private, Notifier, indexPatterns) {
|
||||
var angular = require('angular');
|
||||
var errors = require('errors');
|
||||
var _ = require('lodash');
|
||||
|
@ -58,7 +58,7 @@ define(function (require) {
|
|||
|
||||
// tell the docSource where to find the doc
|
||||
docSource
|
||||
.index(configFile.kibana_index)
|
||||
.index(kbnIndex)
|
||||
.type(type)
|
||||
.id(self.id);
|
||||
|
||||
|
@ -235,7 +235,7 @@ define(function (require) {
|
|||
var finish = function (id) {
|
||||
self.id = id;
|
||||
return es.indices.refresh({
|
||||
index: configFile.kibana_index
|
||||
index: kbnIndex
|
||||
})
|
||||
.then(function () {
|
||||
return self.id;
|
||||
|
@ -278,12 +278,12 @@ define(function (require) {
|
|||
*/
|
||||
self.delete = function () {
|
||||
return es.delete({
|
||||
index: configFile.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: type,
|
||||
id: this.id
|
||||
}).then(function () {
|
||||
return es.indices.refresh({
|
||||
index: configFile.kibana_index
|
||||
index: kbnIndex
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@ define(function (require) {
|
|||
var _ = require('lodash');
|
||||
var module = require('modules').get('app/discover');
|
||||
|
||||
require('ui/filters/short_dots');
|
||||
require('filters/short_dots');
|
||||
|
||||
module.directive('kbnTableHeader', function (shortDotsFilter) {
|
||||
var headerHtml = require('text!components/doc_table/components/table_header.html');
|
||||
|
|
|
@ -7,8 +7,8 @@ define(function (require) {
|
|||
require('components/highlight/highlight');
|
||||
require('components/highlight/highlight_tags');
|
||||
require('components/doc_viewer/doc_viewer');
|
||||
require('ui/filters/trust_as_html');
|
||||
require('ui/filters/short_dots');
|
||||
require('filters/trust_as_html');
|
||||
require('filters/short_dots');
|
||||
|
||||
|
||||
// guesstimate at the minimum number of chars wide cells in the table should be
|
||||
|
@ -27,7 +27,7 @@ define(function (require) {
|
|||
var openRowHtml = require('text!components/doc_table/components/table_row/open.html');
|
||||
var detailsHtml = require('text!components/doc_table/components/table_row/details.html');
|
||||
var cellTemplate = _.template(noWhiteSpace(require('text!components/doc_table/components/table_row/cell.html')));
|
||||
var truncateByHeightTemplate = _.template(noWhiteSpace(require('text!ui/partials/truncate_by_height.html')));
|
||||
var truncateByHeightTemplate = _.template(noWhiteSpace(require('text!partials/truncate_by_height.html')));
|
||||
|
||||
return {
|
||||
restrict: 'A',
|
||||
|
|
|
@ -5,8 +5,8 @@ define(function (require) {
|
|||
var getSort = require('components/doc_table/lib/get_sort');
|
||||
|
||||
require('css!components/doc_table/doc_table.css');
|
||||
require('ui/directives/truncated');
|
||||
require('ui/directives/infinite_scroll');
|
||||
require('directives/truncated');
|
||||
require('directives/infinite_scroll');
|
||||
require('components/doc_table/components/table_header');
|
||||
require('components/doc_table/components/table_row');
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ define(function (require) {
|
|||
var es; // share the client amoungst all apps
|
||||
require('modules')
|
||||
.get('kibana', ['elasticsearch', 'kibana/config'])
|
||||
.service('es', function (esFactory, configFile, $q) {
|
||||
.service('es', function (esFactory, esUrl, $q) {
|
||||
if (es) return es;
|
||||
|
||||
es = esFactory({
|
||||
host: configFile.elasticsearch,
|
||||
host: esUrl,
|
||||
log: 'info',
|
||||
requestTimeout: 0,
|
||||
apiVersion: '1.4',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define(function (require) {
|
||||
return function CastMappingTypeFn() {
|
||||
var IndexedArray = require('utils/indexed_array/index');
|
||||
var IndexedArray = require('components/indexed_array/index');
|
||||
|
||||
castMappingType.types = new IndexedArray({
|
||||
index: ['name'],
|
||||
|
|
|
@ -2,6 +2,7 @@ define(function (require) {
|
|||
return function contentTypesProvider(highlightFilter) {
|
||||
var _ = require('lodash');
|
||||
var angular = require('angular');
|
||||
require('components/highlight/highlight');
|
||||
|
||||
var types = {
|
||||
html: function (format, convert) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
define(function (require) {
|
||||
return function FieldListProvider(Private) {
|
||||
var Field = Private(require('components/index_patterns/_field'));
|
||||
var IndexedArray = require('utils/indexed_array/index');
|
||||
var IndexedArray = require('components/indexed_array/index');
|
||||
var _ = require('lodash');
|
||||
|
||||
_.class(FieldList).inherits(IndexedArray);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define(function (require) {
|
||||
return function IndexPatternFieldTypes() {
|
||||
var IndexedArray = require('utils/indexed_array/index');
|
||||
var IndexedArray = require('components/indexed_array/index');
|
||||
|
||||
return new IndexedArray({
|
||||
index: ['name'],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
return function GetIndexPatternIdsFn(es, configFile) {
|
||||
return function GetIndexPatternIdsFn(es, kbnIndex) {
|
||||
var _ = require('lodash');
|
||||
|
||||
// many places may require the id list, so we will cache it seperately
|
||||
|
@ -15,7 +15,7 @@ define(function (require) {
|
|||
}
|
||||
|
||||
cachedPromise = es.search({
|
||||
index: configFile.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: 'index-pattern',
|
||||
fields: [],
|
||||
body: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
return function IndexPatternFactory(Private, timefilter, Notifier, config, Promise, $rootScope) {
|
||||
return function IndexPatternFactory(Private, timefilter, Notifier, config, kbnIndex, Promise, $rootScope) {
|
||||
var _ = require('lodash');
|
||||
var errors = require('errors');
|
||||
var angular = require('angular');
|
||||
|
@ -59,7 +59,7 @@ define(function (require) {
|
|||
self.init = function () {
|
||||
// tell the docSource where to find the doc
|
||||
docSource
|
||||
.index(config.file.kibana_index)
|
||||
.index(kbnIndex)
|
||||
.type(type)
|
||||
.id(self.id);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ define(function (require) {
|
|||
return function IndexNameIntervalsService(timefilter) {
|
||||
var _ = require('lodash');
|
||||
var moment = require('moment');
|
||||
var IndexedArray = require('utils/indexed_array/index');
|
||||
var IndexedArray = require('components/indexed_array/index');
|
||||
|
||||
var intervals = new IndexedArray({
|
||||
index: ['name'],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
return function MapperService(Private, Promise, es, config) {
|
||||
return function MapperService(Private, Promise, es, config, kbnIndex) {
|
||||
var _ = require('lodash');
|
||||
var moment = require('moment');
|
||||
|
||||
|
@ -33,7 +33,7 @@ define(function (require) {
|
|||
|
||||
if (!skipIndexPatternCache) {
|
||||
return es.get({
|
||||
index: config.file.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: 'index-pattern',
|
||||
id: id,
|
||||
_sourceInclude: ['fields']
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
return function transformMappingIntoFields(Private, configFile, config) {
|
||||
return function transformMappingIntoFields(Private, kbnIndex, config) {
|
||||
var _ = require('lodash');
|
||||
var mapField = Private(require('components/index_patterns/_map_field'));
|
||||
|
||||
|
@ -16,7 +16,7 @@ define(function (require) {
|
|||
return function (response) {
|
||||
var fields = {};
|
||||
_.each(response, function (index, indexName) {
|
||||
if (indexName === configFile.kibana_index) return;
|
||||
if (indexName === kbnIndex) return;
|
||||
_.each(index.mappings, function (mappings) {
|
||||
_.each(mappings, function (field, name) {
|
||||
var keys = Object.keys(field.mapping);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
define(function (require) {
|
||||
var module = require('modules').get('kibana/index_patterns');
|
||||
require('ui/filters/short_dots');
|
||||
require('filters/short_dots');
|
||||
|
||||
module.service('indexPatterns', function (configFile, es, Notifier, Private, Promise) {
|
||||
module.service('indexPatterns', function (es, Notifier, Private, Promise) {
|
||||
var self = this;
|
||||
var _ = require('lodash');
|
||||
var errors = require('errors');
|
||||
|
@ -27,7 +27,7 @@ define(function (require) {
|
|||
self.getIds.clearCache();
|
||||
patternCache.delete(pattern.id);
|
||||
return es.delete({
|
||||
index: configFile.kibana_index,
|
||||
index: kbnIndex,
|
||||
type: 'index-pattern',
|
||||
id: pattern.id
|
||||
});
|
||||
|
|
|
@ -2,8 +2,8 @@ define(function (require) {
|
|||
|
||||
var _ = require('lodash');
|
||||
|
||||
var pathGetter = require('utils/indexed_array/_path_getter');
|
||||
var inflector = require('utils/indexed_array/_inflector');
|
||||
var pathGetter = require('components/indexed_array/_path_getter');
|
||||
var inflector = require('components/indexed_array/_inflector');
|
||||
|
||||
var inflectIndex = inflector('by');
|
||||
var inflectOrder = inflector('in', 'Order');
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
require.config({
|
||||
baseUrl: './',
|
||||
paths: {
|
||||
kibana: 'index',
|
||||
// special utils
|
||||
routes: 'utils/routes/index',
|
||||
errors: 'components/errors',
|
||||
modules: 'utils/modules',
|
||||
lodash: 'utils/lodash-mixins/index',
|
||||
registry: 'components/registry',
|
||||
|
||||
// bower_components
|
||||
'angular-bindonce': 'bower_components/angular-bindonce/bindonce',
|
||||
'angular-bootstrap': 'bower_components/angular-bootstrap/ui-bootstrap-tpls',
|
||||
'angular-elastic': 'bower_components/angular-elastic/elastic',
|
||||
'angular-route': 'bower_components/angular-route/angular-route',
|
||||
'angular-ui-ace': 'bower_components/angular-ui-ace/ui-ace',
|
||||
ace: 'bower_components/ace-builds/src-noconflict/ace',
|
||||
'ace-json': 'bower_components/ace-builds/src-noconflict/mode-json',
|
||||
angular: 'bower_components/angular/angular',
|
||||
async: 'bower_components/async/lib/async',
|
||||
bower_components: 'bower_components',
|
||||
css: 'bower_components/require-css/css',
|
||||
d3: 'bower_components/d3/d3',
|
||||
elasticsearch: 'bower_components/elasticsearch/elasticsearch.angular',
|
||||
faker: 'bower_components/Faker/faker',
|
||||
file_saver: 'bower_components/FileSaver/FileSaver',
|
||||
gridster: 'bower_components/gridster/dist/jquery.gridster',
|
||||
'leaflet-heat': 'bower_components/Leaflet.heat/dist/leaflet-heat',
|
||||
jquery: 'bower_components/jquery/dist/jquery',
|
||||
leaflet: 'bower_components/leaflet/dist/leaflet',
|
||||
'leaflet-draw': 'bower_components/leaflet-draw/dist/leaflet.draw',
|
||||
lodash_src: 'bower_components/lodash/lodash',
|
||||
moment: 'bower_components/moment/moment',
|
||||
'ng-clip': 'bower_components/ng-clip/src/ngClip',
|
||||
text: 'bower_components/requirejs-text/text',
|
||||
zeroclipboard: 'bower_components/zeroclipboard/dist/ZeroClipboard',
|
||||
marked: 'bower_components/marked/lib/marked',
|
||||
numeral: 'bower_components/numeral/numeral'
|
||||
},
|
||||
shim: {
|
||||
angular: {
|
||||
deps: ['jquery'],
|
||||
exports: 'angular'
|
||||
},
|
||||
gridster: ['jquery', 'css!bower_components/gridster/dist/jquery.gridster.css'],
|
||||
'angular-route': ['angular'],
|
||||
'elasticsearch': ['angular'],
|
||||
'angular-bootstrap': ['angular'],
|
||||
'angular-bindonce': ['angular'],
|
||||
'ace-json': ['ace'],
|
||||
'angular-ui-ace': ['angular', 'ace', 'ace-json'],
|
||||
'ng-clip': ['angular', 'zeroclipboard'],
|
||||
'leaflet-heat': {
|
||||
deps: ['leaflet']
|
||||
},
|
||||
file_saver: {
|
||||
exports: 'saveAs'
|
||||
},
|
||||
'leaflet-draw': {
|
||||
deps: ['leaflet', 'css!bower_components/leaflet-draw/dist/leaflet.draw.css']
|
||||
},
|
||||
leaflet: {
|
||||
deps: ['css!bower_components/leaflet/dist/leaflet.css']
|
||||
},
|
||||
marked: {
|
||||
exports: 'marked'
|
||||
}
|
||||
},
|
||||
waitSeconds: 60
|
||||
});
|
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