SOLR-10042: Delete old deprecated Admin UI

This commit is contained in:
Jan Høydahl 2017-05-18 14:12:59 +02:00
parent b5aa0da6ff
commit 21384b5b21
84 changed files with 9 additions and 46576 deletions

View File

@ -161,6 +161,8 @@ Other Changes
* SOLR-10414: RecoveryStrategy is now a Runnable instead of a Thread. (Tomás Fernández Löbbe)
* SOLR-10042: Delete old deprecated Admin UI, leaving the AngularJS UI the only one supported (janhoy)
================== 6.7.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -25,15 +25,9 @@ Copyright (c) 2012, Michael Bostock, https://github.com/mbostock/d3
This product includes the highlight.js Javascript library created by Ivan Sagalaev
Copyright (c) 2006, Ivan Sagalaev, https://github.com/isagalaev/highlight.js
This product includes the ZeroClipboard.js Javascript library created by Jon Rohan, James M. Greene
Copyright (c) 2012 Jon Rohan, James M. Greene, https://github.com/zeroclipboard/ZeroClipboard
This product includes the Chosen Javascript library created by Patrick Filler
Copyright (c) 2011-2014 by Harvest, https://github.com/harvesthq/chosen
This product includes jquery.ajaxfileupload.js Javascript library created by Jordan Feldstein
Copyright (c) 2011 Jordan Feldstein, https://github.com/jfeldstein/jQuery.AjaxFileUpload.js
This product includes jquery.blockUI.js Javascript library created by Mike Alsup
Copyright (c) 2007-2014 M. Alsup https://github.com/malsup/blockui/
@ -43,18 +37,12 @@ Copyright (c) 2013-2014 Klaus Hartl, https://github.com/carhartl/jquery-cookie
This product includes jquery.form Javascript library created by Mike Alsup
Copyright 2006-2014 (c) M. Alsup, https://github.com/malsup/form/
This product includes the jstree Javascript library created by Ivan Bozhanov
This product includes the jquery.jstree.js Javascript library created by Ivan Bozhanov
Copyright (c) 2013-2014 Ivan Bozhanov, https://github.com/vakata/jstree
This product includes the Sammy.js Javascript library created by Aaron Quint
Copyright (c) 2008 Aaron Quint, Quirkey NYC, LLC, https://github.com/quirkey/sammy
This product includes jquery.timeago.js Javascript library by Ryan McGeary
Copyright (c) 2008-2014, Ryan McGeary, https://github.com/rmm5t/jquery-timeago
This product includes linker.js Javascript library created by Michalis Tzikas & Vasilis Lolos
Copyright (C) 2011 by Michalis Tzikas & Vasilis Lolos, https://github.com/lolos/jquery-Linker/
This product includes require.js Javascript library created by James Burke
Copyright (C) 2010-2014 James Burke, https://github.com/jrburke/requirejs

View File

@ -42,6 +42,7 @@ import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.util.plugin.SolrCoreAware;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.runtime.RuntimeConstants;
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;

View File

@ -9,7 +9,7 @@
<link rel="icon" type="image/x-icon" href="#{url_root}/img/favicon.ico"/>
<link rel="shortcut icon" type="image/x-icon" href="#{url_root}/img/favicon.ico"/>
<script type="text/javascript" src="#{url_root}/js/lib/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="#{url_root}/libs/jquery-1.7.2.min.js"></script>
<style>
#admin{

View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/x-icon" href="#{url_root}/img/favicon.ico"/>
<link rel="shortcut icon" type="image/x-icon" href="#{url_root}/img/favicon.ico"/>
<script type="text/javascript" src="#{url_root}/js/lib/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="#{url_root}/libs/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/js/jquery.tx3-tag-cloud.js&contentType=text/javascript"></script>
<script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/js/dropit.js&contentType=text/javascript"></script>
<script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/js/jquery.autocomplete.js&contentType=text/javascript"></script>

View File

@ -1,5 +0,0 @@
javascript-natural-sort is a javascript library for sorting data with embedded
numbers naturally, the way a human would expect.
https://github.com/jarinudom/naturalSort.js
javascript-natural-sort is licensed under the MIT license.

View File

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2011 Jim Palmer and other contributors
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.

View File

@ -6,7 +6,7 @@
<title>#param('title')</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="#{url_root}/js/lib/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="#{url_root}/libs/jquery-1.7.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="#{url_for_solr}/admin/file?file=/velocity/main.css&contentType=text/css"/>
<link rel="stylesheet" href="#{url_for_solr}/admin/file?file=/velocity/jquery.autocomplete.css&contentType=text/css" type="text/css" />
<link rel="icon" type="image/x-icon" href="#{url_root}/img/favicon.ico"/>

View File

@ -139,11 +139,6 @@
<url-pattern>/logging</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LoadAdminUI</servlet-name>
<url-pattern>/old.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LoadAdminUI</servlet-name>
<url-pattern>/index.html</url-pattern>

View File

@ -1,28 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<container-descriptor>
<filter-dispatched-requests-enabled>false</filter-dispatched-requests-enabled>
</container-descriptor>
</weblogic-web-app>

View File

@ -1,421 +0,0 @@
/*
Chosen
- by Patrick Filler for Harvest http://getharvest.com
- Copyright (c) 2011-2013 by Harvest
Available for use under the MIT License
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.
*/
/* @group Base */
.chzn-container {
font-size: 13px;
position: relative;
display: inline-block;
zoom: 1;
*display: inline;
}
.chzn-container .chzn-drop {
background: #fff;
border: 1px solid #aaa;
border-top: 0;
position: absolute;
top: 29px;
left: 0;
-webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
-moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
-o-box-shadow : 0 4px 5px rgba(0,0,0,.15);
box-shadow : 0 4px 5px rgba(0,0,0,.15);
z-index: 999;
}
/* @end */
/* @group Single Chosen */
.chzn-container-single .chzn-single {
background-color: #ffffff;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 );
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
background-image: -ms-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
background-image: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
-webkit-border-radius: 5px;
-moz-border-radius : 5px;
border-radius : 5px;
-moz-background-clip : padding;
-webkit-background-clip: padding-box;
background-clip : padding-box;
border: 1px solid #aaaaaa;
-webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
-moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
display: block;
overflow: hidden;
white-space: nowrap;
position: relative;
height: 23px;
line-height: 24px;
padding: 0 0 0 8px;
color: #444444;
text-decoration: none;
}
.chzn-container-single .chzn-default {
color: #999;
}
.chzn-container-single .chzn-single span {
margin-right: 26px;
display: block;
overflow: hidden;
white-space: nowrap;
-o-text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.chzn-container-single .chzn-single abbr {
display: block;
position: absolute;
right: 26px;
top: 6px;
width: 12px;
height: 13px;
font-size: 1px;
background: url(../img/chosen-sprite.png) right top no-repeat;
}
.chzn-container-single .chzn-single abbr:hover {
background-position: right -11px;
}
.chzn-container-single .chzn-single div {
position: absolute;
right: 0;
top: 0;
display: block;
height: 100%;
width: 18px;
}
.chzn-container-single .chzn-single div b {
background: url('../img/chosen-sprite.png') no-repeat 0 0;
display: block;
width: 100%;
height: 100%;
}
.chzn-container-single .chzn-search {
padding: 3px 4px;
position: relative;
margin: 0;
white-space: nowrap;
z-index: 1010;
}
.chzn-container-single .chzn-search input {
background: #fff url('../img/chosen-sprite.png') no-repeat 100% -22px;
background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background: url('../img/chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background: url('../img/chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%);
margin: 1px 0;
padding: 4px 20px 4px 5px;
outline: 0;
border: 1px solid #aaa;
font-family: sans-serif;
font-size: 1em;
}
.chzn-container-single .chzn-drop {
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius : 0 0 4px 4px;
border-radius : 0 0 4px 4px;
-moz-background-clip : padding;
-webkit-background-clip: padding-box;
background-clip : padding-box;
}
/* @end */
.chzn-container-single-nosearch .chzn-search input {
position: absolute;
left: -9000px;
}
/* @group Multi Chosen */
.chzn-container-multi .chzn-choices {
background-color: #fff;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
border: 1px solid #aaa;
margin: 0;
padding: 0;
cursor: text;
overflow: hidden;
height: auto !important;
height: 1%;
position: relative;
}
.chzn-container-multi .chzn-choices li {
float: left;
list-style: none;
}
.chzn-container-multi .chzn-choices .search-field {
white-space: nowrap;
margin: 0;
padding: 0;
}
.chzn-container-multi .chzn-choices .search-field input {
color: #666;
background: transparent !important;
border: 0 !important;
font-family: sans-serif;
font-size: 100%;
height: 15px;
padding: 5px;
margin: 1px 0;
outline: 0;
-webkit-box-shadow: none;
-moz-box-shadow : none;
-o-box-shadow : none;
box-shadow : none;
}
.chzn-container-multi .chzn-choices .search-field .default {
color: #999;
}
.chzn-container-multi .chzn-choices .search-choice {
-webkit-border-radius: 3px;
-moz-border-radius : 3px;
border-radius : 3px;
-moz-background-clip : padding;
-webkit-background-clip: padding-box;
background-clip : padding-box;
background-color: #e4e4e4;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
-webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
-moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
color: #333;
border: 1px solid #aaaaaa;
line-height: 13px;
padding: 3px 20px 3px 5px;
margin: 3px 0 3px 5px;
position: relative;
cursor: default;
}
.chzn-container-multi .chzn-choices .search-choice-focus {
background: #d4d4d4;
}
.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
display: block;
position: absolute;
right: 3px;
top: 4px;
width: 12px;
height: 13px;
font-size: 1px;
background: url(../img/chosen-sprite.png) right top no-repeat;
}
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
background-position: right -11px;
}
.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
background-position: right -11px;
}
/* @end */
/* @group Results */
.chzn-container .chzn-results {
margin: 0 4px 4px 0;
max-height: 240px;
padding: 0 0 0 4px;
position: relative;
overflow-x: hidden;
overflow-y: auto;
}
.chzn-container-multi .chzn-results {
margin: -1px 0 0;
padding: 0;
}
.chzn-container .chzn-results li {
display: none;
line-height: 15px;
padding: 5px 6px;
margin: 0;
list-style: none;
}
.chzn-container .chzn-results .active-result {
cursor: pointer;
display: list-item;
}
.chzn-container .chzn-results .highlighted {
background-color: #3875d7;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 );
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
background-image: -ms-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
background-image: linear-gradient(top, #3875d7 20%, #2a62bc 90%);
color: #fff;
}
.chzn-container .chzn-results li em {
background: #feffde;
font-style: normal;
}
.chzn-container .chzn-results .highlighted em {
background: transparent;
}
.chzn-container .chzn-results .no-results {
background: #f4f4f4;
display: list-item;
}
.chzn-container .chzn-results .group-result {
cursor: default;
color: #999;
font-weight: bold;
}
.chzn-container .chzn-results .group-option {
padding-left: 15px;
}
.chzn-container-multi .chzn-drop .result-selected {
display: none;
}
.chzn-container .chzn-results-scroll {
background: white;
margin: 0 4px;
position: absolute;
text-align: center;
width: 321px; /* This should by dynamic with js */
z-index: 1;
}
.chzn-container .chzn-results-scroll span {
display: inline-block;
height: 17px;
text-indent: -5000px;
width: 9px;
}
.chzn-container .chzn-results-scroll-down {
bottom: 0;
}
.chzn-container .chzn-results-scroll-down span {
background: url('../img/chosen-sprite.png') no-repeat -4px -3px;
}
.chzn-container .chzn-results-scroll-up span {
background: url('../img/chosen-sprite.png') no-repeat -22px -3px;
}
/* @end */
/* @group Active */
.chzn-container-active .chzn-single {
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
box-shadow : 0 0 5px rgba(0,0,0,.3);
border: 1px solid #5897fb;
}
.chzn-container-active .chzn-single-with-drop {
border: 1px solid #aaa;
-webkit-box-shadow: 0 1px 0 #fff inset;
-moz-box-shadow : 0 1px 0 #fff inset;
-o-box-shadow : 0 1px 0 #fff inset;
box-shadow : 0 1px 0 #fff inset;
background-color: #eee;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
background-image: -ms-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
background-image: linear-gradient(top, #eeeeee 20%, #ffffff 80%);
-webkit-border-bottom-left-radius : 0;
-webkit-border-bottom-right-radius: 0;
-moz-border-radius-bottomleft : 0;
-moz-border-radius-bottomright: 0;
border-bottom-left-radius : 0;
border-bottom-right-radius: 0;
}
.chzn-container-active .chzn-single-with-drop div {
background: transparent;
border-left: none;
}
.chzn-container-active .chzn-single-with-drop div b {
background-position: -18px 1px;
}
.chzn-container-active .chzn-choices {
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
box-shadow : 0 0 5px rgba(0,0,0,.3);
border: 1px solid #5897fb;
}
.chzn-container-active .chzn-choices .search-field input {
color: #111 !important;
}
/* @end */
/* @group Disabled Support */
.chzn-disabled {
cursor: default;
opacity:0.5 !important;
}
.chzn-disabled .chzn-single {
cursor: default;
}
.chzn-disabled .chzn-choices .search-choice .search-choice-close {
cursor: default;
}
/* @group Right to Left */
.chzn-rtl { text-align: right; }
.chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
.chzn-rtl .chzn-single div { left: 3px; right: auto; }
.chzn-rtl .chzn-single abbr {
left: 26px;
right: auto;
}
.chzn-rtl .chzn-choices .search-field input { direction: rtl; }
.chzn-rtl .chzn-choices li { float: right; }
.chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; background-position: right top;}
.chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
.chzn-rtl .chzn-search input {
background: #fff url('../img/chosen-sprite.png') no-repeat -38px -22px;
background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background: url('../img/chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
background: url('../img/chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%);
padding: 4px 5px 4px 20px;
direction: rtl;
}
/* @end */

View File

@ -1,311 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #analysis-holder
{
background-image: url( ../../img/div.gif );
background-position: 50% 0;
background-repeat: repeat-y;
}
#content #analysis #field-analysis
{
margin-bottom: 0;
}
#content #analysis #field-analysis .content
{
padding-bottom: 0;
}
#content #analysis .settings-holder
{
clear: both;
padding-top: 15px;
}
#content #analysis .settings
{
background-color: #fff;
border-top: 1px solid #fafafa;
border-bottom: 1px solid #fafafa;
padding-top: 10px;
padding-bottom: 10px;
}
#content #analysis .settings select.loader
{
background-position: 3px 50%;
padding-left: 21px;
}
#content #analysis .settings select optgroup
{
font-style: normal;
padding: 5px;
}
#content #analysis .settings select option
{
padding-left: 10px;
}
#content #analysis .settings #tor_schema
{
background-image: url( ../../img/ico/question-white.png );
background-position: 0 50%;
color: #c0c0c0;
margin-left: 5px;
padding-left: 21px;
}
#content #analysis .settings #tor_schema:hover
{
background-image: url( ../../img/ico/question.png );
}
#content #analysis .settings #tor_schema span
{
display: none;
}
#content #analysis .settings #tor_schema:hover span
{
display: inline;
}
#content #analysis .settings .buttons
{
float: right;
width: 47%;
}
#content #analysis .settings button
{
float: right;
}
#content #analysis .settings button span
{
background-image: url( ../../img/ico/funnel.png );
}
#content #analysis .settings .verbose_output
{
float: left;
width: auto;
}
#content #analysis .settings .verbose_output a
{
background-image: url( ../../img/ico/ui-check-box-uncheck.png );
background-position: 0 50%;
color: #999;
display: block;
padding-left: 21px;
}
#content #analysis .settings .verbose_output.active a
{
background-image: url( ../../img/ico/ui-check-box.png );
}
#content #analysis .index label,
#content #analysis .query label
{
display: block;
}
#content #analysis .index textarea,
#content #analysis .query textarea
{
display: block;
width: 100%;
}
#content #analysis .index
{
float: left;
margin-right: 0.5%;
min-width: 47%;
max-width: 99%;
}
#content #analysis .query
{
float: right;
margin-left: 0.5%;
min-width: 47%;
max-width: 99%;
}
#content #analysis .analysis-error
{
background-color: #f00;
background-image: url( ../../img/ico/construction.png );
background-position: 10px 50%;
color: #fff;
display: none;
font-weight: bold;
margin-bottom: 20px;
padding: 10px;
padding-left: 35px;
}
#content #analysis .analysis-error .head a
{
color: #fff;
cursor: auto;
}
#content #analysis #analysis-result
{
overflow: auto;
}
#content #analysis #analysis-result .index,
#content #analysis #analysis-result .query
{
background-color: #fff;
padding-top: 20px;
}
#content #analysis #analysis-result table
{
border-collapse: collapse;
}
#content #analysis #analysis-result td
{
vertical-align: top;
white-space: nowrap;
}
#content #analysis #analysis-result td.part.analyzer div,
#content #analysis #analysis-result td.part.spacer .holder,
#content #analysis #analysis-result td td td
{
padding-top: 1px;
padding-bottom: 1px;
}
#content #analysis #analysis-result td.legend,
#content #analysis #analysis-result td.data tr.verbose_output
{
display: none;
}
#content #analysis #analysis-result.verbose_output td.legend
{
display: table-cell;
}
#content #analysis #analysis-result.verbose_output td.data tr.verbose_output
{
display: table-row;
}
#content #analysis #analysis-result .match
{
background-color: #e9eff7;
background-color: #f2f2ff;
}
#content #analysis #analysis-result td.part
{
padding-bottom: 10px;
}
#content #analysis #analysis-result td.part.analyzer div
{
border-right: 1px solid #f0f0f0;
padding-right: 10px;
}
#content #analysis #analysis-result td.part.analyzer abbr
{
color: #c0c0c0;
}
#content #analysis #analysis-result td.part.legend .holder,
#content #analysis #analysis-result td.part.data .holder
{
padding-left: 10px;
padding-right: 10px;
border-right: 1px solid #c0c0c0;
}
#content #analysis #analysis-result td.part.legend td
{
color: #c0c0c0;
}
#content #analysis #analysis-result td.part.legend .holder
{
border-right-color: #f0f0f0;
}
#content #analysis #analysis-result td.part.data:last-child .holder
{
padding-right: 0;
border-right: 0;
}
#content #analysis #analysis-result td.details
{
padding-left: 10px;
padding-right: 10px;
border-left: 1px solid #f0f0f0;
border-right: 1px solid #f0f0f0;
}
#content #analysis #analysis-result td.details:first-child
{
padding-left: 0;
border-left: 0;
}
#content #analysis #analysis-result td.details:last-child
{
padding-right: 0;
border-right: 0;
}
#content #analysis #analysis-result td.details tr.empty td
{
color: #f0f0f0;
}
#content #analysis #analysis-result td.details tr.raw_bytes td
{
letter-spacing: -1px;
}
#content #analysis #analysis-result .part table table td
{
border-top: 1px solid #f0f0f0;
}
#content #analysis #analysis-result .part table table tr:first-child td
{
border-top: 0;
}
#content #analysis #field-analysis h2 { background-image: url( ../../img/ico/receipt.png ); }
#content #analysis .analysis-result h2 { background-image: url( ../../img/ico/receipt-invoice.png ); }

View File

@ -1,410 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #cloud
{
position: relative;
}
#content #cloud #frame .content
{
display: none;
}
#content #cloud .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #cloud #error
{
background-color: #f00;
background-image: url( ../../img/ico/construction.png );
background-position: 10px 12px;
color: #fff;
font-weight: bold;
margin-bottom: 20px;
padding: 10px;
padding-left: 35px;
}
#content #cloud #error .msg
{
font-style: italic;
font-weight: normal;
margin-top: 10px;
}
#content #cloud #debug
{
background-color: #fff;
box-shadow: 0px 0px 10px #c0c0c0;
-moz-box-shadow: 0px 0px 10px #c0c0c0;
-webkit-box-shadow: 0px 0px 10px #c0c0c0;
display: none;
padding: 20px;
position: absolute;
left: 50px;
top: 10px;
}
#content #cloud #debug ul
{
margin-bottom: 5px;
}
#content #cloud #debug ul a
{
background-position: 4px 50%;
border-right: 0;
display: block;
padding: 2px 4px;
padding-left: 25px;
}
#content #cloud #debug ul a:hover,
#content #cloud #debug ul a.hover
{
background-color: #f0f0f0;
}
#content #cloud #debug .clipboard
{
float: left;
position: relative;
}
#content #cloud #debug .clipboard a
{
background-image: url( ../../img/ico/clipboard-paste.png );
z-index: 98;
}
#content #cloud #debug .clipboard a:hover,
#content #cloud #debug .clipboard a.hover,
#content #cloud #debug .clipboard.copied a
{
background-image: url( ../../img/ico/clipboard-paste-document-text.png );
}
#content #cloud #debug .close
{
float: right;
}
#content #cloud #debug .close a
{
background-image: url( ../../img/ico/cross-0.png );
padding-left: 21px;
}
#content #cloud #debug .close a:hover
{
background-image: url( ../../img/ico/cross-1.png );
}
#content #cloud #debug .debug
{
border: 1px solid #f0f0f0;
max-height: 350px;
overflow: auto;
padding: 5px;
width: 500px;
}
#content #cloud #debug .debug .loader
{
background-position: 5px 50%;
display: block;
padding: 10px 26px;
}
#content #cloud .content
{
padding-left: 0;
padding-right: 0;
}
#content #cloud .content.show
{
background-image: url( ../../img/div.gif );
background-repeat: repeat-y;
background-position: 31% 0;
}
#content #cloud #tree
{
float: left;
width: 30%;
}
#content #cloud .show #tree
{
overflow: hidden;
}
#content #cloud #file-content
{
display: none;
float: right;
position: relative;
width: 68%;
min-height: 100px
}
#content #cloud .show #file-content
{
display: block;
}
#content #cloud #file-content .close
{
background-image: url( ../../img/ico/cross-0.png );
background-position: 50% 50%;
display: block;
height: 20px;
position: absolute;
right: 0;
top: 0;
width: 20px;
}
#content #cloud #file-content .close:hover
{
background-image: url( ../../img/ico/cross-1.png );
}
#content #cloud #file-content .close span
{
display: none;
}
#content #cloud #file-content #data
{
border-top: 1px solid #c0c0c0;
margin-top: 10px;
padding-top: 10px;
}
#content #cloud #file-content #data pre
{
display: block;
max-height: 600px;
overflow: auto;
}
#content #cloud #file-content #data em
{
color: #c0c0c0;
}
#content #cloud #file-content #prop
{
}
#content #cloud #file-content li
{
padding-top: 3px;
padding-bottom: 3px;
}
#content #cloud #file-content li.odd
{
background-color: #F8F8F8;
}
#content #cloud #file-content li dt
{
float: left;
width: 19%;
}
#content #cloud #file-content li dd
{
float: right;
width: 80%;
}
/* tree */
#content #cloud #legend
{
border: 1px solid #f0f0f0;
padding: 10px;
position: absolute;
right: 0;
bottom: 0;
}
#content #cloud #legend li
{
padding-left: 15px;
position: relative;
}
#content #cloud #legend li svg
{
position: absolute;
left: 0;
top: 2px;
}
#content #graph-content
{
min-height: 400px;
}
#content #graph-content .node
{
fill: #333;
}
#content #cloud #legend circle,
#content #graph-content .node circle
{
fill: #fff;
stroke: #c0c0c0;
stroke-width: 1.5px;
}
#content #graph-content .node.lvl-3 text
{
cursor: pointer;
}
#content #graph-content .node.lvl-3:hover circle
{
stroke: #000 !important;
}
#content #graph-content .node.lvl-3:hover text
{
fill: #000 !important;
}
#content #graph-content .link
{
fill: none;
stroke: #e0e0e0;
stroke-width: 1.5px;
}
#content #cloud #legend .gone circle,
#content #graph-content .node.gone circle,
#content #graph-content .link.gone
{
stroke: #f0f0f0;
}
#content #graph-content .node.gone text
{
fill: #f0f0f0;
}
#content #cloud #legend ul .gone
{
color: #e0e0e0;
}
#content #cloud #legend .recovery_failed,
#content #cloud #legend .recovery_failed circle,
#content #graph-content .node.recovery_failed circle
{
color: #C43C35;
stroke: #C43C35;
}
#content #graph-content .node.recovery_failed text
{
fill: #C43C35;
}
#content #cloud #legend .down,
#content #cloud #legend .down circle,
#content #graph-content .node.down circle
{
color: #c48f00;
stroke: #c48f00;
}
#content #graph-content .node.down text
{
fill: #c48f00;
}
#content #cloud #legend .recovering,
#content #cloud #legend .recovering circle,
#content #graph-content .node.recovering circle
{
color: #d5dd00;
stroke: #d5dd00;
}
#content #graph-content .node.recovering text
{
fill: #d5dd00;
}
#content #cloud #legend .active,
#content #cloud #legend .active circle,
#content #graph-content .node.active circle
{
color: #57A957;
stroke: #57A957;
}
#content #graph-content .node.active text
{
fill: #57A957;
}
#content #cloud #legend .leader circle,
#content #graph-content .node.leader circle
{
fill: #000;
}
#content #cloud #legend .leader circle
{
stroke: #fff;
}
#content #graph-content .link.lvl-2,
#content #graph-content .link.leader
{
stroke: #c0c0c0;
}
#content #graph-content .node.lvl-0 circle
{
stroke: #fff;
}
#content #graph-content .link.lvl-1
{
stroke: #fff;
}
#cloudGraphPaging
{
display: inline-block,
padding-top: 15px,
padding-bottom: 15px
}

View File

@ -1,731 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
*
{
background-repeat: no-repeat;
margin: 0;
padding: 0;
}
body, h1, h2, h3, h4, h5, h6, a, button, input, select, option, textarea, th, td
{
color: #333;
font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif;
}
body
{
padding: 30px;
text-align: center;
}
a, button
{
cursor: pointer;
}
input, select, textarea
{
border: 1px solid #c0c0c0;
padding: 2px;
}
input[readonly=readonly]
{
border-color: #f0f0f0;
}
button
{
background-color: #e6e6e6;
background-repeat: no-repeat;
background-image: -webkit-gradient( linear, 0 0, 0 100%, from( #ffffff ), color-stop( 25%, #ffffff ), to( #e6e6e6 ) );
background-image: -webkit-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 );
background-image: -moz-linear-gradient( top, #ffffff, #ffffff 25%, #e6e6e6 );
background-image: -ms-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 );
background-image: -o-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 );
background-image: linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 );
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0 );
border: 1px solid #ccc;
border-bottom-color: #bbb;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-khtml-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 );
-moz-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 );
box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 );
color: #333;
cursor: pointer;
display: inline-block;
padding: 4px 7px 5px;
overflow: visible;
text-shadow: 0 1px 1px rgba( 255, 255, 255, 0.75 );
-webkit-transition: 0.1s linear background-image;
-moz-transition: 0.1s linear background-image;
-ms-transition: 0.1s linear background-image;
-o-transition: 0.1s linear background-image;
transition: 0.1s linear background-image;
}
button span
{
background-position: 0 50%;
display: block;
padding-left: 21px;
}
button[type=submit], button.primary
{
background-color: #0064cd;
background-repeat: repeat-x;
background-image: -khtml-gradient( linear, left top, left bottom, from( #049cdb ), to( #0064cd ) );
background-image: -moz-linear-gradient( top, #049cdb, #0064cd );
background-image: -ms-linear-gradient( top, #049cdb, #0064cd );
background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #049cdb ), color-stop( 100%, #0064cd ) );
background-image: -webkit-linear-gradient( top, #049cdb, #0064cd );
background-image: -o-linear-gradient( top, #049cdb, #0064cd );
background-image: linear-gradient( top, #049cdb, #0064cd );
border-color: #0064cd #0064cd #003f81;
border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 );
color: #ffffff;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0 );
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
button.success
{
background-color: #57a957;
background-repeat: repeat-x;
background-image: -khtml-gradient( linear, left top, left bottom, from( #62c462 ), to( #57a957 ) );
background-image: -moz-linear-gradient( top, #62c462, #57a957 );
background-image: -ms-linear-gradient( top, #62c462, #57a957 );
background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #62c462 ), color-stop( 100%, #57a957 ) );
background-image: -webkit-linear-gradient( top, #62c462, #57a957 );
background-image: -o-linear-gradient( top, #62c462, #57a957 );
background-image: linear-gradient( top, #62c462, #57a957 );
border-color: #57a957 #57a957 #3d773d;
border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 );
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#62c462', endColorstr='#57a957', GradientType=0 );
color: #ffffff;
text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 );
}
button.warn
{
background-color: #c43c35;
background-repeat: repeat-x;
background-image: -khtml-gradient( linear, left top, left bottom, from( #ee5f5b ), to( #c43c35 ) );
background-image: -moz-linear-gradient( top, #ee5f5b, #c43c35 );
background-image: -ms-linear-gradient( top, #ee5f5b, #c43c35 );
background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #ee5f5b ), color-stop( 100%, #c43c35 ) );
background-image: -webkit-linear-gradient( top, #ee5f5b, #c43c35 );
background-image: -o-linear-gradient( top, #ee5f5b, #c43c35 );
background-image: linear-gradient( top, #ee5f5b, #c43c35 );
border-color: #c43c35 #c43c35 #882a25;
border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 );
color: #ffffff;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0 );
text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 );
}
a
{
text-decoration: none;
}
pre
{
color: #333;
text-align: left;
}
abbr
{
cursor: help;
}
ul
{
list-style: none;
}
.clearfix:after { clear: both; content: "."; display: block; font-size: 0; height: 0; visibility: hidden; }
.clearfix { display: block; }
.loader
{
background-image: url( ../../img/loader.gif ) !important;
}
.loader-light
{
background-image: url( ../../img/loader-light.gif ) !important;
}
#wrapper
{
position: relative;
margin: 0 auto;
margin-bottom: 30px;
text-align: left;
}
#header
{
padding-bottom: 10px;
position: fixed;
z-index: 42;
}
.scroll #header
{
position: absolute;
}
#header #solr
{
background-image: url( ../../img/solr.svg );
background-size: 128px;
display: block;
height: 78px;
width: 150px;
}
#header #solr span
{
display: none;
}
#main
{
min-width: 750px;
position: relative;
}
#main.error
{
border: 0;
min-height: 0;
padding-top: 20px;
}
#main.error .message
{
background-color: #f00;
background-image: url( ../../img/ico/construction.png );
background-position: 10px 50%;
color: #fff;
font-weight: bold;
margin-left: 150px;
margin-bottom: 20px;
padding: 10px;
padding-left: 35px;
}
#main.error .code
{
border: 1px solid #c0c0c0;
padding: 5px;
}
#meta
{
position: absolute;
bottom: -26px;
right: 0;
}
#meta li
{
float: left;
}
#meta li a
{
background-position: 10px 50%;
display: block;
height: 25px;
line-height: 25px;
padding-left: 31px;
padding-right: 10px;
}
#meta li a:hover
{
background-color: #f0f0f0;
}
#meta .documentation a { background-image: url( ../../img/ico/document-text.png ); }
#meta .issues a { background-image: url( ../../img/ico/bug.png ); }
#meta .irc a { background-image: url( ../../img/ico/users.png ); }
#meta .mailinglist a { background-image: url( ../../img/ico/mail.png ); }
#meta .wiki-query-syntax a { background-image: url( ../../img/ico/script-code.png ); }
#environment
{
background-image: url( ../../img/ico/box.png );
background-position: 5px 50%;
display: none;
font-weight: bold;
margin-top: 10px;
padding: 5px 10px;
padding-left: 26px;
}
.has-environment #environment
{
display: block;
}
#environment.prod
{
background-color: #c37f7f;
color: #fff;
}
#environment.test
{
background-color: #f5f5b2;
}
#environment.dev
{
background-color: #cce7cc;
}
#init-failures
{
border: 1px solid #f00;
display: none;
margin-left: 150px;
margin-bottom: 20px;
}
#init-failures h2,
#init-failures ul,
#init-failures p
{
padding: 10px;
}
#init-failures h2
{
background-color: #f00;
color: #fff;
font-weight: bold;
}
#init-failures p
{
color: #c0c0c0;
padding-top: 0;
}
#content-wrapper
{
margin-left: 150px;
border: 1px solid #c0c0c0;
min-height: 500px;
}
#content
{
padding: 10px;
}
#content > .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content iframe
{
border: 0;
display: block;
min-height: 400px;
width: 100%;
}
#content .block
{
margin-bottom: 10px;
}
#content .block h2
{
background-color: #fafafa;
background-position: 5px 50%;
border-bottom: 1px solid #f0f0f0;
font-weight: bold;
padding: 5px;
padding-left: 26px;
}
#content .block.disabled,
#content .block.disabled h2
{
color: #c0c0c0;
}
#content .block .message,
#content .block .content
{
padding: 5px;
}
#content .block .message
{
display: none;
}
/* syntax */
pre.syntax
{
overflow: auto;
}
pre.syntax code
{
display: block;
color: #000;
}
pre.syntax .comment,
pre.syntax .template_comment,
pre.syntax .diff .header,
pre.syntax .javadoc
{
color: #998;
font-style: italic;
}
pre.syntax .keyword,
pre.syntax .css .rule .keyword,
pre.syntax .winutils,
pre.syntax .javascript .title,
pre.syntax .lisp .title,
pre.syntax .subst
{
color: #000;
font-weight: bold;
}
pre.syntax .number,
pre.syntax .hexcolor
{
color: #40a070;
}
pre.syntax.language-json .number
{
color: blue;
}
pre.syntax.language-json .literal
{
color: firebrick;
}
pre.syntax .string,
pre.syntax .tag .value,
pre.syntax .phpdoc,
pre.syntax .tex .formula
{
color: #d14;
}
pre.syntax.language-json .string
{
color: green;
}
pre.syntax .title,
pre.syntax .id
{
color: #900;
font-weight: bold;
}
pre.syntax .javascript .title,
pre.syntax .lisp .title,
pre.syntax .subst
{
font-weight: normal;
}
pre.syntax .class .title,
pre.syntax .tex .command
{
color: #458;
font-weight: bold;
}
pre.syntax .tag,
pre.syntax .css .keyword,
pre.syntax .html .keyword,
pre.syntax .tag .title,
pre.syntax .django .tag .keyword
{
color: #000080;
font-weight: normal;
}
pre.syntax .attribute,
pre.syntax .variable,
pre.syntax .instancevar,
pre.syntax .lisp .body
{
color: #008080;
}
pre.syntax.language-json .attribute
{
color: black;
font-weight: bold;
}
pre.syntax .regexp
{
color: #009926;
}
pre.syntax .class
{
color: #458;
font-weight: bold;
}
pre.syntax .symbol,
pre.syntax .ruby .symbol .string,
pre.syntax .ruby .symbol .keyword,
pre.syntax .ruby .symbol .keymethods,
pre.syntax .lisp .keyword,
pre.syntax .tex .special
{
color: #990073;
}
pre.syntax .builtin,
pre.syntax .built_in,
pre.syntax .lisp .title
{
color: #0086b3;
}
pre.syntax .preprocessor,
pre.syntax .pi,
pre.syntax .doctype,
pre.syntax .shebang,
pre.syntax .cdata
{
color: #999;
font-weight: bold;
}
pre.syntax .deletion
{
background: #fdd;
}
pre.syntax .addition
{
background: #dfd;
}
pre.syntax .diff .change
{
background: #0086b3;
}
pre.syntax .chunk
{
color: #aaa;
}
pre.syntax .tex .formula
{
opacity: 0.5;
}
#content .tree li,
#content .tree ins
{
background-color: transparent;
background-image: url( ../../img/tree.png );
background-repeat: no-repeat;
}
#content .tree li
{
background-position: -54px 0;
background-repeat: repeat-y;
line-height: 22px;
}
#content .tree li.jstree-last
{
background:transparent;
}
#content .tree .jstree-open > ins
{
background-position: -36px 0;
}
#content .tree .jstree-closed > ins
{
background-position: -18px 0;
}
#content .tree .jstree-leaf > ins
{
background-position: 0 0;
}
#content .tree .jstree-hovered
{
background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px;
}
#content .tree .jstree-clicked
{
background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px;
}
#content .tree a.active
{
background-color: #f0f0f0;
color: #00f;
}
#content .tree a .jstree-icon
{
background-image: url( ../../img/ico/folder.png );
}
#content .tree .jstree-leaf a .jstree-icon
{
background-image: url( ../../img/ico/document-text.png );
}
#content .tree .jstree-search
{
font-style:italic;
}
#content .tree a.jstree-search
{
color:aqua;
}
#connection_status
{
display: none;
padding: 30px;
}
#connection_status span
{
background-image: url( ../../img/ico/network-status-busy.png );
background-position: 0 50%;
color: #800;
padding-left: 26px;
}
#connection_status.online span,
#connection_status.online span a
{
color: #080;
}
#connection_status.online span
{
background-image: url( ../../img/ico/network-status.png );
}
#connection_status.online span a
{
text-decoration: underline;
}
#connection_status.online span a:hover
{
text-decoration: none;
}
#content .address-bar
{
margin-bottom: 10px;
background-image: url( ../../img/ico/ui-address-bar.png );
background-position: 5px 50%;
border: 1px solid #f0f0f0;
box-shadow: 1px 1px 0 #f0f0f0;
-moz-box-shadow: 1px 1px 0 #f0f0f0;
-webkit-box-shadow: 1px 1px 0 #f0f0f0;
color: #c0c0c0;
display: block;
overflow: hidden;
padding: 5px;
padding-left: 26px;
white-space: nowrap;
}
#content .address-bar:focus,
#content .address-bar:hover
{
border-color: #c0c0c0;
box-shadow: 1px 1px 0 #d8d8d8;
-moz-box-shadow: 1px 1px 0 #d8d8d8;
-webkit-box-shadow: 1px 1px 0 #d8d8d8;
color: #333;
}
.other-ui-link {
margin: 0px;
position: absolute;
right: 0px;
top: -20px;
}
.other-ui-link span.help {
background-image: url( ../../img/ico/information-white.png );
right: 0px;
padding-left: 16px;
}
.other-ui-link a.ul {
text-decoration: underline;
}
.old-ui-warning {
position: absolute;
right: 0px;
top: -20px;
align: center;
color: red;
font-weight: bold;
}
.old-ui-warning a.ul {
color: red;
font-weight: bold;
text-decoration: underline;
}

View File

@ -1,244 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #cores
{
position: relative;
}
#content #cores #ui-block
{
background-color: #fff;
height: 200px;
display: none;
position: absolute;
left: -5px;
top: 35px;
width: 500px;
}
#content #cores.empty .requires-core
{
display: none;
}
#content #cores #frame
{
float: right;
width: 86%;
}
#content #cores #navigation
{
padding-top: 50px;
width: 12%;
}
#content #cores #navigation a
{
padding-left: 5px;
}
#content #cores #frame .actions
{
margin-bottom: 20px;
min-height: 30px;
}
#content #cores .actions div.action
{
width: 300px;
}
#content #cores .actions div.action .cloud
{
display: none;
}
#content #cores .actions form .directory-note
{
background-image: url( ../../img/ico/information-white.png );
background-position: 22% 1px;
color: #c0c0c0;
}
#content #cores .actions form .error
{
background-image: url( ../../img/ico/cross-button.png );
background-position: 22% 1px;
color: #c00;
font-weight: bold;
display: none;
}
#content #cores .actions form p
{
padding-bottom: 8px;
}
#content #cores .actions form label
{
float: left;
padding-top: 3px;
padding-bottom: 3px;
text-align: right;
width: 25%;
}
#content #cores .actions form input,
#content #cores .actions form select,
#content #cores .actions form .buttons,
#content #cores .actions form .note span
{
float: right;
width: 71%;
}
#content #cores .actions form .note span
{
padding-left: 3px;
padding-right: 3px;
}
#content #cores .actions form .buttons
{
padding-top: 10px;
}
#content #cores .actions form button.submit
{
margin-right: 20px;
}
#content #cores .actions form button.submit span
{
background-image: url( ../../img/ico/tick.png );
}
#content #cores .actions form button.reset span
{
background-image: url( ../../img/ico/cross.png );
}
#content #cores .actions #add
{
left: 0;
position: absolute;
}
#content #cores .actions #add span
{
background-image: url( ../../img/ico/plus-button.png );
}
#content #cores .actions #unload
{
margin-right: 20px;
}
#content #cores .actions #unload span
{
background-image: url( ../../img/ico/cross.png );
}
#content #cores .actions #reload span
{
background-image: url( ../../img/ico/arrow-circle.png );
}
#content #cores .actions #rename span
{
background-image: url( ../../img/ico/ui-text-field-select.png );
}
#content #cores .actions #swap span
{
background-image: url( ../../img/ico/arrow-switch.png );
}
#content #cores .actions #optimize
{
display: none;
}
#content #cores .actions #optimize span
{
background-image: url( ../../img/ico/hammer-screwdriver.png );
}
#content #cores .actions div.action
{
background-color: #fff;
border: 1px solid #f0f0f0;
box-shadow: 5px 5px 10px #c0c0c0;
-moz-box-shadow: 5px 5px 10px #c0c0c0;
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
display: none;
position: absolute;
left: -50px;
top: 40px;
padding: 10px;
}
#content #cores #data #core-data h2 { background-image: url( ../../img/ico/box.png ); }
#content #cores #data #index-data h2 { background-image: url( ../../img/ico/chart.png ); }
#content #cores #data #index-data
{
margin-top: 10px;
}
#content #cores #data li
{
padding-bottom: 3px;
padding-top: 3px;
}
#content #cores #data li.odd
{
background-color: #f8f8f8;
}
#content #cores #data li dt
{
float: left;
width: 17%;
}
#content #cores #data li dd
{
float: right;
width: 82%;
}
#content #cores #data li dd.ico
{
background-image: url( ../../img/ico/slash.png );
height: 20px;
}
#content #cores #data li dd.ico.ico-1
{
background-image: url( ../../img/ico/tick.png );
}
#content #cores #data li dd.ico span
{
display: none;
}

View File

@ -1,155 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #dashboard .block
{
background-image: none;
width: 49%;
}
#content #dashboard .fieldlist
{
float: left;
}
#content #dashboard .fieldlist dt,
#content #dashboard .fieldlist dd
{
display: block;
float: left;
}
#content #dashboard .fieldlist dt
{
clear: left;
margin-right: 2%;
text-align: right;
width: 23%;
}
#content #dashboard .fieldlist dd
{
width: 74%;
}
#content #dashboard .fieldlist .index_optimized
{
margin-top: 10px;
}
#content #dashboard .fieldlist .ico
{
background-image: url( ../../img/ico/slash.png );
height: 20px;
}
#content #dashboard .fieldlist .ico.ico-1
{
background-image: url( ../../img/ico/tick.png );
}
#content #dashboard .fieldlist .ico span
{
display: none;
}
#content #dashboard #statistics .index_optimized.value a
{
display: none;
}
#content #dashboard #statistics .index_optimized.value.ico-0 a
{
background-color: #f0f0f0;
background-image: url( ../../img/ico/hammer-screwdriver.png );
background-position: 5px 50%;
border: 1px solid #c0c0c0;
display: block;
float: left;
margin-left: 50px;
padding: 1px 5px;
padding-left: 26px;
}
#content #dashboard #statistics .index_has-deletions
{
display: none;
}
#content #dashboard #statistics .index_has-deletions.value.ico-0
{
background-image: url( ../../img/ico/tick-red.png );
}
#content #dashboard #replication
{
float: left;
}
#content #dashboard #replication .is-replicating
{
background-position: 99% 50%;
display: block;
}
#content #dashboard #replication #details table thead td span
{
display: none;
}
#content #dashboard #instance
{
float: right;
}
#content #dashboard #instance .dir_impl
{
margin-top: 10px;
}
#content #dashboard #admin-extra
{
float: left;
}
#content #dashboard #healthcheck
{
float: right;
}
#content #dashboard #healthcheck .ico
{
background-image: url( ../../img/ico/slash.png );
height: 20px;
padding-left: 20px;
width: 60%;
}
#content #dashboard #healthcheck .ico.ico-1
{
background-image: url( ../../img/ico/tick.png );
}
#content #dashboard #system h2 { background-image: url( ../../img/ico/server.png ); }
#content #dashboard #statistics h2 { background-image: url( ../../img/ico/chart.png ); }
#content #dashboard #replication h2 { background-image: url( ../../img/ico/node.png ); }
#content #dashboard #replication.master h2 { background-image: url( ../../img/ico/node-master.png ); }
#content #dashboard #replication.slave h2 { background-image: url( ../../img/ico/node-slave.png ); }
#content #dashboard #instance h2 { background-image: url( ../../img/ico/server.png ); }
#content #dashboard #admin-extra h2 { background-image: url( ../../img/ico/plus-button.png ); }

View File

@ -1,403 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #dataimport
{
background-image: url( ../../img/div.gif );
background-position: 21% 0;
background-repeat: repeat-y;
}
#content #dataimport #frame
{
float: right;
width: 78%;
}
#content #dataimport #form
{
float: left;
width: 20%;
}
#content #dataimport #form #navigation
{
border-right: 0;
}
#content #dataimport #form #navigation a
{
background-image: url( ../../img/ico/status-offline.png );
}
#content #dataimport #form #navigation .current a
{
background-image: url( ../../img/ico/status.png );
}
#content #dataimport #form form
{
display: none;
border-top: 1px solid #f0f0f0;
margin-top: 10px;
padding-top: 5px;
}
#content #dataimport.error #form form
{
display: none !important;
}
#content #dataimport #form label
{
cursor: pointer;
display: block;
margin-top: 5px;
}
#content #dataimport #form input,
#content #dataimport #form select,
#content #dataimport #form textarea
{
margin-bottom: 2px;
width: 100%;
}
#content #dataimport #form input
{
width: 98%;
}
#content #dataimport #form button
{
margin-top: 10px;
}
#content #dataimport #form .execute span
{
background-image: url( ../../img/ico/document-import.png );
}
#content #dataimport #form .refresh-status span
{
background-image: url( ../../img/ico/arrow-circle.png );
}
#content #dataimport #form .refresh-status span.success
{
background-image: url( ../../img/ico/tick.png );
}
#content #dataimport #form #start
{
float: left;
width: 47%;
}
#content #dataimport #form #rows
{
float: right;
width: 47%;
}
#content #dataimport #form .checkbox input
{
margin-bottom: 0;
width: auto;
}
#content #dataimport #form #auto-refresh-status
{
margin-top: 20px;
}
#content #dataimport #form #auto-refresh-status a
{
background-image: url( ../../img/ico/ui-check-box-uncheck.png );
background-position: 0 50%;
color: #c0c0c0;
display: block;
padding-left: 21px;
}
#content #dataimport #form #auto-refresh-status a.on,
#content #dataimport #form #auto-refresh-status a:hover
{
color: #333;
}
#content #dataimport #form #auto-refresh-status a.on
{
background-image: url( ../../img/ico/ui-check-box.png );
}
#content #dataimport #current_state
{
padding: 10px;
margin-bottom: 20px;
}
#content #dataimport.error #current_state
{
display: none !important;
}
#content #dataimport #current_state .last_update,
#content #dataimport #current_state .info
{
display: block;
padding-left: 21px;
}
#content #dataimport #current_state .last_update
{
color: #c0c0c0;
font-size: 11px;
}
#content #dataimport #current_state .info
{
background-position: 0 1px;
position: relative;
}
#content #dataimport #current_state .info .details span
{
color: #c0c0c0;
}
#content #dataimport #current_state .info .abort-import
{
display: none;
position: absolute;
right: 0px;
top: 0px;
}
#content #dataimport #current_state .info .abort-import span
{
background-image: url( ../../img/ico/cross.png );
}
#content #dataimport #current_state .info .abort-import.success span
{
background-image: url( ../../img/ico/tick.png );
}
#content #dataimport #current_state.indexing
{
background-color: #f9f9f9;
}
#content #dataimport #current_state.indexing .info
{
background-image: url( ../../img/ico/hourglass.png );
}
#content #dataimport #current_state.indexing .info .abort-import
{
display: block;
}
#content #dataimport #current_state.success
{
background-color: #e6f3e6;
}
#content #dataimport #current_state.success .info
{
background-image: url( ../../img/ico/tick-circle.png );
}
#content #dataimport #current_state.success .info strong
{
color: #080;
}
#content #dataimport #current_state.aborted
{
background-color: #f3e6e6;
}
#content #dataimport #current_state.aborted .info
{
background-image: url( ../../img/ico/slash.png );
}
#content #dataimport #current_state.aborted .info strong
{
color: #800;
}
#content #dataimport #current_state.failure
{
background-color: #f3e6e6;
}
#content #dataimport #current_state.failure .info
{
background-image: url( ../../img/ico/cross-button.png );
}
#content #dataimport #current_state.failure .info strong
{
color: #800;
}
#content #dataimport #current_state.idle
{
background-color: #e6e6ff;
}
#content #dataimport #current_state.idle .info
{
background-image: url( ../../img/ico/information.png );
}
#content #dataimport #error
{
background-color: #f00;
background-image: url( ../../img/ico/construction.png );
background-position: 10px 50%;
color: #fff;
display: none;
font-weight: bold;
margin-bottom: 20px;
padding: 10px;
padding-left: 35px;
}
#content #dataimport .block h2
{
border-color: #c0c0c0;
padding-left: 5px;
position: relative;
}
#content #dataimport .block.hidden h2
{
border-color: #fafafa;
}
#content #dataimport .block h2 a.toggle
{
background-image: url( ../../img/ico/toggle-small.png );
background-position: 0 50%;
padding-left: 21px;
}
#content #dataimport .block.hidden h2 a.toggle
{
background-image: url( ../../img/ico/toggle-small-expand.png );
}
#content #dataimport #config h2 a.r
{
background-position: 3px 50%;
display: block;
float: right;
margin-left: 10px;
padding-left: 24px;
padding-right: 3px;
}
#content #dataimport #config h2 a.reload_config
{
background-image: url( ../../img/ico/arrow-circle.png );
}
#content #dataimport #config h2 a.reload_config.success
{
background-image: url( ../../img/ico/tick.png );
}
#content #dataimport #config h2 a.reload_config.error
{
background-image: url( ../../img/ico/slash.png );
}
#content #dataimport #config h2 a.debug_mode
{
background-image: url( ../../img/ico/hammer.png );
color: #c0c0c0;
}
#content #dataimport #config.debug_mode h2 a.debug_mode
{
background-color: #ff0;
background-image: url( ../../img/ico/hammer-screwdriver.png );
color: #333;
}
#content #dataimport .block.hidden .content
{
display: none;
}
#content #dataimport #config .content
{
padding: 5px 2px;
}
#content #dataimport #dataimport_config .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #dataimport #dataimport_config .formatted
{
border: 1px solid #fff;
display: block;
padding: 2px;
}
#content #dataimport .debug_mode #dataimport_config .formatted
{
display: none;
}
#content #dataimport #dataimport_config .editable
{
display: none;
}
#content #dataimport .debug_mode #dataimport_config .editable
{
display: block;
}
#content #dataimport #dataimport_config .editable textarea
{
font-family: monospace;
height: 120px;
min-height: 60px;
width: 100%;
}
#content #dataimport #debug_response
{
display: none;
}
#content #dataimport #debug_response em
{
color: #c0c0c0;
font-style: normal;
}

View File

@ -1,197 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #documents
{
background-image: url( ../../img/div.gif );
background-position: 45% 0;
background-repeat: repeat-y;
}
#content #documents #form
{
float: left;
/*width: 21%;*/
}
#content #documents #form label
{
cursor: pointer;
display: block;
margin-top: 5px;
}
#content #documents #form input,
#content #documents #form select,
#content #documents #form textarea
{
margin-bottom: 2px;
/*width: 100%;*/
}
#content #documents #form input,
#content #documents #form textarea
{
margin-bottom: 2px;
/*width: 98%;*/
}
#content #documents #form #start
{
float: left;
/*width: 45%;*/
}
#content #documents #form #rows
{
float: right;
/* width: 45%;*/
}
#content #documents #form .checkbox input
{
margin-bottom: 0;
width: auto;
}
#content #documents #form fieldset,
#content #documents #form .optional.expanded
{
border: 1px solid #fff;
border-top: 1px solid #c0c0c0;
margin-bottom: 5px;
}
#content #documents #form fieldset.common
{
margin-top: 10px;
}
#content #documents #form fieldset legend,
#content #documents #form .optional.expanded legend
{
display: block;
margin-left: 10px;
padding: 0px 5px;
}
#content #documents #form fieldset legend label
{
margin-top: 0;
}
#content #documents #form fieldset .fieldset
{
border-bottom: 1px solid #f0f0f0;
margin-bottom: 5px;
padding-bottom: 10px;
}
#content #documents #form .optional
{
border: 0;
}
#content #documents #form .optional .fieldset
{
display: none;
}
#content #documents #form .optional legend
{
margin-left: 0;
padding-left: 0;
}
#content #documents #form .optional.expanded .fieldset
{
display: block;
}
#content #documents #file-upload{
display: none;
}
#content #documents #result
{
display: none;
float: right;
width: 54%;
}
#content #documents #result #url
{
margin-bottom: 10px;
background-image: url( ../../img/ico/ui-address-bar.png );
background-position: 5px 50%;
border: 1px solid #f0f0f0;
box-shadow: 1px 1px 0 #f0f0f0;
-moz-box-shadow: 1px 1px 0 #f0f0f0;
-webkit-box-shadow: 1px 1px 0 #f0f0f0;
color: #c0c0c0;
display: block;
overflow: hidden;
padding: 5px;
padding-left: 26px;
white-space: nowrap;
}
#content #documents #result #url:focus,
#content #documents #result #url:hover
{
border-color: #c0c0c0;
box-shadow: 1px 1px 0 #d8d8d8;
-moz-box-shadow: 1px 1px 0 #d8d8d8;
-webkit-box-shadow: 1px 1px 0 #d8d8d8;
color: #333;
}
#content #documents #result #response
{
}
#content #documents #result #response pre
{
padding-left: 20px;
}
.description{
font-weight: bold;
}
#upload-only{
display: none;
}
#document-type{
padding-bottom: 5px;
}
#wizard{
display: none;
}
#wizard-fields div{
padding-top: 5px;
padding-bottom: 5px;
}
#wiz-field-data, #wiz-field-data span{
vertical-align: top;
}

View File

@ -1,54 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #files #tree-holder
{
float: left;
width: 20%;
}
#content #files #tree-holder li
{
overflow: hidden;
}
#content #files form .buttons button
{
float: right;
}
#content #files #file-content
{
display: none;
float: right;
position: relative;
width: 78%;
min-height: 100px
}
#content #files .show #file-content
{
display: block;
}
#content #files #file-content .response
{
border: 1px solid transparent;
padding: 2px;
}

View File

@ -1,207 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #index .bar-desc
{
color: #c0c0c0;
font-weight: normal;
margin-left: 10px;
white-space: pre;
}
#content #index .bar-holder
{
box-shadow: 5px 5px 10px #c0c0c0;
-moz-box-shadow: 5px 5px 10px #c0c0c0;
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
height: 35px;
}
#content #index .bar-holder .bar
{
height: 100%;
position: relative;
}
#content #index .bar-holder div .val
{
border-right: 1px solid #f00;
display: block;
padding-right: 5px;
position: absolute;
right: 0;
top: 35px;
white-space: nowrap;
}
#content #index .bar-holder .bar-max.bar
{
background-color: #f0f0f0;
}
#content #index .bar-holder .bar-max.val
{
border-color: #f0f0f0;
color: #d6d6d6;
}
#content #index .bar-holder .bar-total.bar
{
background-color: #c0c0c0;
}
#content #index .bar-holder .bar-total.val
{
border-color: #c0c0c0;
color: #c0c0c0;
}
#content #index .bar-holder .bar-used.bar
{
background-color: #969696;
}
#content #index .bar-holder .bar-used.val
{
border-color: #969696;
color: #969696;
}
#content #index .bar-holder.bar-lvl-2 .bar-max.val { padding-top: 25px; }
#content #index .bar-holder.bar-lvl-2 .bar-total.val { padding-top: 5px; }
#content #index .bar-holder.bar-lvl-2 { margin-bottom: 45px; }
#content #index .bar-holder.bar-lvl-3 .bar-max.val { padding-top: 45px; }
#content #index .bar-holder.bar-lvl-3 .bar-total.val { padding-top: 25px; }
#content #index .bar-holder.bar-lvl-3 .bar-used.val { padding-top: 5px; }
#content #index .bar-holder.bar-lvl-3 { margin-bottom: 65px; }
#content #index .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #index .index-left
{
float: left;
width: 55%;
}
#content #index .index-right
{
float: right;
width: 40%;
}
#content #index .data li
{
display: none;
padding-top: 3px;
padding-bottom: 3px;
}
#content #index .data li dt
{
float: left;
white-space: nowrap;
width: 20%;
}
#content #index .data li dd
{
float: right;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 80%
}
#content #index .data li dd.odd
{
color: #999;
}
#content #index .data dt span
{
background-position: 1px 50%;
display: block;
padding-left: 22px;
}
#content #index #instance h2 { background-image: url( ../../img/ico/server.png ); }
#content #index #instance .start_time dt span { background-image: url( ../../img/ico/clock-select.png ); }
#content #index #versions h2 { background-image: url( ../../img/ico/property.png ); }
#content #index #versions .solr span { background-image: url( ../../img/solr-ico.png ); }
#content #index #versions .lucene span { background-image: url( ../../img/lucene-ico.png ); }
#content #index #jvm h2 { background-image: url( ../../img/ico/jar.png ); }
#content #index #jvm .jvm_version dt span { background-image: url( ../../img/ico/jar.png ); }
#content #index #jvm .processors dt span { background-image: url( ../../img/ico/processor.png ); }
#content #index #jvm .command_line_args dt span { background-image: url( ../../img/ico/terminal.png ); }
#content #index #system h2 { background-image: url( ../../img/ico/system-monitor.png ); }
#content #index #system
{
position: relative;
}
#content #index #system .reload
{
background-image: url( ../../img/ico/arrow-circle.png );
background-position: 50% 50%;
display: block;
height: 30px;
position: absolute;
right: 0;
top: 0;
width: 30px;
}
#content #index #system .reload.loader
{
padding-left: 0;
}
#content #index #system .reload span
{
display: none;
}
#content #index #system .content p
{
margin-top: 10px;
margin-bottom: 5px;
}
#content #index #system .content .no-info
{
color: #c0c0c0;
display: none;
font-style: italic;
}
#content #index #jvm-memory h2 { background-image: url( ../../img/ico/memory.png ); }
#content #index #jvm-memory-bar
{
margin-top: 20px;
}

View File

@ -1,391 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #logging .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #logging .block h2
{
background-image: url( ../../img/ico/document-text.png );
margin-bottom: 10px;
}
#content #logging .block h2 span span
{
color: #c0c0c0;
font-weight: normal;
margin-left: 10px;
}
#content #logging #viewer
{
position: relative;
}
#content #logging #viewer time
{
white-space: pre;
}
#content #logging #viewer #footer
{
margin-top: 20px;
}
#content #logging #viewer #state
{
background-position: 0 50%;
float: left;
color: #c0c0c0;
padding-left: 21px;
width: 45%;
}
#content #logging #viewer #date-format
{
float: right;
}
#content #logging #viewer #date-format a
{
background-image: url( ../../img/ico/ui-check-box-uncheck.png );
background-position: 0 50%;
color: #c0c0c0;
display: block;
padding-left: 21px;
}
#content #logging #viewer #date-format a:hover
{
color: #008;
}
#content #logging #viewer #date-format a.on
{
background-image: url( ../../img/ico/ui-check-box.png );
color: #333;
}
#content #logging #viewer table
{
border-collapse: collapse;
width: 100%;
}
#content #logging #viewer th,
#content #logging #viewer td a,
#content #logging #viewer tbody .trace td
{
padding: 3px 10px;
}
#content #logging #viewer td
{
vertical-align: top;
}
#content #logging #viewer td a
{
display: block;
}
#content #logging #viewer thead th
{
font-weight: bold;
text-align: left;
}
#content #logging #viewer tbody td,
#content #logging #viewer tfoot td
{
border-top: 1px solid #f0f0f0;
}
#content #logging #viewer thead th.message
{
width:100%;
}
#content #logging #viewer tbody td.span a
{
padding-left: 0;
padding-right: 0;
}
#content #logging #viewer tbody span
{
display: block;
padding-left: 10px;
padding-right: 10px;
}
#content #logging #viewer tbody .level-info .level span { background-color: #ebf5eb; }
#content #logging #viewer tbody .level-warning span { background-color: #FFD930; }
#content #logging #viewer tbody .level-severe span { background-color: #c43c35; color: #fff; }
#content #logging #viewer tbody .level-debug span { background-color: #ebf5eb; }
#content #logging #viewer tbody .level-warn span { background-color: #FFD930; }
#content #logging #viewer tbody .level-error span { background-color: #FF6130; }
#content #logging #viewer tbody .level-fatal span { background-color: #c43c35; }
#content #logging #viewer tbody .has-trace a
{
cursor: pointer;
}
#content #logging #viewer tbody .has-trace a:hover
{
color: #008;
}
#content #logging #viewer tbody .has-trace .message a
{
background-image: url( ../../img/ico/information.png );
background-position: 100% 50%;
display: block;
padding-right: 21px;
}
#content #logging #viewer tbody .has-trace.open .message a
{
background-image: url( ../../img/ico/information-white.png );
}
#content #logging #viewer tbody .trace
{
display: none;
}
#content #logging #viewer tbody .trace td
{
border-top: 0;
color: #c0c0c0;
}
#content #logging #viewer .has-data tfoot
{
display: none;
}
#content #logging #viewer tfoot td
{
color: #c0c0c0;
}
#content #logging .jstree > li
{
margin-left: 0;
}
#content #logging .jstree li
{
position: relative;
}
#content #logging .jstree .level-finest { background-color: #d5e5fc; }
#content #logging .jstree .level-fine { background-color: #d5fafc; }
#content #logging .jstree .level-config { background-color: #e6fded; }
#content #logging .jstree .level-info { background-color: #fafcd7; }
#content #logging .jstree .level-warning { background-color: #fcecd5; }
#content #logging .jstree .level-severe { background-color: #fcdcda; }
#content #logging .jstree .level-off { background-color: #ffffff; }
/* Log4j */
#content #logging .jstree .level-all { background-color: #9EDAFF; }
#content #logging .jstree .level-trace { background-color: #d5e5fc; }
#content #logging .jstree .level-debug { background-color: #d5fafc; }
#content #logging .jstree .level-warn { background-color: #e6fded; }
#content #logging .jstree .level-error { background-color: #fcecd5; }
#content #logging .jstree .level-fatal { background-color: #fcdcda; }
#content #logging .jstree a
{
height: 17px;
line-height: 17px;
padding: 0;
width: 90%;
}
#content #logging .jstree a:hover
{
color: #008;
}
#content #logging .jstree a span.ns
{
display: none;
}
#content #logging.ns .jstree a span.ns
{
display: inline;
}
#content #logging .jstree a span.name
{
background-position: 100% 50%;
cursor: pointer;
padding-right: 21px;
}
#content #logging .jstree a span.name em
{
color: #f00;
font-style: normal;
text-transform: uppercase;
}
#content #logging .jstree a.trigger.set
{
font-weight: bold;
}
#content #logging .jstree a:hover span.name
{
background-image: url( ../../img/ico/pencil-small.png );
}
#content #logging .jstree .selector-holder
{
position: absolute;
top: -2px;
z-index: 700;
}
#content #logging .jstree .selector-holder.open
{
background-color: #fff;
margin-left: -19px;
z-index: 800;
}
#content #logging .jstree li .selector-holder { left: 440px; }
#content #logging .jstree li li .selector-holder { left: 422px; }
#content #logging .jstree li li li .selector-holder { left: 404px; }
#content #logging .jstree li li li li .selector-holder { left: 386px; }
#content #logging .jstree li li li li li .selector-holder { left: 368px; }
#content #logging .jstree li li li li li li .selector-holder { left: 350px; }
#content #logging .jstree li li li li li li li .selector-holder { left: 332px; }
#content #logging .jstree li li li li li li li li .selector-holder { left: 314px; }
#content #logging .jstree .selector
{
border: 1px solid transparent;
position: relative;
}
#content #logging .jstree .open .selector
{
border-color: #f0f0f0;
box-shadow: 5px 5px 10px #c0c0c0;
-moz-box-shadow: 5px 5px 10px #c0c0c0;
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
}
#content #logging .jstree .selector a
{
display: block;
padding: 2px;
width: auto;
}
#content #logging .jstree .selector .close
{
display: none;
}
#content #logging .jstree .open .selector .close
{
background-image: url( ../../img/ico/cross-0.png );
background-position: 50% 50%;
display: block;
position: absolute;
right: -25px;
top: 0;
width: 20px;
}
#content #logging .jstree .open .selector .close:hover
{
background-image: url( ../../img/ico/cross-1.png );
}
#content #logging .jstree .open .selector .close span
{
display: none;
}
#content #logging .jstree .open .selector a.trigger
{
display: none;
}
#content #logging .jstree .selector ul
{
display: none;
}
#content #logging .jstree .open .selector ul
{
display: block;
}
#content #logging .jstree .selector ul li
{
background: none;
margin-left: 0;
}
#content #logging .jstree .selector ul li a
{
background-image: url( ../../img/ico/ui-radio-button-uncheck.png );
background-position: 2px 50%;
padding-left: 21px;
}
#content #logging .jstree .selector ul li a.level
{
background-color: #f0f0f0;
}
#content #logging .jstree .selector ul li a:hover
{
background-image: url( ../../img/ico/ui-radio-button.png );
}
#content #logging .jstree .selector li.unset
{
border-top: 1px solid #f0f0f0;
}
#content #logging .jstree .selector li.unset a
{
background-image: url( ../../img/ico/cross-0.png );
background-position: 4px 50%;
}
#content #logging .jstree .selector li.unset a:hover
{
background-image: url( ../../img/ico/cross-1.png );
color: #800;
}

View File

@ -1,329 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#menu-wrapper
{
position: fixed;
top: 120px;
width: 150px;
}
.scroll #menu-wrapper
{
position: absolute;
top: 90px;
}
.has-environment #menu-wrapper
{
top: 160px;
}
#menu-wrapper a
{
display: block;
padding: 4px 2px;
overflow: hidden;
text-overflow: ellipsis;
}
#core-selector
{
margin-top: 20px;
padding-right: 10px;
}
#core-selector a
{
padding: 0;
padding-left: 8px;
}
#core-selector select
{
width: 100%;
}
#core-selector #has-no-cores
{
display: none;
}
#core-selector #has-no-cores a
{
background-image: url( ../../img/ico/database--plus.png );
}
#core-selector #has-no-cores span
{
color: #c0c0c0;
display: block;
}
#menu-wrapper .active p
{
background-color: #fafafa;
border-color: #c0c0c0;
}
#menu-wrapper p a,
#menu a
{
background-position: 5px 50%;
padding-left: 26px;
padding-top: 5px;
padding-bottom: 5px;
}
#menu-wrapper p a:hover
{
background-color: #f0f0f0;
}
#menu-wrapper .active p a
{
background-color: #c0c0c0;
font-weight: bold;
}
#menu p.loader
{
background-position: 5px 50%;
color: #c0c0c0;
margin-top: 5px;
padding-left: 26px;
}
#menu p a small
{
color: #b5b5b5;
font-weight: normal;
}
#menu p a small span.txt
{
display: none;
}
#menu p a small:hover span.txt
{
display: inline;
}
#menu .busy
{
border-right-color: #f6f5d9;
}
#menu .busy p a
{
background-color: #f6f5d9;
background-image: url( ../../img/ico/status-away.png );
}
#menu .offline
{
border-right-color: #eccfcf;
}
#menu .offline p a
{
background-color: #eccfcf;
background-image: url( ../../img/ico/status-busy.png );
}
#menu .online
{
border-right-color: #cfecd3;
}
#menu .online p a
{
background-color: #cfecd3;
background-image: url( ../../img/ico/status.png );
}
#menu .ping small
{
color: #000
}
#menu li
{
border-bottom: 1px solid #f0f0f0;
}
#menu li:last-child
{
border-bottom: 0;
}
#menu li.optional
{
display: none;
}
#core-menu p
{
border-top: 1px solid #f0f0f0;
}
#core-menu li:first-child p
{
border-top: 0;
}
#core-menu p a
{
background-image: url( ../../img/ico/status-offline.png );
}
#core-menu .active p a
{
background-image: url( ../../img/ico/box.png );
}
#core-menu ul,
#menu ul
{
display: none;
padding-top: 5px;
padding-bottom: 10px;
}
#core-menu .active ul,
#menu .active ul
{
display: block;
}
#menu ul li
{
border-bottom: 0;
}
#core-menu ul li a,
#menu ul li a
{
background-position: 7px 50%;
border-bottom: 1px solid #f0f0f0;
color: #bbb;
margin-left: 15px;
padding-left: 26px;
}
#core-menu ul li:last-child a,
#menu ul li:last-child a
{
border-bottom: 0;
}
#core-menu ul li a:hover,
#menu ul li a:hover
{
background-color: #f0f0f0;
color: #333;
}
#core-menu ul li.active a,
#menu ul li.active a
{
background-color: #d0d0d0;
border-color: #d0d0d0;
color: #333;
}
#menu #index.global p a { background-image: url( ../../img/ico/dashboard.png ); }
#menu #logging.global p a { background-image: url( ../../img/ico/inbox-document-text.png ); }
#menu #logging.global .level a { background-image: url( ../../img/ico/gear.png ); }
#menu #java-properties.global p a { background-image: url( ../../img/ico/jar.png ); }
#menu #threads.global p a { background-image: url( ../../img/ico/ui-accordion.png ); }
#menu #cores.global p a { background-image: url( ../../img/ico/databases.png ); }
#menu #cloud.global p a { background-image: url( ../../img/ico/network-cloud.png ); }
#menu #cloud.global .tree a { background-image: url( ../../img/ico/folder-tree.png ); }
#menu #cloud.global .graph a { background-image: url( ../../img/ico/molecule.png ); }
#menu #cloud.global .rgraph a { background-image: url( ../../img/ico/asterisk.png ); }
#menu #cloud.global .dump a { background-image: url( ../../img/ico/download-cloud.png ); }
#core-menu .ping.error a
{
background-color: #ffcccc;
background-image: url( ../../img/ico/system-monitor--exclamation.png );
border-color: #ffcccc;
cursor: help;
}
#core-menu .overview a { background-image: url( ../../img/ico/home.png ); }
#core-menu .query a { background-image: url( ../../img/ico/magnifier.png ); }
#core-menu .analysis a { background-image: url( ../../img/ico/funnel.png ); }
#core-menu .documents a { background-image: url( ../../img/ico/documents-stack.png ); }
#core-menu .files a { background-image: url( ../../img/ico/folder.png ); }
#core-menu .schema-browser a { background-image: url( ../../img/ico/book-open-text.png ); }
#core-menu .replication a { background-image: url( ../../img/ico/node.png ); }
#core-menu .distribution a { background-image: url( ../../img/ico/node-select.png ); }
#core-menu .ping a { background-image: url( ../../img/ico/system-monitor.png ); }
#core-menu .logging a { background-image: url( ../../img/ico/inbox-document-text.png ); }
#core-menu .plugins a { background-image: url( ../../img/ico/block.png ); }
#core-menu .dataimport a { background-image: url( ../../img/ico/document-import.png ); }
#core-menu .segments a { background-image: url( ../../img/ico/construction.png ); }
#content #navigation
{
border-right: 1px solid #e0e0e0;
}
#content #navigation a
{
display: block;
padding: 4px 2px;
}
#content #navigation .current
{
border-color: #e0e0e0;
}
#content #navigation a
{
background-position: 5px 50%;
padding-left: 26px;
padding-top: 5px;
padding-bottom: 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#content #navigation a:hover
{
background-color: #f0f0f0;
}
#content #navigation .current a
{
background-color: #e0e0e0;
font-weight: bold;
}

View File

@ -1,195 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #plugins #navigation
{
width: 20%;
}
#content #plugins #navigation .cache a { background-image: url( ../../img/ico/disk-black.png ); }
#content #plugins #navigation .core a { background-image: url( ../../img/ico/wooden-box.png ); }
#content #plugins #navigation .other a { background-image: url( ../../img/ico/zone.png ); }
#content #plugins #navigation .highlighting a { background-image: url( ../../img/ico/highlighter-text.png ); }
#content #plugins #navigation .updatehandler a{ background-image: url( ../../img/ico/arrow-circle.png ); }
#content #plugins #navigation .queryhandler a { background-image: url( ../../img/ico/magnifier.png ); }
#content #plugins #navigation .queryparser a { background-image: url( ../../img/ico/asterisk.png ); }
#content #plugins #navigation .PLUGINCHANGES { margin-top: 20px; }
#content #plugins #navigation .PLUGINCHANGES a { background-image: url( ../../img/ico/eye.png ); }
#content #plugins #navigation .RELOAD a { background-image: url( ../../img/ico/arrow-circle.png ); }
#content #plugins #navigation a
{
position: relative;
}
#content #plugins #navigation a span
{
background-color: #bba500;
border-radius: 5px;
color: #fff;
font-size: 10px;
font-weight: normal;
line-height: 1.4em;
padding-left: 4px;
padding-right: 4px;
position: absolute;
right: 5px;
top: 7px;
}
#content #plugins #frame
{
float: right;
width: 78%;
}
#content #plugins #frame .entry
{
margin-bottom: 10px;
}
#content #plugins #frame .entry:last-child
{
margin-bottom: 0;
}
#content #plugins #frame .entry a
{
background-image: url( ../../img/ico/chevron-small-expand.png );
background-position: 0 50%;
display: block;
font-weight: bold;
padding-left: 21px;
}
#content #plugins #frame .entry.changed a span
{
color: #bba500;
}
#content #plugins #frame .entry.expanded a
{
background-image: url( ../../img/ico/chevron-small.png );
}
#content #plugins #frame .entry.expanded ul
{
display: block;
}
#content #plugins #frame .entry ul
{
border-left: 9px solid #f0f3ff;
display: none;
margin-left: 3px;
padding-top: 5px;
padding-left: 10px;
}
#content #plugins #frame .entry li
{
padding-top: 2px;
padding-bottom: 2px;
}
#content #plugins #frame .entry li.stats
{
border-top: 1px solid #c0c0c0;
margin-top: 5px;
padding-top: 5px;
}
#content #plugins #frame .entry li.odd
{
background-color: #f8f8f8;
}
#content #plugins #frame .entry dt,
#content #plugins #frame .entry .stats span
{
float: left;
width: 11%;
}
#content #plugins #frame .entry dd,
#content #plugins #frame .entry .stats ul
{
float: right;
width: 88%;
}
#content #plugins #frame .entry .stats ul
{
border-left: 0;
margin: 0;
padding: 0;
}
#content #plugins #frame .entry .stats dt
{
width: 27%;
}
#content #plugins #frame .entry .stats dd
{
width: 72%;
}
#content #plugins #frame .entry.expanded a.linker {
background-image: none;
background-position: 0 0;
display: inline;
font-weight: normal;
padding:0px;
}
#content #plugins #frame .entry.expanded a.linker:hover {
background-color:#F0F3FF;
}
#recording
{
display: none;
}
#recording .wrapper
{
padding: 30px;
}
#recording p
{
background-position: 0 50%;
float: left;
padding-left: 21px;
padding-top: 7px;
padding-bottom: 7px;
}
#recording button
{
float: right;
}
#recording button span
{
background-image: url( ../../img/ico/new-text.png );
}

View File

@ -1,173 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #query
{
background-image: url( ../../img/div.gif );
background-position: 22% 0;
background-repeat: repeat-y;
}
#content #query #form
{
float: left;
width: 21%;
}
#content #query #form label
{
cursor: pointer;
display: block;
margin-top: 5px;
}
#content #query #form input,
#content #query #form select,
#content #query #form textarea
{
margin-bottom: 2px;
width: 100%;
}
#content #query #form input,
#content #query #form textarea
{
width: 98%;
}
#content #query #form .multiple input
{
float: left;
width: 80%
}
#content #query #form .multiple .buttons
{
float: right;
width: 16%;
}
#content #query #form .multiple a
{
background-position: 50% 50%;
display: block;
height: 25px;
width: 49%;
}
#content #query #form .multiple a span
{
display: none;
}
#content #query #form .multiple a.add
{
background-image: url( ../../img/ico/plus-button.png );
float: right;
}
#content #query #form .multiple a.rem
{
background-image: url( ../../img/ico/minus-button.png );
float: left;
}
#content #query #form #start
{
float: left;
width: 45%;
}
#content #query #form #rows
{
float: right;
width: 45%;
}
#content #query #form .checkbox input
{
margin-bottom: 0;
width: auto;
}
#content #query #form fieldset,
#content #query #form .optional.expanded
{
border: 1px solid #fff;
border-top: 1px solid #c0c0c0;
margin-bottom: 5px;
}
#content #query #form fieldset.common
{
margin-top: 10px;
}
#content #query #form fieldset legend,
#content #query #form .optional.expanded legend
{
display: block;
margin-left: 10px;
padding: 0px 5px;
}
#content #query #form fieldset legend label
{
margin-top: 0;
}
#content #query #form fieldset .fieldset
{
border-bottom: 1px solid #f0f0f0;
margin-bottom: 5px;
padding-bottom: 10px;
}
#content #query #form .optional
{
border: 0;
}
#content #query #form .optional .fieldset
{
display: none;
}
#content #query #form .optional legend
{
margin-left: 0;
padding-left: 0;
}
#content #query #form .optional.expanded .fieldset
{
display: block;
}
#content #query #result
{
display: none;
float: right;
width: 77%;
}
#content #query #result #response
{
}

View File

@ -1,515 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #replication
{
background-image: url( ../../img/div.gif );
background-position: 21% 0;
background-repeat: repeat-y;
}
#content #replication #frame
{
float: right;
width: 78%;
}
#content #replication #navigation
{
border-right: 0;
float: left;
width: 20%;
}
#content #replication #error
{
background-color: #f00;
background-image: url( ../../img/ico/construction.png );
background-position: 10px 50%;
color: #fff;
display: none;
font-weight: bold;
margin-bottom: 20px;
padding: 10px;
padding-left: 35px;
}
#content #replication .block
{
border-bottom: 1px solid #c0c0c0;
margin-bottom: 20px;
padding-bottom: 20px;
}
#content #replication .block.last
{
border-bottom: 0;
}
#content #replication .masterOnly,
#content #replication .slaveOnly
{
display: none;
}
#content #replication.master .masterOnly
{
display: block;
}
#content #replication.slave .slaveOnly
{
display: block;
}
#content #replication .replicating
{
display: none;
}
#content #replication.replicating .replicating
{
display: block;
}
#content #replication #progress
{
padding-bottom: 80px;
position: relative;
}
#content #replication #progress .info
{
padding: 5px;
}
#content #replication #progress #start
{
margin-left: 100px;
border-left: 1px solid #c0c0c0;
}
#content #replication #progress #bar
{
background-color: #f0f0f0;
margin-left: 100px;
margin-right: 100px;
position: relative;
}
#content #replication #progress #bar #bar-info,
#content #replication #progress #bar #eta
{
position: absolute;
right: -100px;
width: 100px;
}
#content #replication #progress #bar #bar-info
{
border-left: 1px solid #f0f0f0;
margin-top: 30px;
}
#content #replication #progress #eta .info
{
color: #c0c0c0;
height: 30px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
#content #replication #progress #speed
{
color: #c0c0c0;
position: absolute;
right: 100px;
top: 0;
}
#content #replication #progress #bar #done
{
background-color: #c0c0c0;
box-shadow: 5px 5px 10px #c0c0c0;
-moz-box-shadow: 5px 5px 10px #c0c0c0;
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
height: 30px;
position: relative;
}
#content #replication #progress #bar #done .percent
{
font-weight: bold;
height: 30px;
line-height: 30px;
padding-left: 5px;
padding-right: 5px;
position: absolute;
right: 0;
text-align: right;
}
#content #replication #progress #bar #done #done-info
{
border-right: 1px solid #c0c0c0;
position: absolute;
right: 0;
margin-top: 30px;
text-align: right;
width: 100px;
}
#content #replication #progress #bar #done #done-info .percent
{
font-weight: bold;
}
#content #replication .block .label,
#content #replication #current-file .file,
#content #replication #current-file .progress,
#content #replication #iterations .iterations
{
float: left;
}
#content #replication .block .label
{
width: 100px;
}
#content #replication .block .label span
{
display: block;
padding-left: 21px;
}
#content #replication #current-file
{
border-top: 1px solid #f0f0f0;
margin-top: 10px;
padding-top: 10px;
}
#content #replication #current-file .progress
{
color: #c0c0c0;
margin-left: 20px;
}
#content #replication #iterations .label span
{
background-image: url( ../../img/ico/node-design.png );
}
#content #replication #iterations .iterations li
{
background-position: 100% 50%;
display: none;
padding-right: 21px;
}
#content #replication #iterations .iterations.expanded li
{
display: block;
}
#content #replication #iterations .iterations .latest
{
display: block;
}
#content #replication #iterations .iterations .replicated
{
color: #80c480;
}
#content #replication #iterations .iterations ul:hover .replicated,
#content #replication #iterations .iterations .replicated.latest
{
color: #080;
}
#content #replication #iterations .iterations .replicated.latest
{
background-image: url( ../../img/ico/tick.png );
}
#content #replication #iterations .iterations .failed
{
color: #c48080;
}
#content #replication #iterations .iterations ul:hover .failed,
#content #replication #iterations .iterations .failed.latest
{
color: #800;
}
#content #replication #iterations .iterations .failed.latest
{
background-image: url( ../../img/ico/cross.png );
}
#content #replication #iterations .iterations a
{
border-top: 1px solid #f0f0f0;
display: none;
margin-top: 2px;
padding-top: 2px;
}
#content #replication #iterations .iterations a span
{
background-position: 0 50%;
color: #c0c0c0;
display: none;
padding-left: 21px;
}
#content #replication #iterations .iterations a span.expand
{
background-image: url( ../../img/ico/chevron-small-expand.png );
display: block;
}
#content #replication #iterations .iterations.expanded a span.expand
{
display: none;
}
#content #replication #iterations .iterations.expanded a span.collapse
{
background-image: url( ../../img/ico/chevron-small.png );
display: block;
}
#content #replication #details table
{
margin-left: 20px;
border-collapse: collapse;
}
#content #replication #details table th
{
text-align: left;
}
#content #replication.slave #details table .slaveOnly
{
display: table-row;
}
#content #replication #details table thead th
{
color: #c0c0c0;
}
#content #replication #details table thead th,
#content #replication #details table tbody td
{
padding-right: 20px;
}
#content #replication #details table thead td,
#content #replication #details table thead th,
#content #replication #details table tbody th,
#content #replication #details table tbody td div
{
padding-top: 3px;
padding-bottom: 3px;
}
#content #replication #details table tbody td,
#content #replication #details table tbody th
{
border-top: 1px solid #f0f0f0;
}
#content #replication #details table thead td
{
width: 100px;
}
#content #replication #details table thead td span
{
background-image: url( ../../img/ico/clipboard-list.png );
background-position: 0 50%;
display: block;
padding-left: 21px;
}
#content #replication #details table tbody th
{
padding-right: 10px;
text-align: right;
white-space: nowrap;
}
#content #replication #details table tbody .size
{
text-align: right;
white-space: nowrap;
}
#content #replication #details table tbody .generation div
{
text-align: center;
}
#content #replication #details table tbody .diff div
{
background-color: #fcfcc9;
padding-left: 1px;
padding-right: 1px;
}
#content #replication .settings .label span
{
background-image: url( ../../img/ico/hammer-screwdriver.png );
}
#content #replication .settings ul,
#content #replication .settings dl dt,
#content #replication .settings dl dd
{
float: left;
}
#content #replication .settings ul li
{
border-top: 1px solid #f0f0f0;
display: none;
padding-top: 3px;
padding-top: 3px;
}
#content #replication .settings ul li:first-child
{
border-top: 0;
padding-top: 0;
}
#content #replication .settings dl dt
{
clear: left;
margin-right: 5px;
width: 120px;
}
#content #replication .settings dl .ico
{
background-position: 0 50%;
padding-left: 21px;
}
#content #replication .settings dl .ico.ico-0
{
background-image: url( ../../img/ico/slash.png );
}
#content #replication .settings dl .ico.ico-1
{
background-image: url( ../../img/ico/tick.png );
}
#content #replication .timer
{
box-shadow: 5px 5px 10px #c0c0c0;
-moz-box-shadow: 5px 5px 10px #c0c0c0;
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
display: none;
margin-bottom: 20px;
padding: 10px;
}
#content #replication .timer p,
#content #replication .timer small
{
padding-left: 21px;
}
#content #replication .timer p
{
background-image: url( ../../img/ico/clock-select-remain.png );
background-position: 0 50%;
}
#content #replication .timer p .approx
{
color: #c0c0c0;
margin-right: 1px;
}
#content #replication .timer p .tick
{
font-weight: bold;
}
#content #replication .timer small
{
color: #c0c0c0;
display: none;
}
#content #replication #navigation button
{
display: block;
margin-bottom: 10px;
}
#content #replication #navigation button.optional
{
display: none;
}
#content #replication #navigation .replicate-now span
{
background-image: url( ../../img/ico/document-convert.png );
}
#content #replication #navigation .abort-replication span
{
background-image: url( ../../img/ico/hand.png );
}
#content #replication #navigation .disable-polling span
{
background-image: url( ../../img/ico/cross.png );
}
#content #replication #navigation .enable-polling span
{
background-image: url( ../../img/ico/tick.png );
}
#content #replication #navigation .disable-replication span
{
background-image: url( ../../img/ico/cross.png );
}
#content #replication #navigation .enable-replication span
{
background-image: url( ../../img/ico/tick.png );
}
#content #replication #navigation .refresh-status span
{
background-image: url( ../../img/ico/arrow-circle.png );
}

View File

@ -1,578 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #schema-browser .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #schema-browser.loaded
{
background-image: url( ../../img/div.gif );
background-position: 21% 0;
background-repeat: repeat-y;
}
#content #schema-browser #data
{
float: right;
width: 78%;
}
#content #schema-browser #related
{
float: left;
width: 20%;
}
#content #schema-browser #related select
{
width: 100%;
}
#content #schema-browser #related select optgroup
{
font-style: normal;
padding: 5px;
}
#content #schema-browser #related select option
{
padding-left: 10px;
}
#content #schema-browser #related #f-df-t
{
border-bottom: 1px solid #f0f0f0;
padding-bottom: 15px;
}
#content #schema-browser #related .ukf-dsf dt
{
display: none;
}
#content #schema-browser #related dl
{
margin-top: 15px;
}
#content #schema-browser #related dl dt,
#content #schema-browser #related dl dd a
{
color: #c0c0c0;
}
#content #schema-browser #related dl dt
{
font-weight: bold;
margin-top: 5px;
}
#content #schema-browser #related dl dd a
{
display: block;
padding-left: 10px;
}
#content #schema-browser #related dl dd a:hover
{
background-color: #f8f8f8;
}
#content #schema-browser #related .field .field,
#content #schema-browser #related .field .field a,
#content #schema-browser #related .dynamic-field .dynamic-field,
#content #schema-browser #related .dynamic-field .dynamic-field a,
#content #schema-browser #related .type .type,
#content #schema-browser #related .type .type a,
#content #schema-browser #related .active,
#content #schema-browser #related .active a
{
color: #333;
}
#content #schema-browser #related .copyfield,
#content #schema-browser #related .copyfield a
{
color: #666;
}
#content #schema-browser #data
{
display: none;
}
#content #schema-browser #data #index dt
{
display: none;
float: left;
margin-right: 5px;
width: 150px;
}
#content #schema-browser #data #field .field-options
{
margin-bottom: 10px;
}
#content #schema-browser #data #field .field-options .head h2
{
padding-left: 5px;
}
#content #schema-browser #data #field .partial
{
display: none;
}
#content #schema-browser #data #field .partial p
{
background-image: url( ../../img/ico/exclamation-button.png );
background-position: 0 50%;
padding-left: 21px;
}
#content #schema-browser #data #field .field-options .options dt,
#content #schema-browser #data #field .field-options .options dd
{
float: left;
}
#content #schema-browser #data #field .field-options .options dt
{
clear: left;
display: none;
margin-right: 5px;
width: 100px;
}
#content #schema-browser #data #field .field-options .flags
{
margin-top: 10px;
margin-bottom: 20px;
}
#content #schema-browser #data #field .field-options .flags thead td
{
color: #c0c0c0;
padding-right: 5px;
width: 100px;
}
#content #schema-browser #data #field .field-options .flags tbody td,
#content #schema-browser #data #field .field-options .flags th
{
padding: 2px 5px;
}
#content #schema-browser #data #field .field-options .flags thead td,
#content #schema-browser #data #field .field-options .flags tbody th
{
padding-left: 0;
}
#content #schema-browser #data #field .field-options .flags thead th,
#content #schema-browser #data #field .field-options .flags tbody td
{
border-left: 1px solid #f0f0f0;
}
#content #schema-browser #data #field .field-options .flags tbody th,
#content #schema-browser #data #field .field-options .flags tbody td
{
border-top: 1px solid #f0f0f0;
}
#content #schema-browser #data #field .field-options .flags tbody .check
{
background-color: #fafdfa;
background-image: url( ../../img/ico/tick.png );
background-position: 50% 50%;
text-align: center;
}
#content #schema-browser #data #field .field-options .flags tbody .check span
{
display: none;
}
#content #schema-browser #data #field .field-options .flags tbody .text
{
color: #c0c0c0;
}
#content #schema-browser #data #field .field-options .analyzer,
#content #schema-browser #data #field .field-options .analyzer li,
#content #schema-browser #data #field .field-options .analyzer ul,
#content #schema-browser #data #field .field-options .analyzer ul li
{
display: none;
}
#content #schema-browser #data #field .field-options .analyzer p,
#content #schema-browser #data #field .field-options .analyzer dl
{
float: left;
}
#content #schema-browser #data #field .field-options .analyzer p
{
margin-right: 5px;
text-align: right;
width: 125px;
white-space: pre;
}
#content #schema-browser #data #field .field-options .analyzer p a
{
cursor: auto;
}
#content #schema-browser #data #field .field-options .analyzer p a.analysis
{
cursor: pointer;
display: block;
}
#content #schema-browser #data #field .field-options .analyzer p a.analysis span
{
background-image: url( ../../img/ico/question-white.png );
background-position: 0 50%;
padding-left: 21px;
}
#content #schema-browser #data #field .field-options .analyzer p a.analysis:hover span
{
background-image: url( ../../img/ico/question.png );
color: #008;
}
#content #schema-browser #data #field .field-options .analyzer a
{
cursor: auto;
}
#content #schema-browser #data #field .field-options .analyzer .toggle
{
background-image: url( ../../img/ico/chevron-small-expand.png );
background-position: 100% 50%;
cursor: pointer;
display: block;
padding-right: 21px;
}
#content #schema-browser #data #field .field-options .analyzer .open .toggle
{
background-image: url( ../../img/ico/chevron-small.png );
}
#content #schema-browser #data #field .field-options .analyzer li
{
border-top: 1px solid #f0f0f0;
margin-top: 10px;
padding-top: 10px;
}
#content #schema-browser #data #field .field-options .analyzer ul
{
clear: left;
display: none;
margin-left: 55px;
padding-top: 5px;
}
#content #schema-browser #data #field .field-options .analyzer .open ul
{
display: block;
}
#content #schema-browser #data #field .field-options .analyzer ul li
{
border-top: 1px solid #f8f8f8;
margin-top: 5px;
padding-top: 5px;
}
#content #schema-browser #data #field .field-options .analyzer ul p
{
color: #999;
margin-right: 5px;
text-align: right;
width: 70px;
}
#content #schema-browser #data #field .field-options .analyzer ul dd
{
margin-left: 20px;
}
#content #schema-browser #data #field .field-options .analyzer ul dd
{
background-image: url( ../../img/ico/document-list.png );
background-position: 0 50%;
color: #c0c0c0;
padding-left: 21px;
}
#content #schema-browser #data #field .field-options .analyzer ul dd.ico-0
{
background-image: url( ../../img/ico/slash.png );
}
#content #schema-browser #data #field .field-options .analyzer ul dd.ico-1
{
background-image: url( ../../img/ico/tick.png );
}
#content #schema-browser #data #field .head
{
margin-bottom: 5px;
}
#content #schema-browser #data #field .terminfo-holder
{
border-top: 1px solid #c0c0c0;
padding-top: 10px;
}
#content #schema-browser #data #field .terminfo-holder .trigger
{
float: left;
width: 140px;
}
#content #schema-browser #data #field .terminfo-holder .trigger button span
{
background-image: url( ../../img/ico/information.png );
}
#content #schema-browser #data #field .terminfo-holder .status
{
border-left: 1px solid #f0f0f0;
display: none;
float: left;
padding-left: 20px;
padding-right: 20px;
}
#content #schema-browser #data #field .terminfo-holder.disabled .trigger button span
{
background-image: url( ../../img/ico/prohibition.png );
}
#content #schema-browser #data #field .terminfo-holder.disabled .status
{
display: block;
}
#content #schema-browser #data #field .terminfo-holder .trigger .autoload
{
display: none;
}
#content #schema-browser #data #field .terminfo-holder.loaded .trigger .autoload
{
background-image: url( ../../img/ico/ui-check-box-uncheck.png );
background-position: 0 50%;
color: #c0c0c0;
display: block;
margin-top: 10px;
padding-left: 21px;
}
#content #schema-browser #data #field .terminfo-holder .trigger .autoload:hover
{
color: #008;
}
#content #schema-browser #data #field .terminfo-holder .trigger .autoload.on
{
background-image: url( ../../img/ico/ui-check-box.png );
color: #333;
}
#content #schema-browser #data #field .topterms-holder,
#content #schema-browser #data #field .histogram-holder
{
border-left: 1px solid #f0f0f0;
display: none;
float: left;
padding-left: 20px;
padding-right: 20px;
}
#content #schema-browser #data #field .topterms-holder .head input
{
height: 18px;
line-height: 16px;
text-align: right;
width: 30px;
}
#content #schema-browser #data #field .topterms-holder .head .max-holder
{
color: #c0c0c0;
}
#content #schema-browser #data #field .topterms-holder .head .max-holder:hover .max
{
color: #008;
}
#content #schema-browser #data #field .topterms-holder .head #query_link
{
background-image: url( ../../img/ico/question-white.png );
background-position: 0 50%;
color: #c0c0c0;
padding-left: 21px;
margin-left: 5px;
}
#content #schema-browser #data #field .topterms-holder .head #query_link:hover
{
background-image: url( ../../img/ico/question.png );
}
#content #schema-browser #data #field .topterms-holder .head #query_link span
{
visibility: hidden;
}
#content #schema-browser #data #field .topterms-holder .head #query_link:hover span
{
visibility: visible;
}
#content #schema-browser .topterms-holder li
{
border-top: 1px solid #999;
margin-bottom: 5px;
}
/* possible overwrite with inline style */
#content #schema-browser .topterms-holder li p
{
background-color: #999;
color: #fff;
float: left;
}
#content #schema-browser .topterms-holder li p span
{
display: block;
padding-right: 2px;
text-align: right;
}
/* possible overwrite with inline style */
#content #schema-browser .topterms-holder li ul
{
margin-left: 30px;
}
#content #schema-browser .topterms-holder li li
{
border-top: 0;
margin-bottom: 0;
white-space: nowrap;
}
#content #schema-browser .topterms-holder li li.odd
{
background-color: #f0f0f0;
}
#content #schema-browser .topterms-holder li li a
{
display: block;
padding-left: 2px;
padding-right: 2px;
}
#content #schema-browser .topterms-holder li li a:hover
{
background-color: #c0c0c0;
}
#content #schema-browser #data #field .histogram-holder ul
{
margin-left: 25px;
}
#content #schema-browser #data #field .histogram-holder li
{
margin-bottom: 2px;
position: relative;
width: 150px;
}
#content #schema-browser #data #field .histogram-holder li.odd
{
background-color: #f0f0f0;
}
#content #schema-browser #data #field .histogram-holder li dl,
#content #schema-browser #data #field .histogram-holder li dt
{
padding-top: 1px;
padding-bottom: 1px;
}
#content #schema-browser #data #field .histogram-holder li dl
{
background-color: #c0c0c0;
min-width: 1px;
}
#content #schema-browser #data #field .histogram-holder li dt
{
color: #a0a0a0;
position: absolute;
overflow: hidden;
left: -25px;
top: 0px;
}
#content #schema-browser #data #field .histogram-holder li dt span
{
display: block;
padding-right: 4px;
text-align: right;
}
#content #schema-browser #data #field .histogram-holder li dd
{
clear: left;
float: left;
margin-left: 2px;
white-space: nowrap;
}
#content #schema-browser #data #field .histogram-holder li:hover dl
{
background-color: #b0b0b0;
}
#content #schema-browser #data #field .histogram-holder li:hover dt
{
color: #333;
}

View File

@ -1,145 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #segments .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #segments .reload
{
background-image: url( ../../img/ico/arrow-circle.png );
background-position: 50% 50%;
display: block;
height: 30px;
position: absolute;
right: 10px;
top: 10px;
width: 30px;
}
#content #segments .reload.loader
{
padding-left: 0;
}
#content #segments .reload span
{
display: none;
}
#content #segments #result
{
width: 77%;
}
#content #segments #result #response
{
margin-left: 25px;
}
#content #segments .segments-holder ul {
margin-left: 25px;
}
#content #segments .segments-holder li {
margin-bottom: 2px;
position: relative;
width: 100%;
}
#content #segments .segments-holder li .toolitp {
display: none;
background: #C8C8C8;
position: absolute;
z-index: 1000;
width:220px;
height:120px;
margin-left: 100%;
opacity: .8;
padding: 5px;
border: 1px solid;
border-radius: 5px;
}
#content #segments .segments-holder li .toolitp .label {
float: left;
width: 20%;
opacity: 1;
}
#content #segments .segments-holder li:hover .toolitp {
display:block;
}
#content #segments .segments-holder li dl,
#content #segments .segments-holder li dt {
padding-bottom: 1px;
padding-top: 1px;
}
#content #segments .segments-holder li dl {
min-width: 1px;
}
#content #segments .segments-holder li dt {
color: #a0a0a0;
left: -45px;
overflow: hidden;
position: absolute;
top: 0;
}
#content #segments .segments-holder li dt div {
display: block;
padding-right: 4px;
text-align: right;
}
#content #segments .segments-holder li dd {
clear: left;
float: left;
margin-left: 2px;
white-space: nowrap;
width: 100%;
}
#content #segments .segments-holder li dd div.deleted {
background-color: #808080;
padding-left: 5px;
}
#content #segments .segments-holder li dd div.live {
background-color: #DDDDDD;
float: left;
}
#content #segments .segments-holder li dd div.start {
float: left;
width: 20%;
}
#content #segments .segments-holder li dd div.end {
text-align: right;
}
.merge-candidate {
background-color: #FFC9F9 !important;
}
#content #segments .segments-holder li dd div.w5 {
width: 20%;
float: left;
}

View File

@ -1,172 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
#content #threads .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #threads #thread-dump table
{
border-collapse: collapse;
width: 100%;
}
#content #threads #thread-dump table .spacer,
#content #threads #thread-dump tbody .state
{
background-color: #fff;
}
#content #threads #thread-dump table th,
#content #threads #thread-dump table td
{
padding: 5px 3px;
vertical-align: top;
}
#content #threads #thread-dump thead th
{
background-color: #c8c8c8;
font-weight: bold;
text-align: left;
}
#content #threads #thread-dump thead th.name
{
width: 85%;
}
#content #threads #thread-dump thead th.time
{
text-align: right;
width: 15%;
}
#content #threads #thread-dump tbody .odd
{
background-color: #f0f0f0;
}
#content #threads #thread-dump tbody .RUNNABLE a
{
background-image: url( ../../img/ico/tick-circle.png );
}
#content #threads #thread-dump tbody .WAITING a,
#content #threads #thread-dump tbody .TIMED_WAITING a
{
background-image: url( ../../img/ico/hourglass.png );
}
#content #threads #thread-dump tbody .WAITING.lock a,
#content #threads #thread-dump tbody .TIMED_WAITING.lock a
{
background-image: url( ../../img/ico/hourglass--exclamation.png );
}
#content #threads #thread-dump tbody .name a
{
background-position: 0 50%;
cursor: auto;
display: block;
padding-left: 21px;
}
#content #threads #thread-dump tbody .stacktrace .name a
{
cursor: pointer;
}
#content #threads #thread-dump tbody .stacktrace .name a span
{
background-image: url( ../../img/ico/chevron-small-expand.png );
background-position: 100% 50%;
padding-right: 21px;
}
#content #threads #thread-dump tbody .stacktrace.open .name a span
{
background-image: url( ../../img/ico/chevron-small.png );
}
#content #threads #thread-dump tbody .name p
{
background-image: url( ../../img/ico/arrow-000-small.png );
background-position: 0 50%;
color: #c0c0c0;
font-size: 11px;
margin-left: 21px;
padding-left: 21px;
}
#content #threads #thread-dump tbody .name div
{
border-top: 1px solid #c0c0c0;
display: none;
margin-left: 21px;
margin-top: 5px;
padding-top: 5px;
}
#content #threads #thread-dump tbody .open .name div
{
display: block;
}
#content #threads #thread-dump tbody .name ul
{
list-style-type: disc;
margin-left: 0.7em;
padding-left: 0.7em;
}
#content #threads #thread-dump tbody .time
{
text-align: right;
}
#content #threads #thread-dump tbody .details
{
display: none;
}
#content #threads .controls
{
padding-top: 5px;
padding-bottom: 5px;
}
#content #threads .controls a
{
background-image: url( ../../img/ico/chevron-small-expand.png );
padding-left: 21px;
}
#content #threads.expanded .controls a
{
background-image: url( ../../img/ico/chevron-small.png );
}
#content #threads.expanded .controls .expand,
#content #threads.collapsed .controls .collapse
{
display: none;
}

View File

@ -32,7 +32,7 @@ limitations under the License.
<link rel="stylesheet" type="text/css" href="css/angular/dataimport.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/files.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/index.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/java-properties.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/java-properties.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/logging.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/menu.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/plugins.css?_=${version}">
@ -123,10 +123,6 @@ limitations under the License.
<div class="exception">{{exception.msg}}</div>
</div>
<div class="other-ui-link">
Use <a class="ul" href="/solr/old.html">original UI</a><a target="_blank" href="http://wiki.apache.org/solr/AngularUI">&nbsp;<span class="help"></span></a>
</div>
<div id="content-wrapper">
<div ng-view id="content">
@ -151,7 +147,7 @@ limitations under the License.
<li class="tree" ng-class="{active:page=='cloud-tree'}"><a href="#/~cloud?view=tree">Tree</a></li>
<li class="graph" ng-class="{active:page=='cloud-graph'}"><a href="#/~cloud">Graph</a></li>
<li class="rgraph" ng-class="{active:page=='cloud-rgraph'}"><a href="#/~cloud?view=rgraph">Graph (Radial)</a></li>
<li class="dump" ng-class="{active:page=='cloud-dump'}"><a ng-click="dumpCloud()">Dump</a></li>
<!--<li class="dump" ng-class="{active:page=='cloud-dump'}"><a ng-click="dumpCloud()">Dump</a></li>-->
</ul>
</li>

View File

@ -465,88 +465,6 @@ solrAdminApp.controller('MainController', function($scope, $route, $rootScope, $
});
(function(window, angular, undefined) {
'use strict';
angular.module('ngClipboard', []).
provider('ngClip', function() {
var self = this;
this.path = '//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.6/ZeroClipboard.swf';
return {
setPath: function(newPath) {
self.path = newPath;
},
setConfig: function(config) {
self.config = config;
},
$get: function() {
return {
path: self.path,
config: self.config
};
}
};
}).
run(['ngClip', function(ngClip) {
var config = {
swfPath: ngClip.path,
trustedDomains: ["*"],
allowScriptAccess: "always",
forceHandCursor: true,
};
ZeroClipboard.config(angular.extend(config,ngClip.config || {}));
}]).
directive('clipCopy', ['ngClip', function (ngClip) {
return {
scope: {
clipCopy: '&',
clipClick: '&',
clipClickFallback: '&'
},
restrict: 'A',
link: function (scope, element, attrs) {
// Bind a fallback function if flash is unavailable
if (ZeroClipboard.isFlashUnusable()) {
element.bind('click', function($event) {
// Execute the expression with local variables `$event` and `copy`
scope.$apply(scope.clipClickFallback({
$event: $event,
copy: scope.$eval(scope.clipCopy)
}));
});
return;
}
// Create the client object
var client = new ZeroClipboard(element);
if (attrs.clipCopy === "") {
scope.clipCopy = function(scope) {
return element[0].previousElementSibling.innerText;
};
}
client.on( 'ready', function(readyEvent) {
client.on('copy', function (event) {
var clipboard = event.clipboardData;
clipboard.setData(attrs.clipCopyMimeType || 'text/plain', scope.$eval(scope.clipCopy));
});
client.on( 'aftercopy', function(event) {
if (angular.isDefined(attrs.clipClick)) {
scope.$apply(scope.clipClick);
}
});
scope.$on('$destroy', function() {
client.destroy();
});
});
}
};
}]);
})(window, window.angular);
/* THE BELOW CODE IS TAKEN FROM js/scripts/app.js, AND STILL REQUIRES INTEGRATING

View File

@ -458,101 +458,3 @@ solrAdminApp.directive('graph', function(Constants) {
}
};
})
/*
========================
var init_debug = function( cloud_element )
{
var debug_element = $( '#debug', cloud_element );
var debug_button = $( '#menu #cloud .dump a' );
var clipboard_element = $( '.clipboard', debug_element );
var clipboard_button = $( 'a', clipboard_element );
$( '.clipboard', debug_element )
.die( 'click' )
.live
(
'click',
function( event )
{
return false;
}
);
url : app.config.solr_path + '/zookeeper?wt=json&dump=true',
ZeroClipboard.setMoviePath( 'img/ZeroClipboard.swf' );
clipboard_client = new ZeroClipboard.Client();
clipboard_client.addEventListener
(
'load',
function( client )
{
}
);
clipboard_client.addEventListener
(
'complete',
function( client, text )
{
clipboard_element
.addClass( 'copied' );
clipboard_button
.data( 'text', clipboard_button.text() )
.text( clipboard_button.data( 'copied' ) );
}
);
},
success : function( response, text_status, xhr )
{
clipboard_client.glue
(
clipboard_element.get(0),
clipboard_button.get(0)
);
clipboard_client.setText( response.replace( /\\/g, '\\\\' ) );
$( '.debug', debug_element )
.removeClass( 'loader' )
.text( response );
},
error : function( xhr, text_status, error_thrown )
{
},
complete : function( xhr, text_status )
{
}
}
);
}
)
.die( 'hide' )
.live
(
'hide',
function( event )
{
$( '.debug', debug_element )
.empty();
clipboard_element
.removeClass( 'copied' );
clipboard_button
.data( 'copied', clipboard_button.text() )
.text( clipboard_button.data( 'text' ) );
clipboard_client.destroy();
debug_element.hide();
}
);
};
*/

View File

@ -1,342 +0,0 @@
/*
The MIT License (MIT)
Copyright (c) 2012 Jon Rohan, James M. Greene,
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.
*/
// Simple Set Clipboard System
// Author: Joseph Huckaby
var ZeroClipboard = {
version: "1.0.7",
clients: {}, // registered upload clients on page, indexed by id
moviePath: 'ZeroClipboard.swf', // URL to movie
nextId: 1, // ID of next movie
$: function(thingy) {
// simple DOM lookup utility function
if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
if (!thingy.addClass) {
// extend element with a few useful methods
thingy.hide = function() { this.style.display = 'none'; };
thingy.show = function() { this.style.display = ''; };
thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
thingy.removeClass = function(name) {
var classes = this.className.split(/\s+/);
var idx = -1;
for (var k = 0; k < classes.length; k++) {
if (classes[k] == name) { idx = k; k = classes.length; }
}
if (idx > -1) {
classes.splice( idx, 1 );
this.className = classes.join(' ');
}
return this;
};
thingy.hasClass = function(name) {
return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
};
}
return thingy;
},
setMoviePath: function(path) {
// set path to ZeroClipboard.swf
this.moviePath = path;
},
dispatch: function(id, eventName, args) {
// receive event from flash movie, send to client
var client = this.clients[id];
if (client) {
client.receiveEvent(eventName, args);
}
},
register: function(id, client) {
// register new client to receive events
this.clients[id] = client;
},
getDOMObjectPosition: function(obj, stopObj) {
// get absolute coordinates for dom element
var info = {
left: 0,
top: 0,
width: obj.width ? obj.width : obj.offsetWidth,
height: obj.height ? obj.height : obj.offsetHeight
};
while (obj && (obj != stopObj)) {
info.left += obj.offsetLeft;
info.top += obj.offsetTop;
obj = obj.offsetParent;
}
return info;
},
Client: function(elem) {
// constructor for new simple upload client
this.handlers = {};
// unique ID
this.id = ZeroClipboard.nextId++;
this.movieId = 'ZeroClipboardMovie_' + this.id;
// register client with singleton to receive flash events
ZeroClipboard.register(this.id, this);
// create movie
if (elem) this.glue(elem);
}
};
ZeroClipboard.Client.prototype = {
id: 0, // unique ID for us
ready: false, // whether movie is ready to receive events or not
movie: null, // reference to movie object
clipText: '', // text to copy to clipboard
handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
cssEffects: true, // enable CSS mouse effects on dom container
handlers: null, // user event handlers
glue: function(elem, appendElem, stylesToAdd) {
// glue to DOM element
// elem can be ID or actual DOM element object
this.domElement = ZeroClipboard.$(elem);
// float just above object, or zIndex 99 if dom element isn't set
var zIndex = 99;
if (this.domElement.style.zIndex) {
zIndex = parseInt(this.domElement.style.zIndex, 10) + 1;
}
if (typeof(appendElem) == 'string') {
appendElem = ZeroClipboard.$(appendElem);
}
else if (typeof(appendElem) == 'undefined') {
appendElem = document.getElementsByTagName('body')[0];
}
// find X/Y position of domElement
var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem);
// create floating DIV above element
this.div = document.createElement('div');
var style = this.div.style;
style.position = 'absolute';
style.left = '' + box.left + 'px';
style.top = '' + box.top + 'px';
style.width = '' + box.width + 'px';
style.height = '' + box.height + 'px';
style.zIndex = zIndex;
style.left = '0px';
style.top = '0px';
if (typeof(stylesToAdd) == 'object') {
for (addedStyle in stylesToAdd) {
style[addedStyle] = stylesToAdd[addedStyle];
}
}
// style.backgroundColor = '#f00'; // debug
appendElem.appendChild(this.div);
this.div.innerHTML = this.getHTML( box.width, box.height );
},
getHTML: function(width, height) {
// return HTML for movie
var html = '';
var flashvars = 'id=' + this.id +
'&width=' + width +
'&height=' + height;
if (navigator.userAgent.match(/MSIE/)) {
// IE gets an OBJECT tag
var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
}
else {
// all other browsers get an EMBED tag
html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
}
return html;
},
hide: function() {
// temporarily hide floater offscreen
if (this.div) {
this.div.style.left = '-2000px';
}
},
show: function() {
// show ourselves after a call to hide()
this.reposition();
},
destroy: function() {
// destroy control and floater
if (this.domElement && this.div) {
this.hide();
this.div.innerHTML = '';
var body = document.getElementsByTagName('body')[0];
try { body.removeChild( this.div ); } catch(e) {;}
this.domElement = null;
this.div = null;
}
},
reposition: function(elem) {
// reposition our floating div, optionally to new container
// warning: container CANNOT change size, only position
if (elem) {
this.domElement = ZeroClipboard.$(elem);
if (!this.domElement) this.hide();
}
console.debug( this.domElement, this.div );
if (this.domElement && this.div) {
var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
console.debug( box );
var style = this.div.style;
style.left = '' + box.left + 'px';
style.top = '' + box.top + 'px';
}
},
setText: function(newText) {
// set text to be copied to clipboard
this.clipText = newText;
if (this.ready) this.movie.setText(newText);
},
addEventListener: function(eventName, func) {
// add user event listener for event
// event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
if (!this.handlers[eventName]) this.handlers[eventName] = [];
this.handlers[eventName].push(func);
},
setHandCursor: function(enabled) {
// enable hand cursor (true), or default arrow cursor (false)
this.handCursorEnabled = enabled;
if (this.ready) this.movie.setHandCursor(enabled);
},
setCSSEffects: function(enabled) {
// enable or disable CSS effects on DOM container
this.cssEffects = !!enabled;
},
receiveEvent: function(eventName, args) {
// receive event from flash
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
// special behavior for certain events
switch (eventName) {
case 'load':
// movie claims it is ready, but in IE this isn't always the case...
// bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function
this.movie = document.getElementById(this.movieId);
if (!this.movie) {
var self = this;
setTimeout( function() { self.receiveEvent('load', null); }, 1 );
return;
}
// firefox on pc needs a "kick" in order to set these in certain cases
if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
var self = this;
setTimeout( function() { self.receiveEvent('load', null); }, 100 );
this.ready = true;
return;
}
this.ready = true;
this.movie.setText( this.clipText );
this.movie.setHandCursor( this.handCursorEnabled );
break;
case 'mouseover':
if (this.domElement && this.cssEffects) {
this.domElement.addClass('hover');
if (this.recoverActive) this.domElement.addClass('active');
}
break;
case 'mouseout':
if (this.domElement && this.cssEffects) {
this.recoverActive = false;
if (this.domElement.hasClass('active')) {
this.domElement.removeClass('active');
this.recoverActive = true;
}
this.domElement.removeClass('hover');
}
break;
case 'mousedown':
if (this.domElement && this.cssEffects) {
this.domElement.addClass('active');
}
break;
case 'mouseup':
if (this.domElement && this.cssEffects) {
this.domElement.removeClass('active');
this.recoverActive = false;
}
break;
} // switch eventName
if (this.handlers[eventName]) {
for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
var func = this.handlers[eventName][idx];
if (typeof(func) == 'function') {
// actual function reference
func(this, args);
}
else if ((typeof(func) == 'object') && (func.length == 2)) {
// PHP style object + method, i.e. [myObject, 'myMethod']
func[0][ func[1] ](this, args);
}
else if (typeof(func) == 'string') {
// name of function
window[func](this, args);
}
} // foreach event handler defined
} // user defined handler for event
}
};

View File

@ -1,982 +0,0 @@
/*
Chosen
- by Patrick Filler for Harvest http://getharvest.com
- Copyright (c) 2011-2013 by Harvest
Available for use under the MIT License
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.
*/
// Chosen, a Select Box Enhancer for jQuery and Protoype
// by Patrick Filler for Harvest, http://getharvest.com
//
// Version 0.9.8
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// This file is generated by `cake build`, do not edit it by hand.
(function() {
var SelectParser;
SelectParser = (function() {
function SelectParser() {
this.options_index = 0;
this.parsed = [];
}
SelectParser.prototype.add_node = function(child) {
if (child.nodeName === "OPTGROUP") {
return this.add_group(child);
} else {
return this.add_option(child);
}
};
SelectParser.prototype.add_group = function(group) {
var group_position, option, _i, _len, _ref, _results;
group_position = this.parsed.length;
this.parsed.push({
array_index: group_position,
group: true,
label: group.label,
children: 0,
disabled: group.disabled
});
_ref = group.childNodes;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
option = _ref[_i];
_results.push(this.add_option(option, group_position, group.disabled));
}
return _results;
};
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
if (option.nodeName === "OPTION") {
if (option.text !== "") {
if (group_position != null) this.parsed[group_position].children += 1;
this.parsed.push({
array_index: this.parsed.length,
options_index: this.options_index,
value: option.value,
text: option.text,
html: option.innerHTML,
selected: option.selected,
disabled: group_disabled === true ? group_disabled : option.disabled,
group_array_index: group_position,
classes: option.className,
style: option.style.cssText
});
} else {
this.parsed.push({
array_index: this.parsed.length,
options_index: this.options_index,
empty: true
});
}
return this.options_index += 1;
}
};
return SelectParser;
})();
SelectParser.select_to_array = function(select) {
var child, parser, _i, _len, _ref;
parser = new SelectParser();
_ref = select.childNodes;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
child = _ref[_i];
parser.add_node(child);
}
return parser.parsed;
};
this.SelectParser = SelectParser;
}).call(this);
/*
Chosen source: generate output using 'cake build'
Copyright (c) 2011 by Harvest
*/
(function() {
var AbstractChosen, root;
root = this;
AbstractChosen = (function() {
function AbstractChosen(form_field, options) {
this.form_field = form_field;
this.options = options != null ? options : {};
this.set_default_values();
this.is_multiple = this.form_field.multiple;
this.default_text_default = this.is_multiple ? "Select Some Options" : "Select an Option";
this.setup();
this.set_up_html();
this.register_observers();
this.finish_setup();
}
AbstractChosen.prototype.set_default_values = function() {
var _this = this;
this.click_test_action = function(evt) {
return _this.test_active_click(evt);
};
this.activate_action = function(evt) {
return _this.activate_field(evt);
};
this.active_field = false;
this.mouse_on_container = false;
this.results_showing = false;
this.result_highlighted = null;
this.result_single_selected = null;
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
this.disable_search_threshold = this.options.disable_search_threshold || 0;
this.search_contains = this.options.search_contains || false;
this.choices = 0;
return this.results_none_found = this.options.no_results_text || "No results match";
};
AbstractChosen.prototype.mouse_enter = function() {
return this.mouse_on_container = true;
};
AbstractChosen.prototype.mouse_leave = function() {
return this.mouse_on_container = false;
};
AbstractChosen.prototype.input_focus = function(evt) {
var _this = this;
if (!this.active_field) {
return setTimeout((function() {
return _this.container_mousedown();
}), 50);
}
};
AbstractChosen.prototype.input_blur = function(evt) {
var _this = this;
if (!this.mouse_on_container) {
this.active_field = false;
return setTimeout((function() {
return _this.blur_test();
}), 100);
}
};
AbstractChosen.prototype.result_add_option = function(option) {
var classes, style;
if (!option.disabled) {
option.dom_id = this.container_id + "_o_" + option.array_index;
classes = option.selected && this.is_multiple ? [] : ["active-result"];
if (option.selected) classes.push("result-selected");
if (option.group_array_index != null) classes.push("group-option");
if (option.classes !== "") classes.push(option.classes);
style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : "";
return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"' + style + '>' + option.html + '</li>';
} else {
return "";
}
};
AbstractChosen.prototype.results_update_field = function() {
this.result_clear_highlight();
this.result_single_selected = null;
return this.results_build();
};
AbstractChosen.prototype.results_toggle = function() {
if (this.results_showing) {
return this.results_hide();
} else {
return this.results_show();
}
};
AbstractChosen.prototype.results_search = function(evt) {
if (this.results_showing) {
return this.winnow_results();
} else {
return this.results_show();
}
};
AbstractChosen.prototype.keyup_checker = function(evt) {
var stroke, _ref;
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
this.search_field_scale();
switch (stroke) {
case 8:
if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) {
return this.keydown_backstroke();
} else if (!this.pending_backstroke) {
this.result_clear_highlight();
return this.results_search();
}
break;
case 13:
evt.preventDefault();
if (this.results_showing) return this.result_select(evt);
break;
case 27:
if (this.results_showing) this.results_hide();
return true;
case 9:
case 38:
case 40:
case 16:
case 91:
case 17:
break;
default:
return this.results_search();
}
};
AbstractChosen.prototype.generate_field_id = function() {
var new_id;
new_id = this.generate_random_id();
this.form_field.id = new_id;
return new_id;
};
AbstractChosen.prototype.generate_random_char = function() {
var chars, newchar, rand;
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ";
rand = Math.floor(Math.random() * chars.length);
return newchar = chars.substring(rand, rand + 1);
};
return AbstractChosen;
})();
root.AbstractChosen = AbstractChosen;
}).call(this);
/*
Chosen source: generate output using 'cake build'
Copyright (c) 2011 by Harvest
*/
(function() {
var $, Chosen, get_side_border_padding, root,
__hasProp = Object.prototype.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
root = this;
$ = jQuery;
$.fn.extend({
chosen: function(options) {
if ($.browser.msie && ($.browser.version === "6.0" || $.browser.version === "7.0")) {
return this;
}
return $(this).each(function(input_field) {
if (!($(this)).hasClass("chzn-done")) return new Chosen(this, options);
});
}
});
Chosen = (function(_super) {
__extends(Chosen, _super);
function Chosen() {
Chosen.__super__.constructor.apply(this, arguments);
}
Chosen.prototype.setup = function() {
this.form_field_jq = $(this.form_field);
return this.is_rtl = this.form_field_jq.hasClass("chzn-rtl");
};
Chosen.prototype.finish_setup = function() {
return this.form_field_jq.addClass("chzn-done");
};
Chosen.prototype.set_up_html = function() {
var container_div, dd_top, dd_width, sf_width;
this.container_id = this.form_field.id.length ? this.form_field.id.replace(/(:|\.)/g, '_') : this.generate_field_id();
this.container_id += "_chzn";
this.f_width = this.form_field_jq.outerWidth();
this.default_text = this.form_field_jq.data('placeholder') ? this.form_field_jq.data('placeholder') : this.default_text_default;
container_div = $("<div />", {
id: this.container_id,
"class": "chzn-container" + (this.is_rtl ? ' chzn-rtl' : ''),
style: 'width: ' + this.f_width + 'px;'
});
if (this.is_multiple) {
container_div.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>');
} else {
container_div.html('<a href="javascript:void(0)" class="chzn-single chzn-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="search" autocomplete="off" /></div><ul class="chzn-results"></ul></div>');
}
this.form_field_jq.hide().after(container_div);
this.container = $('#' + this.container_id);
this.container.addClass("chzn-container-" + (this.is_multiple ? "multi" : "single"));
this.dropdown = this.container.find('div.chzn-drop').first();
dd_top = this.container.height();
dd_width = this.f_width - get_side_border_padding(this.dropdown);
this.dropdown.css({
"width": dd_width + "px",
"top": dd_top + "px"
});
this.search_field = this.container.find('input').first();
this.search_results = this.container.find('ul.chzn-results').first();
this.search_field_scale();
this.search_no_results = this.container.find('li.no-results').first();
if (this.is_multiple) {
this.search_choices = this.container.find('ul.chzn-choices').first();
this.search_container = this.container.find('li.search-field').first();
} else {
this.search_container = this.container.find('div.chzn-search').first();
this.selected_item = this.container.find('.chzn-single').first();
sf_width = dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field);
sf_width = dd_width - get_side_border_padding(this.search_container);
this.search_field.css({
"width": sf_width + "px"
});
}
this.results_build();
this.set_tab_index();
return this.form_field_jq.trigger("liszt:ready", {
chosen: this
});
};
Chosen.prototype.register_observers = function() {
var _this = this;
this.container.mousedown(function(evt) {
return _this.container_mousedown(evt);
});
this.container.mouseup(function(evt) {
return _this.container_mouseup(evt);
});
this.container.mouseenter(function(evt) {
return _this.mouse_enter(evt);
});
this.container.mouseleave(function(evt) {
return _this.mouse_leave(evt);
});
this.search_results.mouseup(function(evt) {
return _this.search_results_mouseup(evt);
});
this.search_results.mouseover(function(evt) {
return _this.search_results_mouseover(evt);
});
this.search_results.mouseout(function(evt) {
return _this.search_results_mouseout(evt);
});
this.form_field_jq.bind("liszt:updated", function(evt) {
return _this.results_update_field(evt);
});
this.search_field.blur(function(evt) {
return _this.input_blur(evt);
});
this.search_field.keyup(function(evt) {
return _this.keyup_checker(evt);
});
this.search_field.keydown(function(evt) {
return _this.keydown_checker(evt);
});
if (this.is_multiple) {
this.search_choices.click(function(evt) {
return _this.choices_click(evt);
});
return this.search_field.focus(function(evt) {
return _this.input_focus(evt);
});
} else {
return this.container.click(function(evt) {
return evt.preventDefault();
});
}
};
Chosen.prototype.search_field_disabled = function() {
this.is_disabled = this.form_field_jq[0].disabled;
if (this.is_disabled) {
this.container.addClass('chzn-disabled');
this.search_field[0].disabled = true;
if (!this.is_multiple) {
this.selected_item.unbind("focus", this.activate_action);
}
return this.close_field();
} else {
this.container.removeClass('chzn-disabled');
this.search_field[0].disabled = false;
if (!this.is_multiple) {
return this.selected_item.bind("focus", this.activate_action);
}
}
};
Chosen.prototype.container_mousedown = function(evt) {
var target_closelink;
if (!this.is_disabled) {
target_closelink = evt != null ? ($(evt.target)).hasClass("search-choice-close") : false;
if (evt && evt.type === "mousedown" && !this.results_showing) {
evt.stopPropagation();
}
if (!this.pending_destroy_click && !target_closelink) {
if (!this.active_field) {
if (this.is_multiple) this.search_field.val("");
$(document).click(this.click_test_action);
this.results_show();
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chzn-single").length)) {
evt.preventDefault();
this.results_toggle();
}
return this.activate_field();
} else {
return this.pending_destroy_click = false;
}
}
};
Chosen.prototype.container_mouseup = function(evt) {
if (evt.target.nodeName === "ABBR") return this.results_reset(evt);
};
Chosen.prototype.blur_test = function(evt) {
if (!this.active_field && this.container.hasClass("chzn-container-active")) {
return this.close_field();
}
};
Chosen.prototype.close_field = function() {
$(document).unbind("click", this.click_test_action);
if (!this.is_multiple) {
this.selected_item.attr("tabindex", this.search_field.attr("tabindex"));
this.search_field.attr("tabindex", -1);
}
this.active_field = false;
this.results_hide();
this.container.removeClass("chzn-container-active");
this.winnow_results_clear();
this.clear_backstroke();
this.show_search_field_default();
return this.search_field_scale();
};
Chosen.prototype.activate_field = function() {
if (!this.is_multiple && !this.active_field) {
this.search_field.attr("tabindex", this.selected_item.attr("tabindex"));
this.selected_item.attr("tabindex", -1);
}
this.container.addClass("chzn-container-active");
this.active_field = true;
this.search_field.val(this.search_field.val());
return this.search_field.focus();
};
Chosen.prototype.test_active_click = function(evt) {
if ($(evt.target).parents('#' + this.container_id).length) {
return this.active_field = true;
} else {
return this.close_field();
}
};
Chosen.prototype.results_build = function() {
var content, data, _i, _len, _ref;
this.parsing = true;
this.results_data = root.SelectParser.select_to_array(this.form_field);
if (this.is_multiple && this.choices > 0) {
this.search_choices.find("li.search-choice").remove();
this.choices = 0;
} else if (!this.is_multiple) {
this.selected_item.find("span").text(this.default_text);
if (this.form_field.options.length <= this.disable_search_threshold) {
this.container.addClass("chzn-container-single-nosearch");
} else {
this.container.removeClass("chzn-container-single-nosearch");
}
}
content = '';
_ref = this.results_data;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
data = _ref[_i];
if (data.group) {
content += this.result_add_group(data);
} else if (!data.empty) {
content += this.result_add_option(data);
if (data.selected && this.is_multiple) {
this.choice_build(data);
} else if (data.selected && !this.is_multiple) {
this.selected_item.removeClass("chzn-default").find("span").text(data.text);
if (this.allow_single_deselect) this.single_deselect_control_build();
}
}
}
this.search_field_disabled();
this.show_search_field_default();
this.search_field_scale();
this.search_results.html(content);
return this.parsing = false;
};
Chosen.prototype.result_add_group = function(group) {
if (!group.disabled) {
group.dom_id = this.container_id + "_g_" + group.array_index;
return '<li id="' + group.dom_id + '" class="group-result">' + $("<div />").text(group.label).html() + '</li>';
} else {
return "";
}
};
Chosen.prototype.result_do_highlight = function(el) {
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
if (el.length) {
this.result_clear_highlight();
this.result_highlight = el;
this.result_highlight.addClass("highlighted");
maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
visible_top = this.search_results.scrollTop();
visible_bottom = maxHeight + visible_top;
high_top = this.result_highlight.position().top + this.search_results.scrollTop();
high_bottom = high_top + this.result_highlight.outerHeight();
if (high_bottom >= visible_bottom) {
return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
} else if (high_top < visible_top) {
return this.search_results.scrollTop(high_top);
}
}
};
Chosen.prototype.result_clear_highlight = function() {
if (this.result_highlight) this.result_highlight.removeClass("highlighted");
return this.result_highlight = null;
};
Chosen.prototype.results_show = function() {
var dd_top;
if (!this.is_multiple) {
this.selected_item.addClass("chzn-single-with-drop");
if (this.result_single_selected) {
this.result_do_highlight(this.result_single_selected);
}
}
dd_top = this.is_multiple ? this.container.height() : this.container.height() - 1;
this.dropdown.css({
"top": dd_top + "px",
"left": 0
});
this.results_showing = true;
this.search_field.focus();
this.search_field.val(this.search_field.val());
return this.winnow_results();
};
Chosen.prototype.results_hide = function() {
if (!this.is_multiple) {
this.selected_item.removeClass("chzn-single-with-drop");
}
this.result_clear_highlight();
this.dropdown.css({
"left": "-9000px"
});
return this.results_showing = false;
};
Chosen.prototype.set_tab_index = function(el) {
var ti;
if (this.form_field_jq.attr("tabindex")) {
ti = this.form_field_jq.attr("tabindex");
this.form_field_jq.attr("tabindex", -1);
if (this.is_multiple) {
return this.search_field.attr("tabindex", ti);
} else {
this.selected_item.attr("tabindex", ti);
return this.search_field.attr("tabindex", -1);
}
}
};
Chosen.prototype.show_search_field_default = function() {
if (this.is_multiple && this.choices < 1 && !this.active_field) {
this.search_field.val(this.default_text);
return this.search_field.addClass("default");
} else {
this.search_field.val("");
return this.search_field.removeClass("default");
}
};
Chosen.prototype.search_results_mouseup = function(evt) {
var target;
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
if (target.length) {
this.result_highlight = target;
return this.result_select(evt);
}
};
Chosen.prototype.search_results_mouseover = function(evt) {
var target;
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
if (target) return this.result_do_highlight(target);
};
Chosen.prototype.search_results_mouseout = function(evt) {
if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
return this.result_clear_highlight();
}
};
Chosen.prototype.choices_click = function(evt) {
evt.preventDefault();
if (this.active_field && !($(evt.target).hasClass("search-choice" || $(evt.target).parents('.search-choice').first)) && !this.results_showing) {
return this.results_show();
}
};
Chosen.prototype.choice_build = function(item) {
var choice_id, link,
_this = this;
choice_id = this.container_id + "_c_" + item.array_index;
this.choices += 1;
this.search_container.before('<li class="search-choice" id="' + choice_id + '"><span>' + item.html + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>');
link = $('#' + choice_id).find("a").first();
return link.click(function(evt) {
return _this.choice_destroy_link_click(evt);
});
};
Chosen.prototype.choice_destroy_link_click = function(evt) {
evt.preventDefault();
if (!this.is_disabled) {
this.pending_destroy_click = true;
return this.choice_destroy($(evt.target));
} else {
return evt.stopPropagation;
}
};
Chosen.prototype.choice_destroy = function(link) {
this.choices -= 1;
this.show_search_field_default();
if (this.is_multiple && this.choices > 0 && this.search_field.val().length < 1) {
this.results_hide();
}
this.result_deselect(link.attr("rel"));
return link.parents('li').first().remove();
};
Chosen.prototype.results_reset = function(evt) {
this.form_field.options[0].selected = true;
this.selected_item.find("span").text(this.default_text);
if (!this.is_multiple) this.selected_item.addClass("chzn-default");
this.show_search_field_default();
$(evt.target).remove();
this.form_field_jq.trigger("change");
if (this.active_field) return this.results_hide();
};
Chosen.prototype.result_select = function(evt) {
var high, high_id, item, position;
if (this.result_highlight) {
high = this.result_highlight;
high_id = high.attr("id");
this.result_clear_highlight();
if (this.is_multiple) {
this.result_deactivate(high);
} else {
this.search_results.find(".result-selected").removeClass("result-selected");
this.result_single_selected = high;
this.selected_item.removeClass("chzn-default");
}
high.addClass("result-selected");
position = high_id.substr(high_id.lastIndexOf("_") + 1);
item = this.results_data[position];
item.selected = true;
this.form_field.options[item.options_index].selected = true;
if (this.is_multiple) {
this.choice_build(item);
} else {
this.selected_item.find("span").first().text(item.text);
if (this.allow_single_deselect) this.single_deselect_control_build();
}
if (!(evt.metaKey && this.is_multiple)) this.results_hide();
this.search_field.val("");
this.form_field_jq.trigger("change");
return this.search_field_scale();
}
};
Chosen.prototype.result_activate = function(el) {
return el.addClass("active-result");
};
Chosen.prototype.result_deactivate = function(el) {
return el.removeClass("active-result");
};
Chosen.prototype.result_deselect = function(pos) {
var result, result_data;
result_data = this.results_data[pos];
result_data.selected = false;
this.form_field.options[result_data.options_index].selected = false;
result = $("#" + this.container_id + "_o_" + pos);
result.removeClass("result-selected").addClass("active-result").show();
this.result_clear_highlight();
this.winnow_results();
this.form_field_jq.trigger("change");
return this.search_field_scale();
};
Chosen.prototype.single_deselect_control_build = function() {
if (this.allow_single_deselect && this.selected_item.find("abbr").length < 1) {
return this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
}
};
Chosen.prototype.winnow_results = function() {
var found, option, part, parts, regex, regexAnchor, result, result_id, results, searchText, startpos, text, zregex, _i, _j, _len, _len2, _ref;
this.no_results_clear();
results = 0;
searchText = this.search_field.val() === this.default_text ? "" : $('<div/>').text($.trim(this.search_field.val())).html();
regexAnchor = this.search_contains ? "" : "^";
regex = new RegExp(regexAnchor + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
_ref = this.results_data;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
option = _ref[_i];
if (!option.disabled && !option.empty) {
if (option.group) {
$('#' + option.dom_id).css('display', 'none');
} else if (!(this.is_multiple && option.selected)) {
found = false;
result_id = option.dom_id;
result = $("#" + result_id);
if (regex.test(option.html)) {
found = true;
results += 1;
} else if (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0) {
parts = option.html.replace(/\[|\]/g, "").split(" ");
if (parts.length) {
for (_j = 0, _len2 = parts.length; _j < _len2; _j++) {
part = parts[_j];
if (regex.test(part)) {
found = true;
results += 1;
}
}
}
}
if (found) {
if (searchText.length) {
startpos = option.html.search(zregex);
text = option.html.substr(0, startpos + searchText.length) + '</em>' + option.html.substr(startpos + searchText.length);
text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
} else {
text = option.html;
}
result.html(text);
this.result_activate(result);
if (option.group_array_index != null) {
$("#" + this.results_data[option.group_array_index].dom_id).css('display', 'list-item');
}
} else {
if (this.result_highlight && result_id === this.result_highlight.attr('id')) {
this.result_clear_highlight();
}
this.result_deactivate(result);
}
}
}
}
if (results < 1 && searchText.length) {
return this.no_results(searchText);
} else {
return this.winnow_results_set_highlight();
}
};
Chosen.prototype.winnow_results_clear = function() {
var li, lis, _i, _len, _results;
this.search_field.val("");
lis = this.search_results.find("li");
_results = [];
for (_i = 0, _len = lis.length; _i < _len; _i++) {
li = lis[_i];
li = $(li);
if (li.hasClass("group-result")) {
_results.push(li.css('display', 'auto'));
} else if (!this.is_multiple || !li.hasClass("result-selected")) {
_results.push(this.result_activate(li));
} else {
_results.push(void 0);
}
}
return _results;
};
Chosen.prototype.winnow_results_set_highlight = function() {
var do_high, selected_results;
if (!this.result_highlight) {
selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
if (do_high != null) return this.result_do_highlight(do_high);
}
};
Chosen.prototype.no_results = function(terms) {
var no_results_html;
no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
no_results_html.find("span").first().html(terms);
return this.search_results.append(no_results_html);
};
Chosen.prototype.no_results_clear = function() {
return this.search_results.find(".no-results").remove();
};
Chosen.prototype.keydown_arrow = function() {
var first_active, next_sib;
if (!this.result_highlight) {
first_active = this.search_results.find("li.active-result").first();
if (first_active) this.result_do_highlight($(first_active));
} else if (this.results_showing) {
next_sib = this.result_highlight.nextAll("li.active-result").first();
if (next_sib) this.result_do_highlight(next_sib);
}
if (!this.results_showing) return this.results_show();
};
Chosen.prototype.keyup_arrow = function() {
var prev_sibs;
if (!this.results_showing && !this.is_multiple) {
return this.results_show();
} else if (this.result_highlight) {
prev_sibs = this.result_highlight.prevAll("li.active-result");
if (prev_sibs.length) {
return this.result_do_highlight(prev_sibs.first());
} else {
if (this.choices > 0) this.results_hide();
return this.result_clear_highlight();
}
}
};
Chosen.prototype.keydown_backstroke = function() {
if (this.pending_backstroke) {
this.choice_destroy(this.pending_backstroke.find("a").first());
return this.clear_backstroke();
} else {
this.pending_backstroke = this.search_container.siblings("li.search-choice").last();
return this.pending_backstroke.addClass("search-choice-focus");
}
};
Chosen.prototype.clear_backstroke = function() {
if (this.pending_backstroke) {
this.pending_backstroke.removeClass("search-choice-focus");
}
return this.pending_backstroke = null;
};
Chosen.prototype.keydown_checker = function(evt) {
var stroke, _ref;
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
this.search_field_scale();
if (stroke !== 8 && this.pending_backstroke) this.clear_backstroke();
switch (stroke) {
case 8:
this.backstroke_length = this.search_field.val().length;
break;
case 9:
if (this.results_showing && !this.is_multiple) this.result_select(evt);
this.mouse_on_container = false;
break;
case 13:
evt.preventDefault();
break;
case 38:
evt.preventDefault();
this.keyup_arrow();
break;
case 40:
this.keydown_arrow();
break;
}
};
Chosen.prototype.search_field_scale = function() {
var dd_top, div, h, style, style_block, styles, w, _i, _len;
if (this.is_multiple) {
h = 0;
w = 0;
style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
for (_i = 0, _len = styles.length; _i < _len; _i++) {
style = styles[_i];
style_block += style + ":" + this.search_field.css(style) + ";";
}
div = $('<div />', {
'style': style_block
});
div.text(this.search_field.val());
$('body').append(div);
w = div.width() + 25;
div.remove();
if (w > this.f_width - 10) w = this.f_width - 10;
this.search_field.css({
'width': w + 'px'
});
dd_top = this.container.height();
return this.dropdown.css({
"top": dd_top + "px"
});
}
};
Chosen.prototype.generate_random_id = function() {
var string;
string = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char();
while ($("#" + string).length > 0) {
string += this.generate_random_char();
}
return string;
};
return Chosen;
})(AbstractChosen);
get_side_border_padding = function(elmt) {
var side_border_padding;
return side_border_padding = elmt.outerWidth() - elmt.width();
};
root.get_side_border_padding = get_side_border_padding;
}).call(this);

View File

@ -1,29 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
window.console = window.console || {};
var names = ["log", "debug", "info", "warn", "error",
"assert", "dir", "dirxml", "group", "groupEnd", "time",
"timeEnd", "count", "trace", "profile", "profileEnd"];
var i = 0;
var l = names.length;
for( i = 0; i < l; i++ )
{
window.console[names[i]] = window.console[names[i]] || function() {};
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,184 +0,0 @@
/*
* Copyright (c) 2011 Jordan Feldstein
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.
*/
// Original code from: https://github.com/jfeldstein/jQuery.AjaxFileUpload.js https://github.com/jfeldstein/jQuery.AjaxFileUpload.js/commit/9dd56b4161cbed138287d3ae29a476bb59eb5fc4
// All modifications are BSD licensed
// GSI: Modifications made to support immediate upload
/*
//
// - Ajaxifies an individual <input type="file">
// - Files are sandboxed. Doesn't matter how many, or where they are, on the page.
// - Allows for extra parameters to be included with the file
// - onStart callback can cancel the upload by returning false
*/
(function ($) {
$.fn.ajaxfileupload = function (options) {
var settings = {
params: {},
action: '',
onStart: function () {
console.log('starting upload');
console.log(this);
},
onComplete: function (response) {
console.log('got response: ');
console.log(response);
console.log(this);
},
onCancel: function () {
console.log('cancelling: ');
console.log(this);
},
validate_extensions: true,
valid_extensions: ['gif', 'png', 'jpg', 'jpeg'],
submit_button: null,
upload_now: false
};
var uploading_file = false;
if (options) {
$.extend(settings, options);
}
// 'this' is a jQuery collection of one or more (hopefully)
// file elements, but doesn't check for this yet
return this.each(function () {
var $element = $(this);
/*
// Internal handler that tries to parse the response
// and clean up after ourselves.
*/
var handleResponse = function (loadedFrame, element) {
var response, responseStr = loadedFrame.contentWindow.document.body.innerHTML;
try {
//response = $.parseJSON($.trim(responseStr));
response = JSON.parse(responseStr);
} catch (e) {
response = responseStr;
}
// Tear-down the wrapper form
element.siblings().remove();
element.unwrap();
uploading_file = false;
// Pass back to the user
settings.onComplete.apply(element, [response, settings.params]);
};
/*
// Wraps element in a <form> tag, and inserts hidden inputs for each
// key:value pair in settings.params so they can be sent along with
// the upload. Then, creates an iframe that the whole thing is
// uploaded through.
*/
var wrapElement = function (element) {
// Create an iframe to submit through, using a semi-unique ID
var frame_id = 'ajaxUploader-iframe-' + Math.round(new Date().getTime() / 1000)
$('body').after('<iframe width="0" height="0" style="display:none;" name="' + frame_id + '" id="' + frame_id + '"/>');
$('#' + frame_id).load(function () {
handleResponse(this, element);
});
console.log("settings.action: " + settings.action);
// Wrap it in a form
element.wrap(function () {
return '<form action="' + settings.action + '" method="POST" enctype="multipart/form-data" target="' + frame_id + '" />'
})
// Insert <input type='hidden'>'s for each param
.before(function () {
var key, html = '';
for (key in settings.params) {
var paramVal = settings.params[key];
if (typeof paramVal === 'function') {
paramVal = paramVal();
}
html += '<input type="hidden" name="' + key + '" value="' + paramVal + '" />';
}
return html;
});
}
var upload_file = function () {
if ($element.val() == '') return settings.onCancel.apply($element, [settings.params]);
// make sure extension is valid
var ext = $element.val().split('.').pop().toLowerCase();
if (true === settings.validate_extensions && $.inArray(ext, settings.valid_extensions) == -1) {
// Pass back to the user
settings.onComplete.apply($element, [
{status: false, message: 'The select file type is invalid. File must be ' + settings.valid_extensions.join(', ') + '.'},
settings.params
]);
} else {
uploading_file = true;
// Creates the form, extra inputs and iframe used to
// submit / upload the file
wrapElement($element);
// Call user-supplied (or default) onStart(), setting
// its this context to the file DOM element
var ret = settings.onStart.apply($element, [settings.params]);
// let onStart have the option to cancel the upload
if (ret !== false) {
$element.parent('form').submit(function (e) {
e.stopPropagation();
}).submit();
}
}
};
if (settings.upload_now) {
if (!uploading_file) {
console.log("uploading now");
upload_file();
}
}
// Skip elements that are already setup. May replace this
// with uninit() later, to allow updating that settings
if ($element.data('ajaxUploader-setup') === true) return;
/*
$element.change(function () {
// since a new image was selected, reset the marker
uploading_file = false;
// only update the file from here if we haven't assigned a submit button
if (settings.submit_button == null) {
console.log("uploading");
upload_file();
}
});
//*/
if (settings.submit_button == null) {
// do nothing
} else {
settings.submit_button.click(function () {
console.log("uploading: " + uploading_file);
// only attempt to upload file if we're not uploading
if (!uploading_file) {
upload_file();
}
});
}
// Mark this element as setup
$element.data('ajaxUploader-setup', true);
});
}
})(jQuery)

View File

@ -1,523 +0,0 @@
/*
The MIT License (MIT)
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.
*/
/*!
* jQuery blockUI plugin
* Version 2.39 (23-MAY-2011)
* @requires jQuery v1.2.3 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2010 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
*/
;(function($) {
if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery);
return;
}
$.fn._fadeIn = $.fn.fadeIn;
var noOp = function() {};
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
// retarded userAgent strings on Vista)
var mode = document.documentMode || 0;
var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode;
// global $ methods for blocking/unblocking the entire page
$.blockUI = function(opts) { install(window, opts); };
$.unblockUI = function(opts) { remove(window, opts); };
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
$.growlUI = function(title, message, timeout, onClose) {
var $m = $('<div class="growlUI"></div>');
if (title) $m.append('<h1>'+title+'</h1>');
if (message) $m.append('<h2>'+message+'</h2>');
if (timeout == undefined) timeout = 3000;
$.blockUI({
message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
timeout: timeout, showOverlay: false,
onUnblock: onClose,
css: $.blockUI.defaults.growlCSS
});
};
// plugin method for blocking element content
$.fn.block = function(opts) {
return this.unblock({ fadeOut: 0 }).each(function() {
if ($.css(this,'position') == 'static')
this.style.position = 'relative';
if ($.browser.msie)
this.style.zoom = 1; // force 'hasLayout'
install(this, opts);
});
};
// plugin method for unblocking element content
$.fn.unblock = function(opts) {
return this.each(function() {
remove(this, opts);
});
};
$.blockUI.version = 2.39; // 2nd generation blocking at no extra cost!
// override these in your code to change the default behavior and style
$.blockUI.defaults = {
// message displayed when blocking (use null for no message)
message: '<h1>Please wait...</h1>',
title: null, // title string; only used when theme == true
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
theme: false, // set to true to use with jQuery UI themes
// styles for the message when blocking; if you wish to disable
// these and use an external stylesheet then do this in your code:
// $.blockUI.defaults.css = {};
css: {
padding: 0,
margin: 0,
width: '30%',
top: '40%',
left: '35%',
textAlign: 'center',
color: '#000',
border: '3px solid #aaa',
backgroundColor:'#fff',
cursor: 'wait'
},
// minimal style set used when themes are used
themedCSS: {
width: '30%',
top: '40%',
left: '35%'
},
// styles for the overlay
overlayCSS: {
backgroundColor: '#000',
opacity: 0.6,
cursor: 'wait'
},
// styles applied when using $.growlUI
growlCSS: {
width: '350px',
top: '10px',
left: '',
right: '10px',
border: 'none',
padding: '5px',
opacity: 0.6,
cursor: 'default',
color: '#fff',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
'border-radius': '10px'
},
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
// (hat tip to Jorge H. N. de Vasconcelos)
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
// force usage of iframe in non-IE browsers (handy for blocking applets)
forceIframe: false,
// z-index for the blocking overlay
baseZ: 1000,
// set these to true to have the message automatically centered
centerX: true, // <-- only effects element blocking (page block controlled via css above)
centerY: true,
// allow body element to be stetched in ie6; this makes blocking look better
// on "short" pages. disable if you wish to prevent changes to the body height
allowBodyStretch: true,
// enable if you want key and mouse events to be disabled for content that is blocked
bindEvents: true,
// be default blockUI will supress tab navigation from leaving blocking content
// (if bindEvents is true)
constrainTabKey: true,
// fadeIn time in millis; set to 0 to disable fadeIn on block
fadeIn: 200,
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
fadeOut: 400,
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
timeout: 0,
// disable if you don't want to show the overlay
showOverlay: true,
// if true, focus will be placed in the first available input field when
// page blocking
focusInput: true,
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
applyPlatformOpacityRules: true,
// callback method invoked when fadeIn has completed and blocking message is visible
onBlock: null,
// callback method invoked when unblocking has completed; the callback is
// passed the element that has been unblocked (which is the window object for page
// blocks) and the options that were passed to the unblock call:
// onUnblock(element, options)
onUnblock: null,
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
quirksmodeOffsetHack: 4,
// class name of the message block
blockMsgClass: 'blockMsg'
};
// private data and functions follow...
var pageBlock = null;
var pageBlockEls = [];
function install(el, opts) {
var full = (el == window);
var msg = opts && opts.message !== undefined ? opts.message : undefined;
opts = $.extend({}, $.blockUI.defaults, opts || {});
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
var css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
msg = msg === undefined ? opts.message : msg;
// remove the current block (if there is one)
if (full && pageBlock)
remove(window, {fadeOut:0});
// if an existing element is being used as the blocking content then we capture
// its current place in the DOM (and current display style) so we can restore
// it when we unblock
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
var node = msg.jquery ? msg[0] : msg;
var data = {};
$(el).data('blockUI.history', data);
data.el = node;
data.parent = node.parentNode;
data.display = node.style.display;
data.position = node.style.position;
if (data.parent)
data.parent.removeChild(node);
}
$(el).data('blockUI.onUnblock', opts.onUnblock);
var z = opts.baseZ;
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
// layer1 is the iframe layer which is used to supress bleed through of underlying content
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
// layer3 is the message content that is displayed while blocking
var lyr1 = ($.browser.msie || opts.forceIframe)
? $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>')
: $('<div class="blockUI" style="display:none"></div>');
var lyr2 = opts.theme
? $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>')
: $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
var lyr3, s;
if (opts.theme && full) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">' +
'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
'<div class="ui-widget-content ui-dialog-content"></div>' +
'</div>';
}
else if (opts.theme) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">' +
'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
'<div class="ui-widget-content ui-dialog-content"></div>' +
'</div>';
}
else if (full) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
}
else {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
}
lyr3 = $(s);
// if we have a message, style it
if (msg) {
if (opts.theme) {
lyr3.css(themedCSS);
lyr3.addClass('ui-widget-content');
}
else
lyr3.css(css);
}
// style the overlay
if (!opts.theme && (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform))))
lyr2.css(opts.overlayCSS);
lyr2.css('position', full ? 'fixed' : 'absolute');
// make iframe layer transparent in IE
if ($.browser.msie || opts.forceIframe)
lyr1.css('opacity',0.0);
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
$.each(layers, function() {
this.appendTo($par);
});
if (opts.theme && opts.draggable && $.fn.draggable) {
lyr3.draggable({
handle: '.ui-dialog-titlebar',
cancel: 'li'
});
}
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
if (ie6 || expr) {
// give body 100% height
if (full && opts.allowBodyStretch && $.boxModel)
$('html,body').css('height','100%');
// fix ie6 issue when blocked element has a border width
if ((ie6 || !$.boxModel) && !full) {
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
var fixT = t ? '(0 - '+t+')' : 0;
var fixL = l ? '(0 - '+l+')' : 0;
}
// simulate fixed position
$.each([lyr1,lyr2,lyr3], function(i,o) {
var s = o[0].style;
s.position = 'absolute';
if (i < 2) {
full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"')
: s.setExpression('height','this.parentNode.offsetHeight + "px"');
full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
: s.setExpression('width','this.parentNode.offsetWidth + "px"');
if (fixL) s.setExpression('left', fixL);
if (fixT) s.setExpression('top', fixT);
}
else if (opts.centerY) {
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
s.marginTop = 0;
}
else if (!opts.centerY && full) {
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0;
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
s.setExpression('top',expression);
}
});
}
// show the message
if (msg) {
if (opts.theme)
lyr3.find('.ui-widget-content').append(msg);
else
lyr3.append(msg);
if (msg.jquery || msg.nodeType)
$(msg).show();
}
if (($.browser.msie || opts.forceIframe) && opts.showOverlay)
lyr1.show(); // opacity is zero
if (opts.fadeIn) {
var cb = opts.onBlock ? opts.onBlock : noOp;
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
var cb2 = msg ? cb : noOp;
if (opts.showOverlay)
lyr2._fadeIn(opts.fadeIn, cb1);
if (msg)
lyr3._fadeIn(opts.fadeIn, cb2);
}
else {
if (opts.showOverlay)
lyr2.show();
if (msg)
lyr3.show();
if (opts.onBlock)
opts.onBlock();
}
// bind key and mouse events
bind(1, el, opts);
if (full) {
pageBlock = lyr3[0];
pageBlockEls = $(':input:enabled:visible',pageBlock);
if (opts.focusInput)
setTimeout(focus, 20);
}
else
center(lyr3[0], opts.centerX, opts.centerY);
if (opts.timeout) {
// auto-unblock
var to = setTimeout(function() {
full ? $.unblockUI(opts) : $(el).unblock(opts);
}, opts.timeout);
$(el).data('blockUI.timeout', to);
}
};
// remove the block
function remove(el, opts) {
var full = (el == window);
var $el = $(el);
var data = $el.data('blockUI.history');
var to = $el.data('blockUI.timeout');
if (to) {
clearTimeout(to);
$el.removeData('blockUI.timeout');
}
opts = $.extend({}, $.blockUI.defaults, opts || {});
bind(0, el, opts); // unbind events
if (opts.onUnblock === null) {
opts.onUnblock = $el.data('blockUI.onUnblock');
$el.removeData('blockUI.onUnblock');
}
var els;
if (full) // crazy selector to handle odd field errors in ie6/7
els = $('body').children().filter('.blockUI').add('body > .blockUI');
else
els = $('.blockUI', el);
if (full)
pageBlock = pageBlockEls = null;
if (opts.fadeOut) {
els.fadeOut(opts.fadeOut);
setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
}
else
reset(els, data, opts, el);
};
// move blocking element back into the DOM where it started
function reset(els,data,opts,el) {
els.each(function(i,o) {
// remove via DOM calls so we don't lose event handlers
if (this.parentNode)
this.parentNode.removeChild(this);
});
if (data && data.el) {
data.el.style.display = data.display;
data.el.style.position = data.position;
if (data.parent)
data.parent.appendChild(data.el);
$(el).removeData('blockUI.history');
}
if (typeof opts.onUnblock == 'function')
opts.onUnblock(el,opts);
};
// bind/unbind the handler
function bind(b, el, opts) {
var full = el == window, $el = $(el);
// don't bother unbinding if there is nothing to unbind
if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
return;
if (!full)
$el.data('blockUI.isBlocked', b);
// don't bind events when overlay is not in use or if bindEvents is false
if (!opts.bindEvents || (b && !opts.showOverlay))
return;
// bind anchors and inputs for mouse and key events
var events = 'mousedown mouseup keydown keypress';
b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler);
// former impl...
// var $e = $('a,:input');
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
};
// event handler to suppress keyboard/mouse events when blocking
function handler(e) {
// allow tab navigation (conditionally)
if (e.keyCode && e.keyCode == 9) {
if (pageBlock && e.data.constrainTabKey) {
var els = pageBlockEls;
var fwd = !e.shiftKey && e.target === els[els.length-1];
var back = e.shiftKey && e.target === els[0];
if (fwd || back) {
setTimeout(function(){focus(back)},10);
return false;
}
}
}
var opts = e.data;
// allow events within the message content
if ($(e.target).parents('div.' + opts.blockMsgClass).length > 0)
return true;
// allow events for content that is not being blocked
return $(e.target).parents().children().filter('div.blockUI').length == 0;
};
function focus(back) {
if (!pageBlockEls)
return;
var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
if (e)
e.focus();
};
function center(el, x, y) {
var p = el.parentNode, s = el.style;
var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
if (x) s.left = l > 0 ? (l+'px') : '0';
if (y) s.top = t > 0 ? (t+'px') : '0';
};
function sz(el, p) {
return parseInt($.css(el,p))||0;
};
})(jQuery);

View File

@ -1,71 +0,0 @@
/*
The MIT License (MIT)
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.
*/
/*!
* jQuery Cookie Plugin
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2011, Klaus Hartl
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/GPL-2.0
*/
(function($) {
$.cookie = function(key, value, options) {
// key and at least value given, set cookie...
if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
options = $.extend({}, options);
if (value === null || value === undefined) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = String(value);
return (document.cookie = [
encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// key and possibly options given, get cookie...
options = value || {};
var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
var pairs = document.cookie.split('; ');
for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
}
return null;
};
})(jQuery);

View File

@ -1,806 +0,0 @@
/*
The MIT License (MIT)
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.
*/
/*!
* jQuery Form Plugin
* version: 2.47 (04-SEP-2010)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
;(function($) {
/*
Usage Note:
-----------
Do not use both ajaxSubmit and ajaxForm on the same form. These
functions are intended to be exclusive. Use ajaxSubmit if you want
to bind your own submit handler to the form. For example,
$(document).ready(function() {
$('#myForm').bind('submit', function() {
$(this).ajaxSubmit({
target: '#output'
});
return false; // <-- important!
});
});
Use ajaxForm when you want the plugin to manage all the event binding
for you. For example,
$(document).ready(function() {
$('#myForm').ajaxForm({
target: '#output'
});
});
When using ajaxForm, the ajaxSubmit function will be invoked for you
at the appropriate time.
*/
/**
* ajaxSubmit() provides a mechanism for immediately submitting
* an HTML form using AJAX.
*/
$.fn.ajaxSubmit = function(options) {
// fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
if (!this.length) {
log('ajaxSubmit: skipping submit process - no element selected');
return this;
}
if (typeof options == 'function') {
options = { success: options };
}
var url = $.trim(this.attr('action'));
if (url) {
// clean url (don't include hash vaue)
url = (url.match(/^([^#]+)/)||[])[1];
}
url = url || window.location.href || '';
options = $.extend(true, {
url: url,
type: this.attr('method') || 'GET',
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
}, options);
// hook for manipulating the form data before it is extracted;
// convenient for use with rich editors like tinyMCE or FCKEditor
var veto = {};
this.trigger('form-pre-serialize', [this, options, veto]);
if (veto.veto) {
log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
return this;
}
// provide opportunity to alter form data before it is serialized
if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
log('ajaxSubmit: submit aborted via beforeSerialize callback');
return this;
}
var n,v,a = this.formToArray(options.semantic);
if (options.data) {
options.extraData = options.data;
for (n in options.data) {
if(options.data[n] instanceof Array) {
for (var k in options.data[n]) {
a.push( { name: n, value: options.data[n][k] } );
}
}
else {
v = options.data[n];
v = $.isFunction(v) ? v() : v; // if value is fn, invoke it
a.push( { name: n, value: v } );
}
}
}
// give pre-submit callback an opportunity to abort the submit
if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
log('ajaxSubmit: submit aborted via beforeSubmit callback');
return this;
}
// fire vetoable 'validate' event
this.trigger('form-submit-validate', [a, this, options, veto]);
if (veto.veto) {
log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
return this;
}
var q = $.param(a);
if (options.type.toUpperCase() == 'GET') {
options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
options.data = null; // data is null for 'get'
}
else {
options.data = q; // data is the query string for 'post'
}
var $form = this, callbacks = [];
if (options.resetForm) {
callbacks.push(function() { $form.resetForm(); });
}
if (options.clearForm) {
callbacks.push(function() { $form.clearForm(); });
}
// perform a load on the target only if dataType is not provided
if (!options.dataType && options.target) {
var oldSuccess = options.success || function(){};
callbacks.push(function(data) {
var fn = options.replaceTarget ? 'replaceWith' : 'html';
$(options.target)[fn](data).each(oldSuccess, arguments);
});
}
else if (options.success) {
callbacks.push(options.success);
}
options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
var context = options.context || options; // jQuery 1.4+ supports scope context
for (var i=0, max=callbacks.length; i < max; i++) {
callbacks[i].apply(context, [data, status, xhr || $form, $form]);
}
};
// are there files to upload?
var fileInputs = $('input:file', this).length > 0;
var mp = 'multipart/form-data';
var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
// options.iframe allows user to force iframe mode
// 06-NOV-09: now defaulting to iframe mode if file input is detected
if (options.iframe !== false && (fileInputs || options.iframe || multipart)) {
// hack to fix Safari hang (thanks to Tim Molendijk for this)
// see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
if (options.closeKeepAlive) {
$.get(options.closeKeepAlive, fileUpload);
}
else {
fileUpload();
}
}
else {
$.ajax(options);
}
// fire 'notify' event
this.trigger('form-submit-notify', [this, options]);
return this;
// private function for handling file uploads (hat tip to YAHOO!)
function fileUpload() {
var form = $form[0];
if ($(':input[name=submit],:input[id=submit]', form).length) {
// if there is an input with a name or id of 'submit' then we won't be
// able to invoke the submit fn on the form (at least not x-browser)
alert('Error: Form elements must not have name or id of "submit".');
return;
}
var s = $.extend(true, {}, $.ajaxSettings, options);
s.context = s.context || s;
var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id;
window[fn] = function() {
var f = $io.data('form-plugin-onload');
if (f) {
f();
window[fn] = undefined;
try { delete window[fn]; } catch(e){}
}
}
var $io = $('<iframe id="' + id + '" name="' + id + '" src="'+ s.iframeSrc +'" onload="window[\'_\'+this.id]()" />');
var io = $io[0];
$io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
var xhr = { // mock object
aborted: 0,
responseText: null,
responseXML: null,
status: 0,
statusText: 'n/a',
getAllResponseHeaders: function() {},
getResponseHeader: function() {},
setRequestHeader: function() {},
abort: function() {
this.aborted = 1;
$io.attr('src', s.iframeSrc); // abort op in progress
}
};
var g = s.global;
// trigger ajax global events so that activity/block indicators work like normal
if (g && ! $.active++) {
$.event.trigger("ajaxStart");
}
if (g) {
$.event.trigger("ajaxSend", [xhr, s]);
}
if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
if (s.global) {
$.active--;
}
return;
}
if (xhr.aborted) {
return;
}
var cbInvoked = false;
var timedOut = 0;
// add submitting element to data if we know it
var sub = form.clk;
if (sub) {
var n = sub.name;
if (n && !sub.disabled) {
s.extraData = s.extraData || {};
s.extraData[n] = sub.value;
if (sub.type == "image") {
s.extraData[n+'.x'] = form.clk_x;
s.extraData[n+'.y'] = form.clk_y;
}
}
}
// take a breath so that pending repaints get some cpu time before the upload starts
function doSubmit() {
// make sure form attrs are set
var t = $form.attr('target'), a = $form.attr('action');
// update form attrs in IE friendly way
form.setAttribute('target',id);
if (form.getAttribute('method') != 'POST') {
form.setAttribute('method', 'POST');
}
if (form.getAttribute('action') != s.url) {
form.setAttribute('action', s.url);
}
// ie borks in some cases when setting encoding
if (! s.skipEncodingOverride) {
$form.attr({
encoding: 'multipart/form-data',
enctype: 'multipart/form-data'
});
}
// support timout
if (s.timeout) {
setTimeout(function() { timedOut = true; cb(); }, s.timeout);
}
// add "extra" data to form if provided in options
var extraInputs = [];
try {
if (s.extraData) {
for (var n in s.extraData) {
extraInputs.push(
$('<input type="hidden" name="'+n+'" value="'+s.extraData[n]+'" />')
.appendTo(form)[0]);
}
}
// add iframe to doc and submit the form
$io.appendTo('body');
$io.data('form-plugin-onload', cb);
form.submit();
}
finally {
// reset attrs and remove "extra" input elements
form.setAttribute('action',a);
if(t) {
form.setAttribute('target', t);
} else {
$form.removeAttr('target');
}
$(extraInputs).remove();
}
}
if (s.forceSync) {
doSubmit();
}
else {
setTimeout(doSubmit, 10); // this lets dom updates render
}
var data, doc, domCheckCount = 50;
function cb() {
if (cbInvoked) {
return;
}
$io.removeData('form-plugin-onload');
var ok = true;
try {
if (timedOut) {
throw 'timeout';
}
// extract the server response from the iframe
doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
log('isXml='+isXml);
if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) {
if (--domCheckCount) {
// in some browsers (Opera) the iframe DOM is not always traversable when
// the onload callback fires, so we loop a bit to accommodate
log('requeing onLoad callback, DOM not available');
setTimeout(cb, 250);
return;
}
// let this fall through because server response could be an empty document
//log('Could not access iframe DOM after mutiple tries.');
//throw 'DOMException: not available';
}
//log('response detected');
cbInvoked = true;
xhr.responseText = doc.documentElement ? doc.documentElement.innerHTML : null;
xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
xhr.getResponseHeader = function(header){
var headers = {'content-type': s.dataType};
return headers[header];
};
var scr = /(json|script)/.test(s.dataType);
if (scr || s.textarea) {
// see if user embedded response in textarea
var ta = doc.getElementsByTagName('textarea')[0];
if (ta) {
xhr.responseText = ta.value;
}
else if (scr) {
// account for browsers injecting pre around json response
var pre = doc.getElementsByTagName('pre')[0];
if (pre) {
xhr.responseText = pre.innerHTML;
}
}
}
else if (s.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
xhr.responseXML = toXml(xhr.responseText);
}
data = $.httpData(xhr, s.dataType);
}
catch(e){
log('error caught:',e);
ok = false;
xhr.error = e;
$.handleError(s, xhr, 'error', e);
}
// ordering of these callbacks/triggers is odd, but that's how $.ajax does it
if (ok) {
s.success.call(s.context, data, 'success', xhr);
if (g) {
$.event.trigger("ajaxSuccess", [xhr, s]);
}
}
if (g) {
$.event.trigger("ajaxComplete", [xhr, s]);
}
if (g && ! --$.active) {
$.event.trigger("ajaxStop");
}
if (s.complete) {
s.complete.call(s.context, xhr, ok ? 'success' : 'error');
}
// clean up
setTimeout(function() {
$io.removeData('form-plugin-onload');
$io.remove();
xhr.responseXML = null;
}, 100);
}
function toXml(s, doc) {
if (window.ActiveXObject) {
doc = new ActiveXObject('Microsoft.XMLDOM');
doc.async = 'false';
doc.loadXML(s);
}
else {
doc = (new DOMParser()).parseFromString(s, 'text/xml');
}
return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
}
}
};
/**
* ajaxForm() provides a mechanism for fully automating form submission.
*
* The advantages of using this method instead of ajaxSubmit() are:
*
* 1: This method will include coordinates for <input type="image" /> elements (if the element
* is used to submit the form).
* 2. This method will include the submit element's name/value data (for the element that was
* used to submit the form).
* 3. This method binds the submit() method to the form for you.
*
* The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely
* passes the options argument along after properly binding events for submit elements and
* the form itself.
*/
$.fn.ajaxForm = function(options) {
// in jQuery 1.3+ we can fix mistakes with the ready state
if (this.length === 0) {
var o = { s: this.selector, c: this.context };
if (!$.isReady && o.s) {
log('DOM not ready, queuing ajaxForm');
$(function() {
$(o.s,o.c).ajaxForm(options);
});
return this;
}
// is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
return this;
}
return this.ajaxFormUnbind().bind('submit.form-plugin', function(e) {
if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
e.preventDefault();
$(this).ajaxSubmit(options);
}
}).bind('click.form-plugin', function(e) {
var target = e.target;
var $el = $(target);
if (!($el.is(":submit,input:image"))) {
// is this a child element of the submit el? (ex: a span within a button)
var t = $el.closest(':submit');
if (t.length == 0) {
return;
}
target = t[0];
}
var form = this;
form.clk = target;
if (target.type == 'image') {
if (e.offsetX != undefined) {
form.clk_x = e.offsetX;
form.clk_y = e.offsetY;
} else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
var offset = $el.offset();
form.clk_x = e.pageX - offset.left;
form.clk_y = e.pageY - offset.top;
} else {
form.clk_x = e.pageX - target.offsetLeft;
form.clk_y = e.pageY - target.offsetTop;
}
}
// clear form vars
setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
});
};
// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
$.fn.ajaxFormUnbind = function() {
return this.unbind('submit.form-plugin click.form-plugin');
};
/**
* formToArray() gathers form element data into an array of objects that can
* be passed to any of the following ajax functions: $.get, $.post, or load.
* Each object in the array has both a 'name' and 'value' property. An example of
* an array for a simple login form might be:
*
* [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
*
* It is this array that is passed to pre-submit callback functions provided to the
* ajaxSubmit() and ajaxForm() methods.
*/
$.fn.formToArray = function(semantic) {
var a = [];
if (this.length === 0) {
return a;
}
var form = this[0];
var els = semantic ? form.getElementsByTagName('*') : form.elements;
if (!els) {
return a;
}
var i,j,n,v,el;
for(i=0, max=els.length; i < max; i++) {
el = els[i];
n = el.name;
if (!n) {
continue;
}
if (semantic && form.clk && el.type == "image") {
// handle image inputs on the fly when semantic == true
if(!el.disabled && form.clk == el) {
a.push({name: n, value: $(el).val()});
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
}
continue;
}
v = $.fieldValue(el, true);
if (v && v.constructor == Array) {
for(j=0, jmax=v.length; j < jmax; j++) {
a.push({name: n, value: v[j]});
}
}
else if (v !== null && typeof v != 'undefined') {
a.push({name: n, value: v});
}
}
if (!semantic && form.clk) {
// input type=='image' are not found in elements array! handle it here
var $input = $(form.clk), input = $input[0];
n = input.name;
if (n && !input.disabled && input.type == 'image') {
a.push({name: n, value: $input.val()});
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
}
}
return a;
};
/**
* Serializes form data into a 'submittable' string. This method will return a string
* in the format: name1=value1&amp;name2=value2
*/
$.fn.formSerialize = function(semantic) {
//hand off to jQuery.param for proper encoding
return $.param(this.formToArray(semantic));
};
/**
* Serializes all field elements in the jQuery object into a query string.
* This method will return a string in the format: name1=value1&amp;name2=value2
*/
$.fn.fieldSerialize = function(successful) {
var a = [];
this.each(function() {
var n = this.name;
if (!n) {
return;
}
var v = $.fieldValue(this, successful);
if (v && v.constructor == Array) {
for (var i=0,max=v.length; i < max; i++) {
a.push({name: n, value: v[i]});
}
}
else if (v !== null && typeof v != 'undefined') {
a.push({name: this.name, value: v});
}
});
//hand off to jQuery.param for proper encoding
return $.param(a);
};
/**
* Returns the value(s) of the element in the matched set. For example, consider the following form:
*
* <form><fieldset>
* <input name="A" type="text" />
* <input name="A" type="text" />
* <input name="B" type="checkbox" value="B1" />
* <input name="B" type="checkbox" value="B2"/>
* <input name="C" type="radio" value="C1" />
* <input name="C" type="radio" value="C2" />
* </fieldset></form>
*
* var v = $(':text').fieldValue();
* // if no values are entered into the text inputs
* v == ['','']
* // if values entered into the text inputs are 'foo' and 'bar'
* v == ['foo','bar']
*
* var v = $(':checkbox').fieldValue();
* // if neither checkbox is checked
* v === undefined
* // if both checkboxes are checked
* v == ['B1', 'B2']
*
* var v = $(':radio').fieldValue();
* // if neither radio is checked
* v === undefined
* // if first radio is checked
* v == ['C1']
*
* The successful argument controls whether or not the field element must be 'successful'
* (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
* The default value of the successful argument is true. If this value is false the value(s)
* for each element is returned.
*
* Note: This method *always* returns an array. If no valid value can be determined the
* array will be empty, otherwise it will contain one or more values.
*/
$.fn.fieldValue = function(successful) {
for (var val=[], i=0, max=this.length; i < max; i++) {
var el = this[i];
var v = $.fieldValue(el, successful);
if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
continue;
}
v.constructor == Array ? $.merge(val, v) : val.push(v);
}
return val;
};
/**
* Returns the value of the field element.
*/
$.fieldValue = function(el, successful) {
var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
if (successful === undefined) {
successful = true;
}
if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
(t == 'checkbox' || t == 'radio') && !el.checked ||
(t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
tag == 'select' && el.selectedIndex == -1)) {
return null;
}
if (tag == 'select') {
var index = el.selectedIndex;
if (index < 0) {
return null;
}
var a = [], ops = el.options;
var one = (t == 'select-one');
var max = (one ? index+1 : ops.length);
for(var i=(one ? index : 0); i < max; i++) {
var op = ops[i];
if (op.selected) {
var v = op.value;
if (!v) { // extra pain for IE...
v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
}
if (one) {
return v;
}
a.push(v);
}
}
return a;
}
return $(el).val();
};
/**
* Clears the form data. Takes the following actions on the form's input fields:
* - input text fields will have their 'value' property set to the empty string
* - select elements will have their 'selectedIndex' property set to -1
* - checkbox and radio inputs will have their 'checked' property set to false
* - inputs of type submit, button, reset, and hidden will *not* be effected
* - button elements will *not* be effected
*/
$.fn.clearForm = function() {
return this.each(function() {
$('input,select,textarea', this).clearFields();
});
};
/**
* Clears the selected form elements.
*/
$.fn.clearFields = $.fn.clearInputs = function() {
return this.each(function() {
var t = this.type, tag = this.tagName.toLowerCase();
if (t == 'text' || t == 'password' || tag == 'textarea') {
this.value = '';
}
else if (t == 'checkbox' || t == 'radio') {
this.checked = false;
}
else if (tag == 'select') {
this.selectedIndex = -1;
}
});
};
/**
* Resets the form data. Causes all form elements to be reset to their original value.
*/
$.fn.resetForm = function() {
return this.each(function() {
// guard against an input with the name of 'reset'
// note that IE reports the reset function as an 'object'
if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
this.reset();
}
});
};
/**
* Enables or disables any matching elements.
*/
$.fn.enable = function(b) {
if (b === undefined) {
b = true;
}
return this.each(function() {
this.disabled = !b;
});
};
/**
* Checks/unchecks any matching checkboxes or radio buttons and
* selects/deselects and matching option elements.
*/
$.fn.selected = function(select) {
if (select === undefined) {
select = true;
}
return this.each(function() {
var t = this.type;
if (t == 'checkbox' || t == 'radio') {
this.checked = select;
}
else if (this.tagName.toLowerCase() == 'option') {
var $sel = $(this).parent('select');
if (select && $sel[0] && $sel[0].type == 'select-one') {
// deselect all other options
$sel.find('option').selected(false);
}
this.selected = select;
}
});
};
// helper fn for console logging
// set $.fn.ajaxSubmit.debug to true to enable debug logging
function log() {
if ($.fn.ajaxSubmit.debug) {
var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
if (window.console && window.console.log) {
window.console.log(msg);
}
else if (window.opera && window.opera.postError) {
window.opera.postError(msg);
}
}
};
})(jQuery);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,189 +0,0 @@
/*
The MIT License (MIT)
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.
*/
/*
* timeago: a jQuery plugin, version: 0.9.3 (2011-01-21)
* @requires jQuery v1.2.3 or later
*
* Timeago is a jQuery plugin that makes it easy to support automatically
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
*
* For usage and examples, visit:
* http://timeago.yarp.com/
*
* Licensed under the MIT:
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright (c) 2008-2011, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org)
*/
(function($) {
$.timeago = function(timestamp) {
if (timestamp instanceof Date) {
return inWords(timestamp);
} else if (typeof timestamp === "string") {
return inWords($.timeago.parse(timestamp));
} else {
return inWords($.timeago.datetime(timestamp));
}
};
var $t = $.timeago;
$.extend($.timeago, {
settings: {
refreshMillis: 60000,
allowFuture: false,
strings: {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "ago",
suffixFromNow: "from now",
seconds: "less than a minute",
minute: "about a minute",
minutes: "%d minutes",
hour: "about an hour",
hours: "about %d hours",
day: "a day",
days: "%d days",
month: "about a month",
months: "%d months",
year: "about a year",
years: "%d years",
numbers: []
}
},
inWords: function(distanceMillis) {
var $l = this.settings.strings;
var prefix = $l.prefixAgo;
var suffix = $l.suffixAgo;
if (this.settings.allowFuture) {
if (distanceMillis < 0) {
prefix = $l.prefixFromNow;
suffix = $l.suffixFromNow;
}
distanceMillis = Math.abs(distanceMillis);
}
var seconds = distanceMillis / 1000;
var minutes = seconds / 60;
var hours = minutes / 60;
var days = hours / 24;
var years = days / 365;
function substitute(stringOrFunction, number) {
var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
var value = ($l.numbers && $l.numbers[number]) || number;
return string.replace(/%d/i, value);
}
var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
seconds < 90 && substitute($l.minute, 1) ||
minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
minutes < 90 && substitute($l.hour, 1) ||
hours < 24 && substitute($l.hours, Math.round(hours)) ||
hours < 48 && substitute($l.day, 1) ||
days < 30 && substitute($l.days, Math.floor(days)) ||
days < 60 && substitute($l.month, 1) ||
days < 365 && substitute($l.months, Math.floor(days / 30)) ||
years < 2 && substitute($l.year, 1) ||
substitute($l.years, Math.floor(years));
return $.trim([prefix, words, suffix].join(" "));
},
parse: function(iso8601) {
var s = $.trim(iso8601);
s = s.replace(/\.\d\d\d+/,""); // remove milliseconds
s = s.replace(/-/g,"/");
s = s.replace(/(\d)T(\d)/,"$1 $2").replace(/(\d)Z/,"$1 UTC");
s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
return new Date(s);
},
datetime: function(elem) {
// jQuery's `is()` doesn't play well with HTML5 in IE
var isTime = $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
var iso8601 = null;
if( isTime )
{
iso8601 = $(elem).attr("datetime");
}
if( !iso8601 )
{
iso8601 = $(elem).attr("title");
}
if( !iso8601 )
{
iso8601 = $(elem).text();
}
return $t.parse(iso8601);
}
});
$.fn.timeago = function() {
var self = this;
self.each(refresh);
var $s = $t.settings;
if ($s.refreshMillis > 0) {
setInterval(function() { self.each(refresh); }, $s.refreshMillis);
}
return self;
};
function refresh() {
var data = prepareData(this);
if (!isNaN(data.datetime)) {
$(this).text(inWords(data.datetime));
}
return this;
}
function prepareData(element) {
element = $(element);
if (!element.data("timeago")) {
element.data("timeago", { datetime: $t.datetime(element) });
var text = $.trim(element.text());
if (text.length > 0) {
element.attr("title", text);
}
}
return element.data("timeago");
}
function inWords(date) {
return $t.inWords(distance(date));
}
function distance(date) {
return (new Date().getTime() - date.getTime());
}
// fix for IE6 suckage
document.createElement("abbr");
document.createElement("time");
}(jQuery));

View File

@ -1,48 +0,0 @@
//by Michalis Tzikas & Vasilis Lolos
//07-03-2012
//v1.0
/*
Copyright (C) 2011 by Michalis Tzikas & Vasilis Lolos
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.
*/
(function( $ ){
$.fn.linker = function(options) {
var defaults = {
target : '', //blank,self,parent,top
className : '',
rel : ''
};
var options = $.extend(defaults, options);
target_string = (options.target != '') ? 'target="_'+options.target+'"' : '';
class_string = (options.className != '') ? 'class="'+options.className+'"' : '';
rel_string = (options.rel != '') ? 'rel="'+options.rel+'"' : '';
$(this).each(function(){
t = $(this).text();
t = t.replace(/(https\:\/\/|http:\/\/)([www\.]?)([^\s|<]+)/gi,'<a href="$1$2$3" '+target_string+' '+class_string+' '+rel_string+'>$1$2$3</a>');
t = t.replace(/([^https\:\/\/]|[^http:\/\/]|^)(www)\.([^\s|<]+)/gi,'$1<a href="http://$2.$3" '+target_string+' '+class_string+' '+rel_string+'>$2.$3</a>');
t = t.replace(/<([^a]|^\/a])([^<>]+)>/g, "&lt;$1$2&gt;").replace(/&lt;\/a&gt;/g, "</a>").replace(/<(.)>/g, "&lt;$1&gt;").replace(/\n/g, '<br />');
$(this).html(t);
});
};
})( jQuery );

View File

@ -1,82 +0,0 @@
/*
naturalSort.js
- by Jim Palmer and other contributors
The MIT License (MIT)
Copyright (c) 2011 Jim Palmer and other contributors
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.
*/
// naturalSort.js 0.7.0
// https://github.com/jarinudom/naturalSort.js
// (c) 2011 Jim Palmer and other contributors
// naturalSort.js may be freely distributed under the MIT license.
// Generated by CoffeeScript 1.7.1
(function() {
window.naturalSort = function(a, b) {
var cLoc, dre, hre, i, numS, oFxNcL, oFyNcL, ore, re, sre, x, xD, xN, y, yD, yN;
re = /(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/g;
sre = /(^[ ]*|[ ]*$)/g;
dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/;
hre = /^0x[0-9a-f]+$/i;
ore = /^0/;
i = function(s) {
return naturalSort.insensitive && ('' + s).toLowerCase() || '' + s;
};
x = i(a).replace(sre, '') || '';
y = i(b).replace(sre, '') || '';
xN = x.replace(re, '\u0000$1\u0000').replace(/\0$/, '').replace(/^\0/, '').split('\u0000');
yN = y.replace(re, '\u0000$1\u0000').replace(/\0$/, '').replace(/^\0/, '').split('\u0000');
xD = parseInt(x.match(hre), 16) || (xN.length !== 1 && x.match(dre) && Date.parse(x));
yD = parseInt(y.match(hre), 16) || xD && y.match(dre) && Date.parse(y) || null;
oFxNcL = void 0;
oFyNcL = void 0;
if (yD) {
if (xD < yD) {
return -1;
}
if (xD > yD) {
return 1;
}
}
cLoc = 0;
numS = Math.max(xN.length, yN.length);
while (cLoc < numS) {
oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0;
oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0;
if (isNaN(oFxNcL) !== isNaN(oFyNcL)) {
return (isNaN(oFxNcL) ? 1 : -1);
} else if (typeof oFxNcL !== typeof oFyNcL) {
oFxNcL += '';
oFyNcL += '';
}
if (oFxNcL < oFyNcL) {
return -1;
}
if (oFxNcL > oFyNcL) {
return 1;
}
cLoc++;
}
return 0;
};
}).call(this);

View File

@ -1,216 +0,0 @@
/*
MIT License
-----------
Copyright (c) 2010-2011, The Dojo Foundation
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.
*/
/**
* @license RequireJS order 1.0.5 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
/*jslint nomen: false, plusplus: false, strict: false */
/*global require: false, define: false, window: false, document: false,
setTimeout: false */
//Specify that requirejs optimizer should wrap this code in a closure that
//maps the namespaced requirejs API to non-namespaced local variables.
/*requirejs namespace: true */
(function () {
//Sadly necessary browser inference due to differences in the way
//that browsers load and execute dynamically inserted javascript
//and whether the script/cache method works when ordered execution is
//desired. Currently, Gecko and Opera do not load/fire onload for scripts with
//type="script/cache" but they execute injected scripts in order
//unless the 'async' flag is present.
//However, this is all changing in latest browsers implementing HTML5
//spec. With compliant browsers .async true by default, and
//if false, then it will execute in order. Favor that test first for forward
//compatibility.
var testScript = typeof document !== "undefined" &&
typeof window !== "undefined" &&
document.createElement("script"),
supportsInOrderExecution = testScript && (testScript.async ||
((window.opera &&
Object.prototype.toString.call(window.opera) === "[object Opera]") ||
//If Firefox 2 does not have to be supported, then
//a better check may be:
//('mozIsLocallyAvailable' in window.navigator)
("MozAppearance" in document.documentElement.style))),
//This test is true for IE browsers, which will load scripts but only
//execute them once the script is added to the DOM.
supportsLoadSeparateFromExecute = testScript &&
testScript.readyState === 'uninitialized',
readyRegExp = /^(complete|loaded)$/,
cacheWaiting = [],
cached = {},
scriptNodes = {},
scriptWaiting = [];
//Done with the test script.
testScript = null;
//Callback used by the type="script/cache" callback that indicates a script
//has finished downloading.
function scriptCacheCallback(evt) {
var node = evt.currentTarget || evt.srcElement, i,
moduleName, resource;
if (evt.type === "load" || readyRegExp.test(node.readyState)) {
//Pull out the name of the module and the context.
moduleName = node.getAttribute("data-requiremodule");
//Mark this cache request as loaded
cached[moduleName] = true;
//Find out how many ordered modules have loaded
for (i = 0; (resource = cacheWaiting[i]); i++) {
if (cached[resource.name]) {
resource.req([resource.name], resource.onLoad);
} else {
//Something in the ordered list is not loaded,
//so wait.
break;
}
}
//If just loaded some items, remove them from cacheWaiting.
if (i > 0) {
cacheWaiting.splice(0, i);
}
//Remove this script tag from the DOM
//Use a setTimeout for cleanup because some older IE versions vomit
//if removing a script node while it is being evaluated.
setTimeout(function () {
node.parentNode.removeChild(node);
}, 15);
}
}
/**
* Used for the IE case, where fetching is done by creating script element
* but not attaching it to the DOM. This function will be called when that
* happens so it can be determined when the node can be attached to the
* DOM to trigger its execution.
*/
function onFetchOnly(node) {
var i, loadedNode, resourceName;
//Mark this script as loaded.
node.setAttribute('data-orderloaded', 'loaded');
//Cycle through waiting scripts. If the matching node for them
//is loaded, and is in the right order, add it to the DOM
//to execute the script.
for (i = 0; (resourceName = scriptWaiting[i]); i++) {
loadedNode = scriptNodes[resourceName];
if (loadedNode &&
loadedNode.getAttribute('data-orderloaded') === 'loaded') {
delete scriptNodes[resourceName];
require.addScriptToDom(loadedNode);
} else {
break;
}
}
//If just loaded some items, remove them from waiting.
if (i > 0) {
scriptWaiting.splice(0, i);
}
}
define({
version: '1.0.5',
load: function (name, req, onLoad, config) {
var hasToUrl = !!req.nameToUrl,
url, node, context;
//If no nameToUrl, then probably a build with a loader that
//does not support it, and all modules are inlined.
if (!hasToUrl) {
req([name], onLoad);
return;
}
url = req.nameToUrl(name, null);
//Make sure the async attribute is not set for any pathway involving
//this script.
require.s.skipAsync[url] = true;
if (supportsInOrderExecution || config.isBuild) {
//Just a normal script tag append, but without async attribute
//on the script.
req([name], onLoad);
} else if (supportsLoadSeparateFromExecute) {
//Just fetch the URL, but do not execute it yet. The
//non-standards IE case. Really not so nice because it is
//assuming and touching requrejs internals. OK though since
//ordered execution should go away after a long while.
context = require.s.contexts._;
if (!context.urlFetched[url] && !context.loaded[name]) {
//Indicate the script is being fetched.
context.urlFetched[url] = true;
//Stuff from require.load
require.resourcesReady(false);
context.scriptCount += 1;
//Fetch the script now, remember it.
node = require.attach(url, context, name, null, null, onFetchOnly);
scriptNodes[name] = node;
scriptWaiting.push(name);
}
//Do a normal require for it, once it loads, use it as return
//value.
req([name], onLoad);
} else {
//Credit to LABjs author Kyle Simpson for finding that scripts
//with type="script/cache" allow scripts to be downloaded into
//browser cache but not executed. Use that
//so that subsequent addition of a real type="text/javascript"
//tag will cause the scripts to be executed immediately in the
//correct order.
if (req.specified(name)) {
req([name], onLoad);
} else {
cacheWaiting.push({
name: name,
req: req,
onLoad: onLoad
});
require.attach(url, null, name, scriptCacheCallback, "script/cache");
}
}
}
});
}());

View File

@ -1,60 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
require
(
[
'lib/order!lib/console',
'lib/order!jquery',
'lib/order!lib/jquery.cookie',
'lib/order!lib/jquery.form',
'lib/order!lib/jquery.jstree',
'lib/order!lib/jquery.sammy',
'lib/order!lib/jquery.timeago',
'lib/order!lib/jquery.ajaxfileupload',
'lib/order!lib/jquery.blockUI',
'lib/order!lib/highlight',
'lib/order!lib/linker',
'lib/order!lib/ZeroClipboard',
'lib/order!lib/d3',
'lib/order!lib/chosen',
'lib/order!lib/naturalSort',
'lib/order!scripts/app',
'lib/order!scripts/analysis',
'lib/order!scripts/cloud',
'lib/order!scripts/cores',
'lib/order!scripts/documents',
'lib/order!scripts/dataimport',
'lib/order!scripts/dashboard',
'lib/order!scripts/files',
'lib/order!scripts/index',
'lib/order!scripts/java-properties',
'lib/order!scripts/logging',
'lib/order!scripts/ping',
'lib/order!scripts/plugins',
'lib/order!scripts/query',
'lib/order!scripts/replication',
'lib/order!scripts/schema-browser',
'lib/order!scripts/threads',
'lib/order!scripts/segments'
],
function( $ )
{
app.run();
}
);

File diff suppressed because it is too large Load Diff

View File

@ -1,545 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
// #/:core/analysis
sammy.get
(
new RegExp( app.core_regex_base + '\\/(analysis)$' ),
function( context )
{
var active_core = this.active_core;
var core_basepath = active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
$.get
(
'tpl/analysis.html',
function( template )
{
content_element
.html( template );
var analysis_element = $( '#analysis', content_element );
var analysis_form = $( 'form', analysis_element );
var analysis_result = $( '#analysis-result', analysis_element );
analysis_result.hide();
var verbose_link = $( '.verbose_output a', analysis_element );
var type_or_name = $( '#type_or_name', analysis_form );
var schema_browser_element = $( '#tor_schema' );
var schema_browser_path = app.core_menu.find( '.schema-browser a' ).attr( 'href' );
var schema_browser_map = { 'fieldname' : 'field', 'fieldtype' : 'type' };
type_or_name
.die( 'change' )
.live
(
'change',
function( event )
{
var info = $( this ).val().split( '=' );
schema_browser_element
.attr( 'href', schema_browser_path + '?' + schema_browser_map[info[0]] + '=' + info[1] );
}
);
$.ajax
(
{
url : core_basepath + '/admin/luke?wt=json&show=schema',
dataType : 'json',
context : type_or_name,
beforeSend : function( xhr, settings )
{
this
.html( '<option value="">Loading ... </option>' )
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
var content = '';
var fields = [];
for( var field_name in response.schema.fields )
{
fields.push
(
'<option value="fieldname=' + field_name.esc() + '">' + field_name.esc() + '</option>'
);
}
if( 0 !== fields.length )
{
content += '<optgroup label="Fields">' + "\n";
content += fields.sort().join( "\n" ) + "\n";
content += '</optgroup>' + "\n";
}
var types = [];
for( var type_name in response.schema.types )
{
types.push
(
'<option value="fieldtype=' + type_name.esc() + '">' + type_name.esc() + '</option>'
);
}
if( 0 !== types.length )
{
content += '<optgroup label="Types">' + "\n";
content += types.sort().join( "\n" ) + "\n";
content += '</optgroup>' + "\n";
}
this
.html( content );
var defaultSearchField = 'fieldname\=' + ( context.params['analysis.fieldname'] || response.schema.defaultSearchField );
if( context.params['analysis.fieldtype'] )
{
defaultSearchField = 'fieldtype\=' + context.params['analysis.fieldtype'];
}
$( 'option[value="' + defaultSearchField + '"]', this )
.attr( 'selected', 'selected' );
this
.chosen()
.trigger( 'change' );
var fields = 0;
for( var key in context.params )
{
if( 'string' === typeof context.params[key] && 0 !== context.params[key].length )
{
fields++;
$( '[name="' + key + '"]', analysis_form )
.val( context.params[key] );
}
}
if( 'undefined' !== typeof context.params.verbose_output )
{
verbose_link.trigger( 'toggle', !!context.params.verbose_output.match( /^(1|true)$/ ) );
}
if( 0 !== fields )
{
analysis_form
.trigger( 'execute' );
}
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
this
.removeClass( 'loader' );
}
}
);
$( '.analysis-error .head a', analysis_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parents( '.analysis-error' )
.toggleClass( 'expanded' );
}
);
var check_empty_spacer = function()
{
var spacer_holder = $( 'td.part.data.spacer .holder', analysis_result );
if( 0 === spacer_holder.size() )
{
return false;
}
var verbose_output = analysis_result.hasClass( 'verbose_output' );
spacer_holder
.each
(
function( index, element )
{
element = $( element );
if( verbose_output )
{
var cell = element.parent();
element.height( cell.height() );
}
else
{
element.removeAttr( 'style' );
}
}
);
}
verbose_link
.die( 'toggle' )
.live
(
'toggle',
function( event, state )
{
$( this ).parent()
.toggleClass( 'active', state );
analysis_result
.toggleClass( 'verbose_output', state );
check_empty_spacer();
}
)
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parent()
.toggleClass( 'active' );
analysis_form.trigger( 'submit' );
}
);
var button = $( 'button', analysis_form )
var compute_analysis_params = function()
{
var params = analysis_form.formToArray();
var type_or_name = $( '#type_or_name', analysis_form ).val().split( '=' );
params.push( { name: 'analysis.' + type_or_name[0], value: type_or_name[1] } );
params.push( { name: 'verbose_output', value: $( '.verbose_output', analysis_element ).hasClass( 'active' ) ? 1 : 0 } );
return params;
}
analysis_form
.die( 'submit' )
.live
(
'submit',
function( event )
{
var params = $.param( compute_analysis_params() )
.replace( /[\w\.]+=\+*(&)/g, '$1' ) // remove empty parameters
.replace( /(&)+/, '$1' ) // reduce multiple ampersands
.replace( /^&/, '' ) // remove leading ampersand
.replace( /\+/g, '%20' ); // replace plus-signs with encoded whitespaces
context.redirect( context.path.split( '?' ).shift() + '?' + params );
return false;
}
)
.die( 'execute' )
.live
(
'execute',
function( event )
{
var url = core_basepath + '/analysis/field?wt=json&analysis.showmatch=true&' + context.path.split( '?' ).pop();
url = url.replace( /&verbose_output=\d/, '' );
$.ajax
(
{
url : url,
dataType : 'json',
beforeSend : function( xhr, settings )
{
loader.show( $( 'span', button ) );
button.attr( 'disabled', true );
},
success : function( response, status_text, xhr, form )
{
$( '.analysis-error', analysis_element )
.hide();
analysis_result
.empty()
.show();
for( var name in response.analysis.field_names )
{
build_analysis_table( 'name', name, response.analysis.field_names[name] );
}
for( var name in response.analysis.field_types )
{
build_analysis_table( 'type', name, response.analysis.field_types[name] );
}
check_empty_spacer();
},
error : function( xhr, text_status, error_thrown )
{
analysis_result
.empty()
.hide();
if( 404 === xhr.status )
{
$( '#analysis-handler-missing', analysis_element )
.show();
}
else
{
$( '#analysis-error', analysis_element )
.show();
var response = null;
try
{
eval( 'response = ' + xhr.responseText + ';' );
}
catch( e )
{
console.error( e );
}
$( '#analysis-error .body', analysis_element )
.text( response ? response.error.msg : xhr.responseText );
}
},
complete : function()
{
loader.hide( $( 'span', button ) );
button.removeAttr( 'disabled' );
}
}
);
}
);
var generate_class_name = function( type )
{
var classes = [type];
if( 'text' !== type )
{
classes.push( 'verbose_output' );
}
return classes.join( ' ' );
}
var build_analysis_table = function( field_or_name, name, analysis_data )
{
for( var type in analysis_data )
{
var type_length = analysis_data[type].length;
if( 0 !== type_length )
{
var global_elements_count = 0;
if( 'string' === typeof analysis_data[type][1] )
{
analysis_data[type][1] = [{ 'text': analysis_data[type][1] }]
}
for( var i = 1; i < type_length; i += 2 )
{
var tmp_type_length = analysis_data[type][i].length;
for( var j = 0; j < tmp_type_length; j++ )
{
global_elements_count = Math.max
(
( analysis_data[type][i][j].positionHistory || [] )[0] || 1,
global_elements_count
);
}
}
var content = '<div class="' + type + '">' + "\n";
content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
for( var i = 0; i < analysis_data[type].length; i += 2 )
{
var colspan = 1;
var elements = analysis_data[type][i+1];
var elements_count = global_elements_count;
if( !elements[0] || !elements[0].positionHistory )
{
colspan = elements_count;
elements_count = 1;
}
var legend = [];
for( var key in elements[0] )
{
var key_parts = key.split( '#' );
var used_key = key_parts.pop();
var short_key = used_key;
if( 1 === key_parts.length )
{
used_key = '<abbr title="' + key + '">' + used_key + '</abbr>';
}
if( 'positionHistory' === short_key || 'match' === short_key )
{
continue;
}
legend.push
(
'<tr class="' + generate_class_name( short_key ) + '">' +
'<td>' + used_key + '</td>' +
'</tr>'
);
}
content += '<tbody>' + "\n";
content += '<tr class="step">' + "\n";
// analyzer
var analyzer_name = analysis_data[type][i].replace( /(\$1)+$/g, '' );
var analyzer_short = -1 !== analyzer_name.indexOf( '$' )
? analyzer_name.split( '$' )[1]
: analyzer_name.split( '.' ).pop();
analyzer_short = analyzer_short.match( /[A-Z]/g ).join( '' );
content += '<td class="part analyzer"><div>' + "\n";
content += '<abbr title="' + analysis_data[type][i].esc() + '">' + "\n";
content += analyzer_short.esc() + '</abbr></div></td>' + "\n";
// legend
content += '<td class="part legend"><div class="holder">' + "\n";
content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
content += '<tr><td>' + "\n";
content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
content += legend.join( "\n" ) + "\n";
content += '</table></td></tr></table></td>' + "\n";
// data
var cell_content = '<td class="part data spacer" colspan="' + colspan + '"><div class="holder">&nbsp;</div></td>';
var cells = new Array( elements_count + 1 ).join( cell_content );
content += cells + "\n";
content += '</tr>' + "\n";
content += '</tbody>' + "\n";
}
content += '</table>' + "\n";
content += '</div>' + "\n";
$( '.' + type, analysis_result )
.remove();
analysis_result
.append( content );
var analysis_result_type = $( '.' + type, analysis_result );
for( var i = 0; i < analysis_data[type].length; i += 2 )
{
for( var j = 0; j < analysis_data[type][i+1].length; j += 1 )
{
var pos = analysis_data[type][i+1][j].positionHistory
? analysis_data[type][i+1][j].positionHistory[0]
: 1;
var selector = 'tr.step:eq(' + ( i / 2 ) +') '
+ 'td.data:eq(' + ( pos - 1 ) + ') '
+ '.holder';
var cell = $( selector, analysis_result_type );
cell.parent()
.removeClass( 'spacer' );
var table = $( 'table tr.details', cell );
if( 0 === table.size() )
{
cell
.html
(
'<table border="0" cellspacing="0" cellpadding="0">' +
'<tr class="details"></tr></table>'
);
var table = $( 'table tr.details', cell );
}
var tokens = [];
for( var key in analysis_data[type][i+1][j] )
{
var short_key = key.split( '#' ).pop();
if( 'positionHistory' === short_key || 'match' === short_key )
{
continue;
}
var classes = [];
classes.push( generate_class_name( short_key ) );
var data = analysis_data[type][i+1][j][key];
if( 'object' === typeof data && data instanceof Array )
{
data = data.join( ' ' );
}
if( 'string' === typeof data )
{
data = data.esc();
}
if( null === data || 0 === data.length )
{
classes.push( 'empty' );
data = '&empty;';
}
if( analysis_data[type][i+1][j].match &&
( 'text' === short_key || 'raw_bytes' === short_key ) )
{
classes.push( 'match' );
}
tokens.push
(
'<tr class="' + classes.join( ' ' ) + '">' +
'<td>' + data + '</td>' +
'</tr>'
);
}
table
.append
(
'<td class="details">' +
'<table border="0" cellspacing="0" cellpadding="0">' +
tokens.join( "\n" ) +
'</table></td>'
);
}
}
}
}
}
}
);
}
);

View File

@ -1,669 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
var loader = {
show : function( element )
{
$( element )
.addClass( 'loader' );
},
hide : function( element )
{
$( element )
.removeClass( 'loader' );
}
};
Number.prototype.esc = function()
{
return new String( this ).esc();
}
String.prototype.esc = function()
{
return this.replace( /</g, '&lt;' ).replace( />/g, '&gt;' );
}
SolrDate = function( date )
{
// ["Sat Mar 03 11:00:00 CET 2012", "Sat", "Mar", "03", "11:00:00", "CET", "2012"]
var parts = date.match( /^(\w+)\s+(\w+)\s+(\d+)\s+(\d+\:\d+\:\d+)\s+(\w+)\s+(\d+)$/ );
// "Sat Mar 03 2012 10:37:33"
return new Date( parts[1] + ' ' + parts[2] + ' ' + parts[3] + ' ' + parts[6] + ' ' + parts[4] );
}
var sammy = $.sammy
(
function()
{
this.bind
(
'run',
function( event, config )
{
if( 0 === config.start_url.length )
{
location.href = '#/';
return false;
}
}
);
this.bind
(
'error',
function( message, original_error )
{
alert( original_error.message );
}
);
// activate_core
this.before
(
{},
function( context )
{
app.clear_timeout();
var menu_wrapper = $( '#menu-wrapper' );
$( 'li[id].active', menu_wrapper )
.removeClass( 'active' );
$( 'li.active', menu_wrapper )
.removeClass( 'active' );
// global dashboard doesn't have params.splat
if( !this.params.splat )
{
this.params.splat = [ '~index' ];
}
var selector = '~' === this.params.splat[0][0]
? '#' + this.params.splat[0].replace( /^~/, '' ) + '.global'
: '#core-selector #' + this.params.splat[0].replace( /\./g, '__' );
var active_element = $( selector, menu_wrapper );
if( 0 === active_element.size() )
{
this.app.error( 'There exists no core with name "' + this.params.splat[0] + '"' );
return false;
}
if( active_element.hasClass( 'global' ) )
{
active_element
.addClass( 'active' );
if( this.params.splat[1] )
{
$( '.' + this.params.splat[1], active_element )
.addClass( 'active' );
}
$( '#core-selector option[selected]' )
.removeAttr( 'selected' )
.trigger( 'liszt:updated' );
$( '#core-selector .chzn-container > a' )
.addClass( 'chzn-default' );
}
else
{
active_element
.attr( 'selected', 'selected' )
.trigger( 'liszt:updated' );
if( !this.params.splat[1] )
{
this.params.splat[1] = 'overview';
}
$( '#core-menu .' + this.params.splat[1] )
.addClass( 'active' );
this.active_core = active_element;
}
check_fixed_menu();
}
);
}
);
var solr_admin = function( app_config )
{
that = this,
menu_element = null,
is_multicore = null,
cores_data = null,
active_core = null,
config = app_config,
params = null,
dashboard_values = null,
schema_browser_data = null,
plugin_data = null,
this.menu_element = $( '#core-selector select' );
this.core_menu = $( '#core-menu ul' );
this.config = config;
this.timeout = null;
this.core_regex_base = '^#\\/([\\w\\d-\\.]+)';
browser = {
locale : null,
language : null,
country : null
};
show_global_error = function( error )
{
var main = $( '#main' );
$( 'div[id$="-wrapper"]', main )
.remove();
main
.addClass( 'error' )
.append( error );
var pre_tags = $( 'pre', main );
if( 0 !== pre_tags.size() )
{
hljs.highlightBlock( pre_tags.get(0) );
}
};
sort_cores_data = function sort_cores_data( cores_status )
{
// build array of core-names for sorting
var core_names = [];
for( var core_name in cores_status )
{
core_names.push( core_name );
}
core_names.sort();
var core_count = core_names.length;
var cores = {};
for( var i = 0; i < core_count; i++ )
{
var core_name = core_names[i];
cores[core_name] = cores_status[core_name];
}
return cores;
};
this.set_cores_data = function set_cores_data( cores )
{
that.cores_data = sort_cores_data( cores.status );
that.menu_element
.empty();
var core_list = [];
core_list.push( '<option></option>' );
var core_count = 0;
for( var core_name in that.cores_data )
{
core_count++;
var core_path = config.solr_path + '/' + core_name;
var classes = [];
if( cores.status[core_name]['isDefaultCore'] )
{
classes.push( 'default' );
}
var core_tpl = '<option '
+ ' id="' + core_name.replace( /\./g, '__' ) + '" '
+ ' class="' + classes.join( ' ' ) + '"'
+ ' data-basepath="' + core_path + '"'
+ ' schema="' + cores.status[core_name]['schema'] + '"'
+ ' config="' + cores.status[core_name]['config'] + '"'
+ ' value="#/' + core_name + '"'
+ ' title="' + core_name + '"'
+ '>'
+ core_name
+ '</option>';
core_list.push( core_tpl );
}
var has_cores = 0 !== core_count;
if( has_cores )
{
that.menu_element
.append( core_list.join( "\n" ) )
.trigger( 'liszt:updated' );
}
var core_selector = $( '#core-selector' );
core_selector.find( '#has-cores' ).toggle( has_cores );
core_selector.find( '#has-no-cores' ).toggle( !has_cores );
if( has_cores )
{
var cores_element = core_selector.find( '#has-cores' );
var selector_width = cores_element.width();
cores_element.find( '.chzn-container' )
.css( 'width', selector_width + 'px' );
cores_element.find( '.chzn-drop' )
.css( 'width', ( selector_width - 2 ) + 'px' );
}
this.check_for_init_failures( cores );
};
this.remove_init_failures = function remove_init_failures()
{
$( '#init-failures' )
.hide()
.find( 'ul' )
.empty();
}
this.check_for_init_failures = function check_for_init_failures( cores )
{
if( !cores.initFailures )
{
this.remove_init_failures();
return false;
}
var failures = [];
for( var core_name in cores.initFailures )
{
failures.push
(
'<li>' +
'<strong>' + core_name.esc() + ':</strong>' + "\n" +
cores.initFailures[core_name].esc() + "\n" +
'</li>'
);
}
if( 0 === failures.length )
{
this.remove_init_failures();
return false;
}
$( '#init-failures' )
.show()
.find( 'ul' )
.html( failures.join( "\n" ) );
}
this.run = function()
{
var navigator_language = navigator.userLanguage || navigator.language;
var language_match = navigator_language.match( /^(\w{2})([-_](\w{2}))?$/ );
if( language_match )
{
if( language_match[1] )
{
browser.language = language_match[1].toLowerCase();
}
if( language_match[3] )
{
browser.country = language_match[3].toUpperCase();
}
if( language_match[1] && language_match[3] )
{
browser.locale = browser.language + '_' + browser.country
}
}
$.ajax
(
{
url : config.solr_path + config.core_admin_path + '?wt=json&indexInfo=false',
dataType : 'json',
beforeSend : function( arr, form, options )
{
$( '#content' )
.html( '<div id="index"><div class="loader">Loading ...</div></div>' );
},
success : function( response )
{
that.set_cores_data( response );
that.menu_element
.chosen()
.off( 'change' )
.on
(
'change',
function( event )
{
location.href = $( 'option:selected', this ).val();
return false;
}
)
.on
(
'liszt:updated',
function( event )
{
var core_name = $( 'option:selected', this ).text();
that.core_menu
.html
(
//Keep this in alphabetical order after the overview
'<li class="overview"><a href="#/' + core_name + '"><span>Overview</span></a></li>' + "\n" +
'<li class="analysis"><a href="#/' + core_name + '/analysis"><span>Analysis</span></a></li>' + "\n" +
'<li class="dataimport"><a href="#/' + core_name + '/dataimport"><span>Dataimport</span></a></li>' + "\n" +
'<li class="documents"><a href="#/' + core_name + '/documents"><span>Documents</span></a></li>' + "\n" +
'<li class="files"><a href="#/' + core_name + '/files"><span>Files</span></a></li>' + "\n" +
'<li class="ping"><a rel="' + that.config.solr_path + '/' + core_name + '/admin/ping"><span>Ping</span></a></li>' + "\n" +
'<li class="plugins"><a href="#/' + core_name + '/plugins"><span>Plugins / Stats</span></a></li>' + "\n" +
'<li class="query"><a href="#/' + core_name + '/query"><span>Query</span></a></li>' + "\n" +
'<li class="replication"><a href="#/' + core_name + '/replication"><span>Replication</span></a></li>' + "\n" +
'<li class="schema-browser"><a href="#/' + core_name + '/schema-browser"><span>Schema Browser</span></a></li>' +
'<li class="segments"><a href="#/' + core_name + '/segments"><span>Segments info</span></a></li>'
)
.show();
if( !core_name )
{
that.core_menu
.hide()
.empty();
}
}
);
check_fixed_menu();
$( window ).resize( check_fixed_menu );
var system_url = config.solr_path + '/admin/info/system?wt=json';
$.ajax
(
{
url : system_url,
dataType : 'json',
beforeSend : function( arr, form, options )
{
},
success : function( response )
{
that.dashboard_values = response;
var environment_args = null;
var cloud_args = null;
if( response.jvm && response.jvm.jmx && response.jvm.jmx.commandLineArgs )
{
var command_line_args = response.jvm.jmx.commandLineArgs.join( ' | ' );
environment_args = command_line_args.match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i );
}
if( response.mode )
{
cloud_args = response.mode.match( /solrcloud/i );
}
// environment
var wrapper = $( '#wrapper' );
var environment_element = $( '#environment' );
if( environment_args )
{
wrapper
.addClass( 'has-environment' );
if( environment_args[1] )
{
environment_element
.html( environment_args[1] );
}
if( environment_args[2] )
{
environment_element
.addClass( environment_args[2] );
}
}
else
{
wrapper
.removeClass( 'has-environment' );
}
// cloud
var cloud_nav_element = $( '#menu #cloud' );
if( cloud_args )
{
cloud_nav_element
.show();
}
// sammy
sammy.run( location.hash );
},
error : function()
{
},
complete : function()
{
loader.hide( this );
}
}
);
},
error : function()
{
},
complete : function()
{
}
}
);
};
this.convert_duration_to_seconds = function convert_duration_to_seconds( str )
{
var seconds = 0;
var arr = new String( str || '' ).split( '.' );
var parts = arr[0].split( ':' ).reverse();
var parts_count = parts.length;
for( var i = 0; i < parts_count; i++ )
{
seconds += ( parseInt( parts[i], 10 ) || 0 ) * Math.pow( 60, i );
}
// treat more or equal than .5 as additional second
if( arr[1] && 5 <= parseInt( arr[1][0], 10 ) )
{
seconds++;
}
return seconds;
};
this.convert_seconds_to_readable_time = function convert_seconds_to_readable_time( seconds )
{
seconds = parseInt( seconds || 0, 10 );
var minutes = Math.floor( seconds / 60 );
var hours = Math.floor( minutes / 60 );
var text = [];
if( 0 !== hours )
{
text.push( hours + 'h' );
seconds -= hours * 60 * 60;
minutes -= hours * 60;
}
if( 0 !== minutes )
{
text.push( minutes + 'm' );
seconds -= minutes * 60;
}
if( 0 !== seconds )
{
text.push( ( '0' + seconds ).substr( -2 ) + 's' );
}
return text.join( ' ' );
};
this.clear_timeout = function clear_timeout()
{
if( !app.timeout )
{
return false;
}
console.debug( 'Clearing Timeout #' + this.timeout );
clearTimeout( this.timeout );
this.timeout = null;
};
this.format_json = function format_json( json_str )
{
if( JSON.stringify && JSON.parse )
{
json_str = JSON.stringify( JSON.parse( json_str ), undefined, 2 );
}
return json_str.esc();
};
this.format_number = function format_number( number )
{
var sep = {
'de_CH' : '\'',
'de' : '.',
'en' : ',',
'es' : '.',
'it' : '.',
'ja' : ',',
'sv' : ' ',
'tr' : '.',
'_' : '' // fallback
};
return ( number || 0 ).toString().replace
(
/\B(?=(\d{3})+(?!\d))/g,
sep[ browser.locale ] || sep[ browser.language ] || sep['_']
);
};
check_fixed_menu = function check_fixed_menu()
{
$( '#wrapper' ).toggleClass( 'scroll', $( window ).height() < $( '#menu-wrapper' ).height() + $( '#header' ).height() + 40 );
}
};
var connection_check_delay = 1000;
var connection_working = true;
var connection_check = function connection_check()
{
$.ajax
(
{
url : config.solr_path + config.core_admin_path + '?wt=json&indexInfo=false',
dataType : 'json',
context : $( '.blockUI #connection_status span' ),
beforeSend : function( arr, form, options )
{
this
.addClass( 'loader' );
},
success : function( response )
{
connection_working = true;
this
.html( 'Instance is available - <a href="javascript:location.reload();">Reload the page</a>' );
this.parents( '#connection_status' )
.addClass( 'online' );
this.parents( '.blockUI' )
.css( 'borderColor', '#080' );
},
error : function()
{
connection_check_delay += connection_check_delay;
window.setTimeout( connection_check, connection_check_delay );
},
complete : function()
{
this
.removeClass( 'loader' );
}
}
);
};
var connection_error = function connection_error()
{
connection_working = false;
$.blockUI
(
{
message: $( '#connection_status' ),
css: { width: '450px', borderColor: '#f00' }
}
);
window.setTimeout( connection_check, connection_check_delay );
}
$( document ).ajaxError
(
function( event, xhr, settings, thrownError )
{
if( connection_working && 0 === xhr.status )
{
connection_error();
}
}
);
$.ajaxSetup( { cache: false } );
var app = new solr_admin( app_config );

View File

@ -1,877 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
var zk_error = function zk_error( xhr, text_status, error_thrown )
{
var zk = null;
try
{
eval( 'zk = ' + xhr.responseText + ';' );
}
catch( e ) {}
var message = '<p class="txt">Loading of "<code>' + xhr.url + '</code>" '
+ 'failed (HTTP-Status <code>' + xhr.status + '</code>)</p>' + "\n";
if( zk.error )
{
message += '<p class="msg">"' + zk.error.esc() + '"</p>' + "\n";
}
this.closest( '#cloud' )
.html( '<div class="block" id="error">' + message + '</div>' );
};
var init_debug = function( cloud_element )
{
var debug_element = $( '#debug', cloud_element );
var debug_button = $( '#menu #cloud .dump a' );
var clipboard_element = $( '.clipboard', debug_element );
var clipboard_button = $( 'a', clipboard_element );
debug_button
.die( 'click' )
.live
(
'click',
function( event )
{
debug_element.trigger( 'show' );
return false;
}
);
$( '.close', debug_element )
.die( 'click' )
.live
(
'click',
function( event )
{
debug_element.trigger( 'hide' );
return false;
}
);
$( '.clipboard', debug_element )
.die( 'click' )
.live
(
'click',
function( event )
{
return false;
}
);
debug_element
.die( 'show' )
.live
(
'show',
function( event )
{
debug_element.show();
$.ajax
(
{
url : app.config.solr_path + '/admin/zookeeper?wt=json&dump=true',
dataType : 'text',
context : debug_element,
beforeSend : function( xhr, settings )
{
$( '.debug', debug_element )
.html( '<span class="loader">Loading Dump ...</span>' );
ZeroClipboard.setMoviePath( 'img/ZeroClipboard.swf' );
clipboard_client = new ZeroClipboard.Client();
clipboard_client.addEventListener
(
'load',
function( client )
{
}
);
clipboard_client.addEventListener
(
'complete',
function( client, text )
{
clipboard_element
.addClass( 'copied' );
clipboard_button
.data( 'text', clipboard_button.text() )
.text( clipboard_button.data( 'copied' ) );
}
);
},
success : function( response, text_status, xhr )
{
clipboard_client.glue
(
clipboard_element.get(0),
clipboard_button.get(0)
);
clipboard_client.setText( response.replace( /\\/g, '\\\\' ) );
$( '.debug', debug_element )
.removeClass( 'loader' )
.text( response );
},
error : function( xhr, text_status, error_thrown )
{
},
complete : function( xhr, text_status )
{
}
}
);
}
)
.die( 'hide' )
.live
(
'hide',
function( event )
{
$( '.debug', debug_element )
.empty();
clipboard_element
.removeClass( 'copied' );
clipboard_button
.data( 'copied', clipboard_button.text() )
.text( clipboard_button.data( 'text' ) );
clipboard_client.destroy();
debug_element.hide();
}
);
};
var helper_path_class = function( p )
{
var classes = [ 'link' ];
classes.push( 'lvl-' + p.target.depth );
if( p.target.data && p.target.data.leader )
{
classes.push( 'leader' );
}
if( p.target.data && p.target.data.state )
{
classes.push( p.target.data.state );
}
return classes.join( ' ' );
};
var helper_node_class = function( d )
{
var classes = [ 'node' ];
classes.push( 'lvl-' + d.depth );
if( d.data && d.data.leader )
{
classes.push( 'leader' );
}
if( d.data && d.data.state )
{
classes.push( d.data.state );
}
return classes.join( ' ' );
};
var helper_data = {
protocol: [],
host: [],
hostname: [],
port: [],
pathname: []
};
var helper_node_text = function( d )
{
if( !d.data || !d.data.uri )
{
return d.name;
}
var name = d.data.uri.hostname;
if( 1 !== helper_data.protocol.length )
{
name = d.data.uri.protocol + '//' + name;
}
if( 1 !== helper_data.port.length )
{
name += ':' + d.data.uri.port;
}
if( 1 !== helper_data.pathname.length )
{
name += d.data.uri.pathname;
}
return name;
};
var generate_graph = function( graph_element, graph_data, leaf_count )
{
var w = graph_element.width(),
h = leaf_count * 20;
var tree = d3.layout.tree()
.size([h, w - 400]);
var diagonal = d3.svg.diagonal()
.projection(function(d) { return [d.y, d.x]; });
var vis = d3.select( '#canvas' ).append( 'svg' )
.attr( 'width', w )
.attr( 'height', h)
.append( 'g' )
.attr( 'transform', 'translate(100, 0)' );
var nodes = tree.nodes( graph_data );
var link = vis.selectAll( 'path.link' )
.data( tree.links( nodes ) )
.enter().append( 'path' )
.attr( 'class', helper_path_class )
.attr( 'd', diagonal );
var node = vis.selectAll( 'g.node' )
.data( nodes )
.enter().append( 'g' )
.attr( 'class', helper_node_class )
.attr( 'transform', function(d) { return 'translate(' + d.y + ',' + d.x + ')'; } )
node.append( 'circle' )
.attr( 'r', 4.5 );
node.append( 'text' )
.attr( 'dx', function( d ) { return 0 === d.depth ? -8 : 8; } )
.attr( 'dy', function( d ) { return 5; } )
.attr( 'text-anchor', function( d ) { return 0 === d.depth ? 'end' : 'start'; } )
.attr( 'data-href', function( d ) { return d.name; } )
.text( helper_node_text );
$( 'text[data-href*="//"]', graph_element )
.die( 'click' )
.live
(
'click',
function()
{
location.href = $( this ).data( 'href' );
}
);
};
var generate_rgraph = function( graph_element, graph_data, leaf_count )
{
var max_val = Math.min( graph_element.width(), $( 'body' ).height() )
var r = max_val / 2;
var cluster = d3.layout.cluster()
.size([360, r - 160]);
var diagonal = d3.svg.diagonal.radial()
.projection(function(d) { return [d.y, d.x / 180 * Math.PI]; });
var vis = d3.select( '#canvas' ).append( 'svg' )
.attr( 'width', r * 2 )
.attr( 'height', r * 2 )
.append( 'g' )
.attr( 'transform', 'translate(' + r + ',' + r + ')' );
var nodes = cluster.nodes( graph_data );
var link = vis.selectAll( 'path.link' )
.data( cluster.links( nodes ) )
.enter().append( 'path' )
.attr( 'class', helper_path_class )
.attr( 'd', diagonal );
var node = vis.selectAll( 'g.node' )
.data( nodes )
.enter().append( 'g' )
.attr( 'class', helper_node_class )
.attr( 'transform', function(d) { return 'rotate(' + (d.x - 90) + ')translate(' + d.y + ')'; } )
node.append( 'circle' )
.attr( 'r', 4.5 );
node.append( 'text' )
.attr( 'dx', function(d) { return d.x < 180 ? 8 : -8; } )
.attr( 'dy', '.31em' )
.attr( 'text-anchor', function(d) { return d.x < 180 ? 'start' : 'end'; } )
.attr( 'transform', function(d) { return d.x < 180 ? null : 'rotate(180)'; } )
.attr( 'data-href', function( d ) { return d.name; } )
.text( helper_node_text );
$( 'text[data-href*="//"]', graph_element )
.die( 'click' )
.live
(
'click',
function()
{
location.href = $( this ).data( 'href' );
}
);
};
var prepare_graph_data = function( response, graph_element, live_nodes, callback )
{
var state = null;
eval( 'state = ' + response.znode.data + ';' );
var leaf_count = 0;
var graph_data = {
name: null,
children : []
};
for( var c in state )
{
var shards = [];
for( var s in state[c].shards )
{
var nodes = [];
for( var n in state[c].shards[s].replicas )
{
leaf_count++;
var replica = state[c].shards[s].replicas[n]
var uri = replica.base_url;
var parts = uri.match( /^(\w+:)\/\/(([\w\d\.-]+)(:(\d+))?)(.+)$/ );
var uri_parts = {
protocol: parts[1],
host: parts[2],
hostname: parts[3],
port: parseInt( parts[5] || 80, 10 ),
pathname: parts[6]
};
helper_data.protocol.push( uri_parts.protocol );
helper_data.host.push( uri_parts.host );
helper_data.hostname.push( uri_parts.hostname );
helper_data.port.push( uri_parts.port );
helper_data.pathname.push( uri_parts.pathname );
var status = replica.state;
if( !live_nodes[replica.node_name] )
{
status = 'gone';
}
var node = {
name: uri,
data: {
type : 'node',
state : status,
leader : 'true' === replica.leader,
uri : uri_parts
}
};
nodes.push( node );
}
var shard = {
name: s,
data: {
type : 'shard'
},
children: nodes
};
shards.push( shard );
}
var collection = {
name: c,
data: {
type : 'collection'
},
children: shards
};
graph_data.children.push( collection );
}
helper_data.protocol = $.unique( helper_data.protocol );
helper_data.host = $.unique( helper_data.host );
helper_data.hostname = $.unique( helper_data.hostname );
helper_data.port = $.unique( helper_data.port );
helper_data.pathname = $.unique( helper_data.pathname );
callback( graph_element, graph_data, leaf_count );
}
var update_status_filter = function(filterType, filterVal) {
if (filterType == 'status') {
$( '#cloudGraphPagingStatusFilter' ).val(filterVal);
$( '#cloudGraphPagingStatusFilter' ).show();
$( '#cloudGraphPagingFilter' ).hide();
$( '#cloudGraphPagingFilter' ).val('');
} else {
$( '#cloudGraphPagingStatusFilter' ).hide();
$( '#cloudGraphPagingStatusFilter' ).val('');
$( '#cloudGraphPagingFilter' ).val(filterVal);
$( '#cloudGraphPagingFilter' ).show();
}
};
var prepare_graph = function( graph_element, callback )
{
$.ajax
(
{
url : app.config.solr_path + '/admin/zookeeper?wt=json&path=%2Flive_nodes',
dataType : 'json',
success : function( response, text_status, xhr )
{
var live_nodes = {};
for( var c in response.tree[0].children )
{
live_nodes[response.tree[0].children[c].data.title] = true;
}
var start = $( '#cloudGraphPagingStart' ).val();
var rows = $( '#cloudGraphPagingRows' ).val();
var clusterStateUrl = app.config.solr_path + '/admin/zookeeper?wt=json&detail=true&path=%2Fclusterstate.json&view=graph';
if (start && rows)
clusterStateUrl += ('&start='+start+'&rows='+rows);
var filterType = $( '#cloudGraphPagingFilterType' ).val();
if (filterType) {
var filter = (filterType == 'status')
? $( '#cloudGraphPagingStatusFilter' ).val()
: $( '#cloudGraphPagingFilter' ).val();
if (filter)
clusterStateUrl += ('&filterType='+filterType+'&filter='+filter);
}
$.ajax
(
{
url : clusterStateUrl,
dataType : 'json',
context : graph_element,
beforeSend : function( xhr, settings )
{
this.show();
},
success : function( response, text_status, xhr )
{
prepare_graph_data(response, graph_element, live_nodes, callback)
if (response.znode && response.znode.paging) {
var parr = response.znode.paging.split('|');
if (parr.length < 3) {
$( '#cloudGraphPaging' ).hide();
return;
}
var start = Math.max(parseInt(parr[0]),0);
var prevEnabled = (start > 0);
$('#cloudGraphPagingPrev').prop('disabled', !prevEnabled);
if (prevEnabled)
$('#cloudGraphPagingPrev').show();
else
$('#cloudGraphPagingPrev').hide();
var rows = parseInt(parr[1])
var total = parseInt(parr[2])
$( '#cloudGraphPagingStart' ).val(start);
$( '#cloudGraphPagingRows' ).val(rows);
if (rows == -1)
$( '#cloudGraphPaging' ).hide();
var filterType = parr.length > 3 ? parr[3] : '';
if (filterType == '' || filterType == 'none') filterType = 'status';
$( '#cloudGraphPagingFilterType' ).val(filterType);
var filter = parr.length > 4 ? parr[4] : '';
update_status_filter(filterType, filter);
var page = Math.floor(start/rows)+1;
var pages = Math.ceil(total/rows);
var last = Math.min(start+rows,total);
var nextEnabled = (last < total);
$('#cloudGraphPagingNext').prop('disabled', !nextEnabled);
if (nextEnabled)
$('#cloudGraphPagingNext').show();
else
$('#cloudGraphPagingNext').hide();
var status = (total > 0)
? 'Collections '+(start+1)+' - '+last+' of '+total+'. '
: 'No collections found.';
$( '#cloudGraphPagingStatus' ).html(status);
} else {
$( '#cloudGraphPaging' ).hide();
}
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
};
var init_graph = function( graph_element )
{
prepare_graph
(
graph_element,
function( graph_element, graph_data, leaf_count )
{
generate_graph( graph_element, graph_data, leaf_count );
}
);
}
var init_rgraph = function( graph_element )
{
prepare_graph
(
graph_element,
function( graph_element, graph_data, leaf_count )
{
generate_rgraph( graph_element, graph_data, leaf_count );
}
);
}
var init_tree = function( tree_element )
{
$.ajax
(
{
url : app.config.solr_path + '/admin/zookeeper?wt=json',
dataType : 'json',
context : tree_element,
beforeSend : function( xhr, settings )
{
this
.show();
},
success : function( response, text_status, xhr )
{
var self = this;
$( '#tree', this )
.jstree
(
{
"plugins" : [ "json_data" ],
"json_data" : {
"data" : response.tree,
"progressive_render" : true
},
"core" : {
"animation" : 0
}
}
)
.jstree
(
'open_node',
'li:first'
);
var tree_links = $( '#tree a', this );
tree_links
.die( 'click' )
.live
(
'click',
function( event )
{
$( 'a.active', $( this ).parents( '#tree' ) )
.removeClass( 'active' );
$( this )
.addClass( 'active' );
tree_element
.addClass( 'show' );
var file_content = $( '#file-content' );
$( 'a.close', file_content )
.die( 'click' )
.live
(
'click',
function( event )
{
$( '#tree a.active' )
.removeClass( 'active' );
tree_element
.removeClass( 'show' );
return false;
}
);
$.ajax
(
{
url : this.href,
dataType : 'json',
context : file_content,
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
var props = [];
for( var key in response.znode.prop )
{
props.push
(
'<li><dl class="clearfix">' + "\n" +
'<dt>' + key.esc() + '</dt>' + "\n" +
'<dd>' + response.znode.prop[key].esc() + '</dd>' + "\n" +
'</dl></li>'
);
}
$( '#prop ul', this )
.empty()
.html( props.join( "\n" ) );
$( '#prop ul li:odd', this )
.addClass( 'odd' );
var data_element = $( '#data', this );
var highlight = false;
var data = '<em>Node "' + response.znode.path + '" has no utf8 Content</em>';
if( response.znode.data )
{
var classes = '';
var path = response.znode.path.split( '.' );
if( 1 < path.length )
{
highlight = true;
classes = 'syntax language-' + path.pop().esc();
}
data = '<pre class="' + classes + '">'
+ response.znode.data.esc()
+ '</pre>';
}
data_element
.show()
.html( data );
if( highlight )
{
hljs.highlightBlock( data_element.get(0) );
}
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
return false;
}
);
},
error : zk_error,
complete : function( xhr, text_status )
{
}
}
);
};
// updates the starting position for paged navigation
// and then rebuilds the graph based on the selected page
var update_start = function(direction, cloud_element) {
var start = $( '#cloudGraphPagingStart' ).val();
var rows = $( '#cloudGraphPagingRows' ).val();
var startAt = start ? parseInt(start) : 0;
var numRows = rows ? parseInt(rows) : 20;
var newStart = Math.max(startAt + (rows * direction),0);
$( '#cloudGraphPagingStart' ).val(newStart);
var graph_element = $( '#graph-content', cloud_element );
$( '#canvas', graph_element).empty();
init_graph( graph_element );
};
// #/~cloud
sammy.get
(
/^#\/(~cloud)$/,
function( context )
{
var content_element = $( '#content' );
$.get
(
'tpl/cloud.html',
function( template )
{
content_element
.html( template );
var cloud_element = $( '#cloud', content_element );
var navigation_element = $( '#menu #cloud' );
init_debug( cloud_element );
$( '.tree', navigation_element )
.die( 'activate' )
.live
(
'activate',
function( event )
{
$( this ).addClass( 'active' );
init_tree( $( '#tree-content', cloud_element ) );
}
);
$( '.graph', navigation_element )
.die( 'activate' )
.live
(
'activate',
function( event )
{
$( this ).addClass( 'active' );
init_graph( $( '#graph-content', cloud_element ) );
$('#cloudGraphPagingNext').click(function() {
update_start(1, cloud_element);
});
$('#cloudGraphPagingPrev').click(function() {
update_start(-1, cloud_element);
});
$('#cloudGraphPagingRows').change(function() {
var rows = $( this ).val();
if (!rows || rows == '')
$( this ).val("20");
// ? restart the start position when rows changes?
$( '#cloudGraphPagingStart' ).val(0);
update_start(-1, cloud_element);
});
$('#cloudGraphPagingFilter').change(function() {
var filter = $( this ).val();
// reset the start position when the filter changes
$( '#cloudGraphPagingStart' ).val(0);
update_start(-1, cloud_element);
});
$( '#cloudGraphPagingStatusFilter' ).show();
$( '#cloudGraphPagingFilter' ).hide();
$('#cloudGraphPagingFilterType').change(function() {
update_status_filter($( this ).val(), '');
});
$('#cloudGraphPagingStatusFilter').change(function() {
// just reset the paged navigation controls based on this update
$( '#cloudGraphPagingStart' ).val(0);
update_start(-1, cloud_element);
});
}
);
$( '.rgraph', navigation_element )
.die( 'activate' )
.live
(
'activate',
function( event )
{
$( "#cloudGraphPaging" ).hide(); // TODO: paging for rgraph too
$( this ).addClass( 'active' );
init_rgraph( $( '#graph-content', cloud_element ) );
}
);
$.ajax
(
{
url : app.config.solr_path + '/admin/zookeeper?wt=json',
dataType : 'json',
context : cloud_element,
success : function( response, text_status, xhr )
{
$( 'a[href="' + context.path + '"]', navigation_element )
.trigger( 'activate' );
},
error : zk_error
}
);
}
);
}
);

View File

@ -1,719 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
sammy.bind
(
'cores_load_data',
function( event, params )
{
$.ajax
(
{
url : app.config.solr_path + app.config.core_admin_path + '?wt=json',
dataType : 'json',
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
if( params.only_failures )
{
app.check_for_init_failures( response );
return true;
}
var has_cores = false;
for( core in response.status )
{
has_cores = true; break;
}
app.set_cores_data( response );
if( has_cores )
{
params.success( app.cores_data );
}
else
{
params.error();
}
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);
sammy.bind
(
'cores_build_navigation',
function( event, params )
{
var navigation_content = ['<ul>'];
for( var core in params.cores )
{
var core_name = core;
if( !core_name )
{
core_name = '<em>(empty)</em>';
}
navigation_content.push( '<li><a href="' + params.basepath + core + '">' + core_name + '</a></li>' );
}
params.navigation_element
.html( navigation_content.join( "\n" ) );
$( 'a[href="' + params.basepath + params.current_core + '"]', params.navigation_element ).parent()
.addClass( 'current' );
}
);
sammy.bind
(
'cores_load_template',
function( event, params )
{
if( app.cores_template )
{
params.callback();
return true;
}
$.get
(
'tpl/cores.html',
function( template )
{
params.content_element
.html( template );
app.cores_template = template;
params.callback();
}
);
}
);
// #/~cores
sammy.get
(
/^#\/(~cores)$/,
function( context )
{
delete app.cores_template;
var content_element = $( '#content' );
sammy.trigger
(
'cores_load_data',
{
success : function( cores )
{
var first_core = null;
for( var key in cores )
{
if( !first_core )
{
first_core = key;
}
continue;
}
context.redirect( context.path + '/' + first_core );
},
error : function()
{
sammy.trigger
(
'cores_load_template',
{
content_element : content_element,
callback : function()
{
var cores_element = $( '#cores', content_element );
var navigation_element = $( '#navigation', cores_element );
var data_element = $( '#data', cores_element );
var core_data_element = $( '#core-data', data_element );
var index_data_element = $( '#index-data', data_element );
// layout
var ui_block = $( '#ui-block' );
var actions_element = $( '.actions', cores_element );
var div_action = $( 'div.action', actions_element );
ui_block
.css( 'opacity', 0.7 )
.width( cores_element.width() + 10 )
.height( cores_element.height() );
if( $( '#cloud.global' ).is( ':visible' ) )
{
$( '.cloud', div_action )
.show();
}
$( 'button.action', actions_element )
.die( 'click' )
.live
(
'click',
function( event )
{
var self = $( this );
self
.toggleClass( 'open' );
$( '.action.' + self.attr( 'id' ), actions_element )
.trigger( 'open' );
return false;
}
);
div_action
.die( 'close' )
.live
(
'close',
function( event )
{
div_action.hide();
ui_block.hide();
}
)
.die( 'open' )
.live
(
'open',
function( event )
{
var self = $( this );
var rel = $( '#' + self.data( 'rel' ) );
self
.trigger( 'close' )
.show()
.css( 'left', rel.position().left );
ui_block
.show();
}
);
$( 'form button.reset', actions_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).closest( 'div.action' )
.trigger( 'close' );
}
);
$( 'form', div_action )
.ajaxForm
(
{
url : app.config.solr_path + app.config.core_admin_path + '?wt=json&indexInfo=false',
dataType : 'json',
beforeSubmit : function( array, form, options )
{
$( 'button[type="submit"] span', form )
.addClass( 'loader' );
},
success : function( response, status_text, xhr, form )
{
delete app.cores_data;
sammy.refresh();
$( 'button.reset', form )
.trigger( 'click' );
},
error : function( xhr, text_status, error_thrown )
{
var response = null;
eval( 'response = ' + xhr.responseText + ';' );
var error_elem = $( '.error', div_action.filter( ':visible' ) );
error_elem.show();
$( 'span', error_elem ).text( response.error.msg );
},
complete : function()
{
$( 'button span.loader', actions_element )
.removeClass( 'loader' );
}
}
);
// --
$( '#add', content_element )
.trigger( 'click' );
$( '[data-rel="add"] input[type="text"]:first', content_element )
.focus();
}
}
);
}
}
);
}
);
// #/~cores
sammy.get
(
/^#\/(~cores)\//,
function( context )
{
var content_element = $( '#content' );
var path_parts = this.path.match( /^(.+\/~cores\/)(.*)$/ );
var current_core = path_parts[2];
sammy.trigger
(
'cores_load_data',
{
error : function()
{
context.redirect( '#/' + context.params.splat[0] );
},
success : function( cores )
{
sammy.trigger
(
'cores_load_template',
{
content_element : content_element,
callback : function()
{
var cores_element = $( '#cores', content_element );
var navigation_element = $( '#navigation', cores_element );
var data_element = $( '#data', cores_element );
var core_data_element = $( '#core-data', data_element );
var index_data_element = $( '#index-data', data_element );
cores_element
.removeClass( 'empty' );
sammy.trigger
(
'cores_build_navigation',
{
cores : cores,
basepath : path_parts[1],
current_core : current_core,
navigation_element : navigation_element
}
);
var core_data = cores[current_core];
var core_basepath = $( '#' + current_core, app.menu_element ).attr( 'data-basepath' );
// core-data
$( '.startTime dd', core_data_element )
.html( core_data.startTime );
$( '.instanceDir dd', core_data_element )
.html( core_data.instanceDir );
$( '.dataDir dd', core_data_element )
.html( core_data.dataDir );
// index-data
$( '.lastModified dd', index_data_element )
.html( core_data.index.lastModified || '-' );
$( '.version dd', index_data_element )
.html( core_data.index.version );
$( '.numDocs dd', index_data_element )
.html( core_data.index.numDocs );
$( '.maxDoc dd', index_data_element )
.html( core_data.index.maxDoc );
$( '.deletedDocs dd', index_data_element )
.html( core_data.index.deletedDocs || '-' );
$( '.optimized dd', index_data_element )
.addClass( !core_data.index.hasDeletions ? 'ico-1' : 'ico-0' );
$( '#actions #optimize', cores_element )
.show();
$( '.optimized dd span', index_data_element )
.html( !core_data.index.hasDeletions ? 'yes' : 'no' );
$( '.current dd', index_data_element )
.addClass( core_data.index.current ? 'ico-1' : 'ico-0' );
$( '.current dd span', index_data_element )
.html( core_data.index.current ? 'yes' : 'no' );
$( '.directory dd', index_data_element )
.html
(
core_data.index.directory
.replace( /:/g, ':&#8203;' )
.replace( /@/g, '@&#8203;' )
);
var core_names = [];
var core_selects = $( '#actions select', cores_element );
for( var key in cores )
{
core_names.push( '<option value="' + key + '">' + key + '</option>' )
}
core_selects
.html( core_names.join( "\n") );
$( 'option[value="' + current_core + '"]', core_selects.filter( '.other' ) )
.remove();
$( 'input[data-core="current"]', cores_element )
.val( current_core );
// layout
var ui_block = $( '#ui-block' );
var actions_element = $( '.actions', cores_element );
var div_action = $( 'div.action', actions_element );
ui_block
.css( 'opacity', 0.7 )
.width( cores_element.width() + 10 )
.height( cores_element.height() );
if( $( '#cloud.global' ).is( ':visible' ) )
{
$( '.cloud', div_action )
.show();
}
$( 'button.action', actions_element )
.die( 'click' )
.live
(
'click',
function( event )
{
var self = $( this );
self
.toggleClass( 'open' );
$( '.action.' + self.attr( 'id' ), actions_element )
.trigger( 'open' );
return false;
}
);
div_action
.die( 'close' )
.live
(
'close',
function( event )
{
div_action.hide();
ui_block.hide();
}
)
.die( 'open' )
.live
(
'open',
function( event )
{
var self = $( this );
var rel = $( '#' + self.data( 'rel' ) );
self
.trigger( 'close' )
.show()
.css( 'left', rel.position().left );
ui_block
.show();
}
);
$( 'form button.reset', actions_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).closest( 'div.action' )
.trigger( 'close' );
}
);
var form_callback = {
rename : function( form, response )
{
var url = path_parts[1] + $( 'input[name="other"]', form ).val();
context.redirect( url );
}
};
$( 'form', div_action )
.ajaxForm
(
{
url : app.config.solr_path + app.config.core_admin_path + '?wt=json&indexInfo=false',
dataType : 'json',
beforeSubmit : function( array, form, options )
{
$( 'button[type="submit"] span', form )
.addClass( 'loader' );
},
success : function( response, status_text, xhr, form )
{
var action = $( 'input[name="action"]', form ).val().toLowerCase();
delete app.cores_data;
if( form_callback[action] )
{
form_callback[action]( form, response );
}
else
{
sammy.refresh();
}
$( 'button.reset', form )
.trigger( 'click' );
},
error : function( xhr, text_status, error_thrown )
{
var response = null;
eval( 'response = ' + xhr.responseText + ';' );
var error_elem = $( '.error', div_action.filter( ':visible' ) );
error_elem.show();
$( 'span', error_elem ).text( response.error.msg );
},
complete : function()
{
$( 'button span.loader', actions_element )
.removeClass( 'loader' );
}
}
);
var reload_button = $( '#actions #reload', cores_element );
reload_button
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : app.config.solr_path + app.config.core_admin_path + '?wt=json&action=RELOAD&core=' + current_core,
dataType : 'json',
context : $( this ),
beforeSend : function( xhr, settings )
{
$( 'span', this )
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
this
.addClass( 'success' );
delete app.cores_data;
sammy.refresh();
window.setTimeout
(
function()
{
reload_button
.removeClass( 'success' );
},
1000
);
},
error : function( xhr, text_status, error_thrown )
{
this
.addClass( 'warn' );
sammy.trigger( 'cores_load_data', { only_failures : true } );
window.setTimeout
(
function()
{
reload_button
.removeClass( 'warn' );
},
1000
);
},
complete : function( xhr, text_status )
{
$( 'span', this )
.removeClass( 'loader' );
}
}
);
}
);
$( '#actions #unload', cores_element )
.die( 'click' )
.live
(
'click',
function( event )
{
var ret = confirm( 'Do you really want to unload Core "' + current_core + '"?' );
if( !ret )
{
return false;
}
$.ajax
(
{
url : app.config.solr_path + app.config.core_admin_path + '?wt=json&action=UNLOAD&core=' + current_core,
dataType : 'json',
context : $( this ),
beforeSend : function( xhr, settings )
{
$( 'span', this )
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
delete app.cores_data;
context.redirect( path_parts[1].substr( 0, path_parts[1].length - 1 ) );
},
error : function( xhr, text_status, error_thrown )
{
},
complete : function( xhr, text_status )
{
$( 'span', this )
.removeClass( 'loader' );
}
}
);
}
);
var optimize_button = $( '#actions #optimize', cores_element );
optimize_button
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json',
dataType : 'json',
context : $( this ),
beforeSend : function( xhr, settings )
{
$( 'span', this )
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
this
.addClass( 'success' );
window.setTimeout
(
function()
{
optimize_button
.removeClass( 'success' );
},
1000
);
$( '.optimized dd.ico-0', index_data_element )
.removeClass( 'ico-0' )
.addClass( 'ico-1' );
},
error : function( xhr, text_status, error_thrown)
{
console.warn( 'd0h, optimize broken!' );
},
complete : function( xhr, text_status )
{
$( 'span', this )
.removeClass( 'loader' );
}
}
);
}
);
$( '.timeago', data_element )
.timeago();
$( 'ul', data_element )
.each
(
function( i, element )
{
$( 'li:odd', element )
.addClass( 'odd' );
}
)
}
}
);
}
}
);
}
);

View File

@ -1,562 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
var set_healthcheck_status = function( status )
{
var hc_button = $( '.healthcheck-status' )
if ( status == 'enable' )
{
hc_button.parents( 'dd' )
.removeClass( 'ico-0' )
.addClass( 'ico-1' );
hc_button
.addClass( 'enabled' )
.html( 'disable ping' );
} else {
hc_button.parents( 'dd' )
.removeClass( 'ico-1')
.addClass( 'ico-0' );
hc_button
.removeClass( 'enabled' )
.html( 'enable ping' );
}
};
// #/:core
sammy.get
(
new RegExp( app.core_regex_base + '$' ),
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
content_element
.removeClass( 'single' );
if( !app.core_menu.data( 'admin-extra-loaded' ) )
{
app.core_menu.data( 'admin-extra-loaded', new Date() );
$.get
(
core_basepath + '/admin/file/?file=admin-extra.menu-top.html&contentType=text/html;charset=utf-8',
function( menu_extra )
{
app.core_menu
.prepend( menu_extra );
}
);
$.get
(
core_basepath + '/admin/file/?file=admin-extra.menu-bottom.html&contentType=text/html;charset=utf-8',
function( menu_extra )
{
app.core_menu
.append( menu_extra );
}
);
}
$.get
(
'tpl/dashboard.html',
function( template )
{
content_element
.html( template );
var dashboard_element = $( '#dashboard' );
$.ajax
(
{
url : core_basepath + '/admin/luke?wt=json&show=index&numTerms=0',
dataType : 'json',
context : $( '#statistics', dashboard_element ),
beforeSend : function( xhr, settings )
{
$( 'h2', this )
.addClass( 'loader' );
$( '.message', this )
.show()
.html( 'Loading ...' );
$( '.content', this )
.hide();
},
success : function( response, text_status, xhr )
{
$( '.message', this )
.empty()
.hide();
$( '.content', this )
.show();
var data = {
'index_num-doc' : response['index']['numDocs'],
'index_heap-usage-bytes' : response['index']['indexHeapUsageBytes'],
'index_max-doc' : response['index']['maxDoc'],
'index_deleted-doc' : response['index']['deletedDocs'],
'index_version' : response['index']['version'],
'index_segmentCount' : response['index']['segmentCount'],
'index_last-modified' : response['index']['lastModified']
};
for( var key in data )
{
$( '.' + key, this )
.show();
$( '.value.' + key, this )
.html( data[key] );
}
var optimized_element = $( '.value.index_optimized', this );
if( !response['index']['hasDeletions'] )
{
optimized_element
.addClass( 'ico-1' );
$( 'span', optimized_element )
.html( 'yes' );
}
else
{
optimized_element
.addClass( 'ico-0' );
$( 'span', optimized_element )
.html( 'no' );
}
var current_element = $( '.value.index_current', this );
if( response['index']['current'] )
{
current_element
.addClass( 'ico-1' );
$( 'span', current_element )
.html( 'yes' );
}
else
{
current_element
.addClass( 'ico-0' );
$( 'span', current_element )
.html( 'no' );
}
$( 'a', optimized_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json',
dataType : 'json',
context : $( this ),
beforeSend : function( xhr, settings )
{
this
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
this.parents( 'dd' )
.removeClass( 'ico-0' )
.addClass( 'ico-1' );
},
error : function( xhr, text_status, error_thrown)
{
console.warn( 'd0h, optimize broken!' );
},
complete : function( xhr, text_status )
{
this
.removeClass( 'loader' );
}
}
);
}
);
$( '.timeago', this )
.timeago();
},
error : function( xhr, text_status, error_thrown )
{
this
.addClass( 'disabled' );
$( '.message', this )
.show()
.html( 'Luke is not configured' );
},
complete : function( xhr, text_status )
{
$( 'h2', this )
.removeClass( 'loader' );
}
}
);
$.ajax
(
{
url : core_basepath + '/replication?command=details&wt=json',
dataType : 'json',
context : $( '#replication', dashboard_element ),
beforeSend : function( xhr, settings )
{
$( 'h2', this )
.addClass( 'loader' );
$( '.message', this )
.show()
.html( 'Loading' );
$( '.content', this )
.hide();
},
success : function( response, text_status, xhr )
{
$( '.message', this )
.empty()
.hide();
$( '.content', this )
.show();
$( '.replication', context.active_core )
.show();
var data = response.details;
var is_slave = 'undefined' !== typeof( data.slave );
var headline = $( 'h2 span', this );
var details_element = $( '#details', this );
var current_type_element = $( ( is_slave ? '.slave' : '.masterSearch' ), this );
var master_data = is_slave ? data.slave.masterDetails : data;
if( is_slave )
{
this
.addClass( 'slave' );
headline
.html( headline.html() + ' (Slave)' );
}
else
{
this
.addClass( 'master' );
headline
.html( headline.html() + ' (Master)' );
}
// the currently searchable commit regardless of type
$( '.version div', current_type_element )
.html( data.indexVersion );
$( '.generation div', current_type_element )
.html( data.generation );
$( '.size div', current_type_element )
.html( data.indexSize );
// what's replicable on the master
var master_element = $( '.master', details_element );
$( '.version div', master_element )
.html( master_data.master.replicableVersion || '-' );
$( '.generation div', master_element )
.html( master_data.master.replicableGeneration || '-' );
$( '.size div', master_element )
.html( "-" );
if( is_slave )
{
var master_element = $( '.masterSearch', details_element );
$( '.version div', master_element )
.html( data.slave.masterDetails.indexVersion );
$( '.generation div', master_element )
.html( data.slave.masterDetails.generation );
$( '.size div', master_element )
.html( data.slave.masterDetails.indexSize );
// warnings if slave version|gen doesn't match what's replicable
if( data.indexVersion !== master_data.master.replicableVersion )
{
$( '.version', details_element )
.addClass( 'diff' );
}
else
{
$( '.version', details_element )
.removeClass( 'diff' );
}
if( data.generation !== master_data.master.replicableGeneration )
{
$( '.generation', details_element )
.addClass( 'diff' );
}
else
{
$( '.generation', details_element )
.removeClass( 'diff' );
}
}
},
error : function( xhr, text_status, error_thrown)
{
this
.addClass( 'disabled' );
$( '.message', this )
.show()
.html( 'Replication is not configured' );
},
complete : function( xhr, text_status )
{
$( 'h2', this )
.removeClass( 'loader' );
}
}
);
$.ajax
(
{
url : core_basepath + '/admin/system?wt=json',
dataType : 'json',
context : $( '#instance', dashboard_element ),
beforeSend : function( xhr, settings )
{
$( 'h2', this )
.addClass( 'loader' );
$( '.message', this )
.show()
.html( 'Loading' );
$( '.content', this )
.hide();
},
success : function( response, text_status, xhr )
{
$( '.message', this )
.empty()
.hide();
$( '.content', this )
.show();
$( 'dl', this )
.show();
var data = {
'dir_cwd' : response.core.directory.cwd,
'dir_instance' : response.core.directory.instance,
'dir_data' : response.core.directory.data,
'dir_index' : response.core.directory.index,
'dir_impl' : response.core.directory.dirimpl
};
for( var key in data )
{
$( '.' + key, this )
.show();
$( '.value.' + key, this )
.html( data[key] );
}
},
error : function( xhr, text_status, error_thrown)
{
this
.addClass( 'disabled' );
$( '.message', this )
.show()
.html( '/admin/system Handler is not configured' );
},
complete : function( xhr, text_status )
{
$( 'h2', this )
.removeClass( 'loader' );
}
}
);
$.ajax
(
{
url : core_basepath + '/admin/file/?file=admin-extra.html',
dataType : 'html',
context : $( '#admin-extra', dashboard_element ),
beforeSend : function( xhr, settings )
{
$( 'h2', this )
.addClass( 'loader' );
$( '.message', this )
.show()
.html( 'Loading' );
$( '.content', this )
.hide();
},
success : function( response, text_status, xhr )
{
$( '.message', this )
.hide()
.empty();
$( '.content', this )
.show()
.html( response );
},
error : function( xhr, text_status, error_thrown)
{
this
.addClass( 'disabled' );
$( '.message', this )
.show()
.html( 'We found no "admin-extra.html" file.' );
},
complete : function( xhr, text_status )
{
$( 'h2', this )
.removeClass( 'loader' );
}
}
);
$.ajax
(
{
url : core_basepath + '/admin/ping?action=status&wt=json',
dataType : 'json',
context : $( '#healthcheck', dashboard_element ),
beforeSend : function( xhr, settings )
{
$( 'h2', this )
.addClass( 'loader' );
$( '.message', this )
.show()
.html( 'Loading' );
$( '.content', this )
.hide();
},
success : function( response, text_status, xhr )
{
$( '.message', this )
.empty()
.hide();
$( '.content', this )
.show();
var status_element = $( '.value.status', this );
var toggle_button = $( '.healthcheck-status', this );
var status = response['status'];
$( 'span', status_element ).html( status );
var action = ( response['status'] == 'enabled' ) ? 'enable' : 'disable';
set_healthcheck_status(action);
if( response['status'] == 'enabled' )
{
status_element
.addClass( 'ico-1' );
toggle_button
.addClass( 'enabled' );
}
else
{
status_element
.addClass( 'ico-0' );
}
$( '.healthcheck-status', status_element )
.die( 'click' )
.live
(
'click',
function( event )
{
var action = $(this).hasClass( 'enabled' ) ? 'disable' : 'enable';
$.ajax
(
{
url : core_basepath + '/admin/ping?action=' + action + '&wt=json',
dataType : 'json',
context : $( this ),
beforeSend : function( xhr, settings )
{
this
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
set_healthcheck_status(action);
},
error : function( xhr, text_status, error_thrown)
{
console.warn( 'd0h, enable broken!' );
},
complete : function( xhr, text_status )
{
this
.removeClass( 'loader' );
}
}
);
}
);
},
error : function( xhr, text_status, error_thrown)
{
this
.addClass( 'disabled' );
$( '.message', this )
.show()
.html( 'Ping request handler is not configured with a healthcheck file.' );
},
complete : function( xhr, text_status )
{
$( 'h2', this )
.removeClass( 'loader' );
}
}
);
}
);
}
);

View File

@ -1,812 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
var dataimport_timeout = 2000;
var cookie_dataimport_autorefresh = 'dataimport_autorefresh';
sammy.bind
(
'dataimport_queryhandler_load',
function( event, params )
{
var core_basepath = params.active_core.attr( 'data-basepath' );
$.ajax
(
{
url : core_basepath + '/admin/mbeans?cat=QUERY&wt=json',
dataType : 'json',
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
var handlers = response['solr-mbeans'][1];
var dataimport_handlers = [];
for( var key in handlers )
{
if( handlers[key]['class'] !== key &&
handlers[key]['class'] === 'org.apache.solr.handler.dataimport.DataImportHandler' )
{
dataimport_handlers.push( key );
}
}
params.callback( dataimport_handlers.sort(naturalSort) );
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);
// #/:core/dataimport
sammy.get
(
new RegExp( app.core_regex_base + '\\/(dataimport)$' ),
function( context )
{
sammy.trigger
(
'dataimport_queryhandler_load',
{
active_core : this.active_core,
callback : function( dataimport_handlers )
{
if( 0 === dataimport_handlers.length )
{
$( '#content' )
.html( 'sorry, no dataimport-handler defined!' );
return false;
}
context.redirect( context.path + '/' + dataimport_handlers[0] );
}
}
);
}
);
// #/:core/dataimport
sammy.get
(
new RegExp( app.core_regex_base + '\\/(dataimport)\\/' ),
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
var path_parts = this.path.match( /^(.+\/dataimport\/)(.*)$/ );
var handler_url = core_basepath + path_parts[2];
$( 'li.dataimport', this.active_core )
.addClass( 'active' );
$.get
(
'tpl/dataimport.html',
function( template )
{
content_element
.html( template );
var dataimport_element = $( '#dataimport', content_element );
var form_element = $( '#form', dataimport_element );
var config_element = $( '#config', dataimport_element );
var error_element = $( '#error', dataimport_element );
var debug_response_element = $( '#debug_response', dataimport_element );
var autorefresh_status = false;
var debug_mode = false;
// handler
sammy.trigger
(
'dataimport_queryhandler_load',
{
active_core : context.active_core,
callback : function( dataimport_handlers )
{
var handlers_element = $( '#navigation ul', form_element );
var handlers = [];
for( var i = 0; i < dataimport_handlers.length; i++ )
{
handlers.push
(
'<li><a href="' + path_parts[1] + dataimport_handlers[i] + '">' +
dataimport_handlers[i] +
'</a></li>'
);
}
$( handlers_element )
.html( handlers.join( "\n") ) ;
$( 'a[href="' + context.path + '"]', handlers_element ).closest( 'li' )
.addClass( 'current' );
$( 'form', form_element )
.show();
}
}
);
// config
function dataimport_fetch_config()
{
$.ajax
(
{
url : handler_url + '?command=show-config&indent=true',
dataType : 'xml',
context : $( '#dataimport_config', config_element ),
beforeSend : function( xhr, settings )
{
error_element
.empty()
.hide();
},
success : function( config, text_status, xhr )
{
dataimport_element
.removeClass( 'error' );
config_element
.addClass( 'hidden' );
var entities = [ '<option value=""></option>' ];
$( 'document > entity', config )
.each
(
function( i, element )
{
entities.push( '<option>' + $( element ).attr( 'name' ).esc() + '</option>' );
}
);
$( '#entity', form_element )
.html( entities.join( "\n" ) );
$( '.editable textarea', this )
.val( xhr.responseText.replace( /\n+$/, '' ) );
},
error : function( xhr, text_status, error_thrown )
{
if( 'parsererror' === error_thrown )
{
dataimport_element
.addClass( 'error' );
error_element
.text( 'Dataimport XML-Configuration is not valid' )
.show();
config_element
.removeClass( 'hidden' );
}
},
complete : function( xhr, text_status )
{
var code = $(
'<pre class="syntax language-xml"><code>' +
xhr.responseText.esc() +
'</code></pre>'
);
$( '.formatted', this ).html( code );
if( 'success' === text_status )
{
hljs.highlightBlock( code.get(0) );
}
}
}
);
}
dataimport_fetch_config();
$( '.block .toggle', dataimport_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parents( '.block' )
.toggleClass( 'hidden' );
return false;
}
)
var reload_config_element = $( '.reload_config', config_element );
reload_config_element
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : handler_url + '?command=reload-config',
dataType : 'xml',
context: $( this ),
beforeSend : function( xhr, settings )
{
this
.removeClass( 'error' )
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
this
.addClass( 'success' );
window.setTimeout
(
function()
{
reload_config_element
.removeClass( 'success' );
},
5000
);
},
error : function( xhr, text_status, error_thrown )
{
this
.addClass( 'error' );
},
complete : function( xhr, text_status )
{
this
.removeClass( 'loader' );
dataimport_fetch_config();
}
}
);
return false;
}
);
var debug_mode_element = $( '.debug_mode', config_element );
debug_mode_element
.die( 'click' )
.live
(
'click',
function( event )
{
var self = $( this );
var block = self.closest( '.block' )
var debug_checkbox = $( 'input[name="debug"]', form_element );
var submit_span = $( 'button[type="submit"] span', form_element );
debug_mode = !debug_mode;
block.toggleClass( 'debug_mode', debug_mode );
if( debug_mode )
{
block.removeClass( 'hidden' );
debug_checkbox
.attr( 'checked', 'checked' )
.trigger( 'change' );
submit_span
.data( 'original', submit_span.text() )
.text( submit_span.data( 'debugmode' ) );
}
else
{
submit_span
.text( submit_span.data( 'original' ) )
.removeData( 'original' );
}
}
);
// abort
var abort_import_element = $( '.abort-import', dataimport_element );
abort_import_element
.off( 'click' )
.on
(
'click',
function( event )
{
var span_element = $( 'span', this );
$.ajax
(
{
url : handler_url + '?command=abort&wt=json',
dataType : 'json',
type: 'GET',
context: $( this ),
beforeSend : function( xhr, settings )
{
span_element
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
span_element
.data( 'original', span_element.text() )
.text( span_element.data( 'aborting' ) );
this
.removeClass( 'warn' )
.addClass( 'success' );
window.setTimeout
(
function()
{
$( 'span', abort_import_element )
.removeClass( 'loader' )
.text( span_element.data( 'original' ) )
.removeData( 'original' );
abort_import_element
.removeClass( 'success' )
.addClass( 'warn' );
},
dataimport_timeout * 2
);
dataimport_fetch_status();
}
}
);
return false;
}
);
// state
var status_button = $( 'form button.refresh-status', form_element );
status_button
.off( 'click' )
.on
(
'click',
function( event )
{
dataimport_fetch_status();
return false;
}
)
.trigger( 'click' );
function dataimport_fetch_status( clear_timeout )
{
if( clear_timeout )
{
app.clear_timeout();
}
$.ajax
(
{
url : handler_url + '?command=status&indent=true&wt=json',
dataType : 'json',
beforeSend : function( xhr, settings )
{
$( 'span', status_button )
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
var state_element = $( '#current_state', content_element );
var status = response.status;
var rollback_time = response.statusMessages.Rolledback || null;
var abort_time = response.statusMessages.Aborted || null;
var messages = response.statusMessages;
var messages_count = 0;
for( var key in messages ) { messages_count++; }
function dataimport_compute_details( response, details_element, elapsed_seconds )
{
details_element
.show();
// --
var document_config = {
'Requests' : 'Total Requests made to DataSource',
'Fetched' : 'Total Rows Fetched',
'Skipped' : 'Total Documents Skipped',
'Processed' : 'Total Documents Processed'
};
var document_details = [];
for( var key in document_config )
{
var value = parseInt( response.statusMessages[document_config[key]], 10 );
var detail = '<abbr title="' + document_config[key].esc() + '">' + key.esc() + '</abbr>: ' + app.format_number( value ).esc();
if( elapsed_seconds && 'skipped' !== key.toLowerCase() )
{
detail += ' <span>(' + app.format_number( Math.round( value / elapsed_seconds ) ).esc() + '/s)</span>'
}
document_details.push( detail );
};
$( '.docs', details_element )
.html( document_details.join( ', ' ) );
// --
var dates_config = {
'Started' : 'Full Dump Started',
'Aborted' : 'Aborted',
'Rolledback' : 'Rolledback'
};
var dates_details = [];
for( var key in dates_config )
{
var value = response.statusMessages[dates_config[key]];
if( value )
{
var detail = '<abbr title="' + dates_config[key].esc() + '">' + key.esc() + '</abbr>: '
+ '<abbr class="time">' + value.esc() + '</abbr>';
dates_details.push( detail );
}
};
var dates_element = $( '.dates', details_element );
dates_element
.html( dates_details.join( ', ' ) );
$( '.time', dates_element )
.removeData( 'timeago' )
.timeago();
};
var get_time_taken = function get_default_time_taken()
{
var time_taken_text = response.statusMessages['Time taken'];
return app.convert_duration_to_seconds( time_taken_text );
};
var get_default_info_text = function default_info_text()
{
var info_text = response.statusMessages[''] || '';
// format numbers included in status nicely
info_text = info_text.replace
(
/\d{4,}/g,
function( match, position, string )
{
return app.format_number( parseInt( match, 10 ) );
}
);
var time_taken_text = app.convert_seconds_to_readable_time( get_time_taken() );
if( time_taken_text )
{
info_text += ' (Duration: ' + time_taken_text.esc() + ')';
}
return info_text;
};
var show_info = function show_info( info_text, elapsed_seconds )
{
$( '.info strong', state_element )
.text( info_text || get_default_info_text() );
$( '.info .details', state_element )
.hide();
};
var show_full_info = function show_full_info( info_text, elapsed_seconds )
{
show_info( info_text, elapsed_seconds );
dataimport_compute_details
(
response,
$( '.info .details', state_element ),
elapsed_seconds || get_time_taken()
);
};
state_element
.removeAttr( 'class' );
var current_time = new Date();
$( '.last_update abbr', state_element )
.text( current_time.toTimeString().split( ' ' ).shift() )
.attr( 'title', current_time.toUTCString() );
$( '.info', state_element )
.removeClass( 'loader' );
if( 'busy' === status )
{
state_element
.addClass( 'indexing' );
if( autorefresh_status )
{
$( '.info', state_element )
.addClass( 'loader' );
}
var time_elapsed_text = response.statusMessages['Time Elapsed'];
var elapsed_seconds = app.convert_duration_to_seconds( time_elapsed_text );
time_elapsed_text = app.convert_seconds_to_readable_time( elapsed_seconds );
var info_text = time_elapsed_text
? 'Indexing since ' + time_elapsed_text
: 'Indexing ...';
show_full_info( info_text, elapsed_seconds );
}
else if( rollback_time )
{
state_element
.addClass( 'failure' );
show_full_info();
}
else if( abort_time )
{
state_element
.addClass( 'aborted' );
show_full_info( 'Aborting current Import ...' );
}
else if( 'idle' === status && 0 !== messages_count )
{
state_element
.addClass( 'success' );
show_full_info();
}
else
{
state_element
.addClass( 'idle' );
show_info( 'No information available (idle)' );
}
// show raw status
var code = $(
'<pre class="syntax language-json"><code>' +
app.format_json( xhr.responseText ).esc() +
'</code></pre>'
);
$( '#raw_output_container', content_element ).html( code );
hljs.highlightBlock( code.get(0) );
if( !app.timeout && autorefresh_status )
{
app.timeout = window.setTimeout
(
function()
{
dataimport_fetch_status( true )
},
dataimport_timeout
);
}
},
error : function( xhr, text_status, error_thrown )
{
console.debug( arguments );
reload_config_element
.addClass( 'error' );
},
complete : function( xhr, text_status )
{
$( 'span', status_button )
.removeClass( 'loader' )
.addClass( 'success' );
window.setTimeout
(
function()
{
$( 'span', status_button )
.removeClass( 'success' );
},
dataimport_timeout / 2
);
}
}
);
}
// form
var form = $( 'form', form_element );
form
.ajaxForm
(
{
url : handler_url,
data : {
wt : 'json',
indent : 'true'
},
dataType : 'json',
type: 'POST',
beforeSend : function( xhr, settings )
{
$( 'button[type="submit"] span', form_element )
.addClass( 'loader' );
error_element
.empty()
.hide();
},
beforeSubmit : function( array, form, options )
{
var entity = $( '#entity', form ).val();
if( entity.length )
{
array.push( { name : 'entity', value: entity } );
}
var start = parseInt( $( '#start', form ).val(), 10 );
if( start )
{
array.push( { name : 'start', value: start } );
}
var rows = parseInt( $( '#rows', form ).val(), 10 );
if( rows )
{
array.push( { name : 'rows', value: rows } );
}
$( 'input:checkbox', form ).not( ':checked' )
.each( function( i, input )
{
array.push( { name: input.name, value: 'false' } );
}
);
var custom_parameters = $( '#custom_parameters', form ).val();
if( custom_parameters.length )
{
var params = custom_parameters.split( '&' );
for( var i in params )
{
var tmp = params[i].split( '=' );
array.push( { name : tmp[0], value: tmp[1] } );
}
}
if( debug_mode )
{
array.push( { name: 'dataConfig', value: $( '#dataimport_config .editable textarea' ).val() } );
}
},
success : function( response, text_status, xhr )
{
},
error : function( xhr, text_status, error_thrown )
{
var response = null;
try
{
eval( 'response = ' + xhr.responseText + ';' );
}
catch( e ){}
error_element
.text( response.error.msg || 'Unknown Error (Exception w/o Message)' )
.show();
},
complete : function( xhr, text_status )
{
$( 'button[type="submit"] span', form_element )
.removeClass( 'loader' );
var debug = $( 'input[name="debug"]:checked', form );
if( 0 !== debug.size() )
{
var code = $(
'<pre class="syntax language-json"><code>' +
app.format_json( xhr.responseText ).esc() +
'</code></pre>'
);
$( '.content', debug_response_element ).html( code );
hljs.highlightBlock( code.get(0) );
}
dataimport_fetch_status();
}
}
);
$( 'input[name="debug"]', form )
.off( 'change' )
.on
(
'change',
function( event )
{
debug_response_element.toggle( this.checked );
}
);
$( '#auto-refresh-status a', form_element )
.off( 'click' )
.on
(
'click',
function( event )
{
$.cookie( cookie_dataimport_autorefresh, $.cookie( cookie_dataimport_autorefresh ) ? null : true );
$( this ).trigger( 'state' );
dataimport_fetch_status();
return false;
}
)
.off( 'state' )
.on
(
'state',
function( event )
{
autorefresh_status = !!$.cookie( cookie_dataimport_autorefresh );
$.cookie( cookie_dataimport_autorefresh )
? $( this ).addClass( 'on' )
: $( this ).removeClass( 'on' );
}
)
.trigger( 'state' );
}
);
}
);

View File

@ -1,362 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
//helper for formatting JSON and others
var content_generator = {
_default: function (toEsc) {
return toEsc.esc();
},
json: function (toEsc) {
return app.format_json(toEsc);
}
};
//Utiltity function for turning on/off various elements
function toggles(documents_form, show_json, show_file, show_doc, doc_text, show_wizard) {
var the_document = $('#document', documents_form);
if (show_doc) {
//console.log("doc: " + doc_text);
the_document.val(doc_text);
the_document.show();
} else {
the_document.hide();
}
var file_upload = $('#file-upload', documents_form);
var upload_only = $('#upload-only', documents_form);
if (show_file) {
file_upload.show();
upload_only.show();
} else {
file_upload.hide();
upload_only.hide();
}
var wizard = $('#wizard', documents_form);
if (show_wizard) {
wizard.show();
} else {
wizard.hide();
}
}
// #/:core/documents
//Utiltity function for setting up the wizard fields
function addWizardFields(active_core, wizard) {
var core_basepath = active_core.attr('data-basepath');
var select_options = "";
//Populate the select options based off the Fields REST API
$.getJSON(window.location.protocol + '//' + window.location.host
+ core_basepath + "/schema/fields").done(
//TODO: handle dynamic fields
//TODO: get the unique key, too
function (data) {
var field_select = $("#wiz-field-select", wizard);
field_select.empty();
$.each(data.fields,
function (i, item) {
//console.log("i[" + i + "]=" + item.name);
if (item.name != "_version_"){
select_options += '<option name="' + item.name + '">'
+ item.name + '</option>';
}
});
//console.log("select_options: " + select_options);
//fill in the select options
field_select.append(select_options);
});
var wizard_doc = $("#wizard-doc", wizard);
wizard_doc.die('focusin')
.live('focusin', function (event) {
$("#wizard-doc", wizard).text("");
}
);
//Add the click handler for the "Add Field" target, which
//takes the field content and moves it into the document target
var add_field = $("#add-field-href", wizard);
add_field.die("click")
.live("click",
function (event) {
//take the field and the contents and append it to the document
var wiz_select = $("#wiz-field-select", wizard);
var selected = $("option:selected", wiz_select);
console.log("selected field: " + selected);
var wiz_doc = $("#wizard-doc", wizard);
var the_document = $("#document");
var current_doc = the_document.val();
console.log("current_text: " + current_doc + " wiz_doc: " + wiz_doc.val());
var index = current_doc.lastIndexOf("}");
var new_entry = '"' + selected.val() + '":"' + wiz_doc.val() + '"';
if (index >= 0) {
current_doc = current_doc.substring(0, index) + ', ' + new_entry + "}";
} else {
//we don't have a doc at all
current_doc = "{" + new_entry + "}";
}
current_doc = content_generator['json'](current_doc);
the_document.val(current_doc);
//clear the wiz doc window
wiz_doc.val("");
return false;
}
);
//console.log("adding " + i + " child: " + child);
}
//The main program for adding the docs
sammy.get
(
new RegExp(app.core_regex_base + '\\/(documents)$'),
function (context) {
var active_core = this.active_core;
var core_basepath = active_core.attr('data-basepath');
var content_element = $('#content');
$.post
(
'tpl/documents.html',
function (template) {
content_element
.html(template);
var documents_element = $('#documents', content_element);
var documents_form = $('#form form', documents_element);
var url_element = $('#url', documents_element);
var result_element = $('#result', documents_element);
var response_element = $('#response', documents_element);
var doc_type_select = $('#document-type', documents_form);
//Since we are showing "example" docs, when the area receives the focus
// remove the example content.
$('#document', documents_form).die('focusin')
.live('focusin',
function (event) {
var document_type = $('#document-type', documents_form).val();
if (document_type != "wizard"){
//Don't clear the document when in wizard mode.
var the_document = $('#document', documents_form);
the_document.text("");
}
}
);
/*response_element.html("");*/
//Setup the handlers for toggling the various display options for the "Document Type" select
doc_type_select
.die('change')
.live
(
'change',
function (event) {
var document_type = $('#document-type', documents_form).val();
var file_upload = $('#file-upload', documents_form);
//need to clear out any old file upload by forcing a redraw so that
//we don't try to upload an old file
file_upload.html(file_upload.html());
if (document_type == "json") {
toggles(documents_form, true, false, true, '{"id":"change.me","title":"change.me"}', false);
$("#attribs").show();
} else if (document_type == "upload") {
toggles(documents_form, false, true, false, "", false);
$("#attribs").show();
} else if (document_type == "csv") {
toggles(documents_form, false, false, true, "id,title\nchange.me,change.me", false);
$("#attribs").show();
} else if (document_type == "solr") {
toggles(documents_form, false, false, true, '<add>\n' +
'<doc>\n' +
'<field name="id">change.me</field>\n' +
'<field name="title" >chang.me</field>\n' +
'</doc>\n' +
'</add>\n', false);
$("#attribs").hide();
} else if (document_type == "wizard") {
var wizard = $('#wizard', documents_form);
addWizardFields(active_core, wizard);
//$("#wizard-doc", wizard).text('Enter your field text here and then click "Add Field" to add the field to the document.');
toggles(documents_form, false, false, true, "", true);
$("#attribs").show();
} else if (document_type == "xml") {
toggles(documents_form, false, false, true, '<doc>\n' +
'<field name="id">change.me</field>' +
'<field name="title">change.me</field>' +
'</doc>', false);
$("#attribs").show();
}
return false;
}
);
doc_type_select.chosen().trigger('change');
//Setup the submit option handling.
documents_form
.die('submit')
.live
(
'submit',
function (event) {
var form_values = [];
var handler_path = $('#qt', documents_form).val();
if ('/' !== handler_path[0]) {
form_values.push({ name: 'qt', value: handler_path.esc() });
handler_path = '/update';
}
var document_url = window.location.protocol + '//' + window.location.host
+ core_basepath + handler_path + '?wt=json';
url_element
.attr('href', document_url)
.text(document_url)
.trigger('change');
var the_document = $('#document', documents_form).val();
var commit_within = $('#commitWithin', documents_form).val();
var overwrite = $('#overwrite', documents_form).val();
var the_command = "";
var content_type = "";
var document_type = $('#document-type', documents_form).val();
var doingFileUpload = false;
//Both JSON and Wizard use the same pathway for submission
//New entries primarily need to fill the_command and set the content_type
if (document_type == "json" || document_type == "wizard") {
//create a JSON command
the_command = "{"
+ '"add":{ "doc":' + the_document + ","
+ '"overwrite":' + overwrite + ","
+ '"commitWithin":' + commit_within
+ "}}";
content_type = "application/json";
} else if (document_type == "csv") {
the_command = the_document;
document_url += "&commitWithin=" + commit_within + "&overwrite=" + overwrite;
content_type = "application/csv";
} else if (document_type == "xml") {
the_command = '<add commitWithin="' + commit_within
+ '" overwrite="' + overwrite + '"'
+ ">"
+ the_document + "</add>";
content_type = "text/xml";
} else if (document_type == "upload") {
doingFileUpload = true;
} else if (document_type == "solr") {
//guess content_type
the_command = the_document;
if (the_document.indexOf("<") >= 0) {
//XML
content_type = "text/xml";
} else if (the_document.indexOf("{") >= 0) {
//JSON
content_type = "application/json";
} //TODO: do we need to handle others?
} else {
//How to handle other?
}
//Handle the submission of the form in the case where we are not uploading a file
if (doingFileUpload == false) {
$.ajax(
{
url: document_url,
//dataType : 'json',
processData: false,
type: 'POST',
contentType: content_type,
data: the_command,
context: response_element,
beforeSend: function (xhr, settings) {
console.log("beforeSend: Vals: " + document_url + " content-type: " + document_type + " the cmd: " + the_command);
},
success: function (response, text_status, xhr) {
console.log("success: " + response + " status: " + text_status + " xhr: " + xhr.responseText);
this.html('<div><span class="description">Status</span>: ' + text_status + '</div>'
+ '<div><span class="description">Response:</span>' + '<pre class="syntax language-json"><code>' + content_generator['json'](xhr.responseText) + "</code></pre></div>");
result_element.show();
},
error: function (xhr, text_status, error_thrown) {
console.log("error: " + text_status + " thrown: " + error_thrown);
this.html('<div><span class="description">Status</span>: ' + text_status + '</div><div><span class="description">Error:</span> '
+ '' + error_thrown
+ '</div>'
+ '<div><span class="description">Error</span>:' + '<pre class="syntax language-json"><code>'
+ content_generator['json'](xhr.responseText) +
'</code></pre></div>');
result_element.show();
},
complete: function (xhr, text_status) {
//console.log("complete: " + text_status + " xhr: " + xhr.responseText + " doc type: " + document_type);
//alert(text_status + ": " + xhr.responseText);
/*this
.removeClass( 'loader' );*/
}
}
);
} else {
//upload the file
var the_file = $('#the-file', documents_form);
var erh_params = $('#erh-params', documents_form).val();
if (erh_params != "") {
if (erh_params.substring(0,1) != "&"){
erh_params = "&" + erh_params;
}
document_url = document_url + erh_params;
}
console.log("uploading file to: " + document_url);
the_file.ajaxfileupload({
'action': document_url,
'validate_extensions': false,
'upload_now': true,
'params': {
'extra': 'info'
},
'onComplete': function (response) {
response = response.replace('<pre style="word-wrap: break-word; white-space: pre-wrap;">', "");
response = response.replace("</pre>", "");
console.log('completed upload: ' + response);
response_element.html('<div><span class="description">Response:</span>' + '<pre class="syntax language-json"><code>' + content_generator['json'](response) + "</code></pre></div>");
result_element.show();
},
'onStart': function () {
console.log("starting file upload");
//if (weWantedTo) return false; // cancels upload
},
'onCancel': function () {
console.log('no file selected');
}
});
}
return false;
}
);
}
)
}
)
/*
Sample docs:
<doc boost="2.5">
<field name="id">05991</field>
<field name="title" boost="2.0">Bridgewater</field>
</doc>
{"id":"foo","title":"blah"}
*/

View File

@ -1,270 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
// #/:core/files
sammy.get
(
new RegExp( app.core_regex_base + '\\/(files)$' ),
function( context )
{
core_basepath = this.active_core.attr( 'data-basepath' );
current_core = context.params.splat[0];
var content_element = $( '#content' );
var file_endpoint = core_basepath + '/admin/file';
var path = context.path.split( '?' );
var selected_file = null;
if( path && path[1] )
{
selected_file = path[1].split( '=' ).pop();
}
$.get
(
'tpl/files.html',
function( template )
{
content_element
.html( template );
var frame_element = $( '#frame', content_element );
var tree_callback = function( event, data )
{
$( 'li[data-file].jstree-closed', event.currentTarget )
.filter
(
function( index, element )
{
return selected_file && 0 === selected_file.indexOf( $( element ).data( 'file' ) );
}
)
.each
(
function( index, element )
{
data.inst.open_node( element );
}
);
if( selected_file )
{
$( 'li[data-file="' + selected_file.replace( /\/$/, '' ) + '"] > a', event.currentTarget )
.addClass( 'active' );
}
};
var load_tree = function()
{
$( '#tree', frame_element )
.empty()
.jstree
(
{
plugins : [ 'json_data', 'sort' ],
json_data : {
ajax: {
url : file_endpoint + '?wt=json',
data : function( n )
{
if( -1 === n )
return null;
return {
file : n.attr( 'data-file' )
};
},
success : function( response, status, xhr )
{
var files = [];
for( var file in response.files )
{
var is_directory = response.files[file].directory;
var prefix = xhr.data ? xhr.data.file + '/' : ''
var item = {
data: {
title : file,
attr : {
title : file,
href : '#/' + current_core + '/files?file=' + prefix + file
}
},
attr : {
'data-file' : prefix + file
}
};
if( is_directory )
{
item.state = 'closed';
item.data.attr.href += '/';
}
files.push( item );
}
return files;
}
},
progressive_render : true
},
core : {
animation : 0
}
}
)
.on
(
'loaded.jstree',
tree_callback
)
.on
(
'open_node.jstree',
tree_callback
);
};
load_tree();
if( selected_file )
{
$( '#new-file-holder input' )
.val
(
'/' !== selected_file.substr( -1 )
? selected_file.replace( /[^\/]+$/, '' )
: selected_file
);
}
if( selected_file && '/' !== selected_file.substr( -1 ) )
{
frame_element
.addClass( 'show' );
var endpoint = file_endpoint + '?file=' + selected_file;
var content_type_map = { xml : 'text/xml', html : 'text/html', js : 'text/javascript', json : 'application/json', 'css' : 'text/css' };
if (selected_file == 'managed-schema') {
endpoint += '&contentType=' + 'text/xml' + ';charset=utf-8';
} else {
var file_ext = selected_file.match( /\.(\w+)$/ );
endpoint += '&contentType=' + ( content_type_map[ file_ext[1] || '' ] || 'text/plain' ) + ';charset=utf-8';
}
var public_url = window.location.protocol + '//' + window.location.host + endpoint;
$( '#url', frame_element )
.text( public_url )
.attr( 'href', public_url );
var load_file = function( load_tree )
{
if( load_tree )
{
load_tree();
}
$.ajax
(
{
url : endpoint,
context : frame_element,
beforeSend : function( xhr, settings )
{
var block = $( '.view-file .response', this );
if( !block.data( 'placeholder' ) )
{
block.data( 'placeholder', block.text() );
}
block
.text( block.data( 'placeholder' ) );
},
success : function( response, text_status, xhr )
{
var content_type = xhr.getResponseHeader( 'Content-Type' ) || '';
var highlight = null;
if( 0 === content_type.indexOf( 'text/xml' ) || 0 === xhr.responseText.indexOf( '<?xml' ) ||
0 === content_type.indexOf( 'text/html' ) || 0 === xhr.responseText.indexOf( '<!--' ) )
{
highlight = 'xml';
}
else if( 0 === content_type.indexOf( 'text/javascript' ) )
{
highlight = 'javascript';
}
else if( 0 === content_type.indexOf( 'text/css' ) )
{
highlight = 'css';
}
else if( 0 === content_type.indexOf( 'application/json' ) )
{
highlight = 'json';
}
var code = $(
'<pre class="syntax' + ( highlight ? ' language-' + highlight : '' )+ '"><code>' +
xhr.responseText.esc() +
'</code></pre>'
);
$( '.view-file .response', this )
.html( code );
if( highlight )
{
hljs.highlightBlock( code.get( 0 ) );
}
$( 'form textarea', this )
.val( xhr.responseText );
},
error : function( xhr, text_status, error_thrown)
{
$( '.view-file .response', this )
.text( 'No such file exists.' );
},
complete : function( xhr, text_status )
{
}
}
);
}
load_file();
}
}
);
}
);
// legacy redirect for 'config' & 'schema' pages
// #/:core/schema, #/:core/config
sammy.get
(
new RegExp( app.core_regex_base + '\\/(schema|config)$' ),
function( context )
{
context.redirect( '#/' + context.params.splat[0] + '/files?file=' + this.active_core.attr( context.params.splat[1] ) );
}
);

View File

@ -1,340 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
var parse_memory_value = function( value )
{
if( value !== Number( value ) )
{
var units = 'BKMGTPEZY';
var match = value.match( /^(\d+([,\.]\d+)?) (\w)\w?$/ );
var value = parseFloat( match[1] ) * Math.pow( 1024, units.indexOf( match[3].toUpperCase() ) );
}
return value;
};
var generate_bar = function( bar_container, bar_data, convert_label_values )
{
bar_holder = $( '.bar-holder', bar_container );
var bar_level = 1;
var max_width = Math.round( $( '.bar-max', bar_holder ).width() );
$( '.bar-max.val', bar_holder ).text( bar_data['max'] );
bar_level++;
$( '.bar-total.bar', bar_holder ).width( new String( (bar_data['total']/bar_data['max'])*100 ) + '%' );
$( '.bar-total.val', bar_holder ).text( bar_data['total'] );
if( bar_data['used'] )
{
bar_level++;
$( '.bar-used.bar', bar_holder ).width( new String( (bar_data['used']/bar_data['total'])*100 ) + '%' );
$( '.bar-used.val', bar_holder ).text( bar_data['used'] );
}
bar_holder
.addClass( 'bar-lvl-' + bar_level );
var percentage = ( ( ( bar_data['used'] || bar_data['total'] ) / bar_data['max'] ) * 100 ).toFixed(1);
var hl = $( '[data-desc="' + bar_container.attr( 'id' ) + '"]' );
$( '.bar-desc', hl )
.remove();
hl
.append( ' <small class="bar-desc">' + percentage + '%</small>' );
if( !!convert_label_values )
{
$( '.val', bar_holder )
.each
(
function()
{
var self = $( this );
var unit = null;
var byte_value = parseInt( self.html() );
self
.attr( 'title', 'raw: ' + byte_value + ' B' );
byte_value /= 1024;
byte_value /= 1024;
unit = 'MB';
if( 1024 <= byte_value )
{
byte_value /= 1024;
unit = 'GB';
}
byte_value = byte_value.toFixed( 2 ) + ' ' + unit;
self
.text( byte_value );
}
);
}
};
var system_info = function( element, system_data )
{
// -- usage
var load_average = ( system_data['system']['uptime'] || '' ).match( /load averages?: (\d+[.,]\d\d),? (\d+[.,]\d\d),? (\d+[.,]\d\d)/ );
if( load_average )
{
var hl = $( '#system h2', element );
$( '.bar-desc', hl )
.remove();
hl
.append( ' <small class="bar-desc">' + load_average.slice( 1 ).join( ' ' ).replace( /,/g, '.' ).esc() + '</small>' );
}
// -- physical-memory-bar
var bar_holder = $( '#physical-memory-bar', element );
if( system_data['system']['totalPhysicalMemorySize'] === undefined || system_data['system']['freePhysicalMemorySize'] === undefined )
{
bar_holder.hide();
}
else
{
bar_holder.show();
var bar_data = {
'max' : parse_memory_value( system_data['system']['totalPhysicalMemorySize'] ),
'total' : parse_memory_value( system_data['system']['totalPhysicalMemorySize'] - system_data['system']['freePhysicalMemorySize'] )
};
generate_bar( bar_holder, bar_data, true );
}
// -- swap-space-bar
var bar_holder = $( '#swap-space-bar', element );
if( system_data['system']['totalSwapSpaceSize'] === undefined || system_data['system']['freeSwapSpaceSize'] === undefined )
{
bar_holder.hide();
}
else
{
bar_holder.show();
var bar_data = {
'max' : parse_memory_value( system_data['system']['totalSwapSpaceSize'] ),
'total' : parse_memory_value( system_data['system']['totalSwapSpaceSize'] - system_data['system']['freeSwapSpaceSize'] )
};
generate_bar( bar_holder, bar_data, true );
}
// -- file-descriptor-bar
var bar_holder = $( '#file-descriptor-bar', element );
if( system_data['system']['maxFileDescriptorCount'] === undefined || system_data['system']['openFileDescriptorCount'] === undefined )
{
bar_holder.hide();
}
else
{
bar_holder.show();
var bar_data = {
'max' : parse_memory_value( system_data['system']['maxFileDescriptorCount'] ),
'total' : parse_memory_value( system_data['system']['openFileDescriptorCount'] )
};
generate_bar( bar_holder, bar_data );
}
0 === $( '#system div[id$="-bar"]:visible', element ).size()
? $( '#system .no-info', element ).show()
: $( '#system .no-info', element ).hide();
// -- memory-bar
var bar_holder = $( '#jvm-memory-bar', element );
if( system_data['jvm']['memory'] === undefined )
{
bar_holder.hide();
}
else
{
bar_holder.show();
var jvm_memory = $.extend
(
{
'free' : null,
'total' : null,
'max' : null,
'used' : null,
'raw' : {
'free' : null,
'total' : null,
'max' : null,
'used' : null,
'used%' : null
}
},
system_data['jvm']['memory']
);
var bar_data = {
'max' : parse_memory_value( jvm_memory['raw']['max'] || jvm_memory['max'] ),
'total' : parse_memory_value( jvm_memory['raw']['total'] || jvm_memory['total'] ),
'used' : parse_memory_value( jvm_memory['raw']['used'] || jvm_memory['used'] )
};
generate_bar( bar_holder, bar_data, true );
}
}
// #/
sammy.get
(
/^#\/$/,
function( context )
{
var content_element = $( '#content' );
content_element
.html( '<div id="index"></div>' );
$.ajax
(
{
url : 'tpl/index.html',
context : $( '#index', content_element ),
beforeSend : function( arr, form, options )
{
},
success : function( template )
{
var self = this;
this
.html( template );
var data = {
'start_time' : app.dashboard_values['jvm']['jmx']['startTime'],
'jvm_version' : app.dashboard_values['jvm']['name'] + ' (' + app.dashboard_values['jvm']['version'] + ')',
'processors' : app.dashboard_values['jvm']['processors'],
'solr_spec_version' : app.dashboard_values['lucene']['solr-spec-version'] || '-',
'solr_impl_version' : app.dashboard_values['lucene']['solr-impl-version'] || '-',
'lucene_spec_version' : app.dashboard_values['lucene']['lucene-spec-version'] || '-',
'lucene_impl_version' : app.dashboard_values['lucene']['lucene-impl-version'] || '-'
};
for( var key in data )
{
var value_element = $( '.' + key + ' dd', this );
value_element
.text( data[key].esc() );
value_element.closest( 'li' )
.show();
}
var commandLineArgs = app.dashboard_values['jvm']['jmx']['commandLineArgs'].sort().reverse();
if( 0 !== commandLineArgs.length )
{
var cmd_arg_element = $( '.command_line_args dt', this );
var cmd_arg_key_element = $( '.command_line_args dt', this );
var cmd_arg_element = $( '.command_line_args dd', this );
for( var key in commandLineArgs )
{
cmd_arg_element = cmd_arg_element.clone();
cmd_arg_element.text( commandLineArgs[key] );
cmd_arg_key_element
.after( cmd_arg_element );
}
cmd_arg_key_element.closest( 'li' )
.show();
$( '.command_line_args dd:last', this )
.remove();
$( '.command_line_args dd:odd', this )
.addClass( 'odd' );
}
$( '.timeago', this )
.timeago();
$( '.index-left .block li:visible:odd', this )
.addClass( 'odd' );
// -- system_info
system_info( this, app.dashboard_values );
$( '#system a.reload', this )
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : config.solr_path + '/admin/info/system?wt=json',
dataType : 'json',
context : this,
beforeSend : function( arr, form, options )
{
loader.show( this );
},
success : function( response )
{
system_info( self, response );
},
error : function()
{
},
complete : function()
{
loader.hide( this );
}
}
);
return false;
}
);
},
error : function( xhr, text_status, error_thrown )
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);

View File

@ -1,106 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
// #/~java-properties
sammy.get
(
/^#\/(~java-properties)$/,
function( context )
{
var content_element = $( '#content' );
content_element
.html( '<div id="java-properties"></div>' );
$.ajax
(
{
url : app.config.solr_path + '/admin/info/properties?wt=json',
dataType : 'json',
context : $( '#java-properties', content_element ),
beforeSend : function( xhr, settings )
{
this
.html( '<div class="loader">Loading ...</div>' );
},
success : function( response, text_status, xhr )
{
var system_properties = response['system.properties'];
var properties_data = {};
var properties_content = [];
var properties_order = [];
var workaround = xhr.responseText.match( /"(line\.separator)"\s*:\s*"(.+?)"/ );
if( workaround && workaround[2] )
{
system_properties[workaround[1]] = workaround[2];
}
for( var key in system_properties )
{
var displayed_key = key.replace( /\./g, '.&#8203;' );
var displayed_value = [ system_properties[key] ];
var item_class = 'clearfix';
if( -1 !== key.indexOf( '.path' ) || -1 !== key.indexOf( '.dirs' ) )
{
displayed_value = system_properties[key].split( system_properties['path.separator'] );
if( 1 < displayed_value.length )
{
item_class += ' multi';
}
}
var item_content = '<li><dl class="' + item_class + '">' + "\n"
+ '<dt>' + displayed_key.esc() + '</dt>' + "\n";
for( var i in displayed_value )
{
item_content += '<dd>' + displayed_value[i].esc() + '</dd>' + "\n";
}
item_content += '</dl></li>';
properties_data[key] = item_content;
properties_order.push( key );
}
properties_order.sort();
for( var i in properties_order )
{
properties_content.push( properties_data[properties_order[i]] );
}
this
.html( '<ul>' + properties_content.join( "\n" ) + '</ul>' );
$( 'li:odd', this )
.addClass( 'odd' );
$( '.multi dd:odd', this )
.addClass( 'odd' );
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);

View File

@ -1,578 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
var loglevel_path = app.config.solr_path + '/admin/info/logging';
var cookie_logging_timezone = 'logging_timezone';
var frame_element = null;
var logging_handler = function( response, text_status, xhr )
{
var self = this;
var loggers = response.loggers;
var levels = '<div class="selector-holder"><div class="selector">' + "\n"
+ '<a class="trigger"><span><em>null</em></span></a>' + "\n"
+ '<ul>' + "\n";
for( var key in response.levels )
{
var level = response.levels[key].esc();
levels += '<li><a href="#" data-level="' + level + '">' + level + '</a></li>' + "\n";
}
levels += '<li class="unset"><a href="#" data-level="unset">UNSET</a></li>' + "\n"
+ '</ul>' + "\n"
+ '<a class="close"><span>[x]</span></a>' + "\n"
+ '</div></div>';
var logger_tree = function( filter )
{
var logger_content = '';
var filter_regex = new RegExp( '^' + filter + '\\.\\w+$' );
for( var i in loggers )
{
var logger = loggers[i];
var continue_matcher = false;
if( !filter )
{
continue_matcher = logger.name.indexOf( '.' ) !== -1;
}
else
{
continue_matcher = !logger.name.match( filter_regex );
}
if( continue_matcher )
{
continue;
}
var logger_class = '';
if( logger.set )
{
logger_class = 'set';
}
if( !logger.level )
{
logger_class = 'null';
}
var logger_name = logger.name.split( '.' );
var display_name = logger_name.pop();
var leaf_class = 'jstree-leaf';
if( logger.level )
{
leaf_class += ' level-' + logger.level.esc().toLowerCase();
}
logger_content += '<li class="' + leaf_class + '" data-logger="' + logger.name.esc() + '">';
logger_content += '<ins class="trigger jstree-icon">&nbsp;</ins>' + "\n";
logger_content += '<a href="#" class="trigger '+ logger_class + '"' ;
if( logger.level )
{
logger_content += 'rel="' + logger.level.esc() + '" ';
}
logger_content += 'title="' + logger.name.esc() + '">' + "\n";
if( 0 !== logger_name.length )
{
logger_content += '<span class="ns">' + logger_name.join( '.' ).esc() + '.</span>';
}
logger_content += '<span class="name">' + ( display_name ? display_name.esc() : '<em>empty</em>' ) + '</span>' + "\n";
logger_content += '</a>';
logger_content += levels;
if( !!logger.name )
{
var child_logger_content = logger_tree( logger.name );
if( child_logger_content )
{
logger_content += '<ul>';
logger_content += child_logger_content;
logger_content += '</ul>';
}
}
logger_content += '</li>';
}
return logger_content;
};
var logger_content = '<div class="block">' + "\n"
+ '<h2><span>' + response.watcher.esc() + '</span></h2>' + "\n"
+ '<ul class="tree jstree">' + logger_tree( null ) + '</ul>' + "\n"
+ '</div>';
self
.html( logger_content );
self
.die( 'clear' )
.live
(
'clear',
function( event )
{
$( '.open', this )
.removeClass( 'open' );
}
);
$( 'li:last-child', this )
.addClass( 'jstree-last' );
$( 'li.jstree-leaf > a', this )
.each
(
function( index, element )
{
element = $( element );
var level = element.attr( 'rel' );
if( level )
{
var selector = $( '.selector-holder', element.closest( 'li' ) );
var trigger = $( 'a.trigger', selector );
trigger
.text( level.esc() );
if( element.hasClass( 'set' ) )
{
trigger.first()
.addClass( 'set' );
}
$( 'ul a[data-level="' + level + '"]', selector ).first()
.addClass( 'level' );
}
}
)
$( '.trigger', this )
.die( 'click' )
.live
(
'click',
function( event )
{
self.trigger( 'clear' );
$( '.selector-holder', $( this ).parents( 'li' ).first() ).first()
.trigger( 'toggle' );
return false;
}
);
$( '.selector .close', this )
.die( 'click' )
.live
(
'click',
function( event )
{
self.trigger( 'clear' );
return false;
}
);
$( '.selector-holder', this )
.die( 'toggle')
.live
(
'toggle',
function( event )
{
var row = $( this ).closest( 'li' );
$( 'a:first', row )
.toggleClass( 'open' );
$( '.selector-holder:first', row )
.toggleClass( 'open' );
}
);
$( '.selector ul a', this )
.die( 'click' )
.live
(
'click',
function( event )
{
var element = $( this );
$.ajax
(
{
url : loglevel_path,
dataType : 'json',
data : {
'wt' : 'json',
'set' : $( this ).parents( 'li[data-logger]' ).data( 'logger' ) + ':' + element.data( 'level' )
},
type : 'POST',
context : self,
beforeSend : function( xhr, settings )
{
element
.addClass( 'loader' );
},
success : logging_handler
}
);
return false;
}
);
};
var format_time_options = {};
var format_time = function( time )
{
time = time ? new Date( time ) : new Date();
return '<time datetime="' + time.toISOString().esc() + '">' + format_time_content( time ) + '</abbr>';
}
var format_time_content = function( time )
{
return time.toLocaleString( undefined, format_time_options ).esc();
}
var load_logging_viewer = function()
{
var table = $( 'table', frame_element );
var state = $( '#state', frame_element );
var since = table.data( 'latest' ) || 0;
var sticky_mode = null;
$.ajax
(
{
url : loglevel_path + '?wt=json&since=' + since,
dataType : 'json',
beforeSend : function( xhr, settings )
{
// initial request
if( 0 === since )
{
sticky_mode = true;
}
// state element is in viewport
else if( state.position().top <= $( window ).scrollTop() + $( window ).height() - ( $( 'body' ).height() - state.position().top ) )
{
sticky_mode = true;
}
else
{
sticky_mode = false;
}
},
success : function( response, text_status, xhr )
{
var docs = response.history.docs;
var docs_count = docs.length;
var table = $( 'table', frame_element );
$( 'h2 span', frame_element )
.text( response.watcher.esc() );
state
.html( 'Last Check: ' + format_time() );
app.timeout = setTimeout
(
load_logging_viewer,
10000
);
if( 0 === docs_count )
{
table.trigger( 'update' );
return false;
}
var content = '<tbody>';
for( var i = 0; i < docs_count; i++ )
{
var doc = docs[i];
if( 1 === doc.time.length )
{
for( var key in doc )
{
doc[key] = doc[key][0];
}
}
if( !doc.trace )
{
var lines = doc.message.split( "\n" );
if( 1 < lines.length )
{
doc.trace = doc.message;
doc.message = lines[0];
delete lines;
}
}
var has_trace = 'undefined' !== typeof( doc.trace );
doc.logger = '<abbr title="' + doc.logger.esc() + '">' + doc.logger.split( '.' ).pop().esc() + '</abbr>';
var classes = [ 'level-' + doc.level.toLowerCase().esc() ];
if( has_trace )
{
classes.push( 'has-trace' );
}
content += '<tr class="' + classes.join( ' ' ) + '">' + "\n";
content += '<td class="span"><a><span>' + format_time( doc.time ) + '</span></a></td>' + "\n";
content += '<td class="level span"><a><span>' + doc.level.esc() + '</span></span></a></td>' + "\n";
content += '<td class="span"><a><span>' + doc.core + '</span></a></td>' + "\n";
content += '<td class="span"><a><span>' + doc.logger + '</span></a></td>' + "\n";
content += '<td class="message span"><a><span>' + doc.message.replace( /,/g, ',&#8203;' ).esc() + '</span></a></td>' + "\n";
content += '</tr>' + "\n";
if( has_trace )
{
content += '<tr class="trace">' + "\n";
content += '<td colspan="4"><pre>' + doc.trace.esc() + '</pre></td>' + "\n";
content += '</tr>' + "\n";
}
}
content += '</tbody>';
$( 'table', frame_element )
.append( content );
table
.data( 'latest', response.info.last )
.removeClass( 'has-data' )
.trigger( 'update' );
if( sticky_mode )
{
$( 'body' )
.animate
(
{ scrollTop: state.position().top },
1000
);
}
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
// #/~logging
sammy.get
(
/^#\/(~logging)$/,
function( context )
{
var content_element = $( '#content' );
$.get
(
'tpl/logging.html',
function( template )
{
content_element
.html( template );
frame_element = $( '#frame', content_element );
frame_element
.html
(
'<div id="viewer">' + "\n" +
'<div class="block">' + "\n" +
'<h2><span>&nbsp;</span></h2>' + "\n" +
'</div>' + "\n" +
'<table border="0" cellpadding="0" cellspacing="0">' + "\n" +
'<thead>' + "\n" +
'<tr>' + "\n" +
'<th class="time">Time (<span>Local</span>)</th>' + "\n" +
'<th class="level">Level</th>' + "\n" +
'<th class="core">Core</th>' + "\n" +
'<th class="logger">Logger</th>' + "\n" +
'<th class="message">Message</th>' + "\n" +
'</tr>' + "\n" +
'</thead>' + "\n" +
'<tfoot>' + "\n" +
'<tr>' + "\n" +
'<td colspan="4">No Events available</td>' + "\n" +
'</tr>' + "\n" +
'</thead>' + "\n" +
'</table>' + "\n" +
'<div id="footer" class="clearfix">' + "\n" +
'<div id="state" class="loader">&nbsp;</div>' + "\n" +
'<div id="date-format"><a>Show dates in UTC</a></div>' + "\n" +
'</div>' + "\n" +
'</div>'
);
var table = $( 'table', frame_element );
table
.die( 'update' )
.live
(
'update',
function( event )
{
var table = $( this );
var tbody = $( 'tbody', table );
0 !== tbody.size()
? table.addClass( 'has-data' )
: table.removeClass( 'has-data' );
return false;
}
);
load_logging_viewer();
$( '.has-trace a', table )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).closest( 'tr' )
.toggleClass( 'open' )
.next().toggle();
return false;
}
);
var date_format = $( '#date-format a', frame_element );
date_format
.off( 'click' )
.on
(
'click',
function( event )
{
var self = $( this );
if( !self.hasClass( 'on' ) )
{
self.addClass( 'on' );
$( 'table th.time span', frame_element ).text( 'UTC' );
format_time_options.timeZone = 'UTC';
$.cookie( cookie_logging_timezone, 'UTC' );
}
else
{
self.removeClass( 'on' );
$( 'table th.time span', frame_element ).text( 'Local' );
delete format_time_options.timeZone;
$.cookie( cookie_logging_timezone, null );
}
$( 'time', frame_element )
.each
(
function( index, element )
{
var self = $( element );
self.text( format_time_content( new Date( self.attr( 'datetime' ) ) ) );
}
)
return false;
}
);
if( 'UTC' === $.cookie( cookie_logging_timezone ) )
{
date_format
.trigger( 'click' );
}
}
);
}
);
// #/~logging/level
sammy.get
(
/^#\/(~logging)\/level$/,
function( context )
{
var content_element = $( '#content' );
$.get
(
'tpl/logging.html',
function( template )
{
content_element
.html( template );
$( '#menu a[href="' + context.path + '"]' )
.parent().addClass( 'active' );
$.ajax
(
{
url : loglevel_path + '?wt=json',
dataType : 'json',
context : $( '#frame', content_element ),
beforeSend : function( xhr, settings )
{
this
.html( '<div class="loader">Loading ...</div>' );
},
success : logging_handler
}
);
}
);
}
);

View File

@ -1,72 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
$( '.ping a', app.core_menu )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : $( this ).attr( 'rel' ) + '?wt=json&ts=' + (new Date).getTime(),
dataType : 'json',
context: this,
beforeSend : function( arr, form, options )
{
loader.show( this );
},
success : function( response, text_status, xhr )
{
$( this )
.removeAttr( 'title' );
$( this ).parents( 'li' )
.removeClass( 'error' );
var qtime_element = $( '.qtime', this );
if( 0 === qtime_element.size() )
{
qtime_element = $( '<small class="qtime"> (<span></span>)</small>' );
$( this )
.append( qtime_element );
}
$( 'span', qtime_element )
.html( response.responseHeader.QTime + 'ms' );
},
error : function( xhr, text_status, error_thrown )
{
$( this )
.attr( 'title', '/admin/ping is not configured (' + xhr.status + ': ' + error_thrown + ')' );
$( this ).parents( 'li' )
.addClass( 'error' );
},
complete : function( xhr, text_status )
{
loader.hide( this );
}
}
);
return false;
}
);

View File

@ -1,462 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
var core_basepath = null;
var content_element = null;
var selected_type = null;
var context_path = null;
var active_context = null;
var changes = null;
var reference_xml = null;
var compute_plugin_data = function( response, changeset )
{
var types = [];
var sort_table = {};
var plugin_data = {};
var types_obj = {};
var plugin_key = null;
changes = { count : {}, list : {} }
for( var i = 0; i < response['solr-mbeans'].length; i++ )
{
if( !( i % 2 ) )
{
plugin_key = response['solr-mbeans'][i];
}
else
{
plugin_data[plugin_key] = response['solr-mbeans'][i];
}
}
for( var key in plugin_data )
{
sort_table[key] = {
url : [],
component : [],
handler : []
};
for( var part_key in plugin_data[key] )
{
if( plugin_data[key][part_key]['_changed_'] )
{
delete plugin_data[key][part_key]['_changed_'];
changes.count[key] = changes.count[key] || 0;
changes.count[key]++;
changes.list[key] = changes.list[key] || {};
changes.list[key][part_key] = true;
}
if( 0 < part_key.indexOf( '.' ) )
{
types_obj[key] = true;
sort_table[key]['handler'].push( part_key );
}
else if( 0 === part_key.indexOf( '/' ) )
{
types_obj[key] = true;
sort_table[key]['url'].push( part_key );
}
else
{
types_obj[key] = true;
sort_table[key]['component'].push( part_key );
}
}
}
for( var type in types_obj )
{
types.push( type );
}
types.sort();
return {
'plugin_data' : plugin_data,
'sort_table' : sort_table,
'types' : types
};
};
var render_plugin_data = function( plugin_data, plugin_sort, types )
{
var frame_element = $( '#frame', content_element );
var navigation_element = $( '#navigation ul', content_element );
var navigation_content = [];
for( var i = 0; i < types.length; i++ )
{
var type_url = active_context.params.splat[0] + '/' + active_context.params.splat[1] + '/' + types[i].toLowerCase();
var navigation_markup = '<li class="' + types[i].toLowerCase().esc() + '">' +
'<a href="#/' + type_url + '" rel="' + types[i].esc() + '">' + types[i].esc();
if( changes.count[types[i]] )
{
navigation_markup += ' <span>' + changes.count[types[i]].esc() + '</span>';
}
navigation_markup += '</a>' +
'</li>';
navigation_content.push( navigation_markup );
}
navigation_content.push( '<li class="PLUGINCHANGES"><a href="#">Watch Changes</a></li>' );
navigation_content.push( '<li class="RELOAD"><a href="#" onClick="window.location.reload()">Refresh Values</a></li>' );
navigation_element
.html( navigation_content.join( "\n" ) );
$( '.PLUGINCHANGES a', navigation_element )
.die( 'click' )
.live
(
'click',
function( event )
{
load_reference_xml();
changes = { count : {}, list : {} }
$( 'a > span', navigation_element ).remove();
$( '.entry.changed', frame_element ).removeClass( 'changed' );
$.blockUI
(
{
message: $('#recording'),
css: { width: '450px' }
}
);
return false;
}
);
$( '#recording button' )
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
type: 'POST',
url: core_basepath + '/admin/mbeans',
dataType : 'json',
data: {
'stats': 'true',
'wt': 'json',
'diff': 'true',
'all': 'true',
'stream.body': reference_xml
},
success : function( response, text_status, xhr )
{
load_reference_xml();
app.plugin_data = compute_plugin_data( response );
render_plugin_data( app.plugin_data.plugin_data, app.plugin_data.sort_table, app.plugin_data.types );
}
}
);
$.unblockUI();
return false;
}
);
$( 'a[href="' + context_path + '"]', navigation_element )
.parent().addClass( 'current' );
var content = '<ul>';
for( var sort_key in plugin_sort[selected_type] )
{
plugin_sort[selected_type][sort_key].sort();
var plugin_type_length = plugin_sort[selected_type][sort_key].length;
for( var i = 0; i < plugin_type_length; i++ )
{
var bean = plugin_sort[selected_type][sort_key][i];
var classes = [ 'entry' ];
if( changes.list[selected_type] && changes.list[selected_type][bean] )
{
classes.push( 'changed' );
}
content += '<li class="' + classes.join( ' ' ) + '">' + "\n";
content += '<a href="' + context_path + '?entry=' + bean.esc() + '" data-bean="' + bean.esc() + '">';
content += '<span>' + bean.esc() + '</span>';
content += '</a>' + "\n";
content += '<ul class="detail">' + "\n";
var details = plugin_data[selected_type][ plugin_sort[selected_type][sort_key][i] ];
for( var detail_key in details )
{
if( 'stats' !== detail_key )
{
var detail_value = details[detail_key];
if( 'description' === detail_key )
{
// Link component list to their MBeans page
if(detail_value.match(/^Search using components: /)) {
var idx = detail_value.indexOf(':');
var url = '#/'+active_context.params.splat[0]+'/plugins/other?entry=';
var tmp = 'Search using components:<ul>';
$.each(detail_value.substr(idx+1).split(","), function(index, value) {
value = $.trim(value);
tmp += '<li><a href="'+url+value+'" class="linker">'+value+"</a></li>";
});
tmp += "</ul>";
detail_value = tmp;
}
}
content += '<li><dl class="clearfix">' + "\n";
content += '<dt>' + detail_key.esc() + ':</dt>' + "\n";
if($.isArray(detail_value)) {
$.each(detail_value, function(index, value) {
content += '<dd>' + value.esc() + '</dd>' + "\n";
});
}
else {
content += '<dd>' + new String( detail_value ).esc() + '</dd>' + "\n";
}
content += '</dl></li>' + "\n";
}
else if( 'stats' === detail_key && details[detail_key] )
{
content += '<li class="stats clearfix">' + "\n";
content += '<span>' + detail_key.esc() + ':</span>' + "\n";
content += '<ul>' + "\n";
for( var stats_key in details[detail_key] )
{
var stats_value = new String( details[detail_key][stats_key] );
stats_value = stats_value.replace( /([\(@])/g, '$1&#8203;' );
content += '<li><dl class="clearfix">' + "\n";
content += '<dt>' + stats_key.esc() + ':</dt>' + "\n";
content += '<dd>' + stats_value.esc() + '</dd>' + "\n";
content += '</dl></li>' + "\n";
}
content += '</ul></li>' + "\n";
}
}
content += '</ul>' + "\n";
}
}
content += '</ul>' + "\n";
frame_element
.html( content );
var path = active_context.path.split( '?entry=' );
var entries = ( path[1] || '' ).split( ',' );
var entry_count = entries.length;
for( var i = 0; i < entry_count; i++ )
{
$( 'a[data-bean="' + entries[i].esc() + '"]', frame_element )
.parent().addClass( 'expanded' );
}
$( 'a', frame_element )
.off( 'click' )
.on
(
'click',
function( event )
{
var self = $( this );
var bean = self.data( 'bean' );
var split = '?entry=';
var path = active_context.path.split( split );
var entry = ( path[1] || '' );
var regex = new RegExp( bean.replace( /\//g, '\\/' ) + '(,|$)' );
var match = regex.test( entry );
var url = path[0] + split;
url += match
? entry.replace( regex, '' )
: entry + ',' + bean;
url = url.replace( /=,/, '=' );
url = url.replace( /,$/, '' );
url = url.replace( /\?entry=$/, '' );
active_context.redirect( url );
return false;
}
);
// Try to make links for anything with http (but leave the rest alone)
$( '.detail dd' ).each(function(index) {
var txt = $(this).html();
if(txt.indexOf("http") >= 0) {
$(this).linker({
className : 'linker'
});
}
});
// Add invisible whitespace after each slash
$( '.detail a.linker' ).each(function(index) {
$(this).html( $(this).html().replace( /\//g, '/&#8203;' ) );
});
$( '.entry', frame_element )
.each
(
function( i, entry )
{
$( '.detail > li', entry ).not( '.stats' ).filter( ':even' )
.addClass( 'odd' );
$( '.stats li:odd', entry )
.addClass( 'odd' );
}
);
};
var load_reference_xml = function()
{
$.ajax
(
{
type: 'GET',
url: core_basepath + '/admin/mbeans?stats=true&wt=xml',
dataType : 'text',
success: function( data )
{
reference_xml = data;
}
}
);
}
sammy.bind
(
'plugins_load',
function( event, params )
{
var callback = function()
{
params.callback( app.plugin_data.plugin_data, app.plugin_data.sort_table, app.plugin_data.types );
}
if( app.plugin_data )
{
callback( app.plugin_data );
return true;
}
$.ajax
(
{
url : core_basepath + '/admin/mbeans?stats=true&wt=json',
dataType : 'json',
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
app.plugin_data = compute_plugin_data( response );
$.get
(
'tpl/plugins.html',
function( template )
{
$( '#content' )
.html( template );
callback( app.plugin_data );
}
);
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);
// #/:core/plugins/$type
sammy.get
(
new RegExp( app.core_regex_base + '\\/(plugins)\\/(\\w+)$' ),
function( context )
{
core_basepath = this.active_core.attr( 'data-basepath' );
content_element = $( '#content' );
selected_type = context.params.splat[2].toUpperCase();
context_path = context.path.split( '?' ).shift();
active_context = context;
sammy.trigger
(
'plugins_load',
{
active_core : this.active_core,
callback : render_plugin_data
}
);
}
);
// #/:core/plugins
sammy.get
(
new RegExp( app.core_regex_base + '\\/(plugins)$' ),
function( context )
{
core_basepath = this.active_core.attr( 'data-basepath' );
delete app.plugin_data;
sammy.trigger
(
'plugins_load',
{
active_core : this.active_core,
callback : function( plugin_data, plugin_sort, types )
{
context.redirect( context.path + '/' + types[0].toLowerCase() );
}
}
);
}
);

View File

@ -1,229 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
// #/:core/query
sammy.get
(
new RegExp( app.core_regex_base + '\\/(query)$' ),
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
$.get
(
'tpl/query.html',
function( template )
{
content_element
.html( template );
var query_element = $( '#query', content_element );
var query_form = $( '#form form', query_element );
var url_element = $( '#url', query_element );
var result_element = $( '#result', query_element );
var response_element = $( '#response', result_element );
url_element
.die( 'change' )
.live
(
'change',
function( event )
{
var wt = $( '[name="wt"]', query_form ).val();
var content_generator = {
_default : function( xhr )
{
return xhr.responseText.esc();
},
json : function( xhr )
{
return app.format_json( xhr.responseText );
}
};
$.ajax
(
{
url : this.href,
dataType : wt,
context : response_element,
beforeSend : function( xhr, settings )
{
this
.html( '<div class="loader">Loading ...</div>' );
},
complete : function( xhr, text_status )
{
var code = $(
'<pre class="syntax language-' + wt + '"><code>' +
( content_generator[wt] || content_generator['_default'] )( xhr ) +
'</code></pre>'
);
this.html( code );
if( 'success' === text_status )
{
hljs.highlightBlock( code.get(0) );
}
}
}
);
}
)
$( '.optional legend input[type=checkbox]', query_form )
.die( 'change' )
.live
(
'change',
function( event )
{
var fieldset = $( this ).parents( 'fieldset' );
this.checked
? fieldset.addClass( 'expanded' )
: fieldset.removeClass( 'expanded' );
}
);
$( '.multiple a', query_form )
.die( 'click' )
.live
(
'click',
function( event )
{
var self = $( this );
var row = self.closest( '.row' );
var container = self.closest( '.multiple' );
var add = parseInt( self.data( 'action' ), 10 );
if( add )
{
var new_row = row.clone();
new_row.find( 'input' ).val( '' );
row.after( new_row );
row.next().find( 'input' ).focus();
}
else if( 1 === $( '.row', container ).size() )
{
row.find( 'input' ).val( '' ).focus();
}
else
{
row.remove();
container.find( 'input:last' ).focus();
}
return false;
}
)
query_form
.die( 'submit' )
.live
(
'submit',
function( event )
{
var form_values = [];
var add_to_form_values = function add_to_form_values( fields )
{
for( var i in fields )
{
if( !fields[i].value || 0 === fields[i].value.length )
{
continue;
}
form_values.push( fields[i] );
}
};
var fieldsets = $( '> fieldset', query_form );
var fields = fieldsets.first().formToArray( true );
add_to_form_values( fields );
fieldsets.not( '.common' )
.each
(
function( i, set )
{
if( $( 'legend input', set ).is( ':checked' ) )
{
var fields = $( set ).formToArray( true );
add_to_form_values( fields );
}
}
);
var handler_path = $( '#qt', query_form ).val();
if( '/' !== handler_path[0] )
{
form_values.push( { name : 'qt', value : handler_path.esc() } );
handler_path = '/select';
}
var query_url = window.location.protocol + '//' + window.location.host
+ core_basepath + handler_path + '?' + $.param( form_values );
var custom_parameters = $( '#custom_parameters', query_form ).val();
if( custom_parameters && 0 !== custom_parameters.length )
{
query_url += '&' + custom_parameters.replace( /^&/, '' );
}
url_element
.attr( 'href', query_url )
.text( query_url )
.trigger( 'change' );
result_element
.show();
return false;
}
);
var fields = 0;
for( var key in context.params )
{
if( 'string' === typeof context.params[key] )
{
fields++;
$( '[name="' + key + '"]', query_form )
.val( context.params[key] );
}
}
if( 0 !== fields )
{
query_form
.trigger( 'submit' );
}
}
);
}
);

View File

@ -1,527 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
var timer_element = null;
var timer_timeout = null;
var core_basepath = null;
var navigation_element = null;
var replication_element = null;
var init_timer = function( next_tick )
{
if( timer_timeout )
{
window.clearTimeout( timer_timeout );
}
update_timer( next_tick );
}
var update_timer = function( next_tick )
{
if( 0 === next_tick )
{
replication_fetch_status();
return false;
}
$( 'p .tick', timer_element )
.text( app.convert_seconds_to_readable_time( next_tick ) );
timer_timeout = window.setTimeout
(
'update_timer( ' + --next_tick + ' )',
1000
);
}
var clear_timer = function()
{
if( timer_timeout )
{
window.clearTimeout( timer_timeout );
timer_element.hide();
}
}
var replication_fetch_status = function()
{
$.ajax
(
{
url : core_basepath + '/replication?command=details&wt=json',
dataType : 'json',
beforeSend : function( xhr, settings )
{
$( '.refresh-status span', navigation_element )
.addClass( 'loader' );
clear_timer();
},
success : function( response, text_status, xhr )
{
$( '.refresh-status span', navigation_element )
.removeClass( 'loader' );
var data = response.details;
var is_slave = 'true' === data.isSlave;
replication_element
.addClass( is_slave ? 'slave' : 'master' );
if( is_slave )
{
var error_element = $( '#error', replication_element );
if( data.slave.ERROR )
{
error_element
.html( data.slave.ERROR )
.show();
}
else
{
error_element
.hide()
.empty();
}
var progress_element = $( '#progress', replication_element );
var start_element = $( '#start', progress_element );
$( 'span', start_element )
.text( data.slave.replicationStartTime );
var eta_element = $( '#eta', progress_element );
$( 'span', eta_element )
.text( app.convert_seconds_to_readable_time( data.slave.timeRemaining ) );
var bar_element = $( '#bar', progress_element );
$( '.files span', bar_element )
.text( data.slave.numFilesToDownload );
$( '.size span', bar_element )
.text( data.slave.bytesToDownload );
var speed_element = $( '#speed', progress_element );
$( 'span', speed_element )
.text( data.slave.downloadSpeed );
var done_element = $( '#done', progress_element );
$( '.files span', done_element )
.text( data.slave.numFilesDownloaded );
$( '.size span', done_element )
.text( data.slave.bytesDownloaded );
$( '.percent span', done_element )
.text( parseInt(data.slave.totalPercent ) );
var percent = parseInt( data.slave.totalPercent );
if( 0 === percent )
{
done_element
.css( 'width', '1px' );
}
else
{
done_element
.css( 'width', percent + '%' );
}
var current_file_element = $( '#current-file', replication_element );
$( '.file', current_file_element )
.text( data.slave.currentFile );
$( '.done', current_file_element )
.text( data.slave.currentFileSizeDownloaded );
$( '.total', current_file_element )
.text( data.slave.currentFileSize );
$( '.percent', current_file_element )
.text( parseInt( data.slave.currentFileSizePercent ) );
if( !data.slave.indexReplicatedAtList )
{
data.slave.indexReplicatedAtList = [];
}
if( !data.slave.replicationFailedAtList )
{
data.slave.replicationFailedAtList = [];
}
var iterations_element = $( '#iterations', replication_element );
var iterations_list = $( '.iterations ul', iterations_element );
var iterations_data = [];
var iterations_obj = {};
for( var i in data.slave.indexReplicatedAtList )
{
var date = data.slave.indexReplicatedAtList[i];
if( !iterations_obj[date] )
{
iterations_obj[date] = true;
iterations_data.push( date );
}
}
for( var i in data.slave.replicationFailedAtList )
{
var date = data.slave.replicationFailedAtList[i];
if( !iterations_obj[date] )
{
iterations_obj[date] = true;
iterations_data.push( date );
}
}
iterations_data.sort().reverse();
if( 0 !== iterations_data.length )
{
var iterations = [];
for( var i = 0; i < iterations_data.length; i++ )
{
iterations.push( '<li data-date="' + iterations_data[i] + '">' + iterations_data[i] + '</li>' );
}
iterations_list
.html( iterations.join( "\n" ) )
.show();
$( data.slave.indexReplicatedAtList )
.each
(
function( key, value )
{
$( 'li[data-date="' + value + '"]', iterations_list )
.addClass( 'replicated' );
}
);
if( data.slave.indexReplicatedAt )
{
$( 'li[data-date="' + data.slave.indexReplicatedAt + '"]', iterations_list )
.addClass( 'latest' );
}
$( data.slave.replicationFailedAtList )
.each
(
function( key, value )
{
$( 'li[data-date="' + value + '"]', iterations_list )
.addClass( 'failed' );
}
);
if( data.slave.replicationFailedAt )
{
$( 'li[data-date="' + data.slave.replicationFailedAt + '"]', iterations_list )
.addClass( 'latest' );
}
if( 0 !== $( 'li:hidden', iterations_list ).size() )
{
$( 'a', iterations_element )
.show();
}
else
{
$( 'a', iterations_element )
.hide();
}
}
}
var details_element = $( '#details', replication_element );
var current_type_element = $( ( is_slave ? '.slave' : '.masterSearch' ), details_element );
var master_data = is_slave ? data.slave.masterDetails : data;
// the currently searchable commit regardless of type
$( '.version div', current_type_element )
.html( data.indexVersion );
$( '.generation div', current_type_element )
.html( data.generation );
$( '.size div', current_type_element )
.html( data.indexSize );
// what's replicable on the master
var master_element = $( '.master', details_element );
$( '.version div', master_element )
.html( master_data.master.replicableVersion || '-' );
$( '.generation div', master_element )
.html( master_data.master.replicableGeneration || '-' );
$( '.size div', master_element )
.html( "-" );
if( is_slave )
{
// what's searchable on the master
var master_searchable = $( '.masterSearch', details_element );
$( '.version div', master_searchable )
.html( master_data.indexVersion );
$( '.generation div', master_searchable )
.html( master_data.generation );
$( '.size div', master_searchable )
.html( master_data.indexSize );
// warnings if slave version|gen doesn't match what's replicable
if( data.indexVersion !== master_data.master.replicableVersion )
{
$( '.version', details_element )
.addClass( 'diff' );
}
else
{
$( '.version', details_element )
.removeClass( 'diff' );
}
if( data.generation !== master_data.master.replicableGeneration )
{
$( '.generation', details_element )
.addClass( 'diff' );
}
else
{
$( '.generation', details_element )
.removeClass( 'diff' );
}
}
if( is_slave )
{
var settings_element = $( '#settings', replication_element );
if( data.slave.masterUrl )
{
$( '.masterUrl dd', settings_element )
.html( response.details.slave.masterUrl )
.parents( 'li' ).show();
}
var polling_content = '&nbsp;';
var polling_ico = 'ico-1';
if( 'true' === data.slave.isPollingDisabled )
{
polling_ico = 'ico-0';
$( '.disable-polling', navigation_element ).hide();
$( '.enable-polling', navigation_element ).show();
}
else
{
$( '.disable-polling', navigation_element ).show();
$( '.enable-polling', navigation_element ).hide();
if( data.slave.pollInterval )
{
polling_content = '(interval: ' + data.slave.pollInterval + ')';
}
}
$( '.isPollingDisabled dd', settings_element )
.removeClass( 'ico-0' )
.removeClass( 'ico-1' )
.addClass( polling_ico )
.html( polling_content )
.parents( 'li' ).show();
if( 'true' === data.slave.isReplicating )
{
replication_element
.addClass( 'replicating' );
$( '.replicate-now', navigation_element ).hide();
$( '.abort-replication', navigation_element ).show();
window.setTimeout( replication_fetch_status, 1000 );
}
else
{
replication_element
.removeClass( 'replicating' );
$( '.replicate-now', navigation_element ).show();
$( '.abort-replication', navigation_element ).hide();
if( 'false' === data.slave.isPollingDisabled && data.slave.pollInterval )
{
timer_element = $( '.timer', navigation_element );
approx_element = $( '.approx', timer_element );
var next_tick = app.convert_duration_to_seconds( data.slave.pollInterval );
approx_element.show();
if( data.slave.nextExecutionAt )
{
var nextExecutionAt = new SolrDate( data.slave.nextExecutionAt );
var currentDate = new SolrDate( data.slave.currentDate );
if( nextExecutionAt.getTime() > currentDate.getTime() )
{
next_tick = ( nextExecutionAt.getTime() - currentDate.getTime() ) / 1000;
approx_element.hide();
$( 'small', timer_element )
.text( data.slave.nextExecutionAt )
.show();
}
}
init_timer( next_tick );
timer_element
.show();
}
}
}
var master_settings_element = $( '#master-settings', replication_element );
var master_data = is_slave ? data.slave.masterDetails.master : data.master;
var replication_icon = 'ico-0';
if( 'true' === master_data.replicationEnabled )
{
replication_icon = 'ico-1';
$( '.disable-replication', navigation_element ).show();
$( '.enable-replication', navigation_element ).hide();
}
else
{
$( '.disable-replication', navigation_element ).hide();
$( '.enable-replication', navigation_element ).show();
}
$( '.replicationEnabled dd', master_settings_element )
.removeClass( 'ico-0' )
.removeClass( 'ico-1' )
.addClass( replication_icon )
.parents( 'li' ).show();
$( '.replicateAfter dd', master_settings_element )
.html( master_data.replicateAfter.join( ', ' ) )
.parents( 'li' ).show();
if( master_data.confFiles )
{
var conf_files = [];
var conf_data = master_data.confFiles.split( ',' );
for( var i = 0; i < conf_data.length; i++ )
{
var item = conf_data[i];
if( - 1 !== item.indexOf( ':' ) )
{
info = item.split( ':' );
item = '<abbr title="' + info[0] + ' » ' + info[1] + '">' + ( is_slave ? info[1] : info[0] ) + '</abbr>';
}
conf_files.push( item );
}
$( '.confFiles dd', master_settings_element )
.html( conf_files.join( ', ' ) )
.parents( 'li' ).show();
}
$( '.block', replication_element ).last()
.addClass( 'last' );
},
error : function( xhr, text_status, error_thrown )
{
$( '#content' )
.html( 'sorry, no replication-handler defined!' );
},
complete : function( xhr, text_status )
{
}
}
);
}
// #/:core/replication
sammy.get
(
new RegExp( app.core_regex_base + '\\/(replication)$' ),
function( context )
{
core_basepath = this.active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
$.get
(
'tpl/replication.html',
function( template )
{
content_element
.html( template );
replication_element = $( '#replication', content_element );
navigation_element = $( '#navigation', replication_element );
replication_fetch_status();
$( '#iterations a', content_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parents( '.iterations' )
.toggleClass( 'expanded' );
return false;
}
);
$( 'button', navigation_element )
.die( 'click' )
.live
(
'click',
function( event )
{
var button = $( this );
var command = button.data( 'command' );
if( button.hasClass( 'refresh-status' ) && !button.hasClass( 'loader' ) )
{
replication_fetch_status();
}
else if( command )
{
$.get
(
core_basepath + '/replication?command=' + command + '&wt=json',
function()
{
replication_fetch_status();
}
);
}
return false;
}
);
}
);
}
);

File diff suppressed because it is too large Load Diff

View File

@ -1,206 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
var get_tooltip = function( segment_response ) {
var tooltip =
'<div>Segment <b>' + segment_response.name + '</b>:</div>' +
'<div class="label">#docs:</div><div>' + number_format(segment_response.size) +'</div>' +
'<div class="label">#dels:</div><div>' + number_format(segment_response.delCount) + '</div>' +
'<div class="label">size:</div><div>' + number_format(segment_response.sizeInBytes) + ' bytes </div>' +
'<div class="label">age:</div><div>' + segment_response.age + '</div>' +
'<div class="label">source:</div><div>' + segment_response.source + '</div>';
return tooltip;
};
var get_entry = function( segment_response, segment_bytes_max ) {
//calcualte dimensions of graph
var dims = calculate_dimensions(segment_response.sizeInBytes,
segment_bytes_max, segment_response.size, segment_response.delCount)
//create entry for segment with given dimensions
var entry = get_entry_item(segment_response.name, dims,
get_tooltip(segment_response), (segment_response.mergeCandidate)?true:false);
return entry;
};
var get_entry_item = function(name, dims, tooltip, isMergeCandidate) {
var entry = '<li>' + "\n" +
' <dl class="clearfix" style="width: ' + dims['size'] + '%;">' + "\n" +
' <dt><div>' + name + '</div></dt>' + "\n" +
' <dd>';
entry += '<div class="live' + ((isMergeCandidate)?' merge-candidate':'') +
'" style="width: ' + dims['alive_doc_size'] + '%;">&nbsp;</div>';
entry += '<div class="toolitp">' + tooltip +'</div>';
if (dims['deleted_doc_size'] > 0.001) {
entry += '<div class="deleted" style="width:' + dims['deleted_doc_size']
+ '%;margin-left:' + dims['alive_doc_size'] + '%;">&nbsp;</div>';
}
entry += '</dd></dl></li>';
return entry;
};
var get_footer = function(deletions_count, documents_count) {
return '<li><dl><dt></dt><dd>Deletions: ' +
(documents_count == 0 ? 0 : round_2(deletions_count/documents_count * 100)) +
'% </dd></dl></li>';
};
var calculate_dimensions = function(segment_size_in_bytes, segment_size_in_bytes_max, doc_count, delete_doc_count) {
var segment_size_in_bytes_log = Math.log(segment_size_in_bytes);
var segment_size_in_bytes_max_log = Math.log(segment_size_in_bytes_max);
var dims = {};
//Normalize to 100% size of bar
dims['size'] = Math.floor((segment_size_in_bytes_log / segment_size_in_bytes_max_log ) * 100);
//Deleted doc part size
dims['deleted_doc_size'] = Math.floor((delete_doc_count/(delete_doc_count + doc_count)) * dims['size']);
//Alive doc part size
dims['alive_doc_size'] = dims['size'] - dims['deleted_doc_size'];
return dims;
};
var calculate_max_size_on_disk = function(segment_entries) {
var max = 0;
$.each(segment_entries, function(idx, obj) {
if (obj.sizeInBytes > max) {
max = obj.sizeInBytes;
}
});
return max;
};
var round_2 = function(num) {
return Math.round(num*100)/100;
};
var number_format = function(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
};
var prepare_x_axis = function(segment_bytes_max) {
var factor = 1024*1024; //for MB
var segment_bytes_max_log = Math.log(segment_bytes_max);
var series_entry = '<li>' + "\n" +
' <dl class="clearfix" style="width:100%;">' + "\n" +
' <dt><div>Size</div></dt>' + "\n" +
' <dd>' +
' <div class="start">0</div>';
var step = 0;
for (var j = 0; j < 3; j+=1) {
step += segment_bytes_max_log/4;
var step_value = number_format(Math.floor((Math.pow(Math.E, step))/factor))
series_entry += '<div class="w5">' + ((step_value > 0.001)?step_value : '&nbsp;') + '</div>'
}
series_entry += '<div class="end">' + number_format(Math.floor(segment_bytes_max/factor)) + ' MB </div>' +
' </dd>' +
' </dl>' +
'</li>';
return series_entry;
};
// #/:core/admin/segments
sammy.get
(
new RegExp( app.core_regex_base + '\\/(segments)$' ),
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
$.get
(
'tpl/segments.html',
function( template )
{
content_element.html( template );
var segments_element = $('#segments', content_element);
var segments_reload = $( '#segments a.reload' );
var url_element = $('#url', segments_element);
var result_element = $('#result', segments_element);
var response_element = $('#response', result_element);
var segments_holder_element = $('.segments-holder', result_element);
segments_reload
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : core_basepath + '/admin/segments?wt=json',
dataType : 'json',
context: this,
beforeSend : function( arr, form, options )
{
loader.show( this );
},
success : function( response, text_status, xhr )
{
var segments_response = response['segments'],
segments_entries = [],
segment_bytes_max = calculate_max_size_on_disk( segments_response );
//scale
segments_entries.push( prepare_x_axis( segment_bytes_max ) );
var documents_count = 0, deletions_count = 0;
//elements
$.each( segments_response, function( key, segment_response ) {
segments_entries.push( get_entry( segment_response, segment_bytes_max ) );
documents_count += segment_response.size;
deletions_count += segment_response.delCount;
});
//footer
segments_entries.push( get_footer( deletions_count, documents_count ) );
$( 'ul', segments_holder_element ).html( segments_entries.join("\n" ) );
},
error : function( xhr, text_status, error_thrown )
{
$( this )
.attr( 'title', '/admin/segments is not configured (' + xhr.status + ': ' + error_thrown + ')' );
$( this ).parents( 'li' )
.addClass( 'error' );
},
complete : function( xhr, text_status )
{
loader.hide( this );
}
}
);
return false;
}
);
//initially submit
segments_reload.click();
}
);
}
);

View File

@ -1,158 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
*/
// #/~threads
sammy.get
(
/^#\/(~threads)$/,
function( context )
{
var content_element = $( '#content' );
$.get
(
'tpl/threads.html',
function( template )
{
content_element
.html( template );
$.ajax
(
{
url : app.config.solr_path + '/admin/info/threads?wt=json',
dataType : 'json',
context : $( '#threads', content_element ),
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
var self = this;
var threadDumpData = response.system.threadDump;
var threadDumpContent = [];
var c = 0;
for( var i = 1; i < threadDumpData.length; i += 2 )
{
var state = threadDumpData[i].state.esc();
var name = '<a title="' + state +'"><span>' + threadDumpData[i].name.esc() + ' (' + threadDumpData[i].id.esc() + ')</span></a>';
var classes = [state];
var details = '';
if( 0 !== c % 2 )
{
classes.push( 'odd' );
}
if( threadDumpData[i].lock )
{
classes.push( 'lock' );
name += "\n" + '<p title="Waiting on">' + threadDumpData[i].lock.esc() + '</p>';
}
if( threadDumpData[i].stackTrace && 0 !== threadDumpData[i].stackTrace.length )
{
classes.push( 'stacktrace' );
var stack_trace = threadDumpData[i].stackTrace
.join( '###' )
.esc()
.replace( /\(/g, '&#8203;(' )
.replace( /###/g, '</li><li>' );
name += '<div>' + "\n"
+ '<ul>' + "\n"
+ '<li>' + stack_trace + '</li>'
+ '</ul>' + "\n"
+ '</div>';
}
var item = '<tr class="' + classes.join( ' ' ) +'">' + "\n"
+ '<td class="name">' + name + '</td>' + "\n"
+ '<td class="time">' + threadDumpData[i].cpuTime.esc() + '<br>' + threadDumpData[i].userTime.esc() + '</td>' + "\n"
+ '</tr>';
threadDumpContent.push( item );
c++;
}
var threadDumpBody = $( '#thread-dump tbody', this );
threadDumpBody
.html( threadDumpContent.join( "\n" ) );
$( '.name a', threadDumpBody )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).closest( 'tr' )
.toggleClass( 'open' );
}
);
$( '.controls a', this )
.die( 'click' )
.live
(
'click',
function( event )
{
var threads_element = $( self );
var is_collapsed = threads_element.hasClass( 'collapsed' );
var thread_rows = $( 'tr', threads_element );
thread_rows
.each
(
function( index, element )
{
if( is_collapsed )
{
$( element )
.addClass( 'open' );
}
else
{
$( element )
.removeClass( 'open' );
}
}
);
threads_element
.toggleClass( 'collapsed' )
.toggleClass( 'expanded' );
}
);
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);
}
);

View File

@ -1,169 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<head>
<title>Solr Admin</title>
<link rel="icon" type="image/x-icon" href="img/favicon.ico?_=${version}">
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/common.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/analysis.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/cloud.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/cores.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/dashboard.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/dataimport.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/files.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/index.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/java-properties.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/logging.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/menu.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/plugins.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/documents.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/query.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/replication.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/schema-browser.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/threads.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/styles/segments.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/chosen.css?_=${version}">
<meta http-equiv="x-ua-compatible" content="IE=9">
<script type="text/javascript">
var app_config = {};
app_config.solr_path = '${contextPath}';
app_config.core_admin_path = '${adminPath}';
</script>
</head>
<body>
<div id="wrapper">
<div id="header">
<a href="./" id="solr"><span>Apache SOLR</span></a>
<p id="environment">&nbsp;</p>
</div>
<div id="main" class="clearfix">
<div id="init-failures">
<h2>SolrCore Initialization Failures</h2>
<ul></ul>
<p>Please check your logs for more information</p>
</div>
<div class="old-ui-warning">
THIS USER INTERFACE IS DEPRECATED. Please use the current UI <a class="ul" href="/solr/">here</a>
<a target="_blank" href="http://wiki.apache.org/solr/AngularUI">&nbsp;<span class="help"></span></a>
</div>
<div id="content-wrapper">
<div id="content">
&nbsp;
</div>
</div>
<div id="menu-wrapper">
<div>
<ul id="menu">
<li id="index" class="global"><p><a href="#/">Dashboard</a></p></li>
<li id="logging" class="global"><p><a href="#/~logging">Logging</a></p>
<ul>
<li class="level"><a href="#/~logging/level">Level</a></li>
</ul>
</li>
<li id="cloud" class="global optional"><p><a href="#/~cloud">Cloud</a></p>
<ul>
<li class="tree"><a href="#/~cloud?view=tree">Tree</a></li>
<li class="graph"><a href="#/~cloud">Graph</a></li>
<li class="rgraph"><a href="#/~cloud?view=rgraph">Graph (Radial)</a></li>
<li class="dump"><a href="#/~cloud">Dump</a></li>
</ul>
</li>
<li id="cores" class="global"><p><a href="#/~cores">Core Admin</a></p></li>
<li id="java-properties" class="global"><p><a href="#/~java-properties">Java Properties</a></li>
<li id="threads" class="global"><p><a href="#/~threads">Thread Dump</a></p></li>
</ul>
<div id="core-selector">
<div id="has-cores">
<select data-placeholder="Core Selector"></select>
</div>
<p id="has-no-cores"><a href="#/~cores">
No cores available
<span>Go and create one</span>
</a></p>
</div>
<div id="core-menu">
<ul></ul>
</div>
</div>
</div>
<div id="meta">
<ul>
<li class="documentation"><a href="http://lucene.apache.org/solr/"><span>Documentation</span></a></li>
<li class="issues"><a href="http://issues.apache.org/jira/browse/SOLR"><span>Issue Tracker</span></a></li>
<li class="irc"><a href="https://wiki.apache.org/solr/IRCChannels"><span>IRC Channel</span></a></li>
<li class="mailinglist"><a href="http://lucene.apache.org/solr/resources.html#community"><span>Community forum</span></a></li>
<li class="wiki-query-syntax"><a href="https://cwiki.apache.org/confluence/display/solr/Query+Syntax+and+Parsing"><span>Solr Query Syntax</span></a></li>
</ul>
</div>
</div>
</div>
<div id="connection_status">
<span>Connection lost &hellip;</span>
</div>
<script type="text/javascript"> var require = { urlArgs: '_=${version}' }; </script>
<script src="js/require.js?_=${version}" data-main="js/main"></script>
</body>
</html>

View File

@ -1,83 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="analysis">
<div class="block analysis-error" id="analysis-handler-missing">
<div class="head">This Functionality requires the <code>/analysis/field</code> Handler to be registered and active!</div>
</div>
<div class="block analysis-error" id="analysis-error">
<div class="body"></div>
</div>
<div id="analysis-holder">
<div id="field-analysis">
<form method="get">
<ul class="clearfix">
<li class="index">
<label for="analysis_fieldvalue_index">Field Value (Index)</label>
<textarea name="analysis.fieldvalue" id="analysis_fieldvalue_index"></textarea>
</li>
<li class="query">
<label for="analysis_fieldvalue_query">Field Value (Query)</label>
<textarea name="analysis.query" id="analysis_fieldvalue_query"></textarea>
</li>
<li class="settings-holder clearfix">
<div class="settings clearfix">
<label for="type_or_name">Analyse Fieldname / FieldType:</label>
<select id="type_or_name"></select>
<a id="tor_schema" href="#"><span>Schema Browser</span>&nbsp;</a>
<div class="buttons clearfix">
<button type="submit"><span>Analyse Values</span></button>
<div class="verbose_output active">
<a>Verbose Output</a>
</div>
</div>
</div>
</li>
</ul>
</form>
</div>
<div id="analysis-result" class="clearfix verbose_output"></div>
</div>
</div>

View File

@ -1,87 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="cloud" class="clearfix">
<div id="frame">
<div id="tree-content" class="content clearfix">
<div id="tree" class="tree">#tree</div>
<div id="file-content" class="clearfix">
<div id="prop">
<ul></ul>
</div>
<div id="data"></div>
<a class="close"><span>[x]</span></a>
</div>
</div>
<div id="graph-content" class="content clearfix">
<div id="canvas"></div>
<div id="legend">
<ul>
<li class="leader"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Leader</li>
<li class="active"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Active</li>
<li class="recovering"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Recovering</li>
<li class="down"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Down</li>
<li class="recovery_failed"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Recovery Failed</li>
<li class="gone"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Gone</li>
</ul>
</div>
<div style="width: 100%; text-align: center;">
<div id="cloudGraphPaging">
<button id="cloudGraphPagingPrev">&lt; Previous</button>
<input id="cloudGraphPagingStart" type="hidden" name="start" />
<span id="cloudGraphPagingStatus"></span>&nbsp;
Filter by:&nbsp;<select id="cloudGraphPagingFilterType">
<option value="status">Status</option>
<option value="name">Name</option>
</select>&nbsp;
<select id="cloudGraphPagingStatusFilter">
<option value=""> - Any - </option>
<option value="healthy">Healthy</option>
<option value="degraded">Degraded</option>
<option value="downed_shard">Downed Shard</option>
<option value="recovering">Replica in Recovery</option>
</select>
<input id="cloudGraphPagingFilter" type="text" size="10" name="filter" />&nbsp;
Show <input id="cloudGraphPagingRows" type="text" size="2" name="rows" /> per page.
<button id="cloudGraphPagingNext">Next &gt;</button>
</div>
</div>
</div>
</div>
<div id="debug">
<ul class="clearfix">
<li class="clipboard"><a href="#" data-copied="Copied to Clipboard!">Copy to Clipboard (BUGGY!)</a></li>
<li class="close"><a href="#">Close</a></li>
</ul>
<pre class="debug"></pre>
</div>
</div>

View File

@ -1,226 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="cores" class="clearfix empty">
<div id="ui-block">&nbsp;</div>
<div id="frame">
<div id="actions" class="actions clearfix">
<button id="add" class="action"><span>Add Core</span></button>
<button id="unload" class="warn requires-core"><span>Unload</span></button>
<button id="rename" class="action requires-core"><span>Rename</span></button>
<button id="swap" class="action requires-core"><span>Swap</span></button>
<button id="reload" class="requires-core"><span>Reload</span></button>
<button id="optimize" class="requires-core"><span>Optimize</span></button>
<div class="action add" data-rel="add">
<form>
<input type="hidden" name="action" value="CREATE">
<p class="clearfix"><label for="add_name">name:</label>
<input type="text" name="name" id="add_name" value="new_core"></p>
<p class="clearfix"><label for="add_instanceDir">instanceDir:</label>
<input type="text" name="instanceDir" id="add_instanceDir" value="new_core"></p>
<p class="clearfix"><label for="add_dataDir">dataDir:</label>
<input type="text" name="dataDir" id="dataDir" value="data"></p>
<p class="clearfix"><label for="add_config">config:</label>
<input type="text" name="config" id="add_config" value="solrconfig.xml"></p>
<p class="clearfix"><label for="add_schema">schema:</label>
<input type="text" name="schema" id="add_schema" value="schema.xml"></p>
<div class="cloud">
<p class="clearfix"><label for="add_collection">collection:</label>
<input type="text" name="collection" id="add_collection"></p>
<p class="clearfix"><label for="add_shard">shard:</label>
<input type="text" name="shard" id="shard"></p>
</div>
<p class="clearfix note directory-note">
<span><code>instanceDir</code> and <code>dataDir</code> need to exist before you can create the core</span>
</p>
<p class="clearfix note error">
<span></span>
</p>
<p class="clearfix buttons">
<button type="submit" class="submit"><span>Add Core</span></button>
<button type="reset" class="reset"><span>Cancel</span></button>
</p>
</form>
</div>
<div class="action rename" data-rel="rename">
<form>
<input type="hidden" name="action" value="RENAME">
<input type="hidden" name="core" data-core="current">
<p class="clearfix"><label for="rename_other">New Name:</label>
<input type="text" name="other" data-core="current" id="rename_other"></p>
<p class="clearfix buttons">
<button type="submit" class="submit"><span>Rename Core</span></button>
<button type="reset" class="reset"><span>Cancel</span></button>
</p>
</form>
</div>
<div class="action swap" data-rel="swap">
<form>
<input type="hidden" name="action" value="SWAP">
<p class="clearfix"><label for="swap_core">this:</label>
<input type="text" id="swap_core" name="core" data-core="current" readonly="readonly"></p>
<p class="clearfix"><label for="swap_other">and:</label>
<select name="other" id="swap_other" name="other" class="other">
</select></p>
<p class="clearfix buttons">
<button type="submit" class="submit"><span>Swap Cores</span></button>
<button type="reset" class="reset"><span>Cancel</span></button>
</p>
</form>
</div>
</div>
<div id="data" class="requires-core">
<div class="block" id="core-data">
<h2><span>Core</span></h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<ul>
<li class="startTime"><dl class="clearfix">
<dt><span>startTime:</span></dt>
<dd class="timeago"></dd>
</dl></li>
<li class="instanceDir"><dl class="clearfix">
<dt><span>instanceDir:</span></dt>
<dd></dd>
</dl></li>
<li class="dataDir"><dl class="clearfix">
<dt><span>dataDir:</span></dt>
<dd></dd>
</dl></li>
</ul>
</div>
</div>
<div class="block" id="index-data">
<h2><span>Index</span></h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<ul>
<li class="lastModified"><dl class="clearfix">
<dt><span>lastModified:</span></dt>
<dd class="timeago"></dd>
</dl></li>
<li class="version"><dl class="clearfix">
<dt><span>version:</span></dt>
<dd></dd>
</dl></li>
<li class="numDocs"><dl class="clearfix">
<dt><span>numDocs:</span></dt>
<dd></dd>
</dl></li>
<li class="maxDoc"><dl class="clearfix">
<dt><span>maxDoc:</span></dt>
<dd></dd>
</dl></li>
<li class="deletedDocs"><dl class="clearfix">
<dt><span>deletedDocs:</span></dt>
<dd></dd>
</dl></li>
<li class="optimized"><dl class="clearfix">
<dt><span>optimized:</span></dt>
<dd class="ico"><span></span></dd>
</dl></li>
<li class="current"><dl class="clearfix">
<dt><span>current:</span></dt>
<dd class="ico"><span></span></dd>
</dl></li>
<li class="directory"><dl class="clearfix">
<dt><span>directory:</span></dt>
<dd></dd>
</dl></li>
</ul>
</div>
</div>
</div>
</div>
<div id="navigation" class="requires-core clearfix">
</div>
</div>

View File

@ -1,201 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="dashboard">
<div class="clearfix">
<div class="block fieldlist" id="statistics">
<h2><span>Statistics</span></h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<dl>
<dt class="index_last-modified">Last Modified:</dt>
<dd class="index_last-modified value timeago"></dd>
<dt class="index_num-doc">Num Docs:</dt>
<dd class="index_num-doc value"></dd>
<dt class="index_max-doc">Max Doc:</dt>
<dd class="index_max-doc value"></dd>
<dt class="index_heap-usage-bytes">Heap Memory Usage:</dt>
<dd class="index_heap-usage-bytes value"></dd>
<dt class="index_deleted-doc">Deleted Docs:</dt>
<dd class="index_deleted-doc value"></dd>
<dt class="index_version">Version:</dt>
<dd class="index_version value"></dd>
<dt class="index_segmentCount">Segment Count:</dt>
<dd class="index_segmentCount value"></dd>
<dt class="index_optimized">Optimized:</dt>
<dd class="index_optimized value ico"><span></span>
<a>optimize now</a></dd>
<dt class="index_current">Current:</dt>
<dd class="index_current value ico"><span></span></dd>
</dl>
</div>
</div>
<div class="block fieldlist" id="instance">
<h2><span>Instance</span></h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<dl>
<dt class="dir_cwd"><abbr title="Current Working Directory">CWD</abbr>:</dt>
<dd class="dir_cwd value"></dd>
<dt class="dir_instance">Instance:</dt>
<dd class="dir_instance value"></dd>
<dt class="dir_data">Data:</dt>
<dd class="dir_data value"></dd>
<dt class="dir_index">Index:</dt>
<dd class="dir_index value"></dd>
<dt class="dir_impl">Impl:</dt>
<dd class="dir_impl value"></dd>
</dl>
</div>
</div>
</div>
<div class="clearfix">
<div class="block" id="replication">
<h2><span class="is-replicating">Replication</span></h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content clearfix"id="details">
<table border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td><span>Index</span></td>
<th>Version</th>
<th><abbr title="Generation">Gen</abbr></th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr class="masterSearch">
<th>Master (Searching)</th>
<td class="version"><div>x</div></td>
<td class="generation"><div>y</div></td>
<td class="size"><div>z</div></td>
</tr>
<tr class="master">
<th>Master (Replicable)</th>
<td class="version"><div>x</div></td>
<td class="generation"><div>y</div></td>
<td class="size"><div>z</div></td>
</tr>
<tr class="slave slaveOnly">
<th>Slave (Searching)</th>
<td class="version"><div>a</div></td>
<td class="generation"><div>c</div></td>
<td class="size"><div>c</div></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="block fieldlist" id="healthcheck">
<h2><span>Healthcheck</span></h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<dl>
<dt class="status">Status:</dt>
<dd class="status value ico">
<button class="healthcheck-status">Healthcheck Status</button>
</dd>
</dl>
</div>
</div>
</div>
<div class="clearfix">
<div class="block" id="admin-extra">
<h2><span>Admin Extra</span></h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
</div>
</div>
</div>
</div>

View File

@ -1,183 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="dataimport" class="clearfix">
<div id="frame">
<div id="error"></div>
<div id="current_state">
<p class="last_update">Last Update: <abbr>Unknown</abbr></p>
<div class="info">
<strong></strong>
<div class="details">
<div class="docs"></div>
<div class="dates"></div>
</div>
<button class="abort-import warn"><span data-aborting="Aborting Import">Abort Import</span></button>
</div>
</div>
<div class="block hidden" id="raw_output">
<h2>
<a class="toggle"><span>Raw Status-Output</span></a>
</h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<div id="raw_output_container"></div>
</div>
</div>
<div class="block hidden" id="config">
<h2 class="clearfix">
<a class="toggle"><span>Configuration</span></a>
<a class="r reload_config" title="Reload Configuration">Reload</a>
<a class="r debug_mode">Debug-Mode</a>
</h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<div id="dataimport_config">
<div class="formatted">
<div class="loader">Loading ...</div>
</div>
<div class="editable">
<textarea></textarea>
</div>
</div>
</div>
</div>
<div class="block hidden" id="debug_response">
<h2>
<a class="toggle"><span>Raw Debug-Response</span></a>
</h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<em>No Request executed</em>
</div>
</div>
</div>
<div id="form">
<div id="navigation">
<ul></ul>
</div>
<form action="#" method="get">
<label for="command">
<a rel="help">Command</a>
</label>
<select name="command" id="command">
<option>full-import</option>
<option>delta-import</option>
</select>
<label for="verbose" class="checkbox">
<input type="checkbox" name="verbose" id="verbose" value="true">
<a rel="help">Verbose</a>
</label>
<label for="clean" class="checkbox">
<input type="checkbox" name="clean" id="clean" value="true" checked="checked">
<a rel="help">Clean</a>
</label>
<label for="commit" class="checkbox">
<input type="checkbox" name="commit" id="commit" value="true" checked="checked">
<a rel="help">Commit</a>
</label>
<label for="optimize" class="checkbox">
<input type="checkbox" name="optimize" id="optimize" value="true">
<a rel="help">Optimize</a>
</label>
<label for="debug" class="checkbox">
<input type="checkbox" name="debug" id="debug" value="true">
<a rel="help">Debug</a>
</label>
<label for="entity">
<a rel="help">Entity</a>
</label>
<select id="entity"></select>
<label for="start">
<a rel="help">Start</a>,
<a rel="help">Rows</a>
</label>
<div class="clearfix">
<input type="text" id="start" placeholder="0">
<input type="text" id="rows" placeholder="10">
</div>
<label for="custom_parameters">
<a rel="help">Custom Parameters</a>
</label>
<input type="text" id="custom_parameters" value="" placeholder="key1=val1&amp;key2=val2">
<button class="execute" type="submit"><span data-debugmode="Execute with this Configuration →">Execute</span></button>
<button class="refresh-status"><span>Refresh Status</span></button>
</form>
<p id="auto-refresh-status"><a>Auto-Refresh Status</a></p>
</div>
</div>

View File

@ -1,100 +0,0 @@
<!--
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* 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.
*/
-->
<div id="documents" class="clearfix">
<div id="form">
<form action="#" method="post">
<label for="qt">
<a rel="help">Request-Handler (qt)</a>
</label>
<input type="text" id="qt" value="/update" title="Request handler in solrconfig.xml.">
<!-- TODO: Add support for uploading docs and a doc wizard -->
<label for="document-type">
<a rel="help">Document Type</a>
</label>
<div><select name="document-type" id="document-type" title="The type of the document field">
<!-- TODO: support the Builder -->
<option value="csv">CSV</option>
<option value="wizard">Document Builder</option>
<option value="upload">File Upload</option>
<option selected="true" value="json">JSON</option>
<option value="solr">Solr Command (raw XML or JSON)</option>
<option value="xml">XML</option>
<!-- TODO: If other, then, show a text box -->
<!--<option>Other</option>-->
</select></div>
<div id="document-container">
<div id="wizard">
<div id="wizard-fields">
<div><span class="description">Field</span>: <select id="wiz-field-select" name="wiz-field-select"></select>
</div>
<div><span id="wiz-field-data"><span class="description">Field Data</span>:</span> <textarea id="wizard-doc"
name="wizard-doc"
rows="10"
cols="40">Enter your field text here and then click "Add Field" to add the field to the document.</textarea></div>
</div>
<div id="wizard-add"><a id="add-field-href" href="#"><img border="0" src="./img/ico/plus-button.png"/>Add
Field</a></div>
</div>
<label for="document">
<a rel="help">Document(s)</a>
</label>
<textarea name="document" id="document" title="The Document" rows="10"
cols="70">{"id":"change.me","title":"change.me"}</textarea>
<div id="file-upload">
<input type="file" id="the-file" name="the-file"/>
</div>
</div>
<div id="advanced">
<!-- TODO: only show for JSON/XML-->
<div id="attribs">
<div id="upload-only">
<label for="erh-params"><!-- TODO: cleaner way to do this? -->
<a rel="help">Extracting Req. Handler Params</a>
</label>
<input type="text" id="erh-params" value="&literal.id=change.me"
title="Extracting Request Handler Parameters" size="50">
</div>
<div id="general-attribs">
<label for="commitWithin">
<a rel="help">Commit Within</a>
</label>
<input type="text" id="commitWithin" value="1000" title="Commit Within (ms)">
<label for="overwrite">
<a rel="help">Overwrite</a>
</label>
<input type="text" id="overwrite" value="true" title="Overwrite">
</div>
</div>
</div>
<button type="submit" id="submit">Submit Document</button>
</form>
</div>
<div id="result">
<div id="response">
<!--<iframe src="about:blank"></iframe>-->
</div>
</div>
</div>

View File

@ -1,44 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="files" class="clearfix">
<div id="frame">
<div id="tree-holder">
<div id="tree" class="tree">#tree</div>
</div>
<div id="file-content" class="clearfix">
<div class="top clearfix">
<a id="url" class="address-bar" href="#"></a>
</div>
<div class="view-file">
<div class="response">Loading …</div>
</div>
</div>
</div>
</div>

View File

@ -1,250 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="index" class="clearfix">
<div class="clearfix">
<div class="index-left">
<div class="block" id="instance">
<h2><span>Instance</span></h2>
<div class="content">
<ul class="data">
<li class="start_time"><dl class="clearfix">
<dt><span>Start</span></dt>
<dd class="timeago"></dd>
</dl></li>
<li class="host"><dl class="clearfix">
<dt><span>Host</span></dt>
<dd></dd>
</dl></li>
<li class="dir dir_cwd"><dl class="clearfix">
<dt><span>CWD</span></dt>
<dd></dd>
</dl></li>
<li class="dir dir_instance"><dl class="clearfix">
<dt><span>Instance</span></dt>
<dd></dd>
</dl></li>
<li class="dir dir_data"><dl class="clearfix">
<dt><span>Data</span></dt>
<dd></dd>
</dl></li>
<li class="dir dir_index"><dl class="clearfix">
<dt><span>Index</span></dt>
<dd></dd>
</dl></li>
</ul>
</div>
</div>
<div class="block" id="versions">
<h2><span>Versions</span></h2>
<div class="content">
<ul class="data">
<li class="solr solr_spec_version"><dl class="clearfix">
<dt><span>solr-spec</span></dt>
<dd></dd>
</dl></li>
<li class="solr_impl_version"><dl class="clearfix">
<dt class=""><span>solr-impl</span></dt>
<dd></dd>
</dl></li>
<li class="lucene lucene_spec_version"><dl class="clearfix">
<dt><span>lucene-spec</span></dt>
<dd></dd>
</dl></li>
<li class="lucene_impl_version"><dl class="clearfix">
<dt><span>lucene-impl</span></dt>
<dd></dd>
</dl></li>
</ul>
</div>
</div>
</div>
<div class="index-right">
<div class="block" id="system">
<h2><span>System</span></h2>
<a class="reload"><span>reload</span></a>
<div class="content">
<div id="physical-memory-bar">
<p data-desc="physical-memory-bar">Physical Memory</p>
<div class="bar-holder">
<div class="bar-max bar">
<span class="bar-max val"></span>
<div class="bar-total bar">
<span class="bar-total val"></span>
</div>
</div>
</div>
</div>
<div id="swap-space-bar">
<p data-desc="swap-space-bar">Swap Space</p>
<div class="bar-holder">
<div class="bar-max bar">
<span class="bar-max val"></span>
<div class="bar-total bar">
<span class="bar-total val"></span>
</div>
</div>
</div>
</div>
<div id="file-descriptor-bar">
<p data-desc="file-descriptor-bar">File Descriptor Count</p>
<div class="bar-holder">
<div class="bar-max bar">
<span class="bar-max val"></span>
<div class="bar-total bar">
<span class="bar-total val"></span>
</div>
</div>
</div>
</div>
<p class="no-info">Sorry, no information available</p>
</div>
</div>
</div>
</div>
<div class="clearfix">
<div class="index-left">
<div class="block" id="jvm">
<h2><span>JVM</span></h2>
<div class="content clearfix">
<ul class="data">
<li class="jvm_version"><dl class="clearfix">
<dt><span>Runtime</span></dt>
<dd></dd>
</dl></li>
<li class="processors"><dl class="clearfix">
<dt><span>Processors</span></dt>
<dd></dd>
</dl></li>
<li class="command_line_args"><dl class="clearfix">
<dt><span>Args</span></dt>
<dd></dd>
</dl></li>
</ul>
</div>
</div>
</div>
<div class="index-right">
<div class="block" id="jvm-memory">
<h2><span data-desc="jvm-memory-bar">JVM-Memory</span></h2>
<div class="content">
<div id="jvm-memory-bar">
<div class="bar-holder">
<div class="bar-max bar">
<span class="bar-max val"></span>
<div class="bar-total bar">
<span class="bar-total val"></span>
<div class="bar-used bar">
<span class="bar-used val"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,23 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="logging" class="clearfix">
<div id="frame">
</div>
</div>

View File

@ -1,39 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="plugins" class="clearfix">
<div id="frame">
</div>
<div id="navigation" class="clearfix">
<ul>
</ul>
</div>
<div id="recording">
<div class="wrapper clearfix">
<p class="loader">Watching for Changes</p>
<button class="primary">Stop &amp; Show Changes</button>
</div>
</div>
</div>

View File

@ -1,361 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="query" class="clearfix">
<div id="form">
<form action="#" method="get">
<label for="qt">
<a rel="help">Request-Handler (qt)</a>
</label>
<input type="text" id="qt" value="/select" title="Request handler in solrconfig.xml.">
<fieldset class="common">
<legend>common</legend>
<div class="fieldset">
<label for="q">
q
</label>
<textarea name="q" id="q" title="The query string.">*:*</textarea>
<label for="fq">
<a rel="help">fq</a>
</label>
<div class="multiple">
<div class="row clearfix">
<input type="text" id="fq" name="fq" title="Filter query.">
<div class="buttons">
<a class="rem" data-action="0"><span>[-]</span></a>
<a class="add" data-action="1"><span>[+]</span></a>
</div>
</div>
</div>
<label for="sort">
<a rel="help">sort</a>
</label>
<input type="text" id="sort" name="sort" title="Sort field or function with asc|desc.">
<label for="start">
<a rel="help">start</a>,
<a rel="help">rows</a>
</label>
<div class="clearfix">
<input type="text" name="start" id="start" placeholder="0" pattern="[0-9]+" title="Number of leading documents to skip. (Integer)">
<input type="text" name="rows" id="rows" placeholder="10" pattern="[0-9]+" title="Number of documents to return after 'start'. (Integer)">
</div>
<label for="fl">
<a rel="help">fl</a>
</label>
<input type="text" name="fl" id="fl" value="" title="Field list, comma separated.">
<label for="df">
<a rel="help">df</a>
</label>
<input type="text" name="df" id="df" value="" title="Default search field">
<label for="custom_parameters">
<a rel="help">Raw Query Parameters</a>
</label>
<input type="text" id="custom_parameters" value="" placeholder="key1=val1&amp;key2=val2">
<label for="wt">
<a rel="help">wt</a>
</label>
<select name="wt" id="wt" title="The writer type (response format).">
<option>json</option>
<option>xml</option>
<option>python</option>
<option>ruby</option>
<option>php</option>
<option>csv</option>
</select>
<label for="indent" class="checkbox">
<input type="checkbox" name="indent" id="indent" value="true" title="Indent results." checked="checked">
<a rel="help">indent</a>
</label>
<label for="debugQuery" class="checkbox">
<input type="checkbox" name="debugQuery" id="debugQuery" value="true" title="Show timing and diagnostics.">
<a rel="help">debugQuery</a>
</label>
</div>
</fieldset>
<fieldset class="dismax optional">
<legend>
<label for="dismax" class="checkbox">
<input type="checkbox" name="defType" id="dismax" value="dismax">
dismax
</label>
</legend>
<div class="fieldset">
<label for="q_alt">q.alt</label>
<input type="text" name="q.alt" id="q_alt" title="Alternate query when 'q' is absent.">
<label for="qf">qf</label>
<input type="text" name="qf" id="qf" title="Query fields with optional boosts.">
<label for="mm">mm</label>
<input type="text" name="mm" id="mm" title="Min-should-match expression.">
<label for="pf">pf</label>
<input type="text" name="pf" id="pf" title="Phrase boosted fields.">
<label for="ps">ps</label>
<input type="text" name="ps" id="ps" title="Phrase boost slop.">
<label for="qs">qs</label>
<input type="text" name="qs" id="qs" title="Query string phrase slop.">
<label for="tie">tie</label>
<input type="text" name="tie" id="tie" title="Score tie-breaker. Try 0.1.">
<label for="bq">bq</label>
<input type="text" name="bq" id="bq" title="Boost query.">
<label for="bf">bf</label>
<input type="text" name="bf" id="bf" title="Boost function (added).">
</div>
</fieldset>
<fieldset class="edismax optional">
<legend>
<label for="edismax" class="checkbox">
<input type="checkbox" name="defType" id="edismax" value="edismax">
<strong>e</strong>dismax
</label>
</legend>
<div class="fieldset">
<label for="edismax_q_alt">q.alt</label>
<input type="text" name="q.alt" id="edismax_q_alt" title="Alternate query when 'q' is absent.">
<label for="edismax_qf">qf</label>
<input type="text" name="qf" id="edismax_qf" title="Query fields with optional boosts.">
<label for="edismax_mm">mm</label>
<input type="text" name="mm" id="edismax_mm" title="Min-should-match expression.">
<label for="edismax_pf">pf</label>
<input type="text" name="pf" id="edismax_pf" title="Phrase boosted fields.">
<label for="edismax_ps">ps</label>
<input type="text" name="ps" id="edismax_ps" title="Phrase boost slop.">
<label for="edismax_qs">qs</label>
<input type="text" name="qs" id="edismax_qs" title="Query string phrase slop.">
<label for="edismax_tie">tie</label>
<input type="text" name="tie" id="edismax_tie" title="Score tie-breaker. Try 0.1.">
<label for="edismax_bq">bq</label>
<input type="text" name="bq" id="edismax_bq" title="Boost query.">
<label for="edismax_bf">bf</label>
<input type="text" name="bf" id="edismax_bf" title="Boost function (added).">
<label for="edismax_uf" title="User Fields">uf</label>
<input type="text" name="uf" id="edismax_uf">
<label for="edismax_pf2" title="bigram phrase boost fields">pf2</label>
<input type="text" name="pf2" id="edismax_pf2">
<label for="edismax_pf3" title="trigram phrase boost fields">pf3</label>
<input type="text" name="pf3" id="edismax_pf3">
<label for="edismax_ps2" title="phrase slop for bigram phrases">ps2</label>
<input type="text" name="ps2" id="edismax_ps2">
<label for="edismax_ps3" title="phrase slop for trigram phrases">ps3</label>
<input type="text" name="ps3" id="edismax_ps3">
<label for="edismax_boost" title="multiplicative boost function">boost</label>
<input type="text" name="boost" id="edismax_boost">
<label for="edismax_stopwords" class="checkbox" title="remove stopwords from mandatory 'matching' component">
<input type="checkbox" name="stopwords" id="edismax_stopwords" value="true" checked="checked">
stopwords
</label>
<label for="edismax_lowercaseOperators" class="checkbox" title="Enable lower-case 'and' and 'or' as operators">
<input type="checkbox" name="lowercaseOperators" id="edismax_lowercaseOperators" value="true" checked="checked">
lowercaseOperators
</label>
</div>
</fieldset>
<fieldset class="hl optional">
<legend>
<label for="hl" class="checkbox">
<input type="checkbox" name="hl" id="hl" value="true" title="Enable highlighting.">
hl
</label>
</legend>
<div class="fieldset">
<label for="hl_fl">hl.fl</label>
<input type="text" name="hl.fl" id="hl_fl" value="" title="Fields to highlight on.">
<label for="hl_simple_pre">hl.simple.pre</label>
<input type="text" name="hl.simple.pre" id="hl_simple_pre" value="<em>">
<label for="hl_simple_post">hl.simple.post</label>
<input type="text" name="hl.simple.post" id="hl_simple_post" value="</em>">
<label for="hl_requireFieldMatch" class="checkbox">
<input type="checkbox" name="hl.requireFieldMatch" id="hl_requireFieldMatch" value="true">
hl.requireFieldMatch
</label>
<label for="hl_usePhraseHighlighter" class="checkbox">
<input type="checkbox" name="hl.usePhraseHighlighter" id="hl_usePhraseHighlighter" value="true">
hl.usePhraseHighlighter
</label>
<label for="hl_highlightMultiTerm" class="checkbox">
<input type="checkbox" name="hl.highlightMultiTerm" id="hl_highlightMultiTerm" value="true">
hl.highlightMultiTerm
</label>
</div>
</fieldset>
<fieldset class="facet optional">
<legend>
<label for="facet" class="checkbox">
<input type="checkbox" name="facet" id="facet" value="true">
facet
</label>
</legend>
<div class="fieldset">
<label for="facet_query">facet.query</label>
<textarea name="facet.query" id="facet_query"></textarea>
<label for="facet_field">facet.field</label>
<input type="text" name="facet.field" id="facet_field">
<label for="facet_prefix">facet.prefix</label>
<input type="text" name="facet.prefix" id="facet_prefix">
</div>
</fieldset>
<fieldset class="spatial optional">
<legend>
<label for="spatial" class="checkbox">
<input type="checkbox" name="spatial" id="spatial" value="true">
spatial
</label>
</legend>
<div class="fieldset">
<label for="pt">pt</label>
<input type="text" name="pt" id="pt">
<label for="sfield">sfield</label>
<input type="text" name="sfield" id="sfield">
<label for="d">d</label>
<input type="text" name="d" id="d">
</div>
</fieldset>
<fieldset class="spellcheck optional">
<legend>
<label for="spellcheck" class="checkbox">
<input type="checkbox" name="spellcheck" id="spellcheck" value="true">
spellcheck
</label>
</legend>
<div class="fieldset">
<label for="spellcheck_build" class="checkbox">
<input type="checkbox" name="spellcheck.build" id="spellcheck_build" value="true">
spellcheck.build
</label>
<label for="spellcheck_reload" class="checkbox">
<input type="checkbox" name="spellcheck.reload" id="spellcheck_reload" value="true">
spellcheck.reload
</label>
<label for="spellcheck_q">spellcheck.q</label>
<input type="text" name="spellcheck.q" id="spellcheck_q">
<label for="spellcheck_dictionary">spellcheck.dictionary</label>
<input type="text" name="spellcheck.dictionary" id="spellcheck_dictionary">
<label for="spellcheck_count">spellcheck.count</label>
<input type="text" name="spellcheck.count" id="spellcheck_count">
<label for="spellcheck_onlyMorePopular" class="checkbox">
<input type="checkbox" name="spellcheck.onlyMorePopular" id="spellcheck_onlyMorePopular" value="true">
spellcheck.onlyMorePopular
</label>
<label for="spellcheck_extendedResults" class="checkbox">
<input type="checkbox" name="spellcheck.extendedResults" id="spellcheck_extendedResults" value="true">
spellcheck.extendedResults
</label>
<label for="spellcheck_collate" class="checkbox">
<input type="checkbox" name="spellcheck.collate" id="spellcheck_collate" value="true">
spellcheck.collate
</label>
<label for="spellcheck_maxCollations">spellcheck.maxCollations</label>
<input type="text" name="spellcheck.maxCollations" id="spellcheck_maxCollations">
<label for="spellcheck_maxCollationTries">spellcheck.maxCollationTries</label>
<input type="text" name="spellcheck.maxCollationTries" id="spellcheck_maxCollationTries">
<label for="spellcheck_accuracy">spellcheck.accuracy</label>
<input type="text" name="spellcheck.accuracy" id="spellcheck_accuracy">
</fieldset>
<button type="submit">Execute Query</button>
</form>
</div>
<div id="result">
<a id="url" class="address-bar" href="#"></a>
<div id="response">
<iframe src="about:blank"></iframe>
</div>
</div>
</div>

View File

@ -1,216 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="replication" class="clearfix">
<div id="frame">
<div id="error"></div>
<div class="replicating block">
<div id="progress">
<div id="start"><div class="info">
<span>Wed May 11 19:41:48 UTC 2011</span>
</div></div>
<div id="speed"><div class="info">
<span>5.1 MB</span>/s
</div></div>
<div id="bar">
<div id="bar-info"><div class="info">
<div class="files"><span>24</span> Files</div>
<div class="size"><span>226.85 MB</span></div>
</div></div>
<div id="eta"><div class="info">
ETA: <span>25s</span>
</div></div>
<div id="done" style="width: 20.0%;">
<div class="percent">
<span>20</span>%
</div>
<div id="done-info"><div class="info">
<div class="files"><span>2</span> Files</div>
<div class="size"><span>91.76 MB</span></div>
</div></div>
</div>
</div>
</div>
<div id="current-file" class="clearfix">
<div class="label"><span class="loader">Current File:</span></div>
<div class="file">_a.fdt</div>
<div class="progress">
<span class="done">84 MB</span> / <span class="total">102.98 MB</span> [<span class="percent">81</span>%]
</div>
</div>
</div>
<div id="iterations" class="slaveOnly block clearfix">
<div class="label"><span class="">Iterations:</span></div>
<div class="iterations">
<ul>
</ul>
<a>
<span class="expand">Show all Iterations</span>
<span class="collapse">Hide past Iterations</span>
</a>
</div>
</div>
<div id="details" class="block clearfix">
<table border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td><span>Index</span></td>
<th>Version</th>
<th><abbr title="Generation">Gen</abbr></th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr class="masterSearch">
<th>Master (Searching)</th>
<td class="version"><div></div></td>
<td class="generation"><div></div></td>
<td class="size"><div></div></td>
</tr>
<tr class="master">
<th>Master (Replicable)</th>
<td class="version"><div></div></td>
<td class="generation"><div></div></td>
<td class="size"><div></div></td>
</tr>
<tr class="slave slaveOnly">
<th>Slave (Searching)</th>
<td class="version"><div></div></td>
<td class="generation"><div></div></td>
<td class="size"><div></div></td>
</tr>
</tbody>
</table>
</div>
<div id="settings" class="settings block clearfix slaveOnly">
<div class="label"><span>Settings:</span></div>
<ul>
<li class="masterUrl"><dl class="clearfix">
<dt>master url:</dt>
<dd></dd>
</dl></li>
<li class="isPollingDisabled"><dl class="clearfix">
<dt>polling enable:</dt>
<dd class="ico">&nbsp;</dd>
</dl></li>
</ul>
</div>
<div id="master-settings" class="settings block clearfix">
<div class="label"><span>Settings (Master):</span></div>
<ul>
<li class="replicationEnabled"><dl class="clearfix">
<dt>replication enable:</dt>
<dd class="ico">&nbsp;</dd>
</dl></li>
<li class="replicateAfter"><dl class="clearfix">
<dt>replicateAfter:</dt>
<dd></dd>
</dl></li>
<li class="confFiles"><dl class="clearfix">
<dt>confFiles:</dt>
<dd></dd>
</dl></li>
</ul>
</div>
</div>
<div id="navigation">
<div class="timer">
<p>Next Run: <span class="approx">~</span><span class="tick">15m 8s</span></p>
<small>Sat Mar 03 11:00:00 CET 2012</smalL>
</div>
<button class="refresh-status"><span>Refresh Status</span></button>
<div class="slaveOnly">
<button class="optional replicate-now primary" data-command="fetchindex"><span>Replicate now</span></button>
<button class="optional abort-replication warn" data-command="abortfetch"><span>Abort Replication</span></button>
<button class="optional disable-polling" data-command="disablepoll"><span>Disable Polling</span></button>
<button class="optional enable-polling" data-command="enablepoll"><span>Enable Polling</span></button>
</div>
<div class="masterOnly">
<button class="optional disable-replication warn" data-command="disablereplication"><span>Disable Replication<span></button>
<button class="optional enable-replication warn" data-command="enablereplication"><span>Enable Replication<span></button>
</div>
</div>
</div>

View File

@ -1,192 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="schema-browser" class="loaded">
<div class="clearfix">
<div id="data">
<div id="field">
<div class="field-options">
<div class="block head">
<h2>
<span class="type"></span>:
<span class="name"></span>
</h2>
</div>
<div class="partial">
<p>Because your Index is empty, we have not enough Information about this Field</p>
</div>
<dl class="options clearfix">
<dt class="field-type">Field-Type:</dt>
<dt class="similarity">Similarity:</dt>
<dt class="position-increment-gap"><abbr title="Position Increment Gap">PI Gap</abbr>:</dt>
<dt class="docs">Docs:</dt>
<dt class="distinct">Distinct:</dt>
</dl>
<table class="flags" cellspacing="0" cellpadding="0" border="0">
<thead>
<tr>
<td>Flags:</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
<ul class="analyzer">
<li class="clearfix index">
<p><a><span>Index&nbsp;Analyzer:</span></a></p>
<dl>
<dt><a class="toggle"></a></dt>
</dl>
<ul>
<li class="clearfix charFilters">
<p>Char Filters:</p>
<dl>
</dl>
</li>
<li class="clearfix tokenizer">
<p>Tokenizer:</p>
<dl>
</dl>
</li>
<li class="clearfix filters">
<p>Token Filters:</p>
<dl>
</dl>
</li>
</ul>
</li>
<li class="clearfix query">
<p><a><span>Query&nbsp;Analyzer:</span></a></p>
<dl>
<dt><a class="toggle"></a></dt>
</dl>
<ul>
<li class="clearfix charFilters">
<p>Char Filters:</p>
<dl>
</dl>
</li>
<li class="clearfix tokenizer">
<p>Tokenizer:</p>
<dl>
</dl>
</li>
<li class="clearfix filters">
<p>Token Filters:</p>
<dl>
</dl>
</li>
</ul>
</li>
</ul>
</div>
<div class="terminfo-holder clearfix">
<div class="trigger">
<button class="submit"><span>Load Term Info</span></button>
<a class="autoload" title="Automatically load Term Info?"><span>Autoload</span></a>
</div>
<p class="status">Sorry, no Term Info available :(</p>
<div class="topterms-holder">
<form>
<p class="head">
<input type="text">
<a class="max-holder" title="Load all Top-Terms">/<span class="max"></span></a> Top-Terms:
<a id="query_link" href="#"><span>Query</span>&nbsp;</a>
</p>
</form>
<ul>
</ul>
</div>
<div class="histogram-holder">
<p class="head">Histogram:</p>
<ul></ul>
</div>
</div>
</div>
</div>
<div id="related">
<select>
<option value="" selected="selected">Please select ...</option>
</select>
<dl id="f-df-t">
</dl>
<dl class="ukf-dsf">
<dt class="unique-key-field">Unique Key Field</dt>
<dt class="default-search-field">Default Search Field</dt>
</dl>
</div>
</div>
</div>

View File

@ -1,49 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="segments">
<div class="clearfix">
<div class="block fieldlist" id="statistics">
<h2><span>Segments</span></h2>
<a class="reload"><span>reload</span></a>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<div id="result">
<div id="response">
<div class="segments-holder">
<ul></ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,56 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
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.
-->
<div id="threads" class="collapsed">
<div class="controls">
<a>
<span class="expand">Show all Stacktraces</span>
<span class="collapse">Hide all Stacktraces</span>
</a>
</div>
<div id="thread-dump">
<table border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">name</th>
<th class="time">cpuTime / userTime</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="controls">
<a>
<span class="expand">Show all Stacktraces</span>
<span class="collapse">Hide all Stacktraces</span>
</a>
</div>
</div>