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/04/04 19:15:43 UTC
svn commit: r1671282 - in /lucene/dev/branches/branch_5x: ./ partials/ solr/
solr/webapp/ solr/webapp/web/ solr/webapp/web/css/angular/
solr/webapp/web/js/angular/ solr/webapp/web/js/angular/controllers/
Author: erick
Date: Sat Apr 4 17:15:42 2015
New Revision: 1671282
URL: http://svn.apache.org/r1671282
Log:
SOLR-7263: Add files tab support to AngularJS Admin UI
Added:
lucene/dev/branches/branch_5x/partials/files.html
- copied unchanged from r1671281, lucene/dev/trunk/partials/files.html
lucene/dev/branches/branch_5x/solr/webapp/web/css/angular/files.css
- copied unchanged from r1671281, lucene/dev/trunk/solr/webapp/web/css/angular/files.css
lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/files.js
- copied unchanged from r1671281, lucene/dev/trunk/solr/webapp/web/js/angular/controllers/files.js
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/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
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=1671282&r1=1671281&r2=1671282&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/index.html (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/index.html Sat Apr 4 17:15:42 2015
@@ -29,7 +29,7 @@ limitations under the License.
<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/styles/files.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}">
<link rel="stylesheet" type="text/css" href="css/angular/logging.css?_=${version}">
@@ -64,6 +64,7 @@ limitations under the License.
<script src="js/angular/controllers/core-overview.js"></script>
<script src="js/angular/controllers/analysis.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>
</head>
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=1671282&r1=1671281&r2=1671282&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 Sat Apr 4 17:15:42 2015
@@ -71,6 +71,10 @@ solrAdminApp.config([
templateUrl: 'partials/documents.html',
controller: 'DocumentsController'
}).
+ when('/:core/files', {
+ templateUrl: 'partials/files.html',
+ controller: 'FilesController'
+ }).
when('/:core/query', {
templateUrl: 'partials/query.html',
controller: 'QueryController'
@@ -81,7 +85,7 @@ solrAdminApp.config([
}])
.filter('highlight', function($sce) {
return function(input, lang) {
- if (lang && input) return hljs.highlight(lang, input).value;
+ if (lang && input && lang!="text") return hljs.highlight(lang, input).value;
return input;
}
})
@@ -129,10 +133,14 @@ solrAdminApp.config([
"animation" : 0
}
};
- var tree = $(element).jstree(treeConfig).jstree('open_node','li:first');
+
+ var tree = $(element).jstree(treeConfig);
+ tree.jstree('open_node','li:first');
if (tree) {
- tree.bind("select_node.jstree", function (event, data) {
- scope.onSelect({url: data.args[0].href});
+ element.bind("select_node.jstree", function (event, data) {
+ scope.$apply(function() {
+ scope.onSelect({url: data.args[0].href, data: data});
+ });
});
}
}
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=1671282&r1=1671281&r2=1671282&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 Sat Apr 4 17:15:42 2015
@@ -129,7 +129,12 @@ solrAdminServices.factory('System',
}])
.factory('Files',
['$resource', function($resource) {
- return $resource('/solr/:core/admin/file', {'wt':'json', '_':Date.now()}); // @core
+ return $resource('/solr/:core/admin/file', {'wt':'json', core: '@core', '_':Date.now()}, {
+ "list": {},
+ "get": {method: "GET", interceptor: {
+ response: function(config) {return config;}
+ }}
+ });
}])
.factory('Query', // use $http for Query, as we need complete control over the URL
['$http', '$location', function($http, $location) {