Просмотр исходного кода

AMBARI-7949. Slider Apps: Status filter does not contain STOPPED status (alexantonenko)

Alex Antonenko 10 лет назад
Родитель
Сommit
52422ca160

+ 3 - 2
contrib/views/slider/src/main/resources/ui/app/models/slider_app.js

@@ -189,5 +189,6 @@ App.SliderApp.Status = {
   new_saving: "NEW_SAVING",
   running: "RUNNING",
   submitted: "SUBMITTED",
-  frozen: "FROZEN"
-};
+  frozen: "FROZEN",
+  stopped: "STOPPED"
+};

+ 4 - 3
contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js

@@ -29,7 +29,8 @@ App.SliderAppsView = App.TableView.extend({
     App.SliderApp.Status.new,
     App.SliderApp.Status.new_saving,
     App.SliderApp.Status.running,
-    App.SliderApp.Status.submitted
+    App.SliderApp.Status.submitted,
+    App.SliderApp.Status.stopped,
   ],
 
   content: function () {
@@ -119,7 +120,7 @@ App.SliderAppsView = App.TableView.extend({
       return this.get('parentView.statusList');
     }.property('parentView.statusList'),
     onChangeValue: function(){
-      this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string', this.get('defaultValue'));
+      this.get('parentView').updateFilter(this.get('column'), this.get('value') == "STOPPED" ? "FROZEN" : this.get('value'), 'string', this.get('defaultValue'));
     },
     emptyValue: 'All Status'
   }),
@@ -171,4 +172,4 @@ App.SliderAppsView = App.TableView.extend({
 
 App.SliderTooltip = Em.View.extend({
   templateName: "common/app_tooltip"
-});
+});