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/11/22 15:15:10 UTC
[1/2] git commit: AMBARI-3857. Clicking on Settings link navigates to
login page for a non-admin user. (onechiporenko)
Updated Branches:
refs/heads/trunk a4dee94c5 -> c33215607
AMBARI-3857. Clicking on Settings link navigates to login page for a non-admin user. (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/4fe3a717
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/4fe3a717
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/4fe3a717
Branch: refs/heads/trunk
Commit: 4fe3a7172f26b3677920aed8b6eb940f1b19d404
Parents: a4dee94
Author: Oleg Nechiporenko <cv...@yahoo.com>
Authored: Fri Nov 22 16:08:00 2013 +0200
Committer: Oleg Nechiporenko <cv...@yahoo.com>
Committed: Fri Nov 22 16:15:05 2013 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/application.js | 3 +++
ambari-web/app/templates/application.hbs | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fe3a717/ambari-web/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/application.js b/ambari-web/app/controllers/application.js
index ab079b4..ef72985 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -107,6 +107,9 @@ App.ApplicationController = Em.Controller.extend({
},
showSettingsPopup: function() {
+ // Settings only for admins
+ if (!App.get('isAdmin')) return;
+
var self = this;
var curValue = null;
this.dataLoading().done(function (initValue) {
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fe3a717/ambari-web/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs
index ee3c46d..2eb986b 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -44,7 +44,9 @@
{{App.router.loginName}} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
- <li><a href="" {{action showSettingsPopup target="controller"}}>{{t app.settings}}</a></li>
+ {{#if App.isAdmin}}
+ <li><a href="" {{action showSettingsPopup target="controller"}}>{{t app.settings}}</a></li>
+ {{/if}}
<li><a href="" {{action logoff}}>{{t app.signout}}</a></li>
</ul>
</div>
[2/2] git commit: AMBARI-3858. "Add New Hosts" wizard appears
automatically after it closed and re-login to UI. (onechiporenko)
Posted by on...@apache.org.
AMBARI-3858. "Add New Hosts" wizard appears automatically after it closed and re-login to UI. (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/c3321560
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/c3321560
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/c3321560
Branch: refs/heads/trunk
Commit: c3321560768d5c3417e16096bd4ccf44c7638fd8
Parents: 4fe3a71
Author: Oleg Nechiporenko <cv...@yahoo.com>
Authored: Fri Nov 22 16:12:48 2013 +0200
Committer: Oleg Nechiporenko <cv...@yahoo.com>
Committed: Fri Nov 22 16:15:06 2013 +0200
----------------------------------------------------------------------
ambari-web/app/routes/add_host_routes.js | 6 ++++++
ambari-web/app/routes/add_service_routes.js | 6 ++++++
ambari-web/app/views/wizard/step7_view.js | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c3321560/ambari-web/app/routes/add_host_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_host_routes.js b/ambari-web/app/routes/add_host_routes.js
index 4505624..cf0d0bc 100644
--- a/ambari-web/app/routes/add_host_routes.js
+++ b/ambari-web/app/routes/add_host_routes.js
@@ -43,6 +43,12 @@ module.exports = Em.Route.extend({
onClose: function() {
this.hide();
App.router.get('updateController').set('isWorking', true);
+ App.clusterStatus.setClusterStatus({
+ clusterName: App.router.get('content.cluster.name'),
+ clusterState: 'DEFAULT',
+ wizardControllerName: App.router.get('addHostController.name'),
+ localdb: App.db.data
+ });
router.transitionTo('hosts.index');
},
didInsertElement: function(){
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c3321560/ambari-web/app/routes/add_service_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index 80aa6ef..9782485 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -45,6 +45,12 @@ module.exports = Em.Route.extend({
this.set('showCloseButton', false); // prevent user to click "Close" many times
App.router.get('updateController').set('isWorking', true);
var self = this;
+ App.clusterStatus.setClusterStatus({
+ clusterName: App.router.get('content.cluster.name'),
+ clusterState: 'DEFAULT',
+ wizardControllerName: App.router.get('addServiceController.name'),
+ localdb: App.db.data
+ });
App.router.get('updateController').updateServiceMetric(function(){
self.hide();
});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c3321560/ambari-web/app/views/wizard/step7_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step7_view.js b/ambari-web/app/views/wizard/step7_view.js
index 326f441..7f88958 100644
--- a/ambari-web/app/views/wizard/step7_view.js
+++ b/ambari-web/app/views/wizard/step7_view.js
@@ -35,7 +35,7 @@ App.WizardStep7View = Em.View.extend({
break;
}
}
- $('.nav-tabs li:eq(' + tabIndex + ') a').trigger('click');
+ self.$().find('.nav-tabs li:eq(' + tabIndex + ') a').trigger('click');
});
}