Browse Source

AMBARI-5461. Flume agents table in service summary view should be sortable. (akovalenko)

Aleksandr Kovalenko 11 years ago
parent
commit
a7272c3f39
26 changed files with 219 additions and 109 deletions
  1. 6 6
      ambari-web/app/assets/data/dashboard/services.json
  2. 10 0
      ambari-web/app/assets/data/hosts/HDP2/hc_host_status.json
  3. 10 0
      ambari-web/app/assets/data/hosts/HDP2/hosts_init.json
  4. 6 6
      ambari-web/app/assets/data/services/metrics/flume/channelFillPct.json
  5. 6 6
      ambari-web/app/assets/data/services/metrics/flume/channelSize.json
  6. 6 6
      ambari-web/app/assets/data/services/metrics/flume/cpu_user.json
  7. 6 6
      ambari-web/app/assets/data/services/metrics/flume/jvmGcTime.json
  8. 6 6
      ambari-web/app/assets/data/services/metrics/flume/jvmMemHeapUsedM.json
  9. 6 6
      ambari-web/app/assets/data/services/metrics/flume/jvmThreadsRunnable.json
  10. 6 6
      ambari-web/app/assets/data/services/metrics/flume/sinkConnectionFailedCount.json
  11. 6 6
      ambari-web/app/assets/data/services/metrics/flume/sinkDrainSuccessCount.json
  12. 6 6
      ambari-web/app/assets/data/services/metrics/flume/sourceEventAccepted.json
  13. 24 0
      ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
  14. 12 0
      ambari-web/app/data/review_configs.js
  15. 2 1
      ambari-web/app/mappers/server_data_mapper.js
  16. 1 1
      ambari-web/app/mappers/service_metrics_mapper.js
  17. 1 0
      ambari-web/app/messages.js
  18. 1 1
      ambari-web/app/models/host_component.js
  19. 4 0
      ambari-web/app/models/service/flume.js
  20. 2 0
      ambari-web/app/styles/application.less
  21. 15 24
      ambari-web/app/templates/main/service/services/flume.hbs
  22. 9 9
      ambari-web/app/utils/ajax/ajax.js
  23. 1 1
      ambari-web/app/utils/helper.js
  24. 11 1
      ambari-web/app/views/common/table_view.js
  25. 1 4
      ambari-web/app/views/main/mirroring/datasets_view.js
  26. 55 7
      ambari-web/app/views/main/service/services/flume.js

+ 6 - 6
ambari-web/app/assets/data/dashboard/services.json

@@ -1729,20 +1729,20 @@
 	  },
 	  "components" : [
 	    {
-	      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER",
+	      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER",
 	      "ServiceComponentInfo" : {
 	        "cluster_name" : "fc",
-	        "component_name" : "FLUME_SERVER",
+	        "component_name" : "FLUME_HANDLER",
 	        "service_name" : "FLUME",
 	        "state" : "STARTED",
 	        "desired_configs" : { }
 	      },
 	      "host_components" : [
 	        {
-	          "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+	          "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
 	          "HostRoles" : {
 	            "cluster_name" : "fc",
-	            "component_name" : "FLUME_SERVER",
+	            "component_name" : "FLUME_HANDLER",
 	            "desired_stack_id" : "HDP-1.3.0",
 	            "desired_state" : "STARTED",
 	            "ha_status" : "passive",
@@ -1799,10 +1799,10 @@
 		     }
 	        },
 	        {
-	          "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+	          "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
 	          "HostRoles" : {
 	            "cluster_name" : "fc",
-	            "component_name" : "FLUME_SERVER",
+	            "component_name" : "FLUME_HANDLER",
 	            "desired_stack_id" : "HDP-1.3.0",
 	            "desired_state" : "STARTED",
 	            "ha_status" : "passive",

+ 10 - 0
ambari-web/app/assets/data/hosts/HDP2/hc_host_status.json

@@ -319,6 +319,16 @@
             "host_name" : "dev01.hortonworks.com",
             "state" : "STARTED"
           }
+        },
+        {
+          "href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/FLUME_HANDLER",
+          "HostRoles" : {
+            "cluster_name" : "perf",
+            "maintenance_state" : "OFF",
+            "component_name" : "FLUME_HANDLER",
+            "host_name" : "dev01.hortonworks.com",
+            "state" : "STARTED"
+          }
         }
       ]
     }

+ 10 - 0
ambari-web/app/assets/data/hosts/HDP2/hosts_init.json

@@ -427,6 +427,16 @@
             "host_name" : "dev01.hortonworks.com",
             "state" : "STARTED"
           }
