You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by up...@apache.org on 2015/11/04 12:17:45 UTC

svn commit: r1712533 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/webapp/ solr/webapp/web/ solr/webapp/web/css/angular/ solr/webapp/web/js/angular/ solr/webapp/web/js/angular/controllers/ solr/webapp/web/partials/

Author: upayavira
Date: Wed Nov  4 11:17:45 2015
New Revision: 1712533

URL: http://svn.apache.org/viewvc?rev=1712533&view=rev
Log:
SOLR-8139 Rename schema-browser to schema and add managed schema support

Added:
    lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/schema.css
      - copied unchanged from r1712532, lucene/dev/trunk/solr/webapp/web/css/angular/schema.css
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/schema.js
      - copied unchanged from r1712532, lucene/dev/trunk/solr/webapp/web/js/angular/controllers/schema.js
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/schema.html
      - copied unchanged from r1712532, lucene/dev/trunk/solr/webapp/web/partials/schema.html
Removed:
    lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/schema-browser.css
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/schema-browser.js
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/schema-browser.html
Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/webapp/   (props changed)
    lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/menu.css
    lucene/dev/branches/branch_5x/solr/webapp/web/index.html
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/services.js
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/analysis.html

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/menu.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/menu.css?rev=1712533&r1=1712532&r2=1712533&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/menu.css (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/menu.css Wed Nov  4 11:17:45 2015
@@ -278,7 +278,7 @@ limitations under the License.
 .sub-menu .analysis a { background-image: url( ../../img/ico/funnel.png ); }
 .sub-menu .documents a { background-image: url( ../../img/ico/documents-stack.png ); }
 .sub-menu .files a { background-image: url( ../../img/ico/folder.png ); }
-.sub-menu .schema-browser a { background-image: url( ../../img/ico/book-open-text.png ); }
+.sub-menu .schema a { background-image: url( ../../img/ico/book-open-text.png ); }
 .sub-menu .replication a { background-image: url( ../../img/ico/node.png ); }
 .sub-menu .distribution a { background-image: url( ../../img/ico/node-select.png ); }
 .sub-menu .ping a { background-image: url( ../../img/ico/system-monitor.png ); }

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/index.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/index.html?rev=1712533&r1=1712532&r2=1712533&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/index.html (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/index.html Wed Nov  4 11:17:45 2015
@@ -39,7 +39,7 @@ limitations under the License.
   <link rel="stylesheet" type="text/css" href="css/angular/documents.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/angular/query.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/angular/replication.css?_=${version}">
-  <link rel="stylesheet" type="text/css" href="css/angular/schema-browser.css?_=${version}">
+  <link rel="stylesheet" type="text/css" href="css/angular/schema.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/angular/segments.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/angular/threads.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/angular/chosen.css?_=${version}">
@@ -74,7 +74,7 @@ limitations under the License.
   <script src="js/angular/controllers/query.js"></script>
   <script src="js/angular/controllers/plugins.js"></script>
   <script src="js/angular/controllers/replication.js"></script>
-  <script src="js/angular/controllers/schema-browser.js"></script>
+  <script src="js/angular/controllers/schema.js"></script>
   <script src="js/angular/controllers/segments.js"></script>
 
 </head>
@@ -185,7 +185,7 @@ limitations under the License.
               <li class="documents" ng-class="{active:page=='documents'}"><a href="#/{{currentCollection.name}}/documents"><span>Documents</span></a></li>
               <li class="files" ng-class="{active:page=='files'}"><a href="#/{{currentCollection.name}}/files"><span>Files</span></a></li>
               <li class="query" ng-class="{active:page=='query'}"><a href="#/{{currentCollection.name}}/query"><span>Query</span></a></li>
-              <li class="schema-browser" ng-class="{active:page=='schema-browser'}"><a href="#/{{currentCollection.name}}/schema-browser"><span>Schema Browser</span></a></li>
+              <li class="schema" ng-class="{active:page=='schema'}"><a href="#/{{currentCollection.name}}/schema"><span>Schema</span></a></li>
         </ul>
           </div>
           <div id="core-selector">
@@ -212,7 +212,7 @@ limitations under the License.
               <li class="plugins" ng-class="{active:page=='plugins'}"><a href="#/{{currentCore.name}}/plugins"><span>Plugins / Stats</span></a></li>
               <li ng-hide="isCloudEnabled" class="query" ng-class="{active:page=='query'}"><a href="#/{{currentCore.name}}/query"><span>Query</span></a></li>
               <li class="replication" ng-class="{active:page=='replication'}"><a href="#/{{currentCore.name}}/replication"><span>Replication</span></a></li>
-              <li ng-hide="isCloudEnabled" class="schema-browser" ng-class="{active:page=='schema-browser'}"><a href="#/{{currentCore.name}}/schema-browser"><span>Schema Browser</span></a></li>
+              <li ng-hide="isCloudEnabled" class="schema" ng-class="{active:page=='schema'}"><a href="#/{{currentCore.name}}/schema"><span>Schema</span></a></li>
               <li class="segments" ng-class="{active:page=='segments'}"><a href="#/{{currentCore.name}}/segments"><span>Segments info</span></a></li>
       </ul>
           </div>

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js?rev=1712533&r1=1712532&r2=1712533&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js Wed Nov  4 11:17:45 2015
@@ -121,9 +121,9 @@ solrAdminApp.config([
         templateUrl: 'partials/dataimport.html',
         controller: 'DataImportController'
       }).
-      when('/:core/schema-browser', {
-        templateUrl: 'partials/schema-browser.html',
-        controller: 'SchemaBrowserController'
+      when('/:core/schema', {
+        templateUrl: 'partials/schema.html',
+        controller: 'SchemaController'
       }).
       when('/:core/segments', {
         templateUrl: 'partials/segments.html',
@@ -156,6 +156,30 @@ solrAdminApp.config([
     }
   };
 })
+.directive('escapePressed', function () {
+    return function (scope, element, attrs) {
+        element.bind("keydown keypress", function (event) {
+            if(event.which === 27) {
+                scope.$apply(function (){
+                    scope.$eval(attrs.escapePressed);
+                });
+                event.preventDefault();
+            }
+        });
+    };
+})
+.directive('focusWhen', function($timeout) {
+  return {
+    link: function(scope, element, attrs) {
+      scope.$watch(attrs.focusWhen, function(value) {
+        if(value === true) {
+          $timeout(function() {
+            element[0].focus();
+          }, 100);
+        }
+      });
+    }
+  };
 .directive('scrollableWhenSmall', function($window) {
   return {
     link: function(scope, element, attrs) {

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/services.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/services.js?rev=1712533&r1=1712532&r2=1712533&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/services.js (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/services.js Wed Nov  4 11:17:45 2015
@@ -136,7 +136,8 @@ solrAdminServices.factory('System',
 .factory('Luke',
   ['$resource', function($resource) {
     return $resource('/solr/:core/admin/luke', {core: '@core', wt:'json', _:Date.now()}, {
-      "index":  {params: {numTerms: 0}},
+      "index":  {params: {numTerms: 0, show: 'index'}},
+      "raw": {params: {numTerms: 0}},
       "schema": {params: {show:'schema'}},
       "field": {},
       "fields": {params: {show:'schema'}, interceptor: {
@@ -238,5 +239,18 @@ solrAdminServices.factory('System',
        return $resource('/solr/:core/admin/segments', {'wt':'json', core: '@core', _:Date.now()}, {
            get: {}
        });
-   }
-]);
+}])
+.factory('Schema',
+   ['$resource', function($resource) {
+     return $resource('/solr/:core/schema', {wt: 'json', core: '@core', _:Date.now()}, {
+       get: {method: "GET"},
+       check: {method: "GET", headers: {doNotIntercept: "true"}},
+       post: {method: "POST"}
+     });
+}])
+.factory('Config',
+   ['$resource', function($resource) {
+     return $resource('/solr/:core/config', {wt: 'json', core: '@core', _:Date.now()}, {
+       get: {method: "GET"}
+     })
+}]);

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/partials/analysis.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/partials/analysis.html?rev=1712533&r1=1712532&r2=1712533&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/partials/analysis.html (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/partials/analysis.html Wed Nov  4 11:17:45 2015
@@ -51,7 +51,7 @@ limitations under the License.
               <label for="type_or_name">Analyse Fieldname / FieldType:</label>
               <select style="width:130px" chosen ng-change="changeFieldOrType()" id="type_or_name" ng-model="fieldOrType" ng-options="f.value as f.label group by f.group for f in fieldsAndTypes"></select>
 
-              <a id="tor_schema" ng-href="#/{{core}}/schema-browser?{{schemaBrowserUrl}}"><span>Schema Browser</span>&nbsp;</a>
+              <a id="tor_schema" ng-href="#/{{core}}/schema?{{schemaBrowserUrl}}"><span>Schema Browser</span>&nbsp;</a>
 
               <div class="buttons clearfix">