SOLR-3238: UI Improvments

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1303326 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Matheis 2012-03-21 09:36:59 +00:00
parent f75d40dad5
commit a98decea1d
37 changed files with 12163 additions and 1154 deletions

View File

@ -38,6 +38,7 @@ limitations under the License.
<link rel="stylesheet" type="text/css" href="css/styles/replication.css">
<link rel="stylesheet" type="text/css" href="css/styles/schema-browser.css">
<link rel="stylesheet" type="text/css" href="css/styles/threads.css">
<link rel="stylesheet" type="text/css" href="css/chosen.css">
<script type="text/javascript">
@ -79,17 +80,18 @@ limitations under the License.
</div>
<div id="menu-wrapper">
<div id="menu">
<div>
<ul>
<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></li>
<li id="cloud" class="global optional"><p><a href="#/cloud">Cloud</a></p></li>
<li id="cores" class="global optional"><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>
<li id="logging" class="global"><p><a href="#/~logging">Logging</a></p></li>
<li id="cloud" class="global optional"><p><a href="#/~cloud">Cloud</a></p></li>
<li id="cores" class="global optional"><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>
<ul id="menu-selector">
</ul>
</div>

392
solr/webapp/web/css/chosen.css Executable file
View File

@ -0,0 +1,392 @@
/* @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,15 +0,0 @@
@import url( styles/common.css );
@import url( styles/analysis.css );
@import url( styles/cloud.css );
@import url( styles/cores.css );
@import url( styles/dashboard.css );
@import url( styles/dataimport.css );
@import url( styles/index.css );
@import url( styles/java-properties.css );
@import url( styles/logging.css );
@import url( styles/menu.css );
@import url( styles/plugins.css );
@import url( styles/query.css );
@import url( styles/replication.css );
@import url( styles/schema-browser.css );
@import url( styles/threads.css );

View File

@ -47,7 +47,7 @@
padding-left: 10px;
}
#content #analysis .settings div
#content #analysis .settings .buttons
{
float: right;
width: 47%;
@ -266,4 +266,4 @@
}
#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 ); }
#content #analysis .analysis-result h2 { background-image: url( ../../img/ico/receipt-invoice.png ); }

View File

@ -1,3 +1,38 @@
#content #cloud
{
position: relative;
}
#content #cloud #navigation
{
width: 10%;
}
#content #cloud #navigation .tree a { background-image: url( ../../img/ico/folder-tree.png ); }
#content #cloud #navigation .graph a { background-image: url( ../../img/ico/molecule.png ); }
#content #cloud #navigation .dump a { background-image: url( ../../img/ico/download-cloud.png ); }
#content #cloud #navigation .dump
{
margin-top: 10px;
}
#content #cloud #navigation .dump a:hover
{
color: #008;
}
#content #cloud #frame
{
float: right;
width: 89%;
}
#content #cloud #frame .content
{
display: none;
}
#content #cloud .loader
{
background-position: 0 50%;
@ -16,44 +51,17 @@
padding-left: 35px;
}
#content #cloud h2 { background-image: url( ../../img/ico/sitemap.png ); }
#content #cloud
{
position: relative;
}
#content #cloud a.debug
{
background-color: #c0c0c0;
background-image: url( ../../img/ico/exclamation-button.png );
background-position: 5px 50%;
border-radius: 5px;
display: block;
padding: 2px 5px;
padding-left: 26px;
position: absolute;
left: 150px;
top: 3px;
}
#content #cloud a.debug:hover
{
background-color: #fff;
color: #00f;
}
#content #cloud #debug
{
background-color: #fff;
box-shadow: 5px 5px 10px #c0c0c0;
-moz-box-shadow: 5px 5px 10px #c0c0c0;
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
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: 50px;
top: 10px;
}
#content #cloud #debug ul
@ -64,6 +72,7 @@
#content #cloud #debug ul a
{
background-position: 4px 50%;
border-right: 0;
display: block;
padding: 2px 4px;
padding-left: 25px;
@ -113,7 +122,7 @@
#content #cloud #debug .debug
{
border: 1px solid #f0f0f0;
max-height: 400px;
max-height: 350px;
overflow: auto;
padding: 5px;
width: 500px;
@ -238,4 +247,19 @@
{
background-color: #f0f0f0;
color: #00f;
}
#content #graph-content .node circle
{
fill: #f0f0f0;
stroke: #c0c0c0;
stroke-width: 1.5px;
}
#content #graph-content .link
{
fill: none;
stroke: #c0c0c0;
stroke-width: 1.5px;
}

View File

@ -80,7 +80,7 @@ ul
background-image: url( ../../img/solr.png );
display: block;
height: 78px;
width: 200px;
width: 150px;
}
#header #solr span
@ -113,8 +113,6 @@ ul
#main
{
border: 1px solid #c0c0c0;
min-height: 600px;
min-width: 750px;
position: relative;
}
@ -213,8 +211,9 @@ ul
#content-wrapper
{
float: right;
width: 80%;
margin-left: 150px;
border: 1px solid #c0c0c0;
min-height: 500px;
}
#content

View File

@ -111,4 +111,4 @@
#content #dashboard #replication.is-master h2 { background-image: url( ../../img/ico/node-master.png ); }
#content #dashboard #replication.is-slave h2 { background-image: url( ../../img/ico/node-slave.png ); }
#content #dashboard #dataimport h2 { background-image: url( ../../img/ico/document-import.png ); }
#content #dashboard #admin-extra h2 { background-image: url( ../../img/ico/plus-button.png ); }
#content #dashboard #admin-extra h2 { background-image: url( ../../img/ico/plus-button.png ); }

View File

@ -17,6 +17,29 @@
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/document-import.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;
@ -37,6 +60,17 @@
width: 100%;
}
#content #dataimport #form button
{
margin-top: 10px;
}
#content #dataimport #form button.loader
{
background-position: 2px 50%;
padding-left: 23px;
}
#content #dataimport #form #start
{
float: left;
@ -55,50 +89,6 @@
width: auto;
}
#content #dataimport #form fieldset,
#content #dataimport #form .optional.expanded
{
border: 1px solid #fff;
border-top: 1px solid #c0c0c0;
margin-bottom: 10px;
}
#content #dataimport #form fieldset legend,
#content #dataimport #form .optional.expanded legend
{
display: block;
margin-left: 10px;
padding: 0px 5px;
}
#content #dataimport #form fieldset legend label
{
margin-top: 0;
}
#content #dataimport #form .handler
{
display: none;
}
#content #dataimport #form .handler ul
{
list-style: disc;
margin-left: 0.7em;
padding-left: 0.7em;
}
#content #dataimport #form .handler ul li a
{
color: #c0c0c0;
display: block;
}
#content #dataimport #form .handler ul li.active a
{
color: #333;
}
#content #dataimport #current_state
{
display: none;

View File

@ -4,36 +4,32 @@
padding-left: 21px;
}
#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; }
#content #logging .jstree a
{
color: #c0c0c0;
height: 17px;
line-height: 17px;
padding: 0;
width: 90%;
}
#content #logging .jstree a.set
{
color: #333;
}
#content #logging .jstree a.null
{
color: #f0f0f0;
}
#content #logging .jstree a:hover,
#content #logging .jstree a.open
{
background-color: #f0f0f0;
}
#content #logging .jstree a:hover
{
color: #008;
@ -81,10 +77,11 @@
#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 .selector
{
border: 1px solid #fff;
border: 1px solid transparent;
position: relative;
}

View File

@ -1,7 +1,39 @@
#menu-wrapper
{
float: left;
width: 20%;
position: absolute;
top: 0;
width: 150px;
}
#menu-wrapper a
{
display: block;
padding: 4px 2px;
}
#menu-wrapper .active p
{
background-color: #fafafa;
border-color: #c0c0c0;
}
#menu-wrapper p 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
@ -12,37 +44,6 @@
padding-left: 26px;
}
#menu a
{
display: block;
padding: 4px 2px;
}
#menu .active
{
background-color: #fafafa;
}
#menu p a
{
background-position: 97% 50%;
background-image: url( ../../img/ico/status-offline.png );
padding-left: 5px;
padding-top: 5px;
padding-bottom: 5px;
}
#menu p a:hover
{
background-color: #f0f0f0;
}
#menu .active p a
{
background-color: #c0c0c0; /* #a5a5a6 */
font-weight: bold;
}
#menu p a small
{
color: #b5b5b5;
@ -99,12 +100,12 @@
#menu li
{
border-bottom: 1px solid #c0c0c0;
border-bottom: 1px solid #f0f0f0;
}
#menu li p
#menu li:last-child
{
border-right: 1px solid #c0c0c0;
border-bottom: 0;
}
#menu li.optional
@ -112,39 +113,44 @@
display: none;
}
#menu li.active:last-child
#menu-selector
{
border-bottom: 0;
margin-top: 20px;
}
#menu ul ul
#menu-selector p
{
border-top: 1px solid #f0f0f0;
}
#menu-selector li:first-child p
{
border-top: 0;
}
#menu-selector p a
{
background-image: url( ../../img/ico/status-offline.png );
}
#menu-selector .active p a
{
background-image: url( ../../img/ico/box.png );
}
#menu-selector ul
{
background-image: url( ../../img/div.gif );
background-position: 100% 0;
background-repeat: repeat-y;
display: none;
padding-top: 5px;
padding-bottom: 10px;
}
#menu ul .active ul
#menu-selector .active ul
{
display: block;
}
#menu ul li.active:last-child ul
{
border-bottom: 1px solid #f0f0f0;
}
#menu ul ul li
{
border-bottom: 0;
/*border-right: 0;*/
border-right: 1px solid #f0f0f0;
}
#menu ul ul li a
#menu-selector ul li a
{
background-position: 7px 50%;
border-bottom: 1px solid #f0f0f0;
@ -153,90 +159,84 @@
padding-left: 26px;
}
#menu ul ul li:last-child a
#menu-selector ul li:last-child a
{
border-bottom: 0;
}
#menu ul ul li a:hover
#menu-selector ul li a:hover
{
background-color: #f0f0f0;
color: #333;
}
#menu ul ul li.active
{
background-color: #fff;
border-right-color: #fff;
}
#menu ul ul li.active a
#menu-selector ul li.active a
{
background-color: #d0d0d0;
border-color: #d0d0d0;
color: #333;
}
#menu ul ul li.active a:hover
#menu #index p a { background-image: url( ../../img/ico/dashboard.png ); }
#menu #logging p a { background-image: url( ../../img/ico/inbox-document-text.png ); }
#menu #java-properties p a { background-image: url( ../../img/ico/jar.png ); }
#menu #threads p a { background-image: url( ../../img/ico/ui-accordion.png ); }
#menu #cores p a { background-image: url( ../../img/ico/databases.png ); }
#menu #cloud p a { background-image: url( ../../img/ico/network-cloud.png ); }
#menu-selector .ping.error a
{
background-color: transparent;
background-color: #ffcccc;
background-image: url( ../../img/ico/system-monitor--exclamation.png );
border-color: #ffcccc;
cursor: help;
}
#menu .global p a
#menu-selector .query a { background-image: url( ../../img/ico/magnifier.png ); }
#menu-selector .schema a { background-image: url( ../../img/ico/table.png ); }
#menu-selector .config a { background-image: url( ../../img/ico/gear.png ); }
#menu-selector .analysis a { background-image: url( ../../img/ico/funnel.png ); }
#menu-selector .schema-browser a { background-image: url( ../../img/ico/book-open-text.png ); }
#menu-selector .replication a { background-image: url( ../../img/ico/node.png ); }
#menu-selector .distribution a { background-image: url( ../../img/ico/node-select.png ); }
#menu-selector .ping a { background-image: url( ../../img/ico/system-monitor.png ); }
#menu-selector .logging a { background-image: url( ../../img/ico/inbox-document-text.png ); }
#menu-selector .plugins a { background-image: url( ../../img/ico/block.png ); }
#menu-selector .dataimport a { background-image: url( ../../img/ico/document-import.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;
}
#menu #index p a
#content #navigation a:hover
{
background-image: url( ../../img/ico/dashboard.png );
background-color: #f0f0f0;
}
#menu #logging p a
#content #navigation .current a
{
background-image: url( ../../img/ico/inbox-document-text.png );
}
#menu #java-properties p a
{
background-image: url( ../../img/ico/jar.png );
}
#menu #threads p a
{
background-image: url( ../../img/ico/ui-accordion.png );
}
#menu #cores p a
{
background-image: url( ../../img/ico/databases.png );
}
#menu #cloud p a
{
background-image: url( ../../img/ico/network-cloud.png );
}
#menu .query a { background-image: url( ../../img/ico/magnifier.png ); }
#menu .schema a { background-image: url( ../../img/ico/table.png ); }
#menu .config a { background-image: url( ../../img/ico/gear.png ); }
#menu .analysis a { background-image: url( ../../img/ico/funnel.png ); }
#menu .schema-browser a { background-image: url( ../../img/ico/book-open-text.png ); }
#menu .replication a { background-image: url( ../../img/ico/node.png ); }
#menu .distribution a { background-image: url( ../../img/ico/node-select.png ); }
#menu .ping a { background-image: url( ../../img/ico/system-monitor.png ); }
#menu .logging a { background-image: url( ../../img/ico/inbox-document-text.png ); }
#menu .plugins a { background-image: url( ../../img/ico/block.png ); }
#menu .dataimport a { background-image: url( ../../img/ico/document-import.png ); }
#menu .ping.error
{
background-color: #f7f7e9;
background-color: #ffcccc;
}
#menu .ping.error a
{
background-color: transparent;
background-image: url( ../../img/ico/system-monitor--exclamation.png );
cursor: help;
background-color: #e0e0e0;
font-weight: bold;
}

