Skip to content

Commit

Permalink
Merge pull request #266 from simianhacker/kibana-server
Browse files Browse the repository at this point in the history
Adding back-end server to the Kibana Project.
  • Loading branch information
simianhacker committed Sep 8, 2014
2 parents b24ac94 + daaf796 commit 5b7639a
Show file tree
Hide file tree
Showing 80 changed files with 1,303 additions and 331 deletions.
4 changes: 2 additions & 2 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"directory": "./src/bower_components"
}
"directory": "./src/kibana/bower_components"
}
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.9.3-p547
7 changes: 5 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ module.exports = function (grunt) {
target: __dirname + '/target', // location of the compressed build targets
buildApp: __dirname + '/build/kibana', // build directory for the app

jrubyVersion: '1.7.14',
jrubyPath: __dirname + '/.jruby',

unitTestDir: __dirname + '/test/unit',
testUtilsDir: __dirname + '/test/utils',
bowerComponentsDir: __dirname + '/src/bower_components',
bowerComponentsDir: __dirname + '/src/kibana/bower_components',

meta: {
banner: '/*! <%= package.name %> - v<%= package.version %> - ' +
Expand All @@ -36,4 +39,4 @@ module.exports = function (grunt) {

// load task definitions
grunt.loadTasks('tasks');
};
};
433 changes: 432 additions & 1 deletion TODOS.md

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,21 @@
"grunt-contrib-requirejs": "~0.4.4",
"grunt-contrib-watch": "~0.5.3",
"grunt-mocha": "~0.4.10",
"grunt-replace": "^0.7.9",
"grunt-run": "^0.2.3",
"http-proxy": "~1.1.4",
"husky": "~0.6.0",
"istanbul": "~0.2.4",
"load-grunt-config": "~0.7.0",
"lodash": "~2.4.1",
"mkdirp": "^0.5.0",
"mocha": "~1.20.1",
"path-browserify": "0.0.0",
"progress": "^1.1.8",
"request": "^2.40.0",
"requirejs": "~2.1.14",
"rjs-build-analysis": "0.0.3"
"rjs-build-analysis": "0.0.3",
"tar": "^1.0.1"
},
"scripts": {
"test": "grunt test",
Expand Down
30 changes: 0 additions & 30 deletions server/Rakefile

This file was deleted.

38 changes: 0 additions & 38 deletions server/bin/kibana

This file was deleted.

2 changes: 0 additions & 2 deletions server/config/puma.rb

This file was deleted.

12 changes: 0 additions & 12 deletions server/config/web.ru

This file was deleted.

27 changes: 0 additions & 27 deletions server/lib/app.rb

This file was deleted.

22 changes: 0 additions & 22 deletions server/public/index.html

This file was deleted.

9 changes: 0 additions & 9 deletions server/public/test.html

This file was deleted.

16 changes: 0 additions & 16 deletions server/routes/api.rb

This file was deleted.

15 changes: 0 additions & 15 deletions server/routes/base.rb

This file was deleted.

13 changes: 0 additions & 13 deletions server/routes/home.rb

This file was deleted.

2 changes: 1 addition & 1 deletion src/kibana/components/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function (require) {
'kibana/notify'
]);

var configFile = require('config_file');
var configFile = JSON.parse(require('text!config'));
// allow the rest of the app to get the configFile easily
module.constant('configFile', configFile);

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/index.html → src/kibana/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<meta name="viewport" content="width=device-width">
<title>Kibana 4</title>
<!-- load the root require context -->
<script src="bower_components/requirejs/require.js"></script>
<script src="/bower_components/requirejs/require.js"></script>

<script src="kibana/require.config.js"></script>
<script src="/require.config.js"></script>
<script>require(['kibana'], function (kibana) { kibana.init(); });</script>
<link rel="stylesheet" href="kibana/styles/main.css" >
<link rel="stylesheet" href="/styles/main.css" >
</head>
<body ng-controller="kibana" ng-class="'application-'+activeApp">
<kbn-notifications list="notifList"></kbn-notifications>
Expand Down
4 changes: 2 additions & 2 deletions src/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define(function (require) {
require('angular-route');
require('angular-bindonce');

var configFile = require('config_file');
var configFile = JSON.parse(require('text!config'));

var kibana = modules.get('kibana', [
// list external requirements here
Expand All @@ -21,7 +21,7 @@ define(function (require) {
'ngRoute'
]);

configFile.elasticsearch = configFile.elasticsearch || ('http://' + window.location.hostname + ':9200');
configFile.elasticsearch = ('http://' + window.location.hostname + '/elasticsearch/');

kibana
// This stores the Kibana revision number, @REV@ is replaced by grunt.
Expand Down
48 changes: 23 additions & 25 deletions src/kibana/require.config.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
require.config({
baseUrl: './kibana',
baseUrl: './',
paths: {
kibana: './index',
config_file: '../config',

kibana: 'index',
// special utils
routes: 'utils/routes/index',
errors: 'components/errors',
modules: 'utils/modules',
lodash: 'utils/_mixins',

// 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',
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',
inflection: '../bower_components/inflection/lib/inflection',
jquery: '../bower_components/jquery/dist/jquery',
jsonpath: '../bower_components/jsonpath/lib/jsonpath',
lodash_src: '../bower_components/lodash/dist/lodash',
moment: '../bower_components/moment/moment',
text: '../bower_components/requirejs-text/text'
'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',
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',
inflection: 'bower_components/inflection/lib/inflection',
jquery: 'bower_components/jquery/dist/jquery',
jsonpath: 'bower_components/jsonpath/lib/jsonpath',
lodash_src: 'bower_components/lodash/dist/lodash',
moment: 'bower_components/moment/moment',
text: 'bower_components/requirejs-text/text'
},
shim: {
angular: {
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/services/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ define(function (require) {

return es;
});
});
});
2 changes: 1 addition & 1 deletion src/kibana/styles/_bootstrap.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@bs-less-dir: "../../bower_components/bootstrap/less";
@bs-less-dir: "../bower_components/bootstrap/less";

// Core variables and mixins
@import "theme/_variables.less";
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/styles/main.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../bower_components/font-awesome/less/font-awesome.less";
@import "../bower_components/font-awesome/less/font-awesome.less";
@import (reference) "lesshat.less";

// generic mixins
Expand Down
3 changes: 1 addition & 2 deletions server/Gemfile → src/server/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ruby "1.9.3", :engine => 'jruby', :engine_version => '1.7.13'

source "https://rubygems.org"

gem 'sinatra', :require => 'sinatra/base'
Expand All @@ -8,3 +6,4 @@ gem 'puma'
gem 'warbler'
gem 'elasticsearch'
gem 'rack-reverse-proxy', :require => 'rack/reverse_proxy'
gem 'colorize'
2 changes: 2 additions & 0 deletions server/Gemfile.lock → src/server/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
backports (3.6.0)
colorize (0.7.3)
elasticsearch (1.0.4)
elasticsearch-api (= 1.0.4)
elasticsearch-transport (= 1.0.4)
Expand Down Expand Up @@ -52,6 +53,7 @@ PLATFORMS
ruby

DEPENDENCIES
colorize
elasticsearch
puma
rack-reverse-proxy
Expand Down
Empty file added src/server/INSTALL
Empty file.
File renamed without changes.
Loading

0 comments on commit 5b7639a

Please sign in to comment.