aboutsummaryrefslogtreecommitdiffstats
path: root/container-search-gui
diff options
context:
space:
mode:
authorHenrik <henrik.hoiness@online.no>2018-07-06 15:37:22 +0200
committerHenrik <henrik.hoiness@online.no>2018-07-06 15:37:22 +0200
commite3d200c2f2bb004a808ea82d03d3f4f496469607 (patch)
tree6b7f69a8e20b30492fec773db2896e157511f1d5 /container-search-gui
parent1c604359c6a432685b6edbb3e721aa9af91a518e (diff)
Added Copyrigths and changes a few things for ids on HTMLElements
Diffstat (limited to 'container-search-gui')
-rw-r--r--container-search-gui/pom.xml2
-rw-r--r--container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java2
-rw-r--r--container-search-gui/src/main/java/com/yahoo/search/query/restapi/ErrorResponse.java2
-rw-r--r--container-search-gui/src/main/resources/gui/_includes/css/vespa.css4
-rw-r--r--container-search-gui/src/main/resources/gui/_includes/index.html193
-rw-r--r--container-search-gui/src/main/resources/gui/_includes/search-api-reference.html12
-rwxr-xr-xcontainer-search-gui/src/main/resources/gui/editarea/edit_area/edit_area.css134
-rw-r--r--container-search-gui/src/main/resources/gui/editarea/edit_area/edit_area_full.js4
-rwxr-xr-xcontainer-search-gui/src/main/resources/gui/editarea/edit_area/langs/en.js14
-rw-r--r--container-search-gui/src/main/resources/gui/editarea/edit_area/plugins/autocompletion/autocompletion.js37
-rwxr-xr-xcontainer-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js5
-rw-r--r--container-search-gui/src/main/resources/gui/icons/browserconfig.xml1
-rw-r--r--container-search-gui/src/main/resources/gui/js/classie.js21
-rwxr-xr-xcontainer-search-gui/src/main/sh/invoke73
-rw-r--r--container-search-gui/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java11
15 files changed, 242 insertions, 273 deletions
diff --git a/container-search-gui/pom.xml b/container-search-gui/pom.xml
index aa2f0da23e3..f2ca70dd1f3 100644
--- a/container-search-gui/pom.xml
+++ b/container-search-gui/pom.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<!-- Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
diff --git a/container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java b/container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java
index a7990f34577..0f4eebd7fd7 100644
--- a/container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java
+++ b/container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java
@@ -19,7 +19,7 @@ import java.nio.file.Paths;
import java.util.logging.Level;
/**
- * Takes requests on Querybuilder
+ * Takes requests on /querybuilder
*
* @author Henrik Høiness
*/
diff --git a/container-search-gui/src/main/java/com/yahoo/search/query/restapi/ErrorResponse.java b/container-search-gui/src/main/java/com/yahoo/search/query/restapi/ErrorResponse.java
index 2cce4785708..abb01388c1b 100644
--- a/container-search-gui/src/main/java/com/yahoo/search/query/restapi/ErrorResponse.java
+++ b/container-search-gui/src/main/java/com/yahoo/search/query/restapi/ErrorResponse.java
@@ -1,4 +1,4 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.query.restapi;
import com.yahoo.container.jdisc.HttpResponse;
diff --git a/container-search-gui/src/main/resources/gui/_includes/css/vespa.css b/container-search-gui/src/main/resources/gui/_includes/css/vespa.css
index 42cf0d1bd9d..24cfd32cbb2 100644
--- a/container-search-gui/src/main/resources/gui/_includes/css/vespa.css
+++ b/container-search-gui/src/main/resources/gui/_includes/css/vespa.css
@@ -1,3 +1,7 @@
+/**
+* Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+* Based on vespa.css from https://github.com/vespa-engine/frontpage for header- and footer-elements
+*/
:root{
--primary: #188fff;
--secondary: #003abc;
diff --git a/container-search-gui/src/main/resources/gui/_includes/index.html b/container-search-gui/src/main/resources/gui/_includes/index.html
index 80287979c53..85de6c68cf4 100644
--- a/container-search-gui/src/main/resources/gui/_includes/index.html
+++ b/container-search-gui/src/main/resources/gui/_includes/index.html
@@ -1,3 +1,4 @@
+<!-- Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<!DOCTYPE html>
<html>
<head>
@@ -9,6 +10,7 @@
search applications, ad selection system, personalized
recommendation systems, and more...">
+
<!-- Site icons - generated using http://realfavicongenerator.net/ -->
<link rel="apple-touch-icon" sizes="180x180" href="/querybuilder/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/querybuilder/icons/favicon-32x32.png">
@@ -19,23 +21,13 @@
<meta name="msapplication-config" content="/querybuilder/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
- <!-- Custom CSS & Bootstrap Core CSS - Uses Bootswatch Flatly Theme: http://bootswatch.com/flatly/ -->
-
<!-- Custom Fonts -->
<link rel="stylesheet" href="/querybuilder/css/font-awesome/css/font-awesome.min.css">
- <!-- <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> -->
<link href='https://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'>
-
- <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
- <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
<title>Vespa - Big Data. Real time.</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
@@ -43,10 +35,6 @@
<meta name="description" content="">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
- <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
</head>
@@ -83,9 +71,7 @@
<li><a href="http://docs.vespa.ai/documentation/vespa-quick-start.html">Get Started Now</a>
</ul>
</div>
- <!-- /.navbar-collapse -->
</div>
- <!-- /.container-fluid -->
</nav>
<!-- Header -->
@@ -209,37 +195,39 @@
var searchApiReference = null;
window.onload = function() {addNewRow(); getSearchApiReference();};
- var possible = ["yql", "hits", "offset", "queryProfile", "nocache", "groupingSessionCache", "searchChain", "timeout", "trace", "",
- , "model", "ranking", "presentation", "pos", "streaming", "rules", "recall", "user", "nocachewrite", "metrics"];
+ var possible = ["yql", "hits", "offset", "queryProfile", "nocache", "groupingSessionCache", "searchChain", "timeout", "trace","tracelevel","traceLevel", "",
+ , "model", "ranking", "collapse","collapsesize","collapsesize","presentation", "pos", "streaming", "rules", "recall", "user", "nocachewrite", "metrics"];
var usedProps = [];
- var hasChilds = ["model", "ranking", "trace", "matchPhase", "diversity", "presentation","collapse", "pos", "streaming", "rules"];
+ var hasChilds = ["model", "ranking", "trace","tracelevel", "ranking.matchPhase", "ranking.matchPhase.diversity", "presentation","collapse", "pos", "streaming", "rules", "metrics"];
var removedIndexes = [0];
var childrenProps = {
"model" : ["defaultIndex", "encoding", "language", "queryString", "restrict", "searchPath", "sources", "type"],
"ranking" : ["location", "features", "listFeatures", "profile", "properties", "sorting", "freshness", "queryCache", "matchPhase"],
- "matchPhase" : ["maxHits", "attribute", "ascending", "diversity"],
- "diversity" : ["attribute", "minGroups"],
+ "ranking.matchPhase" : ["maxHits", "attribute", "ascending", "diversity"],
+ "ranking.matchPhase.diversity" : ["attribute", "minGroups"],
"presentation" : ["bolding", "format", "summary", "template", "timing"],
- "trace" : ["level", "timestamps", "rules"],
+ "trace" : ["timestamps"],
+ "tracelevel" : ["rules"],
"metrics" : ["ignore"],
- "collapse":["field", "size", "summary"],
+ "collapse":["summary"],
"pos" : ["ll", "radius", "bb", "attribute"],
"streaming" : ["userid", "groupname", "selection", "priority", "maxbucketspervisitor"],
"rules" : ["off", "rulebase"]
};
- var stringType = ["yql", "queryProfile", "searchChain", "defaultIndex", "encoding", "language",
- "queryString", "searchPath", "type", "features", "profile", "properties", "sorting", "attribute", "summary",
- "template", "select", "field", "summary", "ll", "radius", "priority", "groupname", "selection", "rulebase",
- "user", "format"];
- var booleanType = ["nocache", "groupingSessionCache", "timestamps", "listFeatures", "queryCache", "ascending",
- "bolding", "timing", "off", "nocachewrite", "ignore"];
- var listType = ["filter", "restrict", "sources", "bb", "recall"];
- var integerType = ["hits","offset", "level", "freshness", "collapsesize", "userid", "maxbucketspervisitor", "rules"];
+ var stringType = ["yql", "queryProfile", "searchChain", "model.defaultIndex", "model.encoding", "model.language",
+ "model.queryString", "model.searchPath", "model.type", "ranking.features", "ranking.profile", "ranking.properties", "ranking.sorting", "ranking.matchPhase.diversity.attribute",
+ "ranking.matchPhase.attribute","pos.attribute", "presentation.summary", "collapse.summary",
+ "presentation.template", "select", "collapsefield", "pos.ll", "pos.radius", "streaming.priority", "streaming.groupname", "streaming.selection", "rules.rulebase",
+ "user", "presentation.format","ranking.location","ranking.freshness"];
+ var booleanType = ["nocache", "groupingSessionCache", "trace.timestamps", "ranking.listFeatures", "ranking.queryCache", "ranking.matchPhase.ascending",
+ "presentation.bolding", "presentation.timing", "rules.off", "nocachewrite", "metrics.ignore"];
+ var listType = ["model.filter", "model.restrict", "model.sources", "pos.bb", "recall"];
+ var integerType = ["hits","offset", "traceLevel", "collapsesize", "streaming.userid", "streaming.maxbucketspervisitor", "tracelevel.rules"];
var floatType = ["timeout"];
- var longType = ["maxHits", "minGroups"];
- var latlongType = ["location"];
+ var longType = ["ranking.matchPhase.maxHits", "ranking.matchPhase.diversity.minGroups"];
+ var latlongType = [""];
var yqlID = "v1";
@@ -364,7 +352,6 @@
return string;
}
-
function dotNotate(obj,target,prefix) {
target = target || {},
prefix = prefix || "";
@@ -386,8 +373,6 @@
clearSelection();
}
-
-
function clearSelection()
{
if (window.getSelection) {window.getSelection().removeAllRanges();}
@@ -405,12 +390,10 @@
function changeDiv(selectedMethod){
if (selectedMethod === "GET"){
- console.log(selectedMethod);
document.getElementById("request").innerHTML = '</br><textarea class=\"responsebox\" cols=70 rows=4 id=\"url2\">'+copyURL();+'</textarea>';
changeVisibility();
}
else if (selectedMethod === "POST") {
- console.log(selectedMethod);
document.getElementById("request").innerHTML = "</br> <div class=\"intro-param\">Construct a query by adding parameters or pasting a JSON.</div>";
number = 0;
changeVisibility();
@@ -507,7 +490,7 @@
function showInformation(no, key){
var a = document.getElementById("inf"+no);
- if(validKey(key)){
+ if(validKey(no, key)){
a.style = "visibility: visible;";
try {
document.getElementById("span"+no).innerHTML = changeInformation(no, key);
@@ -520,10 +503,10 @@
}
}
- function validKey(possibleKey){
+ function validKey(no, possibleKey){
if (contains(possible, possibleKey)){return true;}
for (var key in childrenProps){
- if (contains(childrenProps[key],possibleKey )){
+ if (contains(childrenProps[key],possibleKey)){
return true;
}
}
@@ -534,7 +517,8 @@
var key = document.getElementById("i"+no).value;
showInformation(no, key);
findUsedProps();
- if(contains(hasChilds, key)){
+ var fullKey = getFullName(no, key);
+ if(contains(hasChilds, fullKey)){
var input = document.getElementById("v"+no);
if ($(input).is("textarea")){
editAreaLoader.delete_instance(window.yqlID);
@@ -626,13 +610,13 @@
}
}
- if (!validKey(key)){
+ if (!validKey(no, key)){
var keyInput = document.getElementById("i"+no);
keyInput.style = "border-width: 1px; border-color: red;"
var valueInput = document.getElementById("v"+no);
valueInput.placeholder = "Invalid parameter";
}
- if (validKey(key)){
+ if (validKey(no, key)){
var keyInput = document.getElementById("i"+no);
keyInput.style = "border-width: 0px;"
}
@@ -641,6 +625,7 @@
function showType(inputVal, no){
var key = document.getElementById("i"+no).value;
+ var key = getFullName(no, key);
if (contains(stringType, key)){
inputVal.placeholder = "String";
}
@@ -671,7 +656,9 @@
var div = document.getElementById(no);
var key = document.getElementById("i"+no).value;
var bigdiv = document.getElementById("request");
- bigdiv.removeChild(div);
+ setTimeout(function(){
+ bigdiv.removeChild(div);
+ }, 200);
removedIndexes.push(no);
findUsedProps();
updateFields();
@@ -681,15 +668,8 @@
function removeChild(no){
var a = "" + no;
var parentIndexes;
- var length = no.length;
- switch (length) {
- case 2: parentIndexes = 1; break;
- case 3: parentIndexes = 2; break;
- case 4: parentIndexes = 3; break;
- case 5: parentIndexes = 4; break;
- }
var div = document.getElementById(no);
- var bigdiv = document.getElementById(no.substr(0,parentIndexes));
+ var bigdiv = document.getElementById(a.split(".").slice(0, -1).join("."));
bigdiv.removeChild(div);
removedIndexes.push(parseInt(no));
findUsedProps();
@@ -697,10 +677,14 @@
generateJSON();
}
+ function countDots(s1) {
+ return ( s1.match( /\./g ) || [] ).length;
+ }
+
function addChildProp(no, key, value){
generateJSON();
childno[no] += 1;
- var temp = ""+no+childno[no];
+ var temp = ""+no+"."+childno[no];
childno[temp] = 0;
var parentNode = document.getElementById(no);
@@ -739,19 +723,16 @@
var span = document.createElement("span");
span.id = "span"+temp;
span.innerHTML = stripMyHTML('Choose a parameter for information');
-
var a = document.createElement("a");
a.href = "#";
a.classList.add("tip");
a.id = "inf"+temp
-
a.appendChild(img);
a.appendChild(span);
-
div.appendChild(b);
div.appendChild(newInput);
- div.appendChild(newDatalist);3
- div.append(a)
+ div.appendChild(newDatalist);
+ div.append(a);
div.appendChild(newInputVal);
div.appendChild(newButton);
div.appendChild(br);
@@ -760,7 +741,7 @@
let value2 = "" + value;
if (key){
newInput.value = key;
- keySelected(temp, value)
+ keySelected(temp, value);
}
if (value2==="false" || value){
newInputVal.value= value;
@@ -769,19 +750,20 @@
}
function updateChildrenFields(parentNo){
- parentKey = document.getElementById("i"+parentNo).value
- var temp = parseInt(""+parentNo+childno[parentNo]);
- var minNumber = parseInt(""+parentNo+0);
- while (temp > minNumber){
+ parentKey = document.getElementById("i"+parentNo).value;
+ var temp = parseInt(childno[parentNo]);
+ while (temp > 0){
if (!contains(removedIndexes, temp)){
- var datalist = document.getElementById("prop"+temp);
- datalist.innerHTML = "";
- var list = childrenProps[parentKey];
- list.forEach(function(item){
- var option = document.createElement("option");
- option.value = item;
- datalist.appendChild(option);
- });
+ var datalist = document.getElementById("prop"+parentNo+"."+temp);
+ setTimeout(function(){
+ datalist.innerHTML = "";
+ var list = childrenProps[getFullName(parentNo,parentKey)];
+ list.forEach(function(item){
+ var option = document.createElement("option");
+ option.value = item;
+ datalist.appendChild(option);
+ });
+ }, 30);
}
temp -= 1;
}
@@ -800,22 +782,26 @@
document.location.reload(true);
}
-
function generateJSON(){
json = JSON.parse("{}");
buildJSON(json, number, 0);
var textarea = document.getElementById("jsonquery");
textarea.innerHTML = JSON.stringify(window.json, undefined, 4);
- console.log("Build json: "+JSON.stringify(json));
}
function buildJSON(parent, no, thresh){
var temp = no;
- while (temp > thresh){
+ if (countDots(""+temp) > 0){
+ var list = (""+no).split(".");
+ var child_id = list[list.length-1];
+ } else{
+ var child_id = (""+no)
+ }
+ while (child_id > thresh){
if (!contains(removedIndexes, temp)){
var key = document.getElementById("i"+temp).value;
if (document.getElementById("v"+temp) != null){
- var value = document.getElementById("v"+temp).value
+ var value = document.getElementById("v"+temp).value;
if (key === "yql"){
value = $.trim(editAreaLoader.getValue(window.yqlID).replace(/\n/g, " "));
}
@@ -825,11 +811,12 @@
} if (value === 'false'){
value = false;
}}
- if (contains(integerType, key) || contains(longType, key)){
+ var fullKey = getFullName(temp, key);
+ if (contains(integerType, fullKey) || contains(longType, fullKey)){
value = parseInt(value);
value = isNaN(value) ? 0 : value;
}
- if (contains(floatType, key)){
+ if (contains(floatType, fullKey)){
value = parseFloat(value);
value = isNaN(value) ? 0 : value;
}
@@ -838,18 +825,29 @@
parent[key] = JSON.parse("{}");
const newParent = parent[key];
const tempJSON = json;
- var newNo = parseInt(""+temp+childno[temp]);
- var newThresh = parseInt(""+temp+0);
+ var newNo = temp+"."+childno[temp];
+ var newThresh = 0;
buildJSON(newParent, newNo, newThresh);
}
}
- temp --;
+ if (countDots(""+temp) > 0){
+ var temp2 = temp.split(".").slice(0, -1);
+ var newNo = temp.split(".")[temp2.length];
+ newNo = parseInt(newNo)-1;
+ temp2.push(newNo);
+ temp = temp2.join(".");
+ child_id--;
+ } else{
+ temp = parseInt(temp)-1;
+ child_id--;
+ }
}
}
function findUsedProps(){
usedProps = [];
- addUsedProps(number, 0);
+ addUsedProps(window.number, 0);
+
}
function addUsedProps(no, thresh){
@@ -858,22 +856,16 @@
if (!contains(removedIndexes, temp)){
var key = document.getElementById("i"+temp).value;
usedProps.push(key);
- if (childno[temp] != -1){
- var temp2 = parseInt(""+temp+childno[temp]);
- var thresh2 = parseInt(""+temp+0);
- addUsedProps(temp2, thresh2);
- }
}
- temp--;
+ temp--;
}
}
-
function startSending(){
if (method === "POST"){
var url = document.getElementById("url").value;
generateJSON();
- var jsonobj = JSON.stringify(json);
+ var jsonobj = JSON.stringify(window.json);
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", url, false);
xmlhttp.setRequestHeader("Content-Type", "application/json");
@@ -889,9 +881,9 @@
function changeVisibility() {
var x = document.getElementById("url");
- var y = document.getElementById("addRow")
- var z = document.getElementById("showJSON")
- var a = document.getElementById("pasteJSON")
+ var y = document.getElementById("addRow");
+ var z = document.getElementById("showJSON");
+ var a = document.getElementById("pasteJSON");
if (x.style.display === "none") {
x.style.display = "inline-block";
y.style.display = "inline-block";
@@ -905,7 +897,6 @@
}
}
-
function showJSON(){
var textarea = document.getElementById("jsonquery");
var copyJSON = document.getElementById("copyJSON");
@@ -923,9 +914,8 @@
showJSON.innerHTML = "Show query JSON";
copyURL.style.display = "none";
}
-
-
}
+
function getSearchApiReference(){
var div = document.getElementById("div");
var object = document.createElement("object");
@@ -943,11 +933,9 @@
function changeInformation(no,key){
if (key===""){return "Choose a parameter for information"}
- if (contains(hasChilds, key)){return "Add parameters under the parent ''" + getFullName(no,key) + "'"}
- var refId = getFullName(no,key)
+ if (contains(hasChilds, getFullName(no,key))){return "Add parameters under the parent ''" + getFullName(no,key) + "'"}
+ var refId = getFullName(no,key);
var ref = searchApiReference;
- //var tag = document.createElement('div');
- //tag.appendChild(ref.getElementById(refId).nextElementSibling);
var tabletext = stripMyHTML(ref.getElementById(refId).nextElementSibling.outerHTML);
return tabletext;
}
@@ -955,15 +943,14 @@
function getFullName(no, key){
var name = key;
no = ""+no;
- no = no.substring(0,(no.length - 1));
+ no = no.split(".").slice(0,-1).join(".");
while (no.length > 0){
var parentName = document.getElementById("i"+no).value;
name = parentName + "." + name;
- no = no.substring(0,(no.length - 1));
+ no = no.split(".").slice(0,-1).join(".");
}
return name;
}
-
</script>
<!-- Global Site Tag (gtag.js) - Google Analytics -->
diff --git a/container-search-gui/src/main/resources/gui/_includes/search-api-reference.html b/container-search-gui/src/main/resources/gui/_includes/search-api-reference.html
index fc5b1983e55..195c9dc2663 100644
--- a/container-search-gui/src/main/resources/gui/_includes/search-api-reference.html
+++ b/container-search-gui/src/main/resources/gui/_includes/search-api-reference.html
@@ -1,5 +1,5 @@
---
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+# Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
title: "Vespa Search API reference"
---
@@ -124,7 +124,7 @@ get methods as Java objects from the Query to Searcher components.
<ul>
<li><a href="#rules.off">rules.off</a></li>
<li><a href="#rules.rulebase">rules.rulebase</a></li>
- <li><a href="#trace.rules">trace.rules</a></li>
+ <li><a href="#tracelevel.rules">tracelevel.rules</a></li>
</ul>
</dd>
@@ -292,9 +292,9 @@ search chain may invoke other chains.
<p>The query timeout.</p>
-<h3 id="trace.level">trace.level</h3>
+<h3 id="tracelevel">tracelevel</h3>
<table class="table table-striped">
-<tr><td>Alias</td>tracelevel<td></td></tr>
+<tr><td>Alias</td><td></td></tr>
<tr><td>Values</td>
<td>
Any positive number
@@ -940,9 +940,9 @@ Refer to <a href="semantic-rules.html">semantic rules</a>.
<p>The name of the rule base to use for these queries</p>
-<h3 id="trace.rules">trace.rules</h3>
+<h3 id="tracelevel.rules">tracelevel.rules</h3>
<table class="table table-striped">
-<tr><td>Alias</td><td>tracelevel.rules</td></tr>
+<tr><td>Alias</td><td></td></tr>
<tr><td>Values</td><td>int</td></tr>
<tr><td>Default</td><td>1-5 (?)</td></tr>
</table>
diff --git a/container-search-gui/src/main/resources/gui/editarea/edit_area/edit_area.css b/container-search-gui/src/main/resources/gui/editarea/edit_area/edit_area.css
index 7b1f42ea4e6..3ba22307e56 100755
--- a/container-search-gui/src/main/resources/gui/editarea/edit_area/edit_area.css
+++ b/container-search-gui/src/main/resources/gui/editarea/edit_area/edit_area.css
@@ -1,10 +1,20 @@
/*
-* Copyright 2008 Christopher Dolivet
-* Licenced under BSD Licence
+* Copyright (c) 2008, Christophe Dolivet
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+* Neither the name of EditArea nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* Open source under the BSD License.
*/
body, html{
- margin: 0;
+ margin: 0;
padding: 0;
height: 100%;
border: none;
@@ -22,7 +32,7 @@ body, html, table, form, textarea{
}
#result{
- z-index: 4;
+ z-index: 4;
overflow-x: auto;
overflow-y: scroll;
border-top: solid #888 1px;
@@ -38,22 +48,22 @@ body, html, table, form, textarea{
#container{
overflow: hidden;
border: solid blue 0;
- position: relative;
+ position: relative;
z-index: 10;
padding: 0 5px 0 45px;
- /*padding-right: 5px;*/
+ /*padding-right: 5px;*/
}
#textarea{
- position: relative;
- top: 0;
+ position: relative;
+ top: 0;
left: 0;
margin: 0;
padding: 0;
width: 100%;
- height: 100%;
- overflow: hidden;
- z-index: 7;
+ height: 100%;
+ overflow: hidden;
+ z-index: 7;
border-width: 0;
background-color: transparent;
resize: none;
@@ -67,16 +77,16 @@ body, html, table, form, textarea{
white-space: pre;
margin: 0;
padding: 0;
- position : absolute;
- z-index: 4;
+ position : absolute;
+ z-index: 4;
overflow: visible;
}
#selection_field, #selection_field_text{
- margin: 0;
- background-color: #E1F2F9;
-/* height: 1px; */
+ margin: 0;
+ background-color: #E1F2F9;
+/* height: 1px; */
position: absolute;
z-index: 5;
top: -100px;
@@ -88,7 +98,7 @@ body, html, table, form, textarea{
#selection_field.show_colors {
z-index: 3;
background-color:#EDF9FC;
-
+
}
#selection_field strong{
@@ -135,8 +145,8 @@ body, html, table, form, textarea{
}
#test_font_size{
- padding: 0;
- margin: 0;
+ padding: 0;
+ margin: 0;
visibility: hidden;
position: absolute;
white-space: pre;
@@ -148,13 +158,13 @@ pre{
}
.hidden{
- opacity: 0.2;
+ opacity: 0.2;
filter:alpha(opacity=20);
}
#result .edit_area_cursor{
- position: absolute;
- z-index:6;
+ position: absolute;
+ z-index:6;
background-color: #FF6633;
top: -100px;
margin: 0;
@@ -168,11 +178,11 @@ pre{
/* area popup */
.editarea_popup{
border: solid 1px #888888;
- background-color: #ECE9D8;
- width: 250px;
- padding: 4px;
+ background-color: #ECE9D8;
+ width: 250px;
+ padding: 4px;
position: absolute;
- visibility: hidden;
+ visibility: hidden;
z-index: 15;
top: -500px;
}
@@ -187,9 +197,9 @@ pre{
}
.editarea_popup .close_popup{
- float: right;
- line-height: 16px;
- border: 0;
+ float: right;
+ line-height: 16px;
+ border: 0;
padding: 0;
}
@@ -200,7 +210,7 @@ pre{
.editarea_popup . {
text-align: right;
-}
+}
/* Area_search */
div#area_search_replace{
@@ -222,30 +232,30 @@ div#area_search_replace .button a{
background-color: #DEDEDE;
text-decoration: none;
padding: 0 2px;
- color: #000000;
+ color: #000000;
white-space: nowrap;
}
-div#area_search_replace a:hover{
+div#area_search_replace a:hover{
/*border: solid 1px #888888;*/
background-color: #EDEDED;
}
div#area_search_replace #move_area_search_replace{
- cursor: move;
+ cursor: move;
border: solid 1px #888;
}
div#area_search_replace #close_area_search_replace{
- text-align: right;
- vertical-align: top;
+ text-align: right;
+ vertical-align: top;
white-space: nowrap;
}
div#area_search_replace #area_search_msg{
- height: 18px;
- overflow: hidden;
- border-top: solid 1px #888;
+ height: 18px;
+ overflow: hidden;
+ border-top: solid 1px #888;
margin-top: 3px;
}
@@ -261,9 +271,9 @@ div#area_search_replace #area_search_msg{
/* area_toolbar */
.area_toolbar{
/*font: 11px sans-serif;*/
- width: 100%;
+ width: 100%;
/*height: 21px; */
- margin: 0;
+ margin: 0;
padding: 0;
background-color: #ECE9D8;
text-align: center;
@@ -374,15 +384,15 @@ table.statusbar{
/* waiting screen */
#processing{
- display: none;
- background-color:#ECE9D8;
+ display: none;
+ background-color:#ECE9D8;
border: solid #888 1px;
- position: absolute;
- top: 0;
+ position: absolute;
+ top: 0;
left: 0;
- width: 100%;
- height: 100%;
- z-index: 100;
+ width: 100%;
+ height: 100%;
+ z-index: 100;
text-align: center;
}
@@ -391,7 +401,7 @@ table.statusbar{
left: 50%;
top: 50%;
width: 200px;
- height: 20px;
+ height: 20px;
margin-left: -100px;
margin-top: -10px;
text-align: center;
@@ -409,8 +419,8 @@ table.statusbar{
}
#tab_browsing_list {
- padding: 0;
- margin: 0;
+ padding: 0;
+ margin: 0;
list-style-type: none;
white-space: nowrap;
}
@@ -420,26 +430,26 @@ table.statusbar{
}
#tab_browsing_list a {
position: relative;
- display: block;
- text-decoration: none;
- float: left;
+ display: block;
+ text-decoration: none;
+ float: left;
cursor: pointer;
line-height:14px;
}
#tab_browsing_list a span {
- display: block;
- color: #000;
- background: #ECE9D8;
- border: 1px solid #888;
- border-width: 1px 1px 0;
- text-align: center;
- padding: 2px 2px 1px 4px;
+ display: block;
+ color: #000;
+ background: #ECE9D8;
+ border: 1px solid #888;
+ border-width: 1px 1px 0;
+ text-align: center;
+ padding: 2px 2px 1px 4px;
position: relative; /*IE 6 hack */
}
#tab_browsing_list a b {
- display: block;
+ display: block;
border-bottom: 2px solid #617994;
}
@@ -532,4 +542,4 @@ table.statusbar{
{
font-style: italic;
padding: 0 3px;
-} \ No newline at end of file
+}
diff --git a/container-search-gui/src/main/resources/gui/editarea/edit_area/edit_area_full.js b/container-search-gui/src/main/resources/gui/editarea/edit_area/edit_area_full.js
index 286d00bbda8..61a50b4241e 100644
--- a/container-search-gui/src/main/resources/gui/editarea/edit_area/edit_area_full.js
+++ b/container-search-gui/src/main/resources/gui/editarea/edit_area/edit_area_full.js
@@ -1,4 +1,4 @@
-/*!
+/*
* Copyright (c) 2008, Christophe Dolivet
* All rights reserved.
*
@@ -11,7 +11,7 @@
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Open source under the BSD License.
- */
+*/
function EAL(){var t=this;t.version="0.8.2";date=new Date();t.start_time=date.getTime();t.win="loading";t.error=false;t.baseURL="";t.template="";t.lang={};t.load_syntax={};t.syntax={};t.loadedFiles=[];t.waiting_loading={};t.scripts_to_load=[];t.sub_scripts_to_load=[];t.syntax_display_name={'basic':'Basic','brainfuck':'Brainfuck','c':'C','coldfusion':'Coldfusion','cpp':'CPP','css':'CSS','html':'HTML','java':'Java','js':'Javascript','pas':'Pascal','perl':'Perl','php':'Php','python':'Python','robotstxt':'Robots txt','ruby':'Ruby','sql':'SQL','tsql':'T-SQL','vb':'Visual Basic','xml':'XML'};t.resize=[];t.hidden={};t.default_settings={debug:false,smooth_selection:true,font_size:"10",font_family:"monospace",start_highlight:false,toolbar:"search,go_to_line,fullscreen,|,undo,redo,|,select_font,|,change_smooth_selection,highlight,reset_highlight,word_wrap,|,help",begin_toolbar:"",end_toolbar:"",is_multi_files:false,allow_resize:"both",show_line_colors:false,min_width:400,min_height:125,replace_tab_by_spaces:false,allow_toggle:true,language:"en",syntax:"",syntax_selection_allow:"basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml",display:"onload",max_undo:30,browsers:"known",plugins:"",gecko_spellcheck:false,fullscreen:false,is_editable:true,cursor_position:"begin",word_wrap:false,autocompletion:false,load_callback:"",save_callback:"",change_callback:"",submit_callback:"",EA_init_callback:"",EA_delete_callback:"",EA_load_callback:"",EA_unload_callback:"",EA_toggle_on_callback:"",EA_toggle_off_callback:"",EA_file_switch_on_callback:"",EA_file_switch_off_callback:"",EA_file_close_callback:""};t.advanced_buttons=[ ['new_document','','new_document',false],['search','','show_search',false],['go_to_line','','go_to_line',false],['undo','','undo',true],['redo','','redo',true],['change_smooth_selection','','change_smooth_selection_mode',true],['reset_highlight','','resync_highlight',true],['highlight','','change_highlight',true],['help','','show_help',false],['save','','save',false],['load','','load',false],['fullscreen','','toggle_full_screen',false],['word_wrap','','toggle_word_wrap',true],['autocompletion','','toggle_autocompletion'] ];t.set_browser_infos(t);if(t.isIE>=6||t.isGecko||(t.isWebKit&&!t.isSafari<3)||t.isOpera>=9||t.isCamino)t.isValidBrowser=true;
else t.isValidBrowser=false;t.set_base_url();for(var i=0;i<t.scripts_to_load.length;i++){setTimeout("eAL.load_script('"+t.baseURL+t.scripts_to_load[i]+".js');",1);t.waiting_loading[t.scripts_to_load[i]+".js"]=false;}t.add_event(window,"load",EAL.prototype.window_loaded);};EAL.prototype={has_error:function(){this.error=true;for(var i in EAL.prototype){EAL.prototype[i]=function(){};}},set_browser_infos:function(o){ua=navigator.userAgent;o.isWebKit=/WebKit/.test(ua);o.isGecko=!o.isWebKit&&/Gecko/.test(ua);o.isMac=/Mac/.test(ua);o.isIE=(navigator.appName=="Microsoft Internet Explorer");if(o.isIE){o.isIE=ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/,"$1");if(o.isIE<6)o.has_error();}if(o.isOpera=(ua.indexOf('Opera')!=-1)){o.isOpera=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i,"$1");if(o.isOpera<9)o.has_error();o.isIE=false;}if(o.isFirefox=(ua.indexOf('Firefox')!=-1))o.isFirefox=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('Iceweasel')!=-1)o.isFirefox=ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('GranParadiso')!=-1)o.isFirefox=ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('BonEcho')!=-1)o.isFirefox=ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('SeaMonkey')!=-1)o.isFirefox=(ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i,"$1"))+1;if(o.isCamino=(ua.indexOf('Camino')!=-1))o.isCamino=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i,"$1");if(o.isSafari=(ua.indexOf('Safari')!=-1))o.isSafari=ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i,"$1");if(o.isChrome=(ua.indexOf('Chrome')!=-1)){o.isChrome=ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i,"$1");o.isSafari=false;}},window_loaded:function(){eAL.win="loaded";if(document.forms){for(var i=0;i<document.forms.length;i++){var form=document.forms[i];form.edit_area_replaced_submit=null;try{form.edit_area_replaced_submit=form.onsubmit;form.onsubmit="";}catch(e){}eAL.add_event(form,"submit",EAL.prototype.submit);eAL.add_event(form,"reset",EAL.prototype.reset);}}eAL.add_event(window,"unload",function(){for(var i in eAs){eAL.delete_instance(i);}});},init_ie_textarea:function(id){var a=document.getElementById(id);try{if(a&&typeof(a.focused)=="undefined"){a.focus();a.focused=true;a.selectionStart=a.selectionEnd=0;get_IE_selection(a);eAL.add_event(a,"focus",IE_textarea_focus);eAL.add_event(a,"blur",IE_textarea_blur);}}catch(ex){}},init:function(settings){var t=this,s=settings,i;if(!s["id"])t.has_error();if(t.error)return;if(eAs[s["id"]])t.delete_instance(s["id"]);for(i in t.default_settings){if(typeof(s[i])=="undefined")s[i]=t.default_settings[i];}if(s["browsers"]=="known"&&t.isValidBrowser==false){return;}if(s["begin_toolbar"].length>0)s["toolbar"]=s["begin_toolbar"]+","+s["toolbar"];if(s["end_toolbar"].length>0)s["toolbar"]=s["toolbar"]+","+s["end_toolbar"];s["tab_toolbar"]=s["toolbar"].replace(/ /g,"").split(",");s["plugins"]=s["plugins"].replace(/ /g,"").split(",");for(i=0;i<s["plugins"].length;i++){if(s["plugins"][i].length==0)s["plugins"].splice(i,1);}t.get_template();t.load_script(t.baseURL+"langs/"+s["language"]+".js");if(s["syntax"].length>0){s["syntax"]=s["syntax"].toLowerCase();t.load_script(t.baseURL+"reg_syntax/"+s["syntax"]+".js");}eAs[s["id"]]={"settings":s};eAs[s["id"]]["displayed"]=false;eAs[s["id"]]["hidden"]=false;t.start(s["id"]);},delete_instance:function(id){var d=document,fs=window.frames,span,iframe;eAL.execCommand(id,"EA_delete");if(fs["frame_"+id]&&fs["frame_"+id].editArea){if(eAs[id]["displayed"])eAL.toggle(id,"off");fs["frame_"+id].editArea.execCommand("EA_unload");}span=d.getElementById("EditAreaArroundInfos_"+id);if(span)span.parentNode.removeChild(span);iframe=d.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete fs["frame_"+id];}catch(e){}}delete eAs[id];},start:function(id){var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;if(t.win!="loaded"){setTimeout("eAL.start('"+id+"');",50);return;}for(i in t.waiting_loading){if(t.waiting_loading[i]!="loaded"&&typeof(t.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');",50);return;}}if(!t.lang[eAs[id]["settings"]["language"]]||(eAs[id]["settings"]["syntax"].length>0&&!t.load_syntax[eAs[id]["settings"]["syntax"]])){setTimeout("eAL.start('"+id+"');",50);return;}if(eAs[id]["settings"]["syntax"].length>0)t.init_syntax_regexp();if(!d.getElementById("EditAreaArroundInfos_"+id)&&(eAs[id]["settings"]["debug"]||eAs[id]["settings"]["allow_toggle"])){span=d.createElement("span");span.id="EditAreaArroundInfos_"+id;if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked='checked'":"";html+="<div id='edit_area_toggle_"+i+"'>";html+="<input id='edit_area_toggle_checkbox_"+id+"' class='toggle_"+id+"' type='checkbox' onclick='eAL.toggle(\""+id+"\");' accesskey='e' "+checked+" />";html+="<label for='edit_area_toggle_checkbox_"+id+"'>{$toggle}</label></div>";}if(eAs[id]["settings"]["debug"])html+="<textarea id='edit_area_debug_"+id+"' spellcheck='off' style='z-index:20;width:100%;height:120px;overflow:auto;border:solid black 1px;'></textarea><br />";html=t.translate(html,eAs[id]["settings"]["language"]);span.innerHTML=html;father=d.getElementById(id).parentNode;next=d.getElementById(id).nextSibling;if(next==null)father.appendChild(span);
else father.insertBefore(span,next);}if(!eAs[id]["initialized"]){t.execCommand(id,"EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(t.isIE){t.init_ie_textarea(id);}var area=eAs[id];for(i=0;i<area["settings"]["tab_toolbar"].length;i++){html_toolbar_content+=t.get_control_html(area["settings"]["tab_toolbar"][i],area["settings"]["language"]);}html_toolbar_content=t.translate(html_toolbar_content,area["settings"]["language"],"template");if(!t.iframe_script){t.iframe_script="";for(i=0;i<t.sub_scripts_to_load.length;i++)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+t.sub_scripts_to_load[i]+'.js"></script>';}for(i=0;i<area["settings"]["plugins"].length;i++){if(!t.all_plugins_loaded)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/'+area["settings"]["plugins"][i]+'.js"></script>';t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/langs/'+area["settings"]["language"]+'.js"></script>';}if(!t.iframe_css){t.iframe_css="<link href='"+t.baseURL+"edit_area.css' rel='stylesheet' type='text/css' />";}template=t.template.replace(/\[__BASEURL__\]/g,t.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=t.translate(template,area["settings"]["language"],"template");template=template.replace("[__CSSRULES__]",t.iframe_css);template=template.replace("[__JSCODE__]",t.iframe_script);template=template.replace("[__EA_VERSION__]",t.version);area.textarea=d.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined')delete window.frames["frame_"+area["settings"]["id"]];father=area.textarea.parentNode;content=d.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"]["id"];content.style.borderWidth="0px";setAttribute(content,"frameBorder","0");content.style.overflow="hidden";content.style.display="none";next=area.textarea.nextSibling;if(next==null)father.appendChild(content);
diff --git a/container-search-gui/src/main/resources/gui/editarea/edit_area/langs/en.js b/container-search-gui/src/main/resources/gui/editarea/edit_area/langs/en.js
index d2fa5619627..ec5ec1c3724 100755
--- a/container-search-gui/src/main/resources/gui/editarea/edit_area/langs/en.js
+++ b/container-search-gui/src/main/resources/gui/editarea/edit_area/langs/en.js
@@ -1,3 +1,17 @@
+/*
+* Copyright (c) 2008, Christophe Dolivet
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+* Neither the name of EditArea nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* Open source under the BSD License.
+*/
editAreaLoader.lang["en"]={
new_document: "new empty document",
search_button: "search and replace",
diff --git a/container-search-gui/src/main/resources/gui/editarea/edit_area/plugins/autocompletion/autocompletion.js b/container-search-gui/src/main/resources/gui/editarea/edit_area/plugins/autocompletion/autocompletion.js
index 8900dee77c1..d6984f59899 100644
--- a/container-search-gui/src/main/resources/gui/editarea/edit_area/plugins/autocompletion/autocompletion.js
+++ b/container-search-gui/src/main/resources/gui/editarea/edit_area/plugins/autocompletion/autocompletion.js
@@ -1,15 +1,30 @@
/**
- * Autocompletion class
- *
- * An auto completion box appear while you're writing. It's possible to force it to appear with Ctrl+Space short cut
- *
- * Loaded as a plugin inside editArea (everything made here could have been made in the plugin directory)
- * But is definitly linked to syntax selection (no need to do 2 different files for color and auto complete for each syntax language)
- * and add a too important feature that many people would miss if included as a plugin
- *
- * - init param: autocompletion_start
- * - Button name: "autocompletion"
- */
+* Copyright (c) 2008, Christophe Dolivet
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+* Neither the name of EditArea nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* Open source under the BSD License.
+*
+*
+*
+* Autocompletion class
+*
+* An auto completion box appear while you're writing. It's possible to force it to appear with Ctrl+Space short cut
+*
+* Loaded as a plugin inside editArea (everything made here could have been made in the plugin directory)
+* But is definitly linked to syntax selection (no need to do 2 different files for color and auto complete for each syntax language)
+* and add a too important feature that many people would miss if included as a plugin
+*
+* - init param: autocompletion_start
+* - Button name: "autocompletion"
+*/
var EditArea_autocompletion= {
diff --git a/container-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js b/container-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js
index 532e5899b39..e4e9cd3b32d 100755
--- a/container-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js
+++ b/container-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js
@@ -1,3 +1,6 @@
+/**
+* Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+*/
editAreaLoader.load_syntax["yql"] = {
'DISPLAY_NAME' : 'YQL'
,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'}
@@ -5,7 +8,7 @@ editAreaLoader.load_syntax["yql"] = {
,'OPERATOR_CASE_SENSITIVE' : false
,'KEYWORDS' : {
'statements' : [
- 'SELECT', 'FROM',' SOURCES', 'CONTAINS',
+ 'SELECT', 'FROM','SOURCES', 'CONTAINS',
'NOT', 'ORDER',
'BY', 'WHERE'
]
diff --git a/container-search-gui/src/main/resources/gui/icons/browserconfig.xml b/container-search-gui/src/main/resources/gui/icons/browserconfig.xml
index ea8cbcc89e3..5fe3c6a3ff9 100644
--- a/container-search-gui/src/main/resources/gui/icons/browserconfig.xml
+++ b/container-search-gui/src/main/resources/gui/icons/browserconfig.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<browserconfig>
<msapplication>
<tile>
diff --git a/container-search-gui/src/main/resources/gui/js/classie.js b/container-search-gui/src/main/resources/gui/js/classie.js
index a96755488bf..2cbf994382b 100644
--- a/container-search-gui/src/main/resources/gui/js/classie.js
+++ b/container-search-gui/src/main/resources/gui/js/classie.js
@@ -1,13 +1,16 @@
/*!
- * classie - class helper functions
- * from bonzo https://github.com/ded/bonzo
- *
- * classie.has( elem, 'my-class' ) -> true/false
- * classie.add( elem, 'my-new-class' )
- * classie.remove( elem, 'my-unwanted-class' )
- * classie.toggle( elem, 'my-class' )
- */
-
+* Copyright © 2014 Dustin Diaz
+* Licensed under the terms of the MIT license
+*
+*
+* classie - class helper functions
+* from bonzo https://github.com/ded/bonzo
+*
+* classie.has( elem, 'my-class' ) -> true/false
+* classie.add( elem, 'my-new-class' )
+* classie.remove( elem, 'my-unwanted-class' )
+* classie.toggle( elem, 'my-class' )
+*/
/*jshint browser: true, strict: true, undef: true */
/*global define: false */
diff --git a/container-search-gui/src/main/sh/invoke b/container-search-gui/src/main/sh/invoke
deleted file mode 100755
index 0e5c281e72b..00000000000
--- a/container-search-gui/src/main/sh/invoke
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-# BEGIN environment bootstrap section
-# Do not edit between here and END as this section should stay identical in all scripts
-
-findpath () {
- myname=${0}
- mypath=${myname%/*}
- myname=${myname##*/}
- if [ "$mypath" ] && [ -d "$mypath" ]; then
- return
- fi
- mypath=$(pwd)
- if [ -f "${mypath}/${myname}" ]; then
- return
- fi
- echo "FATAL: Could not figure out the path where $myname lives from $0"
- exit 1
-}
-
-COMMON_ENV=libexec/vespa/common-env.sh
-
-source_common_env () {
- if [ "$VESPA_HOME" ] && [ -d "$VESPA_HOME" ]; then
- export VESPA_HOME
- common_env=$VESPA_HOME/$COMMON_ENV
- if [ -f "$common_env" ]; then
- . $common_env
- return
- fi
- fi
- return 1
-}
-
-findroot () {
- source_common_env && return
- if [ "$VESPA_HOME" ]; then
- echo "FATAL: bad VESPA_HOME value '$VESPA_HOME'"
- exit 1
- fi
- if [ "$ROOT" ] && [ -d "$ROOT" ]; then
- VESPA_HOME="$ROOT"
- source_common_env && return
- fi
- findpath
- while [ "$mypath" ]; do
- VESPA_HOME=${mypath}
- source_common_env && return
- mypath=${mypath%/*}
- done
- echo "FATAL: missing VESPA_HOME environment variable"
- echo "Could not locate $COMMON_ENV anywhere"
- exit 1
-}
-
-findhost () {
- if [ "${VESPA_HOSTNAME}" = "" ]; then
- VESPA_HOSTNAME=$(vespa-detect-hostname || hostname -f || hostname || echo "localhost") || exit 1
- fi
- validate="${VESPA_HOME}/bin/vespa-validate-hostname"
- if [ -f "$validate" ]; then
- "$validate" "${VESPA_HOSTNAME}" || exit 1
- fi
- export VESPA_HOSTNAME
-}
-
-findroot
-findhost
-
-# END environment bootstrap section
-
-java -cp $VESPA_HOME/lib/jars/jrt.jar:$VESPA_HOME/lib/jars/vespajlib.jar com.yahoo.jrt.tool.RpcInvoker $@
diff --git a/container-search-gui/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java b/container-search-gui/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java
index 2fc1bda5742..ec515a1bf4a 100644
--- a/container-search-gui/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java
+++ b/container-search-gui/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java
@@ -14,6 +14,11 @@ import java.io.IOException;
import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Henrik Høiness
+ */
+
public class GUIHandlerTest {
private JDisc container;
@@ -27,7 +32,7 @@ public class GUIHandlerTest {
public void stopContainer() {
/*
try {
- Thread.sleep(120_000);
+ Thread.sleep(100_000);
} catch (InterruptedException e) {
e.printStackTrace();
}*/
@@ -36,12 +41,12 @@ public class GUIHandlerTest {
@Test
public void testRequest() throws Exception {
- assertResponse("/querybuilder/", "<!DOCTYPE html>","text/html; charset=UTF-8", 200);
+ assertResponse("/querybuilder/", "<!-- Copyright 2018 Yahoo Holdings.","text/html; charset=UTF-8", 200);
}
@Test
public void testContentTypes() throws Exception{
- assertResponse("/querybuilder/_includes/css/vespa.css", ":root","text/css; charset=UTF-8", 200);
+ assertResponse("/querybuilder/_includes/css/vespa.css", "/**","text/css; charset=UTF-8", 200);
assertResponse("/querybuilder/js/agency.js", "/*!","application/javascript; charset=UTF-8", 200);
assertResponse("/querybuilder/img/reload.svg", "<?xml","image/svg+xml; charset=UTF-8", 200);
assertResponse("/querybuilder/img/Vespa-V2.png", null,"image/png; charset=UTF-8", 200);