Apache Solr open-source search software
SOLR-16096: Add createNodeSet to Advanced Collection Creation Options (#745)
Eric Pughf1e4026c4d58
diff --git a/dev-docs/FAQ.adoc b/dev-docs/FAQ.adocindex 5d6b004972a..dd5163b6ebd 100644--- a/dev-docs/FAQ.adoc+++ b/dev-docs/FAQ.adoc@@ -4,7 +4,7 @@== FAQ-This document provides a quick reference for frequently questioned concepts and features in Credentials.+This document provides a quick reference for common developer questions.=== What do I do with NOTICE.txt if I don't have one to satisfy Gradle?@@ -18,3 +18,10 @@ branch to avoid extra mailing list traffic etc.Periodically review https://github.com/apache/solr/branches/all to see if you havecreated a branch that can be deleted.++=== Whats the fastest build lifecycle for frontend work on Solr Admin?++Run `gradle dev`, and then `cd ./packaging/build/dev/`. Fire up your cluster+via `bin/solr start -e cloud -noprompt` and then as you make changes to assets in `/solr/webapp/web`,+run `gradle dev` to redeploy the web assets. Do a hard refresh in your browser+to pick up your changes.diff --git a/solr/webapp/web/js/angular/controllers/collections.js b/solr/webapp/web/js/angular/controllers/collections.jsindex 0abf7b3e65a..b9187736adc 100644--- a/solr/webapp/web/js/angular/controllers/collections.js+++ b/solr/webapp/web/js/angular/controllers/collections.js@@ -23,6 +23,14 @@ solrAdminApp.controller('CollectionsController',$scope.rootUrl = Constants.ROOT_URL + "#/~collections/" + $routeParams.collection;+ Zookeeper.liveNodes({}, function(data) {+ $scope.availableNodeSet = [];+ var children = data.tree[0].children;+ for (var child in children) {+ $scope.availableNodeSet.push(children[child].text);+ }+ });+Collections.status(function (data) {$scope.collections = [];for (var name in data.cluster.collections) {@@ -157,6 +165,7 @@ solrAdminApp.controller('CollectionsController',};if (coll.shards) params.shards = coll.shards;if (coll.routerField) params["router.field"] = coll.routerField;+ if (coll.createNodeSet) params.createNodeSet = coll.createNodeSet.join(",");Collections.add(params, function(data) {$scope.cancelAddCollection();$scope.resetMenu("collections", Constants.IS_ROOT_PAGE);@@ -277,13 +286,3 @@ solrAdminApp.controller('CollectionsController',$scope.refresh();});--var flatten = function(data) {- var list = [];- for (var name in data) {- var entry = data[name];- entry.name = name;- list.push(entry);- }- return list;-}diff --git a/solr/webapp/web/partials/collections.html b/solr/webapp/web/partials/collections.htmlindex b4d4c2b7487..1fc2029a246 100644--- a/solr/webapp/web/partials/collections.html+++ b/solr/webapp/web/partials/collections.html@@ -19,7 +19,7 @@ limitations under the License.<div id="ui-block" style="display:none"> </div><!-- @todo what is this for? --><div class="actions clearfix">- <div class="action add" data-rel="add" ng-show="showAdd" style="left:0px">+ <div class="action add" data-rel="add" ng-show="showAdd" style="left:0px;width:500px"><form>@@ -55,6 +55,16 @@ limitations under the License.<p class="clearfix"><label for="add_routerField">router.field:</label><input type="text" name="routerField" id="add_routerField" ng-model="newCollection.routerField"></p>+ <p class="clearfix"><label for="add_createNodeSet">createNodeSet:</label>+ <select+ chosen+ multiple+ disable-search="true"+ ng-model="newCollection.createNodeSet"+ ng-options="node for node in availableNodeSet">+ </select>+ </p>+</div><p class="clearfix note error" ng-show="addMessage"><span>{{addMessage}}</span>