View File

@ -1,42 +1,15 @@
#content #plugins #navigation
{
background-image: url( ../../img/div.gif );
background-position: 100% 0;
background-repeat: repeat-y;
width: 20%;
}
#content #plugins #navigation a
{
background-position: 0 50%;
border-right: 1px solid #f0f0f0;
display: block;
margin-left: 1px;
padding: 3px 0;
padding-left: 21px;
}
#content #plugins #navigation .cache a { background-image: url( ../../img/ico/disk-black.png ); }
#content #plugins #navigation .core a { background-image: url( ../../img/ico/toolbox.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 a:hover
{
background-color: #fafafa;
}
#content #plugins #navigation .current a
{
background-color: #fff;
border-right-color: #fff;
border-top: 1px solid #f0f0f0;
border-bottom: 1px solid #f0f0f0;
font-weight: bold;
}
#content #plugins #frame
{
float: right;
@ -74,9 +47,11 @@
#content #plugins #frame .entry ul
{
border-left: 9px solid #f0f3ff;
display: none;
margin-left: 3px;
padding-top: 5px;
margin-left: 21px;
padding-left: 10px;
}
#content #plugins #frame .entry li
@ -113,6 +88,7 @@
#content #plugins #frame .entry .stats ul
{
border-left: 0;
margin: 0;
padding: 0;
}

View File

@ -49,7 +49,7 @@
{
border: 1px solid #fff;
border-top: 1px solid #c0c0c0;
margin-bottom: 10px;
margin-bottom: 5px;
}
#content #query #form fieldset legend,
@ -69,7 +69,7 @@
{
border-bottom: 1px solid #f0f0f0;
margin-bottom: 5px;
padding-bottom: 5px;
padding-bottom: 10px;
}
#content #query #form .optional
@ -129,4 +129,4 @@
#content #query #result #response
{
}
}

