SOLR-2667: use require.js to load UI dynamically

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1292908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2012-02-23 19:23:10 +00:00
parent e143425b70
commit ebfdea6c82
51 changed files with 12453 additions and 6458 deletions

View File

@ -0,0 +1,15 @@
@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

@ -0,0 +1,263 @@
#content #analysis-holder
{
background-image: url( ../../img/div.gif );
background-position: 50% 0;
background-repeat: repeat-y;
}
#content #analysis #field-analysis
{
margin-bottom: 0;
}
#content #analysis #field-analysis .content
{
padding-bottom: 0;
}
#content #analysis .settings-holder
{
clear: both;
padding-top: 15px;
}
#content #analysis .settings
{
background-color: #fff;
border-top: 1px solid #fafafa;
border-bottom: 1px solid #fafafa;
padding-top: 10px;
padding-bottom: 10px;
}
#content #analysis .settings select.loader
{
background-position: 3px 50%;
padding-left: 21px;
}
#content #analysis .settings select optgroup
{
font-style: normal;
padding: 5px;
}
#content #analysis .settings select option
{
padding-left: 10px;
}
#content #analysis .settings div
{
float: right;
width: 47%;
}
#content #analysis .settings button
{
float: right;
}
#content #analysis .settings button.loader
{
background-position: 2px 50%;
padding-left: 21px;
}
#content #analysis .settings .verbose_output
{
float: left;
width: auto;
}
#content #analysis .settings .verbose_output a
{
background-image: url( ../../img/ico/ui-check-box-uncheck.png );
background-position: 0 50%;
color: #999;
display: block;
padding-left: 21px;
}
#content #analysis .settings .verbose_output.active a
{
background-image: url( ../../img/ico/ui-check-box.png );
}
#content #analysis .index label,
#content #analysis .query label
{
display: block;
}
#content #analysis .index textarea,
#content #analysis .query textarea
{
display: block;
width: 100%;
}
#content #analysis .index
{
float: left;
margin-right: 0.5%;
min-width: 47%;
max-width: 99%;
}
#content #analysis .query
{
float: right;
margin-left: 0.5%;
min-width: 47%;
max-width: 99%;
}
#content #analysis .analysis-error
{
background-color: #f00;
background-image: url( ../../img/ico/construction.png );
background-position: 10px 50%;
color: #fff;
display: none;
font-weight: bold;
margin-bottom: 20px;
padding: 10px;
padding-left: 35px;
}
#content #analysis #analysis-result
{
overflow: auto;
}
#content #analysis #analysis-result .index,
#content #analysis #analysis-result .query
{
background-color: #fff;
padding-top: 20px;
}
#content #analysis #analysis-result table
{
border-collapse: collapse;
}
#content #analysis #analysis-result td
{
vertical-align: top;
white-space: nowrap;
}
#content #analysis #analysis-result td.part.analyzer div,
#content #analysis #analysis-result td.part.spacer .holder,
#content #analysis #analysis-result td td td
{
padding-top: 1px;
padding-bottom: 1px;
}
#content #analysis #analysis-result td.legend,
#content #analysis #analysis-result td.data tr.verbose_output
{
display: none;
}
#content #analysis #analysis-result.verbose_output td.legend
{
display: table-cell;
}
#content #analysis #analysis-result.verbose_output td.data tr.verbose_output
{
display: table-row;
}
#content #analysis #analysis-result .match
{
background-color: #e9eff7;
background-color: #f2f2ff;
}
#content #analysis #analysis-result td.part
{
padding-bottom: 10px;
}
#content #analysis #analysis-result td.part.analyzer div
{
border-right: 1px solid #f0f0f0;
padding-right: 10px;
}
#content #analysis #analysis-result td.part.analyzer abbr
{
color: #c0c0c0;
}
#content #analysis #analysis-result td.part.legend .holder,
#content #analysis #analysis-result td.part.data .holder
{
padding-left: 10px;
padding-right: 10px;
border-right: 1px solid #c0c0c0;
}
#content #analysis #analysis-result td.part.legend td
{
color: #c0c0c0;
}
#content #analysis #analysis-result td.part.legend .holder
{
border-right-color: #f0f0f0;
}
#content #analysis #analysis-result td.part.data:last-child .holder
{
padding-right: 0;
border-right: 0;
}
#content #analysis #analysis-result td.details
{
padding-left: 10px;
padding-right: 10px;
border-left: 1px solid #f0f0f0;
border-right: 1px solid #f0f0f0;
}
#content #analysis #analysis-result td.details:first-child
{
padding-left: 0;
border-left: 0;
}
#content #analysis #analysis-result td.details:last-child
{
padding-right: 0;
border-right: 0;
}
#content #analysis #analysis-result td.details tr.empty td
{
color: #f0f0f0;
}
#content #analysis #analysis-result td.details tr.raw_bytes td
{
letter-spacing: -1px;
}
#content #analysis #analysis-result .part table table td
{
border-top: 1px solid #f0f0f0;
}
#content #analysis #analysis-result .part table table tr:first-child td
{
border-top: 0;
}
#content #analysis #field-analysis h2 { background-image: url( ../../img/ico/receipt.png ); }
#content #analysis .analysis-result h2 { background-image: url( ../../img/ico/receipt-invoice.png ); }

View File

@ -0,0 +1,128 @@
#content #cloud .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #cloud #error
{
background-color: #f00;
background-image: url( ../../img/ico/construction.png );
background-position: 10px 50%;
color: #fff;
font-weight: bold;
margin-bottom: 20px;
padding: 10px;
padding-left: 35px;
}
#content #cloud h2 { background-image: url( ../../img/ico/sitemap.png ); }
#content #cloud .content
{
padding-left: 0;
padding-right: 0;
}
#content #cloud .content.show
{
background-image: url( ../../img/div.gif );
background-repeat: repeat-y;
background-position: 31% 0;
}
#content #cloud #tree
{
float: left;
width: 30%;
}
#content #cloud #file-content
{
display: none;
float: right;
position: relative;
width: 68%;
min-height: 100px
}
#content #cloud .show #file-content
{
display: block;
}
#content #cloud #file-content .close
{
background-image: url( ../../img/ico/cross-0.png );
background-position: 50% 50%;
display: block;
height: 20px;
position: absolute;
right: 0;
top: 0;
width: 20px;
}
#content #cloud #file-content .close:hover
{
background-image: url( ../../img/ico/cross-1.png );
}
#content #cloud #file-content .close span
{
display: none;
}
#content #cloud #file-content #data
{
border-top: 1px solid #c0c0c0;
margin-top: 10px;
padding-top: 10px;
}
#content #cloud #file-content #data pre
{
display: block;
max-height: 600px;
overflow: auto;
}
#content #cloud #file-content #data em
{
color: #c0c0c0;
}
#content #cloud #file-content #prop
{
}
#content #cloud #file-content li
{
padding-top: 3px;
padding-bottom: 3px;
}
#content #cloud #file-content li.odd
{
background-color: #F8F8F8;
}
#content #cloud #file-content li dt
{
float: left;
width: 19%;
}
#content #cloud #file-content li dd
{
float: right;
width: 80%;
}
/* tree */
#content #cloud .tree a.active
{
background-color: #f0f0f0;
color: #00f;
}

View File

@ -0,0 +1,464 @@
*
{
background-repeat: no-repeat;
margin: 0;
padding: 0;
}
body, h1, h2, h3, h4, h5, h6, a, button, input, select, option, textarea, th, td
{
color: #333;
font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif;
}
body
{
padding: 30px;
text-align: center;
}
a, button
{
cursor: pointer;
}
button, input, select, textarea
{
border: 1px solid #c0c0c0;
padding: 2px;
}
a
{
text-decoration: none;
}
pre
{
color: #333;
text-align: left;
}
abbr
{
cursor: help;
}
ul
{
list-style: none;
}
.clearfix:after { clear: both; content: "."; display: block; font-size: 0; height: 0; visibility: hidden; }
.clearfix { display: block; }
.loader
{
background-image: url( ../../img/loader.gif ) !important;
}
.loader-light
{
background-image: url( ../../img/loader-light.gif ) !important;
}
#wrapper
{
margin: 0 auto;
margin-bottom: 30px;
text-align: left;
}
#header
{
padding-bottom: 10px;
position: relative;
}
#header #solr
{
background-image: url( ../../img/solr.png );
display: block;
height: 78px;
width: 200px;
}
#header #solr span
{
display: none;
}
#header #wip-notice
{
background-color: #eceffa;
background-image: url( ../../img/ico/information-button.png );
background-position: 8px 7px;
border: 1px solid #4465cb;
padding: 5px 10px;
padding-left: 31px;
left: 212px;
position: absolute;
top: 0;
}
#header #wip-notice a
{
display: block;
}
#header #wip-notice span
{
border-bottom: 1px solid #c0c0c0;
}
#main
{
border: 1px solid #c0c0c0;
min-height: 600px;
min-width: 750px;
position: relative;
}
#meta
{
position: absolute;
bottom: -26px;
right: 0;
}
#meta li
{
float: left;
}
#meta li a
{
background-position: 10px 50%;
display: block;
height: 25px;
line-height: 25px;
padding-left: 31px;
padding-right: 10px;
}
#meta li a:hover
{
background-color: #f0f0f0;
}
#meta .documentation a { background-image: url( ../../img/ico/document-text.png ); }
#meta .issues a { background-image: url( ../../img/ico/bug.png ); }
#meta .irc a { background-image: url( ../../img/ico/users.png ); }
#meta .mailinglist a { background-image: url( ../../img/ico/mail.png ); }
#meta .wiki-query-syntax a { background-image: url( ../../img/ico/script-code.png ); }
#environment
{
background-image: url( ../../img/ico/box.png );
background-position: 10px 50%;
border: 1px solid #c0c0c0;
display: none;
font-weight: bold;
padding: 5px 10px;
padding-left: 31px;
position: absolute;
top: 0;
right: 0;
}
#environment.prod
{
background-color: #c37f7f;
border-color: #b15757;
color: #fff;
}
#environment.test
{
background-color: #f5f5b2;
border-color: #e4e433;
}
#environment.dev
{
background-color: #cce7cc;
border-color: #66b866;
}
#content-wrapper
{
float: right;
width: 80%;
}
#content
{
padding: 10px;
}
#content > .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content iframe
{
border: 0;
display: block;
min-height: 400px;
width: 100%;
}
#content > pre
{
max-height: 600px;
overflow: auto;
}
#content .block
{
margin-bottom: 10px;
}
#content .block h2
{
background-color: #fafafa;
background-position: 5px 50%;
border-bottom: 1px solid #f0f0f0;
font-weight: bold;
padding: 5px;
padding-left: 26px;
}
#content .block.disabled,
#content .block.disabled h2
{
color: #c0c0c0;
}
#content .block .message,
#content .block .content
{
padding: 5px;
}
#content .block .message
{
display: none;
}
/* syntax */
pre.syntax
{
overflow: auto;
}
pre.syntax code
{
display: block;
color: #000;
}
pre.syntax .comment,
pre.syntax .template_comment,
pre.syntax .diff .header,
pre.syntax .javadoc
{
color: #998;
font-style: italic;
}
pre.syntax .keyword,
pre.syntax .css .rule .keyword,
pre.syntax .winutils,
pre.syntax .javascript .title,
pre.syntax .lisp .title,
pre.syntax .subst
{
color: #000;
font-weight: bold;
}
pre.syntax .number,
pre.syntax .hexcolor
{
color: #40a070;
}
pre.syntax .string,
pre.syntax .tag .value,
pre.syntax .phpdoc,
pre.syntax .tex .formula
{
color: #d14;
}
pre.syntax .title,
pre.syntax .id
{
color: #900;
font-weight: bold;
}
pre.syntax .javascript .title,
pre.syntax .lisp .title,
pre.syntax .subst
{
font-weight: normal;
}
pre.syntax .class .title,
pre.syntax .tex .command
{
color: #458;
font-weight: bold;
}
pre.syntax .tag,
pre.syntax .css .keyword,
pre.syntax .html .keyword,
pre.syntax .tag .title,
pre.syntax .django .tag .keyword
{
color: #000080;
font-weight: normal;
}
pre.syntax .attribute,
pre.syntax .variable,
pre.syntax .instancevar,
pre.syntax .lisp .body
{
color: #008080;
}
pre.syntax .regexp
{
color: #009926;
}
pre.syntax .class
{
color: #458;
font-weight: bold;
}
pre.syntax .symbol,
pre.syntax .ruby .symbol .string,
pre.syntax .ruby .symbol .keyword,
pre.syntax .ruby .symbol .keymethods,
pre.syntax .lisp .keyword,
pre.syntax .tex .special
{
color: #990073;
}
pre.syntax .builtin,
pre.syntax .built_in,
pre.syntax .lisp .title
{
color: #0086b3;
}
pre.syntax .preprocessor,
pre.syntax .pi,
pre.syntax .doctype,
pre.syntax .shebang,
pre.syntax .cdata
{
color: #999;
font-weight: bold;
}
pre.syntax .deletion
{
background: #fdd;
}
pre.syntax .addition
{
background: #dfd;
}
pre.syntax .diff .change
{
background: #0086b3;
}
pre.syntax .chunk
{
color: #aaa;
}
pre.syntax .tex .formula
{
opacity: 0.5;
}
#content .tree li,
#content .tree ins
{
background-color: transparent;
background-image: url( ../../img/tree.png );
background-repeat: no-repeat;
}
#content .tree li
{
background-position: -54px 0;
background-repeat: repeat-y;
line-height: 22px;
}
#content .tree li.jstree-last
{
background:transparent;
}
#content .tree .jstree-open > ins
{
background-position: -36px 0;
}
#content .tree .jstree-closed > ins
{
background-position: -18px 0;
}
#content .tree .jstree-leaf > ins
{
background-position: 0 0;
}
#content .tree .jstree-hovered
{
background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px;
}
#content .tree .jstree-clicked
{
background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px;
}
#content .tree a .jstree-icon
{
background-image: url( ../../img/ico/folder.png );
}
#content .tree .jstree-leaf a .jstree-icon
{
background-image: url( ../../img/ico/document-text.png );
}
#content .tree .jstree-search
{
font-style:italic;
}
#content .tree a.jstree-search
{
color:aqua;
}

View File

