Browse Source

AMBARI-15236 Combo Search: Implement "core", "ram" filters (Joe Wang via rzang)

Richard Zang 9 years ago
parent
commit
93bdd5eebf

+ 8 - 1
ambari-web/app/mixins/common/table_server_view_mixin.js

@@ -107,11 +107,18 @@ App.TableServerViewMixin = Em.Mixin.create({
           filterCondition.value.push(filterValue);
         }
       } else {
+        var type = 'string';
+        if (tag.category === 'cpu') {
+          type = 'number';
+        }
+        if (tag.category === 'memoryFormatted') {
+          type = 'ambari-bandwidth';
+        }
         filterCondition = {
           skipFilter: false,
           iColumn: iColumn,
           value: filterValue,
-          type: 'string'
+          type: type
         };
         self.get('filterConditions').push(filterCondition);
       }

+ 2 - 0
ambari-web/app/views/main/host/combo_search_box.js

@@ -47,6 +47,8 @@ App.MainHostComboSearchBoxView = Em.View.extend({
             {label: 'IP', value: 'ip', category: 'Host'},
             {label: 'Heath Status', value: 'healthClass', category: 'Host'},
             {label: 'Stack Version', value: 'version', category: 'Host'},
+            {label: 'Cores', value: 'cpu', category: 'Host'},
+            {label: 'RAM', value: 'memoryFormatted', category: 'Host'},
             {label: 'Version State', value: 'versionState', category: 'Host'},
             {label: 'Rack', value: 'rack', category: 'Host'},
             {label: 'Service', value: 'services', category: 'Service'},