Repository: zeppelin Updated Branches: refs/heads/master 39dd445a7 -> 2ea1ce541
[ZEPPELIN-1593] Enforce sorting on dynamic form elements ### What is this PR for? Current dynamic forms elements in zeppelin-web have no ordering. The ordering of the dynamic elements is random which can be annoying when you have many of them. The root cause is that the angular frontend uses "for key in object" pattern with no sorting. I have added sorting. ### What type of PR is it? Improvement ### What is the Jira issue? [ZEPPELIN-1593](https://issues.apache.org/jira/browse/ZEPPELIN-1593) ### How should this be tested? Dynamic forms should now have fields sorted by name. ``` %md ${a=1} ${b=1} ${c=1} ${d=1} ${bb=1} ${ba=1} ``` ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: John Trengrove <[email protected]> Closes #1572 from trengrj/sort-form and squashes the following commits: 7ba9a3b [John Trengrove] [ZEPPELIN-1593] Enforce sorting on dynamic form elements Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/2ea1ce54 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/2ea1ce54 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/2ea1ce54 Branch: refs/heads/master Commit: 2ea1ce541ee4a44c42b2a8c6caf6d3d1739217b8 Parents: 39dd445 Author: John Trengrove <[email protected]> Authored: Mon Oct 31 22:40:43 2016 +1100 Committer: Lee moon soo <[email protected]> Committed: Thu Nov 3 15:31:06 2016 -0700 ---------------------------------------------------------------------- .../app/notebook/paragraph/paragraph-parameterizedQueryForm.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2ea1ce54/zeppelin-web/src/app/notebook/paragraph/paragraph-parameterizedQueryForm.html ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph-parameterizedQueryForm.html b/zeppelin-web/src/app/notebook/paragraph/paragraph-parameterizedQueryForm.html index 86bb7c6..000b4fe 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph-parameterizedQueryForm.html +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph-parameterizedQueryForm.html @@ -15,7 +15,7 @@ limitations under the License. ng-show="!paragraph.config.tableHide" class=" paragraphForm form-horizontal row"> <div class="form-group col-sm-6 col-md-6 col-lg-4" - ng-repeat="formulaire in paragraph.settings.forms" + ng-repeat="formulaire in paragraph.settings.forms | toArray | orderBy:'name.toString()'" ng-init="loadForm(formulaire, paragraph.settings.params)"> <label class="control-label input-sm" ng-class="{'disable': paragraph.status == 'RUNNING' || paragraph.status == 'PENDING' }">{{formulaire.name}}</label> <div>