@ -0,0 +1,272 @@
#content #cores
{
}
#content #cores #frame
{
float: right;
width: 78%;
}
#content #cores #navigation
{
background-image: url( ../../img/div.gif );
background-position: 100% 0;
background-repeat: repeat-y;
width: 20%;
}
#content #cores #list
{
float: left;
padding-top: 15px;
width: 100%;
}
#content #cores #list a
{
border-right: 1px solid #f0f0f0;
display: block;
margin-left: 1px;
padding: 3px 0;
}
#content #cores #list a:hover
{
background-color: #fafafa;
}
#content #cores #list .current a
{
background-color: #fff;
border-right-color: #fff;
border-top: 1px solid #f0f0f0;
border-bottom: 1px solid #f0f0f0;
font-weight: bold;
}
#content #cores #frame .actions
{
margin-bottom: 20px;
}
#content #cores .actions form .buttons
{
padding-left: 40px;
}
#content #cores .actions form a
{
display: block;
float: left;
height: 20px;
margin-right: 5px;
padding-left: 21px;
}
#content #cores .actions form a span
{
display: none;
}
#content #cores .actions form a.submit
{
background-image: url( ../../img/ico/tick.png );
background-position: 50% 50%;
}
#content #cores .actions form a.submit:hover
{
background-color: #e6f3e6;
}
#content #cores .actions form a.reset
{
background-image: url( ../../img/ico/cross.png );
background-position: 50% 50%;
}
#content #cores .actions form a.reset:hover
{
background-color: #f3e6e6;
}
#content #cores .actions form p
{
padding-bottom: 3px;
}
#content #cores .actions form label
{
float: left;
width: 40px;
}
#content #cores .actions form input,
#content #cores .actions form select
{
width: 100px;
}
#content #cores .actions form select option.disabled
{
color: #c0c0c0;
}
#content #cores .actions .button-holder
{
float: left;
margin-right: 10px;
margin-bottom: 5px;
}
#content #cores .actions .button-holder.active
{
margin-bottom: 0;
}
#content #cores .actions .button-holder .button
{
background-color: #f5f5f5;
border: 1px solid #c0c0c0;
position: relative;
z-index: 100;
}
#content #cores .actions .button-holder.active .button
{
background-color: #fff;
border-bottom-color: #fff;
padding-bottom: 5px;
}
#content #cores .actions .button-holder .button a
{
background-position: 5px 50%;
display: block;
padding: 1px 5px;
padding-left: 24px;
}
#content #cores .actions .button-holder .button a.success
{
background-image: url( ../../img/ico/tick.png );
}
#content #cores .actions .button-holder.active .button a
{
cursor: auto;
}
#content #cores .actions .button-holder .button-content
{
background-color: #fff;
border: 1px solid #c0c0c0;
box-shadow: 5px 5px 10px #c0c0c0;
-moz-box-shadow: 5px 5px 10px #c0c0c0;
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
display: none;
margin-top: -1px;
padding: 5px;
padding-top: 15px;
position: absolute;
z-index: 99;
}
#content #cores .actions .button-holder.active .button-content
{
display: block;
}
#content #cores .actions .button .reload
{
background-image: url( ../../img/ico/arrow-circle.png );
}
#content #cores .actions .button .rename
{
background-image: url( ../../img/ico/ui-text-field-select.png );
}
#content #cores .actions .button .swap
{
background-image: url( ../../img/ico/arrow-switch.png );
}
#content #cores .actions .button .unload
{
background-image: url( ../../img/ico/cross.png );
}
#content #cores .actions .button .optimize
{
background-image: url( ../../img/ico/hammer-screwdriver.png );
display: none;
}
#content #cores #navigation .add
{
background-image: url( ../../img/ico/plus-button.png );
}
#content #cores #navigation .add label
{
width: 85px;
}
#content #cores #navigation .add input
{
width: 155px;
}
#content #cores #navigation .add .buttons
{
padding-left: 85px;
}
#content #cores #data #core-data h2 { background-image: url( ../../img/ico/database.png ); }
#content #cores #data #index-data h2 { background-image: url( ../../img/ico/chart.png ); }
#content #cores #data #index-data
{
margin-top: 10px;
}
#content #cores #data li
{
padding-bottom: 3px;
padding-top: 3px;
}
#content #cores #data li.odd
{
background-color: #f8f8f8;
}
#content #cores #data li dt
{
float: left;
width: 17%;
}
#content #cores #data li dd
{
float: right;
width: 82%;
}
#content #cores #data li dd.ico
{
background-image: url( ../../img/ico/slash.png );
height: 20px;
}
#content #cores #data li dd.ico.ico-1
{
background-image: url( ../../img/ico/tick.png );
}
#content #cores #data li dd.ico span
{
display: none;
}

View File

@ -0,0 +1,114 @@
#content #dashboard .block
{
background-image: none;
width: 49%;
}
#content #dashboard #statistics
{
float: left;
}
#content #dashboard #statistics dt,
#content #dashboard #statistics dd
{
display: block;
float: left;
}
#content #dashboard #statistics dt
{
clear: left;
margin-right: 2%;
text-align: right;
width: 23%;
}
#content #dashboard #statistics dd
{
width: 74%;
}
#content #dashboard #statistics .index_optimized
{
margin-top: 10px;
}
#content #dashboard #statistics .ico
{
background-image: url( ../../img/ico/slash.png );
height: 20px;
}
#content #dashboard #statistics .ico.ico-1
{
background-image: url( ../../img/ico/tick.png );
}
#content #dashboard #statistics .ico span
{
display: none;
}
#content #dashboard #statistics .index_optimized.value a
{
display: none;
}
#content #dashboard #statistics .index_optimized.value.ico-0 a
{
background-color: #f0f0f0;
background-image: url( ../../img/ico/hammer-screwdriver.png );
background-position: 5px 50%;
border: 1px solid #c0c0c0;
display: block;
float: left;
margin-left: 50px;
padding: 1px 5px;
padding-left: 26px;
}
#content #dashboard #statistics .index_has-deletions
{
display: none;
}
#content #dashboard #statistics .index_has-deletions.value.ico-0
{
background-image: url( ../../img/ico/tick-red.png );
}
#content #dashboard #replication
{
float: left;
}
#content #dashboard #replication .is-replicating
{
background-position: 99% 50%;
display: block;
}
#content #dashboard #replication #details table thead td span
{
display: none;
}
#content #dashboard #dataimport
{
float: right;
}
#content #dashboard #admin-extra
{
float: right;
}
#content #dashboard #system h2 { background-image: url( ../../img/ico/server.png ); }
#content #dashboard #statistics h2 { background-image: url( ../../img/ico/chart.png ); }
#content #dashboard #replication h2 { background-image: url( ../../img/ico/node.png ); }
#content #dashboard #replication.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 ); }

View File

@ -0,0 +1,232 @@
#content #dataimport
{
background-image: url( ../../img/div.gif );
background-position: 21% 0;
background-repeat: repeat-y;
}
#content #dataimport #frame
{
float: right;
width: 78%;
}
#content #dataimport #form
{
float: left;
width: 20%;
}
#content #dataimport.error #form form
{
display: none !important;
}
#content #dataimport #form label
{
cursor: pointer;
display: block;
margin-top: 5px;
}
#content #dataimport #form input,
#content #dataimport #form select,
#content #dataimport #form textarea
{
margin-bottom: 2px;
width: 100%;
}
#content #dataimport #form #start
{
float: left;
margin-right: 2%;
width: 49%;
}
#content #dataimport #form #rows
{
width: 49%;
}
#content #dataimport #form .checkbox input
{
margin-bottom: 0;
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;
padding: 10px;
margin-bottom: 20px;
}
#content #dataimport.error #current_state
{
display: none !important;
}
#content #dataimport #current_state .time,
#content #dataimport #current_state .info
{
display: block;
padding-left: 21px;
}
#content #dataimport #current_state .time
{
color: #c0c0c0;
font-size: 11px;
}
#content #dataimport #current_state .info
{
background-position: 0 1px;
}
#content #dataimport #current_state.indexing
{
background-color: #f9f9f9;
}
#content #dataimport #current_state.success
{
background-color: #e6f3e6;
}
#content #dataimport #current_state.success .info
{
background-image: url( ../../img/ico/tick-circle.png );
}
#content #dataimport #current_state.success .info strong
{
color: #080;
}
#content #dataimport #current_state.failure
{
background-color: #f3e6e6;
}
#content #dataimport #current_state.failure .info
{
background-image: url( ../../img/ico/slash.png );
}
#content #dataimport #current_state.failure .info strong
{
color: #800;
}
#content #dataimport #config-error
{
background-color: #f00;
background-image: url( ../../img/ico/construction.png );
background-position: 10px 50%;
color: #fff;
display: none;
font-weight: bold;
margin-bottom: 20px;
padding: 10px;
padding-left: 35px;
}
#content #dataimport #config h2
{
border-color: #c0c0c0;
padding-left: 5px;
position: relative;
}
#content #dataimport #config.hidden h2
{
border-color: #fafafa;
}
#content #dataimport #config h2 a.toggle
{
background-image: url( ../../img/ico/toggle-small.png );
background-position: 0 50%;
padding-left: 21px;
}
#content #dataimport #config.hidden h2 a.toggle
{
background-image: url( ../../img/ico/toggle-small-expand.png );
}
#content #dataimport #config h2 a.reload_config
{
background-image: url( ../../img/ico/arrow-circle.png );
padding-left: 21px;
position: absolute;
right: 5px;
top: 5px;
}
#content #dataimport #config h2 a.reload_config.success
{
background-image: url( ../../img/ico/tick.png );
}
#content #dataimport #config h2 a.reload_config.error
{
background-image: url( ../../img/ico/slash.png );
}
#content #dataimport #config.hidden .content
{
display: none;
}
#content #dataimport #dataimport_config .loader
{
background-position: 0 50%;
padding-left: 21px;
}

View File

@ -0,0 +1,158 @@
#content #index .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #index #data
{
float: left;
width: 74%;
}
#content #index #memory
{
float: right;
width: 24%;
}
#content #index #data h2 { background-image: url( ../../img/ico/server.png ); }
#content #index #memory h2 { background-image: url( ../../img/ico/battery.png ); }
#content #index #data li
{
display: none;
padding-top: 3px;
padding-bottom: 3px;
}
#content #index #data li.odd
{
background-color: #f8f8f8;
}
#content #index #data li dt
{
float: left;
width: 27%;
}
#content #index #data li dd
{
float: right;
width: 72%
}
#content #index #data li dd.odd
{
color: #999;
}
#content #index #data dt span
{
background-position: 0 50%;
display: block;
padding-left: 21px;
}
#content #index #data .start_time dt span
{
background-image: url( ../../img/ico/clock-select.png );
}
#content #index #data .host dt span
{
background-image: url( ../../img/ico/globe.png );
}
#content #index #data .cwd dt span
{
background-image: url( ../../img/ico/folder-export.png );
}
#content #index #data .jvm dt span
{
background-image: url( ../../img/ico/jar.png );
}
#content #index #data .command_line_args dt span
{
background-image: url( ../../img/ico/terminal.png );
}
#content #index #data .lucene dt span
{
background-image: url( ../../img/lucene-ico.png );
}
#content #index #memory #memory-bar
{
background-color: #00f;
box-shadow: 5px 5px 10px #c0c0c0;
-moz-box-shadow: 5px 5px 10px #c0c0c0;
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
margin-top: 20px;
width: 100px;
}
#content #index #memory .bar
{
bottom: 0;
position: absolute;
width: 100%;
}
#content #index #memory div .value
{
border-top: 1px solid #f00;
display: block;
font-size: 10px;
line-height: 12px;
padding-left: 10px;
padding-right: 2px;
position: absolute;
margin-left: 100px;
white-space: nowrap;
}
#content #index #memory div .value.upper
{
border-top-width: 0;
border-bottom-width: 1px;
border-bottom-style: solid;
}
#content #index #memory #memory-bar-max
{
background-color: #f0f0f0;
height: 200px;
position: relative;
}
#content #index #memory #memory-bar-max .value
{
border-color: #f0f0f0;
color: #d6d6d6;
}
#content #index #memory #memory-bar-total
{
background-color: #c0c0c0;
}
#content #index #memory #memory-bar-total .value
{
border-color: #c0c0c0;
color: #c0c0c0;
}
#content #index #memory #memory-bar-used
{
background-color: #969696;
}
#content #index #memory #memory-bar-used .value
{
border-color: #969696;
color: #969696;
}

View File

@ -0,0 +1,33 @@
#content #java-properties .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #java-properties li
{
padding-top: 3px;
padding-bottom: 3px;
}
#content #java-properties li.odd
{
background-color: #f8f8f8;
}
#content #java-properties li dt
{
float: left;
width: 29%;
}
#content #java-properties li dd
{
float: right;
width: 70%
}
#content #java-properties li dd.odd
{
color: #999;
}

View File

@ -0,0 +1,150 @@
#content #logging .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #logging .jstree
{
position: relative;
}
#content #logging .jstree a
{
cursor: auto;
}
#content #logging .jstree .trigger span
{
background-position: 100% 50%;
cursor: pointer;
padding-right: 21px;
}
#content #logging .jstree a.trigger:hover span
{
background-image: url( ../../img/ico/pencil-small.png );
}
#content #logging .jstree .inactive,
#content #logging .jstree .inactive .effective_level
{
color: #c0c0c0;
}
#content #logging .jstree li
{
position: relative;
}
#content #logging .jstree .odd
{
background-color: #f8f8f8;
}
#content #logging .jstree .loglevel
{
position: absolute;
margin-top: 3px;
top: 0;
}
#content #logging .jstree li .loglevel { left: 340px; }
#content #logging .jstree li li .loglevel { left: 322px; }
#content #logging .jstree li li li .loglevel { left: 304px; }
#content #logging .jstree li li li li .loglevel { left: 286px; }
#content #logging .jstree li li li li li .loglevel { left: 268px; }
#content #logging .jstree li li li li li li .loglevel { left: 250px; }
#content #logging .jstree .loglevel a
{
display: block;
}
#content #logging .jstree .loglevel .effective_level
{
height: 22px;
line-height: 22px;
padding-left: 5px;
width: 150px;
}
#content #logging .jstree .loglevel.open .effective_level
{
background-color: #f0f0f0;
}
#content #logging .jstree .loglevel.open .effective_level
{
background-image: url( ../../img/ico/arrow-000-small.png );
background-position: 75px 50%;
}
#content #logging .jstree .loglevel.open .effective_level span
{
background-image: none;
}
#content #logging .jstree .loglevel ul
{
background-color: #fff;
border: 1px solid #f0f0f0;
display: none;
position: absolute;
left: 100px;
top: 0;
}
#content #logging .jstree .loglevel.open ul
{
display: block;
}
#content #logging .jstree .loglevel ul li
{
background-image: none;
line-height: auto;
margin-left: 0;
}
#content #logging .jstree .loglevel ul li a
{
background-image: url( ../../img/ico/ui-radio-button-uncheck.png );
background-position: 2px 50%;
cursor: pointer;
display: block;
height: 22px;
line-height: 22px;
padding-left: 21px;
padding-right: 5px;
}
#content #logging .jstree .loglevel ul li.selected a
{
background-image: url( ../../img/ico/ui-radio-button.png );
}
#content #logging .jstree .loglevel ul li a:hover
{
background-color: #f8f8f8;
color: #008;
}
#content #logging .jstree .loglevel ul li.unset
{
border-top: 1px solid #f0f0f0;
}
#content #logging .jstree .loglevel ul li.unset a
{
background-image: url( ../../img/ico/cross-0.png );
background-position: 4px 50%;
padding-top: 3px;
padding-bottom: 3px;
}
#content #logging .jstree .loglevel ul li.unset a:hover
{
background-image: url( ../../img/ico/cross-1.png );
color: #800;
}

