You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2013/09/25 12:01:15 UTC
git commit: AMBARI-3332. switching to Configs tab causes Quick Links
to disappear. (onechiporenko)
Updated Branches:
refs/heads/branch-1.4.1 14767556e -> 69e649487
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/69e64948
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/69e64948
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/69e64948
Branch: refs/heads/branch-1.4.1
Commit: 69e649487e41bf16ca6e7ecd5d47939a6c2bd349
Parents: 1476755
Author: Oleg Nechiporenko <cv...@yahoo.com>
Authored: Wed Sep 25 12:47:15 2013 +0300
Committer: Oleg Nechiporenko <cv...@yahoo.com>
Committed: Wed Sep 25 13:01:10 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/69e64948/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/69e64948/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/69e64948/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/69e64948/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()
});