+        },
+        {
+          "href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/FLUME_HANDLER",
+          "HostRoles" : {
+            "cluster_name" : "c1",
+            "maintenance_state" : "OFF",
+            "component_name" : "FLUME_HANDLER",
+            "host_name" : "dev01.hortonworks.com",
+            "state" : "STARTED"
+          }
         }
       ],
       "alerts" : {

+ 6 - 6
ambari-web/app/assets/data/services/metrics/flume/channelFillPct.json

@@ -1,16 +1,16 @@
 {
-  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelFillPercentage[1371324108,1371327708,15]&_=1371327708316",
+  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelFillPercentage[1371324108,1371327708,15]&_=1371327708316",
   "ServiceComponentInfo" : {
     "cluster_name" : "fc",
-    "component_name" : "FLUME_SERVER",
+    "component_name" : "FLUME_HANDLER",
     "service_name" : "FLUME"
   },
   "host_components" : [
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-204-21-198.ec2.internal"
       },
       "metrics" : {
@@ -955,10 +955,10 @@
       }
     },
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-38-6-229.ec2.internal"
       },
       "metrics" : {

+ 6 - 6
ambari-web/app/assets/data/services/metrics/flume/channelSize.json

@@ -1,16 +1,16 @@
 {
-  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelSize[1371324108,1371327708,15]&_=1371327708317",
+  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelSize[1371324108,1371327708,15]&_=1371327708317",
   "ServiceComponentInfo" : {
     "cluster_name" : "fc",
-    "component_name" : "FLUME_SERVER",
+    "component_name" : "FLUME_HANDLER",
     "service_name" : "FLUME"
   },
   "host_components" : [
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-204-21-198.ec2.internal"
       },
       "metrics" : {
@@ -8379,10 +8379,10 @@
       }
     },
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-38-6-229.ec2.internal"
       },
       "metrics" : {

+ 6 - 6
ambari-web/app/assets/data/services/metrics/flume/cpu_user.json

@@ -1,16 +1,16 @@
 {
-  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/cpu/cpu_user[1371326887,1371330487,15]&_=1371330486559",
+  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/cpu/cpu_user[1371326887,1371330487,15]&_=1371330486559",
   "ServiceComponentInfo" : {
     "cluster_name" : "fc",
-    "component_name" : "FLUME_SERVER",
+    "component_name" : "FLUME_HANDLER",
     "service_name" : "FLUME"
   },
   "host_components" : [
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-204-21-198.ec2.internal"
       },
       "metrics" : {
@@ -941,10 +941,10 @@
       }
     },
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-38-6-229.ec2.internal"
       },
       "metrics" : {

+ 6 - 6
ambari-web/app/assets/data/services/metrics/flume/jvmGcTime.json

@@ -1,16 +1,16 @@
 {
-  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/jvm/gcTimeMillis[1371324108,1371327708,15]&_=1371327708325",
+  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/jvm/gcTimeMillis[1371324108,1371327708,15]&_=1371327708325",
   "ServiceComponentInfo" : {
     "cluster_name" : "fc",
-    "component_name" : "FLUME_SERVER",
+    "component_name" : "FLUME_HANDLER",
     "service_name" : "FLUME"
   },
   "host_components" : [
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-204-21-198.ec2.internal"
       },
       "metrics" : {
@@ -921,10 +921,10 @@
       }
     },
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-38-6-229.ec2.internal"
       },
       "metrics" : {

+ 6 - 6
ambari-web/app/assets/data/services/metrics/flume/jvmMemHeapUsedM.json

@@ -1,16 +1,16 @@
 {
-  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/jvm/memHeapUsedM[1371324108,1371327708,15]&_=1371327708327",
+  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/jvm/memHeapUsedM[1371324108,1371327708,15]&_=1371327708327",
   "ServiceComponentInfo" : {
     "cluster_name" : "fc",
-    "component_name" : "FLUME_SERVER",
+    "component_name" : "FLUME_HANDLER",
     "service_name" : "FLUME"
   },
   "host_components" : [
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-204-21-198.ec2.internal"
       },
       "metrics" : {
@@ -921,10 +921,10 @@
       }
     },
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-38-6-229.ec2.internal"
       },
       "metrics" : {

+ 6 - 6
ambari-web/app/assets/data/services/metrics/flume/jvmThreadsRunnable.json

@@ -1,16 +1,16 @@
 {
-  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/jvm/threadsRunnable[1371324108,1371327708,15]&_=1371327708328",
+  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/jvm/threadsRunnable[1371324108,1371327708,15]&_=1371327708328",
   "ServiceComponentInfo" : {
     "cluster_name" : "fc",
-    "component_name" : "FLUME_SERVER",
+    "component_name" : "FLUME_HANDLER",
     "service_name" : "FLUME"
   },
   "host_components" : [
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-204-21-198.ec2.internal"
       },
       "metrics" : {
@@ -925,10 +925,10 @@
       }
     },
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-38-6-229.ec2.internal"
       },
       "metrics" : {

+ 6 - 6
ambari-web/app/assets/data/services/metrics/flume/sinkConnectionFailedCount.json

@@ -1,16 +1,16 @@
 {
-  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/SINK/*/ConnectionFailedCount[1371324108,1371327708,15]&_=1371327708323",
+  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/SINK/*/ConnectionFailedCount[1371324108,1371327708,15]&_=1371327708323",
   "ServiceComponentInfo" : {
     "cluster_name" : "fc",
-    "component_name" : "FLUME_SERVER",
+    "component_name" : "FLUME_HANDLER",
     "service_name" : "FLUME"
   },
   "host_components" : [
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-204-21-198.ec2.internal"
       },
       "metrics" : {
@@ -955,10 +955,10 @@
       }
     },
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-38-6-229.ec2.internal"
       },
       "metrics" : {

+ 6 - 6
ambari-web/app/assets/data/services/metrics/flume/sinkDrainSuccessCount.json

@@ -1,16 +1,16 @@
 {
-  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/SINK/*/EventDrainSuccessCount[1371324108,1371327708,15]&_=1371327708322",
+  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/SINK/*/EventDrainSuccessCount[1371324108,1371327708,15]&_=1371327708322",
   "ServiceComponentInfo" : {
     "cluster_name" : "fc",
-    "component_name" : "FLUME_SERVER",
+    "component_name" : "FLUME_HANDLER",
     "service_name" : "FLUME"
   },
   "host_components" : [
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-204-21-198.ec2.internal"
       },
       "metrics" : {
@@ -9313,10 +9313,10 @@
       }
     },
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-38-6-229.ec2.internal"
       },
       "metrics" : {

+ 6 - 6
ambari-web/app/assets/data/services/metrics/flume/sourceEventAccepted.json

@@ -1,24 +1,24 @@
 {
-  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/SOURCE/*/EventAcceptedCount[1371324108,1371327708,15]&_=1371327708320",
+  "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/SOURCE/*/EventAcceptedCount[1371324108,1371327708,15]&_=1371327708320",
   "ServiceComponentInfo" : {
     "cluster_name" : "fc",
-    "component_name" : "FLUME_SERVER",
+    "component_name" : "FLUME_HANDLER",
     "service_name" : "FLUME"
   },
   "host_components" : [
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-204-21-198.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-204-21-198.ec2.internal"
       }
     },
     {
-      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_SERVER",
+      "href" : "http://ec2-54-226-143-119.compute-1.amazonaws.com:8080/api/v1/clusters/fc/hosts/ip-10-38-6-229.ec2.internal/host_components/FLUME_HANDLER",
       "HostRoles" : {
         "cluster_name" : "fc",
-        "component_name" : "FLUME_SERVER",
+        "component_name" : "FLUME_HANDLER",
         "host_name" : "ip-10-38-6-229.ec2.internal"
       },
       "metrics" : {

+ 24 - 0
ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json

@@ -660,6 +660,30 @@
           }
         }
       ]
