You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/05/30 19:49:03 UTC

git commit: AMBARI-5972. Slider apps view should show warning messages for view issues. Additional patch. (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.0.slider 06b0278ec -> 7acff3bb1


AMBARI-5972. Slider apps view should show warning messages for view issues. Additional patch. (alexantonenko)


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

Branch: refs/heads/branch-1.6.0.slider
Commit: 7acff3bb1fcf6276184fdfeec3bf61752771f07f
Parents: 06b0278
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri May 30 20:46:27 2014 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri May 30 20:48:58 2014 +0300

----------------------------------------------------------------------
 .../src/main/resources/ui/app/initialize.js     |  6 ++++++
 .../ui/app/mappers/application_status.js        |  1 +
 .../resources/ui/app/templates/application.hbs  | 21 +++++++++++++-------
 3 files changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7acff3bb/contrib/views/slider/src/main/resources/ui/app/initialize.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/initialize.js b/contrib/views/slider/src/main/resources/ui/app/initialize.js
index 41460a0..f976a06 100755
--- a/contrib/views/slider/src/main/resources/ui/app/initialize.js
+++ b/contrib/views/slider/src/main/resources/ui/app/initialize.js
@@ -76,6 +76,12 @@ App.initializer({
       viewEnabled: false,
 
       /**
+       *  ApplicationStatusMapper finished loading data
+       * @type {bool}
+       */
+      isDataLoaded: false,
+
+      /**
        * List of errors
        * @type {string[]}
        */

http://git-wip-us.apache.org/repos/asf/ambari/blob/7acff3bb/contrib/views/slider/src/main/resources/ui/app/mappers/application_status.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/mappers/application_status.js b/contrib/views/slider/src/main/resources/ui/app/mappers/application_status.js
index b70673d..b1ed96d 100644
--- a/contrib/views/slider/src/main/resources/ui/app/mappers/application_status.js
+++ b/contrib/views/slider/src/main/resources/ui/app/mappers/application_status.js
@@ -69,6 +69,7 @@ App.ApplicationStatusMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
     Ember.keys(map).forEach(function(key) {
       App.set(key, Ember.getWithDefault(data, map[key], ''));
     });
+    App.set('isDataLoaded', true);
   }
 
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/7acff3bb/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
index b1c560a..e857dd5 100755
--- a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
@@ -17,12 +17,19 @@
 }}
 
 <div>
-  <h2>{{t slider.apps.title}}</h2>
+    <h2>{{t slider.apps.title}}</h2>
 </div>
-<div class="alert alert-danger">
-  {{#each error in App.viewErrors}}
-    <h3>{{error}}</h3>
-  {{/each}}
-</div>
-{{outlet}}
+{{#if App.isDataLoaded}}
+  {{#unless App.viewEnabled}}
+    <div class="alert alert-danger">
+      {{#each error in App.viewErrors}}
+          <h3>{{error}}</h3>
+      {{/each}}
+    </div>
+  {{/unless}}
+  {{outlet}}
+{{/if}}
+
+
+