mirror of https://github.com/apache/lucene.git
SOLR-4955: Admin UI - Show address bar on top for Schema + Config
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1495848 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bff085d540
commit
6ae55f1417
|
@ -205,6 +205,8 @@ Optimizations
|
|||
* SOLR-4611: Admin UI - Analysis-Urls with empty parameters create empty result table
|
||||
(steffkes)
|
||||
|
||||
* SOLR-4955: Admin UI - Show address bar on top for Schema + Config (steffkes)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -640,4 +640,31 @@ pre.syntax .tex .formula
|
|||
#connection_status.online span a:hover
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#content .address-bar
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
background-image: url( ../../img/ico/ui-address-bar.png );
|
||||
background-position: 5px 50%;
|
||||
border: 1px solid #f0f0f0;
|
||||
box-shadow: 1px 1px 0 #f0f0f0;
|
||||
-moz-box-shadow: 1px 1px 0 #f0f0f0;
|
||||
-webkit-box-shadow: 1px 1px 0 #f0f0f0;
|
||||
color: #c0c0c0;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding: 5px;
|
||||
padding-left: 26px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#content .address-bar:focus,
|
||||
#content .address-bar:hover
|
||||
{
|
||||
border-color: #c0c0c0;
|
||||
box-shadow: 1px 1px 0 #d8d8d8;
|
||||
-moz-box-shadow: 1px 1px 0 #d8d8d8;
|
||||
-webkit-box-shadow: 1px 1px 0 #d8d8d8;
|
||||
color: #333;
|
||||
}
|
|
@ -149,33 +149,6 @@
|
|||
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
|
||||
{
|
||||
}
|
|
@ -22,34 +22,51 @@ sammy.get
|
|||
function( context )
|
||||
{
|
||||
var core_basepath = this.active_core.attr( 'data-basepath' );
|
||||
var filetype = context.params.splat[1]; // either schema or config
|
||||
var filename = this.active_core.attr( filetype );
|
||||
var content_element = $( '#content' );
|
||||
|
||||
$.ajax
|
||||
var url = window.location.protocol + '//' + window.location.host + core_basepath + '/admin/file'
|
||||
+ '?file=' + this.active_core.attr( context.params.splat[1] )
|
||||
+ '&contentType=text/xml;charset=utf-8';
|
||||
|
||||
$.get
|
||||
(
|
||||
'tpl/file.html',
|
||||
function( template )
|
||||
{
|
||||
url : core_basepath + "/admin/file?file=" + filename + "&contentType=text/xml;charset=utf-8",
|
||||
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 );
|
||||
content_element
|
||||
.html( template );
|
||||
|
||||
if( 'success' === text_status )
|
||||
$( '#url', content_element )
|
||||
.text( url )
|
||||
.attr( 'href', url );
|
||||
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
hljs.highlightBlock( code.get(0) );
|
||||
url : url,
|
||||
dataType : 'xml',
|
||||
context : $( '#response' ,content_element ),
|
||||
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) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<div id="file" class="clearfix">
|
||||
|
||||
<a id="url" class="address-bar" href="#"></a>
|
||||
|
||||
<div id="response"></div>
|
||||
|
||||
</div>
|
|
@ -348,7 +348,7 @@ limitations under the License.
|
|||
|
||||
<div id="result">
|
||||
|
||||
<a id="url" href="#"></a>
|
||||
<a id="url" class="address-bar" href="#"></a>
|
||||
|
||||
<div id="response">
|
||||
|
||||
|
|
Loading…
Reference in New Issue