Permalink
Browse files

Initial commit.

  • Loading branch information...
athana committed Jul 28, 2015
1 parent 4ed0a79 commit 7980d2582ad6bb634c7d036be9f0a214a96487e1
Showing with 2,383 additions and 427 deletions.
  1. +1 −1 LICENSE.md
  2. +42 −18 README.md
  3. +6 −3 package.json
  4. +10 −6 src/kibana/components/agg_types/index.js
  5. +68 −22 src/kibana/components/config/config.js
  6. +2 −1 src/kibana/components/config/defaults.js
  7. +2 −2 src/kibana/components/courier/_request_queue.js
  8. +5 −0 src/kibana/components/courier/data_source/_doc_send_to_es.js
  9. +0 −2 src/kibana/components/courier/data_source/_root_search_source.js
  10. +48 −5 src/kibana/components/courier/data_source/doc_source.js
  11. +870 −17 src/kibana/components/courier/fetch/_call_client.js
  12. +12 −0 src/kibana/components/courier/fetch/_call_response_handlers.js
  13. +2 −2 src/kibana/components/courier/fetch/_fetch_these.js
  14. +1 −0 src/kibana/components/courier/fetch/request/segmented.js
  15. +1 −1 src/kibana/components/courier/fetch/strategy/search.js
  16. +24 −16 src/kibana/components/courier/saved_object/saved_object.js
  17. +6 −0 src/kibana/components/doc_table/components/table_row.js
  18. +5 −1 src/kibana/components/doc_table/doc_table.js
  19. +60 −0 src/kibana/components/index_patterns/_cast_mapping_type.js
  20. +12 −0 src/kibana/components/index_patterns/_field_types.js
  21. +20 −11 src/kibana/components/index_patterns/_get_ids.js
  22. +57 −18 src/kibana/components/index_patterns/_index_pattern.js
  23. +83 −9 src/kibana/components/index_patterns/_mapper.js
  24. +17 −5 src/kibana/components/index_patterns/index_patterns.js
  25. +1 −1 src/kibana/components/listen.js
  26. +39 −11 src/kibana/components/setup/setup.js
  27. +1 −1 src/kibana/components/setup/steps/check_es_version.js
  28. +14 −12 src/kibana/components/setup/steps/check_for_es.js
  29. +9 −7 src/kibana/components/setup/steps/check_for_kibana_index.js
  30. +56 −21 src/kibana/components/setup/steps/create_kibana_index.js
  31. +4 −3 src/kibana/components/timepicker/quick_ranges.js
  32. +1 −1 src/kibana/components/timepicker/timepicker.js
  33. +20 −11 src/kibana/components/validate_query/validate_query.js
  34. +1 −1 src/kibana/directives/infinite_scroll.js
  35. +4 −3 src/kibana/index.html
  36. +19 −2 src/kibana/index.js
  37. +1 −1 src/kibana/plugins/dashboard/index.js
  38. +1 −1 src/kibana/plugins/dashboard/partials/share.html
  39. +36 −21 src/kibana/plugins/dashboard/services/saved_dashboards.js
  40. +11 −3 src/kibana/plugins/discover/components/field_chooser/field_chooser.html
  41. +3 −0 src/kibana/plugins/discover/components/field_chooser/field_chooser.js
  42. +1 −1 src/kibana/plugins/discover/components/field_chooser/lib/field_calculator.js
  43. +10 −3 src/kibana/plugins/discover/controllers/discover.js
  44. +6 −4 src/kibana/plugins/discover/index.html
  45. +1 −0 src/kibana/plugins/discover/index.js
  46. +38 −21 src/kibana/plugins/discover/saved_searches/saved_searches.js
  47. +1 −1 src/kibana/plugins/kibana/index.js
  48. +1 −1 src/kibana/plugins/kibana/kibana.html
  49. +1 −1 src/kibana/plugins/metric_vis/metric_vis.html
  50. +3 −0 src/kibana/plugins/settings/app.html
  51. +0 −1 src/kibana/plugins/settings/index.js
  52. +2 −3 src/kibana/plugins/settings/sections/about/index.html
  53. +3 −2 src/kibana/plugins/settings/sections/index.js
  54. +10 −11 src/kibana/plugins/settings/sections/indices/_create.html
  55. +26 −8 src/kibana/plugins/settings/sections/indices/_create.js
  56. +12 −12 src/kibana/plugins/settings/sections/indices/_edit.html
  57. +2 −0 src/kibana/plugins/settings/sections/indices/_edit.js
  58. +8 −5 src/kibana/plugins/settings/sections/indices/_field_types.js
  59. +7 −3 src/kibana/plugins/settings/sections/indices/_refresh_kibana_index.js
  60. +2 −2 src/kibana/plugins/settings/sections/indices/index.html
  61. +1 −1 src/kibana/plugins/settings/sections/indices/index.js
  62. +1 −0 src/kibana/plugins/settings/sections/objects/_objects.js
  63. +54 −23 src/kibana/plugins/settings/sections/objects/_view.js
  64. +5 −2 src/kibana/plugins/vis_types/index.js
  65. +1 −2 src/kibana/plugins/vis_types/vislib/tile_map.js
  66. +10 −7 src/kibana/plugins/visualize/editor/agg_add.html
  67. +1 −1 src/kibana/plugins/visualize/editor/panels/share.html
  68. +51 −20 src/kibana/plugins/visualize/saved_visualizations/saved_visualizations.js
  69. +1 −1 src/kibana/plugins/visualize/wizard/step_2.html
  70. +1 −1 src/kibana/services/es.js
  71. +3 −1 src/kibana/services/timefilter.js
  72. +431 −0 src/kibana/silkconfig_schema.xml
  73. +24 −11 src/kibana/utils/mapping_setup.js
  74. +2 −1 src/server/app.js
  75. +7 −3 src/server/bin/kibana.js
  76. +2 −1 src/server/config/index.js
  77. +2 −1 src/server/config/kibana.yml
  78. +15 −3 src/server/index.js
  79. +5 −3 src/server/lib/elasticsearch_client.js
  80. +1 −0 src/server/lib/migrateConfig.js
  81. +2 −0 src/server/lib/validateRequest.js
  82. +20 −5 src/server/routes/proxy.js
  83. +19 −19 tasks/build.js
  84. +14 −0 tasks/config/watch.js
  85. +1 −1 tasks/default.js
  86. +0 −1 tasks/jshint.js
