Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into azure
Browse files Browse the repository at this point in the history
We store our bes timestamps in UTC [1], because that doesn't depend on
the timezone of the log-generating host.  However, most folks don't
prefer to see their local time [2].  Upstream learned support for this
in 6696e13 (option to adjust table time field to browser's local
timezone, 2013-12-04 [3]), which landed a month and a half after
v3.0.0milestone4 (the last time we synced with upstream).  Sync again
to pull in this change.  By merging the current master, we pull in an
additional 104 non-merge commits:

  $ git log --oneline --no-merges 6696e13..origin/master | wc -l
  104

but there's no sense in stopping halfway.  That would just delay any
integration issues (of which I am aware of none) until later.

[1]: https://github.com/wking/bes/blob/v0.3/bes/__init__.py#L76
[2]: elastic#95
[3]: elastic#95 (comment)

* origin/master: (184 commits)
  Use -moz-box-sizing for firefox kibana-container
  Improve annotation tooltip on light theme
  Get rid of the reverse
  Re-fix overly broad cluster, events need to be sorted correctly
  Fixed overly broad event clustering. Re: elastic#854
  Resolve ids from list at initialization
  Added license information for vendor packages
  make panels 100% width on mobile
  Improve button positioning
  Improve droppable spaces when dragging
  Revert max span to 12
  Align row buttons with panels
  Improve visibility of available drag spaces
  Add subtle border to panels, improve dragging representation
  Fix column panel, closes elastic#832
  Fixed resize events
  Extended save/cancel to row and dashboard editors. Allow rows to overflow gracefully. Normalized spacing between panels
  Add the content of the panel to a panel-content container
  Add git commit to built versions
  cleanup comment
  ...
  • Loading branch information
wking committed Jan 23, 2014
2 parents 1c84517 + 05a7a33 commit c677468
Show file tree
Hide file tree
Showing 304 changed files with 13,796 additions and 4,975 deletions.
Empty file modified .gitignore
100755 → 100644
Empty file.
5 changes: 0 additions & 5 deletions .jshintignore

This file was deleted.

3 changes: 2 additions & 1 deletion .jshintrc
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

"globals": {
"define": true,
"require": true
"require": true,
"Chromath": false
}
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
If you have a bugfix or new feature that you would like to contribute to Kibana, please find or open an issue about it first. Talk about what you would like to do. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change.
If you have a bugfix or new feature that you would like to contribute to Kibana, please **find or open an issue about it before you start working on it.** Talk about what you would like to do. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change.

We enjoy working with contributors to get their code accepted. There are many approaches to fixing a problem and it is important to find the best approach before writing too much code.

Expand Down
339 changes: 20 additions & 319 deletions Gruntfile.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,332 +4,33 @@ module.exports = function (grunt) {

var config = {
pkg: grunt.file.readJSON('package.json'),
baseDir: '.',
srcDir: 'src',
destDir: 'dist',
tempDir: 'tmp',
meta: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= pkg.license %> */\n\n'
},
clean: {
on_start: ['<%= destDir %>', '<%= tempDir %>'],
temp: ['<%= tempDir %>'],
},
less: {
// this is the only task, other than copy, that runs on the src directory, since we don't really need
// the less files in the dist. Everything else runs from on temp, and require copys everything
// from temp -> dist
dist:{
expand: true,
cwd:'<%= srcDir %>/vendor/bootstrap/less/',
src: ['bootstrap.dark.less', 'bootstrap.light.less'],
dest: '<%= tempDir %>/css/',
},
// Compile in place when not building
src:{
options: {
paths: ["<%= srcDir %>/vendor/bootstrap/less"],
yuicompress:true
},
files: {
"<%= srcDir %>/css/bootstrap.dark.min.css": "<%= srcDir %>/vendor/bootstrap/less/bootstrap.dark.less",
"<%= srcDir %>/css/bootstrap.light.min.css": "<%= srcDir %>/vendor/bootstrap/less/bootstrap.light.less"
}
}
},
copy: {
// copy source to temp, we will minify in place for the dist build
everything_but_less_to_temp: {
cwd: '<%= srcDir %>',
expand: true,
src: ['**/*', '!**/*.less'],
dest: '<%= tempDir %>'
}
},
jshint: {
// just lint the source dir
source: {
files: {
src: ['Gruntfile.js', '<%= srcDir %>/app/**/*.js']
}
},
options: {
jshintrc: '.jshintrc'
}
},
htmlmin:{
build: {
options:{
removeComments: true,
collapseWhitespace: true
},
expand: true,
cwd: '<%= tempDir %>',
src: [
'index.html',
'app/panels/**/*.html',
'app/partials/**/*.html'
],
dest: '<%= tempDir %>'
}
},
cssmin: {
build: {
expand: true,
cwd: '<%= tempDir %>',
src: '**/*.css',
dest: '<%= tempDir %>'
}
},
ngmin: {
build: {
expand:true,
cwd:'<%= tempDir %>',
src: [
'app/controllers/**/*.js',
'app/directives/**/*.js',
'app/services/**/*.js',
'app/filters/**/*.js',
'app/panels/**/*.js',
'app/app.js',
'vendor/angular/**/*.js',
'vendor/elasticjs/elastic-angular-client.js'
],
dest: '<%= tempDir %>'
}
},
requirejs: {
build: {
options: {
appDir: '<%= tempDir %>',
dir: '<%= destDir %>',

mainConfigFile: '<%= tempDir %>/app/components/require.config.js',
modules: [], // populated below

optimize: 'none',
optimizeCss: 'none',
optimizeAllPluginResources: false,

removeCombined: true,
findNestedDependencies: true,
normalizeDirDefines: 'all',
inlineText: true,
skipPragmas: true,

done: function (done, output) {
var duplicates = require('rjs-build-analysis').duplicates(output);

if (duplicates.length > 0) {
grunt.log.subhead('Duplicates found in requirejs build:');
grunt.log.warn(duplicates);
done(new Error('r.js built duplicate modules, please check the excludes option.'));
}

done();
}
}
}
},
uglify: {
dest: {
expand: true,
src: ['**/*.js', '!config.js', '!app/dashboards/*.js'],
dest: '<%= destDir %>',
cwd: '<%= destDir %>',
options: {
quite: true,
compress: true,
preserveComments: false,
banner: '<%= meta.banner %>'
}
}
},
'git-describe': {
me: {
// Target-specific file lists and/or options go here.
},
},
compress: {
zip: {
options: {
archive: '<%= tempDir %>/<%= pkg.name %>-latest.zip'
},
files : [
{
expand: true,
cwd: '<%= destDir %>',
src: ['**/*'],
dest: '<%= pkg.name %>-latest'
},
{
expand: true,
src: ['LICENSE.md', 'README.md'],
dest: '<%= pkg.name %>-latest'
}
]
},
tgz: {
options: {
archive: '<%= tempDir %>/<%= pkg.name %>-latest.tar.gz'
},
files : [
{
expand: true,
cwd: '<%= destDir %>',
src: ['**/*'],
dest: '<%= pkg.name %>-latest'
},
{
expand: true,
src: ['LICENSE.md', 'README.md'],
dest: '<%= pkg.name %>-latest'
}
]
}
},
s3: {
dist: {
bucket: 'download.elasticsearch.org',
access: 'private',
// debug: true, // uncommment to prevent actual upload
upload: [
{
src: '<%= tempDir %>/<%= pkg.name %>-latest.zip',
dest: 'kibana/kibana/<%= pkg.name %>-latest.zip',
},
{
src: '<%= tempDir %>/<%= pkg.name %>-latest.tar.gz',
dest: 'kibana/kibana/<%= pkg.name %>-latest.tar.gz',
}
]
}
}
docsDir: 'docs/'
};

