Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
* develop: (66 commits)
  Add spy able properties to default-nts.json and default-ts.json. Cleanup default.json. Fix query panel editor.html.
  Revise README.md for 1.4
  Add modifications to help message
  Update README.md before officially release 1.4
  SILK-133 the first version of right/left legend
  Remove unnecessary required time_field setting from histogram panel, it will get time field from filter service now.
  Remove $log and fix a typo bug in dashLoader.js. Clean up default-ts.json and default-nts.json.
  Add SILK-142: Help message for each panel
  Fix SILK-143: Null values in time filter when loading dashboard from gist
  New dashboard feature
  Fix the solr server location for banana-int where it always use the setting in config.js. Now it will use the solr server specified in the dashboard settings. Enable the Solr list size in dashboard settings to specify the max number of Solr stored dashboards to display in the list under the Load menu.
  Add Allowing Load / Save Gist in Dashboard Settings. Remove ejsResource from dashboard.js.
  SILK-52 Add gist saving and loading functionality
  fis some issues in facet panel
  Add new facet panel
  Fixing SILK-138 in terms panel
  Update all.js
  fixing issues SILK-59, SILK-89  and SILK-127
  Fix bug in histogram panel zoom out button.
  Fix bug with flickering tabs in Settings panel when quickly selecting tabs (only happen in Chrome) (related to Kibana issue #583).
  ...

Conflicts:
	src/app/services/kbnIndex.js
  • Loading branch information
athana committed Sep 12, 2014
2 parents 1a88528 + ca32e1e commit 5cbde97
Show file tree
Hide file tree
Showing 73 changed files with 6,903 additions and 640 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.aws-config.json
dist
dist
bower_components
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,27 @@ The goal is to create a rich and flexible UI, enabling users to rapidly develop

## IMPORTANT

Pull the repo from the "release" branch; version 1.3 will be tagged as banana-1.3.
Pull the repo from the "release" branch; version 1.4 will be tagged as banana-1.4.

## Banana 1.4: Released on 15 September 2014

Banana 1.4 contains many new features, new panels, enhancements and bug fixes to improve the overall user experience and stability. Thank you to our growing community for your suggestions and contributions! Please continue sending us your feedbacks, so that we can further extend and improve Banana!

This release includes the following key new features and improvements:

1. Banana 1.4 provides much improved performance - by better utilizing Solr's caches in _Timepicker Module_. This improvement is discernable in the Relative and Since time modes.
2. A new _Full Text Search_ panel provides a more traditional search interface to view textual data.
3. Enhancements to the _Table_ panel improve performance and user experience:
* Sorting option can now be turned off in order to speed up the search results returned from Solr.
* A particular column - corresponding to a URI field - can be set as the hyperlink column. When set, this value will become clickable and linked to a specific URI.
* You can now display images inside a table column.
4. In the _Range Facet_ panel, users now have the ability to set the chart's precision automatically or manually.
5. In the _Terms_ panel, chart colors can be customized by changing the default color template or by using field values as colors.
6. It is now possible to load and save a dashboard to Gist.
7. We have fixed the Solr server location for the banana-int collection, the internal collection that stores dashboards. Now banana-int should be located on the same Solr server as specified in Solr Settings in the Dashboard configuration. You do not have to manually edit config.js file anymore.
8. The dashboard contains a new button that enables users to quickly create a new dashboard from templates. Currently, we provide two default templates: a time-series dashboard template and a non time-series one.
9. The _Histogram_ panel no longer requires you to set a time field; as logically expected, it will get the time field from the _Timepicker_ panel.
10. We have enhanced the usability by allowing you to specify custom help messages inside each panel. You no longer need to use a separate _Text_ panel for this purpose. Instead, you can now embed information and instructions within each panel in the dashboard to better communicate with your users.

## Banana 1.3: Released on 10 June 2014

Expand Down
29 changes: 29 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "angular-seed",
"description": "A starter project for AngularJS",
"version": "0.0.0",
"homepage": "https://github.com/angular/angular-seed",
"license": "MIT",
"private": true,
"dependencies": {
"angular": "1.0.8",
"angular-loader": "1.0.8",
"angular-mocks": "1.0.8",
"angular-sanitize": "1.0.8",
"angular-strap": "0.7.5",
"bootstrap": "2.3.2",
"d3": "~3.4.11",
"jquery": "1.8.0",
"jquery-ui": "1.10.3",
"jquery-flot": "0.8.1",
"requirejs": "2.1.8",
"modernizr": "2.6.1",
"moment": "2.1.0",
"underscore": "1.5.1"
},
"resolutions": {
"angular": "1.0.8",
"jquery": "1.8.0",
"bootstrap": "2.3.2"
}
}
60 changes: 44 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,58 @@
// NOTE: This file is not completed for use yet.