View File

@ -0,0 +1,242 @@
#menu-wrapper
{
float: left;
width: 20%;
}
#menu p.loader
{
background-position: 5px 50%;
color: #c0c0c0;
margin-top: 5px;
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;
font-weight: normal;
}
#menu p a small span.txt
{
display: none;
}
#menu p a small:hover span.txt
{
display: inline;
}
#menu .busy
{
border-right-color: #f6f5d9;
}
#menu .busy p a
{
background-color: #f6f5d9;
background-image: url( ../../img/ico/status-away.png );
}
#menu .offline
{
border-right-color: #eccfcf;
}
#menu .offline p a
{
background-color: #eccfcf;
background-image: url( ../../img/ico/status-busy.png );
}
#menu .online
{
border-right-color: #cfecd3;
}
#menu .online p a
{
background-color: #cfecd3;
background-image: url( ../../img/ico/status.png );
}
#menu .ping small
{
color: #000
}
#menu li
{
border-bottom: 1px solid #c0c0c0;
}
#menu li p
{
border-right: 1px solid #c0c0c0;
}
#menu li.optional
{
display: none;
}
#menu li.active:last-child
{
border-bottom: 0;
}
#menu ul 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
{
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
{
background-position: 7px 50%;
border-bottom: 1px solid #f0f0f0;
color: #bbb;
margin-left: 15px;
padding-left: 26px;
}
#menu ul ul li:last-child a
{
border-bottom: 0;
}
#menu ul 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
{
color: #333;
}
#menu ul ul li.active a:hover
{
background-color: transparent;
}
#menu .global p a
{
background-position: 5px 50%;
padding-left: 26px;
}
#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 .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;
}

View File

@ -0,0 +1,128 @@
#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 .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;
width: 78%;
}
#content #plugins #frame .entry
{
margin-bottom: 10px;
}
#content #plugins #frame .entry:last-child
{
margin-bottom: 0;
}
#content #plugins #frame .entry a
{
background-image: url( ../../img/ico/chevron-small-expand.png );
background-position: 0 50%;
display: block;
font-weight: bold;
padding-left: 21px;
}
#content #plugins #frame .entry.expanded a
{
background-image: url( ../../img/ico/chevron-small.png );
}
#content #plugins #frame .entry.expanded ul
{
display: block;
}
#content #plugins #frame .entry ul
{
display: none;
padding-top: 5px;
margin-left: 21px;
}
#content #plugins #frame .entry li
{
padding-top: 2px;
padding-bottom: 2px;
}
#content #plugins #frame .entry li.stats
{
border-top: 1px solid #c0c0c0;
margin-top: 5px;
padding-top: 5px;
}
#content #plugins #frame .entry li.odd
{
background-color: #f8f8f8;
}
#content #plugins #frame .entry dt,
#content #plugins #frame .entry .stats span
{
float: left;
width: 11%;
}
#content #plugins #frame .entry dd,
#content #plugins #frame .entry .stats ul
{
float: right;
width: 88%;
}
#content #plugins #frame .entry .stats ul
{
margin: 0;
padding: 0;
}
#content #plugins #frame .entry .stats dt
{
width: 27%;
}
#content #plugins #frame .entry .stats dd
{
width: 72%;
}

View File

@ -0,0 +1,132 @@
#content #query
{
background-image: url( ../../img/div.gif );
background-position: 22% 0;
background-repeat: repeat-y;
}
#content #query #form
{
float: left;
width: 21%;
}
#content #query #form label
{
cursor: pointer;
display: block;
margin-top: 5px;
}
#content #query #form input,
#content #query #form select,
#content #query #form textarea
{
margin-bottom: 2px;
width: 100%;
}
#content #query #form #start
{
float: left;
margin-right: 2%;
width: 49%;
}
#content #query #form #rows
{
width: 49%;
}
#content #query #form .checkbox input
{
margin-bottom: 0;
width: auto;
}
#content #query #form fieldset,
#content #query #form .optional.expanded
{
border: 1px solid #fff;
border-top: 1px solid #c0c0c0;
margin-bottom: 10px;
}
#content #query #form fieldset legend,
#content #query #form .optional.expanded legend
{
display: block;
margin-left: 10px;
padding: 0px 5px;
}
#content #query #form fieldset legend label
{
margin-top: 0;
}
#content #query #form fieldset .fieldset
{
border-bottom: 1px solid #f0f0f0;
margin-bottom: 5px;
padding-bottom: 5px;
}
#content #query #form .optional
{
border: 0;
}
#content #query #form .optional .fieldset
{
display: none;
}
#content #query #form .optional legend
{
margin-left: 0;
padding-left: 0;
}
#content #query #form .optional.expanded .fieldset
{
display: block;
}
#content #query #result
{
display: none;
float: right;
width: 77%;
}
#content #query #result #url
{
margin-bottom: 10px;
background-image: url( ../../img/ico/ui-address-bar.png );
background-position: 5px 50%;
border: 1px solid #f0f0f0;
box-shadow: 1px 1px 0 #f0f0f0;
-moz-box-shadow: 1px 1px 0 #f0f0f0;
-webkit-box-shadow: 1px 1px 0 #f0f0f0;
color: #c0c0c0;
display: block;
overflow: hidden;
padding: 5px;
padding-left: 26px;
white-space: nowrap;
}
#content #query #result #url:focus,
#content #query #result #url:hover
{
border-color: #c0c0c0;
box-shadow: 1px 1px 0 #d8d8d8;
-moz-box-shadow: 1px 1px 0 #d8d8d8;
-webkit-box-shadow: 1px 1px 0 #d8d8d8;
color: #333;
}
#content #query #result #response
{
}

View File

@ -0,0 +1,463 @@
#content #replication
{
background-image: url( ../../img/div.gif );
background-position: 21% 0;
background-repeat: repeat-y;
}
#content #replication #frame
{
float: right;
width: 78%;
}
#content #replication #navigation
{
float: left;
width: 20%;
}
#content #replication #error
{
background-color: #f00;
background-image: url( ../../img/ico/construction.png );
background-position: 10px 50%;
color: #fff;
display: none;
font-weight: bold;
margin-bottom: 20px;
padding: 10px;
padding-left: 35px;
}
#content #replication .block
{
border-bottom: 1px solid #c0c0c0;
margin-bottom: 20px;
padding-bottom: 20px;
}
#content #replication .block.last
{
border-bottom: 0;
}
#content #replication .masterOnly,
#content #replication .slaveOnly
{
display: none;
}
#content #replication.master .masterOnly
{
display: block;
}
#content #replication.slave .slaveOnly
{
display: block;
}
#content #replication .replicating
{
display: none;
}
#content #replication.replicating .replicating
{
display: block;
}
#content #replication #progress
{
padding-bottom: 80px;
position: relative;
}
#content #replication #progress .info
{
padding: 5px;
}
#content #replication #progress #start
{
margin-left: 100px;
border-left: 1px solid #c0c0c0;
}
#content #replication #progress #bar
{
background-color: #f0f0f0;
margin-left: 100px;
margin-right: 100px;
position: relative;
}
#content #replication #progress #bar #bar-info,
#content #replication #progress #bar #eta
{
position: absolute;
right: -100px;
width: 100px;
}
#content #replication #progress #bar #bar-info
{
border-left: 1px solid #f0f0f0;
margin-top: 30px;
}
#content #replication #progress #eta .info
{
color: #c0c0c0;
height: 30px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
#content #replication #progress #speed
{
color: #c0c0c0;
position: absolute;
right: 100px;
top: 0;
}
#content #replication #progress #bar #done
{
background-color: #c0c0c0;
box-shadow: 5px 5px 10px #c0c0c0;
-moz-box-shadow: 5px 5px 10px #c0c0c0;
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
height: 30px;
position: relative;
}
#content #replication #progress #bar #done .percent
{
font-weight: bold;
height: 30px;
line-height: 30px;
padding-left: 5px;
padding-right: 5px;
position: absolute;
right: 0;
text-align: right;
}
#content #replication #progress #bar #done #done-info
{
border-right: 1px solid #c0c0c0;
position: absolute;
right: 0;
margin-top: 30px;
text-align: right;
width: 100px;
}
#content #replication #progress #bar #done #done-info .percent
{
font-weight: bold;
}
#content #replication .block .label,
#content #replication #current-file .file,
#content #replication #current-file .progress,
#content #replication #iterations .iterations
{
float: left;
}
#content #replication .block .label
{
width: 100px;
}
#content #replication .block .label span
{
display: block;
padding-left: 21px;
}
#content #replication #current-file
{
border-top: 1px solid #f0f0f0;
margin-top: 10px;
padding-top: 10px;
}
#content #replication #current-file .progress
{
color: #c0c0c0;
margin-left: 20px;
}
#content #replication #iterations
{
display: none;
}
#content #replication #iterations .label span
{
background-image: url( ../../img/ico/node-design.png );
}
#content #replication #iterations .iterations li
{
background-position: 100% 50%;
display: none;
padding-right: 21px;
}
#content #replication #iterations .iterations.expanded li
{
display: block;
}
#content #replication #iterations .iterations .latest
{
display: block;
}
#content #replication #iterations .iterations .replicated
{
color: #80c480;
}
#content #replication #iterations .iterations ul:hover .replicated,
#content #replication #iterations .iterations .replicated.latest
{
color: #080;
}
#content #replication #iterations .iterations .replicated.latest
{
background-image: url( ../../img/ico/tick.png );
}
#content #replication #iterations .iterations .failed
{
color: #c48080;
}
#content #replication #iterations .iterations ul:hover .failed,
#content #replication #iterations .iterations .failed.latest
{
color: #800;
}
#content #replication #iterations .iterations .failed.latest
{
background-image: url( ../../img/ico/cross.png );
}
#content #replication #iterations .iterations a
{
border-top: 1px solid #f0f0f0;
display: none;
margin-top: 2px;
padding-top: 2px;
}
#content #replication #iterations .iterations a span
{
background-position: 0 50%;
color: #c0c0c0;
display: none;
padding-left: 21px;
}
#content #replication #iterations .iterations a span.expand
{
background-image: url( ../../img/ico/chevron-small-expand.png );
display: block;
}
#content #replication #iterations .iterations.expanded a span.expand
{
display: none;
}
#content #replication #iterations .iterations.expanded a span.collapse
{
background-image: url( ../../img/ico/chevron-small.png );
display: block;
}
#content #replication #details table
{
border-collapse: collapse;
}
#content #replication #details table th
{
text-align: left;
}
#content #replication.slave #details table .slaveOnly
{
display: table-row;
}
#content #replication #details table thead th
{
color: #c0c0c0;
}
#content #replication #details table thead th,
#content #replication #details table tbody td
{
padding-right: 20px;
}
#content #replication #details table thead td,
#content #replication #details table thead th,
#content #replication #details table tbody th,
#content #replication #details table tbody td div
{
padding-top: 3px;
padding-bottom: 3px;
}
#content #replication #details table tbody td,
#content #replication #details table tbody th
{
border-top: 1px solid #f0f0f0;
}
#content #replication #details table thead td
{
width: 100px;
}
#content #replication #details table thead td span
{
background-image: url( ../../img/ico/clipboard-list.png );
background-position: 0 50%;
display: block;
padding-left: 21px;
}
#content #replication #details table tbody th
{
padding-right: 10px;
text-align: right;
}
#content #replication #details table tbody .size
{
text-align: right;
white-space: nowrap;
}
#content #replication #details table tbody .generation div
{
text-align: center;
}
#content #replication #details table tbody .diff div
{
background-color: #fcfcc9;
padding-left: 1px;
padding-right: 1px;
}
#content #replication .settings .label span
{
background-image: url( ../../img/ico/hammer-screwdriver.png );
}
#content #replication .settings ul,
#content #replication .settings dl dt,
#content #replication .settings dl dd
{
float: left;
}
#content #replication .settings ul li
{
border-top: 1px solid #f0f0f0;
display: none;
padding-top: 3px;
padding-top: 3px;
}
#content #replication .settings ul li:first-child
{
border-top: 0;
padding-top: 0;
}
#content #replication .settings dl dt
{
clear: left;
margin-right: 5px;
width: 120px;
}
#content #replication .settings dl .ico
{
background-position: 0 50%;
padding-left: 21px;
}
#content #replication .settings dl .ico.ico-0
{
background-image: url( ../../img/ico/slash.png );
}
#content #replication .settings dl .ico.ico-1
{
background-image: url( ../../img/ico/tick.png );
}
#content #replication #navigation button
{
background-position: 2px 50%;
margin-bottom: 10px;
padding-left: 21px;
}
#content #replication #navigation button.optional
{
display: none;
}
#content #replication #navigation .replicate-now
{
background-image: url( ../../img/ico/document-convert.png );
}
#content #replication #navigation .abort-replication
{
background-color: #800;
background-image: url( ../../img/ico/hand.png );
border-color: #800;
color: #fff;
}
#content #replication #navigation .disable-polling
{
background-image: url( ../../img/ico/cross.png );
}
#content #replication #navigation .enable-polling
{
background-image: url( ../../img/ico/tick.png );
}
#content #replication #navigation .disable-replication
{
background-image: url( ../../img/ico/cross.png );
}
#content #replication #navigation .enable-replication
{
background-image: url( ../../img/ico/tick.png );
}
#content #replication #navigation .refresh-status
{
background-image: url( ../../img/ico/arrow-circle.png );
}

View File

@ -0,0 +1,345 @@
#content #schema-browser .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #schema-browser.loaded
{
background-image: url( ../../img/div.gif );
background-position: 21% 0;
background-repeat: repeat-y;
}
#content #schema-browser #data
{
float: right;
width: 78%;
}
#content #schema-browser #related
{
float: left;
width: 20%;
}
#content #schema-browser #related select
{
width: 100%;
}
#content #schema-browser #related select optgroup
{
font-style: normal;
padding: 5px;
}
#content #schema-browser #related select option
{
padding-left: 10px;
}
#content #schema-browser #related #f-df-t
{
border-bottom: 1px solid #f0f0f0;
padding-bottom: 15px;
}
#content #schema-browser #related dl
{
margin-top: 15px;
}
#content #schema-browser #related dl dt,
#content #schema-browser #related dl dd a
{
color: #c0c0c0;
}
#content #schema-browser #related dl dt
{
font-weight: bold;
margin-top: 5px;
}
#content #schema-browser #related dl dd a
{
display: block;
padding-left: 10px;
}
#content #schema-browser #related dl dd a:hover
{
background-color: #f8f8f8;
}
#content #schema-browser #related .field .field,
#content #schema-browser #related .field .field a,
#content #schema-browser #related .dynamic-field .dynamic-field,
#content #schema-browser #related .dynamic-field .dynamic-field a,
#content #schema-browser #related .type .type,
#content #schema-browser #related .type .type a,
#content #schema-browser #related .active,
#content #schema-browser #related .active a
{
color: #333;
}
#content #schema-browser #related .copyfield,
#content #schema-browser #related .copyfield a
{
color: #666;
}
#content #schema-browser #data
{
display: none;
}
#content #schema-browser #data #index dt
{
display: none;
float: left;
margin-right: 5px;
width: 150px;
}
#content #schema-browser #data #field .field-options
{
margin-bottom: 20px;
}
#content #schema-browser #data #field .field-options .options dt,
#content #schema-browser #data #field .field-options .options dd
{
float: left;
}
#content #schema-browser #data #field .field-options .options dt
{
clear: left;
display: none;
margin-right: 5px;
width: 100px;
}
#content #schema-browser #data #field .field-options .options dd
{
margin-right: 5px;
}
#content #schema-browser #data #field .field-options .analyzer,
#content #schema-browser #data #field .field-options .analyzer li,
#content #schema-browser #data #field .field-options .analyzer ul,
#content #schema-browser #data #field .field-options .analyzer ul li
{
display: none;
}
#content #schema-browser #data #field .field-options .analyzer p,
#content #schema-browser #data #field .field-options .analyzer dl
{
float: left;
}
#content #schema-browser #data #field .field-options .analyzer p
{
margin-right: 5px;
text-align: right;
width: 100px;
}
#content #schema-browser #data #field .field-options .analyzer li
{
border-top: 1px solid #f0f0f0;
margin-top: 10px;
padding-top: 10px;
}
#content #schema-browser #data #field .field-options .analyzer ul
{
clear: left;
display: block;
margin-left: 30px;
padding-top: 5px;
}
#content #schema-browser #data #field .field-options .analyzer ul li
{
border-top: 1px solid #f8f8f8;
margin-top: 5px;
padding-top: 5px;
}
#content #schema-browser #data #field .field-options .analyzer ul p
{
color: #999;
margin-right: 5px;
text-align: right;
width: 70px;
}
#content #schema-browser #data #field .field-options .analyzer ul dd
{
margin-left: 20px;
}
#content #schema-browser #data #field .field-options .analyzer ul dd
{
background-image: url( ../../img/ico/document-list.png );
background-position: 0 50%;
color: #c0c0c0;
padding-left: 21px;
}
#content #schema-browser #data #field .field-options .analyzer ul dd.ico-0
{
background-image: url( ../../img/ico/slash.png );
}
#content #schema-browser #data #field .field-options .analyzer ul dd.ico-1
{
background-image: url( ../../img/ico/tick.png );
}
#content #schema-browser #data #field .head
{
margin-bottom: 5px;
}
#content #schema-browser #data #field .topterms-holder
{
display: none;
float: left;
}
#content #schema-browser #data #field .topterms-holder .head .max-holder
{
color: #c0c0c0;
}
#content #schema-browser #data #field .topterms-holder table
{
border-collapse: collapse;
width: 100%;
}
#content #schema-browser #data #field .topterms-holder th,
#content #schema-browser #data #field .topterms-holder td
{
border: 1px solid #f0f0f0;
padding: 1px 4px;
}
#content #schema-browser #data #field .topterms-holder thead tr
{
background-color: #c0c0c0;
}
#content #schema-browser #data #field .topterms-holder thead th
{
text-align: left;
}
#content #schema-browser #data #field .topterms-holder tbody
{
display: none;
}
#content #schema-browser #data #field .topterms-holder tbody .odd
{
background-color: #f0f0f0;
}
#content #schema-browser #data #field .topterms-holder tbody .position
{
color: #c0c0c0;
text-align: right;
}
#content #schema-browser #data #field .topterms-holder .navi
{
margin-top: 5px;
}
#content #schema-browser #data #field .topterms-holder .navi a
{
color: #c0c0c0;
display: block;
padding-top: 2px;
padding-bottom: 2px;
width: 49%;
}
#content #schema-browser #data #field .topterms-holder .navi a:hover
{
background-color: #f8f8f8;
color: #333;
}
#content #schema-browser #data #field .topterms-holder .navi .less
{
float: left;
}
#content #schema-browser #data #field .topterms-holder .navi .less span
{
background-image: url( ../../img/ico/chevron-small.png );
background-position: 0 50%;
padding-left: 18px;
}
#content #schema-browser #data #field .topterms-holder .navi .more
{
float: right;
text-align: right;
}
#content #schema-browser #data #field .topterms-holder .navi .more span
{
background-image: url( ../../img/ico/chevron-small-expand.png );
background-position: 100% 50%;
padding-right: 18px;
}
#content #schema-browser #data #field .histogram-holder
{
display: none;
float: left;
margin-left: 50px;
}
#content #schema-browser #data #field .histogram-holder .histogram
{
height: 150px;
}
#content #schema-browser #data #field .histogram-holder dt,
#content #schema-browser #data #field .histogram-holder dd
{
float: left;
font-size: 10px;
text-align: center;
}
#content #schema-browser #data #field .histogram-holder span
{
background-color: #f0f0f0;
display: block;
width: 20px;
}
#content #schema-browser #data #field .histogram-holder dt
{
padding-right: 1px;
}
#content #schema-browser #data #field .histogram-holder dd
{
padding-right: 3px;
}
#content #schema-browser #data #field .histogram-holder dd span
{
width: 25px;
}

View File

@ -0,0 +1,167 @@
#content #threads .loader
{
background-position: 0 50%;
padding-left: 21px;
}
#content #threads #thread-dump table
{
border-collapse: collapse;
width: 100%;
}
#content #threads #thread-dump table .spacer,
#content #threads #thread-dump tbody .state
{
background-color: #fff;
border: 0;
}
#content #threads #thread-dump table th,
#content #threads #thread-dump table td
{
border: 1px solid #c0c0c0;
padding: 5px 3px;
vertical-align: top;
}
#content #threads #thread-dump thead th
{
background-color: #c8c8c8;
font-weight: bold;
text-align: left;
}
#content #threads #thread-dump thead th.name
{
width: 85%;
}
#content #threads #thread-dump thead th.time
{
text-align: right;
width: 15%;
}
#content #threads #thread-dump tbody .odd
{
background-color: #f0f0f0;
}
#content #threads #thread-dump tbody .RUNNABLE a
{
background-image: url( ../../img/ico/tick-circle.png );
}
#content #threads #thread-dump tbody .WAITING a,
#content #threads #thread-dump tbody .TIMED_WAITING .a
{
background-image: url( ../../img/ico/hourglass.png );
}
#content #threads #thread-dump tbody .WAITING.lock a,
#content #threads #thread-dump tbody .TIMED_WAITING.lock a
{
background-image: url( ../../img/ico/hourglass--exclamation.png );
}
#content #threads #thread-dump 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%;
cursor: auto;
display: block;
padding-left: 21px;
}
#content #threads #thread-dump tbody .stacktrace .name a
{
cursor: pointer;
}
#content #threads #thread-dump tbody .stacktrace .name a span
{
background-image: url( ../../img/ico/chevron-small-expand.png );
background-position: 100% 50%;
padding-right: 21px;
}
#content #threads #thread-dump tbody .stacktrace.open .name a span
{
background-image: url( ../../img/ico/chevron-small.png );
}
#content #threads #thread-dump tbody .name p
{
background-image: url( ../../img/ico/arrow-000-small.png );
background-position: 0 50%;
color: #c0c0c0;
font-size: 11px;
margin-left: 21px;
padding-left: 21px;
}
#content #threads #thread-dump tbody .name div
{
border-top: 1px solid #c0c0c0;
display: none;
margin-left: 21px;
margin-top: 5px;
padding-top: 5px;
}
#content #threads #thread-dump tbody .open .name div
{
display: block;
}
#content #threads #thread-dump tbody .name ul
{
list-style-type: disc;
margin-left: 0.7em;
padding-left: 0.7em;
}
#content #threads #thread-dump tbody .time
{
text-align: right;
}
#content #threads #thread-dump tbody .details
{
display: none;
}
#content #threads .controls
{
padding-top: 5px;
padding-bottom: 5px;
}
#content #threads .controls a
{
background-image: url( ../../img/ico/chevron-small-expand.png );
padding-left: 21px;
}
#content #threads.expanded .controls a
{
background-image: url( ../../img/ico/chevron-small.png );
}
#content #threads.expanded .controls .expand,
#content #threads.collapsed .controls .collapse
{
display: none;
}

