zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cornead...@apache.org
Subject incubator-zeppelin git commit: Interpreter properties editor updates
Date Thu, 17 Dec 2015 07:17:10 GMT
Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 6ac6a5608 -> 9e6ebd816


Interpreter properties editor updates

- Add extra validations in add new interpreter property function to
  prevent 'undefined'
- Instead of an empty table show a message when there are no properties to display
- Apply bootstrap style for the table

Before
<img width="1370" alt="screen shot 2015-12-09 at 2 34 48 pm" src="https://cloud.githubusercontent.com/assets/2031306/11681329/4bbfced0-9e84-11e5-995a-60dd73b7eded.png">
<img width="1669" alt="screen shot 2015-12-09 at 2 34 36 pm" src="https://cloud.githubusercontent.com/assets/2031306/11681330/4bc33a34-9e84-11e5-9fd9-0d5a961d6ee5.png">
<hr>
After
<img width="1651" alt="screen shot 2015-12-09 at 2 36 07 pm" src="https://cloud.githubusercontent.com/assets/2031306/11681339/560d7d56-9e84-11e5-9900-ff5c66779d80.png">
<img width="1676" alt="screen shot 2015-12-09 at 2 35 47 pm" src="https://cloud.githubusercontent.com/assets/2031306/11681340/560f93fc-9e84-11e5-9c09-8ae8e91769cd.png">

Author: Renjith Kamath <renjith.kamath@gmail.com>

Closes #525 from r-kamath/interpreterPropertyPageFix and squashes the following commits:

80da2d9 [Renjith Kamath] add border for table-striped
4fafa2b [Renjith Kamath] review updates
45b44ed [Renjith Kamath] Merge branch 'master' of https://github.com/apache/incubator-zeppelin
into interpreterPropertyPageFix
146ef21 [Renjith Kamath] Interpreter properties editor updates


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

Branch: refs/heads/master
Commit: 9e6ebd81660c214e7c916cffc04e45e61d8c8871
Parents: 6ac6a56
Author: Renjith Kamath <renjith.kamath@gmail.com>
Authored: Wed Dec 16 12:09:08 2015 +0530
Committer: Damien CORNEAU <corneadoug@gmail.com>
Committed: Thu Dec 17 16:16:51 2015 +0900

----------------------------------------------------------------------
 zeppelin-web/src/app/home/home.css              |  4 ----
 .../app/interpreter/interpreter.controller.js   |  4 ++++
 .../src/app/interpreter/interpreter.css         | 18 +++++++++++----
 .../src/app/interpreter/interpreter.html        | 24 ++++++++++++--------
 zeppelin-web/src/app/notebook/notebook.css      |  5 ----
 .../src/app/notebook/paragraph/paragraph.css    |  5 ++++
 6 files changed, 37 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/9e6ebd81/zeppelin-web/src/app/home/home.css
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/home/home.css b/zeppelin-web/src/app/home/home.css
index 62bef10..6130c2e 100644
--- a/zeppelin-web/src/app/home/home.css
+++ b/zeppelin-web/src/app/home/home.css
@@ -275,10 +275,6 @@ kbd {
   border-radius: 2px;
 }
 