{
"version": "1.4.0",
"name": "banana",
"description": "Banana for Solr - A Port of Kibana",
"repository": "https://github.com/LucidWorks/banana",
"license": "Apache License",
"author": {
"name": "Andrew Thanalertvisuti",
"company": "LucidWorks, Inc."
},
"name": "banana",
"version": "1.3",
"devDependencies": {
"rjs-build-analysis": "0.0.3",
"bower": "^1.3.1",
"grunt": "~0.4.1",
"grunt-s3": "~0.2.0-alpha.2",
"grunt-ngmin": "0.0.3",
"grunt-angular-templates": "~0.3.12",
"grunt-contrib": "~0.7.0",
"grunt-contrib-less": "~0.7.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-git-describe": "~2.3.2",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-compress": "~0.5.2",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-cssmin": "~0.6.1",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-jshint": "~0.6.0",
"grunt-string-replace": "~0.2.4",
"grunt-contrib-htmlmin": "~0.1.3",
"grunt-contrib-jshint": "~0.6.0",
"grunt-contrib-less": "~0.7.0",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-angular-templates": "~0.3.12",
"grunt-contrib-compress": "~0.5.2"
"grunt-contrib-uglify": "~0.2.4",
"grunt-git-describe": "~2.3.2",
"grunt-ng-annotate": "0.3.0",
"grunt-s3": "~0.2.0-alpha.2",
"grunt-string-replace": "~0.2.4",
"http-server": "^0.6.1",
"karma": "^0.12.16",
"karma-chrome-launcher": "^0.1.4",
"karma-firefox-launcher": "^0.1.3",
"karma-jasmine": "^0.1.5",
"karma-junit-reporter": "^0.2.2",
"karma-requirejs": "^0.2.2",
"protractor": "~1.0.0",
"requirejs": "^2.1.14",
"shelljs": "^0.2.6",
"tmp": "0.0.23"
},
"license": "Apache License"
"scripts": {
"postinstall": "bower install",

"prestart": "npm install",
"start": "http-server -a 0.0.0.0 -p 8000",

"pretest": "npm install",
"test": "node node_modules/karma/bin/karma start test/karma.conf.js",
"test-single-run": "node node_modules/karma/bin/karma start test/karma.conf.js --single-run",

"preupdate-webdriver": "npm install",
"update-webdriver": "webdriver-manager update",

"preprotractor": "npm run update-webdriver",
"protractor": "protractor test/protractor-conf.js",
"update-index-async": "node -e \"require('shelljs/global'); sed('-i', /\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/, '//@@NG_LOADER_START@@\\n' + cat('bower_components/angular-loader/angular-loader.min.js') + '\\n//@@NG_LOADER_END@@', 'app/index-async.html');\""
}
}
1 change: 1 addition & 0 deletions resources/banana-int-solr-4.5/banana-int/core.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name=banana-int
21 changes: 21 additions & 0 deletions src/app/components/kbn.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,27 @@ function($, _) {
};
};

/**
* Calculate range facet interval
*
* from:: Integer containing the start of range
* to:: Integer containing the end of range
* size:: Calculate to approximately this many bars
* user_interval:: User specified histogram interval
*
*/
kbn.calculate_gap = function(from,to,size,user_interval) {
return user_interval === 0 ? kbn.round_gap((to - from)/size) : user_interval;
};

/**
* Round the value of interval to fit this defined resolution
*
*/
kbn.round_gap = function(interval) {
return Math.round(interval) + 1;
};