View File

@ -11,7 +11,7 @@
<title>solr-admin</title>
<link rel="stylesheet" type="text/css" href="css/screen.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="icon" type="image/ico" href="img/favicon.ico">
<script type="text/javascript">
@ -107,15 +107,7 @@
</div>
<script type="text/javascript" src="js/0_console.js"></script>
<script type="text/javascript" src="js/1_jquery.js"></script>
<script type="text/javascript" src="js/jquery.timeago.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/jquery.sammy.js"></script>
<script type="text/javascript" src="js/jquery.sparkline.js"></script>
<script type="text/javascript" src="js/jquery.jstree.js"></script>
<script type="text/javascript" src="js/highlight.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script src="js/require.js" data-main="js/main"></script>
</body>
</html>

View File

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

View File

@ -0,0 +1,36 @@
require
(
[
'lib/order!lib/console',
'lib/order!jquery',
'lib/order!lib/jquery.form',
'lib/order!lib/jquery.jstree',
'lib/order!lib/jquery.sammy',
'lib/order!lib/jquery.sparkline',
'lib/order!lib/jquery.timeago',
'lib/order!lib/highlight',
'lib/order!scripts/app',
'lib/order!scripts/analysis',
'lib/order!scripts/cloud',
'lib/order!scripts/cores',
'lib/order!scripts/dataimport',
'lib/order!scripts/file',
'lib/order!scripts/index',
'lib/order!scripts/java-properties',
'lib/order!scripts/logging',
'lib/order!scripts/ping',
'lib/order!scripts/plugins',
'lib/order!scripts/query',
'lib/order!scripts/replication',
'lib/order!scripts/schema-browser',
'lib/order!scripts/threads',
'lib/order!scripts/dashboard'
],
function( $ )
{
app.run();
}
);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,420 @@
// #/:core/analysis
sammy.get
(
/^#\/([\w\d-]+)\/(analysis)$/,
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
$.get
(
'tpl/analysis.html',
function( template )
{
content_element
.html( template );
var analysis_element = $( '#analysis', content_element );
var analysis_form = $( 'form', analysis_element );
var analysis_result = $( '#analysis-result', analysis_element );
analysis_result.hide();
$.ajax
(
{
url : core_basepath + '/admin/luke?wt=json&show=schema',
dataType : 'json',
context : $( '#type_or_name', analysis_form ),
beforeSend : function( xhr, settings )
{
this
.html( '<option value="">Loading ... </option>' )
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
var content = '';
var fields = [];
for( var field_name in response.schema.fields )
{
fields.push
(
'<option value="fieldname=' + field_name + '">' + field_name + '</option>'
);
}
if( 0 !== fields.length )
{
content += '<optgroup label="Fields">' + "\n";
content += fields.sort().join( "\n" ) + "\n";
content += '</optgroup>' + "\n";
}
var types = [];
for( var type_name in response.schema.types )
{
types.push
(
'<option value="fieldtype=' + type_name + '">' + type_name + '</option>'
);
}
if( 0 !== types.length )
{
content += '<optgroup label="Types">' + "\n";
content += types.sort().join( "\n" ) + "\n";
content += '</optgroup>' + "\n";
}
this
.html( content );
$( 'option[value="fieldname\=' + response.schema.defaultSearchField + '"]', this )
.attr( 'selected', 'selected' );
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
this
.removeClass( 'loader' );
}
}
);
$( '.analysis-error .head a', analysis_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parents( '.analysis-error' )
.toggleClass( 'expanded' );
}
);
$( '.verbose_output a', analysis_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parent()
.toggleClass( 'active' );
analysis_result
.toggleClass( 'verbose_output' );
check_empty_spacer();
}
);
var check_empty_spacer = function()
{
var spacer_holder = $( 'td.part.data.spacer .holder', analysis_result );
if( 0 === spacer_holder.size() )
{
return false;
}
var verbose_output = analysis_result.hasClass( 'verbose_output' );
spacer_holder
.each
(
function( index, element )
{
element = $( element );
if( verbose_output )
{
var cell = element.parent();
element.height( cell.height() );
}
else
{
element.removeAttr( 'style' );
}
}
);
}
var button = $( 'button', analysis_form )
analysis_form
.ajaxForm
(
{
url : core_basepath + '/analysis/field?wt=json',
dataType : 'json',
beforeSubmit : function( array, form, options )
{
loader.show( button );
button.attr( 'disabled', true );
array.push( { name: 'analysis.showmatch', value: 'true' } );
var type_or_name = $( '#type_or_name', form ).val().split( '=' );
array.push( { name: 'analysis.' + type_or_name[0], value: type_or_name[1] } );
},
success : function( response, status_text, xhr, form )
{
$( '.analysis-error', analysis_element )
.hide();
analysis_result
.empty()
.show();
for( var name in response.analysis.field_names )
{
build_analysis_table( 'name', name, response.analysis.field_names[name] );
}
for( var name in response.analysis.field_types )
{
build_analysis_table( 'type', name, response.analysis.field_types[name] );
}
check_empty_spacer();
},
error : function( xhr, text_status, error_thrown )
{
analysis_result
.empty()
.hide();
if( 404 === xhr.status )
{
$( '#analysis-handler-missing', analysis_element )
.show();
}
else
{
var error_message = error_thrown.match( /^(.+Exception):\s+(.*)$/ );
$( '#analysis-error', analysis_element )
.show();
$( '#analysis-error .head a span', analysis_element )
.text( error_message[1] );
$( '#analysis-error .body', analysis_element )
.text( error_message[2].replace( /(\s+at\s+)/g, " at\n" ) );
}
},
complete : function()
{
loader.hide( $( 'button', analysis_form ) );
button.removeAttr( 'disabled' );
}
}
);
var generate_class_name = function( type )
{
var classes = [type];
if( 'text' !== type )
{
classes.push( 'verbose_output' );
}
return classes.join( ' ' );
}
var build_analysis_table = function( field_or_name, name, analysis_data )
{
for( var type in analysis_data )
{
var type_length = analysis_data[type].length;
if( 0 !== type_length )
{
var global_elements_count = 0;
for( var i = 0; i < analysis_data[type].length; i += 2 )
{
if( 'string' === typeof analysis_data[type][i+1] )
{
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 content = '<div class="' + type + '">' + "\n";
content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
for( var i = 0; i < analysis_data[type].length; i += 2 )
{
var colspan = 1;
var elements = analysis_data[type][i+1];
var elements_count = global_elements_count;
if( !elements[0].positionHistory )
{
colspan = elements_count;
elements_count = 1;
}
var legend = [];
for( var key in elements[0] )
{
var key_parts = key.split( '#' );
var used_key = key_parts.pop();
var short_key = used_key;
if( 1 === key_parts.length )
{
used_key = '<abbr title="' + key + '">' + used_key + '</abbr>';
}
if( 'positionHistory' === short_key || 'match' === short_key )
{
continue;
}
legend.push
(
'<tr class="' + generate_class_name( short_key ) + '">' +
'<td>' + used_key + '</td>' +
'</tr>'
);
}
content += '<tbody>' + "\n";
content += '<tr class="step">' + "\n";
// analyzer
var analyzer_name = analysis_data[type][i]
.replace( /(\$1)+$/g, '' );
var analyzer_short = -1 !== analyzer_name.indexOf( '$' )
? analyzer_name.split( '$' )[1]
: analyzer_name.split( '.' ).pop();
analyzer_short = analyzer_short.match( /[A-Z]/g ).join( '' );
content += '<td class="part analyzer"><div>' + "\n";
content += '<abbr title="' + analysis_data[type][i] + '">' + "\n";
content += analyzer_short + '</abbr></div></td>' + "\n";
// legend
content += '<td class="part legend"><div class="holder">' + "\n";
content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
content += '<tr><td>' + "\n";
content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
content += legend.join( "\n" ) + "\n";
content += '</table></td></tr></table></td>' + "\n";
// data
var cell_content = '<td class="part data spacer" '
+ ' colspan="' + colspan + '">'
+ '<div class="holder">&nbsp;</div>'
+ '</td>';
var cells = new Array( elements_count + 1 ).join( cell_content );
content += cells + "\n";
content += '</tr>' + "\n";
content += '</tbody>' + "\n";
}
content += '</table>' + "\n";
content += '</div>' + "\n";
$( '.' + type, analysis_result )
.remove();
analysis_result
.append( content );
var analysis_result_type = $( '.' + type, analysis_result );
for( var i = 0; i < analysis_data[type].length; i += 2 )
{
for( var j = 0; j < analysis_data[type][i+1].length; j += 1 )
{
var pos = analysis_data[type][i+1][j].positionHistory
? analysis_data[type][i+1][j].positionHistory[0]
: 1;
var selector = 'tr.step:eq(' + ( i / 2 ) +') '
+ 'td.data:eq(' + ( pos - 1 ) + ') '
+ '.holder';
var cell = $( selector, analysis_result_type );
cell.parent()
.removeClass( 'spacer' );
var table = $( 'table tr.details', cell );
if( 0 === table.size() )
{
cell
.html
(
'<table border="0" cellspacing="0" cellpadding="0">' +
'<tr class="details"></tr></table>'
);
var table = $( 'table tr.details', cell );
}
var tokens = [];
for( var key in analysis_data[type][i+1][j] )
{
var short_key = key.split( '#' ).pop();
if( 'positionHistory' === short_key || 'match' === short_key )
{
continue;
}
var classes = [];
classes.push( generate_class_name( short_key ) );
var data = analysis_data[type][i+1][j][key];
if( 'object' === typeof data && data instanceof Array )
{
data = data.join( ' ' );
}
if( 'string' === typeof data )
{
data = data.esc();
}
if( null === data || 0 === data.length )
{
classes.push( 'empty' );
data = '&empty;';
}
if( analysis_data[type][i+1][j].match &&
( 'text' === short_key || 'raw_bytes' === short_key ) )
{
classes.push( 'match' );
}
tokens.push
(
'<tr class="' + classes.join( ' ' ) + '">' +
'<td>' + data + '</td>' +
'</tr>'
);
}
table
.append
(
'<td class="details">' +
'<table border="0" cellspacing="0" cellpadding="0">' +
tokens.join( "\n" ) +
'</table></td>'
);
}
}
}
}
}
}
);
}
);

