incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject [2/2] git commit: AMBARI-3332. switching to Configs tab causes Quick Links to disappear. (onechiporenko)
Date Wed, 25 Sep 2013 09:59:33 GMT
AMBARI-3332. switching to Configs tab causes Quick Links to disappear. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 43674bae3ce6268ed9bcc26fe33f4d607f521953
Parents: 11c577a
Author: Oleg Nechiporenko <cv_github@yahoo.com>
Authored: Wed Sep 25 12:44:08 2013 +0300
Committer: Oleg Nechiporenko <cv_github@yahoo.com>
Committed: Wed Sep 25 12:58:01 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/styles/application.less          | 15 ++++++-----
 .../app/templates/main/service/info/summary.hbs | 18 -------------
 ambari-web/app/templates/main/service/item.hbs  | 21 +++++++++++++++
 ambari-web/app/views/main/service/item.js       | 28 +++++++++++++++++++-
 4 files changed, 56 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/43674bae/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index bac2f0b..8823bdb 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -1995,13 +1995,14 @@ width:100%;
     background: #953B39;
   }
 }
-
-.nav-pills.move {
-  float: right;
-  margin-top: -48px;
-  width:105px;
-  &>li {
-    position: absolute;
+.quick-links-wrapper {
+  margin-top: -53px;
+  .nav-pills.move {
+    float: right;
+    width:105px;
+    &>li {
+      position: absolute;
+    }
   }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/43674bae/ambari-web/app/templates/main/service/info/summary.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary.hbs b/ambari-web/app/templates/main/service/info/summary.hbs
index 52031bf..9fb6a50 100644
--- a/ambari-web/app/templates/main/service/info/summary.hbs
+++ b/ambari-web/app/templates/main/service/info/summary.hbs
@@ -18,24 +18,6 @@
 
 <div class="row-fluid service-block">
   <div class="span6">
-    {{#if view.service.quickLinks.length}}
-      {{#view App.QuickViewLinks contentBinding="view.service"}}
-        <ul class="nav nav-pills move">
-          <li class="dropdown">
-            <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{t common.quickLinks}}<b
class="caret"></b></a>
-            <ul class="dropdown-menu">
-              {{#each view.quickLinks}}
-                {{#if disabled}}
-                    <a class="disabled-hdfs-quick-link">{{label}}</a>
-                {{else}}
-                    <a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a>
-                {{/if}}
-              {{/each}}
-            </ul>
-          </li>
-        </ul>
-      {{/view}}
-    {{/if}}
 
     <div class="box">
       <div class="box-header">

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/43674bae/ambari-web/app/templates/main/service/item.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/item.hbs b/ambari-web/app/templates/main/service/item.hbs
index c537afc..2f422fd 100644
--- a/ambari-web/app/templates/main/service/item.hbs
+++ b/ambari-web/app/templates/main/service/item.hbs
@@ -17,6 +17,27 @@
 }}
 
 {{view App.MainServiceInfoMenuView configTabBinding="view.hasConfigTab"}}
+  <div class="span6 quick-links-wrapper">
+    {{#if view.service.quickLinks.length}}
+      {{#view App.QuickViewLinks contentBinding="view.service"}}
+          <ul class="nav nav-pills move">
+              <li class="dropdown">
+                  <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{t common.quickLinks}}<b
class="caret"></b></a>
+                  <ul class="dropdown-menu">
+                    {{#each view.quickLinks}}
+                      {{#if disabled}}
+                          <a class="disabled-hdfs-quick-link">{{label}}</a>
+                      {{else}}
+                          <a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a>
+                      {{/if}}
+                    {{/each}}
+                  </ul>
+              </li>
+          </ul>
+      {{/view}}
+    {{/if}}
+  </div>
+
 {{#if App.isAdmin}}
 <div class="service-button">
   {{#if view.isMaintenanceActive}}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/43674bae/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index 3949273..8c0910b 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -76,5 +76,31 @@ App.MainServiceItemView = Em.View.extend({
 
   didInsertElement: function () {
     this.get('controller').setStartStopState();
-  }
+  },
+  service:function () {
+    var svc = this.get('controller.content');
+    var svcName = svc.get('serviceName');
+    if (svcName) {
+      switch (svcName.toLowerCase()) {
+        case 'hdfs':
+          svc = App.HDFSService.find().objectAt(0);
+          break;
+        case 'yarn':
+          svc = App.YARNService.find().objectAt(0);
+          break;
+        case 'mapreduce':
+          svc = App.MapReduceService.find().objectAt(0);
+          break;
+        case 'hbase':
+          svc = App.HBaseService.find().objectAt(0);
+          break;
+        case 'flume':
+          svc = App.FlumeService.find().objectAt(0);
+          break;
+        default:
+          break;
+      }
+    }
+    return svc;
+  }.property('controller.content.serviceName').volatile()
 });


Mime
View raw message