ackepenek commented on a change in pull request #594: URL: https://github.com/apache/solr/pull/594#discussion_r799454017
########## File path: solr/webapp/web/js/angular/controllers/paramsets.js ########## @@ -0,0 +1,88 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ +//helper for formatting JSON and others + +solrAdminApp.controller('ParamSetsController', + function($scope, $routeParams, ParamSet, Constants) { + $scope.resetMenu("paramsets", Constants.IS_COLLECTION_PAGE); + + $scope.refresh = function () { + $scope.commitWithin = 1000; + $scope.overwrite = true; + $scope.paramsetContent = ""; + $scope.placeholder = "{\n" + + " \"set\": {\n" + + " \"myQueries\": {\n" + + " \"defType\": \"edismax\",\n" + + " \"rows\": \"5\",\n" + + " \"df\": \"text_all\"\n" + + " }\n" + + " }\n" + + "}" + }; + + $scope.refresh(); + + Review comment: please remove needless blank lines ########## File path: solr/webapp/web/js/angular/controllers/query.js ########## @@ -209,7 +247,7 @@ solrAdminApp.controller('QueryController', $location.search(key, adminParams[key]); } var currentUrl = $location.$$url; - if (previousUrl === currentUrl) { //if the query send with same parameters the query should be executed + if (previousUrl === currentUrl) { //if the query send with same parameters Review comment: old comment looks better than new one. please return back to old ########## File path: solr/webapp/web/partials/query.html ########## @@ -23,6 +23,18 @@ </label> <input type="text" ng-model="qt" id="qt" placeholder="/select" value="/select" title="Request handler in solrconfig.xml."> + <div> Review comment: I would recommend that field should be optional. If the core has paramsets then it should be shown. otherwise it should not be shown.. But it's up to you ########## File path: solr/webapp/web/partials/paramsets.html ########## @@ -0,0 +1,75 @@ +<!-- +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +--> + +<div id="paramsets" class="clearfix"> + <div id="form"> + <form> + <div id="paramset-name-container"> + <label for="paramsetName"> + <a rel="help">Paramset Name</a> + </label> + <input ng-model="name" name="paramsetName" id="paramsetName" title="ParamSetName" placeholder="Name"> + </div> + + <button type="submit" ng-click="getParamsets()" id="get-paramset">Get Paramset</button> + + <fieldset class="Update Paramset"> + <legend>Update Paramset</legend> + <div class="fieldset" id="paramsetContent-container"> + <label for="paramset"> + <a rel="help">Paramset(s)</a> + </label> + <textarea ng-model="paramsetContent" name="paramsets" id="paramset" title="The Paramset" rows="10" + cols="65" placeholder="{{placeholder}}"></textarea> + </div> + + <div id="advanced"> + <div id="attribs"> + <div id="general-attribs"> + <label for="commitWithin"> + <a rel="help">Commit Within</a> + </label> + <input type="text" ng-model="commitWithin" id="commitWithin" value="1000" title="Commit Within (ms)"> + <label for="overwrite"> + <a rel="help">Overwrite</a> + </label> + <input ng-model="overwrite" type="text" id="overwrite" value="true" title="Overwrite"> + </div> + </div> + </div> + </fieldset> + + <button type="submit" ng-click="submit()" id="submit">Submit Paramset</button> + </form> + </div> + <div id="result"> + <div id="response" ng-show="response"> + <div> + <span class="description">Status: </span>{{ responseStatus }} + </div> + <div> + <span class="description">Response:</span> + <pre class="syntax language-json"><code ng-bind-html="response | highlight:'json' | unsafe"></code></pre> + </div> + </div> + + </div> +</div> + + Review comment: remove unnecessary blank line -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