View File

@ -0,0 +1,263 @@
var loader = {
show : function( element )
{
$( element )
.addClass( 'loader' );
},
hide : function( element )
{
$( element )
.removeClass( 'loader' );
}
};
Number.prototype.esc = function()
{
return new String( this ).esc();
}
String.prototype.esc = function()
{
return this.replace( /</g, '&lt;' ).replace( />/g, '&gt;' );
}
var sammy = $.sammy
(
function()
{
this.bind
(
'run',
function( event, config )
{
if( 0 === config.start_url.length )
{
location.href = '#/';
return false;
}
}
);
// activate_core
this.before
(
{},
function( context )
{
$( 'li[id].active', app.menu_element )
.removeClass( 'active' );
$( 'ul li.active', app.menu_element )
.removeClass( 'active' );
if( this.params.splat )
{
var active_element = $( '#' + this.params.splat[0], app.menu_element );
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 );
return false;
}
active_element
.addClass( 'active' );
if( this.params.splat[1] )
{
$( '.' + this.params.splat[1], active_element )
.addClass( 'active' );
}
if( !active_element.hasClass( 'global' ) )
{
this.active_core = active_element;
}
}
}
);
}
);
var solr_admin = function( app_config )
{
self = this,
menu_element = null,
is_multicore = null,
cores_data = null,
active_core = null,
environment_basepath = null,
config = app_config,
params = null,
dashboard_values = null,
schema_browser_data = null,
plugin_data = null,
this.menu_element = $( '#menu ul' );
this.config = config;
this.run = function()
{
$.ajax
(
{
url : config.solr_path + config.core_admin_path + '?wt=json',
dataType : 'json',
beforeSend : function( arr, form, options )
{
$( '#content' )
.html( '<div id="index"><div class="loader">Loading ...</div></div>' );
},
success : function( response )
{
self.cores_data = response.status;
is_multicore = 'undefined' === typeof response.status[''];
if( is_multicore )
{
self.menu_element
.addClass( 'multicore' );
$( '#cores', menu_element )
.show();
}
else
{
self.menu_element
.addClass( 'singlecore' );
}
for( var core_name in response.status )
{
var core_path = config.solr_path + '/' + core_name;
if( !core_name )
{
core_name = 'singlecore';
core_path = config.solr_path
}
if( !environment_basepath )
{
environment_basepath = core_path;
}
var core_tpl = '<li id="' + core_name + '" data-basepath="' + core_path + '">' + "\n"
+ ' <p><a href="#/' + core_name + '">' + core_name + '</a></p>' + "\n"
+ ' <ul>' + "\n"
+ ' <li class="ping"><a rel="' + core_path + '/admin/ping"><span>Ping</span></a></li>' + "\n"
+ ' <li class="query"><a href="#/' + core_name + '/query"><span>Query</span></a></li>' + "\n"
+ ' <li class="schema"><a href="#/' + core_name + '/schema"><span>Schema</span></a></li>' + "\n"
+ ' <li class="config"><a href="#/' + core_name + '/config"><span>Config</span></a></li>' + "\n"
+ ' <li class="replication"><a href="#/' + core_name + '/replication"><span>Replication</span></a></li>' + "\n"
+ ' <li class="analysis"><a href="#/' + core_name + '/analysis"><span>Analysis</span></a></li>' + "\n"
+ ' <li class="schema-browser"><a href="#/' + core_name + '/schema-browser"><span>Schema Browser</span></a></li>' + "\n"
+ ' <li class="plugins"><a href="#/' + core_name + '/plugins"><span>Plugins</span></a></li>' + "\n"
+ ' <li class="dataimport"><a href="#/' + core_name + '/dataimport"><span>Dataimport</span></a></li>' + "\n"
+ ' </ul>' + "\n"
+ '</li>';
self.menu_element
.append( core_tpl );
}
$.ajax
(
{
url : environment_basepath + '/admin/system?wt=json',
dataType : 'json',
beforeSend : function( arr, form, options )
{
},
success : function( response )
{
self.dashboard_values = response;
var environment_args = null;
var cloud_args = null;
if( response.jvm && response.jvm.jmx && response.jvm.jmx.commandLineArgs )
{
var command_line_args = response.jvm.jmx.commandLineArgs.join( ' | ' );
environment_args = command_line_args
.match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i );
cloud_args = command_line_args
.match( /-Dzk/i );
}
// environment
var environment_element = $( '#environment' );
if( environment_args )
{
environment_element
.show();
if( environment_args[1] )
{
environment_element
.html( environment_args[1] );
}
if( environment_args[2] )
{
environment_element
.addClass( environment_args[2] );
}
}
else
{
environment_element
.remove();
}
// cloud
var cloud_nav_element = $( '#menu #cloud' );
if( cloud_args )
{
cloud_nav_element
.show();
}
// sammy
sammy.run( location.hash );
},
error : function()
{
},
complete : function()
{
loader.hide( this );
}
}
);
},
error : function()
{
},
complete : function()
{
}
}
);
}
};
var app = new solr_admin( app_config );

View File

@ -0,0 +1,174 @@
// #/cloud
sammy.get
(
/^#\/(cloud)$/,
function( context )
{
var content_element = $( '#content' );
$.get
(
'tpl/cloud.html',
function( template )
{
content_element
.html( template );
var cloud_element = $( '#cloud', content_element );
var cloud_content = $( '.content', cloud_element );
$.ajax
(
{
url : app.config.zookeeper_path,
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
}
}
);
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 )
{
}
}
);
}
);
}
);

View File

@ -0,0 +1,495 @@
sammy.bind
(
'cores_load_data',
function( event, params )
{
if( app.cores_data )
{
params.callback( app.cores_data );
return true;
}
$.ajax
(
{
url : app.config.solr_path + app.config.core_admin_path + '?wt=json',
dataType : 'json',
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
app.cores_data = response.status;
params.callback( app.cores_data );
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);
sammy.bind
(
'cores_build_navigation',
function( event, params )
{
var navigation_content = ['<ul>'];
for( var core in params.cores )
{
navigation_content.push( '<li><a href="' + params.basepath + core + '">' + core + '</a></li>' );
}
params.navigation_element
.html( navigation_content.join( "\n" ) );
$( 'a[href="' + params.basepath + params.current_core + '"]', params.navigation_element ).parent()
.addClass( 'current' );
}
);
sammy.bind
(
'cores_load_template',
function( event, params )
{
if( app.cores_template )
{
params.callback();
return true;
}
$.get
(
'tpl/cores.html',
function( template )
{
params.content_element
.html( template );
app.cores_template = template;
params.callback();
}
);
}
);
// #/cores
sammy.get
(
/^#\/(cores)$/,
function( context )
{
delete app.cores_template;
sammy.trigger
(
'cores_load_data',
{
callback : function( cores )
{
var first_core = null;
for( var key in cores )
{
if( !first_core )
{
first_core = key;
}
continue;
}
context.redirect( context.path + '/' + first_core );
}
}
);
}
);
// #/cores
sammy.get
(
/^#\/(cores)\//,
function( context )
{
var content_element = $( '#content' );
var path_parts = this.path.match( /^(.+\/cores\/)(.*)$/ );
var current_core = path_parts[2];
sammy.trigger
(
'cores_load_data',
{
callback : function( cores )
{
sammy.trigger
(
'cores_load_template',
{
content_element : content_element,
callback : function()
{
var cores_element = $( '#cores', content_element );
var navigation_element = $( '#navigation', cores_element );
var list_element = $( '#list', navigation_element );
var data_element = $( '#data', cores_element );
var core_data_element = $( '#core-data', data_element );
var index_data_element = $( '#index-data', data_element );
sammy.trigger
(
'cores_build_navigation',
{
cores : cores,
basepath : path_parts[1],
current_core : current_core,
navigation_element : list_element
}
);
var core_data = cores[current_core];
var core_basepath = $( '#' + current_core, app.menu_element ).attr( 'data-basepath' );
// core-data
$( 'h2 span', core_data_element )
.html( core_data.name );
$( '.startTime dd', core_data_element )
.html( core_data.startTime );
$( '.instanceDir dd', core_data_element )
.html( core_data.instanceDir );
$( '.dataDir dd', core_data_element )
.html( core_data.dataDir );
// index-data
$( '.lastModified dd', index_data_element )
.html( core_data.index.lastModified );
$( '.version dd', index_data_element )
.html( core_data.index.version );
$( '.numDocs dd', index_data_element )
.html( core_data.index.numDocs );
$( '.maxDoc dd', index_data_element )
.html( core_data.index.maxDoc );
$( '.optimized dd', index_data_element )
.addClass( core_data.index.optimized ? 'ico-1' : 'ico-0' );
$( '#actions .optimize', cores_element )
.show();
$( '.optimized dd span', index_data_element )
.html( core_data.index.optimized ? 'yes' : 'no' );
$( '.current dd', index_data_element )
.addClass( core_data.index.current ? 'ico-1' : 'ico-0' );
$( '.current dd span', index_data_element )
.html( core_data.index.current ? 'yes' : 'no' );
$( '.hasDeletions dd', index_data_element )
.addClass( core_data.index.hasDeletions ? 'ico-1' : 'ico-0' );
$( '.hasDeletions dd span', index_data_element )
.html( core_data.index.hasDeletions ? 'yes' : 'no' );
$( '.directory dd', index_data_element )
.html
(
core_data.index.directory
.replace( /:/g, ':&#8203;' )
.replace( /@/g, '@&#8203;' )
);
var core_names = [];
var core_selects = $( '#actions select', cores_element );
for( var key in cores )
{
core_names.push( '<option value="' + key + '">' + key + '</option>' )
}
core_selects
.html( core_names.join( "\n") );
$( 'option[value="' + current_core + '"]', core_selects.filter( '#swap_core' ) )
.attr( 'selected', 'selected' );
$( 'option[value="' + current_core + '"]', core_selects.filter( '.other' ) )
.attr( 'disabled', 'disabled' )
.addClass( 'disabled' );
$( 'input[name="core"]', cores_element )
.val( current_core );
// layout
var actions_element = $( '.actions', cores_element );
var button_holder_element = $( '.button-holder.options', actions_element );
button_holder_element
.die( 'toggle' )
.live
(
'toggle',
function( event )
{
var element = $( this );
element
.toggleClass( 'active' );
if( element.hasClass( 'active' ) )
{
button_holder_element
.not( element )
.removeClass( 'active' );
}
}
);
$( '.button a', button_holder_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parents( '.button-holder' )
.trigger( 'toggle' );
}
);
$( 'form a.submit', button_holder_element )
.die( 'click' )
.live
(
'click',
function( event )
{
var element = $( this );
var form_element = element.parents( 'form' );
var action = $( 'input[name="action"]', form_element ).val().toLowerCase();
form_element
.ajaxSubmit
(
{
url : app.config.solr_path + app.config.core_admin_path + '?wt=json',
dataType : 'json',
beforeSubmit : function( array, form, options )
{
//loader
},
success : function( response, status_text, xhr, form )
{
delete app.cores_data;
if( 'rename' === action )
{
context.redirect( path_parts[1] + $( 'input[name="other"]', form_element ).val() );
}
else if( 'swap' === action )
{
window.location.reload();
}
$( 'a.reset', form )
.trigger( 'click' );
},
error : function( xhr, text_status, error_thrown )
{
},
complete : function()
{
//loader
}
}
);
return false;
}
);
$( 'form a.reset', button_holder_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parents( 'form' )
.resetForm();
$( this ).parents( '.button-holder' )
.trigger( 'toggle' );
return false;
}
);
var reload_button = $( '#actions .reload', cores_element );
reload_button
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : app.config.solr_path + app.config.core_admin_path + '?wt=json&action=RELOAD&core=' + current_core,
dataType : 'json',
context : $( this ),
beforeSend : function( xhr, settings )
{
this
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
this
.addClass( 'success' );
window.setTimeout
(
function()
{
reload_button
.removeClass( 'success' );
},
5000
);
},
error : function( xhr, text_status, error_thrown )
{
},
complete : function( xhr, text_status )
{
this
.removeClass( 'loader' );
}
}
);
}
);
$( '#actions .unload', cores_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : app.config.solr_path + app.config.core_admin_path + '?wt=json&action=UNLOAD&core=' + current_core,
dataType : 'json',
context : $( this ),
beforeSend : function( xhr, settings )
{
this
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
delete app.cores_data;
context.redirect( path_parts[1].substr( 0, path_parts[1].length - 1 ) );
},
error : function( xhr, text_status, error_thrown )
{
},
complete : function( xhr, text_status )
{
this
.removeClass( 'loader' );
}
}
);
}
);
var optimize_button = $( '#actions .optimize', cores_element );
optimize_button
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json',
dataType : 'json',
context : $( this ),
beforeSend : function( xhr, settings )
{
this
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
this
.addClass( 'success' );
window.setTimeout
(
function()
{
optimize_button
.removeClass( 'success' );
},
5000
);
$( '.optimized dd.ico-0', index_data_element )
.removeClass( 'ico-0' )
.addClass( 'ico-1' );
},
error : function( xhr, text_status, error_thrown)
{
console.warn( 'd0h, optimize broken!' );
},
complete : function( xhr, text_status )
{
this
.removeClass( 'loader' );
}
}
);
}
);
$( '.timeago', data_element )
.timeago();
$( 'ul', data_element )
.each
(
function( i, element )
{
$( 'li:odd', element )
.addClass( 'odd' );
}
)
}
}
);
}
}
);
}
);

