You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2015/12/02 20:56:45 UTC

ambari git commit: AMBARI-14082. Hive View : In Database Explorer the scroll bar come over the show table button. (Dipayan Bhowmick via yusaku)

Repository: ambari
Updated Branches:
  refs/heads/trunk f7ce017a7 -> e6c6e17a4


AMBARI-14082. Hive View : In Database Explorer the scroll bar come over the show table button. (Dipayan Bhowmick via yusaku)


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

Branch: refs/heads/trunk
Commit: e6c6e17a4dadb99947f496db1adba89baf0437f2
Parents: f7ce017
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Wed Dec 2 11:56:19 2015 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Wed Dec 2 11:56:19 2015 -0800

----------------------------------------------------------------------
 .../resources/ui/hive-web/app/styles/app.scss   | 33 ++++++++++++++++++++
 .../templates/components/collapsible-widget.hbs | 10 ++++--
 .../hive-web/app/templates/databases-tree.hbs   |  6 ++--
 .../resources/ui/hive-web/app/views/index.js    | 28 +++++++++++++++++
 4 files changed, 72 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e6c6e17a/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss b/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
index b29f7a5..31dafdd 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
@@ -380,6 +380,13 @@ body {
   }
 }
 
+.ellipsis{
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  display:inline-block;
+}
+
 .databases {
   max-height: 500px;
   overflow-y: auto;
@@ -389,10 +396,32 @@ body {
 
     .columns {
       padding-left: 10px;
+      .column-name{
+        width: 10em;
+        font-weight: bold;
+        @extend .ellipsis;
+      }
+    }
+  }
+}
+
+@media only screen and (max-width : 992px) {
+  .databases {
+    .tables {
+      .columns {
+        .column-name{
+          width: 5em;
+        }
+      }
     }
   }
 }
 
+.collapsible-row {
+  width: 13em;
+  @extend .ellipsis;
+}
+
 .selectize-control.plugin-remove_button [data-value] {
   padding-right: 0 !important;
 }
@@ -585,3 +614,7 @@ tree-view ul li {
   box-shadow: none;
   width: inherit;
 }
+
+.widget-controls {
+  padding-right: 10px;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/e6c6e17a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs
index 230ec3b..68ff307 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/collapsible-widget.hbs
@@ -16,9 +16,13 @@
 * limitations under the License.
 }}
 
-<div>
-  <a {{action "toggle"}} {{bind-attr class=":fa iconClass"}}> {{heading}}</a>
-  <div class="pull-right">
+<div class="clearfix">
+
+  <a {{action "toggle"}} {{bind-attr class=":fa iconClass :collapsible-row" data-original-title=heading}}
+          data-toggle="tooltip" data-placement="top"
+          title>{{heading}}</a>
+
+  <div class="pull-right widget-controls">
     {{#each control in controls}}
       <a {{action 'sendControlAction' control.action}} {{bind-attr class=":fa control.icon" title="control.tooltip"}}></a>
     {{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/e6c6e17a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/databases-tree.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/databases-tree.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/databases-tree.hbs
index f1fdbf7..5023c40 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/databases-tree.hbs
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/databases-tree.hbs
@@ -27,8 +27,10 @@
                 <div class="columns">
                   {{#each column in table.visibleColumns}}
                     <div>
-                      <strong>{{column.name}}</strong>
-                      <span class="pull-right">{{format-column-type column}}</span>
+                      <div class="column-name" {{bind-attr data-original-title=column.name}}
+                              data-toggle="tooltip" data-placement="top" title>{{column.name}}
+                      </div>
+                      <span class="pull-right widget-controls">{{format-column-type column}}</span>
                     </div>
                   {{/each}}
                   {{#if table.canGetNextPage}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/e6c6e17a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/index.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/index.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/index.js
new file mode 100644
index 0000000..204e67f
--- /dev/null
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/index.js
@@ -0,0 +1,28 @@
+/**
+ * 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.
+ */
+
+import Ember from 'ember';
+
+export default Ember.View.extend({
+  didInsertElement: function() {
+    this._super();
+    Ember.$('body').tooltip({
+      selector: '[data-toggle="tooltip"]'
+    });
+  }
+});