Skip to content

Commit

Permalink
Merge branch 'master' into fix/elastic#1962
Browse files Browse the repository at this point in the history
  • Loading branch information
stormpython committed Jan 22, 2015
2 parents 7054d46 + caaca43 commit dee5c3f
Show file tree
Hide file tree
Showing 68 changed files with 894 additions and 1,313 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.aws-config.json
.DS_Store
.node_binaries
node_modules
bower_components
**/*.css
Expand All @@ -9,4 +10,5 @@ target
.jruby
.idea
*.iml
esvm
*.log
esvm
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"maxerr": 10,
"scripturl": true,
"evil": true
}
}
9 changes: 0 additions & 9 deletions Gemfile

This file was deleted.

62 changes: 0 additions & 62 deletions Gemfile.lock

This file was deleted.

4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ module.exports = function (grunt) {
buildApp: __dirname + '/build/kibana', // build directory for the app
configFile: __dirname + '/src/server/config/kibana.yml',

jrubyVersion: '1.7.14',
jrubyPath: __dirname + '/.jruby',
nodeVersion: '0.10.35',
platforms: ['darwin-x64', 'linux-x64', 'linux-x86', 'windows'],

unitTestDir: __dirname + '/test/unit',
testUtilsDir: __dirname + '/test/utils',
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ Kibana is an open source (Apache Licensed), browser based analytics and search d

## Requirements

- Java
- Elasticsearch version 1.4.0 or later
- ...and nothing else
- Kibana binary package

*Note:* Groovy scripting must be enabled in Elasticsearch

Expand Down
70 changes: 52 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,56 @@
{
"name": "kibana",
"private": true,
"description": "Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elasticsearch.",
"keywords": [
"kibana",
"elasticsearch",
"logstash",
"analytics",
"visualizations",
"dashboards",
"dashboarding"
],
"private": false,
"version": "4.0.0-beta3",
"description": "Kibana 4",
"main": "Gulpfile.js",
"dependencies": {},
"main": "src/server/app.js",
"homepage": "http://www.elasticsearch.org/overview/kibana/",
"bugs": "https://github.com/elasticsearch/kibana/issues",
"license": "Apache-2.0",
"author": "Rashid Khan <rashid.khan@elasticsearch.com>",
"contributors": [
"Spencer Alger <spencer.alger@elasticsearch.com>",
"Chris Cowan <chris.cowan@elasticsearch.com>",
"Joe Fleming <joe.fleming@elasticsearch.com>",
"Lukas Olson <lukas.olson@elasticsearch.com>"
],
"scripts": {
"test": "grunt test",
"start": "node ./src/server/bin/kibana.js",
"server": "node ./src/server/bin/kibana.js",
"precommit": "grunt hintStagedFiles"
},
"repository": {
"type": "git",
"url": "https://github.com/elasticsearch/kibana.git"
},
"dependencies": {
"ansicolors": "^0.3.2",
"body-parser": "~1.10.1",
"bunyan": "^1.2.3",
"commander": "^2.6.0",
"compression": "^1.3.0",
"cookie-parser": "~1.3.3",
"debug": "~2.1.1",
"express": "~4.10.6",
"glob": "^4.3.2",
"http-proxy": "^1.8.1",
"jade": "~1.8.2",
"js-yaml": "^3.2.5",
"less-middleware": "1.0.x",
"lodash": "^2.4.1",
"morgan": "~1.5.1",
"serve-favicon": "~2.2.0"
},
"devDependencies": {
"bluebird": "~2.0.7",
"connect": "~2.19.5",
Expand All @@ -27,7 +73,7 @@
"grunt-s3": "~0.2.0-alpha.3",
"grunt-saucelabs": "~8.3.2",
"html-entities": "^1.1.1",
"http-proxy": "~1.1.4",
"http-proxy": "~1.8.1",
"husky": "~0.6.0",
"istanbul": "~0.2.4",
"load-grunt-config": "~0.7.0",
Expand All @@ -46,20 +92,8 @@
"simple-git": "^0.11.0",
"tar": "^1.0.1"
},
"scripts": {
"test": "grunt test --use-jruby",
"server": "grunt server",
"precommit": "grunt hintStagedFiles",
"prepush": "echo"
},
"repository": {
"type": "git",
"url": "git@github.com:elasticsearch/kibana.git"
},
"author": "",
"license": "Apache 2.0",
"bugs": {
"url": "https://github.com/elasticsearch/kibana/issues"
},
"homepage": "https://www.elasticsearch.org/overview/kibana"
}
}
5 changes: 5 additions & 0 deletions src/server/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "../.jshintrc",
"node": true
}

19 changes: 0 additions & 19 deletions src/server/DIST_README.md

This file was deleted.

7 changes: 0 additions & 7 deletions src/server/Gemfile

This file was deleted.

40 changes: 0 additions & 40 deletions src/server/Gemfile.lock

This file was deleted.

77 changes: 77 additions & 0 deletions src/server/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var requestLogger = require('./lib/requestLogger');
var appHeaders = require('./lib/appHeaders');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var compression = require('compression');
var config = require('./config');

var routes = require('./routes/index');
var proxy = require('./routes/proxy');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');
app.set('x-powered-by', false);

app.use(favicon(path.join(config.public_folder, 'styles', 'theme', 'elk.ico')));
app.use(requestLogger());
app.use(appHeaders());

if (app.get('env') === 'development') {
require('./dev')(app);
}

// The proxy must be set up before all the other middleware.
// TODO: WE might want to move the middleware to each of the individual routes
// so we don't have weird conflicts in the future.
app.use('/elasticsearch', proxy);
app.use('/enforcer', require('./lib/enforce'));

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(compression());
app.use(express.static(config.public_folder));
if (config.external_plugins_folder) app.use('/plugins', express.static(config.external_plugins_folder));

app.use('/', routes);


// catch 404 and forward to error handler
app.use(function (req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});

// error handlers

// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
app.use(function (err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: err
});
});
}

// production error handler
// no stacktraces leaked to user
app.use(function (err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {}
});
});


module.exports = app;
Loading

0 comments on commit dee5c3f

Please sign in to comment.