You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2013/12/17 17:23:02 UTC

git commit: AMBARI-4092 Need tooltip showing error why local repo is bad. (ababiichuk)

Updated Branches:
  refs/heads/trunk 54791d17a -> 5229fb1be


AMBARI-4092 Need tooltip showing error why local repo is bad. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 5229fb1beb2057acc5b0b540f7a1680ece46f177
Parents: 54791d1
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Tue Dec 17 18:17:25 2013 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Tue Dec 17 18:17:44 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/installer.js   |  2 ++
 ambari-web/app/templates/wizard/step1.hbs |  2 +-
 ambari-web/app/views/wizard/step1_view.js | 12 ++++++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5229fb1b/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index f371dea..e9d4410 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -438,6 +438,8 @@ App.InstallerController = App.WizardController.extend({
     if (selectedStack && selectedStack.operatingSystems) {
       var os = selectedStack.operatingSystems.findProperty('osType', osType);
       os.validation = 'icon-exclamation-sign';
+      os.errorTitle = request.status + ":" + request.statusText;
+      os.errorContent = $.parseJSON(request.responseText).message;
       selectedStack.set('reload', !selectedStack.get('reload'));
       this.set('validationCnt', this.get('validationCnt') - 1);
       this.set('invalidCnt', this.get('invalidCnt') + 1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5229fb1b/ambari-web/app/templates/wizard/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step1.hbs b/ambari-web/app/templates/wizard/step1.hbs
index 55f8773..99df714 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -71,7 +71,7 @@
                   </td>
                   <td class="validation-results">
                     {{#if repoGroup.validation}}
-                      <i {{bindAttr class="repoGroup.validation"}}></i>
+                      {{view view.popoverView repoGroupBinding="repoGroup"}}
                     {{/if}}
                   </td>
                   <td  {{bindAttr class=":url-results repoGroup.checked::disabled-textfield repoGroup.empty-error:textfield-error repoGroup.invalid-error:textfield-error"}}>

http://git-wip-us.apache.org/repos/asf/ambari/blob/5229fb1b/ambari-web/app/views/wizard/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step1_view.js b/ambari-web/app/views/wizard/step1_view.js
index 3b3549b..d98b5f0 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -86,6 +86,16 @@ App.WizardStep1View = Em.View.extend({
     }
     $("[rel=skip-validation-tooltip]").tooltip({ placement: 'right'});
   },
+
+  popoverView: Em.View.extend({
+    tagName: 'i',
+    classNameBindings: ['repoGroup.validation'],
+    attributeBindings: ['repoGroup.errorTitle:title', 'repoGroup.errorContent:data-content'],
+    didInsertElement: function() {
+      App.popover($(this.get('element')), {'trigger': 'hover'});
+    }
+  }),
+
   loadRepositories: function () {
     var selectedStack = this.get('controller.content.stacks').findProperty('isSelected', true);
     var reposGroup = [[],[],[]];
@@ -149,6 +159,8 @@ App.WizardStep1View = Em.View.extend({
     group.set('validation', os.validation);
     group.set('undo', os.baseUrl != os.defaultBaseUrl);
     group.set('clearAll', os.baseUrl);
+    group.set('errorTitle', os.errorTitle);
+    group.set('errorContent', os.errorContent);
     group.set('group-number', groupNumber);
   },
   /**