zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jongy...@apache.org
Subject zeppelin git commit: [MINOR] Show properties ordered alphabetically
Date Thu, 23 Jun 2016 15:40:03 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master 230d89014 -> 73f435f87


[MINOR] Show properties ordered alphabetically

### What is this PR for?
Showing properties sorted in the interpreter tab

### What type of PR is it?
[Improvement]

### Todos
* [x] - Change the np-repeat block

### What is the Jira issue?
N/A

### How should this be tested?

### Screenshots (if appropriate)
<img width="612" alt="screen shot 2016-06-20 at 6 10 38 pm" src="https://cloud.githubusercontent.com/assets/3612566/16188806/54f985aa-3712-11e6-851f-a08870b3bf5b.png">

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jongyoul Lee <jongyoul@gmail.com>

Closes #1050 from jongyoul/minor-sort-interpreter-properties and squashes the following commits:

a0e5eee [Jongyoul Lee] Replaced function to filter
6f45203 [Jongyoul Lee] Removed unused function
2c9aad9 [Jongyoul Lee] Changed view function to show properties alphabetically


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/73f435f8
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/73f435f8
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/73f435f8

Branch: refs/heads/master
Commit: 73f435f87c35be4a2e6f7fb5e2c00e0a679c9984
Parents: 230d890
Author: Jongyoul Lee <jongyoul@gmail.com>
Authored: Mon Jun 20 23:26:11 2016 +0900
Committer: Jongyoul Lee <jongyoul@apache.org>
Committed: Fri Jun 24 00:39:54 2016 +0900

----------------------------------------------------------------------
 .../src/app/interpreter/interpreter.filter.js   | 22 ++++++++++++++++++++
 .../src/app/interpreter/interpreter.html        |  6 +++---
 zeppelin-web/src/index.html                     |  1 +
 3 files changed, 26 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/73f435f8/zeppelin-web/src/app/interpreter/interpreter.filter.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/interpreter/interpreter.filter.js b/zeppelin-web/src/app/interpreter/interpreter.filter.js
new file mode 100644
index 0000000..2e9010a
--- /dev/null
+++ b/zeppelin-web/src/app/interpreter/interpreter.filter.js
@@ -0,0 +1,22 @@
+/* jshint loopfunc: true */
+/*
+ * Licensed 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.
+ */
+'use strict';
+
+angular.module('zeppelinWebApp').filter('sortByKey', function () {
+  return function (properties) {
+    var sortedKeys = properties ? Object.keys(properties) : [];
+    return sortedKeys.sort();
+  };
+});

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/73f435f8/zeppelin-web/src/app/interpreter/interpreter.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/interpreter/interpreter.html b/zeppelin-web/src/app/interpreter/interpreter.html
index 86eef7a..330bcbe 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.html
+++ b/zeppelin-web/src/app/interpreter/interpreter.html
@@ -152,7 +152,7 @@ limitations under the License.
         </span>
         <span>Interpreter for note</span>
       </div>
-      
+
       <br />
       <div class="col-md-12">
         <div class="checkbox">
@@ -189,11 +189,11 @@ limitations under the License.
               <th ng-if="valueform.$visible">action</th>
             </tr>
           </thead>
-          <tr ng-repeat="(key, value) in setting.properties" >
+          <tr ng-repeat="key in setting.properties | sortByKey" >
             <td>{{key}}</td>
             <td>
               <span editable-textarea="setting.properties[key]" e-form="valueform" e-msd-elastic>
-                {{value | breakFilter}}
+                {{setting.properties[key] | breakFilter}}
               </span>
             </td>
             <td ng-if="valueform.$visible">

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/73f435f8/zeppelin-web/src/index.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/index.html b/zeppelin-web/src/index.html
index 8efce04..cad1308 100644
--- a/zeppelin-web/src/index.html
+++ b/zeppelin-web/src/index.html
@@ -145,6 +145,7 @@ limitations under the License.
     <script src="app/home/home.controller.js"></script>
     <script src="app/notebook/notebook.controller.js"></script>
     <script src="app/interpreter/interpreter.controller.js"></script>
+    <script src="app/interpreter/interpreter.filter.js"></script>
     <script src="app/credential/credential.controller.js"></script>
     <script src="app/configuration/configuration.controller.js"></script>
     <script src="app/notebook/paragraph/paragraph.controller.js"></script>


Mime
View raw message