View File

@ -0,0 +1,400 @@
// #/:core
sammy.get
(
/^#\/([\w\d-]+)$/,
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
content_element
.removeClass( 'single' );
var core_menu = $( 'ul', this.active_core );
if( !core_menu.data( 'admin-extra-loaded' ) )
{
core_menu.data( 'admin-extra-loaded', new Date() );
$.get
(
core_basepath + '/admin/file/?file=admin-extra.menu-top.html',
function( menu_extra )
{
core_menu
.prepend( menu_extra );
}
);
$.get
(
core_basepath + '/admin/file/?file=admin-extra.menu-bottom.html',
function( menu_extra )
{
core_menu
.append( menu_extra );
}
);
}
$.get
(
'tpl/dashboard.html',
function( template )
{
content_element
.html( template );
var dashboard_element = $( '#dashboard' );
$.ajax
(
{
url : core_basepath + '/admin/luke?wt=json&show=index&numTerms=0',
dataType : 'json',
context : $( '#statistics', dashboard_element ),
beforeSend : function( xhr, settings )
{
$( 'h2', this )
.addClass( 'loader' );
$( '.message', this )
.show()
.html( 'Loading ...' );
$( '.content' )
.hide();
},
success : function( response, text_status, xhr )
{
$( '.message', this )
.empty()
.hide();
$( '.content', this )
.show();
var data = {
'index_num-docs' : response['index']['numDocs'],
'index_max-doc' : response['index']['maxDoc'],
'index_version' : response['index']['version'],
'index_segmentCount' : response['index']['segmentCount'],
'index_last-modified' : response['index']['lastModified']
};
for( var key in data )
{
$( '.' + key, this )
.show();
$( '.value.' + key, this )
.html( data[key] );
}
var optimized_element = $( '.value.index_optimized', this );
if( !response['index']['hasDeletions'] )
{
optimized_element
.addClass( 'ico-1' );
$( 'span', optimized_element )
.html( 'yes' );
}
else
{
optimized_element
.addClass( 'ico-0' );
$( 'span', optimized_element )
.html( 'no' );
}
var current_element = $( '.value.index_current', this );
if( response['index']['current'] )
{
current_element
.addClass( 'ico-1' );
$( 'span', current_element )
.html( 'yes' );
}
else
{
current_element
.addClass( 'ico-0' );
$( 'span', current_element )
.html( 'no' );
}
$( 'a', optimized_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json',
dataType : 'json',
context : $( this ),
beforeSend : function( xhr, settings )
{
this
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
this.parents( 'dd' )
.removeClass( 'ico-0' )
.addClass( 'ico-1' );
},
error : function( xhr, text_status, error_thrown)
{
console.warn( 'd0h, optimize broken!' );
},
complete : function( xhr, text_status )
{
this
.removeClass( 'loader' );
}
}
);
}
);
$( '.timeago', this )
.timeago();
},
error : function( xhr, text_status, error_thrown )
{
this
.addClass( 'disabled' );
$( '.message', this )
.show()
.html( 'Luke is not configured' );
},
complete : function( xhr, text_status )
{
$( 'h2', this )
.removeClass( 'loader' );
}
}
);
$.ajax
(
{
url : core_basepath + '/replication?command=details&wt=json',
dataType : 'json',
context : $( '#replication', dashboard_element ),
beforeSend : function( xhr, settings )
{
$( 'h2', this )
.addClass( 'loader' );
$( '.message', this )
.show()
.html( 'Loading' );
$( '.content', this )
.hide();
},
success : function( response, text_status, xhr )
{
$( '.message', this )
.empty()
.hide();
$( '.content', this )
.show();
$( '.replication', context.active_core )
.show();
var data = response.details;
var is_slave = 'undefined' !== typeof( data.slave );
var headline = $( 'h2 span', this );
var details_element = $( '#details', this );
var current_type_element = $( ( is_slave ? '.slave' : '.master' ), this );
if( is_slave )
{
this
.addClass( 'slave' );
headline
.html( headline.html() + ' (Slave)' );
}
else
{
this
.addClass( 'master' );
headline
.html( headline.html() + ' (Master)' );
}
$( '.version div', current_type_element )
.html( data.indexVersion );
$( '.generation div', current_type_element )
.html( data.generation );
$( '.size div', current_type_element )
.html( data.indexSize );
if( is_slave )
{
var master_element = $( '.master', details_element );
$( '.version div', master_element )
.html( data.slave.masterDetails.indexVersion );
$( '.generation div', master_element )
.html( data.slave.masterDetails.generation );
$( '.size div', master_element )
.html( data.slave.masterDetails.indexSize );
if( data.indexVersion !== data.slave.masterDetails.indexVersion )
{
$( '.version', details_element )
.addClass( 'diff' );
}
else
{
$( '.version', details_element )
.removeClass( 'diff' );
}
if( data.generation !== data.slave.masterDetails.generation )
{
$( '.generation', details_element )
.addClass( 'diff' );
}
else
{
$( '.generation', details_element )
.removeClass( 'diff' );
}
}
},
error : function( xhr, text_status, error_thrown)
{
this
.addClass( 'disabled' );
$( '.message', this )
.show()
.html( 'Replication is not configured' );
},
complete : function( xhr, text_status )
{
$( 'h2', this )
.removeClass( 'loader' );
}
}
);
$.ajax
(
{
url : core_basepath + '/dataimport?command=details&wt=json',
dataType : 'json',
context : $( '#dataimport', dashboard_element ),
beforeSend : function( xhr, settings )
{
$( 'h2', this )
.addClass( 'loader' );
$( '.message', this )
.show()
.html( 'Loading' );
},
success : function( response, text_status, xhr )
{
$( '.message', this )
.empty()
.hide();
$( 'dl', this )
.show();
var data = {
'status' : response['status'],
'info' : response['statusMessages']['']
};
for( var key in data )
{
$( '.' + key, this )
.show();
$( '.value.' + key, this )
.html( data[key] );
}
},
error : function( xhr, text_status, error_thrown)
{
this
.addClass( 'disabled' );
$( '.message', this )
.show()
.html( 'Dataimport is not configured' );
},
complete : function( xhr, text_status )
{
$( 'h2', this )
.removeClass( 'loader' );
}
}
);
$.ajax
(
{
url : core_basepath + '/admin/file/?file=admin-extra.html',
dataType : 'html',
context : $( '#admin-extra', dashboard_element ),
beforeSend : function( xhr, settings )
{
$( 'h2', this )
.addClass( 'loader' );
$( '.message', this )
.show()
.html( 'Loading' );
$( '.content', this )
.hide();
},
success : function( response, text_status, xhr )
{
$( '.message', this )
.hide()
.empty();
$( '.content', this )
.show()
.html( response );
},
error : function( xhr, text_status, error_thrown)
{
this
.addClass( 'disabled' );
$( '.message', this )
.show()
.html( 'We found no "admin-extra.html" file.' );
},
complete : function( xhr, text_status )
{
$( 'h2', this )
.removeClass( 'loader' );
}
}
);
}
);
}
);

View File

@ -0,0 +1,452 @@
sammy.bind
(
'dataimport_queryhandler_load',
function( event, params )
{
var core_basepath = params.active_core.attr( 'data-basepath' );
$.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' )
{
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 )
{
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',
{
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();
}
}
);
// 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.replace( /\</g, '&lt;' ).replace( /\>/g, '&gt;' ) +
'</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
.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 )
.die( 'submit' )
.live
(
'submit',
function( event )
{
$.ajax
(
{
url : handler_url + '?command=full-import',
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 )
{
}
}
);
return false;
}
);
}
);
}
);

View File

@ -0,0 +1,37 @@
// #/:core/schema, #/:core/config
sammy.get
(
/^#\/([\w\d-]+)\/(schema|config)$/,
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
$.ajax
(
{
url : core_basepath + app.config[ context.params.splat[1] + '_path' ],
dataType : 'xml',
context : $( '#content' ),
beforeSend : function( xhr, settings )
{
this
.html( '<div class="loader">Loading ...</div>' );
},
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) );
}
}
}
);
}
);

View File

