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/11/28 17:52:31 UTC

[1/3] ambari git commit: AMBARI-8469. Admin View: UI changes for new instance configuration properties (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 9c3ed394c -> 0fc4e7f0e


AMBARI-8469. Admin View: UI changes for new instance configuration properties (alexantonenko)


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

Branch: refs/heads/trunk
Commit: ce7bfeb0abc70b47f1b826e8148557d228c18ac9
Parents: 9c3ed39
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Nov 27 20:26:05 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Nov 28 18:52:15 2014 +0200

----------------------------------------------------------------------
 .../ambariViews/CreateViewInstanceCtrl.js       |  8 ++++++-
 .../resources/ui/admin-web/app/styles/main.css  |  9 ++++++++
 .../admin-web/app/views/ambariViews/create.html | 15 ++++++++-----
 .../admin-web/app/views/ambariViews/edit.html   | 17 +++++++++------
 .../unit/controllers/CreateViewInstanceCtrl.js  | 22 +++++++++++++++++---
 5 files changed, 56 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ce7bfeb0/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js
index ac040ae..3c04775 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js
@@ -27,6 +27,12 @@ angular.module('ambariAdminConsole')
       var viewVersion = data.data;
       $scope.view = viewVersion;
 
+      var parameters = viewVersion.ViewVersionInfo.parameters;
+
+      angular.forEach(parameters, function (item) {
+        item.value = item.default;
+      });
+
       $scope.instance = {
         view_name: viewVersion.ViewVersionInfo.view_name,
         version: viewVersion.ViewVersionInfo.version,
@@ -35,7 +41,7 @@ angular.module('ambariAdminConsole')
         visible: true,
         icon_path: '',
         icon64_path: '',
-        properties: viewVersion.ViewVersionInfo.parameters,
+        properties: parameters,
         description: ''
       };
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/ce7bfeb0/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index 36d934d..f395183 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -1269,4 +1269,13 @@ accordion .panel-group .panel{
 
 #stack-versions .table-bar .filtered-info {
   margin-top: 8px;
+}
+
+.checkbox input[type="checkbox"].viewproperty-input,
+.checkbox input[type="checkbox"].propertie-input {
+  margin-left: 0;
+}
+
+.popover-content {
+  word-wrap: break-word;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/ce7bfeb0/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
index 4186c85..e57c358 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
@@ -100,11 +100,16 @@
     <div class="panel-body property-form">
       <div class="form-group" ng-repeat="parameter in instance.properties"
         ng-class="{'has-error' : (form.instanceCreateForm[parameter.name].$error.required && form.instanceCreateForm.submitted)}" >
-        <label for="" class="col-sm-3 control-label" ng-class="{'not-required': !parameter.required}" tooltip="{{parameter.description}}">{{parameter.name}}{{parameter.required ? '*' : ''}}</label>
-        <div class="col-sm-9">
-          <input type="{{parameter.masked ? 'password' : 'text'}}" class="form-control viewproperty-input"  name="{{parameter.name}}" ng-required="parameter.required" ng-model="parameter.value" autocomplete="off" tooltip="{{parameter.description}}">
-          <div class="alert alert-danger no-margin-bottom top-margin" ng-show='form.instanceCreateForm[parameter.name].$error.required && form.instanceCreateForm.submitted'>
-            This field is required.
+        <label for="" class="col-sm-3 control-label" ng-class="{'not-required': !parameter.required}">{{parameter.label || parameter.name}}{{parameter.required ? '*' : ''}}</label>
+        <div ng-switch="parameter.type">
+          <div class="col-sm-9 checkbox" ng-switch-when="boolean">
+            <input type="checkbox" class="viewproperty-input" name="{{parameter.name}}" ng-required="parameter.required" ng-model="parameter.value" popover="{{parameter.description}}" popover-title="{{parameter.name}}" popover-trigger="mouseenter">
+          </div>
+          <div class="col-sm-9" ng-switch-default>
+            <input type="{{parameter.masked ? 'password' : 'text'}}" class="form-control viewproperty-input" name="{{parameter.name}}" ng-required="parameter.required" ng-model="parameter.value" autocomplete="off" popover="{{parameter.description}}" popover-title="{{parameter.name}}" popover-trigger="mouseenter" placeholder="{{parameter.placeholder}}">
+            <div class="alert alert-danger no-margin-bottom top-margin" ng-show='form.instanceCreateForm[parameter.name].$error.required && form.instanceCreateForm.submitted'>
+              This field is required.
+            </div>
           </div>
         </div>
       </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/ce7bfeb0/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
index d783cf4..339db7c 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
@@ -136,12 +136,17 @@
   <div class="panel-body">
     <form name="propertiesForm" class="form-horizontal property-form" ng-hide="isConfigurationEmpty" novalidate>
       <fieldset>
-        <div class="form-group" ng-repeat="property in configurationMeta" ng-class="{'has-error' : property.required && propertiesForm[property.name].$error.required && !editConfigurationDisabled}" tooltip="{{property.description}}">
-          <label for="" class="control-label col-sm-3" ng-class="{'not-required': !property.required}">{{property.name}}{{property.required ? '*' : ''}}</label>
-          <div class="col-sm-9">
-            <input type="{{property.masked ? 'password' : 'text'}}" class="form-control propertie-input" ng-required="property.required"  ng-disabled="editConfigurationDisabled" name="{{property.name}}" ng-model="configuration[property.name]">
-            <div class="alert alert-danger no-margin-bottom top-margin" ng-show='property.required && propertiesForm[property.name].$error.required && !editConfigurationDisabled'>
-              This field is required.
+        <div class="form-group" ng-repeat="property in configurationMeta" ng-class="{'has-error' : property.required && propertiesForm[property.name].$error.required && !editConfigurationDisabled}">
+          <label for="" class="control-label col-sm-3" ng-class="{'not-required': !property.required}">{{property.label || property.name}}{{property.required ? '*' : ''}}</label>
+          <div ng-switch="property.type">
+            <div class="col-sm-9 checkbox" ng-switch-when="boolean">
+              <input type="checkbox" class="propertie-input" ng-disabled="editConfigurationDisabled" name="{{property.name}}" ng-model="configuration[property.name]" ng-true-value="true" ng-false-value="false" popover="{{property.description}}" popover-title="{{property.name}}" popover-trigger="mouseenter">
+            </div>
+            <div class="col-sm-9" ng-switch-default>
+              <input type="{{property.masked ? 'password' : 'text'}}" class="form-control propertie-input" ng-required="property.required"  ng-disabled="editConfigurationDisabled" name="{{property.name}}" ng-model="configuration[property.name]" popover="{{property.description}}" popover-title="{{property.name}}" popover-trigger="mouseenter" placeholder="{{property.placeholder}}">
+              <div class="alert alert-danger no-margin-bottom top-margin" ng-show='property.required && propertiesForm[property.name].$error.required && !editConfigurationDisabled'>
+                This field is required.
+              </div>
             </div>
           </div>
         </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/ce7bfeb0/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js
index 69ebf66..ff54b19 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js
@@ -18,7 +18,7 @@
 
 describe('#CreateViewInstanceCtrl', function () {
   var scope, ctrl, $httpBackend, View;
-  
+
   beforeEach(module('ambariAdminConsole', function($provide){
     $provide.value('$routeParams', {viewId: 'TestView'});
   }));
@@ -37,8 +37,10 @@ describe('#CreateViewInstanceCtrl', function () {
       "versions": [{"ViewVersionInfo": {}}]
     });
     $httpBackend.whenGET(/\/api\/v1\/views\/TestView\/versions\/1\.0\.0/).respond(200, {
-      "ViewVersionInfo": {}
+      "ViewVersionInfo": {"parameters": [{"name": "n", "default": "d"}]}
     });
+    $httpBackend.whenGET('template/modal/backdrop.html').respond(200, '<div></div>');
+    $httpBackend.whenGET('template/modal/window.html').respond(200, '<div></div>');
     scope = $rootScope.$new();
     ctrl = $controller('CreateViewInstanceCtrl', {$scope: scope});
   }));
@@ -53,5 +55,19 @@ describe('#CreateViewInstanceCtrl', function () {
     $httpBackend.flush();
     scope.save();
     expect(View.createInstance).toHaveBeenCalled();
-  });  
+  });
+
+  it('should set default property value before creating view instance', function () {
+    scope.form = {
+      instanceCreateForm: {
+        $dirty: true
+      }
+    };
+    scope.version = '1.0.0';
+    $httpBackend.expectGET('template/modal/backdrop.html');
+    $httpBackend.expectGET('template/modal/window.html');
+    scope.$digest();
+    $httpBackend.flush();
+    chai.expect(scope.view.ViewVersionInfo.parameters[0].value).to.equal('d');
+  });
 });
