SOLR-7858 Add web.xml changes

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1710333 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Upayavira 2015-10-24 11:40:07 +00:00
parent 755c578e95
commit 8de8349b3d
5 changed files with 57 additions and 13 deletions

View File

@ -141,7 +141,12 @@
<servlet-mapping> <servlet-mapping>
<servlet-name>LoadAdminUI</servlet-name> <servlet-name>LoadAdminUI</servlet-name>
<url-pattern>/admin.html</url-pattern> <url-pattern>/old.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LoadAdminUI</servlet-name>
<url-pattern>/index.html</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>
@ -156,7 +161,7 @@
</mime-mapping> </mime-mapping>
<welcome-file-list> <welcome-file-list>
<welcome-file>admin.html</welcome-file> <welcome-file>index.html</welcome-file>
</welcome-file-list> </welcome-file-list>
</web-app> </web-app>

View File

@ -278,7 +278,7 @@ limitations under the License.
.sub-menu .analysis a { background-image: url( ../../img/ico/funnel.png ); } .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 .documents a { background-image: url( ../../img/ico/documents-stack.png ); }
.sub-menu .files a { background-image: url( ../../img/ico/folder.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 .replication a { background-image: url( ../../img/ico/node.png ); }
.sub-menu .distribution a { background-image: url( ../../img/ico/node-select.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 ); } .sub-menu .ping a { background-image: url( ../../img/ico/system-monitor.png ); }

View File

@ -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/documents.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/query.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/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/segments.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/threads.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}"> <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/query.js"></script>
<script src="js/angular/controllers/plugins.js"></script> <script src="js/angular/controllers/plugins.js"></script>
<script src="js/angular/controllers/replication.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> <script src="js/angular/controllers/segments.js"></script>
</head> </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="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="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="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> </ul>
</div> </div>
<div id="core-selector"> <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 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 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 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> <li class="segments" ng-class="{active:page=='segments'}"><a href="#/{{currentCore.name}}/segments"><span>Segments info</span></a></li>
</ul> </ul>
</div> </div>

View File

@ -121,9 +121,9 @@ solrAdminApp.config([
templateUrl: 'partials/dataimport.html', templateUrl: 'partials/dataimport.html',
controller: 'DataImportController' controller: 'DataImportController'
}). }).
when('/:core/schema-browser', { when('/:core/schema', {
templateUrl: 'partials/schema-browser.html', templateUrl: 'partials/schema.html',
controller: 'SchemaBrowserController' controller: 'SchemaController'
}). }).
when('/:core/segments', { when('/:core/segments', {
templateUrl: 'partials/segments.html', templateUrl: 'partials/segments.html',
@ -156,6 +156,31 @@ 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);
}
});
}
};
})
.filter('readableSeconds', function() { .filter('readableSeconds', function() {
return function(input) { return function(input) {
seconds = parseInt(input||0, 10); seconds = parseInt(input||0, 10);

View File

@ -136,7 +136,8 @@ solrAdminServices.factory('System',
.factory('Luke', .factory('Luke',
['$resource', function($resource) { ['$resource', function($resource) {
return $resource('/solr/:core/admin/luke', {core: '@core', wt:'json', _:Date.now()}, { 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'}}, "schema": {params: {show:'schema'}},
"field": {}, "field": {},
"fields": {params: {show:'schema'}, interceptor: { "fields": {params: {show:'schema'}, interceptor: {
@ -238,5 +239,18 @@ solrAdminServices.factory('System',
return $resource('/solr/:core/admin/segments', {'wt':'json', core: '@core', _:Date.now()}, { return $resource('/solr/:core/admin/segments', {'wt':'json', core: '@core', _:Date.now()}, {
get: {} 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"}
})
}]);