@ -0,0 +1,184 @@
// #/
sammy.get
(
/^#\/$/,
function( context )
{
var content_element = $( '#content' );
$( '#index', app.menu_element )
.addClass( 'active' );
content_element
.html( '<div id="index"></div>' );
$.ajax
(
{
url : 'tpl/index.html',
context : $( '#index', content_element ),
beforeSend : function( arr, form, options )
{
},
success : function( template )
{
this
.html( template );
var jvm_memory = $.extend
(
{
'free' : null,
'total' : null,
'max' : null,
'used' : null,
'raw' : {
'free' : null,
'total' : null,
'max' : null,
'used' : null,
'used%' : null
}
},
app.dashboard_values['jvm']['memory']
);
var parse_memory_value = function( value )
{
if( value !== Number( value ) )
{
var units = 'BKMGTPEZY';
var match = value.match( /^(\d+([,\.]\d+)?) (\w)\w?$/ );
var value = parseFloat( match[1] ) * Math.pow( 1024, units.indexOf( match[3].toUpperCase() ) );
}
return value;
};
var memory_data = {
'memory-bar-max' : parse_memory_value( jvm_memory['raw']['max'] || jvm_memory['max'] ),
'memory-bar-total' : parse_memory_value( jvm_memory['raw']['total'] || jvm_memory['total'] ),
'memory-bar-used' : parse_memory_value( jvm_memory['raw']['used'] || jvm_memory['used'] )
};
for( var key in memory_data )
{
$( '.value.' + key, this )
.text( memory_data[key] );
}
var data = {
'start_time' : app.dashboard_values['jvm']['jmx']['startTime'],
'host' : app.dashboard_values['core']['host'],
'jvm' : app.dashboard_values['jvm']['name'] + ' (' + app.dashboard_values['jvm']['version'] + ')',
'solr_spec_version' : app.dashboard_values['lucene']['solr-spec-version'],
'solr_impl_version' : app.dashboard_values['lucene']['solr-impl-version'],
'lucene_spec_version' : app.dashboard_values['lucene']['lucene-spec-version'],
'lucene_impl_version' : app.dashboard_values['lucene']['lucene-impl-version']
};
if( app.dashboard_values['core']['directory']['cwd'] )
{
data['cwd'] = app.dashboard_values['core']['directory']['cwd'];
}
for( var key in data )
{
var value_element = $( '.' + key + ' dd', this );
value_element
.text( data[key] );
value_element.closest( 'li' )
.show();
}
var commandLineArgs = app.dashboard_values['jvm']['jmx']['commandLineArgs'];
if( 0 !== commandLineArgs.length )
{
var cmd_arg_element = $( '.command_line_args dt', this );
var cmd_arg_key_element = $( '.command_line_args dt', this );
var cmd_arg_element = $( '.command_line_args dd', this );
for( var key in commandLineArgs )
{
cmd_arg_element = cmd_arg_element.clone();
cmd_arg_element.text( commandLineArgs[key] );
cmd_arg_key_element
.after( cmd_arg_element );
}
cmd_arg_key_element.closest( 'li' )
.show();
$( '.command_line_args dd:last', this )
.remove();
$( '.command_line_args dd:odd', this )
.addClass( 'odd' );
}
$( '.timeago', this )
.timeago();
$( 'li:visible:odd', this )
.addClass( 'odd' );
// -- memory bar
var max_height = Math.round( $( '#memory-bar-max', this ).height() );
var total_height = Math.round( ( memory_data['memory-bar-total'] * max_height ) / memory_data['memory-bar-max'] );
var used_height = Math.round( ( memory_data['memory-bar-used'] * max_height ) / memory_data['memory-bar-max'] );
var memory_bar_total_value = $( '#memory-bar-total span', this ).first();
$( '#memory-bar-total', this )
.height( total_height );
$( '#memory-bar-used', this )
.height( used_height );
if( used_height < total_height + memory_bar_total_value.height() )
{
memory_bar_total_value
.addClass( 'upper' )
.css( 'margin-top', memory_bar_total_value.height() * -1 );
}
var memory_percentage = ( ( memory_data['memory-bar-used'] / memory_data['memory-bar-max'] ) * 100 ).toFixed(1);
var headline = $( '#memory h2 span', this );
headline
.text( headline.html() + ' (' + memory_percentage + '%)' );
$( '#memory-bar .value', this )
.each
(
function()
{
var self = $( this );
var byte_value = parseInt( self.html() );
self
.attr( 'title', 'raw: ' + byte_value + ' B' );
byte_value /= 1024;
byte_value /= 1024;
byte_value = byte_value.toFixed( 2 ) + ' MB';
self
.text( byte_value );
}
);
},
error : function( xhr, text_status, error_thrown )
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);

View File

@ -0,0 +1,84 @@
// #/java-properties
sammy.get
(
/^#\/(java-properties)$/,
function( context )
{
var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
var content_element = $( '#content' );
content_element
.html( '<div id="java-properties"></div>' );
$.ajax
(
{
url : core_basepath + '/admin/properties?wt=json',
dataType : 'json',
context : $( '#java-properties', content_element ),
beforeSend : function( xhr, settings )
{
this
.html( '<div class="loader">Loading ...</div>' );
},
success : function( response, text_status, xhr )
{
var system_properties = response['system.properties'];
var properties_data = {};
var properties_content = [];
var properties_order = [];
for( var key in system_properties )
{
var displayed_key = key.replace( /\./g, '.&#8203;' );
var displayed_value = [ system_properties[key] ];
var item_class = 'clearfix';
if( -1 !== key.indexOf( '.path' ) || -1 !== key.indexOf( '.dirs' ) )
{
displayed_value = system_properties[key].split( system_properties['path.separator'] );
if( 1 < displayed_value.length )
{
item_class += ' multi';
}
}
var item_content = '<li><dl class="' + item_class + '">' + "\n" +
'<dt>' + displayed_key.esc() + '</dt>' + "\n";
for( var i in displayed_value )
{
item_content += '<dd>' + displayed_value[i].esc() + '</dd>' + "\n";
}
item_content += '</dl></li>';
properties_data[key] = item_content;
properties_order.push( key );
}
properties_order.sort();
for( var i in properties_order )
{
properties_content.push( properties_data[properties_order[i]] );
}
this
.html( '<ul>' + properties_content.join( "\n" ) + '</ul>' );
$( 'li:odd', this )
.addClass( 'odd' );
$( '.multi dd:odd', this )
.addClass( 'odd' );
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);

View File

@ -0,0 +1,164 @@
// #/logging
sammy.get
(
/^#\/(logging)$/,
function( context )
{
var content_element = $( '#content' );
content_element
.html( '<div id="logging"></div>' );
$.ajax
(
{
url : 'logging.json',
dataType : 'json',
context : $( '#logging', content_element ),
beforeSend : function( xhr, settings )
{
this
.html( '<div class="loader">Loading ...</div>' );
},
success : function( response, text_status, xhr )
{
var logger = response.logger;
var loglevel = '<div class="loglevel %class%">' + "\n";
loglevel += '<a class="effective_level trigger"><span>%effective_level%</span></a>' + "\n";
loglevel += '<ul>' + "\n";
for( var key in response.levels )
{
var level = response.levels[key].esc();
loglevel += '<li class="' + level + '"><a>' + level + '</a></li>' + "\n";
}
loglevel += '<li class="UNSET"><a>UNSET</a></li>' + "\n";
loglevel += '</ul>' + "\n";
loglevel += '</div>';
var logger_tree = function( filter )
{
var logger_content = '';
var filter_regex = new RegExp( '^' + filter + '\\.\\w+$' );
for( var logger_name in logger )
{
var continue_matcher = false;
if( !filter )
{
continue_matcher = logger_name.indexOf( '.' ) !== -1;
}
else
{
continue_matcher = !logger_name.match( filter_regex );
}
if( continue_matcher )
{
continue;
}
var has_logger_instance = !!logger[logger_name];
var classes = [];
has_logger_instance
? classes.push( 'active' )
: classes.push( 'inactive' );
logger_content += '<li class="jstree-leaf">';
logger_content += '<ins class="jstree-icon">&nbsp;</ins>';
logger_content += '<a class="trigger ' + classes.join( ' ' ) + '" ' + "\n" +
'title="' + logger_name.esc() + '"><span>' + "\n" +
logger_name.split( '.' ).pop().esc() + "\n" +
'</span></a>';
logger_content += loglevel
.replace
(
/%class%/g,
classes.join( ' ' )
)
.replace
(
/%effective_level%/g,
has_logger_instance
? logger[logger_name].effective_level
: 'null'
);
var child_logger_content = logger_tree( logger_name );
if( child_logger_content )
{
logger_content += '<ul>';
logger_content += child_logger_content;
logger_content += '</ul>';
}
logger_content += '</li>';
}
return logger_content;
}
var logger_content = logger_tree( null );
this
.html( '<ul class="tree jstree">' + logger_content + '</ul>' );
$( 'li:last-child', this )
.addClass( 'jstree-last' );
$( '.loglevel', this )
.each
(
function( index, element )
{
var element = $( element );
var effective_level = $( '.effective_level span', element ).text();
element
.css( 'z-index', 800 - index );
$( 'ul .' + effective_level, element )
.addClass( 'selected' );
}
);
$( '.trigger', this )
.die( 'click' )
.live
(
'click',
function( event )
{
$( '.loglevel', $( this ).parents( 'li' ).first() ).first()
.trigger( 'toggle' );
}
);
$( '.loglevel', this )
.die( 'toggle')
.live
(
'toggle',
function( event )
{
$( this )
.toggleClass( 'open' );
}
);
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);

View File

@ -0,0 +1,58 @@
$( '.ping a', app.menu_element )
.live
(
'click',
function( event )
{
$.ajax
(
{
url : $( this ).attr( 'rel' ) + '?wt=json&ts=' + (new Date).getTime(),
dataType : 'json',
context: this,
beforeSend : function( arr, form, options )
{
loader.show( this );
},
success : function( response, text_status, xhr )
{
$( this )
.removeAttr( 'title' );
$( this ).parents( 'li' )
.removeClass( 'error' );
var qtime_element = $( '.qtime', this );
if( 0 === qtime_element.size() )
{
qtime_element = $( '<small class="qtime"> (<span></span>)</small>' );
$( this )
.append
(
qtime_element
);
}
$( 'span', qtime_element )
.html( response.responseHeader.QTime + 'ms' );
},
error : function( xhr, text_status, error_thrown )
{
$( this )
.attr( 'title', '/admin/ping is not configured (' + xhr.status + ': ' + error_thrown + ')' );
$( this ).parents( 'li' )
.addClass( 'error' );
},
complete : function( xhr, text_status )
{
loader.hide( this );
}
}
);
return false;
}
);

View File

@ -0,0 +1,259 @@
sammy.bind
(
'plugins_load',
function( event, params )
{
var callback = function()
{
params.callback( app.plugin_data.plugin_data, app.plugin_data.sort_table, app.plugin_data.types );
}
if( app.plugin_data )
{
callback( app.plugin_data );
return true;
}
var core_basepath = params.active_core.attr( 'data-basepath' );
$.ajax
(
{
url : core_basepath + '/admin/mbeans?stats=true&wt=json',
dataType : 'json',
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
var types = [];
var sort_table = {};
var plugin_data = {};
var types_obj = {};
var plugin_key = null;
for( var i = 0; i < response['solr-mbeans'].length; i++ )
{
if( !( i % 2 ) )
{
plugin_key = response['solr-mbeans'][i];
}
else
{
plugin_data[plugin_key] = response['solr-mbeans'][i];
}
}
for( var key in plugin_data )
{
sort_table[key] = {
url : [],
component : [],
handler : []
};
for( var part_key in plugin_data[key] )
{
if( 0 < part_key.indexOf( '.' ) )
{
types_obj[key] = true;
sort_table[key]['handler'].push( part_key );
}
else if( 0 === part_key.indexOf( '/' ) )
{
types_obj[key] = true;
sort_table[key]['url'].push( part_key );
}
else
{
types_obj[key] = true;
sort_table[key]['component'].push( part_key );
}
}
}
for( var type in types_obj )
{
types.push( type );
}
types.sort();
app.plugin_data = {
'plugin_data' : plugin_data,
'sort_table' : sort_table,
'types' : types
}
$.get
(
'tpl/plugins.html',
function( template )
{
$( '#content' )
.html( template );
callback( app.plugin_data );
}
);
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);
// #/:core/plugins/$type
sammy.get
(
/^#\/([\w\d-]+)\/(plugins)\/(\w+)$/,
function( context )
{
var content_element = $( '#content' );
var type = context.params.splat[2].toUpperCase();
var context_path = context.path.split( '?' ).shift();
sammy.trigger
(
'plugins_load',
{
active_core : this.active_core,
callback : function( plugin_data, plugin_sort, types )
{
var frame_element = $( '#frame', content_element );
var navigation_element = $( '#navigation ul', content_element );
var navigation_content = [];
for( var i = 0; i < types.length; i++ )
{
var type_url = context.params.splat[0] + '/' +
context.params.splat[1] + '/' +
types[i].toLowerCase();
navigation_content.push
(
'<li class="' + types[i].toLowerCase() + '">' +
'<a href="#/' + type_url + '">' + types[i] + '</a>' +
'</li>'
);
}
navigation_element
.html( navigation_content.join( "\n" ) );
$( 'a[href="' + context_path + '"]', navigation_element )
.parent().addClass( 'current' );
var content = '<ul>';
for( var sort_key in plugin_sort[type] )
{
plugin_sort[type][sort_key].sort();
var plugin_type_length = plugin_sort[type][sort_key].length;
for( var i = 0; i < plugin_type_length; i++ )
{
content += '<li class="entry">' + "\n";
content += '<a href="' + context_path + '?entry=' + plugin_sort[type][sort_key][i] + '">';
content += plugin_sort[type][sort_key][i]
content += '</a>' + "\n";
content += '<ul class="detail">' + "\n";
var details = plugin_data[type][ plugin_sort[type][sort_key][i] ];
for( var detail_key in details )
{
if( 'stats' !== detail_key )
{
var detail_value = details[detail_key];
if( 'description' === detail_key )
{
detail_value = detail_value.replace( /,/g, ',&#8203;' );
}
else if( 'src' === detail_key )
{
detail_value = detail_value.replace( /\//g, '/&#8203;' );
}
content += '<li><dl class="clearfix">' + "\n";
content += '<dt>' + detail_key + ':</dt>' + "\n";
content += '<dd>' + detail_value + '</dd>' + "\n";
content += '</dl></li>' + "\n";
}
else if( 'stats' === detail_key && details[detail_key] )
{
content += '<li class="stats clearfix">' + "\n";
content += '<span>' + detail_key + ':</span>' + "\n";
content += '<ul>' + "\n";
for( var stats_key in details[detail_key] )
{
var stats_value = details[detail_key][stats_key];
if( 'readerDir' === stats_key )
{
stats_value = stats_value.replace( /@/g, '@&#8203;' );
}
content += '<li><dl class="clearfix">' + "\n";
content += '<dt>' + stats_key + ':</dt>' + "\n";
content += '<dd>' + stats_value + '</dd>' + "\n";
content += '</dl></li>' + "\n";
}
content += '</ul></li>' + "\n";
}
}
content += '</ul>' + "\n";
}
}
content += '</ul>' + "\n";
frame_element
.html( content );
$( 'a[href="' + decodeURIComponent( context.path ) + '"]', frame_element )
.parent().addClass( 'expanded' );
$( '.entry', frame_element )
.each
(
function( i, entry )
{
$( '.detail > li', entry ).not( '.stats' ).filter( ':even' )
.addClass( 'odd' );
$( '.stats li:odd', entry )
.addClass( 'odd' );
}
);
}
}
);
}
);
// #/:core/plugins
sammy.get
(
/^#\/([\w\d-]+)\/(plugins)$/,
function( context )
{
delete app.plugin_data;
sammy.trigger
(
'plugins_load',
{
active_core : this.active_core,
callback : function( plugin_data, plugin_sort, types )
{
context.redirect( context.path + '/' + types[0].toLowerCase() );
}
}
);
}
);

View File

@ -0,0 +1,142 @@
// #/:core/query
sammy.get
(
/^#\/([\w\d-]+)\/(query)$/,
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
$.get
(
'tpl/query.html',
function( template )
{
content_element
.html( template );
var query_element = $( '#query', content_element );
var query_form = $( '#form form', query_element );
var url_element = $( '#url', query_element );
var result_element = $( '#result', query_element );
var response_element = $( '#response iframe', result_element );
url_element
.die( 'change' )
.live
(
'change',
function( event )
{
var check_iframe_ready_state = function()
{
var iframe_element = response_element.get(0).contentWindow.document ||
response_element.get(0).document;
if( !iframe_element )
{
console.debug( 'no iframe_element found', response_element );
return false;
}
url_element
.addClass( 'loader' );
if( 'complete' === iframe_element.readyState )
{
url_element
.removeClass( 'loader' );
}
else
{
window.setTimeout( check_iframe_ready_state, 100 );
}
}
check_iframe_ready_state();
response_element
.attr( 'src', this.href );
if( !response_element.hasClass( 'resized' ) )
{
response_element
.addClass( 'resized' )
.css( 'height', $( '#main' ).height() - 60 );
}
}
)
$( '.optional legend input[type=checkbox]', query_form )
.die( 'change' )
.live
(
'change',
function( event )
{
var fieldset = $( this ).parents( 'fieldset' );
this.checked
? fieldset.addClass( 'expanded' )
: fieldset.removeClass( 'expanded' );
}
)
for( var key in context.params )
{
if( 'string' === typeof context.params[key] )
{
$( '[name="' + key + '"]', query_form )
.val( context.params[key] );
}
}
query_form
.die( 'submit' )
.live
(
'submit',
function( event )
{
var form_map = {};
var form_values = [];
var all_form_values = query_form.formToArray();
for( var i = 0; i < all_form_values.length; i++ )
{
if( !all_form_values[i].value || 0 === all_form_values[i].value.length )
{
continue;
}
var name_parts = all_form_values[i].name.split( '.' );
if( 1 < name_parts.length && !form_map[name_parts[0]] )
{
console.debug( 'skip "' + all_form_values[i].name + '", parent missing' );
continue;
}
form_map[all_form_values[i].name] = all_form_values[i].value;
form_values.push( all_form_values[i] );
}
var query_url = window.location.protocol + '//' +
window.location.host +
core_basepath +
'/select?' +
$.param( form_values );
url_element
.attr( 'href', query_url )
.text( query_url )
.trigger( 'change' );
result_element
.show();
return false;
}
);
}
);
}
);

View File

@ -0,0 +1,443 @@
// #/:core/replication
sammy.get
(
/^#\/([\w\d-]+)\/(replication)$/,
function( context )
{
var core_basepath = this.active_core.attr( 'data-basepath' );
var content_element = $( '#content' );
$.get
(
'tpl/replication.html',
function( template )
{
content_element
.html( template );
var replication_element = $( '#replication', content_element );
var navigation_element = $( '#navigation', replication_element );
function convert_seconds_to_readable_time( 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;
}
text.push( value + 's' );
return text.join( ' ' );
}
function replication_fetch_status()
{
$.ajax
(
{
url : core_basepath + '/replication?command=details&wt=json',
dataType : 'json',
beforeSend : function( xhr, settings )
{
$( '.refresh-status', navigation_element )
.addClass( 'loader' );
},
success : function( response, text_status, xhr )
{
$( '.refresh-status', navigation_element )
.removeClass( 'loader' );
var data = response.details;
var is_slave = 'true' === data.isSlave;
replication_element
.addClass( is_slave ? 'slave' : 'master' );
if( is_slave )
{
var error_element = $( '#error', replication_element );
if( data.slave.ERROR )
{
error_element
.html( data.slave.ERROR )
.show();
}
else
{
error_element
.hide()
.empty();
}
var progress_element = $( '#progress', replication_element );
var start_element = $( '#start', progress_element );
$( 'span', start_element )
.text( data.slave.replicationStartTime );
var eta_element = $( '#eta', progress_element );
$( 'span', eta_element )
.text( convert_seconds_to_readable_time( data.slave.timeRemaining ) );
var bar_element = $( '#bar', progress_element );
$( '.files span', bar_element )
.text( data.slave.numFilesToDownload );
$( '.size span', bar_element )
.text( data.slave.bytesToDownload );
var speed_element = $( '#speed', progress_element );
$( 'span', speed_element )
.text( data.slave.downloadSpeed );
var done_element = $( '#done', progress_element );
$( '.files span', done_element )
.text( data.slave.numFilesDownloaded );
$( '.size span', done_element )
.text( data.slave.bytesDownloaded );
$( '.percent span', done_element )
.text( parseInt(data.slave.totalPercent ) );
var percent = parseInt( data.slave.totalPercent );
if( 0 === percent )
{
done_element
.css( 'width', '1px' );
}
else
{
done_element
.css( 'width', percent + '%' );
}
var current_file_element = $( '#current-file', replication_element );
$( '.file', current_file_element )
.text( data.slave.currentFile );
$( '.done', current_file_element )
.text( data.slave.currentFileSizeDownloaded );
$( '.total', current_file_element )
.text( data.slave.currentFileSize );
$( '.percent', current_file_element )
.text( parseInt( data.slave.currentFileSizePercent ) );
if( !data.slave.indexReplicatedAtList )
{
data.slave.indexReplicatedAtList = [];
}
if( !data.slave.replicationFailedAtList )
{
data.slave.replicationFailedAtList = [];
}
var iterations_element = $( '#iterations', replication_element );
var iterations_list = $( '.iterations ul', iterations_element );
var iterations_data = [];
$.merge( iterations_data, data.slave.indexReplicatedAtList );
$.merge( iterations_data, data.slave.replicationFailedAtList );
if( 0 !== iterations_data.length )
{
var iterations = [];
for( var i = 0; i < iterations_data.length; i++ )
{
iterations.push
(
'<li data-date="' + iterations_data[i] + '">' +
iterations_data[i] + '</li>'
);
}
iterations_list
.html( iterations.join( "\n" ) )
.show();
$( data.slave.indexReplicatedAtList )
.each
(
function( key, value )
{
$( 'li[data-date="' + value + '"]', iterations_list )
.addClass( 'replicated' );
}
);
if( data.slave.indexReplicatedAt )
{
$(
'li[data-date="' + data.slave.indexReplicatedAt + '"]',
iterations_list
)
.addClass( 'latest' );
}
$( data.slave.replicationFailedAtList )
.each
(
function( key, value )
{
$( 'li[data-date="' + value + '"]', iterations_list )
.addClass( 'failed' );
}
);
if( data.slave.replicationFailedAt )
{
$(
'li[data-date="' + data.slave.replicationFailedAt + '"]',
iterations_list
)
.addClass( 'latest' );
}
if( 0 !== $( 'li:hidden', iterations_list ).size() )
{
$( 'a', iterations_element )
.show();
}
else
{
$( 'a', iterations_element )
.hide();
}
}
}
var details_element = $( '#details', replication_element );
var current_type_element = $( ( is_slave ? '.slave' : '.master' ), details_element );
$( '.version div', current_type_element )
.html( data.indexVersion );
$( '.generation div', current_type_element )
.html( data.generation );
$( '.size div', current_type_element )
.html( data.indexSize );
if( is_slave )
{
var master_element = $( '.master', details_element );
$( '.version div', master_element )
.html( data.slave.masterDetails.indexVersion );
$( '.generation div', master_element )
.html( data.slave.masterDetails.generation );
$( '.size div', master_element )
.html( data.slave.masterDetails.indexSize );
if( data.indexVersion !== data.slave.masterDetails.indexVersion )
{
$( '.version', details_element )
.addClass( 'diff' );
}
else
{
$( '.version', details_element )
.removeClass( 'diff' );
}
if( data.generation !== data.slave.masterDetails.generation )
{
$( '.generation', details_element )
.addClass( 'diff' );
}
else
{
$( '.generation', details_element )
.removeClass( 'diff' );
}
}
if( is_slave )
{
var settings_element = $( '#settings', replication_element );
if( data.slave.masterUrl )
{
$( '.masterUrl dd', settings_element )
.html( response.details.slave.masterUrl )
.parents( 'li' ).show();
}
var polling_content = '&nbsp;';
var polling_ico = 'ico-1';
if( 'true' === data.slave.isPollingDisabled )
{
polling_ico = 'ico-0';
$( '.disable-polling', navigation_element ).hide();
$( '.enable-polling', navigation_element ).show();
}
else
{
$( '.disable-polling', navigation_element ).show();
$( '.enable-polling', navigation_element ).hide();
if( data.slave.pollInterval )
{
polling_content = '(interval: ' + data.slave.pollInterval + ')';
}
}
$( '.isPollingDisabled dd', settings_element )
.removeClass( 'ico-0' )
.removeClass( 'ico-1' )
.addClass( polling_ico )
.html( polling_content )
.parents( 'li' ).show();
}
var master_settings_element = $( '#master-settings', replication_element );
var master_data = is_slave
? data.slave.masterDetails.master
: data.master;
var replication_icon = 'ico-0';
if( 'true' === master_data.replicationEnabled )
{
replication_icon = 'ico-1';
$( '.disable-replication', navigation_element ).show();
$( '.enable-replication', navigation_element ).hide();
}
else
{
$( '.disable-replication', navigation_element ).hide();
$( '.enable-replication', navigation_element ).show();
}
$( '.replicationEnabled dd', master_settings_element )
.removeClass( 'ico-0' )
.removeClass( 'ico-1' )
.addClass( replication_icon )
.parents( 'li' ).show();
$( '.replicateAfter dd', master_settings_element )
.html( master_data.replicateAfter.join( ', ' ) )
.parents( 'li' ).show();
if( master_data.confFiles )
{
var conf_files = [];
var conf_data = master_data.confFiles.split( ',' );
for( var i = 0; i < conf_data.length; i++ )
{
var item = conf_data[i];
if( - 1 !== item.indexOf( ':' ) )
{
info = item.split( ':' );
item = '<abbr title="' + info[0] + ' » ' + info[1] + '">'
+ ( is_slave ? info[1] : info[0] )
+ '</abbr>';
}
conf_files.push( item );
}
$( '.confFiles dd', master_settings_element )
.html( conf_files.join( ', ' ) )
.parents( 'li' ).show();
}
$( '.block', replication_element ).last()
.addClass( 'last' );
if( 'true' === data.slave.isReplicating )
{
replication_element
.addClass( 'replicating' );
$( '.replicate-now', navigation_element ).hide();
$( '.abort-replication', navigation_element ).show();
window.setTimeout( replication_fetch_status, 1000 );
}
else
{
replication_element
.removeClass( 'replicating' );
$( '.replicate-now', navigation_element ).show();
$( '.abort-replication', navigation_element ).hide();
}
},
error : function( xhr, text_status, error_thrown )
{
$( '#content' )
.html( 'sorry, no replication-handler defined!' );
},
complete : function( xhr, text_status )
{
}
}
);
}
replication_fetch_status();
$( '#iterations a', content_element )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).parents( '.iterations' )
.toggleClass( 'expanded' );
return false;
}
);
$( 'button', navigation_element )
.die( 'click' )
.live
(
'click',
function( event )
{
var button = $( this );
var command = button.data( 'command' );
if( button.hasClass( 'refresh-status' ) && !button.hasClass( 'loader' ) )
{
replication_fetch_status();
}
else if( command )
{
$.get
(
core_basepath + '/replication?command=' + command + '&wt=json',
function()
{
replication_fetch_status();
}
);
}
return false;
}
);
}
);
}
);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,144 @@
// #/threads
sammy.get
(
/^#\/(threads)$/,
function( context )
{
var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
var content_element = $( '#content' );
$.get
(
'tpl/threads.html',
function( template )
{
content_element
.html( template );
$.ajax
(
{
url : core_basepath + '/admin/threads?wt=json',
dataType : 'json',
context : $( '#threads', content_element ),
beforeSend : function( xhr, settings )
{
},
success : function( response, text_status, xhr )
{
var self = this;
var threadDumpData = response.system.threadDump;
var threadDumpContent = [];
var c = 0;
for( var i = 1; i < threadDumpData.length; i += 2 )
{
var state = threadDumpData[i].state.esc();
var name = '<a title="' + state +'"><span>' + threadDumpData[i].name.esc() + ' (' + threadDumpData[i].id.esc() + ')</span></a>';
var classes = [state];
var details = '';
if( 0 !== c % 2 )
{
classes.push( 'odd' );
}
if( threadDumpData[i].lock )
{
classes.push( 'lock' );
name += "\n" + '<p title="Waiting on">' + threadDumpData[i].lock.esc() + '</p>';
}
if( threadDumpData[i].stackTrace && 0 !== threadDumpData[i].stackTrace.length )
{
classes.push( 'stacktrace' );
var stack_trace = threadDumpData[i].stackTrace
.join( '###' )
.esc()
.replace( /\(/g, '&#8203;(' )
.replace( /###/g, '</li><li>' );
name += '<div>' + "\n"
+ '<ul>' + "\n"
+ '<li>' + stack_trace + '</li>'
+ '</ul>' + "\n"
+ '</div>';
}
var item = '<tr class="' + classes.join( ' ' ) +'">' + "\n"
+ '<td class="name">' + name + '</td>' + "\n"
+ '<td class="time">' + threadDumpData[i].cpuTime.esc() + '<br>' + threadDumpData[i].userTime.esc() + '</td>' + "\n"
+ '</tr>';
threadDumpContent.push( item );
c++;
}
var threadDumpBody = $( '#thread-dump tbody', this );
threadDumpBody
.html( threadDumpContent.join( "\n" ) );
$( '.name a', threadDumpBody )
.die( 'click' )
.live
(
'click',
function( event )
{
$( this ).closest( 'tr' )
.toggleClass( 'open' );
}
);
$( '.controls a', this )
.die( 'click' )
.live
(
'click',
function( event )
{
var threads_element = $( self );
var is_collapsed = threads_element.hasClass( 'collapsed' );
var thread_rows = $( 'tr', threads_element );
thread_rows
.each
(
function( index, element )
{
if( is_collapsed )
{
$( element )
.addClass( 'open' );
}
else
{
$( element )
.removeClass( 'open' );
}
}
);
threads_element
.toggleClass( 'collapsed' )
.toggleClass( 'expanded' );
}
);
},
error : function( xhr, text_status, error_thrown)
{
},
complete : function( xhr, text_status )
{
}
}
);
}
);
}
);

View File

@ -14,12 +14,18 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div id="analysis">
<div class="block" id="analysis-error">
<div class="block analysis-error" id="analysis-handler-missing">
This Functionality requires the <code>/analysis/field</code> Handler to be registered and active!
<div class="head">This Functionality requires the <code>/analysis/field</code> Handler to be registered and active!</div>
</div>
<div class="block analysis-error" id="analysis-error">
<div class="head"><a><span></span></a></div>
<div class="body"></div>
</div>

View File

@ -16,7 +16,7 @@ limitations under the License.
-->
<div id="cloud">
<div class="block" id="zookeeper">
<div class="block">
<h2><span>Zookeeper-Data</span></h2>
@ -24,9 +24,21 @@ limitations under the License.
<div class="message"></div>
</div>
<div class="content">
<div class="content clearfix">
<a><span>Fetch Zookeeper Data</span></a>
<div id="tree" class="tree">#tree</div>
<div id="file-content" class="clearfix">
<div id="prop">
<ul></ul>
</div>
<div id="data"></div>
<a class="close"><span>[x]</span></a>
</div>
</div>

View File

@ -56,6 +56,23 @@ limitations under the License.
</label>
<input type="text" name="qt" id="qt" value="">
<label for="wt">
<a rel="help">wt</a>
</label>
<select name="wt" id="wt">
<option>xml</option>
<option>json</option>
<option>python</option>
<option>ruby</option>
<option>php</option>
<option>csv</option>
</select>
<label for="indent" class="checkbox">
<input type="checkbox" name="indent" id="indent" value="true">
<a rel="help">indent</a>
</label>
<label for="debugQuery" class="checkbox">
<input type="checkbox" name="debugQuery" id="debugQuery" value="true">
<a rel="help">debugQuery</a>
@ -243,11 +260,7 @@ limitations under the License.
<div id="result">
<div id="url">
<input type="text" readonly="readonly">
</div>
<a id="url" href="#"></a>
<div id="response">

View File

@ -66,7 +66,7 @@ limitations under the License.
</li>
<li class="clearfix query">
<p>Query&nbsp;Analyzer:</p>
<p>Query Analyzer:</p>
<dl>
<dt></dt>
</dl>
@ -74,11 +74,13 @@ limitations under the License.
<ul>
<li class="clearfix tokenizer">
<p>Tokenizer:</p>
<dl></dl>
<dl>
</dl>
</li>
<li class="clearfix filters">
<p>Filters:</p>
<dl></dl>
<dl>
</dl>
</li>
</ul>
@ -86,50 +88,52 @@ limitations under the License.
</ul>
</div>
<div class="terminfo-holder">
<div class="status-holder">Load Term Info</div>
<div class="terminfo-holder clearfix">
<div class="status loader">Loading Term Info ...</div>
<div class="topterms-holder">
<p class="head">Top <span class="shown"></span><span class="max-holder">/<span class="max"></span></span> Terms:</p>
<table border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th class="position" title="Position">&nbsp;</th>
<th class="term">Term</th>
<th class="frequency" title="Frequency">Frq</th>
</tr>
</thead>
</table>
<p class="navi clearfix">
<a class="less"><span>less</span></a>
<a class="more"><span>more</span></a>
</p>
</div>
<div class="histogram-holder">
<p class="head">Histogram:</p>
<div class="histogram"></div>
<dl class="clearfix">
</dl>
</div>
</div>
</div>
</div>

View File

@ -1,16 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

View File

@ -1,16 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

View File

@ -31,11 +31,8 @@ limitations under the License.
<tr>
<td class="ico spacer">&nbsp;</td>
<th>id</th>
<th>name</th>
<th>cpuTime</th>
<th>userTime</th>
<th class="name">name</th>
<th class="time">cpuTime / userTime</th>
</tr>