\ No newline at end of file


[2/3] ambari git commit: AMBARI-8402. View: Pig ui updates + flow changes. Additional fix (alexantonenko)

Posted by al...@apache.org.
AMBARI-8402. View: Pig ui updates + flow changes. Additional fix (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 10f4afc6019880a797adaf07531766bcc87e9e76
Parents: ce7bfeb
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Nov 28 18:28:40 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Nov 28 18:52:16 2014 +0200

----------------------------------------------------------------------
 .../main/resources/ui/pig-web/app/templates/pig/history.hbs    | 6 +-----
 .../main/resources/ui/pig-web/app/templates/script/history.hbs | 5 -----
 .../pig/src/main/resources/ui/pig-web/app/views/script/edit.js | 2 +-
 3 files changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/10f4afc6/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs
index e58e0df..7e7eb96 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/pig/history.hbs
@@ -61,8 +61,4 @@
 
 {{#if content}}
   {{partial 'partials/paginationControls'}}
-{{/if}}
-
-{{#if content}}
-  {{partial 'partials/paginationControls'}}
-{{/if}}
+{{/if}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/10f4afc6/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/script/history.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/script/history.hbs b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/script/history.hbs
index 8f0ca34..6f6a321 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/script/history.hbs
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/script/history.hbs
@@ -25,11 +25,6 @@
           <th>{{t 'history.duration'}}</th>
           <th>{{t 'common.actions'}}</th>
       </tr>
-          <th>{{t 'common.date'}}</th>
-          <th>{{t 'job.status'}}</th>
-          <th>{{t 'history.duration'}}</th>
-          <th>{{t 'common.actions'}}</th>
-      </tr>
     </thead>
     <tbody>
       {{#each paginatedContent}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/10f4afc6/contrib/views/pig/src/main/resources/ui/pig-web/app/views/script/edit.js
----------------------------------------------------------------------
diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/views/script/edit.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/views/script/edit.js
index 9a10292..dcab6ce 100644
--- a/contrib/views/pig/src/main/resources/ui/pig-web/app/views/script/edit.js
+++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/views/script/edit.js
@@ -32,7 +32,7 @@ App.ScriptEditView = Em.View.extend({
     }
   }.observes('controller.titleWarn'),
   actions:{
-    insertUdf:function () {
+    insertUdf:function (udf) {
       var code = this.get('controller.content.pigScript.fileContent'),
       registered = 'REGISTER ' + udf.get('path') + '\n' + code;
       this.set('controller.content.pigScript.fileContent',registered);


[3/3] ambari git commit: AMBARI-8470. Slider View: error message after clicking Start (or Stop) button second time (alexantonenko)

Posted by al...@apache.org.
AMBARI-8470. Slider View: error message after clicking Start (or Stop) button second time (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 0fc4e7f0e50135906205e58bfd07acdeec053f05
Parents: 10f4afc
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Nov 28 18:35:54 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Nov 28 18:52:17 2014 +0200

----------------------------------------------------------------------
 .../ui/app/controllers/slider_app_controller.js  | 19 +++++++++----------
 .../src/main/resources/ui/app/helpers/ajax.js    |  2 +-
 .../ui/app/mappers/slider_apps_mapper.js         |  6 ++++--
 .../main/resources/ui/app/models/slider_app.js   | 13 +++++++++++++
 .../controllers/slider_app_controller_test.js    | 10 +++++++---
 .../test/unit/mappers/slider_apps_mapper_test.js |  6 +++---
 6 files changed, 37 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0fc4e7f0/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index 5c521c2..0684e53 100644
--- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -115,7 +115,7 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, {
       statusActionsMap = this.get('statusActionsMap'),
       status = this.get('model.status');
 
-    this.get('model').set('isActionPerformed', false);
+    if (this.get('model.isActionFinished')) this.get('model').set('isActionPerformed', false);
     statusActionsMap[status].forEach(function(action) {
       if ('destroy' === action) {
         advanced.pushObject(appActions[action]);
@@ -167,12 +167,6 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, {
   groupedComponentsHaveErrors: false,
 
   /**
-   * Action is performed.
-   * @type {Bool}
-   **/
-  isActionRunning: false,
-
-  /**
    * Custom popup for "Destroy"-action
    * @method destroyConfirm
    */
@@ -209,7 +203,7 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, {
    */
   thaw: function() {
     var model = this.get('model');
-    this.get('model').set('isActionPerformed', true);
+    this.setStartAction();
     return App.ajax.send({
       name: 'changeAppState',
       sender: this,
@@ -241,7 +235,7 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, {
    */
   freeze: function() {
     var model = this.get('model');
-    this.get('model').set('isActionPerformed', true);
+    this.setStartAction();
     return App.ajax.send({
       name: 'changeAppState',
       sender: this,
@@ -351,7 +345,7 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, {
    * @method destroy
    */
   destroy: function() {
-    this.get('model').set('isActionPerformed', true);
+    this.setStartAction();
     return App.ajax.send({
       name: 'destroyApp',
       sender: this,
@@ -465,6 +459,11 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, {
         }
       }
     }
+  },
+
+  setStartAction: function() {
+    this.get('model').set('isActionPerformed' , true);
+    this.get('model').set('statusBeforeAction' , this.get('model.status'));
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/0fc4e7f0/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
index b622992..bfb976d 100644
--- a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
+++ b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
@@ -99,7 +99,7 @@ var urls = {
   },
 
   'mapper.applicationApps': {
-    real: 'apps/?fields=*',
+    real: '?fields=apps/*',
     mock: '/data/apps/apps.json',
     headers: {
       Accept: "text/plain; charset=utf-8",

http://git-wip-us.apache.org/repos/asf/ambari/blob/0fc4e7f0/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index 4718654..4b3fae2 100644
--- a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -239,7 +239,7 @@ App.SliderAppsMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
       this.set('isWarningPopupShown', false);
     }
 
-    data.items.forEach(function (app) {
+    data.apps.forEach(function (app) {
       var componentsId = app.components ? self.parseComponents(app) : [],
         configs = app.configs ? self.parseConfigs(app) : {},
         quickLinks = self.parseQuickLinks(app),
@@ -285,6 +285,8 @@ App.SliderAppsMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
         appRecord.destroyRecord();
       }
     });
-    App.SliderApp.store.pushMany('sliderApp', apps);
+    apps.forEach(function(app) {
+      App.SliderApp.store.push('sliderApp', app, true);
+    });
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/0fc4e7f0/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
index 3338534..c669744 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
@@ -34,6 +34,12 @@ App.SliderApp = DS.Model.extend({
   status: DS.attr('string'),
 
   /**
+   * Status before performed action
+   * @type {string}
+   */
+  statusBeforeAction: DS.attr('string'),
+
+  /**
    * @type {displayStatus}
    */
   displayStatus: DS.attr('string'),
@@ -54,6 +60,13 @@ App.SliderApp = DS.Model.extend({
   isActionPerformed: DS.attr('boolean'),
 
   /**
+   * @type {boolean}
+   */
+  isActionFinished: function() {
+    return this.get('status') != this.get('statusBeforeAction');
+  }.property('statusBeforeAction', 'status'),
+
+  /**
    * @type {String}
    */
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0fc4e7f0/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js
index 7437a4f..1dd8b70 100644
--- a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js
+++ b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js
@@ -562,12 +562,16 @@ test('quickLinksOrdered', function() {
 
 test('Disable Action Button', function() {
   expect(6);
-
   var controller = this.subject({
-    model: Em.Object.create({
+    model: Em.Object.extend({
+      isActionFinished: function() {
+        return this.get('status') != this.get('statusBeforeAction');
+      }.property('statusBeforeAction', 'status')
+    }).create({
       id: 'someId',
       name: 'SomeName',
-      status: 'ACCEPTED'
+      status: 'ACCEPTED',
+      statusBeforeAction: ''
     }),
     defaultErrorHandler: function() { return true; }
   });

http://git-wip-us.apache.org/repos/asf/ambari/blob/0fc4e7f0/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js b/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js
index 012951f..3e34c953 100644
--- a/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js
+++ b/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js
@@ -59,7 +59,7 @@ test('parse | add/remove apps', function () {
   Em.run(function () {
 
     App.SliderAppsMapper.parse({
-      items: [
+      apps: [
         {id: '1', type: 't1'},
         {id: '2', type: 't2'}
       ]
@@ -72,7 +72,7 @@ test('parse | add/remove apps', function () {
   Em.run(function () {
 
     App.SliderAppsMapper.parse({
-      items: [
+      apps: [
         {id: '2', type: 't2'},
         {id: '3', type: 't3'}
       ]
@@ -82,4 +82,4 @@ test('parse | add/remove apps', function () {
 
   deepEqual(App.SliderApp.store.all('sliderApp').mapBy('id'), ['2', '3'], 'Delete not-existing app and add new');
 
-});
\ No newline at end of file
+});