You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2015/05/19 02:48:35 UTC

svn commit: r1680145 - 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: erick
Date: Tue May 19 00:48:34 2015
New Revision: 1680145

URL: http://svn.apache.org/r1680145
Log:
SOLR-7558: Uber-patch for AngularJS admin UI

Added:
    lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/dataimport.css
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/css/angular/dataimport.css
    lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/replication.css
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/css/angular/replication.css
    lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/schema-browser.css
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/css/angular/schema-browser.css
    lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/segments.css
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/css/angular/segments.css
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/dataimport.js
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/js/angular/controllers/dataimport.js
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/replication.js
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/js/angular/controllers/replication.js
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/schema-browser.js
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/js/angular/controllers/schema-browser.js
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/segments.js
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/js/angular/controllers/segments.js
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/dataimport.html
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/partials/dataimport.html
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/documents.html
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/partials/documents.html
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/files.html
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/partials/files.html
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/plugins.html
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/partials/plugins.html
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/replication.html
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/partials/replication.html
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/schema-browser.html
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/partials/schema-browser.html
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/segments.html
      - copied unchanged from r1680118, lucene/dev/trunk/solr/webapp/web/partials/segments.html
Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/webapp/   (props changed)
    lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/chosen.css
    lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/common.css
    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
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/cloud.html
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/core_overview.html
    lucene/dev/branches/branch_5x/solr/webapp/web/partials/logging.html

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1680145&r1=1680144&r2=1680145&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Tue May 19 00:48:34 2015
@@ -72,8 +72,9 @@ New Features
     http://localhost:8983/solr/techproducts/replication?command=restorestatus
   (Varun Thacker, noble, shalin)
 
-* SOLR-7241, SOLR-7263, SOLR-7279: More functionality moving the Admin UI to Angular JS
-  (Upayavira via Erick)
+* SOLR-7241, SOLR-7263, SOLR-7279, SOLR-7300, SOLR-7396, SOLR-7397, SOLR-7492: 
+  Admin UI - Refactoring using AngularJS. More functionality moving the Admin 
+  UI to Angular JS (Upayavira via Erick)
 
 * SOLR-7372: Limit memory consumed by LRUCache with a new 'maxRamMB' config parameter.
   (yonik, shalin)

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/chosen.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/chosen.css?rev=1680145&r1=1680144&r2=1680145&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/chosen.css (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/chosen.css Tue May 19 00:48:34 2015
@@ -116,7 +116,7 @@ This file is generated by `grunt build`,
   display: block;
   width: 12px;
   height: 12px;
-  background: url('chosen-sprite.png') -42px 1px no-repeat;
+  background: url('../../img/chosen-sprite.png') -42px 1px no-repeat;
   font-size: 1px;
 }
 .chosen-container-single .chosen-single abbr:hover {
@@ -137,7 +137,7 @@ This file is generated by `grunt build`,
   display: block;
   width: 100%;
   height: 100%;
-  background: url('chosen-sprite.png') no-repeat 0px 2px;
+  background: url('../../img/chosen-sprite.png') no-repeat 0px 2px;
 }
 .chosen-container-single .chosen-search {
   position: relative;
@@ -153,8 +153,8 @@ This file is generated by `grunt build`,
   height: auto;
   outline: 0;
   border: 1px solid #aaa;
-  background: white url('chosen-sprite.png') no-repeat 100% -20px;
-  background: url('chosen-sprite.png') no-repeat 100% -20px;
+  background: white url('../../img/chosen-sprite.png') no-repeat 100% -20px;
+  background: url('../../img/chosen-sprite.png') no-repeat 100% -20px;
   font-size: 1em;
   font-family: sans-serif;
   line-height: normal;
@@ -300,7 +300,7 @@ This file is generated by `grunt build`,
   display: block;
   width: 12px;
   height: 12px;
-  background: url('chosen-sprite.png') -42px 1px no-repeat;
+  background: url('../../img/chosen-sprite.png') -42px 1px no-repeat;
   font-size: 1px;
 }
 .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
