summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test')
-rw-r--r--sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/demo.html34
-rwxr-xr-xsdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/conflictingField.sh50
-rw-r--r--sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/delete_all_indices.sh6
-rwxr-xr-xsdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/multi_type.sh75
-rwxr-xr-xsdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/twitter_feed.sh45
-rwxr-xr-xsdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/twitter_river.sh28
-rw-r--r--sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/perf.html54
-rw-r--r--sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/spec/specHelper.js96
8 files changed, 0 insertions, 388 deletions
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/demo.html b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/demo.html
deleted file mode 100644
index 333a92047..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/demo.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-
-<html>
- <head>
- <meta charset="UTF-8">
- <title>Elasticsearch UI Demo</title>
- <link rel="stylesheet" href="../_site/base/reset.css">
- <link rel="stylesheet" href="../_site/app.css">
- <script src="../_site/i18n.js" data-baseDir="../_site/lang" data-langs="en,fr"></script>
- <script src="../_site/vendor.js"></script>
- <script src="../_site/app.js"></script>
- <script>
- $( function() {
- var args = location.search.substring(1).split("&").reduce(function(r, p) {
- r[decodeURIComponent(p.split("=")[0])] = decodeURIComponent(p.split("=")[1]); return r;
- }, {});
- var script0 = document.getElementsByTagName('script')[0];
- var s = document.createElement("script");
- s.src = '../src/' + args['demo'];
- s.onload = function() {
- $("body").append(
- { tag: "DIV", children: [
- window.builder()
- ] }
- );
- }
- script0.parentNode.insertBefore(s, script0);
- document.title = args['demo'].match(/([^\/]+)(\.js)$/)[1]
- } );
- </script>
- <link rel="icon" href="../_site/app/favicon.png" type="image/png">
- </head>
- <body></body>
-</html>
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/conflictingField.sh b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/conflictingField.sh
deleted file mode 100755
index 917d896ca..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/conflictingField.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-curl -XDELETE 'http://localhost:9200/conflicting_field_type'
-echo
-curl -XPUT 'http://localhost:9200/conflicting_field_type'
-echo
-curl -XPUT 'http://localhost:9200/conflicting_field_type/map1/_mapping' -d '{
- "map1": {
- "date_formats": ["date_time", "yyyyMMddHHmmss", "yyyyMMddHHmmssSSS"],
- "_all": {
- "enabled": true,
- "store": "yes"
- },
- "properties": {
- "field1": {
- "type": "date",
- "store": "yes",
- "format": "yyyyMMddHHmmssSSS",
- "include_in_all": false
- }
- }
- }
-}'
-echo
-curl -XPUT 'http://localhost:9200/conflicting_field_type/map2/_mapping' -d '{
- "map2": {
- "date_formats": ["date_time", "yyyyMMddHHmmss", "yyyyMMddHHmmssSSS"],
- "_all": {
- "enabled": true,
- "store": "yes"
- },
- "properties": {
- "field1": {
- "type": "string",
- "store": "yes",
- "term_vector": "yes",
- "include_in_all": false
- }
- }
- }
-}'
-echo
-curl -XPUT 'http://localhost:9200/conflicting_field_type/map1/1' -d '{
- "field1" : "20110214172449000"
-}'
-echo
-curl -XPUT 'http://localhost:9200/conflicting_field_type/map2/2' -d '{
- "field1" : "Test map2 with string type field"
-}'
-echo \ No newline at end of file
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/delete_all_indices.sh b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/delete_all_indices.sh
deleted file mode 100644
index 878964c54..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/delete_all_indices.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-curl -XDELETE 'http://localhost:9200/conflicting_field_type'
-echo
-curl -XDELETE 'http://localhost:9200/twitter'
-echo
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/multi_type.sh b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/multi_type.sh
deleted file mode 100755
index 562346275..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/multi_type.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-curl -XDELETE 'http://localhost:9200/multi_field_type'
-echo
-curl -XPUT 'http://localhost:9200/multi_field_type'
-echo
-curl -XPUT 'http://localhost:9200/multi_field_type/map1/_mapping' -d '{
- "map1": {
- "properties": {
- "field1": {
- "type": "string",
- "store": "yes"
- },
- "field2": {
- "type": "multi_field",
- "path": "full",
- "fields": {
- "field2": { "type": "string" },
- "alt_name": { "type": "string" },
- "alt_name2": { "type": "string" }
- }
- },
- "field3": {
- "type": "multi_field",
- "path": "just_name",
- "fields": {
- "field3": { "type": "string" },
- "foobar": { "type": "string" }
- }
- },
- "field4": {
- "type": "multi_field",
- "path": "just_name",
- "fields": {
- "field4": { "type": "string" },
- "foobar": { "type": "string" }
- }
- },
- "field5": {
- "type": "string"
- }
- }
- }
-}'
-echo
-curl -XPUT 'http://localhost:9200/multi_field_type/map1/1' -d '{
- "field1": "Whats the dogs name",
- "field2": "Max",
- "field3": "Hey Janelle, whats wrong with Wolfie? I can hear him barking",
- "field4": "Wolfies fine, honey, Wolfies just fine. Where are you",
- "field5": "Your foster parents are dead"
-}'
-echo
-curl -XPUT 'http://localhost:9200/multi_field_type/map1/2' -d '{
- "field1": "Nice night for a walk, eh",
- "field2": "Nice night for a walk",
- "field3": "Wash day tomorrow? Nothing clean, right?",
- "field4": "Nothing clean. Right",
- "field5": "Hey, I think this guys a couple cans short of a six-pack"
-}'
-echo
-curl -XPUT 'http://localhost:9200/multi_field_type/map1/3' -d '{
- "field1": "The 600 series had rubber skin. We spotted them easy, but these are new. They look human... sweat, bad breath, everything. Very hard to spot. I had to wait till he moved on you before I could zero him",
- "field2": "Look... I am not stupid, you know. They cannot make things like that yet.",
- "field3": "Not yet. Not for about 40 years",
- "field4": "Are you saying its from the future?",
- "field5": "One possible future. From your point of view... I dont know tech stuff"
-}'
-echo
-curl -XPUT 'http://localhost:9200/multi_field_type/map1/4' -d '{
- "field1": "Did you see this war?",
- "field2": "No. I grew up after. In the ruins... starving... hiding from H-Ks",
- "field3": "H-Ks?",
- "field4": "Hunter-Killers. Patrol machines built in automated factories. Most of us were rounded up, put in camps for orderly disposal",
- "field5": "This is burned in by laser scan. Some of us were kept alive... to work... loading bodies. The disposal units ran night and day. We were that close to going out forever. But there was one man who taught us to fight, to storm the wire of the camps, to smash those metal motherfuckers into junk. He turned it around. He brought us back from the brink. His name is Connor. John Connor. Your son, Sarah, your unborn son"
-}'
-echo
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/twitter_feed.sh b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/twitter_feed.sh
deleted file mode 100755
index 165246aab..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/twitter_feed.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-curl -XDELETE 'http://localhost:9200/twitter'
-echo
-curl -XPUT 'http://localhost:9200/twitter'
-echo
-curl -XPUT 'http://localhost:9200/twitter/_mapping' -d '{
- "tweet": {
- "date_formats": ["date_time", "yyyyMMddHHmmss", "yyyyMMddHHmmssSSS"],
- "properties" : {
- "user" : { "type" : "string", "index" : "not_analyzed" },
- "message" : { "type" : "string" },
- "postDate" : { "type" : "date" },
- "srcAddr" : { "type" : "ip" },
- "priority" : { "type" : "integer", null_value: 1 },
- "rank" : { "type" : "float", null_value: 1.0 },
- "loc" : { "type": "geo_point" }
- }
- }
-}'
-echo
-curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{
- "user" : "mobz",
- "message" : "developing a tool to search with",
- "postDate" : "20110220100330",
- "srcAddr" : "203.19.74.11",
- "loc" : "-37.86,144.90"
-}'
-echo
-curl -XPUT 'http://localhost:9200/twitter/tweet/2' -d '{
- "user" : "mobz",
- "message" : "you know, for elastic search",
- "postDate" : "20110220095900",
- "srcAddr" : "203.19.74.11",
- "loc" : "-37.86,144.90"
-}'
-echo
-curl -XPUT 'http://localhost:9200/twitter/tweet/3' -d '{
- "user" : "mobz",
- "message" : "lets take some matilda bay",
- "postDate" : "20110221171330",
- "srcAddr" : "203.19.74.11",
- "loc" : "-37.86,144.90"
-}'
-echo \ No newline at end of file
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/twitter_river.sh b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/twitter_river.sh
deleted file mode 100755
index e55c66537..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/twitter_river.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-curl -XDELETE 'http://localhost:9200/twitter_river'
-echo
-curl -XDELETE 'http://localhost:9200/_river/twitter_river'
-echo
-curl -XPUT 'http://localhost:9200/twitter_river'
-echo
-read -p "consumer key: " consumer_key
-read -p "consumer secret: " consumer_secret
-read -p "access token: " access_token
-read -p "access token secret: " access_token_secret
-curl -XPUT 'localhost:9200/_river/twitter_river/_meta' -d '
-{
- "type" : "twitter",
- "twitter" : {
- "oauth": {
- "consumer_key": "'${consumer_key}'",
- "consumer_secret": "'${consumer_secret}'",
- "access_token": "'${access_token}'",
- "access_token_secret": "'${access_token_secret}'"
- }
- },
- "index": {
- "index": "twitter_river",
- "type": "status",
- "buk_size": 100
- }
-}'
-echo \ No newline at end of file
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/perf.html b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/perf.html
deleted file mode 100644
index eecfc0a6a..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/perf.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-
-<html>
- <head>
- <meta charset="UTF-8">
- <title>Elasticsearch UI Performance Testing Harness</title>
- <link rel="stylesheet" href="../_site/base/reset.css">
- <link rel="stylesheet" href="../_site/app.css">
- <script src="../_site/i18n.js" data-baseDir="../_site/lang" data-langs="en,fr"></script>
- <script src="../_site/vendor.js"></script>
- <script src="../_site/app.js"></script>
- <script>
- $( function() {
- var widget;
- var container = document.getElementById("demo");
- function build() {
- widget = window.builder();
- widget.attach( demo );
- }
- function remove() {
- widget.remove();
- widget = null;
- }
- var args = location.search.substring(1).split("&").reduce(function(r, p) {
- r[decodeURIComponent(p.split("=")[0])] = decodeURIComponent(p.split("=")[1]); return r;
- }, {});
- var script0 = document.getElementsByTagName('script')[0];
- var s = document.createElement("script");
- s.src = '../src/' + args['demo'];
- script0.parentNode.insertBefore(s, script0);
- document.title = args['demo'].match(/([^\/]+)(\.js)$/)[1];
- document.getElementsByName("build")[0].addEventListener("click", build );
- document.getElementsByName("remove")[0].addEventListener("click", remove );
- document.getElementsByName("repeat")[0].addEventListener("click", function() {
- console.time("build x 1000 in");
- for( var i = 0; i < 1000; i++ ) {
- build();
- remove();
- }
- console.timeEnd("build x 1000 in");
- });
- } );
- </script>
- <link rel="icon" href="../_site/app/favicon.png" type="image/png">
- </head>
- <body>
- <div class="header">
- <button type="button" name="build">Build</button>
- <button type="button" name="remove">Remove</button>
- <button type="button" name="repeat">Build and Remove x 1000</button>
- </div>
- <div id="demo"></div>
- </body>
-</html>
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/spec/specHelper.js b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/spec/specHelper.js
deleted file mode 100644
index d6f2083a4..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/spec/specHelper.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Copyright 2010-2013 Ben Birch
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this software except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// find *Spec.js files in the src directory next to the corresponding source file
-
-var test = window.test = {};
-
-test.cb = (function( jasmine ) {
- var callbacks = [];
-
- return {
- use: function() {
- callbacks = [];
- },
- createSpy: function( name, arg, data, context ) {
- return jasmine.createSpy( name ).and.callFake( function() {
- callbacks.push( { cb: arguments[ arg || 0 ], data: data, context: context } );
- });
- },
- execOne: function() {
- var exec = callbacks.shift();
- exec.cb.apply( exec.context, exec.data );
- },
- execAll: function() {
- while( callbacks.length ) {
- this.execOne();
- }
- }
- };
-})( this.jasmine );
-
-
-test.clock = ( function() {
- var id = 0, timers, saved;
- var names = [ "setTimeout", "setInterval", "clearTimeout", "clearInterval" ];
- var byNext = function( a, b ) { return a.next - b.next; };
- var mocks = {
- setTimeout: function( fn, t ) {
- timers.push( { id: id, fn: fn, next: t, t: t, type: "t" } );
- return id++;
- },
- clearTimeout: function( id ) {
- timers = timers.filter( function( timer ) { return timer.id !== id; } );
- },
- setInterval: function( fn, t ) {
- timers.push( { id: id, fn: fn, next: t, t: t, type: "i" } );
- return id++;
- },
- clearInterval: function( id ) {
- timers = timers.filter( function( timer ) { return timer.id !== id; } );
- }
- };
-
- return {
- steal: function() {
- timers = [];
- saved = {};
- names.forEach( function( n ) {
- saved[n] = window[n];
- window[n] = mocks[n];
- });
- },
- restore: function() {
- names.forEach( function( n ) {
- window[n] = saved[n];
- });
- timers = null;
- saved = null;
- },
- tick: function() {
- if( timers.length ) {
- timers.sort( byNext );
- var t0 = timers[0];
- if( t0.type === "t" ) {
- timers.shift();
- } else {
- t0.next += t0.t;
- }
- t0.fn();
- }
- }
- };
-
-})();