diff --git a/.eslintrc b/.eslintrc index 6a291608cdf50..080d8cff32fc5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -30,6 +30,7 @@ rules: no-bitwise: 0 no-caller: 2 no-cond-assign: 0 + no-const-assign: 2 no-debugger: 2 no-empty: 2 no-eval: 2 diff --git a/.gitignore b/.gitignore index 56b859e0c6c38..80ed93f76b628 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .aws-config.json +.signing-config.json .DS_Store .node_binaries node_modules @@ -10,7 +11,8 @@ target .idea *.iml *.log -/test/output +/test/screenshots/failure/*.png +/test/screenshots/session/*.png /esvm .htpasswd .eslintcache diff --git a/.node-version b/.node-version index e2e3067ddc5fd..c966188e11ada 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -0.12.7 +4.4.7 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 58903624be8e8..7288710afc8c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -111,32 +111,43 @@ The standard `npm run test` task runs several sub tasks and can take several min #### Running tests using npm task: -*The Selenium server that is started currently only runs the tests in Firefox* +*The ChromeDriver that is started currently only runs the tests in Chrome browser* -To runt the functional UI tests, execute the following command: +To run the functional UI tests, execute the following command: `npm run test:ui` The task above takes a little time to start the servers. You can also start the servers and leave them running, and then run the tests separately: -`npm run test:ui:server` will start the server required to run the selenium tests, leave this open +`npm run test:ui:server` will start the server required to run the UI tests, leave this open `npm run test:ui:runner` will run the frontend tests and close when complete -#### Running tests locally with your existing (and already running) ElasticSearch, Kibana, and Selenium Server: - -Set your es and kibana ports in `test/intern.js` to 9220 and 5620, respecitively. You can configure your Selenium server to run the tests on Chrome,IE, or other browsers here. - -Once you've got the services running, execute the following: - -`npm run test:ui:runner` - #### General notes: - Using Page Objects pattern (https://theintern.github.io/intern/#writing-functional-test) -- At least the initial tests for the Settings, Discover, and Visualize tabs all depend on a very specific set of logstash-type data (generated with makelogs). Since that is a static set of data, all the Discover and Visualize tests use a specific Absolute time range. This gaurantees the same results each run. +- At least the initial tests for the Settings, Discover, and Visualize tabs all depend on a very specific set of logstash-type data (generated with makelogs). Since that is a static set of data, all the Discover and Visualize tests use a specific Absolute time range. This guarantees the same results each run. - These tests have been developed and tested with Chrome and Firefox browser. In theory, they should work on all browsers (that's the benefit of Intern using Leadfoot). - These tests should also work with an external testing service like https://saucelabs.com/ or https://www.browserstack.com/ but that has not been tested. +- https://theintern.github.io/ +- https://theintern.github.io/leadfoot/module-leadfoot_Element.html + +#### Building OS packages + +Packages are built using fpm, pleaserun, dpkg, and rpm. fpm and pleaserun can be installed using gem. Package building has only been tested on Linux and is not supported on any other platform. +```sh +apt-get install ruby-dev rpm +gem install fpm -v 1.5.0 # required by pleaserun 0.0.16 +gem install pleaserun -v 0.0.16 # higher versions fail at the moment +npm run build:ospackages +``` + +To specify a package to build you can add `rpm` or `deb` as an argument. +```sh +npm run build:ospackages -- --rpm +``` + +Distributable packages can be found in `target/` after the build completes. ### Submit a pull request diff --git a/Gruntfile.js b/Gruntfile.js index a7867384a6faf..9c694db149b21 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -67,7 +67,7 @@ module.exports = function (grunt) { grunt.config.merge(config); - config.userScriptsDir = __dirname + '/build/userScripts'; + config.packageScriptsDir = __dirname + '/tasks/build/package_scripts'; // ensure that these run first, other configs need them config.services = require('./tasks/config/services')(grunt); config.platforms = require('./tasks/config/platforms')(grunt); diff --git a/README.md b/README.md index ac077c92a2eb9..1111d4d207427 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Kibana 4.4.0-snapshot +# Kibana 4.6.0-snapshot [](https://travis-ci.org/elastic/kibana?branch=master) @@ -6,15 +6,23 @@ Kibana is an open source ([Apache Licensed](https://github.com/elastic/kibana/bl ## Requirements -- Elasticsearch version 2.1.0 or later +- Elasticsearch version 2.4.0 or later - Kibana binary package ## Installation * Download: [http://www.elastic.co/downloads/kibana](http://www.elastic.co/downloads/kibana) +* Extract the files * Run `bin/kibana` on unix, or `bin\kibana.bat` on Windows. * Visit [http://localhost:5601](http://localhost:5601) + +## Upgrade from previous version + +* Move any custom configurations in your old kibana.yml to your new one +* Reinstall plugins +* Start or restart Kibana + ## Quick Start You're up and running! Fantastic! Kibana is now running on port 5601, so point your browser at http://YOURDOMAIN.com:5601. @@ -35,9 +43,9 @@ Visit [Elastic.co](http://www.elastic.co/guide/en/kibana/current/index.html) for For the daring, snapshot builds are available. These builds are created after each commit to the master branch, and therefore are not something you should run in production. -| platform | | | -| --- | --- | --- | -| OSX | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.4.0-snapshot-darwin-x64.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.4.0-snapshot-darwin-x64.zip) | -| Linux x64 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.4.0-snapshot-linux-x64.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.4.0-snapshot-linux-x64.zip) | -| Linux x86 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.4.0-snapshot-linux-x86.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.4.0-snapshot-linux-x86.zip) | -| Windows | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.4.0-snapshot-windows.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.4.0-snapshot-windows.zip) | +| platform | | | | | +| --- | --- | --- | --- | --- | +| OSX | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0-snapshot-darwin-x64.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0-snapshot-darwin-x64.zip) | | | +| Linux x64 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0-snapshot-linux-x64.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0-snapshot-linux-x64.zip) | [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana_4.6.0-snapshot_amd64.deb)| [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0_snapshot-1.x86_64.rpm) | +| Linux x86 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0-snapshot-linux-x86.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0-snapshot-linux-x86.zip) | [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana_4.6.0-snapshot_i386.deb) | [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0_snapshot-1.i386.rpm) | +| Windows | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0-snapshot-windows.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-4.6.0-snapshot-windows.zip) | | | diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 010de8e419b5c..00e24cf71407d 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -586,7 +586,7 @@ Use slashes for both single line and multi line comments. Try to write comments that explain higher level mechanisms or clarify difficult segments of your code. **Don't use comments to restate trivial things**. -***Exception:*** Comment blocks describing a function and it's arguments (docblock) should start with `/**`, contain a single `*` at the begining of each line, and end with `*/`. +***Exception:*** Comment blocks describing a function and its arguments (docblock) should start with `/**`, contain a single `*` at the beginning of each line, and end with `*/`. *Right:* @@ -656,7 +656,7 @@ function ClassName() { var ClassName = function () {}; ``` -### Inhertiance should be done with a utility +### Inheritance should be done with a utility While you can do it with pure JS, a utility will remove a lot of boilerplate, and be more readable and functional. @@ -685,7 +685,7 @@ Square.prototype = Object.create(Shape); ### Keep Constructors Small -It is often the case that there are properties that can't be defined on the prototype, or work that needs to be done to completely create an object (like call it's Super class). This is all that should be done within constructors. +It is often the case that there are properties that can't be defined on the prototype, or work that needs to be done to completely create an object (like call its Super class). This is all that should be done within constructors. Try to follow the [Write small functions](#write-small-functions) rule here too. @@ -775,7 +775,7 @@ Several already exist, and can be found in `src/kibana/utils/_mixins.js` ## Filenames -All filenames should use `snake_case` and *can* start with an underscore if the module is not intended to be used outside of it's containing module. +All filenames should use `snake_case` and *can* start with an underscore if the module is not intended to be used outside of its containing module. *Right:* - `src/kibana/index_patterns/index_pattern.js` @@ -856,7 +856,7 @@ app.service('CustomService', function(Promise, otherDeps) { ### Routes -Angular routes are defined using a custom require modules named `routes` that remove much of the required boilerplate. +Angular routes are defined using a custom require module named `routes` that remove much of the required boilerplate. ```js require('ui/routes') @@ -869,7 +869,7 @@ require('ui/routes') ## Multiple attribute values -When a node has multiple attributes that would cause it to exceed the line character limit, each attribute including the first should be on its own line with a single indent. Also, when a node that is styled in this way has child nodes, there should be a blank line between the openening parent tag and the first child tag. +When a node has multiple attributes that would cause it to exceed the line character limit, each attribute including the first should be on its own line with a single indent. Also, when a node that is styled in this way has child nodes, there should be a blank line between the opening parent tag and the first child tag. ```