-.home {
-  min-height: 400px;
-}
-
 /*
   ngToast Style
 */

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/9e6ebd81/zeppelin-web/src/app/interpreter/interpreter.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/interpreter/interpreter.controller.js b/zeppelin-web/src/app/interpreter/interpreter.controller.js
index e4c772a..ea62b16 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.controller.js
+++ b/zeppelin-web/src/app/interpreter/interpreter.controller.js
@@ -20,6 +20,7 @@ angular.module('zeppelinWebApp').controller('InterpreterCtrl', function($scope,
   $scope.interpreterSettings = [];
   $scope.availableInterpreters = {};
   $scope.showAddNewSetting = false;
+  $scope._ = _;
 
   var getInterpreterSettings = function() {
     $http.get(baseUrlSrv.getRestApiBase()+'/interpreter/setting').
@@ -216,6 +217,9 @@ angular.module('zeppelinWebApp').controller('InterpreterCtrl', function($scope,
       var index = _.findIndex($scope.interpreterSettings, { 'id': settingId });
       var setting = $scope.interpreterSettings[index];
 
+      if (!setting.propertyKey || setting.propertyKey === '') {
+        return;
+      }
       setting.properties[setting.propertyKey] = setting.propertyValue;
       emptyNewProperty(setting);
     }

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/9e6ebd81/zeppelin-web/src/app/interpreter/interpreter.css
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/interpreter/interpreter.css b/zeppelin-web/src/app/interpreter/interpreter.css
index 8973895..b6fe133 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.css
+++ b/zeppelin-web/src/app/interpreter/interpreter.css
@@ -62,10 +62,6 @@
   overflow-y: auto;
 }
 
-.interpreter table tr {
-  height : 45px;
-}
-
 .interpreterSettingAdd {
   margin : 5px 5px 5px 5px;
   padding : 10px 10px 10px 10px;
@@ -74,3 +70,17 @@
 .editable-wrap {
   width : 100%;
 }
+
+.interpreter h5 {
+  font-weight: bold;
+}
+
+.new_h3 {
+  margin-top: 1px;
+  padding-top: 7px;
+  float: left;
+}
+
+.empty-properties-message {
+  color: #666;
+}

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/9e6ebd81/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 f9f7585..57984da 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.html
+++ b/zeppelin-web/src/app/interpreter/interpreter.html
@@ -15,7 +15,7 @@ limitations under the License.
   <div class="header">
     <div class="row">
       <div class="col-md-12">
-        <h3 class="new_h3" style="float:left">
+        <h3 class="new_h3">
           Interpreters
         </h3>
         <span class="btn btn-default fa fa-plus"
@@ -65,17 +65,21 @@ limitations under the License.
         </span>
       </div>
     </div>
-    <br />
     <div class="row interpreter">
-      <div class="col-md-12">
-        <b>Properties</b>
+      <div ng-show="_.isEmpty(setting.properties) || valueform.$hidden" class="col-md-12
empty-properties-message">
+        <em>Currently there are no properties set for this interpreter</em>
+      </div>
+      <div class="col-md-12" ng-show="!_.isEmpty(setting.properties) || valueform.$visible">
+        <h5>Properties</h5>
         <table class="table table-striped">
-          <tr>
-            <th style="width:30%">name</th>
-            <th>value</th>
-            <th ng-if="valueform.$visible">action</th>
-          </tr>
-          <tr ng-repeat="(key, value) in setting.properties">
+          <thead>
+            <tr>
+              <th style="width:30%">name</th>
+              <th>value</th>
+              <th ng-if="valueform.$visible">action</th>
+            </tr>
+          </thead>
+          <tr ng-repeat="(key, value) in setting.properties" >
             <td>{{key}}</td>
             <td>
               <span editable-textarea="setting.properties[key]" e-form="valueform" e-msd-elastic>

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/9e6ebd81/zeppelin-web/src/app/notebook/notebook.css
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/notebook.css b/zeppelin-web/src/app/notebook/notebook.css
index 8c37e3b..b41bdb4 100644
--- a/zeppelin-web/src/app/notebook/notebook.css
+++ b/zeppelin-web/src/app/notebook/notebook.css
@@ -104,11 +104,6 @@
   color: #333333;
 }
 
-.new_h3 {
-  margin-top: 1px;
-  padding-top: 7px;
-}
-
 .form-control2 {
   width: 100%;
   height: 40px;

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/9e6ebd81/zeppelin-web/src/app/notebook/paragraph/paragraph.css
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.css b/zeppelin-web/src/app/notebook/paragraph/paragraph.css
index 45a94b9..bdf09c2 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.css
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.css
@@ -404,3 +404,8 @@
 .dropdown-menu > li:first-child > a:hover {
   background-color: transparent;
 }
+
+table.table-striped {
+  border-top: 1px solid #ddd;
+  margin-top: 20px;
+}


Mime
View raw message