+    },
+    {
+      "href" : "http://localhost:8080/api/v1/stacks/HDP/versions/2.1/stackServices/FLUME",
+      "StackServices" : {
+        "comments" : "Efficiently collects, aggregates, and moves large amounts of log data",
+        "service_name" : "FLUME",
+        "service_version" : "1.4.0",
+        "stack_name" : "HDP",
+        "stack_version" : "2.1"
+      },
+      "serviceComponents" : [
+        {
+          "href" : "http://localhost:8080/api/v1/stacks/HDP/versions/2.1/stackServices/FLUME/serviceComponents/FLUME_HANDLER",
+          "StackServiceComponents" : {
+            "component_category" : "SLAVE",
+            "component_name" : "FLUME_HANDLER",
+            "is_client" : false,
+            "is_master" : false,
+            "service_name" : "FLUME",
+            "stack_name" : "HDP",
+            "stack_version" : "2.1"
+          }
+        }
+      ]
     }
   ]
 }

+ 12 - 0
ambari-web/app/data/review_configs.js

@@ -344,6 +344,18 @@ module.exports = [
             isMaster: false
           })
         ]
+      }),
+      Ember.Object.create({
+        service_name: 'FLUME',
+        display_name: 'Flume',
+        service_components: [
+          Ember.Object.create({
+            display_name: 'Flume Agent',
+            component_name: 'FLUME_HANDLER',
+            component_value: '',
+            isMaster: false
+          })
+        ]
       })
     ]
   }

