Repository: incubator-eagle
Updated Branches:
  refs/heads/master d9ef76d97 -> 2b09be954


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java
 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java
index af1fb3a..69c74db 100644
--- 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java
+++ 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java
@@ -60,10 +60,10 @@ public class AlertStreamSchemaDAOImpl implements 
AlertStreamSchemaDAO {
        }
        
        @Override
-       public List<AlertStreamSchemaEntity> 
findAlertStreamSchemaByDataSource(String dataSource) throws Exception {
+       public List<AlertStreamSchemaEntity> 
findAlertStreamSchemaByApplication(String application) throws Exception {
                try {
                        IEagleServiceClient client = new 
EagleServiceClientImpl(eagleServiceHost, eagleServicePort, username, password);
-                       String query = 
Constants.ALERT_STREAM_SCHEMA_SERVICE_ENDPOINT_NAME + "[@dataSource=\"" + 
dataSource + "\"]{*}";
+                       String query = 
Constants.ALERT_STREAM_SCHEMA_SERVICE_ENDPOINT_NAME + "[@application=\"" + 
application + "\"]{*}";
                        
GenericServiceAPIResponseEntity<AlertStreamSchemaEntity> response =  
client.search()
                                                                                
                                                                                
.startTime(0)
                                                                                
                                                                                
.endTime(10 * DateUtils.MILLIS_PER_DAY)

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java
 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java
index b9475a1..faa81d9 100644
--- 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java
+++ 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java
@@ -30,7 +30,7 @@ public interface PolicyDefinitionDAO<T extends 
AbstractPolicyDefinitionEntity> e
         * find list of active alert definitions for one specific site and 
dataSource
         * @return
         */
-       List<T> findActivePolicies(String site, String dataSource) throws 
Exception;
+       List<T> findActivePolicies(String site, String application) throws 
Exception;
        
        /**
         * find map from alertExecutorId to map from policy Id to alert 
definition for one specific site and dataSource

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java
 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java
index 300ff02..2c8616c 100644
--- 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java
+++ 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java
@@ -50,10 +50,10 @@ public class PolicyDefinitionEntityDAOImpl<T extends 
AbstractPolicyDefinitionEnt
        }
 
     @Override
-       public List<T> findActivePolicies(String site, String dataSource) 
throws Exception {
+       public List<T> findActivePolicies(String site, String application) 
throws Exception {
                try {
                        IEagleServiceClient client = new 
EagleServiceClientImpl(connector);
-                       String query = servicePointName + "[@site=\"" + site + 
"\" AND @dataSource=\"" + dataSource + "\" AND @enabled=\"true\"]{*}";
+                       String query = servicePointName + "[@site=\"" + site + 
"\" AND @application=\"" + application + "\" AND @enabled=\"true\"]{*}";
                        GenericServiceAPIResponseEntity<T> response = 
client.search()
                                                                                
                                .pageSize(Integer.MAX_VALUE)
                                                                                
                                .query(query)
@@ -78,9 +78,9 @@ public class PolicyDefinitionEntityDAOImpl<T extends 
AbstractPolicyDefinitionEnt
     
 
     @Override
-       public Map<String, Map<String, T>> 
findActivePoliciesGroupbyExecutorId(String site, String dataSource)
+       public Map<String, Map<String, T>> 
findActivePoliciesGroupbyExecutorId(String site, String application)
                        throws Exception {
-               List<T> list = findActivePolicies(site, dataSource);
+               List<T> list = findActivePolicies(site, application);
                Map<String, Map<String, T>> map = new HashMap<String, 
Map<String, T>>();
                for (T entity : list) {
                        // support both executorId and legacy alertExecutorId

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/PolicyProcessExecutor.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/PolicyProcessExecutor.java
 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/PolicyProcessExecutor.java
index e71a045..30d2179 100644
--- 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/PolicyProcessExecutor.java
+++ 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/PolicyProcessExecutor.java
@@ -153,7 +153,7 @@ public abstract class PolicyProcessExecutor<T extends 
AbstractPolicyDefinitionEn
                baseDimensions.put(Constants.ALERT_EXECUTOR_ID, executorId);
                baseDimensions.put(Constants.PARTITIONSEQ, 
String.valueOf(partitionSeq));
                baseDimensions.put(Constants.SOURCE, 
ManagementFactory.getRuntimeMXBean().getName());
-               baseDimensions.put(EagleConfigConstants.DATA_SOURCE, 
config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.DATA_SOURCE));
+               baseDimensions.put(EagleConfigConstants.APPLICATION, 
config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.APPLICATION));
                baseDimensions.put(EagleConfigConstants.SITE, 
config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.SITE));
 
                dimensionsMap = new HashMap<String, Map<String, String>>();
@@ -171,16 +171,16 @@ public abstract class PolicyProcessExecutor<T extends 
AbstractPolicyDefinitionEn
                Map<String, PolicyEvaluator<T>> tmpPolicyEvaluators = new 
HashMap<String, PolicyEvaluator<T>>();
                
         String site = config.getString(EagleConfigConstants.EAGLE_PROPS + "." 
+ EagleConfigConstants.SITE);
-               String dataSource = 
config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.DATA_SOURCE);
+               String application = 
config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.APPLICATION);
                try {
-                       initialAlertDefs = 
policyDefinitionDao.findActivePoliciesGroupbyExecutorId(site, dataSource);
+                       initialAlertDefs = 
policyDefinitionDao.findActivePoliciesGroupbyExecutorId(site, application);
                }
                catch (Exception ex) {
                        LOG.error("fail to initialize initialAlertDefs: ", ex);
             throw new IllegalStateException("fail to initialize 
initialAlertDefs: ", ex);
                }
         if(initialAlertDefs == null || initialAlertDefs.isEmpty()){
-            LOG.warn("No alert definitions was found for site: " + site + ", 
dataSource: " + dataSource);
+            LOG.warn("No alert definitions was found for site: " + site + ", 
application: " + application);
         }
         else if (initialAlertDefs.get(executorId) != null) { 
                        for(T alertDef : 
initialAlertDefs.get(executorId).values()){

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/StreamMetadataManager.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/StreamMetadataManager.java
 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/StreamMetadataManager.java
index 47b7ef7..83d30e0 100644
--- 
a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/StreamMetadataManager.java
+++ 
b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/StreamMetadataManager.java
@@ -52,8 +52,8 @@ public class StreamMetadataManager {
        
        private void internalInit(Config config, AlertStreamSchemaDAO dao){
                try{
-                       String dataSource = 
config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.DATA_SOURCE);
-                       List<AlertStreamSchemaEntity> list = 
dao.findAlertStreamSchemaByDataSource(dataSource);
+                       String application = 
config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.APPLICATION);
+                       List<AlertStreamSchemaEntity> list = 
dao.findAlertStreamSchemaByApplication(application);
                        if(list == null)
                                return;
                        for (AlertStreamSchemaEntity entity : list) {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-policy/eagle-policy-base/src/test/java/org/apache/eagle/policy/dao/TestSchemaDao.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-policy/eagle-policy-base/src/test/java/org/apache/eagle/policy/dao/TestSchemaDao.java
 
b/eagle-core/eagle-policy/eagle-policy-base/src/test/java/org/apache/eagle/policy/dao/TestSchemaDao.java
index fd40f79..c88d9bb 100644
--- 
a/eagle-core/eagle-policy/eagle-policy-base/src/test/java/org/apache/eagle/policy/dao/TestSchemaDao.java
+++ 
b/eagle-core/eagle-policy/eagle-policy-base/src/test/java/org/apache/eagle/policy/dao/TestSchemaDao.java
@@ -31,7 +31,7 @@ public class TestSchemaDao {
     @Test
     public void test() throws Exception {
         AlertStreamSchemaDAO dao = new AlertStreamSchemaDAOImpl("localhost", 
9099, "admin", "secret");
-        List<AlertStreamSchemaEntity> entities = 
dao.findAlertStreamSchemaByDataSource("hdfsAuditLog");
+        List<AlertStreamSchemaEntity> entities = 
dao.findAlertStreamSchemaByApplication("hdfsAuditLog");
         System.out.print(entities);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAOImpl.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAOImpl.java
 
b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAOImpl.java
index 918009f..41332ae 100644
--- 
a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAOImpl.java
+++ 
b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAOImpl.java
@@ -39,10 +39,10 @@ public class ServiceAuditDAOImpl implements ServiceAuditDAO 
{
     }
 
        @Override
-    public List<GenericAuditEntity> findPolicyAudit(String site, String 
dataSource) throws Exception {
+    public List<GenericAuditEntity> findPolicyAudit(String site, String 
application) throws Exception {
                try {
                        IEagleServiceClient client = new 
EagleServiceClientImpl(connector);
-                       String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + 
"[@serviceName=\"AlertDefinitionService\" AND @site=\"" + site + "\" AND 
@dataSource=\"" + dataSource + "\"]{*}";
+                       String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + 
"[@serviceName=\"AlertDefinitionService\" AND @site=\"" + site + "\" AND 
@application=\"" + application + "\"]{*}";
             GenericServiceAPIResponseEntity<GenericAuditEntity> response =  
client.search().startTime(0).endTime(10 * 
DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
             client.close();
             if (response.getException() != null) {
@@ -73,10 +73,10 @@ public class ServiceAuditDAOImpl implements ServiceAuditDAO 
{
     }
     
        @Override
-    public List<GenericAuditEntity> findDataSourceAudit(String dataSource) 
throws Exception {
+    public List<GenericAuditEntity> findDataSourceAudit(String application) 
throws Exception {
                try {
                        IEagleServiceClient client = new 
EagleServiceClientImpl(connector);
-                       String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + 
"[@serviceName=\"AlertDataSourceService\" AND @dataSource=\"" + dataSource + 
"\"]{*}";
+                       String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + 
"[@serviceName=\"AlertDataSourceService\" AND @application=\"" + application + 
"\"]{*}";
             GenericServiceAPIResponseEntity<GenericAuditEntity> response =  
client.search().startTime(0).endTime(10 * 
DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
             client.close();
             if (response.getException() != null) {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
 
b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
index 307e508..720dc35 100644
--- 
a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
+++ 
b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
@@ -52,5 +52,8 @@ public final class EagleConfigConstants {
     public final static String PASSWORD = "password";
 
     public final static String SITE = "site";
+    @Deprecated
     public final static String DATA_SOURCE = "dataSource";
+    public final static String APPLICATION = "application";
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigHelper.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigHelper.java
 
b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigHelper.java
index b8ac75e..fe3e190 100644
--- 
a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigHelper.java
+++ 
b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigHelper.java
@@ -45,7 +45,7 @@ public class EagleConfigHelper {
         return config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.SITE);
     }
 
-    public static String getDataSource(Config config) {
-        return config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.DATA_SOURCE);
+    public static String getApplication(Config config) {
+        return config.getString(EagleConfigConstants.EAGLE_PROPS + "." + 
EagleConfigConstants.APPLICATION);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
----------------------------------------------------------------------
diff --git 
a/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
 
b/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
index f73e7c0..b35abc8 100644
--- 
a/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
+++ 
b/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
@@ -35,7 +35,7 @@
   },
   "eagleProps" : {
     "site" : "sandbox",
-    "dataSource": "testSpout",
+    "application": "testSpout",
        "dataJoinPollIntervalSec" : 30,
     "mailHost" : "mailHost.com",
     "mailSmtpPort":"25",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-examples/eagle-topology-example/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git 
a/eagle-examples/eagle-topology-example/src/main/resources/application.conf 
b/eagle-examples/eagle-topology-example/src/main/resources/application.conf
index aad74b3..9629917 100644
--- a/eagle-examples/eagle-topology-example/src/main/resources/application.conf
+++ b/eagle-examples/eagle-topology-example/src/main/resources/application.conf
@@ -62,7 +62,7 @@
   },
   "eagleProps" : {
     "site" : "sandbox",
-    "dataSource": "persistTest",
+    "application": "persistTest",
        "dataJoinPollIntervalSec" : 30,
     "mailHost" : "mailHost.com",
     "mailSmtpPort":"25",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-gc/src/main/java/org/apache/eagle/gc/executor/GCMetricGeneratorExecutor.java
----------------------------------------------------------------------
diff --git 
a/eagle-gc/src/main/java/org/apache/eagle/gc/executor/GCMetricGeneratorExecutor.java
 
b/eagle-gc/src/main/java/org/apache/eagle/gc/executor/GCMetricGeneratorExecutor.java
index eda6564..ebc5a6c 100644
--- 
a/eagle-gc/src/main/java/org/apache/eagle/gc/executor/GCMetricGeneratorExecutor.java
+++ 
b/eagle-gc/src/main/java/org/apache/eagle/gc/executor/GCMetricGeneratorExecutor.java
@@ -62,7 +62,7 @@ public class GCMetricGeneratorExecutor extends 
JavaStormStreamExecutor2<String,
         listener = new EagleServiceReporterMetricListener(host, port, 
username, password);
         dimensions = new HashMap<>();
         dimensions.put(EagleConfigConstants.SITE, 
EagleConfigHelper.getSite(config));
-        dimensions.put(EagleConfigConstants.DATA_SOURCE, 
EagleConfigHelper.getDataSource(config));
+        dimensions.put(EagleConfigConstants.APPLICATION, 
EagleConfigHelper.getApplication(config));
         gcPausedTimeMetricName = 
MetricKeyCodeDecoder.codeMetricKey(GCConstants.GC_PAUSE_TIME_METRIC_NAME, 
dimensions);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-gc/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-gc/src/main/resources/application.conf 
b/eagle-gc/src/main/resources/application.conf
index 5fad589..ed14063 100644
--- a/eagle-gc/src/main/resources/application.conf
+++ b/eagle-gc/src/main/resources/application.conf
@@ -41,7 +41,7 @@
   },
   "eagleProps" : {
     "site" : "sandbox",
-    "dataSource": "NNGCLog",
+    "application": "NNGCLog",
     "mailHost" : "www.xyz.com",
     "mailSmtpPort":"25",
     "mailDebug" : "true",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-hadoop-metric/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/resources/application.conf 
b/eagle-hadoop-metric/src/main/resources/application.conf
index d72cc26..dc1c7f3 100644
--- a/eagle-hadoop-metric/src/main/resources/application.conf
+++ b/eagle-hadoop-metric/src/main/resources/application.conf
@@ -45,7 +45,7 @@
   },
   "eagleProps" : {
     "site" : "sandbox",
-    "dataSource": "hadoopJmxMetricDataSource",
+    "application": "hadoopJmxMetricDataSource",
        "dataJoinPollIntervalSec" : 30,
     "mailHost" : "mailHost.com",
     "mailSmtpPort":"25",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-hadoop-metric/src/main/resources/capacityused-policy-import.sh
----------------------------------------------------------------------
diff --git 
a/eagle-hadoop-metric/src/main/resources/capacityused-policy-import.sh 
b/eagle-hadoop-metric/src/main/resources/capacityused-policy-import.sh
index a09199a..71e2756 100644
--- a/eagle-hadoop-metric/src/main/resources/capacityused-policy-import.sh
+++ b/eagle-hadoop-metric/src/main/resources/capacityused-policy-import.sh
@@ -30,7 +30,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST 
-H 'Content-Type:a
        "prefix": "alertdef",
        "tags": {
          "site": "sandbox",
-         "dataSource": "hadoopJmxMetricDataSource",
+         "application": "hadoopJmxMetricDataSource",
          "policyId": "capacityUsedPolicy",
          "alertExecutorId": "hadoopJmxMetricAlertExecutor",
          "policyType": "siddhiCEPEngine"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-hadoop-metric/src/main/resources/hastate-policy-import.sh
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/resources/hastate-policy-import.sh 
b/eagle-hadoop-metric/src/main/resources/hastate-policy-import.sh
index a043cd4..b125e37 100644
--- a/eagle-hadoop-metric/src/main/resources/hastate-policy-import.sh
+++ b/eagle-hadoop-metric/src/main/resources/hastate-policy-import.sh
@@ -30,7 +30,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST 
-H 'Content-Type:a
        "prefix": "alertdef",
        "tags": {
          "site": "sandbox",
-         "dataSource": "hadoopJmxMetricDataSource",
+         "application": "hadoopJmxMetricDataSource",
          "policyId": "haStatePolicy",
          "alertExecutorId": "hadoopJmxMetricAlertExecutor",
          "policyType": "siddhiCEPEngine"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-hadoop-metric/src/main/resources/lastcheckpointtime-policy-import.sh
----------------------------------------------------------------------
diff --git 
a/eagle-hadoop-metric/src/main/resources/lastcheckpointtime-policy-import.sh 
b/eagle-hadoop-metric/src/main/resources/lastcheckpointtime-policy-import.sh
index cdb8779..333367c 100644
--- a/eagle-hadoop-metric/src/main/resources/lastcheckpointtime-policy-import.sh
+++ b/eagle-hadoop-metric/src/main/resources/lastcheckpointtime-policy-import.sh
@@ -30,7 +30,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST 
-H 'Content-Type:a
        "prefix": "alertdef",
        "tags": {
          "site": "sandbox",
-         "dataSource": "hadoopJmxMetricDataSource",
+         "application": "hadoopJmxMetricDataSource",
          "policyId": "lastCheckPointTimePolicy",
          "alertExecutorId": "hadoopJmxMetricAlertExecutor",
          "policyType": "siddhiCEPEngine"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-hadoop-metric/src/main/resources/missingblock-policy-import.sh
----------------------------------------------------------------------
diff --git 
a/eagle-hadoop-metric/src/main/resources/missingblock-policy-import.sh 
b/eagle-hadoop-metric/src/main/resources/missingblock-policy-import.sh
index 280399b..9a5e924 100644
--- a/eagle-hadoop-metric/src/main/resources/missingblock-policy-import.sh
+++ b/eagle-hadoop-metric/src/main/resources/missingblock-policy-import.sh
@@ -30,7 +30,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST 
-H 'Content-Type:a
        "prefix": "alertdef",
        "tags": {
          "site": "sandbox",
-         "dataSource": "hadoopJmxMetricDataSource",
+         "application": "hadoopJmxMetricDataSource",
          "policyId": "missingBlockPolicy",
          "alertExecutorId": "hadoopJmxMetricAlertExecutor",
          "policyType": "siddhiCEPEngine"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-hadoop-metric/src/main/resources/namenodelag-policy-import.sh
----------------------------------------------------------------------
diff --git 
a/eagle-hadoop-metric/src/main/resources/namenodelag-policy-import.sh 
b/eagle-hadoop-metric/src/main/resources/namenodelag-policy-import.sh
index 8890b83..45de4b8 100644
--- a/eagle-hadoop-metric/src/main/resources/namenodelag-policy-import.sh
+++ b/eagle-hadoop-metric/src/main/resources/namenodelag-policy-import.sh
@@ -28,7 +28,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST 
-H 'Content-Type:a
        "prefix": "alertdef",
        "tags": {
          "site": "sandbox",
-         "dataSource": "hadoopJmxMetricDataSource",
+         "application": "hadoopJmxMetricDataSource",
          "policyId": "NameNodeLagPolicy",
          "alertExecutorId": "hadoopJmxMetricAlertExecutor",
          "policyType": "siddhiCEPEngine"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-hadoop-metric/src/main/resources/nodecount-policy-import.sh
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/resources/nodecount-policy-import.sh 
b/eagle-hadoop-metric/src/main/resources/nodecount-policy-import.sh
index e77e10e..589a44e 100644
--- a/eagle-hadoop-metric/src/main/resources/nodecount-policy-import.sh
+++ b/eagle-hadoop-metric/src/main/resources/nodecount-policy-import.sh
@@ -30,7 +30,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST 
-H 'Content-Type:a
        "prefix": "alertdef",
        "tags": {
          "site": "sandbox",
-         "dataSource": "hadoopJmxMetricDataSource",
+         "application": "hadoopJmxMetricDataSource",
          "policyId": "dataNodeCountPolicy",
          "alertExecutorId": "hadoopJmxMetricAlertExecutor",
          "policyType": "siddhiCEPEngine"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-hadoop-metric/src/main/resources/safemodecheck-policy-import.sh
----------------------------------------------------------------------
diff --git 
a/eagle-hadoop-metric/src/main/resources/safemodecheck-policy-import.sh 
b/eagle-hadoop-metric/src/main/resources/safemodecheck-policy-import.sh
index dfb1794..32a6bee 100644
--- a/eagle-hadoop-metric/src/main/resources/safemodecheck-policy-import.sh
+++ b/eagle-hadoop-metric/src/main/resources/safemodecheck-policy-import.sh
@@ -30,7 +30,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST 
-H 'Content-Type:a
        "prefix": "alertdef",
        "tags": {
          "site": "sandbox",
-         "dataSource": "hadoopJmxMetricDataSource",
+         "application": "hadoopJmxMetricDataSource",
          "policyId": "safeModePolicy",
          "alertExecutorId": "hadoopJmxMetricAlertExecutor",
          "policyType": "siddhiCEPEngine"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-security/eagle-security-hbase-securitylog/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git 
a/eagle-security/eagle-security-hbase-securitylog/src/main/resources/application.conf
 
b/eagle-security/eagle-security-hbase-securitylog/src/main/resources/application.conf
index 4979a1a..e92cb4f 100644
--- 
a/eagle-security/eagle-security-hbase-securitylog/src/main/resources/application.conf
+++ 
b/eagle-security/eagle-security-hbase-securitylog/src/main/resources/application.conf
@@ -46,7 +46,7 @@
   },
   "eagleProps" : {
     "site" : "sandbox",
-    "dataSource": "hbaseSecurityLog",
+    "application": "hbaseSecurityLog",
     "dataJoinPollIntervalSec" : 30,
     "mailHost" : "mailHost.com",
     "mailSmtpPort":"25",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git 
a/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf
 
b/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf
index 697b4f6..3c3572e 100644
--- 
a/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf
+++ 
b/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf
@@ -45,7 +45,7 @@
   },
   "eagleProps" : {
     "site" : "sandbox",
-    "dataSource": "hdfsAuditLog",
+    "application": "hdfsAuditLog",
        "dataJoinPollIntervalSec" : 30,
     "mailHost" : "mailHost.com",
     "mailSmtpPort":"25",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-security/eagle-security-hdfs-securitylog/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git 
a/eagle-security/eagle-security-hdfs-securitylog/src/main/resources/application.conf
 
b/eagle-security/eagle-security-hdfs-securitylog/src/main/resources/application.conf
index 9900ac8..01e25db 100644
--- 
a/eagle-security/eagle-security-hdfs-securitylog/src/main/resources/application.conf
+++ 
b/eagle-security/eagle-security-hdfs-securitylog/src/main/resources/application.conf
@@ -45,7 +45,7 @@
   },
   "eagleProps" : {
     "site" : "sandbox",
-    "dataSource": "hdfsSecurityLog",
+    "application": "hdfsSecurityLog",
     "dataJoinPollIntervalSec" : 30,
     "mailHost" : "mailHost.com",
     "mailSmtpPort":"25",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-security/eagle-security-hive/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git 
a/eagle-security/eagle-security-hive/src/main/resources/application.conf 
b/eagle-security/eagle-security-hive/src/main/resources/application.conf
index 3c33015..22be461 100644
--- a/eagle-security/eagle-security-hive/src/main/resources/application.conf
+++ b/eagle-security/eagle-security-hive/src/main/resources/application.conf
@@ -36,7 +36,7 @@
   },
   "eagleProps" : {
     "site" : "sandbox",
-    "dataSource" : "hiveQueryLog",
+    "application" : "hiveQueryLog",
     "mailHost" : "mailHost.com",
     "mailSmtpPort":"25",
     "mailDebug" : "true",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-batch.conf
----------------------------------------------------------------------
diff --git 
a/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-batch.conf
 
b/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-batch.conf
index 36e838c..8f2a690 100644
--- 
a/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-batch.conf
+++ 
b/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-batch.conf
@@ -40,7 +40,7 @@
        },
        "eagleProps" : {
                "site":"sandbox",
-               "dataSource":"userProfile",
+               "application":"userProfile",
                "eagleService": {
                        "host": "localhost",
                        "port": "38080",

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-stream.conf
----------------------------------------------------------------------
diff --git 
a/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-stream.conf
 
b/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-stream.conf
index 68e5158..09bec08 100644
--- 
a/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-stream.conf
+++ 
b/eagle-security/eagle-security-userprofile/detection/src/main/resources/application-stream.conf
@@ -40,7 +40,7 @@
        },
        "eagleProps" : {
                "site":"sandbox",
-               "dataSource":"userProfile",
+               "application":"userProfile",
                "userProfileFeatures":"",
                "userProfileMode":"streaming",
                "eagleService": {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js 
b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
index 50f377c..bb3155f 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
@@ -74,7 +74,7 @@
                $scope.application = Application.current();
 
                // List policies
-               var _policyList = 
Entities.queryEntities("AlertDefinitionService", {site: 
Site.current().tags.site, dataSource: $scope.application.tags.application});
+               var _policyList = 
Entities.queryEntities("AlertDefinitionService", {site: 
Site.current().tags.site, application: $scope.application.tags.application});
                _policyList._promise.then(function() {
                        $.each(_policyList, function(i, policy) {
                                policy.__mailStr = 
common.getValueByPath(common.parseJSON(policy.notificationDef, {}), 
"0.recipients", "");
@@ -161,7 +161,7 @@
                        var _endTime = 
app.time.now().hour(23).minute(59).second(59).millisecond(0);
                        var _startTime = _endTime.clone().subtract(1, 
"month").hour(0).minute(0).second(0).millisecond(0);
                        var _cond = {
-                               dataSource: policy.tags.dataSource,
+                               application: policy.tags.application,
                                policyId: policy.tags.policyId,
                                _startTime: _startTime,
                                _endTime: _endTime
@@ -182,7 +182,7 @@
                        // Alert list
                        $scope.alertList = 
Entities.queryEntities("AlertService", {
                                site: Site.current().tags.site,
-                               dataSource: policy.tags.dataSource,
+                               application: policy.tags.application,
                                policyId: policy.tags.policyId,
                                _pageSize: MAX_PAGESIZE,
                                _duration: 1000 * 60 * 60 * 24 * 30,
@@ -261,15 +261,15 @@
                $scope.encodedRowkey = $wrapState.param.filter;
 
                $scope.step = 0;
-               $scope.dataSources = {};
+               $scope.applications = {};
                $scope.policy = {};
 
                // ==========================================
                // =            Data Preparation            =
                // ==========================================
                // Steam list
-               var _streamList = Entities.queryEntities("AlertStreamService", 
{dataSource: Application.current().tags.application});
-               var _executorList = 
Entities.queryEntities("AlertExecutorService", {dataSource: 
Application.current().tags.application});
+               var _streamList = Entities.queryEntities("AlertStreamService", 
{application: Application.current().tags.application});
+               var _executorList = 
Entities.queryEntities("AlertExecutorService", {application: 
Application.current().tags.application});
                $scope.streamList = _streamList;
                $scope.executorList = _executorList;
                $scope.streamReady = false;
@@ -278,7 +278,7 @@
                        // Map executor with stream
                        $.each(_executorList, function(i, executor) {
                                $.each(_streamList, function(j, stream) {
-                                       if(stream.tags.dataSource === 
executor.tags.dataSource && stream.tags.streamName === 
executor.tags.streamName) {
+                                       if(stream.tags.application === 
executor.tags.application && stream.tags.streamName === 
executor.tags.streamName) {
                                                stream.alertExecutor = executor;
                                                return false;
                                        }
@@ -287,7 +287,7 @@
 
                        // Fill stream list
                        $.each(_streamList, function(i, unit) {
-                               var _srcStreamList = 
$scope.dataSources[unit.tags.dataSource] = 
$scope.dataSources[unit.tags.dataSource] || [];
+                               var _srcStreamList = 
$scope.applications[unit.tags.application] = 
$scope.applications[unit.tags.application] || [];
                                _srcStreamList.push(unit);
                        });
 
@@ -296,8 +296,8 @@
                        // ==========================================
                        // =                Function                =
                        // ==========================================
-                       function _findStream(dataSource, streamName) {
-                               var _streamList = 
$scope.dataSources[dataSource];
+                       function _findStream(application, streamName) {
+                               var _streamList = 
$scope.applications[application];
                                if(!_streamList) return null;
 
                                for(var i = 0 ; i < _streamList.length ; i += 
1) {
@@ -320,14 +320,14 @@
                                        },
                                        init: function() {
                                                $scope.policy.__.streamName = 
$scope.policy.__.streamName ||
-                                                       
common.array.find($scope.policy.tags.dataSource, _streamList, 
"tags.dataSource").tags.streamName;
+                                                       
common.array.find($scope.policy.tags.application, _streamList, 
"tags.application").tags.streamName;
                                        },
                                        nextable: function() {
                                                var _streamName = 
common.getValueByPath($scope.policy, "__.streamName");
                                                if(!_streamName) return false;
 
                                                // Detect stream in current 
data source list
-                                               return 
!!common.array.find(_streamName, 
$scope.dataSources[$scope.policy.tags.dataSource], "tags.streamName");
+                                               return 
!!common.array.find(_streamName, 
$scope.applications[$scope.policy.tags.application], "tags.streamName");
                                        }
                                },
 
@@ -337,11 +337,11 @@
                                        init: function() {
                                                // Normal mode will fetch meta 
list
                                                if(!$scope.policy.__.advanced) {
-                                                       var _stream = 
_findStream($scope.policy.tags.dataSource, $scope.policy.__.streamName);
+                                                       var _stream = 
_findStream($scope.policy.tags.application, $scope.policy.__.streamName);
                                                        $scope._stream = 
_stream;
 
                                                        if(!_stream.metas) {
-                                                               _stream.metas = 
Entities.queryEntities("AlertStreamSchemaService", {dataSource: 
$scope.policy.tags.dataSource, streamName: $scope.policy.__.streamName});
+                                                               _stream.metas = 
Entities.queryEntities("AlertStreamSchemaService", {application: 
$scope.policy.tags.application, streamName: $scope.policy.__.streamName});
                                                                
_stream.metas._promise.then(function() {
                                                                        
_stream.metas.sort(function(a, b) {
                                                                                
if(a.tags.attrName < b.tags.attrName) {
@@ -365,7 +365,7 @@
                                                if($scope.policy.__.advanced) {
                                                        // Check stream source
                                                        $scope._stream = null;
-                                                       
$.each($scope.dataSources[$scope.policy.tags.dataSource], function(i, stream) {
+                                                       
$.each($scope.applications[$scope.policy.tags.application], function(i, stream) 
{
                                                                
if(($scope.policy.__._expression || "").indexOf(stream.tags.streamName) !== -1) 
{
                                                                        
$scope._stream = stream;
                                                                        return 
false;
@@ -436,15 +436,15 @@
                                                prefix: "alertdef",
                                                remediationDef: "",
                                                tags: {
-                                                       dataSource: 
Application.current().tags.application,
+                                                       application: 
Application.current().tags.application,
                                                        policyType: 
"siddhiCEPEngine"
                                                }
                                        };
 
                                        // If configured data source
-                                       if($wrapState.param.dataSrc) {
-                                               $scope.policy.tags.dataSource = 
$wrapState.param.dataSrc;
-                                               
if(common.array.find($wrapState.param.dataSrc, Site.current().dataSrcList, 
"tags.dataSource")) {
+                                       if($wrapState.param.app) {
+                                               $scope.policy.tags.application 
= $wrapState.param.app;
+                                               
if(common.array.find($wrapState.param.app, Site.current().applicationList, 
"tags.application")) {
                                                        setTimeout(function() {
                                                                
$scope.changeStep(0, 2, false);
                                                                $scope.$apply();
@@ -877,7 +877,7 @@
                                                alertExecutorId: 
$scope.policy.tags.alertExecutorId,
                                                policyId: 
$scope.policy.tags.policyId,
                                                policyType: "siddhiCEPEngine",
-                                               dataSource: 
$scope.policy.tags.dataSource
+                                               application: 
$scope.policy.tags.application
                                        });
                                        _checkList._promise.then(function() {
                                                if(_checkList.length) {
@@ -941,7 +941,7 @@
 
                        var _list = Entities.queryEntities("AlertService", {
                                site: Site.current().tags.site,
-                               dataSource: $scope.application.tags.application,
+                               application: 
$scope.application.tags.application,
                                hostname: null,
                                _pageSize: MAX_PAGESIZE,
                                _duration: 1000 * 60 * 60 * 24 * 30,

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertDetail.html
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertDetail.html
 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertDetail.html
index fee5ab1..798ca84 100644
--- 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertDetail.html
+++ 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertDetail.html
@@ -28,7 +28,7 @@
 
                <div class="inline-group">
                        <dl><dt>Site</dt><dd>{{alert.tags.site}}</dd></dl>
-                       <dl><dt>Data 
Source</dt><dd>{{alert.tags.dataSource}}</dd></dl>
+                       <dl><dt>Data 
Source</dt><dd>{{alert.tags.application}}</dd></dl>
                </div>
                <div class="inline-group">
                        <dl><dt>Alert 
Time</dt><dd>{{common.format.date(alert.timestamp)}}</dd></dl>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertList.html
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertList.html
 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertList.html
index 44f5a32..0395b8e 100644
--- 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertList.html
+++ 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/alertList.html
@@ -34,7 +34,7 @@
                                        <tr>
                                                <th width="170" 
sortpath="timestamp">Alert Time</th>
                                                <th width="170" 
sortpath="alertContext.properties.timestamp">Message Time</th>
-                                               <th width="105" 
sortpath="tags.dataSource">Data Source</th>
+                                               <th width="105" 
sortpath="tags.application">Application</th>
                                                <!--th width="70" 
sortpath="severity">Type</th-->
                                                <th width="150" 
sortpath="tags.policyId">Policy Name</th>
                                                <th width="60" 
sortpath="alertContext.properties.user">User</th>
@@ -47,7 +47,7 @@
                                        <tr ng-class="{info : item.__new}">
                                                
<td>{{common.format.date(item.timestamp)}}</td>
                                                
<td>{{common.format.date(item.alertContext.properties.timestamp)}}</td>
-                                               
<td>{{item.tags.dataSource}}</td>
+                                               
<td>{{item.tags.application}}</td>
                                                <!--td>{{item.severity}}</td-->
                                                <td class="text-nowrap">
                                                        <a class="fa 
fa-share-square-o" ng-show="item.tags.policyId"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/common/page/dataSrcConfig.html
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/dataSrcConfig.html
 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/dataSrcConfig.html
deleted file mode 100644
index ba4f728..0000000
--- 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/dataSrcConfig.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<div class="box box-primary" ng-repeat="_site in Site.list">
-       <div class="box-header">
-               <h3 class="box-title">{{_site.name}}</h3>
-               <div class="box-tools pull-right">
-                       <button class="btn btn-box-tool" data-widget="collapse">
-                               <i class="fa fa-minus"></i>
-                       </button>
-                       <button class="btn btn-box-tool" 
ng-click="showSiteEditor(_site)">
-                               <i class="fa fa-wrench"></i>
-                       </button>
-               </div>
-       </div><!-- /.box-header -->
-       <div class="box-body">
-               <div class="row">
-                       <div class="col-md-4" ng-repeat="dataSrc in 
_site.dataSrcList">
-                               <div class="info-box" ng-class="dataSrc.enabled 
!== false ? 'bg-aqua' : 'bg-gray'">
-                                       <span class="info-box-icon"><i 
class="fa fa-suitcase"></i></span>
-                                       <div class="info-box-content">
-                                               <a class="fa fa-cog config 
pull-right" ng-click="showDataSourceEditor(dataSrc)"></a>
-                                               <span 
class="info-box-text">{{dataSrc.desc || dataSrc.tags.dataSource}}</span>
-
-                                               <span class="info-box-number" 
ng-show="dataSrc.hide"><small>-</small></span>
-                                               <span class="info-box-number" 
ng-show="!dataSrc.hide">
-                                                       <span class="fa 
fa-refresh fa-spin" ng-hide="policyStatistic._promise.$$state.status === 
1"></span>
-                                                       <span 
ng-show="policyStatistic._promise.$$state.status === 
1">{{getPolicyCount(_site.name, dataSrc.tags.dataSource)}}</span>
-                                                       <small>Policies</small>
-                                               </span>
-                                               <div class="progress">
-                                                       <div 
class="progress-bar"></div>
-                                               </div>
-                                               <span 
class="progress-description" ng-show="dataSrc.hide"><small>-</small></span>
-                                               <span 
class="progress-description" ng-show="!dataSrc.hide">
-                                                       <span class="fa 
fa-refresh fa-spin" ng-hide="alertStatistic._promise.$$state.status === 
1"></span>
-                                                       <span 
ng-show="alertStatistic._promise.$$state.status === 
1">{{getAlertCount(_site.name, dataSrc.tags.dataSource)}}</span>
-                                                       alerts in 30 Days
-                                               </span>
-                                       </div><!-- /.info-box-content -->
-                               </div>
-                       </div>
-               </div>
-       </div>
-</div>
-
-<!-- Modal: Create / Edit site -->
-<div class="modal fade" id="siteMDL" tabindex="-1" role="dialog">
-       <div class="modal-dialog" role="document">
-               <div class="modal-content">
-                       <div class="modal-header">
-                               <button type="button" class="close" 
data-dismiss="modal" aria-label="Close">
-                                       <span aria-hidden="true">&times;</span>
-                               </button>
-                               <h4 class="modal-title">{{!_siteEntity.srcSite 
? 'Create' : 'Config'}} Site</h4>
-                       </div>
-                       <div class="modal-body">
-                               <div class="form-group">
-                                       <label>* Site Name</label>
-                                       <input type="text" class="form-control" 
placeholder="Site name..." ng-model="_siteEntity.name" 
ng-disabled="!!_siteEntity.srcSite" id="siteName">
-                               </div>
-
-                               <label>
-                                       * Data Source
-                                       <small class="text-muted">at least 
select 1 source</small>
-                               </label>
-                               <div class="checkbox" ng-repeat="item in 
_siteEntity.dataSrcList">
-                                       <label>
-                                               <input type="checkbox" 
value="{{item.name}}"
-                                                          
ng-checked="item.enabled"
-                                                          
ng-click="item.enabled = !item.enabled">
-                                               {{item.name}}
-                                       </label>
-                               </div>
-                       </div>
-                       <div class="modal-footer">
-                               <button type="button" class="btn btn-default" 
data-dismiss="modal">
-                                       Close
-                               </button>
-                               <button type="button" class="btn btn-primary" 
ng-click="confirmUpateSite()"
-                                               
ng-disabled="!checkUpdateSite()">
-                                       {{!_siteEntity.srcSite ? 'Create' : 
'Update'}}
-                               </button>
-                       </div>
-               </div>
-       </div>
-</div>
-
-<!-- Modal: Edit data source -->
-<div class="modal fade" id="dataSrcMDL" tabindex="-1" role="dialog">
-       <div class="modal-dialog" role="document">
-               <div class="modal-content">
-                       <div class="modal-header">
-                               <button type="button" class="close" 
data-dismiss="modal" aria-label="Close">
-                                       <span aria-hidden="true">&times;</span>
-                               </button>
-                               <h4 
class="modal-title">{{_dataSrcEntity.tags.dataSource}}</h4>
-                       </div>
-                       <div class="modal-body">
-                               <div class="checkbox">
-                                       <label>
-                                               <input type="checkbox"
-                                                          
ng-checked="_dataSrcEntity.enabled"
-                                                          
ng-click="_dataSrcEntity.enabled = !_dataSrcEntity.enabled">
-                                               Enabled
-                                       </label>
-                               </div>
-
-                               <div class="form-group">
-                                       <label>Configuration</label>
-                                       <textarea type="text" 
class="form-control" placeholder="Data source configuration..." 
ng-model="_dataSrcEntity.config" id="dataSrcConfig" rows="10"></textarea>
-                               </div>
-                       </div>
-                       <div class="modal-footer">
-                               <button type="button" class="btn btn-danger 
pull-left" ng-click="confirmDeleteDataSource()">
-                                       Delete Source
-                               </button>
-
-                               <button type="button" class="btn btn-default" 
data-dismiss="modal">
-                                       Close
-                               </button>
-                               <button type="button" class="btn btn-primary" 
ng-click="confirmUpateDataSource()" ng-disabled="_dataSrcEntityLock">
-                                       Update
-                               </button>
-                       </div>
-               </div>
-       </div>
-</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyDetail.html
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyDetail.html
 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyDetail.html
index 8670839..0c2bb72 100644
--- 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyDetail.html
+++ 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyDetail.html
@@ -28,7 +28,7 @@
                <div class="row">
                        <div class="col-xs-8">
                                <div class="inline-group">
-                                       <dl><dt>Data 
Source</dt><dd>{{policy.tags.dataSource}}</dd></dl>
+                                       <dl><dt>Data 
Source</dt><dd>{{policy.tags.application}}</dd></dl>
                                        <dl><dt>Status</dt><dd>
                                                <span ng-show="policy.enabled" 
class="text-muted"><i class="fa fa-square text-green"></i> Enabled</span>
                                                <span ng-show="!policy.enabled" 
class="text-muted"><i class="fa fa-square text-muted"></i> Disabled</span>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyEdit.html
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyEdit.html
 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyEdit.html
index e07cb0c..8fe2eb4 100644
--- 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyEdit.html
+++ 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyEdit.html
@@ -41,16 +41,6 @@
                <div class="box-body">
                        <!-- ---------------------- Step Body Start 
---------------------- -->
 
-                       <!-- Step 1: Data Source -->
-                       <!--div ng-show="step === 1">
-                               <div class="form-group">
-                                       <label>Select Data Source</label>
-                                       <select class="form-control" 
ng-model="policy.tags.dataSource">
-                                               <option ng-repeat="dataSource 
in Site.current().dataSrcList" ng-hide="dataSource.hide" 
value="{{dataSource.tags.dataSource}}">{{dataSource.desc || 
dataSource.tags.dataSource}}</option>
-                                       </select>
-                               </div>
-                       </div-->
-
                        <!-- Step 1: Stream -->
                        <div ng-show="step === 1">
                                <div class="pull-right" 
ng-show="policy.__.advanced === undefined">
@@ -61,7 +51,7 @@
                                <div class="form-group">
                                        <label>Select Stream</label>
                                        <select class="form-control" 
ng-model="policy.__.streamName" ng-show="!policy.__.advanced">
-                                               <option ng-repeat="stream in 
dataSources[policy.tags.dataSource]">{{stream.tags.streamName}}</option>
+                                               <option ng-repeat="stream in 
applications[policy.tags.application]">{{stream.tags.streamName}}</option>
                                        </select>
                                        <select class="form-control" 
ng-show="policy.__.advanced" disabled="disabled">
                                                <option>[Advanced Mode]</option>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyList.html
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyList.html
 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyList.html
index 45d7d02..6081636 100644
--- 
a/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyList.html
+++ 
b/eagle-webservice/src/main/webapp/app/public/feature/common/page/policyList.html
@@ -37,7 +37,7 @@
                                </div>
                        </div>
                        <div class="col-xs-3 text-right">
-                               <a class="btn btn-primary" 
href="#/common/policyCreate/{{!dataSource ? '' : '?dataSrc=' + 
dataSource.tags.dataSource}}" ng-show="Auth.isRole('ROLE_ADMIN')">
+                               <a class="btn btn-primary" 
href="#/common/policyCreate/{{!application ? '' : '?app=' + 
application.tags.application}}" ng-show="Auth.isRole('ROLE_ADMIN')">
                                        New Policy
                                        <i class="fa fa-plus-circle"> </i>
                                </a>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/metadata/controller.js
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/metadata/controller.js 
b/eagle-webservice/src/main/webapp/app/public/feature/metadata/controller.js
index 2797223..c17d612 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/metadata/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/metadata/controller.js
@@ -30,7 +30,7 @@
        // =                          Metadata                          =
        // ==============================================================
 
-       // ======================= Policy Summary =======================
+       // ======================= Metadata List ========================
        feature.navItem("streamList", "Metadata", "bullseye");
        feature.controller('streamList', function(PageConfig, Site, $scope, $q, 
Application, Entities) {
                PageConfig.hideSite = true;
@@ -40,25 +40,25 @@
                $scope._streamEntityLock = false;
 
                // =========================================== List 
===========================================
-               var _streamList = Entities.queryEntities("AlertStreamService", 
{dataSource: Application.current().tags.application});
-               var _streamSchemaList = 
Entities.queryEntities("AlertStreamSchemaService", {dataSource: 
Application.current().tags.application});
+               var _streamList = Entities.queryEntities("AlertStreamService", 
{application: Application.current().tags.application});
+               var _streamSchemaList = 
Entities.queryEntities("AlertStreamSchemaService", {application: 
Application.current().tags.application});
                $scope.streamList = _streamList;
                $scope.streamSchemaList = _streamSchemaList;
 
                _streamList._promise.then(function() {
                        $.each(_streamList, function(i, stream) {
                                stream.metaList = [];
-                               $scope.streams[stream.tags.dataSource + "_" + 
stream.tags.streamName] = stream;
+                               $scope.streams[stream.tags.application + "_" + 
stream.tags.streamName] = stream;
                        });
                });
 
                $q.all([_streamList._promise, 
_streamSchemaList._promise]).then(function() {
                        $.each(_streamSchemaList, function(i, meta) {
-                               var _stream = 
$scope.streams[meta.tags.dataSource + "_" + meta.tags.streamName];
+                               var _stream = 
$scope.streams[meta.tags.application + "_" + meta.tags.streamName];
                                if(_stream) {
                                        _stream.metaList.push(meta);
                                } else {
-                                       console.warn("[Meta] Stream not 
match:", meta.tags.dataSource + "_" + meta.tags.streamName);
+                                       console.warn("[Meta] Stream not 
match:", meta.tags.application + "_" + meta.tags.streamName);
                                }
                        });
                });

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/metadata/page/streamList.html
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/metadata/page/streamList.html
 
b/eagle-webservice/src/main/webapp/app/public/feature/metadata/page/streamList.html
index 9218d8d..806a234 100644
--- 
a/eagle-webservice/src/main/webapp/app/public/feature/metadata/page/streamList.html
+++ 
b/eagle-webservice/src/main/webapp/app/public/feature/metadata/page/streamList.html
@@ -31,7 +31,7 @@
                                        Data Source
                                </dt>
                                <dd>
-                                       {{stream.tags.dataSource}}
+                                       {{stream.tags.application}}
                                </dd>
                        </dl>
                        <dl>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-webservice/src/main/webapp/app/public/feature/userProfile/controller.js
----------------------------------------------------------------------
diff --git 
a/eagle-webservice/src/main/webapp/app/public/feature/userProfile/controller.js 
b/eagle-webservice/src/main/webapp/app/public/feature/userProfile/controller.js
index f048a85..ed619d3 100644
--- 
a/eagle-webservice/src/main/webapp/app/public/feature/userProfile/controller.js
+++ 
b/eagle-webservice/src/main/webapp/app/public/feature/userProfile/controller.js
@@ -40,7 +40,7 @@
 
                // ======================================== Algorithms 
========================================
                $scope.algorithmEntity = {};
-               Entities.queryEntities("AlertDefinitionService", {site: 
Site.current().tags.site, dataSource: 
"userProfile"})._promise.then(function(data) {
+               Entities.queryEntities("AlertDefinitionService", {site: 
Site.current().tags.site, application: 
"userProfile"})._promise.then(function(data) {
                        $scope.algorithmEntity = common.getValueByPath(data, 
"obj[0]");
                        $scope.algorithmEntity.policy = 
common.parseJSON($scope.algorithmEntity.policyDef);
                });

Reply via email to