View File

@ -13,6 +13,7 @@
#content #replication #navigation
{
border-right: 0;
float: left;
width: 20%;
}

View File

@ -371,12 +371,18 @@
background-color: #f0f0f0;
}
#content #schema-browser .topterms-holder li li span
#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
{
border-left: 1px solid #f0f0f0;

View File

@ -14,13 +14,11 @@
#content #threads #thread-dump tbody .state
{
background-color: #fff;
border: 0;
}
#content #threads #thread-dump table th,
#content #threads #thread-dump table td
{
border: 1px solid #c0c0c0;
padding: 5px 3px;
vertical-align: top;
}
@ -65,18 +63,6 @@
background-image: url( ../../img/ico/hourglass--exclamation.png );
}
#content #threads #thread-dump thead th:first-child,
#content #threads #thread-dump tbody td:first-child
{
border-left: 0;
}
#content #threads #thread-dump thead th:last-child,
#content #threads #thread-dump tbody td:last-child
{
border-right: 0;
}
#content #threads #thread-dump tbody .name a
{
background-position: 0 50%;

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

953
solr/webapp/web/js/lib/chosen.js Executable file
View File

@ -0,0 +1,953 @@
// 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);

9342
solr/webapp/web/js/lib/d3.js vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -28,12 +28,15 @@ require
'lib/order!lib/jquery.timeago',
'lib/order!lib/highlight',
'lib/order!lib/ZeroClipboard',
'lib/order!lib/d3',
'lib/order!lib/chosen',
'lib/order!scripts/app',
'lib/order!scripts/analysis',
'lib/order!scripts/cloud',
'lib/order!scripts/cores',
'lib/order!scripts/dataimport',
'lib/order!scripts/dashboard',
'lib/order!scripts/file',
'lib/order!scripts/index',
'lib/order!scripts/java-properties',
@ -43,9 +46,7 @@ require
'lib/order!scripts/query',
'lib/order!scripts/replication',
'lib/order!scripts/schema-browser',
'lib/order!scripts/threads',
'lib/order!scripts/dashboard'
'lib/order!scripts/threads'
],
function( $ )
{

View File

@ -88,6 +88,9 @@ sammy.get
$( 'option[value="fieldname\=' + response.schema.defaultSearchField + '"]', this )
.attr( 'selected', 'selected' );
this
.chosen();
},
error : function( xhr, text_status, error_thrown)
{
@ -261,7 +264,24 @@ sammy.get
{
analysis_data[type][i+1] = [{ 'text': analysis_data[type][i+1] }]
}
global_elements_count = Math.max( global_elements_count, analysis_data[type][i+1].length );
var tmp = {};
var cols = analysis_data[type][i+1].filter
(
function( obj )
{
var obj_position = obj.position || 0;
if( !tmp[obj_position] )
{
tmp[obj_position] = true;
return true;
}
return false;
}
);
global_elements_count = Math.max( global_elements_count, cols.length );
}
var content = '<div class="' + type + '">' + "\n";

View File

