/**
 * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org)  Apache License, Version 2.0  http://www.apache.org/licenses/LICENSE-2.0
 */

 define(function() {
     var TemplateConfigBlocks = function () {
        this.sampleDatasourceConfig =  'dataSources: \n' +
           '  - name: SIDDHI_TEST_DB \n' +
           '    description: The datasource used for test database \n' +
           '    jndiConfig: \n' +
           '      name: jdbc/SIDDHI_TEST_DB \n' +
           '    definition: \n' +
           '      type: RDBMS \n' +
           '      configuration: \n' +
           '        jdbcUrl: jdbc:mysql://hostname:port/testdb \n' +
           '        username: root \n' +
           '        password: root \n' +
           '        driverClassName: com.mysql.jdbc.Driver \n' +
           '        maxPoolSize: 10 \n' +
           '        idleTimeout: 60000 \n' +
           '        connectionTestQuery: SELECT 1 \n' +
           '        validationTimeout: 30000 \n' +
           '        isAutoCommit: false \n';
        this.sampleMetricsConfig =  'metrics: \n' +
           '  enabled: true \n' +
           'metrics.prometheus: \n' +
           '  reporting: \n' +
           '    prometheus: \n' +
           '      - name: prometheus \n' +
           '        enabled: true \n' +
           '        serverURL: "http://localhost:9005" \n';
        this.sampleExtensionsConfig =  'extensions: \n' +
           '  - \n' +
           '    extension: \n' +
           '      name: extension_name \n' +
           '      namespace: extension_namespace \n' +
           '      properties: \n' +
           '        key: value \n';
        this.sampleRefsConfig = 'refs: \n' +
           '  - \n' +
           '    ref: \n' +
           '      name: \'name\' \n' +
           '      type: \'type\' \n' +
           '      properties: \n' +
           '        property1: value1 \n' +
           '        property2: value2 \n';
        this.sampleTransportConfig =  'transports:  \n' +
           '  databridge: \n' +
           '  # Configuration used for the databridge communication \n' +
           '    listenerConfigurations: \n' +
           '      workerThreads: 10 \n' +
           '    senderConfigurations: \n' +
           '    # Configuration of the Data Agents - to publish events through databridge \n' +
           '      agents: \n' +
           '          agentConfiguration: \n' +
           '            name: Thrift \n' +
           '            dataEndpointClass: org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint \n';
     }
     TemplateConfigBlocks.prototype.constructor = TemplateConfigBlocks;
     TemplateConfigBlocks.prototype.getTemplatedConfig = function () {
        var self = this;
        return {
            "sampleDatasourceConfig": self.sampleDatasourceConfig,
            "sampleMetricsConfig": self.sampleMetricsConfig,
            "sampleExtensionsConfig": self.sampleExtensionsConfig,
            "sampleRefsConfig": self.sampleRefsConfig,
            "sampleTransportConfig": self.sampleTransportConfig
        }
     }
     return TemplateConfigBlocks;
 });
@@ -1982,17 +1982,16 @@
 nsports:
- 
  %5Cn' +%0A 
@@ -2003,26 +2003,20 @@
      '  
-databridge
+http
 : %5Cn' +%0A
@@ -2029,18 +2029,26 @@
      '  
-#
  
+ listener
 Configur
@@ -2056,92 +2056,77 @@
 tion
- used for the databridge communication %5Cn' +%0A           '    listenerConfigurations:
+s: %5Cn' +%0A           '      -  %5Cn' +%0A           '        id: %22default%22
  %5Cn'
@@ -2150,25 +2150,25 @@
     
-workerThreads: 10
+  host: %220.0.0.0%22
  %5Cn'
@@ -2190,29 +2190,22 @@
     
-senderConfigurations:
+    port: 9090
  %5Cn'
@@ -2227,81 +2227,98 @@
     
-# Configuration of the Data Agents - to publish events through databridge
+  -  %5Cn' +%0A           '        id: %22msf4j-https%22 %5Cn' +%0A           '        host: %220.0.0.0%22
  %5Cn'
@@ -2342,15 +2342,20 @@
     
-agents:
+  port: 9443
  %5Cn'
@@ -2381,72 +2381,147 @@
     
-  agentConfiguration: %5Cn' +%0A           '            name: Thrift
+scheme: https %5Cn' +%0A           '        sslConfig: %5Cn' +%0A           '          keyStore: %22$%7Bcarbon.home%7D/resources/security/wso2carbon.jks%22
  %5Cn'
@@ -2549,96 +2549,279 @@
     
-  dataEndpointClass: org.
+keyStorePassword: 
 wso2
-.
 carbon
-.databridge.agent.endpoint.thrift.ThriftDataEndpoint
+ %5Cn' +%0A           '    transportProperties: %5Cn' +%0A           '      - name: %22server.bootstrap.socket.timeout%22 %5Cn' +%0A           '        value: 60 %5Cn' +%0A           '      - name: %22latency.metrics.enabled%22 %5Cn' +%0A           '        value: false 
  %5Cn'

Change the transports block