You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2016/01/08 18:57:00 UTC
[17/52] [abbrv] [partial] qpid-dispatch git commit: DISPATCH-201 -
Adding console html/js/css files
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/d3/index.js
----------------------------------------------------------------------
diff --git a/console/bower_components/d3/index.js b/console/bower_components/d3/index.js
new file mode 100644
index 0000000..09a7325
--- /dev/null
+++ b/console/bower_components/d3/index.js
@@ -0,0 +1,23 @@
+var self = this,
+ globals = ["document", "window", "navigator", "CSSStyleDeclaration", "d3", "Sizzle"],
+ globalValues = {};
+
+globals.forEach(function(global) {
+ if (global in self) globalValues[global] = self[global];
+});
+
+document = require("jsdom").jsdom("<html><head></head><body></body></html>");
+window = document.createWindow();
+navigator = window.navigator;
+CSSStyleDeclaration = window.CSSStyleDeclaration;
+
+Sizzle = require("sizzle");
+
+require("./d3");
+
+module.exports = d3;
+
+globals.forEach(function(global) {
+ if (global in globalValues) self[global] = globalValues[global];
+ else delete self[global];
+});
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/.bower.json
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/.bower.json b/console/bower_components/elastic.js/.bower.json
new file mode 100644
index 0000000..5b5631e
--- /dev/null
+++ b/console/bower_components/elastic.js/.bower.json
@@ -0,0 +1,32 @@
+{
+ "name": "elastic.js",
+ "version": "1.1.1",
+ "description": "Javascript API for ElasticSearch",
+ "license": "MIT",
+ "keywords": [
+ "elasticsearch",
+ "search",
+ "elasticjs",
+ "elastic",
+ "elastic search",
+ "es",
+ "ejs"
+ ],
+ "main": "dist/elastic.js",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "components",
+ "docs"
+ ],
+ "homepage": "https://github.com/fullscale/elastic.js",
+ "_release": "1.1.1",
+ "_resolution": {
+ "type": "version",
+ "tag": "1.1.1",
+ "commit": "f4d4092287c2c3c56434aa12fd3af43eb186ae73"
+ },
+ "_source": "git://github.com/fullscale/elastic.js.git",
+ "_target": "1.1.1",
+ "_originalSource": "elastic.js"
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/AUTHORS
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/AUTHORS b/console/bower_components/elastic.js/AUTHORS
new file mode 100644
index 0000000..b918b0f
--- /dev/null
+++ b/console/bower_components/elastic.js/AUTHORS
@@ -0,0 +1,2 @@
+Matt Weber <ma...@fullscale.co>
+Eric Gaumer <er...@fullscale.co>
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/Gruntfile.js
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/Gruntfile.js b/console/bower_components/elastic.js/Gruntfile.js
new file mode 100644
index 0000000..c9094db
--- /dev/null
+++ b/console/bower_components/elastic.js/Gruntfile.js
@@ -0,0 +1,122 @@
+'use strict';
+
+module.exports = function (grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ meta: {
+ banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
+ '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
+ '<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
+ ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
+ ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n\n'
+ },
+ concat: {
+ options: {
+ banner: '<%= meta.banner %>'
+ },
+ dist: {
+ src: [
+ 'src/pre.js',
+ 'src/util.js',
+ 'src/facet/*.js',
+ 'src/filter/*.js',
+ 'src/index/*.js',
+ 'src/query/*.js',
+ 'src/admin/*.js',
+ 'src/search/**/*.js',
+ 'src/utils.js',
+ 'src/post.js'
+ ],
+ dest: 'dist/elastic.js'
+ },
+ client_node: {
+ src: [
+ 'src/clients/elastic-node-client.js'
+ ],
+ dest: 'dist/elastic-node-client.js'
+ },
+ client_jquery: {
+ src: [
+ 'src/clients/elastic-jquery-client.js'
+ ],
+ dest: 'dist/elastic-jquery-client.js'
+ },
+ client_extjs: {
+ src: [
+ 'src/clients/elastic-extjs-client.js'
+ ],
+ dest: 'dist/elastic-extjs-client.js'
+ },
+ client_angular: {
+ src: [
+ 'src/clients/elastic-angular-client.js'
+ ],
+ dest: 'dist/elastic-angular-client.js'
+ }
+ },
+ uglify: {
+ options: {
+ banner: '<%= meta.banner %>',
+ ascii_only: true
+ },
+ dist: {
+ src: ['<%= concat.dist.dest %>'],
+ dest: 'dist/elastic.min.js'
+ },
+ client_jquery: {
+ src: ['src/clients/elastic-jquery-client.js'],
+ dest: 'dist/elastic-jquery-client.min.js'
+ },
+ client_extjs: {
+ src: ['src/clients/elastic-extjs-client.js'],
+ dest: 'dist/elastic-extjs-client.min.js'
+ },
+ client_angular: {
+ src: ['src/clients/elastic-angular-client.js'],
+ dest: 'dist/elastic-angular-client.min.js'
+ }
+ },
+ nodeunit: {
+ files: ['tests/**/*.js']
+ },
+ jshint: {
+ options: {
+ bitwise: true,
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ indent: 2,
+ latedef: true,
+ newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ boss: true,
+ eqnull: true,
+ globalstrict: true,
+ globals: {
+ exports: true,
+ module: false
+ }
+ },
+ files: [
+ 'Gruntfile.js',
+ '<%= concat.dist.dest %>',
+ 'tests/**/*.js',
+ 'src/clients/*.js'
+ ]
+ }
+ });
+
+ // load plugins
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-nodeunit');
+
+ // Default task.
+ grunt.registerTask('default', ['concat', 'jshint', 'nodeunit', 'uglify']);
+
+};
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/LICENSE-MIT
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/LICENSE-MIT b/console/bower_components/elastic.js/LICENSE-MIT
new file mode 100644
index 0000000..3c9404d
--- /dev/null
+++ b/console/bower_components/elastic.js/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2012 FullScale Labs, LLC
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/README.md
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/README.md b/console/bower_components/elastic.js/README.md
new file mode 100644
index 0000000..86f1ed3
--- /dev/null
+++ b/console/bower_components/elastic.js/README.md
@@ -0,0 +1,42 @@
+# elastic.js
+
+A JavaScript implementation of the [ElasticSearch](http://www.elasticsearch.org/) Query [DSL](http://www.elasticsearch.org/guide/reference/query-dsl/) and Core API.
+
+## Documentation
+You can find the official documentation at the following locations:
+
+- [User Guide](http://www.fullscale.co/elasticjs)
+- [API Documentation](http://docs.fullscale.co/elasticjs/)
+
+You will also be able to find unofficial documentation and examples on on our
+[blog](http://www.fullscale.co/blog/) and GitHub Gist pages [here](https://gist.github.com/mattweber)
+and [here](https://gist.github.com/egaumer).
+
+## Examples
+You can find some basic examples in the `examples` directory. To run the examples you need to
+have node.js installed and have built elastic.js from source. Start an instance of ElasticSearch
+using the default settings so it is available at [localhost:9200](http://localhost:9200/).
+
+### Angular and jQuery Examples
+These examples need to served from a web server. We have provided a very basic web server written
+in Node.js for this purpose.
+
+1. Navigate to the `examples` directory.
+2. Run server.js: `node server.js`.
+3. Open [Angular Example](http://localhost:8125/angular/) or [jQuery Example](http://localhost:8125/jquery/).
+
+### Node.js Example
+The Node.js example is a basic command line tool that accepts a set of query terms, executes the query,
+and prints the results.
+
+1. Install required modules with `npm install`.
+2. Run _findtweets.js_ with your query terms: `node findtweets.js elas*`
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](http://gruntjs.com/).
+
+_Also, please don't edit elastic.js and elastic.min.js files as they are generated via grunt. You'll find source code in the "src" subdirectory!_
+
+## License
+Copyright (c) 2012 FullScale Labs, LLC
+Licensed under the MIT license.
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/bower.json
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/bower.json b/console/bower_components/elastic.js/bower.json
new file mode 100644
index 0000000..b04e70a
--- /dev/null
+++ b/console/bower_components/elastic.js/bower.json
@@ -0,0 +1,22 @@
+{
+ "name": "elastic.js",
+ "version": "1.1.1",
+ "description": "Javascript API for ElasticSearch",
+ "license": "MIT",
+ "keywords": [
+ "elasticsearch",
+ "search",
+ "elasticjs",
+ "elastic",
+ "elastic search",
+ "es",
+ "ejs"
+ ],
+ "main": "dist/elastic.js",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "components",
+ "docs"
+ ]
+}
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/dist/elastic-angular-client.js
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/dist/elastic-angular-client.js b/console/bower_components/elastic.js/dist/elastic-angular-client.js
new file mode 100644
index 0000000..c21cab0
--- /dev/null
+++ b/console/bower_components/elastic.js/dist/elastic-angular-client.js
@@ -0,0 +1,94 @@
+/*! elastic.js - v1.1.1 - 2013-05-24
+ * https://github.com/fullscale/elastic.js
+ * Copyright (c) 2013 FullScale Labs, LLC; Licensed MIT */
+
+/*jshint browser:true */
+/*global angular:true */
+'use strict';
+
+/*
+Angular.js service wrapping the elastic.js API. This module can simply
+be injected into your angular controllers.
+*/
+angular.module('elasticjs.service', [])
+ .factory('ejsResource', ['$http', function ($http) {
+
+ return function (config) {
+
+ var
+
+ // use existing ejs object if it exists
+ ejs = window.ejs || {},
+
+ /* results are returned as a promise */
+ promiseThen = function (httpPromise, successcb, errorcb) {
+ return httpPromise.then(function (response) {
+ (successcb || angular.noop)(response.data);
+ return response.data;
+ }, function (response) {
+ (errorcb || angular.noop)(response.data);
+ return response.data;
+ });
+ };
+
+ // check if we have a config object
+ // if not, we have the server url so
+ // we convert it to a config object
+ if (config !== Object(config)) {
+ config = {server: config};
+ }
+
+ // set url to empty string if it was not specified
+ if (config.server == null) {
+ config.server = '';
+ }
+
+ /* implement the elastic.js client interface for angular */
+ ejs.client = {
+ server: function (s) {
+ if (s == null) {
+ return config.server;
+ }
+
+ config.server = s;
+ return this;
+ },
+ post: function (path, data, successcb, errorcb) {
+ path = config.server + path;
+ var reqConfig = {url: path, data: data, method: 'POST'};
+ return promiseThen($http(angular.extend(reqConfig, config)), successcb, errorcb);
+ },
+ get: function (path, data, successcb, errorcb) {
+ path = config.server + path;
+ // no body on get request, data will be request params
+ var reqConfig = {url: path, params: data, method: 'GET'};
+ return promiseThen($http(angular.extend(reqConfig, config)), successcb, errorcb);
+ },
+ put: function (path, data, successcb, errorcb) {
+ path = config.server + path;
+ var reqConfig = {url: path, data: data, method: 'PUT'};
+ return promiseThen($http(angular.extend(reqConfig, config)), successcb, errorcb);
+ },
+ del: function (path, data, successcb, errorcb) {
+ path = config.server + path;
+ var reqConfig = {url: path, data: data, method: 'DELETE'};
+ return promiseThen($http(angular.extend(reqConfig, config)), successcb, errorcb);
+ },
+ head: function (path, data, successcb, errorcb) {
+ path = config.server + path;
+ // no body on HEAD request, data will be request params
+ var reqConfig = {url: path, params: data, method: 'HEAD'};
+ return $http(angular.extend(reqConfig, config))
+ .then(function (response) {
+ (successcb || angular.noop)(response.headers());
+ return response.headers();
+ }, function (response) {
+ (errorcb || angular.noop)(undefined);
+ return undefined;
+ });
+ }
+ };
+
+ return ejs;
+ };
+}]);
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/dist/elastic-angular-client.min.js
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/dist/elastic-angular-client.min.js b/console/bower_components/elastic.js/dist/elastic-angular-client.min.js
new file mode 100644
index 0000000..fc797ef
--- /dev/null
+++ b/console/bower_components/elastic.js/dist/elastic-angular-client.min.js
@@ -0,0 +1,5 @@
+/*! elastic.js - v1.1.1 - 2013-05-24
+ * https://github.com/fullscale/elastic.js
+ * Copyright (c) 2013 FullScale Labs, LLC; Licensed MIT */
+
+"use strict";angular.module("elasticjs.service",[]).factory("ejsResource",["$http",function(a){return function(b){var c=window.ejs||{},d=function(a,b,c){return a.then(function(a){return(b||angular.noop)(a.data),a.data},function(a){return(c||angular.noop)(a.data),a.data})};return b!==Object(b)&&(b={server:b}),null==b.server&&(b.server=""),c.client={server:function(a){return null==a?b.server:(b.server=a,this)},post:function(c,e,f,g){c=b.server+c;var h={url:c,data:e,method:"POST"};return d(a(angular.extend(h,b)),f,g)},get:function(c,e,f,g){c=b.server+c;var h={url:c,params:e,method:"GET"};return d(a(angular.extend(h,b)),f,g)},put:function(c,e,f,g){c=b.server+c;var h={url:c,data:e,method:"PUT"};return d(a(angular.extend(h,b)),f,g)},del:function(c,e,f,g){c=b.server+c;var h={url:c,data:e,method:"DELETE"};return d(a(angular.extend(h,b)),f,g)},head:function(c,d,e,f){c=b.server+c;var g={url:c,params:d,method:"HEAD"};return a(angular.extend(g,b)).then(function(a){return(e||angular.noop)(a.head
ers()),a.headers()},function(){return(f||angular.noop)(void 0),void 0})}},c}}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/dist/elastic-extjs-client.js
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/dist/elastic-extjs-client.js b/console/bower_components/elastic.js/dist/elastic-extjs-client.js
new file mode 100644
index 0000000..4ff66c5
--- /dev/null
+++ b/console/bower_components/elastic.js/dist/elastic-extjs-client.js
@@ -0,0 +1,275 @@
+/*! elastic.js - v1.1.1 - 2013-05-24
+ * https://github.com/fullscale/elastic.js
+ * Copyright (c) 2013 FullScale Labs, LLC; Licensed MIT */
+
+/*global Ext:true */
+
+(function () {
+ 'use strict';
+
+ var
+
+ // save reference to global object
+ // `window` in browser
+ // `exports` on server
+ root = this,
+ ejs;
+
+ // create namespace
+ // use existing ejs object if it exists
+ if (typeof exports !== 'undefined') {
+ ejs = exports;
+ } else {
+ if (root.ejs == null) {
+ ejs = root.ejs = {};
+ } else {
+ ejs = root.ejs;
+ }
+ }
+
+ /**
+ @class
+ A <code>ExtJSClient</code> is a type of <code>client</code> that uses
+ ExtJS for communication with ElasticSearch.
+
+ @name ejs.ExtJSClient
+
+ @desc
+ A client that uses ExtJS for communication.
+
+ @param {String} server the ElasticSearch server location. Leave blank if
+ code is running on the same server as ElasticSearch, ie. in a plugin.
+ An example server is http://localhost:9200/.
+ */
+ ejs.ExtJSClient = function (server) {
+
+ // make sure CORS support is enabled
+ Ext.Ajax.cors = true;
+
+ var
+
+ // extjs ajax request defaults
+ options = {
+ headers: {'Content-Type': 'application/json'}
+ },
+
+ // method to ensure the path always starts with a slash
+ getPath = function (path) {
+ if (path.charAt(0) !== '/') {
+ path = '/' + path;
+ }
+
+ return server + path;
+ },
+
+ // decodes ElasticSearch json response to actual object and call
+ // the user's callback with the json object.
+ wrapCb = function (cb) {
+ return function (response) {
+ var jsonResp = Ext.JSON.decode(response.responseText);
+ if (cb != null) {
+ cb(jsonResp);
+ }
+ };
+ };
+
+
+ // check that the server path does no end with a slash
+ if (server == null) {
+ server = '';
+ } else if (server.charAt(server.length - 1) === '/') {
+ server = server.substring(0, server.length - 1);
+ }
+
+ return {
+
+
+ /**
+ Sets the ElasticSearch server location.
+
+ @member ejs.ExtJSClient
+ @param {String} server The server url
+ @returns {Object} returns <code>this</code> so that calls can be
+ chained. Returns {String} current value if `server` is not specified.
+ */
+ server: function (s) {
+ if (s == null) {
+ return server;
+ }
+
+ if (s.charAt(s.length - 1) === '/') {
+ server = s.substring(0, s.length - 1);
+ } else {
+ server = s;
+ }
+
+ return this;
+ },
+
+ /**
+ Sets a ExtJS ajax request option.
+
+ @member ejs.ExtJSClient
+ @param {String} oKey The option name
+ @param {String} oVal The option value
+ @returns {Object} returns <code>this</code> so that calls can be
+ chained. Returns the current value of oKey if oVal is not set.
+ */
+ option: function (oKey, oVal) {
+ if (oKey == null) {
+ return options;
+ }
+
+ if (oVal == null) {
+ return options[oKey];
+ }
+
+ options[oKey] = oVal;
+ },
+
+ /**
+ Performs HTTP GET requests against the server.
+
+ @member ejs.ExtJSClient
+ @param {String} path the path to GET from the server
+ @param {Object} data an object of url parameters for the request
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} returns ExtJS request object.
+ */
+ get: function (path, data, successcb, errorcb) {
+ var opt = Ext.apply({}, options);
+
+ opt.method = 'GET';
+ opt.url = getPath(path);
+ opt.params = data;
+ opt.success = wrapCb(successcb);
+ opt.failure = errorcb;
+
+ return Ext.Ajax.request(opt);
+ },
+
+ /**
+ Performs HTTP POST requests against the server.
+
+ @member ejs.ExtJSClient
+ @param {String} path the path to POST to on the server
+ @param {String} data the POST body
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} returns ExtJS request object.
+ */
+ post: function (path, data, successcb, errorcb) {
+ var opt = Ext.apply({}, options);
+
+ opt.method = 'POST';
+ opt.url = getPath(path);
+ opt.jsonData = data;
+ opt.success = wrapCb(successcb);
+ opt.failure = errorcb;
+
+ return Ext.Ajax.request(opt);
+ },
+
+ /**
+ Performs HTTP PUT requests against the server.
+
+ @member ejs.ExtJSClient
+ @param {String} path the path to PUT to on the server
+ @param {String} data the PUT body
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} returns ExtJS request object.
+ */
+ put: function (path, data, successcb, errorcb) {
+ var opt = Ext.apply({}, options);
+
+ opt.method = 'PUT';
+ opt.url = getPath(path);
+ opt.jsonData = data;
+ opt.success = wrapCb(successcb);
+ opt.failure = errorcb;
+
+ return Ext.Ajax.request(opt);
+ },
+
+ /**
+ Performs HTTP DELETE requests against the server.
+
+ @member ejs.ExtJSClient
+ @param {String} path the path to DELETE to on the server
+ @param {String} data the DELETE body
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} returns ExtJS request object.
+ */
+ del: function (path, data, successcb, errorcb) {
+ var opt = Ext.apply({}, options);
+
+ opt.method = 'DELETE';
+ opt.url = getPath(path);
+ opt.jsonData = data;
+ opt.success = wrapCb(successcb);
+ opt.failure = errorcb;
+
+ return Ext.Ajax.request(opt);
+ },
+
+ /**
+ Performs HTTP HEAD requests against the server. Same as
+ <code>get</code>, except only returns headers.
+
+ @member ejs.ExtJSClient
+ @param {String} path the path to HEAD to on the server
+ @param {Object} data an object of url parameters.
+ @param {Function} successcb a callback function that will be called with
+ the an object of the returned headers.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} ExtJS request object.
+ */
+ head: function (path, data, successcb, errorcb) {
+ var opt = Ext.apply({}, options);
+
+ opt.method = 'HEAD';
+ opt.url = getPath(path);
+ opt.params = data;
+ opt.failure = errorcb;
+ opt.callback = function (options, success, xhr) {
+
+ // only process on success
+ if (!success) {
+ return;
+ }
+
+ var headers = xhr.getAllResponseHeaders().split('\n'),
+ resp = {},
+ parts,
+ i;
+
+ for (i = 0; i < headers.length; i++) {
+ parts = headers[i].split(':');
+ if (parts.length !== 2) {
+ resp[parts[0]] = parts[1];
+ }
+ }
+
+ if (successcb != null) {
+ successcb(resp);
+ }
+ };
+
+ return Ext.Ajax.request(opt);
+ }
+ };
+ };
+
+}).call(this);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/dist/elastic-extjs-client.min.js
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/dist/elastic-extjs-client.min.js b/console/bower_components/elastic.js/dist/elastic-extjs-client.min.js
new file mode 100644
index 0000000..c326519
--- /dev/null
+++ b/console/bower_components/elastic.js/dist/elastic-extjs-client.min.js
@@ -0,0 +1,5 @@
+/*! elastic.js - v1.1.1 - 2013-05-24
+ * https://github.com/fullscale/elastic.js
+ * Copyright (c) 2013 FullScale Labs, LLC; Licensed MIT */
+
+!function(){"use strict";var a,b=this;a="undefined"!=typeof exports?exports:null==b.ejs?b.ejs={}:b.ejs,a.ExtJSClient=function(a){Ext.Ajax.cors=!0;var b={headers:{"Content-Type":"application/json"}},c=function(b){return"/"!==b.charAt(0)&&(b="/"+b),a+b},d=function(a){return function(b){var c=Ext.JSON.decode(b.responseText);null!=a&&a(c)}};return null==a?a="":"/"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),{server:function(b){return null==b?a:(a="/"===b.charAt(b.length-1)?b.substring(0,b.length-1):b,this)},option:function(a,c){return null==a?b:null==c?b[a]:(b[a]=c,void 0)},get:function(a,e,f,g){var h=Ext.apply({},b);return h.method="GET",h.url=c(a),h.params=e,h.success=d(f),h.failure=g,Ext.Ajax.request(h)},post:function(a,e,f,g){var h=Ext.apply({},b);return h.method="POST",h.url=c(a),h.jsonData=e,h.success=d(f),h.failure=g,Ext.Ajax.request(h)},put:function(a,e,f,g){var h=Ext.apply({},b);return h.method="PUT",h.url=c(a),h.jsonData=e,h.success=d(f),h.failure=g,Ext.Ajax.request(
h)},del:function(a,e,f,g){var h=Ext.apply({},b);return h.method="DELETE",h.url=c(a),h.jsonData=e,h.success=d(f),h.failure=g,Ext.Ajax.request(h)},head:function(a,d,e,f){var g=Ext.apply({},b);return g.method="HEAD",g.url=c(a),g.params=d,g.failure=f,g.callback=function(a,b,c){if(b){var d,f,g=c.getAllResponseHeaders().split("\n"),h={};for(f=0;f<g.length;f++)d=g[f].split(":"),2!==d.length&&(h[d[0]]=d[1]);null!=e&&e(h)}},Ext.Ajax.request(g)}}}}.call(this);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/dist/elastic-jquery-client.js
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/dist/elastic-jquery-client.js b/console/bower_components/elastic.js/dist/elastic-jquery-client.js
new file mode 100644
index 0000000..149ba74
--- /dev/null
+++ b/console/bower_components/elastic.js/dist/elastic-jquery-client.js
@@ -0,0 +1,261 @@
+/*! elastic.js - v1.1.1 - 2013-05-24
+ * https://github.com/fullscale/elastic.js
+ * Copyright (c) 2013 FullScale Labs, LLC; Licensed MIT */
+
+/*jshint jquery:true */
+
+(function () {
+ 'use strict';
+
+ var
+
+ // save reference to global object
+ // `window` in browser
+ // `exports` on server
+ root = this,
+ ejs;
+
+ // create namespace
+ // use existing ejs object if it exists
+ if (typeof exports !== 'undefined') {
+ ejs = exports;
+ } else {
+ if (root.ejs == null) {
+ ejs = root.ejs = {};
+ } else {
+ ejs = root.ejs;
+ }
+ }
+
+ /**
+ @class
+ A <code>jQueryClient</code> is a type of <code>client</code> that uses
+ jQuery for communication with ElasticSearch.
+
+ @name ejs.jQueryClient
+
+ @desc
+ A client that uses jQuery for communication.
+
+ @param {String} server the ElasticSearch server location. Leave blank if
+ code is running on the same server as ElasticSearch, ie. in a plugin.
+ An example server is http://localhost:9200/.
+ */
+ ejs.jQueryClient = function (server) {
+ var
+
+ // jQuery defaults
+ options = {
+ contentType: 'application/json',
+ dataType: 'json',
+ processData: false
+ },
+
+ // method to ensure the path always starts with a slash
+ getPath = function (path) {
+ if (path.charAt(0) !== '/') {
+ path = '/' + path;
+ }
+
+ return server + path;
+ };
+
+
+ // check that the server path does no end with a slash
+ if (server == null) {
+ server = '';
+ } else if (server.charAt(server.length - 1) === '/') {
+ server = server.substring(0, server.length - 1);
+ }
+
+ return {
+
+
+ /**
+ Sets the ElasticSearch server location.
+
+ @member ejs.jQueryClient
+ @param {String} server The server url
+ @returns {Object} returns <code>this</code> so that calls can be
+ chained. Returns {String} current value if `server` is not specified.
+ */
+ server: function (s) {
+ if (s == null) {
+ return server;
+ }
+
+ if (s.charAt(s.length - 1) === '/') {
+ server = s.substring(0, s.length - 1);
+ } else {
+ server = s;
+ }
+
+ return this;
+ },
+
+ /**
+ Sets a jQuery ajax option.
+
+ @member ejs.jQueryClient
+ @param {String} oKey The option name
+ @param {String} oVal The option value
+ @returns {Object} returns <code>this</code> so that calls can be
+ chained. Returns the current value of oKey if oVal is not set.
+ */
+ option: function (oKey, oVal) {
+ if (oKey == null) {
+ return options;
+ }
+
+ if (oVal == null) {
+ return options[oKey];
+ }
+
+ options[oKey] = oVal;
+ },
+
+ /**
+ Performs HTTP GET requests against the server.
+
+ @member ejs.jQueryClient
+ @param {String} path the path to GET from the server
+ @param {Object} data an object of url parameters for the request
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} returns jQuery <code>jqXHR</code> for the request.
+ */
+ get: function (path, data, successcb, errorcb) {
+ var opt = jQuery.extend({}, options);
+
+ opt.type = 'GET';
+ opt.url = getPath(path);
+ opt.data = data;
+ opt.success = successcb;
+ opt.error = errorcb;
+
+ return jQuery.ajax(opt);
+ },
+
+ /**
+ Performs HTTP POST requests against the server.
+
+ @member ejs.jQueryClient
+ @param {String} path the path to POST to on the server
+ @param {String} data the POST body
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} returns jQuery <code>jqXHR</code> for the request.
+ */
+ post: function (path, data, successcb, errorcb) {
+ var opt = jQuery.extend({}, options);
+
+ opt.type = 'POST';
+ opt.url = getPath(path);
+ opt.data = data;
+ opt.success = successcb;
+ opt.error = errorcb;
+
+ return jQuery.ajax(opt);
+ },
+
+ /**
+ Performs HTTP PUT requests against the server.
+
+ @member ejs.jQueryClient
+ @param {String} path the path to PUT to on the server
+ @param {String} data the PUT body
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} returns jQuery <code>jqXHR</code> for the request.
+ */
+ put: function (path, data, successcb, errorcb) {
+ var opt = jQuery.extend({}, options);
+
+ opt.type = 'PUT';
+ opt.url = getPath(path);
+ opt.data = data;
+ opt.success = successcb;
+ opt.error = errorcb;
+
+ return jQuery.ajax(opt);
+ },
+
+ /**
+ Performs HTTP DELETE requests against the server.
+
+ @member ejs.jQueryClient
+ @param {String} path the path to DELETE to on the server
+ @param {String} data the DELETE body
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} returns jQuery <code>jqXHR</code> for the request.
+ */
+ del: function (path, data, successcb, errorcb) {
+ var opt = jQuery.extend({}, options);
+
+ opt.type = 'DELETE';
+ opt.url = getPath(path);
+ opt.data = data;
+ opt.success = successcb;
+ opt.error = errorcb;
+
+ return jQuery.ajax(opt);
+ },
+
+ /**
+ Performs HTTP HEAD requests against the server. Same as
+ <code>get</code>, except only returns headers.
+
+ @member ejs.jQueryClient
+ @param {String} path the path to HEAD to on the server
+ @param {Object} data an object of url parameters.
+ @param {Function} successcb a callback function that will be called with
+ the an object of the returned headers.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ @returns {Object} returns jQuery <code>jqXHR</code> for the request.
+ */
+ head: function (path, data, successcb, errorcb) {
+ var opt = jQuery.extend({}, options);
+
+ opt.type = 'HEAD';
+ opt.url = getPath(path);
+ opt.data = data;
+ opt.error = errorcb;
+ opt.complete = function (jqXHR, textStatus) {
+ // only parse headers on success
+ if (textStatus !== 'success') {
+ return;
+ }
+
+ var headers = jqXHR.getAllResponseHeaders().split('\n'),
+ resp = {},
+ parts,
+ i;
+
+ for (i = 0; i < headers.length; i++) {
+ parts = headers[i].split(':');
+ if (parts.length !== 2) {
+ resp[parts[0]] = parts[1];
+ }
+ }
+
+ if (successcb != null) {
+ successcb(resp);
+ }
+ };
+
+ return jQuery.ajax(opt);
+ }
+ };
+ };
+
+}).call(this);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/dist/elastic-jquery-client.min.js
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/dist/elastic-jquery-client.min.js b/console/bower_components/elastic.js/dist/elastic-jquery-client.min.js
new file mode 100644
index 0000000..15a1b09
--- /dev/null
+++ b/console/bower_components/elastic.js/dist/elastic-jquery-client.min.js
@@ -0,0 +1,5 @@
+/*! elastic.js - v1.1.1 - 2013-05-24
+ * https://github.com/fullscale/elastic.js
+ * Copyright (c) 2013 FullScale Labs, LLC; Licensed MIT */
+
+!function(){"use strict";var a,b=this;a="undefined"!=typeof exports?exports:null==b.ejs?b.ejs={}:b.ejs,a.jQueryClient=function(a){var b={contentType:"application/json",dataType:"json",processData:!1},c=function(b){return"/"!==b.charAt(0)&&(b="/"+b),a+b};return null==a?a="":"/"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),{server:function(b){return null==b?a:(a="/"===b.charAt(b.length-1)?b.substring(0,b.length-1):b,this)},option:function(a,c){return null==a?b:null==c?b[a]:(b[a]=c,void 0)},get:function(a,d,e,f){var g=jQuery.extend({},b);return g.type="GET",g.url=c(a),g.data=d,g.success=e,g.error=f,jQuery.ajax(g)},post:function(a,d,e,f){var g=jQuery.extend({},b);return g.type="POST",g.url=c(a),g.data=d,g.success=e,g.error=f,jQuery.ajax(g)},put:function(a,d,e,f){var g=jQuery.extend({},b);return g.type="PUT",g.url=c(a),g.data=d,g.success=e,g.error=f,jQuery.ajax(g)},del:function(a,d,e,f){var g=jQuery.extend({},b);return g.type="DELETE",g.url=c(a),g.data=d,g.success=e,g.error=f,jQ
uery.ajax(g)},head:function(a,d,e,f){var g=jQuery.extend({},b);return g.type="HEAD",g.url=c(a),g.data=d,g.error=f,g.complete=function(a,b){if("success"===b){var c,d,f=a.getAllResponseHeaders().split("\n"),g={};for(d=0;d<f.length;d++)c=f[d].split(":"),2!==c.length&&(g[c[0]]=c[1]);null!=e&&e(g)}},jQuery.ajax(g)}}}}.call(this);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c9a22b4/console/bower_components/elastic.js/dist/elastic-node-client.js
----------------------------------------------------------------------
diff --git a/console/bower_components/elastic.js/dist/elastic-node-client.js b/console/bower_components/elastic.js/dist/elastic-node-client.js
new file mode 100644
index 0000000..19a9aad
--- /dev/null
+++ b/console/bower_components/elastic.js/dist/elastic-node-client.js
@@ -0,0 +1,325 @@
+/*! elastic.js - v1.1.1 - 2013-05-24
+ * https://github.com/fullscale/elastic.js
+ * Copyright (c) 2013 FullScale Labs, LLC; Licensed MIT */
+
+/*global require:true */
+
+(function () {
+ 'use strict';
+
+ var
+
+ // node imports
+ http = require('http'),
+ querystring = require('querystring'),
+
+ // save reference to global object
+ // `window` in browser
+ // `exports` on server
+ root = this,
+ ejs;
+
+ // create namespace
+ // use existing ejs object if it exists
+ if (typeof exports !== 'undefined') {
+ ejs = exports;
+ } else {
+ if (root.ejs == null) {
+ ejs = root.ejs = {};
+ } else {
+ ejs = root.ejs;
+ }
+ }
+
+ /**
+ @class
+ A <code>NodeClient</code> is a type of <code>client</code> that uses
+ NodeJS http module for communication with ElasticSearch.
+
+ @name ejs.NodeClient
+
+ @desc
+ A client that uses the NodeJS http module for communication.
+
+ @param {String} host the hostname of your ElasticSearch server. ie. localhost
+ @param {String} post the post of your ElasticSearch server. ie. 9200
+ */
+ ejs.NodeClient = function (host, port) {
+ var
+
+ // method to ensure the path always starts with a slash
+ getPath = function (path) {
+ if (path.charAt(0) !== '/') {
+ path = '/' + path;
+ }
+
+ return path;
+ };
+
+ return {
+
+ /**
+ Sets the ElasticSearch host.
+
+ @member ejs.NodeClient
+ @param {String} h the hostname of the ElasticSearch server
+ @returns {Object} returns <code>this</code> so that calls can be
+ chained. Returns {String} current value if `h` is not specified.
+ */
+ host: function (h) {
+ if (h == null) {
+ return host;
+ }
+
+ host = h;
+ return this;
+ },
+
+ /**
+ Sets the ElasticSearch port.
+
+ @member ejs.NodeClient
+ @param {String} p the port of the ElasticSearch server
+ @returns {Object} returns <code>this</code> so that calls can be
+ chained. Returns {String} current value if `p` is not specified.
+ */
+ port: function (p) {
+ if (p == null) {
+ return port;
+ }
+
+ port = p;
+ return this;
+ },
+
+ /**
+ Performs HTTP GET requests against the server.
+
+ @member ejs.NodeClient
+ @param {String} path the path to GET from the server
+ @param {Object} data an object of url parameters for the request
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ */
+ get: function (path, data, successcb, errorcb) {
+ var
+
+ opt = {
+ host: host,
+ port: port,
+ path: path + '?' + querystring.stringify(data),
+ method: 'GET'
+ },
+
+ req = http.request(opt, function (res) {
+ var resData = '';
+ res.setEncoding('utf8');
+
+ res.on('data', function (chunk) {
+ resData = resData + chunk;
+ });
+
+ res.on('end', function () {
+ if (successcb != null) {
+ successcb(JSON.parse(resData));
+ }
+ });
+
+ });
+
+ // handle request errors
+ if (errorcb != null) {
+ req.on('error', errorcb);
+ }
+
+ req.end();
+ },
+
+ /**
+ Performs HTTP POST requests against the server.
+
+ @member ejs.NodeClient
+ @param {String} path the path to POST to on the server
+ @param {String} data the POST body
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ */
+ post: function (path, data, successcb, errorcb) {
+ var
+
+ opt = {
+ host: host,
+ port: port,
+ path: path,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ },
+
+ req = http.request(opt, function (res) {
+ var resData = '';
+ res.setEncoding('utf8');
+
+ res.on('data', function (chunk) {
+ resData = resData + chunk;
+ });
+
+ res.on('end', function () {
+ if (successcb != null) {
+ successcb(JSON.parse(resData));
+ }
+ });
+
+ });
+
+ // handle request errors
+ if (errorcb != null) {
+ req.on('error', errorcb);
+ }
+
+ req.write(data);
+ req.end();
+ },
+
+ /**
+ Performs HTTP PUT requests against the server.
+
+ @member ejs.NodeClient
+ @param {String} path the path to PUT to on the server
+ @param {String} data the PUT body
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ */
+ put: function (path, data, successcb, errorcb) {
+ var
+
+ opt = {
+ host: host,
+ port: port,
+ path: path,
+ method: 'PUT',
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ },
+
+ req = http.request(opt, function (res) {
+ var resData = '';
+ res.setEncoding('utf8');
+
+ res.on('data', function (chunk) {
+ resData = resData + chunk;
+ });
+
+ res.on('end', function () {
+ if (successcb != null) {
+ successcb(JSON.parse(resData));
+ }
+ });
+
+ });
+
+ // handle request errors
+ if (errorcb != null) {
+ req.on('error', errorcb);
+ }
+
+ req.write(data);
+ req.end();
+ },
+
+ /**
+ Performs HTTP DELETE requests against the server.
+
+ @member ejs.NodeClient
+ @param {String} path the path to DELETE to on the server
+ @param {String} data the DELETE body
+ @param {Function} successcb a callback function that will be called with
+ the results of the request.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ */
+ del: function (path, data, successcb, errorcb) {
+ var
+
+ opt = {
+ host: host,
+ port: port,
+ path: path,
+ method: 'DELETE',
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ },
+
+ req = http.request(opt, function (res) {
+ var resData = '';
+ res.setEncoding('utf8');
+
+ res.on('data', function (chunk) {
+ resData = resData + chunk;
+ });
+
+ res.on('end', function () {
+ if (successcb != null) {
+ successcb(JSON.parse(resData));
+ }
+ });
+
+ });
+
+ // handle request errors
+ if (errorcb != null) {
+ req.on('error', errorcb);
+ }
+
+ req.write(data);
+ req.end();
+ },
+
+ /**
+ Performs HTTP HEAD requests against the server. Same as
+ <code>get</code>, except only returns headers.
+
+ @member ejs.NodeClient
+ @param {String} path the path to HEAD to on the server
+ @param {Object} data an object of url parameters.
+ @param {Function} successcb a callback function that will be called with
+ the an object of the returned headers.
+ @param {Function} errorcb a callback function that will be called
+ when there is an error with the request
+ */
+ head: function (path, data, successcb, errorcb) {
+ var
+
+ opt = {
+ host: host,
+ port: port,
+ path: path + '?' + querystring.stringify(data),
+ method: 'HEAD'
+ },
+
+ req = http.request(opt, function (res) {
+ if (successcb != null) {
+ successcb(res.headers);
+ }
+ });
+
+ // handle request errors
+ if (errorcb != null) {
+ req.on('error', errorcb);
+ }
+
+ req.end();
+ }
+ };
+ };
+
+}).call(this);
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org