@ -66,6 +66,15 @@ var sammy = $.sammy
}
}
);
this.bind
(
'error',
function( message, original_error )
{
alert( original_error.message );
}
);
// activate_core
this.before
@ -73,22 +82,21 @@ var sammy = $.sammy
{},
function( context )
{
$( 'li[id].active', app.menu_element )
var menu_wrapper = $( '#menu-wrapper' );
$( 'li[id].active', menu_wrapper )
.removeClass( 'active' );
$( 'ul li.active', app.menu_element )
$( 'li.active', menu_wrapper )
.removeClass( 'active' );
if( this.params.splat )
{
var active_element = $( '#' + this.params.splat[0], app.menu_element );
var active_element = $( '#' + this.params.splat[0], menu_wrapper );
if( 0 === active_element.size() )
{
var first_core = $( 'li[data-basepath]', app.menu_element ).attr( 'id' );
var first_core_url = context.path.replace( new RegExp( '/' + this.params.splat[0] + '/' ), '/' + first_core + '/' );
context.redirect( first_core_url );
this.app.error( 'There exists no core with name "' + this.params.splat[0] + '"' );
return false;
}
@ -129,7 +137,7 @@ var solr_admin = function( app_config )
plugin_data = null,
this.menu_element = $( '#menu ul' );
this.menu_element = $( '#menu-selector' );
this.config = config;
this.run = function()
@ -147,7 +155,9 @@ var solr_admin = function( app_config )
success : function( response )
{
self.cores_data = response.status;
is_multicore = 'undefined' === typeof response.status[''];
var core_count = 0; for( var i in response.status ) { core_count++; }
is_multicore = core_count > 1;
if( is_multicore )
{
@ -305,4 +315,4 @@ var solr_admin = function( app_config )
};
var app = new solr_admin( app_config );
var app = new solr_admin( app_config );

View File

@ -15,13 +15,486 @@
limitations under the License.
*/
// #/cloud
var core_basepath = null;
var init_debug = function( cloud_element )
{
var debug_element = $( '#debug', cloud_element );
var debug_button = $( '.dump a', cloud_element );
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_button.hide();
debug_element.show();
$.ajax
(
{
url : core_basepath + '/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_button.show();
debug_element.hide();
}
);
};
var generate_graph = function( graph_element, graph_data )
{
var w = 900,
h = 300;
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", "link")
.attr("d", diagonal);
var node = vis.selectAll("g.node")
.data(nodes)
.enter().append("g")
.attr("class", "node")
.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 d.children ? -8 : 8; })
.attr("dy", 3)
.attr("text-anchor", function(d) { return d.children ? "end" : "start"; })
.text(function(d) { return d.name; });
/*
var r = 860 / 2;
var tree = d3.layout.tree()
.size([360, r - 120])
.separation(function(a, b) { return (a.parent == b.parent ? 1 : 2) / a.depth; });
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 - 150)
.append("g")
.attr("transform", "translate(" + r + "," + r + ")");
var nodes = tree.nodes(graph_data);
var link = vis.selectAll("path.link")
.data(tree.links(nodes))
.enter().append("path")
.attr("class", "link")
.attr("d", diagonal);
var node = vis.selectAll("g.node")
.data(nodes)
.enter().append("g")
.attr("class", "node")
.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)"; })
.text(function(d) { return d.name; });
//*/
};
var init_graph = function( graph_element )
{
$.ajax
(
{
url : core_basepath + '/zookeeper?wt=json&detail=true&path=%2Fclusterstate.json',
dataType : 'json',
context : graph_element,
beforeSend : function( xhr, settings )
{
this
.show();
},
success : function( response, text_status, xhr )
{
var state = null;
eval( 'state = ' + response.znode.data + ';' );
var collections = [];
for( var c in state )
{
var shards = [];
for( var s in state[c] )
{
var nodes = [];
for( var n in state[c][s] )
{
var node = {
id: state[c][s][n].node_name,
name: state[c][s][n].base_url,
data: {
type : 'node',
state : state[c][s][n].state,
leader : 'true' === state[c][s][n].leader
}
};
nodes.push( node );
}
var shard = {
id: s,
name: s,
data: {
type : 'shard',
},
children: nodes
};
shards.push( shard );
}
var collection = {
id: c,
name: c,
data: {
type : 'collection',
},
children: shards
};
collections.push( collection );
}
var graph_data = collections.shift();
generate_graph( graph_element, graph_data );
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
};
var init_tree = function( tree_element )
{
$.ajax
(
{
url : core_basepath + '/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 );
if( 0 !== parseInt( response.znode.prop.children_count ) )
{
data_element.hide();
}
else
{
var highlight = false;
var data = '<em>File "' + response.znode.path + '" has no 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 : function( xhr, text_status, error_thrown )
{
var message = 'Loading of <code>' + app.config.zookeeper_path + '</code> failed with "' + text_status + '" '
+ '(<code>' + error_thrown.message + '</code>)';
if( 200 !== xhr.status )
{
message = 'Loading of <code>' + app.config.zookeeper_path + '</code> failed with HTTP-Status ' + xhr.status + ' ';
}
this
.html( '<div class="block" id="error">' + message + '</div>' );
},
complete : function( xhr, text_status )
{
}
}
);
};
// #/~cloud
sammy.get
(
/^#\/(cloud)$/,
/^#\/~(cloud)$/,
function( context )
{
var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
var content_element = $( '#content' );
$.get
@ -33,299 +506,37 @@ sammy.get
.html( template );
var cloud_element = $( '#cloud', content_element );
var cloud_content = $( '.content', cloud_element );
var navigation_element = $( '#navigation', content_element );
var debug_element = $( '#debug', cloud_element );
var debug_button = $( 'a.debug', cloud_element );
init_debug( cloud_element );
var clipboard_element = $( '.clipboard', debug_element );
var clipboard_button = $( 'a', clipboard_element );
debug_button
.die( 'click' )
$( '.tree', navigation_element )
.die( 'activate' )
.live
(
'click',
'activate',
function( event )
{
debug_element.trigger( 'show' );
return false;
$( this ).addClass( 'current' );
init_tree( $( '#tree-content', cloud_element ) );
}
);
$( '.close', debug_element )
.die( 'click' )
$( '.graph', navigation_element )
.die( 'activate' )
.live
(
'click',
'activate',
function( event )
{
debug_element.trigger( 'hide' );
return false;
$( this ).addClass( 'current' );
init_graph( $( '#graph-content', cloud_element ) );
}
);
$( '.clipboard', debug_element )
.die( 'click' )
.live
(
'click',
function( event )
{
return false;
}
);
debug_element
.die( 'show' )
.live
(
'show',
function( event )
{
debug_button.hide();
debug_element.show();
$.ajax
(
{
url : core_basepath + '/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_button.show();
debug_element.hide();
}
);
$.ajax
(
{
url : core_basepath + '/zookeeper?wt=json',
dataType : 'json',
context : cloud_content,
beforeSend : function( xhr, settings )
{
//this
// .html( '<div class="loader">Loading ...</div>' );
},
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' );
cloud_content
.addClass( 'show' );
var file_content = $( '#file-content' );
$( 'a.close', file_content )
.die( 'click' )
.live
(
'click',
function( event )
{
$( '#tree a.active' )
.removeClass( 'active' );
cloud_content
.removeClass( 'show' );
return false;
}
);
$.ajax
(
{
url : this.href,
dataType : 'json',
context : file_content,
beforeSend : function( xhr, settings )
{
//this
// .html( 'loading' )
// .show();
},
success : function( response, text_status, xhr )
{
//this
// .html( '<pre>' + response.znode.data + '</pre>' );
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 );
if( 0 !== parseInt( response.znode.prop.children_count ) )
{
data_element.hide();
}
else
{
var data = response.znode.data
? '<pre>' + response.znode.data.esc() + '</pre>'
: '<em>File "' + response.znode.path + '" has no Content</em>';
data_element
.show()
.html( data );
}
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
return false;
}
);
},
error : function( xhr, text_status, error_thrown )
{
var message = 'Loading of <code>' + app.config.zookeeper_path + '</code> failed with "' + text_status + '" '
+ '(<code>' + error_thrown.message + '</code>)';
if( 200 !== xhr.status )
{
message = 'Loading of <code>' + app.config.zookeeper_path + '</code> failed with HTTP-Status ' + xhr.status + ' ';
}
this
.html( '<div class="block" id="error">' + message + '</div>' );
},
complete : function( xhr, text_status )
{
}
}
);
$( 'a[href="' + context.path + '"]', navigation_element )
.trigger( 'activate' );
}
);
}

View File

@ -59,7 +59,12 @@ sammy.bind
for( var core in params.cores )
{
navigation_content.push( '<li><a href="' + params.basepath + core + '">' + core + '</a></li>' );
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
@ -96,10 +101,10 @@ sammy.bind
}
);
// #/cores
// #/~cores
sammy.get
(
/^#\/(cores)$/,
/^#\/~(cores)$/,
function( context )
{
delete app.cores_template;
@ -126,15 +131,15 @@ sammy.get
}
);
// #/cores
// #/~cores
sammy.get
(
/^#\/(cores)\//,
/^#\/~(cores)\//,
function( context )
{
var content_element = $( '#content' );
var path_parts = this.path.match( /^(.+\/cores\/)(.*)$/ );
var path_parts = this.path.match( /^(.+\/~cores\/)(.*)$/ );
var current_core = path_parts[2];
sammy.trigger

View File

@ -26,8 +26,8 @@ sammy.get
content_element
.removeClass( 'single' );
var core_menu = $( 'ul', this.active_core );
var core_menu = this.active_core.closest( 'ul' );
if( !core_menu.data( 'admin-extra-loaded' ) )
{
core_menu.data( 'admin-extra-loaded', new Date() );

View File

@ -15,446 +15,541 @@
limitations under the License.
*/
var convert_duration_to_seconds = function( str )
{
var ret = 0;
var parts = new String( str ).split( '.' ).shift().split( ':' ).reverse();
var parts_count = parts.length;
for( var i = 0; i < parts_count; i++ )
{
ret += parseInt( parts[i], 10 ) * Math.pow( 60, i );
}
return ret;
}
var convert_seconds_to_readable_time = function( value )
{
var text = [];
value = parseInt( value );
var minutes = Math.floor( value / 60 );
var hours = Math.floor( minutes / 60 );
if( 0 !== hours )
{
text.push( hours + 'h' );
value -= hours * 60 * 60;
minutes -= hours * 60;
}
if( 0 !== minutes )
{
text.push( minutes + 'm' );
value -= minutes * 60;
}
if( 0 !== value )
{
text.push( value + 's' );
}
return text.join( ' ' );
}
sammy.bind
(
'dataimport_queryhandler_load',
function( event, params )
{
var core_basepath = params.active_core.attr( 'data-basepath' );
'dataimport_queryhandler_load',
function( event, params )
{
var core_basepath = params.active_core.attr( 'data-basepath' );
$.ajax
(
$.ajax
(
{
url : core_basepath + '/admin/mbeans?cat=QUERYHANDLER&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' )
{
url : core_basepath + '/admin/mbeans?cat=QUERYHANDLER&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 );
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
dataimport_handlers.push( key );
}
);
}
}
params.callback( dataimport_handlers );
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);
// #/:core/dataimport
sammy.get
(
/^#\/([\w\d-]+)\/(dataimport)$/,
function( context )
{
/^#\/([\w\d-]+)\/(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
(
/^#\/([\w\d-]+)\/(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 config_error_element = $( '#config-error', dataimport_element );
// handler
sammy.trigger
(
'dataimport_queryhandler_load',
'dataimport_queryhandler_load',
{
active_core : context.active_core,
callback : function( dataimport_handlers )
{
active_core : this.active_core,
callback : function( dataimport_handlers )
{
if( 0 === dataimport_handlers.length )
{
$( '#content' )
.html( 'sorry, no dataimport-handler defined!' );
var handlers_element = $( '#navigation ul', form_element );
var handlers = [];
return false;
}
context.redirect( context.path + '/' + dataimport_handlers[0] );
}
}
);
}
);
// #/:core/dataimport
sammy.get
(
/^#\/([\w\d-]+)\/(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 config_error_element = $( '#config-error', dataimport_element );
// handler
sammy.trigger
for( var i = 0; i < dataimport_handlers.length; i++ )
{
handlers.push
(
'dataimport_queryhandler_load',
{
active_core : context.active_core,
callback : function( dataimport_handlers )
{
var handlers_element = $( '.handler', 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>'
);
}
$( 'ul', handlers_element )
.html( handlers.join( "\n") ) ;
$( 'a[href="' + context.path + '"]', handlers_element ).parent()
.addClass( 'active' );
handlers_element
.show();
}
}
'<li><a href="' + path_parts[1] + dataimport_handlers[i] + '">' +
dataimport_handlers[i] +
'</a></li>'
);
}
// config
function dataimport_fetch_config()
{
$.ajax
(
{
url : handler_url + '?command=show-config',
dataType : 'xml',
context : $( '#dataimport_config', config_element ),
beforeSend : function( xhr, settings )
{
},
success : function( config, text_status, xhr )
{
dataimport_element
.removeClass( 'error' );
config_error_element
.hide();
config_element
.addClass( 'hidden' );
var entities = [];
$( 'document > entity', config )
.each
(
function( i, element )
{
entities.push( '<option>' + $( element ).attr( 'name' ) + '</option>' );
}
);
$( '#entity', form_element )
.append( entities.join( "\n" ) );
},
error : function( xhr, text_status, error_thrown )
{
if( 'parsererror' === error_thrown )
{
dataimport_element
.addClass( 'error' );
config_error_element
.show();
config_element
.removeClass( 'hidden' );
}
},
complete : function( xhr, text_status )
{
var code = $(
'<pre class="syntax language-xml"><code>' +
xhr.responseText.esc() +
'</code></pre>'
);
this.html( code );
if( 'success' === text_status )
{
hljs.highlightBlock( code.get(0) );
}
}
}
);
}
dataimport_fetch_config();
$( '.toggle', config_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parents( '.block' )
.toggleClass( 'hidden' );
$( handlers_element )
.html( handlers.join( "\n") ) ;
return false;
}
)
$( 'a[href="' + context.path + '"]', handlers_element ).closest( 'li' )
.addClass( 'current' );
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
.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;
}
)
// state
function dataimport_fetch_status()
{
$.ajax
(
{
url : handler_url + '?command=status',
dataType : 'xml',
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
var state_element = $( '#current_state', content_element );
var status = $( 'str[name="status"]', response ).text();
var rollback_element = $( 'str[name="Rolledback"]', response );
var messages_count = $( 'lst[name="statusMessages"] str', response ).size();
var started_at = $( 'str[name="Full Dump Started"]', response ).text();
if( !started_at )
{
started_at = (new Date()).toGMTString();
}
function dataimport_compute_details( response, details_element )
{
var details = [];
var requests = parseInt( $( 'str[name="Total Requests made to DataSource"]', response ).text() );
if( NaN !== requests )
{
details.push
(
'<abbr title="Total Requests made to DataSource">Requests</abbr>: ' +
requests
);
}
var fetched = parseInt( $( 'str[name="Total Rows Fetched"]', response ).text() );
if( NaN !== fetched )
{
details.push
(
'<abbr title="Total Rows Fetched">Fetched</abbr>: ' +
fetched
);
}
var skipped = parseInt( $( 'str[name="Total Documents Skipped"]', response ).text() );
if( NaN !== requests )
{
details.push
(
'<abbr title="Total Documents Skipped">Skipped</abbr>: ' +
skipped
);
}
var processed = parseInt( $( 'str[name="Total Documents Processed"]', response ).text() );
if( NaN !== processed )
{
details.push
(
'<abbr title="Total Documents Processed">Processed</abbr>: ' +
processed
);
}
details_element
.html( details.join( ', ' ) );
}
state_element
.removeClass( 'indexing' )
.removeClass( 'success' )
.removeClass( 'failure' );
$( '.info', state_element )
.removeClass( 'loader' );
if( 0 !== rollback_element.size() )
{
state_element
.addClass( 'failure' )
.show();
$( '.info strong', state_element )
.text( $( 'str[name=""]', response ).text() );
console.debug( 'rollback @ ', rollback_element.text() );
}
else if( 'idle' === status && 0 !== messages_count )
{
state_element
.addClass( 'success' )
.show();
$( '.time', state_element )
.text( started_at )
.timeago();
$( '.info strong', state_element )
.text( $( 'str[name=""]', response ).text() );
dataimport_compute_details( response, $( '.info .details', state_element ) );
}
else if( 'busy' === status )
{
state_element
.addClass( 'indexing' )
.show();
$( '.time', state_element )
.text( started_at )
.timeago();
$( '.info', state_element )
.addClass( 'loader' );
$( '.info strong', state_element )
.text( 'Indexing ...' );
dataimport_compute_details( response, $( '.info .details', state_element ) );
window.setTimeout( dataimport_fetch_status, 2000 );
}
else
{
state_element.hide();
}
},
error : function( xhr, text_status, error_thrown )
{
console.debug( arguments );
},
complete : function( xhr, text_status )
{
}
}
);
}
dataimport_fetch_status();
// form
$( 'form', form_element )
.ajaxForm
(
{
url : handler_url,
dataType : 'xml',
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
console.debug( response );
dataimport_fetch_status();
},
error : function( xhr, text_status, error_thrown )
{
console.debug( arguments );
},
complete : function( xhr, text_status )
{
}
}
);
$( 'form', form_element )
.show();
}
}
);
}
);
// config
function dataimport_fetch_config()
{
$.ajax
(
{
url : handler_url + '?command=show-config',
dataType : 'xml',
context : $( '#dataimport_config', config_element ),
beforeSend : function( xhr, settings )
{
},
success : function( config, text_status, xhr )
{
dataimport_element
.removeClass( 'error' );
config_error_element
.hide();
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" ) );
},
error : function( xhr, text_status, error_thrown )
{
if( 'parsererror' === error_thrown )
{
dataimport_element
.addClass( 'error' );
config_error_element
.show();
config_element
.removeClass( 'hidden' );
}
},
complete : function( xhr, text_status )
{
var code = $(
'<pre class="syntax language-xml"><code>' +
xhr.responseText.esc() +
'</code></pre>'
);
this.html( code );
if( 'success' === text_status )
{
hljs.highlightBlock( code.get(0) );
}
}
}
);
}
dataimport_fetch_config();
$( '.toggle', config_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;
}
)
// state
function dataimport_fetch_status()
{
$.ajax
(
{
url : handler_url + '?command=status',
dataType : 'xml',
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
var state_element = $( '#current_state', content_element );
var status = $( 'str[name="status"]', response ).text();
var rollback_element = $( 'str[name="Rolledback"]', response );
var messages_count = $( 'lst[name="statusMessages"] str', response ).size();
var started_at = $( 'str[name="Full Dump Started"]', response ).text();
if( !started_at )
{
started_at = (new Date()).toGMTString();
}
function dataimport_compute_details( response, details_element )
{
var details = [];
var requests = parseInt( $( 'str[name="Total Requests made to DataSource"]', response ).text(), 10 );
if( requests )
{
details.push
(
'<abbr title="Total Requests made to DataSource">Requests</abbr>: ' +
requests
);
}
var fetched = parseInt( $( 'str[name="Total Rows Fetched"]', response ).text(), 10 );
if( fetched )
{
details.push
(
'<abbr title="Total Rows Fetched">Fetched</abbr>: ' +
fetched
);
}
var skipped = parseInt( $( 'str[name="Total Documents Skipped"]', response ).text(), 10 );
if( requests )
{
details.push
(
'<abbr title="Total Documents Skipped">Skipped</abbr>: ' +
skipped
);
}
var processed = parseInt( $( 'str[name="Total Documents Processed"]', response ).text(), 10 );
if( processed )
{
details.push
(
'<abbr title="Total Documents Processed">Processed</abbr>: ' +
processed
);
}
details_element
.html( details.join( ', ' ) )
.show();
}
state_element
.removeClass( 'indexing' )
.removeClass( 'success' )
.removeClass( 'failure' );
$( '.info', state_element )
.removeClass( 'loader' );
if( 0 !== rollback_element.size() )
{
state_element
.addClass( 'failure' )
.show();
$( '.time', state_element )
.text( rollback_element.text() )
.timeago()
.show();
$( '.info strong', state_element )
.text( $( 'str[name=""]', response ).text() );
$( '.info .details', state_element )
.hide();
console.debug( 'rollback @ ', rollback_element.text() );
}
else if( 'idle' === status && 0 !== messages_count )
{
state_element
.addClass( 'success' )
.show();
$( '.time', state_element )
.text( started_at )
.timeago()
.show();
$( '.info strong', state_element )
.text( $( 'str[name=""]', response ).text() );
dataimport_compute_details( response, $( '.info .details', state_element ) );
}
else if( 'busy' === status )
{
state_element
.addClass( 'indexing' )
.show();
$( '.time', state_element )
.text( started_at )
.timeago()
.show();
$( '.info', state_element )
.addClass( 'loader' );
var indexing_text = 'Indexing ...';
var time_elapsed_text = $( 'str[name="Time Elapsed"]', response ).text();
time_elapsed_text = convert_seconds_to_readable_time( convert_duration_to_seconds( time_elapsed_text ) );
if( time_elapsed_text.length )
{
indexing_text = 'Indexing since ' + time_elapsed_text
}
$( '.info strong', state_element )
.text( indexing_text );
dataimport_compute_details( response, $( '.info .details', state_element ) );
window.setTimeout( dataimport_fetch_status, 2000 );
}
else
{
state_element.hide();
}
},
error : function( xhr, text_status, error_thrown )
{
console.debug( arguments );
reload_config_element
.addClass( 'error' );
},
complete : function( xhr, text_status )
{
}
}
);
}
dataimport_fetch_status();
// form
$( 'form', form_element )
.ajaxForm
(
{
url : handler_url,
dataType : 'xml',
beforeSend : function( xhr, settings )
{
$( 'form button', form_element )
.addClass( 'loader' );
},
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 } );
}
var custom_parameters = $( '#custom_parameters', form ).val();
if( custom_parameters.length )
{
array.push( { name : 'custom_parameters', value: custom_parameters } );
}
},
success : function( response, text_status, xhr )
{
dataimport_fetch_status();
},
error : function( xhr, text_status, error_thrown )
{
console.debug( arguments );
},
complete : function( xhr, text_status )
{
$( 'form button', form_element )
.removeClass( 'loader' );
}
}
);
}
);
}
);

