ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject [1/3] git commit: AMBARI-7281. Slider View: App summary details shown differently than Ambari service summary. (onechiporenko)
Date Tue, 16 Sep 2014 15:22:52 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 56e022e55 -> 2ab5badc1


AMBARI-7281. Slider View: App summary details shown differently than Ambari service summary.
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 460ae9ed3026b0a6c9ec1ce0cb42394afe028087
Parents: 6457726
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Tue Sep 16 13:10:14 2014 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Tue Sep 16 17:37:40 2014 +0300

----------------------------------------------------------------------
 .../resources/ui/app/models/slider_app_component.js     | 10 +++++++++-
 .../src/main/resources/ui/app/styles/application.less   | 12 ++++++++++++
 .../resources/ui/app/templates/slider_app/summary.hbs   |  2 +-
 3 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/460ae9ed/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
index 8f4f584..2e999c1 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
@@ -36,7 +36,15 @@ App.SliderAppComponent = DS.Model.extend({
   /**
    * @type {App.SliderApp}
    */
-  appId: DS.belongsTo('sliderApp')
+  appId: DS.belongsTo('sliderApp'),
+
+  /**
+   * Is component running (used in the templates)
+   * @type {bool}
+   */
+  isRunning: function() {
+    return this.get('status') === 'Running';
+  }.property('status')
 
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/460ae9ed/contrib/views/slider/src/main/resources/ui/app/styles/application.less
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index b934a20..33f5555 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -555,6 +555,18 @@ a {
       text-align: right;
     }
   }
+  .panel-components {
+    .status {
+      display: inline-block;
+      width: 25px;
+    }
+    .icon-ok-sign {
+      color: #5ab400;
+    }
+    .icon-warning-sign {
+      color: #ff0000;
+    }
+  }
   .panel-link {
     margin-top: -5px;
     margin-right: -7px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/460ae9ed/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
index 5cb2cd1..68d47b4 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
@@ -58,7 +58,7 @@
         <tbody>
           {{#each controller.model.components}}
           <tr>
-            <td>{{componentName}}</td>
+            <td><span {{bind-attr class="isRunning:icon-ok-sign:icon-warning-sign
:status"}}></span> {{componentName}}</td>
             <td>{{host}}</td>
           </tr>
           {{/each}}


Mime
View raw message