@@ -436,8 +436,8 @@ This file is generated by `grunt build`,
 }
 .chosen-rtl .chosen-search input[type="text"] {
   padding: 4px 5px 4px 20px;
-  background: white url('chosen-sprite.png') no-repeat -30px -20px;
-  background: url('chosen-sprite.png') no-repeat -30px -20px;
+  background: white url('../../img/chosen-sprite.png') no-repeat -30px -20px;
+  background: url('../../img/chosen-sprite.png') no-repeat -30px -20px;
   direction: rtl;
 }
 .chosen-rtl.chosen-container-single .chosen-single div b {
@@ -457,7 +457,7 @@ This file is generated by `grunt build`,
   .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
   .chosen-container .chosen-results-scroll-down span,
   .chosen-container .chosen-results-scroll-up span {
-    background-image: url('chosen-sprite@2x.png') !important;
+    background-image: url('../../img/chosen-sprite-2x.png') !important;
     background-size: 52px 37px !important;
     background-repeat: no-repeat !important;
   }

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/common.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/common.css?rev=1680145&r1=1680144&r2=1680145&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/common.css (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/common.css Tue May 19 00:48:34 2015
@@ -180,6 +180,12 @@ ul
   background-image: url( ../../img/loader-light.gif ) !important;
 }
 
+.universal-loader {
+  position: absolute;
+  left: 0px;
+  top: 0px;
+}
+
 #wrapper
 {
   position: relative;

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=1680145&r1=1680144&r2=1680145&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 Tue May 19 00:48:34 2015
@@ -279,6 +279,7 @@ limitations under the License.
 #core-menu .logging a { background-image: url( ../../img/ico/inbox-document-text.png ); }
 #core-menu .plugins a { background-image: url( ../../img/ico/block.png ); }
 #core-menu .dataimport a { background-image: url( ../../img/ico/document-import.png ); }
+#core-menu .segments a { background-image: url( ../../img/ico/construction.png ); }
 
 
 #content #navigation

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=1680145&r1=1680144&r2=1680145&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/index.html (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/index.html Tue May 19 00:48:34 2015
@@ -28,7 +28,7 @@ limitations under the License.
   <link rel="stylesheet" type="text/css" href="css/angular/cloud.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/angular/cores.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/styles/dashboard.css?_=${version}">
-  <link rel="stylesheet" type="text/css" href="css/styles/dataimport.css?_=${version}">
+  <link rel="stylesheet" type="text/css" href="css/angular/dataimport.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/angular/files.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/angular/index.css?_=${version}">
   <link rel="stylesheet" type="text/css" href="css/styles/java-properties.css?_=${version}">
@@ -37,8 +37,9 @@ limitations under the License.
   <link rel="stylesheet" type="text/css" href="css/angular/plugins.css?_=${version}">
   <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/styles/replication.css?_=${version}">
-  <link rel="stylesheet" type="text/css" href="css/styles/schema-browser.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/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}">
 
@@ -53,6 +54,7 @@ limitations under the License.
   <script src="libs/angular-cookies.min.js"></script>
   <script src="libs/ngtimeago.js"></script>
   <script src="libs/highlight.js"></script>
+  <script src="libs/d3.js"></script>
   <script src="js/angular/app.js"></script>
   <script src="js/angular/services.js"></script>
   <script src="js/angular/controllers/index.js"></script>
@@ -63,10 +65,14 @@ limitations under the License.
   <script src="js/angular/controllers/java-properties.js"></script>
   <script src="js/angular/controllers/core-overview.js"></script>
   <script src="js/angular/controllers/analysis.js"></script>
+  <script src="js/angular/controllers/dataimport.js"></script>
   <script src="js/angular/controllers/documents.js"></script>
   <script src="js/angular/controllers/files.js"></script>
   <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/segments.js"></script>
 
 </head>
 <body ng-controller="MainController">
@@ -91,9 +97,7 @@ limitations under the License.
 
       </div>
 
-      <div id="loading" class="header-message" loading-status-message>
-        Loading...
-      </div>
+      <div id="loading" class="loader universal-loader" loading-status-message>&nbsp;</div>
 
       <div id="connection-box" connection-message>
         <div id="connection-status-modal">
@@ -134,12 +138,12 @@ limitations under the License.
               </ul>
             </li>
 
-            <li id="cloud" class="global optional" ng-show="isCloudEnabled" ng-class="{active:page=='cloud'}"><p><a href="#/~cloud">Cloud</a></p>
+            <li id="cloud" class="global optional" ng-show="isCloudEnabled" ng-class="{active:showingCloud}"><p><a href="#/~cloud">Cloud</a></p>
               <ul ng-show="showingCloud">
                 <li class="tree" ng-class="{active:page=='cloud-tree'}"><a href="#/~cloud?view=tree">Tree</a></li>
                 <li class="graph" ng-class="{active:page=='cloud-graph'}"><a href="#/~cloud">Graph</a></li>
                 <li class="rgraph" ng-class="{active:page=='cloud-rgraph'}"><a href="#/~cloud?view=rgraph">Graph (Radial)</a></li>
-                <li class="dump" ng-class="{active:page=='cloud-dump'}"><a href="#/~cloud">Dump</a></li>
+                <li class="dump" ng-class="{active:page=='cloud-dump'}"><a ng-click="dumpCloud()">Dump</a></li>
               </ul>
             </li>
 
@@ -175,6 +179,7 @@ limitations under the License.
               <li 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 class="schema-browser" ng-class="{active:page=='schema-browser'}"><a href="#/{{currentCore.name}}/schema-browser"><span>Schema Browser</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=1680145&r1=1680144&r2=1680145&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 Tue May 19 00:48:34 2015
@@ -67,6 +67,14 @@ solrAdminApp.config([
         templateUrl: 'partials/analysis.html',
         controller: 'AnalysisController'
       }).
+      when('/:core/dataimport', {
+        templateUrl: 'partials/dataimport.html',
+        controller: 'DataImportController'
+      }).
+      when('/:core/dataimport/:handler*', {
+        templateUrl: 'partials/dataimport.html',
+        controller: 'DataImportController'
+      }).
       when('/:core/documents', {
         templateUrl: 'partials/documents.html',
         controller: 'DocumentsController'
@@ -89,6 +97,26 @@ solrAdminApp.config([
         templateUrl: 'partials/query.html',
         controller: 'QueryController'
       }).
+      when('/:core/replication', {
+        templateUrl: 'partials/replication.html',
+        controller: 'ReplicationController'
+      }).
+      when('/:core/dataimport', {
+        templateUrl: 'partials/dataimport.html',
+        controller: 'DataImportController'
+      }).
+      when('/:core/dataimport/:handler*', {
+        templateUrl: 'partials/dataimport.html',
+        controller: 'DataImportController'
+      }).
+      when('/:core/schema-browser', {
+        templateUrl: 'partials/schema-browser.html',
+        controller: 'SchemaBrowserController'
+      }).
+      when('/:core/segments', {
+        templateUrl: 'partials/segments.html',
+        controller: 'SegmentsController'
+      }).
       otherwise({
         redirectTo: '/'
       });
@@ -110,6 +138,59 @@ solrAdminApp.config([
     }
   };
 })
+.filter('readableSeconds', function() {
+    return function(input) {
+    seconds = parseInt(input||0, 10);
+    var minutes = Math.floor( seconds / 60 );
+    var hours = Math.floor( minutes / 60 );
+
+    var text = [];
+    if( 0 !== hours ) {
+      text.push( hours + 'h' );
+      seconds -= hours * 60 * 60;
+      minutes -= hours * 60;
+    }
+
+    if( 0 !== minutes ) {
+      text.push( minutes + 'm' );
+      seconds -= minutes * 60;
+    }
+
+    if( 0 !== seconds ) {
+      text.push( ( '0' + seconds ).substr( -2 ) + 's' );
+    }
+    return text.join(' ');
+  };
+})
+.filter('number', function($locale) {
+    return function(input) {
+        var sep = {
+          'de_CH' : '\'',
+          'de' : '.',
+          'en' : ',',
+          'es' : '.',
+          'it' : '.',
+          'ja' : ',',
+          'sv' : ' ',
+          'tr' : '.',
+          '_' : '' // fallback
+        };
+
+        var browser = {};
+        var match = $locale.id.match( /^(\w{2})([-_](\w{2}))?$/ );
+        if (match[1]) {
+            browser.language = match[1].toLowerCase();
+        }
+        if (match[1] && match[3]) {
+            browser.locale = match[1] + '_' + match[3];
+        }
+
+        var result= ( input || 0 ).toString().replace(/\B(?=(\d{3})+(?!\d))/g,
+            sep[ browser.locale ] || sep[ browser.language ] || sep['_']);
+        console.log(result);
+        return result;
+    };
+})
 .filter('orderObjectBy', function() {
   return function(items, field, reverse) {
     var filtered = [];
@@ -177,7 +258,7 @@ solrAdminApp.config([
       $rootScope.$broadcast('loadingStatusActive');
     }
     activeRequests++;
-    config.timeout = 1000;
+    config.timeout = 10000;
     return config || $q.when(config);
   };
 
@@ -238,24 +319,29 @@ solrAdminApp.config([
     };
 });
 
-var solrAdminControllers = angular.module('solrAdminControllers', []);
-
-solrAdminApp.controller('MainController', function($scope, $routeParams, $rootScope, $location, Cores, Ping) {
+solrAdminApp.controller('MainController', function($scope, $route, $rootScope, $location, Cores, System, Ping) {
   $rootScope.hideException = function() {delete $rootScope.exception};
   $scope.refresh = function() {
     Cores.list(function(data) {
-     var cores = [];
-       for (key in data.status) {
-        cores.push(data.status[key]);
+      $scope.cores = [];
+      var currentCoreName = $route.current.params.core;
+      for (key in data.status) {
+        var core = data.status[key];
+        $scope.cores.push(core);
+        if (core.name == currentCoreName) {
+            $scope.currentCore = core;
+        }
       }
       $scope.cores = cores;
     });
+    System.get(function(data) {
+      $scope.isCloudEnabledCloud = data.mode.match( /solrcloud/i )
+    });
   };
   $scope.refresh();
 
   $scope.resetMenu = function(page) {
     $scope.showingLogging = page.lastIndexOf("logging", 0) === 0;
-    $scope.isCloudEnabled = true;
     $scope.showingCloud = page.lastIndexOf("cloud", 0) === 0;
     $scope.page = page;
   };
@@ -274,27 +360,93 @@ solrAdminApp.controller('MainController'
 
 
 
-/* THE BELOW CODE IS TAKEN FROM js/scripts/app.js, AND STILL REQUIRES INTEGRATING
+(function(window, angular, undefined) {
+  'use strict';
 
-SolrDate = function( date )
-{
-  // ["Sat Mar 03 11:00:00 CET 2012", "Sat", "Mar", "03", "11:00:00", "CET", "2012"]
-  var parts = date.match( /^(\w+)\s+(\w+)\s+(\d+)\s+(\d+\:\d+\:\d+)\s+(\w+)\s+(\d+)$/ );
+  angular.module('ngClipboard', []).
+    provider('ngClip', function() {
+      var self = this;
+      this.path = '//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.6/ZeroClipboard.swf';
+      return {
+        setPath: function(newPath) {
+         self.path = newPath;
+        },
+        setConfig: function(config) {
+          self.config = config;
+        },
+        $get: function() {
+          return {
+            path: self.path,
+            config: self.config
+          };
+        }
+      };
+    }).
+    run(['ngClip', function(ngClip) {
+      var config = {
+        swfPath: ngClip.path,
+        trustedDomains: ["*"],
+        allowScriptAccess: "always",
+        forceHandCursor: true,
+      };
+      ZeroClipboard.config(angular.extend(config,ngClip.config || {}));
+    }]).
+    directive('clipCopy', ['ngClip', function (ngClip) {
+      return {
+        scope: {
+          clipCopy: '&',
+          clipClick: '&',
+          clipClickFallback: '&'
+        },
+        restrict: 'A',
+        link: function (scope, element, attrs) {
+          // Bind a fallback function if flash is unavailable
+          if (ZeroClipboard.isFlashUnusable()) {
+            element.bind('click', function($event) {
+              // Execute the expression with local variables `$event` and `copy`
+              scope.$apply(scope.clipClickFallback({
+                $event: $event,
+                copy: scope.$eval(scope.clipCopy)
+              }));
+            });
 
-  // "Sat Mar 03 2012 10:37:33"
-  return new Date( parts[1] + ' ' + parts[2] + ' ' + parts[3] + ' ' + parts[6] + ' ' + parts[4] );
-}
+            return;
+          }
 
-// @todo clear timeouts
+          // Create the client object
+          var client = new ZeroClipboard(element);
+          if (attrs.clipCopy === "") {
+            scope.clipCopy = function(scope) {
+              return element[0].previousElementSibling.innerText;
+            };
+          }
+          client.on( 'ready', function(readyEvent) {
+
+            client.on('copy', function (event) {
+              var clipboard = event.clipboardData;
+              clipboard.setData(attrs.clipCopyMimeType || 'text/plain', scope.$eval(scope.clipCopy));
+            });
+
+            client.on( 'aftercopy', function(event) {
+              if (angular.isDefined(attrs.clipClick)) {
+                scope.$apply(scope.clipClick);
+              }
+            });
+
+            scope.$on('$destroy', function() {
+              client.destroy();
+            });
+          });
+        }
+      };
+    }]);
+})(window, window.angular);
 
-    this.bind
-    (
-      'error',
-      function( message, original_error )
-      {
-        alert( original_error.message );
-      }
-    );
+
+/* THE BELOW CODE IS TAKEN FROM js/scripts/app.js, AND STILL REQUIRES INTEGRATING
+
+
+// @todo clear timeouts
 
     // activate_core
     this.before
@@ -362,12 +514,6 @@ var solr_admin = function( app_config )
 
   this.core_regex_base = '^#\\/([\\w\\d-\\.]+)';
 
-  browser = {
-    locale : null,
-    language : null,
-    country : null
-  };
-
   show_global_error = function( error )
   {
     var main = $( '#main' );
@@ -454,8 +600,6 @@ var solr_admin = function( app_config )
     }
 
     var core_selector = $( '#core-selector' );
-    core_selector.find( '#has-cores' ).toggle( has_cores );
-    core_selector.find( '#has-no-cores' ).toggle( !has_cores );
 
     if( has_cores )
     {
@@ -468,70 +612,10 @@ var solr_admin = function( app_config )
       cores_element.find( '.chzn-drop' )
         .css( 'width', ( selector_width - 2 ) + 'px' );
     }
-
-    this.check_for_init_failures( cores );
   };
 
-  this.remove_init_failures = function remove_init_failures()
-  {
-    $( '#init-failures' )
-      .hide()
-      .find( 'ul' )
-        .empty();
-  }
-
-  this.check_for_init_failures = function check_for_init_failures( cores )
-  {
-    if( !cores.initFailures )
-    {
-      this.remove_init_failures();
-      return false;
-    }
-
-    var failures = [];
-    for( var core_name in cores.initFailures )
-    {
-      failures.push
-      (
-        '<li>' +
-          '<strong>' + core_name.esc() + ':</strong>' + "\n" +
-          cores.initFailures[core_name].esc() + "\n" +
-        '</li>'
-      );
-    }
-
-    if( 0 === failures.length )
-    {
-      this.remove_init_failures();
-      return false;
-    }
-
-    $( '#init-failures' )
-      .show()
-      .find( 'ul' )
-        .html( failures.join( "\n" ) );
-  }
-
   this.run = function()
   {
-    var navigator_language = navigator.userLanguage || navigator.language;
-    var language_match = navigator_language.match( /^(\w{2})([-_](\w{2}))?$/ );
-    if( language_match )
-    {
-      if( language_match[1] )
-      {
-        browser.language = language_match[1].toLowerCase();
-      }
-      if( language_match[3] )
-      {
-        browser.country = language_match[3].toUpperCase();
-      }
-      if( language_match[1] && language_match[3] )
-      {
-        browser.locale = browser.language + '_' + browser.country
-      }
-    }
-
     $.ajax
     (
       {
@@ -619,113 +703,10 @@ var solr_admin = function( app_config )
                   '<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />'.esc() +
                   '</code></pre></div>'
                 );
-              },
-              complete : function()
-              {
-                loader.hide( this );
-              }
-            }
-          );
-        },
-        error : function()
-        {
-        },
-        complete : function()
-        {
-        }
-      }
-    );
-  };
-
-  this.convert_duration_to_seconds = function convert_duration_to_seconds( str )
-  {
-    var seconds = 0;
-    var arr = new String( str || '' ).split( '.' );
-    var parts = arr[0].split( ':' ).reverse();
-    var parts_count = parts.length;
-
-    for( var i = 0; i < parts_count; i++ )
-    {
-      seconds += ( parseInt( parts[i], 10 ) || 0 ) * Math.pow( 60, i );
-    }
-
-    // treat more or equal than .5 as additional second
-    if( arr[1] && 5 <= parseInt( arr[1][0], 10 ) )
-    {
-      seconds++;
-    }
-
-    return seconds;
-  };
-
-  this.convert_seconds_to_readable_time = function convert_seconds_to_readable_time( seconds )
-  {
-    seconds = parseInt( seconds || 0, 10 );
-    var minutes = Math.floor( seconds / 60 );
-    var hours = Math.floor( minutes / 60 );
-
-    var text = [];
-    if( 0 !== hours )
-    {
-      text.push( hours + 'h' );
-      seconds -= hours * 60 * 60;
-      minutes -= hours * 60;
-    }
-
-    if( 0 !== minutes )
-    {
-      text.push( minutes + 'm' );
-      seconds -= minutes * 60;
-    }
-
-    if( 0 !== seconds )
-    {
-      text.push( ( '0' + seconds ).substr( -2 ) + 's' );
-    }
-
-    return text.join( ' ' );
-  };
-
-  this.format_json = function format_json( json_str )
-  {
-    if( JSON.stringify && JSON.parse )
-    {
-      json_str = JSON.stringify( JSON.parse( json_str ), undefined, 2 );
-    }
-
-    return json_str.esc();
-  };
-
-  this.format_number = function format_number( number )
-  {
-    var sep = {
-      'de_CH' : '\'',
-      'de' : '.',
-      'en' : ',',
-      'es' : '.',
-      'it' : '.',
-      'ja' : ',',
-      'sv' : ' ',
-      'tr' : '.',
-      '_' : '' // fallback
-    };
-
-    return ( number || 0 ).toString().replace
-    (
-      /\B(?=(\d{3})+(?!\d))/g,
-      sep[ browser.locale ] || sep[ browser.language ] || sep['_']
-    );
   };
 
   check_fixed_menu = function check_fixed_menu()
   {
     $( '#wrapper' ).toggleClass( 'scroll', $( window ).height() < $( '#menu-wrapper' ).height() + $( '#header' ).height() + 40 );
   }
-
-};
-
-
-
-$.ajaxSetup( { cache: false } );
-var app = new solr_admin( app_config );
 */

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=1680145&r1=1680144&r2=1680145&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 Tue May 19 00:48:34 2015
@@ -67,8 +67,9 @@ solrAdminServices.factory('System',
   }])
 .factory('Replication',
   ['$resource', function($resource) {
-    return $resource('/solr/:core/replication', {'wt':'json', core: "@core", 'command': 'details', '_':Date.now()}, {
-      "details": {params: {command: "details"}}
+    return $resource('/solr/:core/replication', {'wt':'json', core: "@core", '_':Date.now()}, {
+      "details": {params: {command: "details"}},
+      "command": {params: {}}
     });
   }])
 .factory('CoreSystem',
@@ -106,8 +107,21 @@ solrAdminServices.factory('System',
 .factory('Luke',
   ['$resource', function($resource) {
     return $resource('/solr/:core/admin/luke', {core: '@core', wt:'json', _:Date.now()}, {
+      "index":  {params: {numTerms: 0}},
       "schema": {params: {show:'schema'}},
-      "index":  {params: {show:'index', numTerms: 0}}
+      "field": {},
+      "fields": {params: {show:'schema'}, interceptor: {
+          response: function(response) {
+              var fieldsAndTypes = [];
+              for (var field in response.data.schema.fields) {
+                fieldsAndTypes.push({group: "Fields", label: field, value: "fieldname=" + field});
+              }
+              for (var type in response.data.schema.types) {
+                fieldsAndTypes.push({group: "Types", label: type, value: "fieldtype=" + type});
+              }
+              return fieldsAndTypes;
+          }
+      }}
     });
   }])
 .factory('Analysis',
@@ -116,6 +130,19 @@ solrAdminServices.factory('System',
       "field": {params: {"analysis.showmatch": true}}
     });
   }])
+.factory('DataImport',
+  ['$resource', function($resource) {
+    return $resource('/solr/:core/dataimport', {core: '@core', indent:'on', wt:'json', _:Date.now()}, {
+      "config": {params: {command: "show-config"}, transformResponse: function(data) {
+          return {config: data};
+      }},
+      "status": {params: {command: "status"}},
+      "reload": {params: {command: "reload-config"}},
+      "post": {method: "POST",
+                headers: {'Content-type': 'application/x-www-form-urlencoded'},
+                transformRequest: function(data) { return $.param(data) }}
+    });
+  }])
 .factory('Ping',
   ['$resource', function($resource) {
     return $resource('/solr/:core/admin/ping', {wt:'json', core: '@core', ts:Date.now(), _:Date.now()}, {
@@ -127,6 +154,7 @@ solrAdminServices.factory('System',
   ['$resource', function($resource) {
     return $resource('/solr/:core/admin/mbeans', {'wt':'json', core: '@core', '_':Date.now()}, {
         stats: {params: {stats: true}},
+        info: {},
         reference: {
             params: {wt: "xml", stats: true}, transformResponse: function (data) {
                 return {reference: data}
@@ -161,11 +189,11 @@ solrAdminServices.factory('System',
         }).success(callback);
       }
     }}
+])
+.factory('Segments',
+   ['$resource', function($resource) {
+       return $resource('/solr/:core/admin/segments', {'wt':'json', core: '@core', _:Date.now()}, {
+           get: {}
+       });
+   }
 ]);
-/*
-http://localhost:8983/solr/techproducts/admin/mbeans?cat=QUERYHANDLER&wt=json&_=1419614354276
-PING:
-http://localhost:8983/solr/techproducts/admin/ping?wt=json&ts=1419614393324&_=1419614393325
-*/
-
-

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=1680145&r1=1680144&r2=1680145&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 Tue May 19 00:48:34 2015
@@ -41,7 +41,7 @@ limitations under the License.
           <li class="settings-holder clearfix">
             <div class="settings clearfix">
               <label for="type_or_name">Analyse Fieldname / FieldType:</label>
-              <select id="type_or_name" ng-model="fieldOrType" ng-options="f.value as f.label group by f.group for f in fieldsAndTypes"></select>
+              <select chosen 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" href="#"><span>Schema Browser</span>&nbsp;</a>
 

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/partials/cloud.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/partials/cloud.html?rev=1680145&r1=1680144&r2=1680145&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/partials/cloud.html (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/partials/cloud.html Tue May 19 00:48:34 2015
@@ -17,15 +17,15 @@ limitations under the License.
 <div id="cloud" class="clearfix">
 
   <div id="frame">
-{{here}}
+
     <div id="tree-content" class="content clearfix" ng-show="showTree">
-    <jstree class="tree" on-select="showTreeLink(url)" config="jstree" data="tree" id="tree"></jstree>
+    <jstree class="tree" on-select="showTreeLink(url)" id="tree"></jstree>
 
       <div id="file-content" class="clearfix">
 
         <div id="prop" ng-show="znode.prop && showData">
           <ul>
-            <li ng-class:"odd:$odd" ng-repeat="(key, prop) in znode.prop">
+            <li ng-class="{odd:$odd}" ng-repeat="(key, prop) in znode.prop">
               <dl class="clearfix">
                 <dt>{{ key }}</dt>
                 <dd>{{ prop }}</dd>

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/partials/core_overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/partials/core_overview.html?rev=1680145&r1=1680144&r2=1680145&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/partials/core_overview.html (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/partials/core_overview.html Tue May 19 00:48:34 2015
@@ -33,7 +33,7 @@ limitations under the License.
           <dt>Last Modified:</dt>
             <dd class="value">{{index.lastModified | timeago}}</dd>
 
-          <dt>Num Docs:</dt>
+          <dt class="index_num-docs">Num Docs:</dt>
             <dd class="value">{{index.numDocs}}</dd>
 
           <dt class="index_max-doc">Max Doc:</dt>

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/partials/logging.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/partials/logging.html?rev=1680145&r1=1680144&r2=1680145&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/partials/logging.html (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/partials/logging.html Tue May 19 00:48:34 2015
@@ -25,6 +25,7 @@ limitations under the License.
         <tr>
           <th class="time">Time (<span>{{timezone}}</span>)</th>
           <th class="level">Level</th>
+          <th class="core">Core</th>
           <th class="logger">Logger</th>
           <th class="message">Message</th>
         </tr>
@@ -33,6 +34,7 @@ limitations under the License.
         <tr ng-click="toggleRow(event)" class="{{event.trace ? 'has-trace': ''}} {{'level-'+event.level.toLowerCase()}}">
           <td class="span"><a><span>{{ timezone == "UTC" ? event.utc_time : event.local_time }}</span></a></td>
           <td class="level span"><a><span>{{ event.level }} {{event.showTrace}}</span></span></a></td>
+          <td class="span"><a><span>{{ event.core }}</span></a></td>
           <td class="span"><a><span><abbr title="{{event.logger}}">{{event.loggerBase}}</abbr></span></a></td>
           <td class="message span"><a><span>{{ event.message }}</span></a></td>
         </tr>