+ 2 - 1
ambari-web/app/mappers/server_data_mapper.js

@@ -246,6 +246,7 @@ App.QuickDataMapper.componentServiceMap = function () {
     'SUPERVISOR': 'STORM',
     'STORM_UI_SERVER': 'STORM',
     'DRPC_SERVER': 'STORM',
-    'STORM_REST_API': 'STORM'
+    'STORM_REST_API': 'STORM',
+    'FLUME_HANDLER': 'FLUME'
   }
 };

+ 1 - 1
ambari-web/app/mappers/service_metrics_mapper.js

@@ -573,7 +573,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     var finalConfig = jQuery.extend({}, this.config);
     var finalJson = this.parseIt(item, finalConfig);
     item.components.forEach(function (component) {
-      if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "FLUME_SERVER") {
+      if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "FLUME_HANDLER") {
         if (!finalJson.nodes) {
           finalJson.nodes = [];
         }

+ 1 - 0
ambari-web/app/messages.js

@@ -1782,6 +1782,7 @@ Em.I18n.translations = {
   'dashboard.services.flume.channels': 'Channels',
   'dashboard.services.flume.sources': 'Sources',
   'dashboard.services.flume.sinks': 'Sinks',
+  'dashboard.services.flume.agent': 'Agent',
 
 
   'dashboard.services.hbase.summary':'{0} region servers with {1} average load',

+ 1 - 1
ambari-web/app/models/host_component.js

@@ -77,7 +77,6 @@ App.HostComponent = DS.Model.extend({
       case 'WEBHCAT_SERVER':
       case 'HUE_SERVER':
       case 'HISTORYSERVER':
-      case 'FLUME_SERVER':
       case 'FALCON_SERVER':
       case 'NIMBUS':
       case 'STORM_UI_SERVER':
@@ -104,6 +103,7 @@ App.HostComponent = DS.Model.extend({
       case 'NODEMANAGER':
       case 'ZKFC':
       case 'SUPERVISOR':
+      case 'FLUME_HANDLER':
         return true;
       default:
         return false;

+ 4 - 0
ambari-web/app/models/service/flume.js

@@ -45,6 +45,10 @@ App.FlumeAgent = DS.Model.extend({
    */
   sinks: DS.attr('string'),
 
+  hostName: function () {
+    return this.get('host.hostName');
+  }.property('host.hostName'),
+
   channelsCount: function() {
     var channels = this.get('channels');
     if (!channels) {

File diff suppressed because it is too large
+ 2 - 0
ambari-web/app/styles/application.less


+ 15 - 24
ambari-web/app/templates/main/service/services/flume.hbs

@@ -20,31 +20,21 @@
 <tr>
   <td>
     <div id="flume-summary">
-    <a href="#" {{action filterHosts view.flumeServerComponent}}>{{view.summaryHeader}}</a>
+    <a href="#" {{action filterHosts view.flumeHandlerComponent}}>{{view.summaryHeader}}</a>
     <table class="table table-hover table-bordered table-striped" id="flume-agents-table">
-      <tr>
-        <th>
-        </th>
-        <th>
-          Agent
-        </th>
-        <th>
-          Host
-        </th>
-        <th>
-          Sources
-        </th>
-        <th>
-          Channels
-        </th>
-        <th>
-          Sinks
-        </th>
-        <th>
-          Actions
-        </th>
-      </tr>
-      {{#each agent in view.service.agents}}
+      <thead>
+      {{#view view.sortView contentBinding="view.filteredContent" class="label-row"}}
+        {{view view.parentView.statusSort}}
+        {{view view.parentView.agentSort}}
+        {{view view.parentView.hostSort}}
+        {{view view.parentView.sourceSort}}
+        {{view view.parentView.channelSort}}
+        {{view view.parentView.sinkSort}}
+        <td></td>
+      {{/view}}
+      </thead>
+      <tbody>
+      {{#each agent in view.pageContent}}
         <tr>
           <td class="agent-status">
             <span {{bindAttr class="agent.healthClass"}}></span>
@@ -68,6 +58,7 @@
           </td>
         </tr>
       {{/each}}
+      </tbody>
     </table>
     </div>
   </td>

+ 9 - 9
ambari-web/app/utils/ajax/ajax.js

@@ -631,47 +631,47 @@ var urls = {
     }
   },
   'service.metrics.flume.channel_fill_percent': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelFillPercentage[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelFillPercentage[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/services/metrics/flume/channelFillPct.json',
     'testInProduction': true
   },
   'service.metrics.flume.channel_size': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelSize[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelSize[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/services/metrics/flume/channelSize.json',
     'testInProduction': true
   },
   'service.metrics.flume.sink_drain_success': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/SINK/*/EventDrainSuccessCount[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/SINK/*/EventDrainSuccessCount[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/services/metrics/flume/sinkDrainSuccessCount.json',
     'testInProduction': true
   },
   'service.metrics.flume.sink_connection_failed': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/SINK/*/ConnectionFailedCount[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/SINK/*/ConnectionFailedCount[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/services/metrics/flume/sinkConnectionFailedCount.json',
     'testInProduction': true
   },
   'service.metrics.flume.gc': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/services/metrics/flume/jvmGcTime.json',
     'testInProduction': true
   },
   'service.metrics.flume.jvm_heap_used': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/services/metrics/flume/jvmMemHeapUsedM.json',
     'testInProduction': true
   },
   'service.metrics.flume.jvm_threads_runnable': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/jvm/threadsRunnable[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/jvm/threadsRunnable[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/services/metrics/flume/jvmThreadsRunnable.json',
     'testInProduction': true
   },
   'service.metrics.flume.cpu_user': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/cpu/cpu_user[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/cpu/cpu_user[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '',
     'testInProduction': true
   },
   'service.metrics.flume.source_accepted': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/SOURCE/*/EventAcceptedCount[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/SOURCE/*/EventAcceptedCount[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/services/metrics/flume/sourceEventAccepted.json',
     'testInProduction': true
   },

+ 1 - 1
ambari-web/app/utils/helper.js

@@ -295,7 +295,7 @@ App.format = {
     'FALCON_CLIENT': 'Falcon Client',
     'FALCON_SERVER': 'Falcon Server',
     'FALCON_SERVICE_CHECK': 'Falcon Service Check',
-    'FLUME_SERVER': 'Flume Agent',
+    'FLUME_HANDLER': 'Flume Agent',
     'GANGLIA_MONITOR': 'Ganglia Monitor',
     'GANGLIA_SERVER': 'Ganglia Server',
     'GLUSTERFS_CLIENT': 'GLUSTERFS Client',

+ 11 - 1
ambari-web/app/views/common/table_view.js

@@ -22,6 +22,12 @@ var sort = require('views/common/sort_view');
 
 App.TableView = Em.View.extend(App.UserPref, {
 
+  /**
+   * Defines to show pagination or show all records
+   * @type {Boolean}
+   */
+  pagination: true,
+
   /**
    * Shows if all data is loaded and filtered
    * @type {Boolean}
@@ -270,7 +276,11 @@ App.TableView = Em.View.extend(App.UserPref, {
    * Calculate end index for displayed content on the page
    */
   endIndex: function () {
-    return Math.min(this.get('filteredContent.length'), this.get('startIndex') + parseInt(this.get('displayLength')) - 1);
+    if (this.get('pagination')) {
+      return Math.min(this.get('filteredContent.length'), this.get('startIndex') + parseInt(this.get('displayLength')) - 1);
+    } else {
+      return this.get('filteredContent.length')
+    }
   }.property('startIndex', 'displayLength', 'filteredContent.length'),
 
   /**

+ 1 - 4
ambari-web/app/views/main/mirroring/datasets_view.js

@@ -23,6 +23,7 @@ var sort = require('views/common/sort_view');
 App.MainDatasetsView = App.TableView.extend({
   name: 'mainDatasetsView',
   templateName: require('templates/main/mirroring/datasets'),
+  pagination: false,
   content: function () {
     return this.get('controller.datasets');
   }.property('controller.datasets.length'),
@@ -31,10 +32,6 @@ App.MainDatasetsView = App.TableView.extend({
     this.filter();
   },
 
-  endIndex: function () {
-    return this.get('filteredContent.length');
-  }.property('filteredContent.length'),
-
   sortView: sort.wrapperView,
   nameSort: sort.fieldView.extend({
     column: '1',

+ 55 - 7
ambari-web/app/views/main/service/services/flume.js

@@ -17,23 +17,71 @@
 
 var App = require('app');
 var date = require('utils/date');
+var sort = require('views/common/sort_view');
 
-App.MainDashboardServiceFlumeView = App.MainDashboardServiceView.extend({
+App.MainDashboardServiceFlumeView = App.TableView.extend({
   templateName: require('templates/main/service/services/flume'),
-  serviceName: 'flume',
 
-  summaryHeader : function() {
+  pagination: false,
+
+  content: function () {
+    return this.get('service.agents');
+  }.property('service.agents.length'),
+
+  summaryHeader: function () {
     var agents = App.FlumeService.find().objectAt(0).get('agents');//this.get('service.agents');
     var agentCount = agents.get('length');
     var hostCount = agents.mapProperty('host').uniq().get('length');
     var prefix = agentCount == 1 ? this.t("dashboard.services.flume.summary.single") :
-      this.t("dashboard.services.flume.summary.multiple").format(agentCount);
+        this.t("dashboard.services.flume.summary.multiple").format(agentCount);
     var suffix = hostCount == 1 ? this.t("dashboard.services.flume.summary.hosts.single") :
-      this.t("dashboard.services.flume.summary.hosts.multiple").format(hostCount);
+        this.t("dashboard.services.flume.summary.hosts.multiple").format(hostCount);
     return prefix + suffix;
   }.property('service.agents'),
 
-  flumeServerComponent: function() {
-    return App.HostComponent.find().findProperty('componentName', 'FLUME_SERVER');
+  flumeHandlerComponent: function () {
+    return App.HostComponent.find().findProperty('componentName', 'FLUME_HANDLER');
   }.property(),
+
+  sortView: sort.wrapperView,
+
+  statusSort: sort.fieldView.extend({
+    column: '1',
+    name: 'status',
+    displayName: ''
+  }),
+
+  agentSort: sort.fieldView.extend({
+    column: '2',
+    name: 'name',
+    displayName: Em.I18n.t('dashboard.services.flume.agent')
+  }),
+
+  hostSort: sort.fieldView.extend({
+    column: '3',
+    name: 'hostName',
+    displayName: Em.I18n.t('common.host')
+  }),
+
+  sourceSort: sort.fieldView.extend({
+    column: '4',
+    name: 'sourcesCount',
+    displayName: Em.I18n.t('dashboard.services.flume.sources')
+  }),
+
+  channelSort: sort.fieldView.extend({
+    column: '5',
+    name: 'channelsCount',
+    displayName: Em.I18n.t('dashboard.services.flume.channels')
+  }),
+
+  sinkSort: sort.fieldView.extend({
+    column: '6',
+    name: 'sinksCount',
+    displayName: Em.I18n.t('dashboard.services.flume.sinks')
+  }),
+
+  didInsertElement: function () {
+    this.filter();
+  }
 });

Some files were not shown because too many files changed in this diff