/**
* Calculate a graph interval
*
Expand Down
1 change: 1 addition & 0 deletions src/app/components/require.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ require.config({
'jquery.flot.stack': '../vendor/jquery/jquery.flot.stack',
'jquery.flot.stackpercent':'../vendor/jquery/jquery.flot.stackpercent',
'jquery.flot.time': '../vendor/jquery/jquery.flot.time',
'showdown': '../vendor/showdown',

modernizr: '../vendor/modernizr-2.6.1',
elasticjs: '../vendor/elasticjs/elastic-angular-client',
Expand Down
2 changes: 1 addition & 1 deletion src/app/controllers/dash.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function (angular, config, _) {
};

$scope.setEditorTabs = function(panelMeta) {
$scope.editorTabs = ['General','Panel'];
$scope.editorTabs = ['General','Panel','Info'];
if(!_.isUndefined(panelMeta.editorTabs)) {
$scope.editorTabs = _.union($scope.editorTabs,_.pluck(panelMeta.editorTabs,'title'));
}
Expand Down
53 changes: 48 additions & 5 deletions src/app/controllers/dashLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,28 @@ function (angular, _) {
$scope.gist_pattern = /(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;
$scope.gist = $scope.gist || {};
$scope.elasticsearch = $scope.elasticsearch || {};
$scope.resetNewDefaults();
// $scope.elasticsearch is used throught out this file, dashLoader.html and others.
// So we'll keep using it for now before refactoring it to $scope.solr.
// $scope.solr = $scope.solr || {};
};

// This function should be replaced by one-way binding feature of AngularJS 1.3
$scope.resetNewDefaults = function() {
$scope.new = {
server: 'http://localhost:8983/solr/',
core_name: 'searchlogs',
time_field: 'event_timestamp'
};
};

$scope.showDropdown = function(type) {
// var _l = $scope.loader;
var _l = dashboard.current.loader || $scope.loader;

if(type === 'new') {
return (_l.load_elasticsearch || _l.load_gist || _l.load_local);
}
if(type === 'load') {
return (_l.load_elasticsearch || _l.load_gist || _l.load_local);
}
Expand All @@ -36,6 +49,36 @@ function (angular, _) {
}
return false;
};

$scope.create_new = function(type) {
$http.get('app/dashboards/' + type + '.json?' + new Date().getTime()).
success(function(data) {
data.solr.server = $scope.new.server;
data.solr.core_name = $scope.new.core_name;
// If time series dashboard, update all timefield references in the default dashboard
if (type === 'default-ts') {
data.services.filter.list[0].field = $scope.new.time_field;
// Iterate over panels and update timefield
for (var i = 0; i < data.rows.length; i++) {
for (var j = 0; j < data.rows[i].panels.length; j++) {
if (data.rows[i].panels[j].timefield) {
data.rows[i].panels[j].timefield = $scope.new.time_field;
} else if (data.rows[i].panels[j].time_field) {
data.rows[i].panels[j].time_field = $scope.new.time_field;
}
}
}
}

dashboard.dash_load(data);

// Reset new dashboard defaults
$scope.resetNewDefaults();
}).
error(function(data, status) {
alertSrv.set('Error','Unable to load default dashboard','error');
});
};

$scope.set_default = function() {
if(dashboard.set_default()) {
Expand All @@ -62,9 +105,9 @@ function (angular, _) {
function(result) {
if (DEBUG) { console.debug('dashLoader: result = ',result); }
// Solr
if(!_.isUndefined(result.response.docs[0].id)) {
alertSrv.set('Dashboard Saved','This dashboard has been saved to Solr as "' +
result.response.docs[0].id + '"','success',5000);
if(result.responseHeader.status === 0) {
alertSrv.set('Dashboard Saved','This dashboard has been saved to Solr as "' +
($scope.elasticsearch.title || dashboard.current.title) + '"','success',5000);
if(type === 'temp') {
$scope.share = dashboard.share_link(dashboard.current.title,'temp',result.response.docs[0].id);
}
Expand Down Expand Up @@ -96,9 +139,9 @@ function (angular, _) {
};

$scope.elasticsearch_dblist = function(query) {
dashboard.elasticsearch_list(query,$scope.loader.load_elasticsearch_size).then(
dashboard.elasticsearch_list(query,dashboard.current.loader.load_elasticsearch_size).then(
function(result) {
if (DEBUG) { console.debug("dashLoader: result=",result); }
if (DEBUG) { console.debug('dashLoader: result=',result); }
if (!_.isUndefined(result.response.docs)) {
$scope.hits = result.response.numFound;
$scope.elasticsearch.dashboards = result.response.docs;
Expand Down
Loading

0 comments on commit 5cbde97

Please sign in to comment.