You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by st...@apache.org on 2013/12/06 10:56:46 UTC
svn commit: r1548479 - in /lucene/dev/branches/branch_4x: ./ dev-tools/
lucene/ lucene/analysis/
lucene/analysis/icu/src/java/org/apache/lucene/collation/ lucene/backwards/
lucene/benchmark/ lucene/classification/ lucene/classification/src/
lucene/code...
Author: steffkes
Date: Fri Dec 6 09:56:44 2013
New Revision: 1548479
URL: http://svn.apache.org/r1548479
Log:
SOLR-5539: Admin UI - Remove ability to create/modify files (merge r1548477)
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/dev-tools/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/BUILD.txt (props changed)
lucene/dev/branches/branch_4x/lucene/CHANGES.txt (props changed)
lucene/dev/branches/branch_4x/lucene/JRE_VERSION_MIGRATION.txt (props changed)
lucene/dev/branches/branch_4x/lucene/LICENSE.txt (props changed)
lucene/dev/branches/branch_4x/lucene/MIGRATE.txt (props changed)
lucene/dev/branches/branch_4x/lucene/NOTICE.txt (props changed)
lucene/dev/branches/branch_4x/lucene/README.txt (props changed)
lucene/dev/branches/branch_4x/lucene/SYSTEM_REQUIREMENTS.txt (props changed)
lucene/dev/branches/branch_4x/lucene/analysis/ (props changed)
lucene/dev/branches/branch_4x/lucene/analysis/icu/src/java/org/apache/lucene/collation/ICUCollationKeyFilterFactory.java (props changed)
lucene/dev/branches/branch_4x/lucene/backwards/ (props changed)
lucene/dev/branches/branch_4x/lucene/benchmark/ (props changed)
lucene/dev/branches/branch_4x/lucene/build.xml (props changed)
lucene/dev/branches/branch_4x/lucene/classification/ (props changed)
lucene/dev/branches/branch_4x/lucene/classification/build.xml (props changed)
lucene/dev/branches/branch_4x/lucene/classification/ivy.xml (props changed)
lucene/dev/branches/branch_4x/lucene/classification/src/ (props changed)
lucene/dev/branches/branch_4x/lucene/codecs/ (props changed)
lucene/dev/branches/branch_4x/lucene/common-build.xml (props changed)
lucene/dev/branches/branch_4x/lucene/core/ (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/index.40.cfs.zip (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/index.40.nocfs.zip (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/index.40.optimized.cfs.zip (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/index.40.optimized.nocfs.zip (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSort.java (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSortDocValues.java (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestTotalHitCountCollector.java (props changed)
lucene/dev/branches/branch_4x/lucene/demo/ (props changed)
lucene/dev/branches/branch_4x/lucene/expressions/ (props changed)
lucene/dev/branches/branch_4x/lucene/facet/ (props changed)
lucene/dev/branches/branch_4x/lucene/grouping/ (props changed)
lucene/dev/branches/branch_4x/lucene/highlighter/ (props changed)
lucene/dev/branches/branch_4x/lucene/ivy-settings.xml (props changed)
lucene/dev/branches/branch_4x/lucene/ivy-versions.properties (props changed)
lucene/dev/branches/branch_4x/lucene/join/ (props changed)
lucene/dev/branches/branch_4x/lucene/licenses/ (props changed)
lucene/dev/branches/branch_4x/lucene/memory/ (props changed)
lucene/dev/branches/branch_4x/lucene/misc/ (props changed)
lucene/dev/branches/branch_4x/lucene/module-build.xml (props changed)
lucene/dev/branches/branch_4x/lucene/queries/ (props changed)
lucene/dev/branches/branch_4x/lucene/queries/src/test/org/apache/lucene/queries/function/TestFunctionQuerySort.java (props changed)
lucene/dev/branches/branch_4x/lucene/queryparser/ (props changed)
lucene/dev/branches/branch_4x/lucene/replicator/ (props changed)
lucene/dev/branches/branch_4x/lucene/sandbox/ (props changed)
lucene/dev/branches/branch_4x/lucene/site/ (props changed)
lucene/dev/branches/branch_4x/lucene/spatial/ (props changed)
lucene/dev/branches/branch_4x/lucene/suggest/ (props changed)
lucene/dev/branches/branch_4x/lucene/test-framework/ (props changed)
lucene/dev/branches/branch_4x/lucene/tools/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_4x/solr/LICENSE.txt (props changed)
lucene/dev/branches/branch_4x/solr/NOTICE.txt (props changed)
lucene/dev/branches/branch_4x/solr/README.txt (props changed)
lucene/dev/branches/branch_4x/solr/SYSTEM_REQUIREMENTS.txt (props changed)
lucene/dev/branches/branch_4x/solr/build.xml (props changed)
lucene/dev/branches/branch_4x/solr/cloud-dev/ (props changed)
lucene/dev/branches/branch_4x/solr/common-build.xml (props changed)
lucene/dev/branches/branch_4x/solr/contrib/ (props changed)
lucene/dev/branches/branch_4x/solr/core/ (props changed)
lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/core/TestConfig.java (props changed)
lucene/dev/branches/branch_4x/solr/example/ (props changed)
lucene/dev/branches/branch_4x/solr/licenses/ (props changed)
lucene/dev/branches/branch_4x/solr/licenses/httpclient-LICENSE-ASL.txt (props changed)
lucene/dev/branches/branch_4x/solr/licenses/httpclient-NOTICE.txt (props changed)
lucene/dev/branches/branch_4x/solr/licenses/httpcore-LICENSE-ASL.txt (props changed)
lucene/dev/branches/branch_4x/solr/licenses/httpcore-NOTICE.txt (props changed)
lucene/dev/branches/branch_4x/solr/licenses/httpmime-LICENSE-ASL.txt (props changed)
lucene/dev/branches/branch_4x/solr/licenses/httpmime-NOTICE.txt (props changed)
lucene/dev/branches/branch_4x/solr/scripts/ (props changed)
lucene/dev/branches/branch_4x/solr/site/ (props changed)
lucene/dev/branches/branch_4x/solr/solrj/ (props changed)
lucene/dev/branches/branch_4x/solr/test-framework/ (props changed)
lucene/dev/branches/branch_4x/solr/webapp/ (props changed)
lucene/dev/branches/branch_4x/solr/webapp/web/css/styles/files.css
lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/files.js
lucene/dev/branches/branch_4x/solr/webapp/web/tpl/files.html
Modified: lucene/dev/branches/branch_4x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1548479&r1=1548478&r2=1548479&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Fri Dec 6 09:56:44 2013
@@ -193,6 +193,8 @@ Other Changes
* SOLR-5502: Added a test for tri-level compositeId routing with documents
having a "/" in a document id. (Anshum Gupta via Mark Miller)
+* SOLR-5539: Admin UI - Remove ability to create/modify files (steffkes)
+
================== 4.6.0 ==================
Versions of Major Components
Modified: lucene/dev/branches/branch_4x/solr/webapp/web/css/styles/files.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/webapp/web/css/styles/files.css?rev=1548479&r1=1548478&r2=1548479&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/webapp/web/css/styles/files.css (original)
+++ lucene/dev/branches/branch_4x/solr/webapp/web/css/styles/files.css Fri Dec 6 09:56:44 2013
@@ -23,54 +23,11 @@ limitations under the License.
width: 20%;
}
-#content #files #new-file-holder
-{
- margin-top: 20px;
- padding-bottom: 10px;
-}
-
-#content #files #new-file-holder button span
-{
- background-image: url( ../../img/ico/plus-button.png );
-}
-
-#content #files #new-file-holder form
-{
- box-shadow: 5px 5px 10px #c0c0c0;
- -moz-box-shadow: 5px 5px 10px #c0c0c0;
- -webkit-box-shadow: 5px 5px 10px #c0c0c0;
- display: none;
- padding: 10px;
-}
-
-#content #files #new-file-holder form input
-{
- margin-bottom: 3px;
- width: 98%;
-}
-
-#content #files #new-file-holder .note
-{
- color: #c0c0c0;
- margin-bottom: 5px;
-}
-
#content #files form .buttons button
{
float: right;
}
-#content #files .modify-file,
-#content #files .modify-file .view-file
-{
- display: none;
-}
-
-#content #files .modify-file .modify-file
-{
- display: block;
-}
-
#content #files #file-content
{
display: none;
@@ -80,84 +37,13 @@ limitations under the License.
min-height: 100px
}
-#content #files .top #url
-{
- float: left;
- width: 80%;
-}
-
-#content #files .top .buttons
-{
- float: right;
- width: 15%;
-}
-
-#content #files .top .buttons button
-{
- float: right;
-}
-
-#content #files .top .buttons button.view-file span
-{
- background-image: url( ../../img/ico/pencil.png );
-}
-
-#content #files .top .buttons button.modify-file span
-{
- background-image: url( ../../img/ico/document-text.png );
-}
-
#content #files .show #file-content
{
display: block;
}
-#content #files #new-file-note
-{
- background-color: #ffa662;
- background-image: url( ../../img/ico/exclamation-button.png );
- background-position: 10px 50%;
- display: none;
- margin-bottom: 10px;
- padding: 10px;
- padding-left: 31px;
-}
-
#content #files #file-content .response
{
border: 1px solid transparent;
padding: 2px;
-}
-
-#content #files #file-content textarea
-{
- display: block;
- font-family: monospace;
- height: 500px;
- margin-bottom: 10px;
- width: 99%;
-}
-
-#content #files #file-content form button span
-{
- background-image: url( ../../img/ico/disk-black.png );
-}
-
-#content #files #file-content form.upload
-{
- border-top: 1px solid #c0c0c0;
- margin-top: 20px;
- padding-top: 20px;
- padding-bottom: 20px;
-}
-
-#content #files #file-content .upload input
-{
- border: 0;
- float: left;
-}
-
-#content #files #file-content .upload button span
-{
- background-image: url( ../../img/ico/drive-upload.png );
}
\ No newline at end of file
Modified: lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/files.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/files.js?rev=1548479&r1=1548478&r2=1548479&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/files.js (original)
+++ lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/files.js Fri Dec 6 09:56:44 2013
@@ -27,7 +27,6 @@ sammy.get
var content_element = $( '#content' );
var file_endpoint = core_basepath + '/admin/file';
- var file_exists = null;
var path = context.path.split( '?' );
var selected_file = null;
@@ -144,34 +143,6 @@ sammy.get
};
load_tree();
- var new_file_form = $( '#new-file-holder form' );
-
- $( '#new-file-holder > button' )
- .on
- (
- 'click',
- function( event )
- {
- new_file_form.toggle();
- return false;
- }
- );
-
- new_file_form
- .on
- (
- 'submit',
- function( event )
- {
- $( 'body' )
- .animate( { scrollTop: 0 }, 500 );
-
- window.location.href = '#/' + current_core + '/files?file=' + $( 'input', this ).val();
-
- return false;
- }
- );
-
if( selected_file )
{
$( '#new-file-holder input' )
@@ -200,57 +171,6 @@ sammy.get
.text( public_url )
.attr( 'href', public_url );
- var form = $( 'form.modify', frame_element );
-
- form
- .attr( 'action', file_endpoint + '?wt=json&op=write&file=' + selected_file )
- .ajaxForm
- (
- {
- context : form,
- beforeSubmit: function( arr, form, options )
- {
- $( 'button span', form )
- .addClass( 'loader' );
- },
- success : function( response, status, xhr )
- {
- $( 'button span', this )
- .removeClass( 'loader' );
-
- var button = $( 'button', this );
-
- button
- .addClass( 'success' );
-
- load_file( !file_exists );
-
- window.setTimeout
- (
- function()
- {
- button
- .removeClass( 'success' );
- },
- 1000
- );
- }
- }
- );
-
- var change_button_label = function( form, label )
- {
- $( 'span[data-' + label + ']', form )
- .each
- (
- function( index, element )
- {
- var self = $( this );
- self.text( self.data( label ) );
- }
- );
- }
-
var load_file = function( load_tree )
{
if( load_tree )
@@ -277,8 +197,6 @@ sammy.get
},
success : function( response, text_status, xhr )
{
- change_button_label( this, 'existing-title' );
-
var content_type = xhr.getResponseHeader( 'Content-Type' ) || '';
var highlight = null;
@@ -310,86 +228,16 @@ sammy.get
},
error : function( xhr, text_status, error_thrown)
{
- change_button_label( this, 'new-title' );
+ $( '.view-file .response', this )
+ .text( 'No such file exists.' );
},
complete : function( xhr, text_status )
{
- file_exists = 200 === xhr.status;
- $( '#new-file-note' )
- .toggle( !file_exists );
}
}
);
}
load_file();
-
- $( '.top button', frame_element )
- .on
- (
- 'click',
- function( event )
- {
- $( '#file-content', frame_element )
- .toggleClass( 'modify-file' );
-
- return false;
- }
- );
-
- $( 'form.upload', frame_element )
- .on
- (
- 'submit',
- function( event )
- {
- $( 'form input', frame_element )
- .ajaxfileupload
- (
- {
- action: endpoint + '&op=write&wt=json',
- validate_extensions: false,
- upload_now: true,
- onStart: function ()
- {
- $( 'form.upload button span', frame_element )
- .addClass( 'loader' );
- },
- onCancel: function ()
- {
- $( 'form.upload button span', frame_element )
- .removeClass( 'loader' );
- },
- onComplete: function( response )
- {
- $( 'form.upload button span', frame_element )
- .removeClass( 'loader' );
-
- var button = $( 'form.upload button', frame_element );
-
- button
- .addClass( 'success' );
-
- load_file( !file_exists );
-
- $( 'body' )
- .animate( { scrollTop: 0 }, 500 );
-
- window.setTimeout
- (
- function()
- {
- button
- .removeClass( 'success' );
- },
- 1000
- );
- }
- }
- );
-
- return false;
- }
- );
}
}
);
Modified: lucene/dev/branches/branch_4x/solr/webapp/web/tpl/files.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/webapp/web/tpl/files.html?rev=1548479&r1=1548478&r2=1548479&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/webapp/web/tpl/files.html (original)
+++ lucene/dev/branches/branch_4x/solr/webapp/web/tpl/files.html Fri Dec 6 09:56:44 2013
@@ -22,24 +22,6 @@ limitations under the License.
<div id="tree" class="tree">#tree</div>
- <div id="new-file-holder">
-
- <button><span>Create new file</span></button>
-
- <form method="get">
-
- <p class="note">Enter filename, on the next page you can input content or upload a file.</p>
-
- <input type="text" name="file" placeholder="sample.xml">
-
- <div class="buttons clearfix">
- <button type="submit">Next âº</button>
- </div>
-
- </form>
-
- </div>
-
</div>
<div id="file-content" class="clearfix">
@@ -47,13 +29,6 @@ limitations under the License.
<a id="url" class="address-bar" href="#"></a>
- <div class="buttons">
-
- <button class="modify-file"><span>View file</span></button>
- <button class="view-file"><span>Modify file</span></button>
-
- </div>
-
</div>
<div class="view-file">
@@ -62,32 +37,6 @@ limitations under the License.
</div>
- <div class="modify-file">
-
- <p id="new-file-note">The requested file does (not yet) exist. <strong>Save file</strong> or <strong>Upload new file</strong> will create it.</p>
-
- <form method="post" class="modify">
-
- <textarea name="stream.body"></textarea>
-
- <div class="buttons clearfix">
- <button type="submit"><span>Save file</span></button>
- </div>
-
- </form>
-
- <form method="post" class="upload">
-
- <input type="file" name="fileupload">
-
- <div class="buttons clearfix">
- <button><span data-new-title="Upload new file" data-existing-title="Replace current file">Replace current file</span></button>
- </div>
-
- </form>
-
- </div>
-
</div>
</div>