View
@@ -1,4 +1,4 @@
-Copyright 2012–2014 Elasticsearch BV
+Copyright 2012–2014 Lucidworks Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
View
@@ -1,17 +1,15 @@
-<!--# Kibana 4.1.0-snapshot-->
+# Silk 4.0.0
-#Kibana 4 -> Banana 4
+Silk is a fork of Kibana, an open source ([Apache Licensed](https://github.com/LucidWorks/Fusion/blob/fusion-banana4/Apollo-admin/ui/banana/LICENSE.md)), browser based analytics and search dashboard for Solr. Silk is a snap to setup and start using. Silk strives to be easy to get started with, while also being flexible and powerful.
-<!--[![Build Status](https://travis-ci.org/elasticsearch/kibana.svg?branch=master)](https://travis-ci.org/elasticsearch/kibana?branch=master)-->
+The goal is to create a rich and flexible UI, enabling users to rapidly develop end-to-end applications that leverage the power of Apache Solr. Data can be ingested into Solr through a variety of ways, including Flume, Logstash and other connectors.
-<!--
-Banana4 is an open source ([Apache Licensed](https://github.com/elasticsearch/kibana/blob/master/LICENSE.md)), 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.-->
+## Requirements
-##Requirements
+- Solr version 5.0 or later.
+- A modern web browser. The latest version of Chrome and Firefox have been tested to work.
-- Elasticsearch version 1.4.4 or later running.
-
-##Running from development tree
+## Running from development tree
Setting up build dependency...
@@ -32,26 +30,52 @@ Running server...
npm run server
```
-<!--## Installation
+## Installation
-* Download: [http://www.elastic.co/downloads/kibana](http://www.elastic.co/downloads/kibana)
-* Run `bin/kibana` on unix, or `bin\kibana.bat` on Windows.
-* Visit [http://localhost:5601](http://localhost:5601)-->
+* Download and install [the latest Solr](http://lucene.apache.org/solr/mirrors-solr-latest-redir.html)
+* Run Solr `$SOLR_HOME/bin/solr start` on unix, or `$SOLR_HOME\bin\solr.cmd start` on Windows.
+* Download [Silk](https://github.com/LucidWorks/silk)
+* Run `bin/silk` on unix, or `bin\silk.bat` on Windows.
+* Open your browser and goto [http://localhost:5601](http://localhost:5601)
## Quick Start
-You're up and running! Fantastic! Kibana is now running on port 5601, so point your browser at http://YOURDOMAIN.com:5601.
+You're up and running! Fantastic! Silk is now running on port 5601, so point your browser at http://YOURDOMAIN.com:5601.
-The first screen you arrive at will ask you to configure an **index pattern**. An index pattern describes to Kibana how to access your data. We make the guess that you're working with log data, and we hope (because it's awesome) that you're working with Logstash. By default, we fill in `logstash-*` as your index pattern, thus the only thing you need to do is select which field contains the timestamp you'd like to use. Kibana reads your Elasticsearch mapping to find your time fields - select one from the list and hit *Create*.
+The first screen you arrive at will ask you to configure an **index pattern**. An index pattern describes to Silk how to access your data. We make the guess that you're working with log data, and we hope (because it's awesome) that you're working with Logstash. By default, we fill in `logstash-*` as your index pattern, thus the only thing you need to do is select which field contains the timestamp you'd like to use. Silk reads your Solr schema to find your time fields - select one from the list and hit *Create*.
-**Tip:** there's an optimization in the way of the *Use event times to create index names* option. Since Logstash creates an index every day, Kibana uses that fact to only search indices that could possibly contain data in your selected time range.
+**Tip:** there's an optimization in the way of the *Use event times to create index names* option. Since Logstash creates an index every day, Silk uses that fact to only search indices that could possibly contain data in your selected time range.
-Congratulations, you have an index pattern! You should now be looking at a paginated list of the fields in your index or indices, as well as some informative data about them. Kibana has automatically set this new index pattern as your default index pattern. If you'd like to know more about index patterns, pop into to the [Settings](#settings) section of the documentation.
+Congratulations, you have an index pattern! You should now be looking at a paginated list of the fields in your index or indices, as well as some informative data about them. Silk has automatically set this new index pattern as your default index pattern.
**Did you know:** Both *indices* and *indexes* are acceptable plural forms of the word *index*. Knowledge is power.
Now that you've configured an index pattern, you're ready to hop over to the [Discover](#discover) screen and try out a few searches. Click on **Discover** in the navigation bar at the top of the screen.
## Documentation
-TODO
+Visit [Lucidworks.com](http://lucidworks.com/) for the full Silk documentation.
+
+## FAQ
+
+__Q__: How do I ...?
+
+__A__: You can ...
+
+## Resources
+
+1. Lucidworks Silk: http://www.lucidworks.com/lucidworks-silk/
+2. Webinar on LucidWorks SILK: http://programs.lucidworks.com/SiLK-introduction_Register.html.
+3. LogStash: http://logstash.net/
+4. SILK Use Cases: https://github.com/LucidWorks/silkusecases. Provides example configuration files, schemas and dashboards required to build applications that use Solr and Banana.
+
+## Support
+
+If you have any questions, please contact:
+- Andrew Thanalertvisuti (andrew.thanalertvisuti@lucidworks.com)
+- Arijit Dasgupta (arijit.dasgupta@lucidworks.com)
+
+## Trademarks
+
+Kibana is a trademark of Elasticsearch BV
+Logstash is a trademark of Elasticsearch BV
View
@@ -1,9 +1,10 @@
{
"name": "kibana",
- "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.",
+ "description": "Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Solr. 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",
+ "silk",
+ "solr",
"logstash",
"analytics",
"visualizations",
@@ -32,13 +33,15 @@
"test": "grunt test",
"start": "node ./src/server/bin/kibana.js",
"server": "node ./src/server/bin/kibana.js",
- "precommit": "grunt hintStagedFiles"
+ "precommit": "grunt hintStagedFiles",
+ "watch": "grunt watch"
},
"repository": {
"type": "git",
"url": "https://github.com/elastic/kibana.git"
},
"dependencies": {
+ "bower": "^1.3.8",
"ansicolors": "^0.3.2",
"bluebird": "~2.0.7",
"body-parser": "~1.10.1",
@@ -5,23 +5,27 @@ define(function (require) {
var aggs = {
metrics: [
Private(require('components/agg_types/metrics/count')),
+ // We need Solr to support stats on facet.range and facet.query.
+ // See: https://issues.apache.org/jira/browse/SOLR-6352
+ // Also the JSON API Faceted Search might be the solution here:
+ // https://cwiki.apache.org/confluence/display/solr/Faceted+Search
Private(require('components/agg_types/metrics/avg')),
Private(require('components/agg_types/metrics/sum')),
Private(require('components/agg_types/metrics/min')),
Private(require('components/agg_types/metrics/max')),
Private(require('components/agg_types/metrics/std_deviation')),
- Private(require('components/agg_types/metrics/cardinality')),
- Private(require('components/agg_types/metrics/percentiles'))
+ // Private(require('components/agg_types/metrics/cardinality')),
+ // Private(require('components/agg_types/metrics/percentiles'))
],
buckets: [
Private(require('components/agg_types/buckets/date_histogram')),
- Private(require('components/agg_types/buckets/histogram')),
+ // Private(require('components/agg_types/buckets/histogram')),
Private(require('components/agg_types/buckets/range')),
- Private(require('components/agg_types/buckets/ip_range')),
+ // Private(require('components/agg_types/buckets/ip_range')),
Private(require('components/agg_types/buckets/terms')),
Private(require('components/agg_types/buckets/filters')),
- Private(require('components/agg_types/buckets/significant_terms')),
- Private(require('components/agg_types/buckets/geo_hash'))
+ // Private(require('components/agg_types/buckets/significant_terms')),
+ // Private(require('components/agg_types/buckets/geo_hash'))
]
};
@@ -3,11 +3,41 @@ define(function (require) {
'kibana/notify'
]);
- var configFile = JSON.parse(require('text!config'));
- configFile.elasticsearch = (function () {
- var a = document.createElement('a');
- a.href = 'elasticsearch';
- return a.href;
+ // var configFile = JSON.parse(require('text!config'));
+ var configFile = {
+ "kibana_index": "system_silkconfig",
+ "default_app_id": "discover",
+ "shard_timeout": 0,
+ "plugins": [
+ "plugins/dashboard/index",
+ "plugins/discover/index",
+ "plugins/doc/index",
+ "plugins/kibana/index",
+ "plugins/markdown_vis/index",
+ "plugins/metric_vis/index",
+ "plugins/settings/index",
+ "plugins/table_vis/index",
+ "plugins/vis_debug_spy/index",
+ "plugins/vis_types/index",
+ "plugins/visualize/index"
+ ],
+ "collectionsApi": "/admin/collections",
+ "silk": "silk"
+ };
+
+ // Define Solr URL in config
+ configFile.solr = (function() {
+ // Cannot specify query-pipelines here because we use configFile.solr to check for Solr
+ // in the setup init phase. Refer to /component/setup/steps/check_for_es.js
+ // The URL location here needs to return status 200 in order to pass the check. Otherwise,
+ // the dashboard will not load.
+ //
+ // For example, this is not gonna work:
+ // var solrUrl = window.location.origin + '/api/apollo/query-pipelines/default/collections';
+
+ // Need to use double /solr because of the proxy code in server side.
+ var solrUrl = window.location.origin + '/solr/solr';
+ return solrUrl;
}());
// allow the rest of the app to get the configFile easily
@@ -52,7 +82,7 @@ define(function (require) {
config.init = _.once(function () {
var complete = notify.lifecycle('config init');
return kbnSetup()
- .then(function getDoc() {
+ .then(function getDoc(resp) {
// used to apply an entire es response to the vals, silentAndLocal will prevent
// event/notifications/writes from occuring.
@@ -62,21 +92,38 @@ define(function (require) {
});
};
- return doc.fetch().then(function initDoc(resp) {
- if (!resp.found) {
- return doc.doIndex({
- buildNum: buildNum
- }).then(getDoc);
- } else {
- // apply update, and keep it quiet the first time
- applyMassUpdate(resp, true);
-
- // don't keep it quiet other times
- doc.onUpdate(function (resp) {
- applyMassUpdate(resp, false);
- });
- }
- });
+ // return doc.fetch().then(function initDoc(resp) {
+ // if (!resp.found) {
+ // return doc.doIndex({
+ // buildNum: buildNum
+ // }).then(getDoc);
+ // } else {
+ // // apply update, and keep it quiet the first time
+ // applyMassUpdate(resp, true);
+
+ // // don't keep it quiet other times
+ // doc.onUpdate(function (resp) {
+ // applyMassUpdate(resp, false);
+ // });
+ // }
+ // });
+ var savedSettings;
+ try {
+ savedSettings = resp.data.response.docs[0];
+ var defaultIndex = JSON.parse(savedSettings['_source']).defaultIndex;
+ config.set('defaultIndex', defaultIndex);
+ } catch (error) {
+ savedSettings = {
+ '_id': '@@version',
+ '_index': this.kibana_index,
+ '_source': {'buildNum': 9999, 'defaultIndex': 'logs'},
+ '_type': 'config',
+ '_version': 2,
+ 'found': true
+ };
+ }
+
+ return savedSettings;
})
.then(function () {
$rootScope.$broadcast('init:config');
@@ -86,7 +133,6 @@ define(function (require) {
config.get = function (key, defaultVal) {
var keyVal;
-
if (vals[key] == null) {
if (defaultVal == null) {
keyVal = defaults[key].value;
@@ -30,6 +30,7 @@ define(function (require) {
},
'defaultIndex': {
value: null,
+ // value: 'logs',
description: 'The index to access if no index is set',
},
'metaFields': {
@@ -81,4 +82,4 @@ define(function (require) {
description: 'The maximum height that a cell in a table should occupy. Set to 0 to disable truncation.'
}
};
-});
+});
@@ -17,7 +17,7 @@ define(function (require) {
};
queue.get = function (/* strategies.. */) {
- var strategies = _.toArray(arguments);
+ var strategies = _.toArray(arguments);
return queue.filter(function (req) {
var strategyMatch = !strategies.length;
if (!strategyMatch) {
@@ -32,4 +32,4 @@ define(function (require) {
return queue;
};
-});
+});
@@ -1,3 +1,7 @@
+/**
+ * NOTE: For Solr, we don't need to use this file because we
+ * implement the backend code directly in doc_source.js
+ */
define(function (require) {
var _ = require('lodash');
var errors = require('errors');
@@ -24,6 +28,7 @@ define(function (require) {
params.version = doc._getVersion();
}
+ // create index here
return es[method](params)
.then(function (resp) {
if (resp.status === 409) throw new errors.VersionConflict(resp);
@@ -60,8 +60,6 @@ define(function (require) {
literalRoot.inherits(globalSource);
}
-
-
/**
* Sets the appSource to be a new, empty, SearchSource
* @return {undefined}
Oops, something went wrong.

0 comments on commit 7980d25

Please sign in to comment.