// setup the modules require will build
var requireModules = config.requirejs.build.options.modules = [
{
// main/common module
name: 'app',
include: [
'css',
'kbn',
'text',
'jquery',
'angular',
'settings',
'bootstrap',
'modernizr',
'elasticjs',
'timepicker',
'datepicker',
'underscore',
'filters/all',
'jquery.flot',
'services/all',
'angular-strap',
'directives/all',
'jquery.flot.pie',
'angular-sanitize',
'angular-dragdrop'
]
}
];

// create a module for each directory in src/app/panels/
require('fs')
.readdirSync(config.srcDir+'/app/panels')
.forEach(function (panelName) {
requireModules.push({
name: 'panels/'+panelName+'/module',
exclude: ['app']
});
});

// exclude the literal config definition from all modules
requireModules
.forEach(function (module) {
module.excludeShallow = module.excludeShallow || [];
module.excludeShallow.push('config');
});

// Run jshint
grunt.registerTask('default', ['jshint:source', 'less:src']);

// Concat and Minify the src directory into dist
grunt.registerTask('build', [
'jshint:source',
'clean:on_start',
'less:dist',
'copy:everything_but_less_to_temp',
'htmlmin:build',
'cssmin:build',
'ngmin:build',
'requirejs:build',
'clean:temp',
'build:write_revision',
'uglify:dest'
]);

// run a string replacement on the require config, using the latest revision number as the cache buster
grunt.registerTask('build:write_revision', function() {
grunt.event.once('git-describe', function (desc) {
grunt.config('string-replace.config', {
src: '<%= destDir %>/app/components/require.config.js',
dest: '<%= destDir %>/app/components/require.config.js',
options: {
replacements: [
{
pattern: /(?:^|\/\/)(.*)@REV@/,
replacement: '$1'+desc.object
}
]
}
});

grunt.task.run('string-replace:config');
});
grunt.task.run('git-describe');
});

// build, then zip and upload to s3
grunt.registerTask('distribute', [
'distribute:load_s3_config',
'build',
'compress:zip',
'compress:tgz',
's3:dist',
'clean:temp'
]);

// collect the key and secret from the .aws-config.json file, finish configuring the s3 task
grunt.registerTask('distribute:load_s3_config', function () {
var config = grunt.file.readJSON('.aws-config.json');
grunt.config('s3.options', {
key: config.key,
secret: config.secret
});
});

// load plugins
grunt.loadNpmTasks('grunt-s3');
grunt.loadNpmTasks('grunt-ngmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-git-describe');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-string-replace');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-compress');
require('load-grunt-tasks')(grunt);

// load task definitions
grunt.loadTasks('tasks');

// Utility function to load plugin settings into config
function loadConfig(config,path) {
require('glob').sync('*', {cwd: path}).forEach(function(option) {
var key = option.replace(/\.js$/,'');
// If key already exists, extend it. It is your responsibility to avoid naming collisions
config[key] = config[key] || {};
grunt.util._.extend(config[key], require(path + option)(config,grunt));
});
// technically not required
return config;
}

// Merge that object with what with whatever we have here
loadConfig(config,'./tasks/options/');

// pass the config to grunt
grunt.initConfig(config);
Expand Down
Empty file modified LICENSE.md
100755 → 100644
Empty file.
Loading

0 comments on commit c677468

Please sign in to comment.