View File

@ -210,7 +210,7 @@ sammy.get
{
var content_element = $( '#content' );
$( '#index', app.menu_element )
$( '#menu-wrapper #index' )
.addClass( 'active' );
content_element

View File

@ -15,10 +15,10 @@
limitations under the License.
*/
// #/java-properties
// #/~java-properties
sammy.get
(
/^#\/(java-properties)$/,
/^#\/~(java-properties)$/,
function( context )
{
var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
@ -45,6 +45,12 @@ sammy.get
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;' );

View File

@ -75,7 +75,13 @@ var logging_handler = function( response, text_status, xhr )
var logger_name = logger.name.split( '.' );
var display_name = logger_name.pop();
logger_content += '<li class="jstree-leaf" data-logger="' + logger.name.esc() + '">';
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 + '"' ;
@ -205,10 +211,10 @@ var logging_handler = function( response, text_status, xhr )
};
// #/logging
// #/~logging
sammy.get
(
/^#\/(logging)$/,
/^#\/~(logging)$/,
function( context )
{
var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );

View File

@ -15,6 +15,7 @@
limitations under the License.
*/
var current_core = null;
var cookie_name = 'schema-browser_autoload';
var luke_array_to_struct = function( array )
@ -110,11 +111,12 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen
topterms_frq_last = topterms[i+1];
topterms_content += '<li class="clearfix">'
+ '<p><span>' + topterms_frq_last.esc() + '</span></p>' + "\n"
+ '<ul>' + "\n";
+ '<p><span>' + topterms_frq_last.esc() + '</span></p>' + "\n"
+ '<ul>' + "\n";
}
topterms_content += '<li><span>' + topterms[i].esc() + '</span></li>' + "\n";
var target = '#/' + current_core + '/query?q=' + field.esc() + ':' + encodeURIComponent( topterms[i] );
topterms_content += '<li><a href="' + target + '">' + topterms[i].esc() + '</a></li>' + "\n";
}
topterms_content += '</li>';
@ -171,20 +173,20 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen
histogram_element
.sparkline
(
histogram_values,
{
type : 'bar',
barColor : '#c0c0c0',
zeroColor : '#000000',
height : histogram_element.height(),
barWidth : 46,
barSpacing : 3
}
histogram_values,
{
type : 'bar',
barColor : '#c0c0c0',
zeroColor : '#000000',
height : histogram_element.height(),
barWidth : 46,
barSpacing : 3
}
);
1 === histogram_values.length
? histogram_element.addClass( 'single' )
: histogram_element.removClass( 'single' );
: histogram_element.removeClass( 'single' );
}
},
@ -256,6 +258,9 @@ sammy.bind
$( 'option[value="' + params.route_params.path + '"]', related_select_element )
.attr( 'selected', 'selected' );
related_select_element
.trigger( 'liszt:updated' );
if( 'field' === type )
{
navigation_data.fields.push( value );
@ -605,7 +610,8 @@ sammy.bind
related_select_element
.attr( 'rel', '#/' + $( 'p a', params.active_core ).html() + '/schema-browser' )
.append( related_options );
.append( related_options )
.chosen();
related_select_element
.die( 'change' )
@ -660,6 +666,7 @@ sammy.get
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
current_core = context.params.splat[0];
var trigger_params = {
active_core : this.active_core
@ -1142,10 +1149,10 @@ sammy.get
data_element
.hide();
};
delete app.schema_browser_data;
}
delete app.schema_browser_data;
sammy.trigger
(
'schema_browser_load',

View File

@ -15,10 +15,10 @@
limitations under the License.
*/
// #/threads
// #/~threads
sammy.get
(
/^#\/(threads)$/,
/^#\/~(threads)$/,
function( context )
{
var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );

View File

@ -24,7 +24,6 @@ limitations under the License.
<div class="block analysis-error" id="analysis-error">
<div class="head"><a><span></span></a></div>
<div class="body"></div>
</div>
@ -57,7 +56,7 @@ limitations under the License.
<label for="type_or_name">Analyse Fieldname / FieldType:</label>
<select id="type_or_name"></select>
<div>
<div class="buttons">
<button type="submit">Analyse Values</button>

View File

@ -14,39 +14,48 @@ 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">
<div id="cloud" class="clearfix">
<div class="block">
<div id="frame">
<h2><span>Zookeeper-Data</span></h2>
<div class="message-container">
<div class="message"></div>
</div>
<div id="tree-content" class="content clearfix">
<div class="content clearfix">
<div id="tree" class="tree">#tree</div>
<div id="file-content" class="clearfix">
<div id="tree" class="tree">#tree</div>
<div id="file-content" class="clearfix">
<div id="prop">
<div id="prop">
<ul></ul>
</div>
</div>
<div id="data"></div>
<div id="data"></div>
<a class="close"><span>[x]</span></a>
</div>
<a class="close"><span>[x]</span></a>
</div>
<a class="debug"><span>Generate Dump</span></a>
<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 id="graph-content" class="content clearfix">
<div id="canvas"></div>
</div>
</div>
<div id="navigation" class="clearfix">
<ul>
<li class="tree"><a href="#/~cloud">Tree</a></li>
<li class="dump"><a href="#/~cloud">Dump</a></li>
</ul>
<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

@ -16,121 +16,108 @@ limitations under the License.
-->
<div id="dataimport" class="clearfix">
<div id="frame">
<div id="frame">
<div id="current_state">
<div id="current_state">
<span class="time"></span>
<div class="info">
<strong></strong>
<span class="time"></span>
<div class="info">
<strong></strong>
<div class="details"></div>
</div>
</div>
<div class="details"></div>
</div>
</div>
<div id="config-error">
<div id="config-error">
Dataimport XML-Configuration is not valid
Dataimport XML-Configuration is not valid
</div>
</div>
<div class="block hidden" id="config">
<div class="block hidden" id="config">
<h2>
<a class="toggle"><span>Dataimport Configuration</span></a>
<a class="reload_config" title="Reload Configuration">Reload</a>
</h2>
<div class="message-container">
<div class="message"></div>
</div>
<h2>
<a class="toggle"><span>Dataimport Configuration</span></a>
<a class="reload_config" title="Reload Configuration">Reload</a>
</h2>
<div class="message-container">
<div class="message"></div>
</div>
<div class="content">
<div class="content">
<div id="dataimport_config">
<div id="dataimport_config">
<div class="loader">Loading ...</div>
</div>
</div>
<div class="loader">Loading ...</div>
</div>
</div>
<div id="form">
</div>
</div>
</div>
<fieldset class="handler">
<legend>handler</legend>
<div class="fieldset">
<div id="form">
<ul>
</ul>
</div>
</fieldset>
<div id="navigation">
<form action="#" method="get">
<ul></ul>
<fieldset>
<legend>import</legend>
<div class="fieldset">
</div>
<label for="command">
<a rel="help">command</a>
</label>
<select name="command" id="command">
<option>full-import</option>
<option>delta-import</option>
</select>
<form action="#" method="get">
<label for="verbose" class="checkbox">
<input type="checkbox" name="verbose" id="verbose" value="true">
<a rel="help">verbose</a>
</label>
<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="clean" class="checkbox">
<input type="checkbox" name="clean" id="clean" value="true">
<a rel="help">clean</a>
</label>
<label for="verbose" class="checkbox">
<input type="checkbox" name="verbose" id="verbose" value="true">
<a rel="help">Verbose</a>
</label>
<label for="commit" class="checkbox">
<input type="checkbox" name="commit" id="commit" value="true">
<a rel="help">commit</a>
</label>
<label for="clean" class="checkbox">
<input type="checkbox" name="clean" id="clean" value="true">
<a rel="help">Clean</a>
</label>
<label for="optimize" class="checkbox">
<input type="checkbox" name="optimize" id="optimize" value="true">
<a rel="help">optimize</a>
</label>
<label for="commit" class="checkbox">
<input type="checkbox" name="commit" id="commit" value="true">
<a rel="help">Commit</a>
</label>
<label for="entity">
<a rel="help">entity</a>
</label>
<select name="entity" id="entity">
<option value=""></option>
</select>
<label for="optimize" class="checkbox">
<input type="checkbox" name="optimize" id="optimize" value="true">
<a rel="help">Optimize</a>
</label>
<label for="start">
<a rel="help">start</a>,
<a rel="help">rows</a>
</label>
<input type="text" name="start" id="start" value="0">
<input type="text" name="rows" id="rows" value="10">
<label for="entity">
<a rel="help">Entity</a>
</label>
<select id="entity"></select>
<label for="custom_parameters">
<a rel="help">custom parameters</a>
</label>
<input type="text" name="custom_parameters" id="custom_parameters" value="">
</div>
</fieldset>
<label for="start">
<a rel="help">Start</a>,
<a rel="help">Rows</a>
</label>
<input type="text" id="start" placeholder="0">
<input type="text" id="rows" placeholder="10">
<button type="submit">Execute Import</button>
</form>
</div>
<label for="custom_parameters">
<a rel="help">Custom Parameters</a>
</label>
<input type="text" id="custom_parameters" value="">
<button type="submit">Execute Import</button>
</form>
</div>
</div>