You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/05/14 15:51:39 UTC
ambari git commit: AMBARI-11126 create widget wizard: Dismissing a
wizard fails. (atkach)
Repository: ambari
Updated Branches:
refs/heads/trunk bfbb92003 -> 2ce23cd4a
AMBARI-11126 create widget wizard: Dismissing a wizard fails. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2ce23cd4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ce23cd4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ce23cd4
Branch: refs/heads/trunk
Commit: 2ce23cd4ab105dca1e43ee0b709c18447d3d6aa7
Parents: bfbb920
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Thu May 14 14:59:25 2015 +0300
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Thu May 14 16:51:25 2015 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/main/service/info/summary.js | 6 +++++-
.../main/service/widgets/create/wizard_controller.js | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2ce23cd4/ambari-web/app/controllers/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js
index 9455f36..137b5e4 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -580,7 +580,10 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
* create widget
*/
createWidget: function () {
- App.router.send('addServiceWidget', this.get('activeWidgetLayout.widgets').objectAt(0));
+ App.router.send('addServiceWidget', Em.Object.create({
+ layout: this.get('activeWidgetLayout'),
+ serviceName: this.get('content.serviceName')
+ }));
},
/**
@@ -588,6 +591,7 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
* @param {App.Widget} content
*/
editWidget: function (content) {
+ content.set('serviceName', this.get('content.serviceName'));
App.router.send('editServiceWidget', content);
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/2ce23cd4/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
index e9f5abd..10c49db 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
@@ -354,8 +354,8 @@ App.WidgetWizardController = App.WizardController.extend({
this.finish();
this.get('popup').hide();
var serviceName = this.get('content.widgetService');
- var service = App.Service.find().findProperty('serviceName', serviceName);
- App.router.transitionTo('main.services.service', service);
+ var service = App.Service.find(serviceName);
+ App.router.transitionTo('main.services.service.summary', service);
if (!App.get('testMode')) {
App.clusterStatus.setClusterStatus({
clusterName: App.router.getClusterName(),