mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Merge pull request #132 from ccowan/master
Path changes and reconfiguration for build
This commit is contained in:
commit
d08a184d32
10 changed files with 37 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
define(function (require) {
|
||||
'use strict';
|
||||
var config = require('/kibana/config.js');
|
||||
var config = require('config');
|
||||
var loaded = false;
|
||||
|
||||
window.GoogleAnalyticsObject = 'ga';
|
||||
|
@ -16,7 +16,9 @@ define(function (require) {
|
|||
|
||||
// create the async tag and inject it into the page.
|
||||
function load () {
|
||||
if (loaded) return;
|
||||
if (loaded) {
|
||||
return void 0;
|
||||
}
|
||||
var asyncTag = document.createElement('script');
|
||||
var firstScript = document.getElementsByTagName('script')[0];
|
||||
asyncTag.async = 1;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* config.js is where you will find the core Kibana configuration. This file contains parameter that
|
||||
* must be set before kibana is run for the first time.
|
||||
*/
|
||||
define(['/kibana/app/components/settings.js'],
|
||||
define(['settings'],
|
||||
function (Settings) {
|
||||
"use strict";
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ define([
|
|||
'app',
|
||||
'kbn',
|
||||
'lodash',
|
||||
'/common/analytics.js',
|
||||
'../../../../../common/analytics',
|
||||
'factories/store'
|
||||
],
|
||||
function (angular, app, kbn, _, ga) {
|
||||
|
@ -138,7 +138,9 @@ function (angular, app, kbn, _, ga) {
|
|||
$scope.setOptIn = function(val) {
|
||||
marvelOpts.version = kbnVersion;
|
||||
marvelOpts.report = val;
|
||||
if (val) ga.pageview();
|
||||
if (val) {
|
||||
ga.pageview();
|
||||
}
|
||||
};
|
||||
|
||||
$scope.clearMarvelStorage = function() {
|
||||
|
|
|
@ -16,7 +16,7 @@ define([
|
|||
'app',
|
||||
'jquery',
|
||||
'lodash',
|
||||
'/common/analytics.js',
|
||||
'../../../../../common/analytics',
|
||||
'factories/store'
|
||||
],
|
||||
function (angular, app, $, _, ga) {
|
||||
|
|
|
@ -3,7 +3,7 @@ define([
|
|||
'sense_editor/editor',
|
||||
'jquery',
|
||||
'moment',
|
||||
'settings'
|
||||
'sense_settings'
|
||||
], function (_, SenseEditor, $, moment) {
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ define([
|
|||
'mappings',
|
||||
'output',
|
||||
'sense_editor/editor',
|
||||
'settings',
|
||||
'sense_settings',
|
||||
'require',
|
||||
'utils',
|
||||
'zeroclip',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define([
|
||||
'ace',
|
||||
'settings',
|
||||
'sense_settings',
|
||||
'jquery'
|
||||
], function (ace, settings, $) {
|
||||
'use strict';
|
||||
|
|
|
@ -17,8 +17,12 @@
|
|||
'ace_mode_json': '../vendor/ace/mode-json',
|
||||
'ace_ext_language_tools': '../vendor/ace/ext-language_tools',
|
||||
'ace_ext_searchbox': '../vendor/ace/ext-searchbox',
|
||||
'analytics': '/common/analytics',
|
||||
'lodash': '/kibana/vendor/lodash'
|
||||
// Adding config for the kibana dependencies
|
||||
'config': '../../kibana/config',
|
||||
'settings': '../../kibana/app/components/settings',
|
||||
'sense_settings': './settings',
|
||||
'analytics': '../../common/analytics',
|
||||
'lodash': '../../kibana/vendor/lodash'
|
||||
},
|
||||
map: {
|
||||
'*': {
|
||||
|
|
|
@ -42,6 +42,13 @@ module.exports = function (config) {
|
|||
cwd: 'kibana/panels',
|
||||
src: '**',
|
||||
dest: '<%= buildTempDir %>/src/app/panels/marvel'
|
||||
},
|
||||
// Copy the common/analyitcs.js in for the build
|
||||
{
|
||||
cwd: '.',
|
||||
expand: true,
|
||||
src: ['./common/**/*.js'],
|
||||
dest: '<%= buildTempDir %>'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -20,6 +20,17 @@ module.exports = function (grunt) {
|
|||
],
|
||||
|
||||
mainConfigFile: '<%= senseDir %>/app/require.config.js',
|
||||
/**
|
||||
Inject the Kibana config, settings and lodash so that the shared
|
||||
analytics.js file will function properly. Since the build enviroment
|
||||
doesn't match the runtime enviroment because of how everything is patched
|
||||
together we need to do this injection to get things to build properly.
|
||||
**/
|
||||
paths: {
|
||||
'config': __dirname+'/../../build/tmp/src/config',
|
||||
'settings': __dirname+'/../../build/tmp/src/app/components/settings',
|
||||
'lodash': __dirname+'/../../build/tmp/src/vendor/lodash'
|
||||
},
|
||||
optimize: 'uglify2',
|
||||
optimizeAllPluginResources: true,
|
||||
preserveLicenseComments: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue