-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d101fa
commit 1db2bf7
Showing
29 changed files
with
604 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Event bus settings | ||
address = ${global.bridge.address} | ||
|
||
# List of mappings between service aliases and datasources. | ||
# You can define here as many service definitions as required for your project. | ||
dataDefinitions = [ | ||
# Definition of the single datasource to be used in the HTML snippets. | ||
# You can define an array of such services here. | ||
{ | ||
# Name of the service that will be used in HTML snippets | ||
# | ||
name = first-service | ||
|
||
# Event bus address of the datasource that is responsible for handling physicall communication | ||
# with a data source | ||
# Remember that this addres should be exacly the same as one defined in datasource config | ||
# | ||
adapter = ${global.bridge.dataSource.http.address} | ||
|
||
# Arbitrary parameters to be send to datasource. | ||
# Keep in mind, the actuall parameters to be send are the params object from HTML snippet | ||
# merged with values defined here. | ||
# | ||
params.path = /service/first.json | ||
cacheKey = first | ||
}, | ||
{ | ||
name = second-service | ||
adapter = ${global.bridge.dataSource.http.address} | ||
params.path = /service/second.json | ||
}, | ||
{ | ||
name = third-service | ||
adapter = ${global.bridge.dataSource.http.address} | ||
params.path = /service/third.json | ||
}, | ||
{ | ||
name = labelsRepository | ||
address = ${global.bridge.dataSource.http.address} | ||
} | ||
] | ||
|
||
# Vert.x event bus delivery options used when communicating with other verticles | ||
# see http://vertx.io/docs/vertx-core/dataobjects.html#DeliveryOptions for the details what can be configured | ||
# | ||
# deliveryOptions {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
########### Modules to start ########### | ||
modules = [ | ||
"dataSourceHttp=io.knotx.databridge.http.HttpDataSourceAdapter" | ||
] | ||
|
||
########### Globals ########### | ||
global { | ||
# Data Bridge globals | ||
bridge { | ||
address = knotx.knot.databridge | ||
dataSource { | ||
http.address = knotx.bridge.datasource.http | ||
} | ||
} | ||
|
||
httpService { | ||
domain = service-mock | ||
port = 3000 | ||
} | ||
} | ||
|
||
########### Modules configurations ########### | ||
config.dataSourceHttp { | ||
options.config { | ||
include required("includes/dataSourceHttp.conf") | ||
} | ||
} |
File renamed without changes.
83 changes: 83 additions & 0 deletions
83
acme-cluster/dataSourceHttp/conf/includes/dataSourceHttp.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Event bus address of the Basic HTTP Datasource | ||
address = ${global.bridge.dataSource.http.address} | ||
|
||
clientOptions { | ||
maxPoolSize = 1000 | ||
idleTimeout = 120 # seconds | ||
|
||
# If your datasources are using SSL you'd need to configure here low level details on how the | ||
# SSL connection is to be maintaned. Currently, if configured all defined in 'datasources' section | ||
# will use SSL | ||
# | ||
# Enable SSL | ||
# ssl = true | ||
# | ||
# Whether all server certificated should be trusted or not (e.g. self-signed certificates) | ||
# trustAll = true | ||
# | ||
# Hostname verification | ||
# verifyHost = false | ||
# | ||
# Enables network activity logger (Netty). Remember you also need to include additional logger | ||
# configuration in the logback config: | ||
# <include resource="io/knotx/logging/logback/netty.xml" /> | ||
# | ||
# logActivity = true | ||
} | ||
|
||
# List of datasource services that are supported by this datasource adapter. | ||
# You can define here as many service definitions as required for your project. | ||
services = [ | ||
{ | ||
# A regexp. | ||
# Any request to the datasource made by the adapter, is being made to the service with a given | ||
# physical conenction details, only if the given path matching this path regexp | ||
# | ||
path = "/.*" | ||
|
||
# A domain or IP of actual HTTP service the adapter will talk to | ||
# | ||
domain = ${global.httpService.domain} | ||
|
||
# HTTP port of the service | ||
# | ||
port = ${global.httpService.port} | ||
|
||
# List of request headers that will be send to the given service endpoint. | ||
# Each header can be use wildcards '*' to generalize list | ||
# E.g. | ||
# allowedRequestHeaders = [ | ||
# "X-.*" | ||
# ] | ||
# By default all requests headers are denied. If you want to enable a desired headers you can | ||
# express it as an array of regexp expressions, e.g. "X-.*" to allow all headers starting | ||
# with "X-", or simply ".*" to allow all headers. | ||
# Be careful what headers you're trying to pass through as some of them might affect the | ||
# communication with the service. | ||
# | ||
allowedRequestHeaders = [ ] | ||
|
||
# Additional request query parameters to be send in each request. | ||
# E.g. | ||
# queryParams { | ||
# type = books | ||
# query = java | ||
# } | ||
# | ||
queryParams {} | ||
|
||
# Additional headers to be send in each request to the service | ||
# E.g: | ||
# additionalHeaders { | ||
# someToken = abxcdsafsfdfes | ||
# } | ||
# | ||
additionalHeaders {} | ||
} | ||
] | ||
|
||
# Statically defined HTTP request header sent in every request to any datasource | ||
customRequestHeader { | ||
name = X-User-Agent | ||
value = Knot.x | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<!-- | ||
Copyright (C) 2018 Knot.x Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="shortcut icon" href="http://cognifide.com/favicon.ico?v=2"/> | ||
<title>Knot.x - Login Step 1</title> | ||
<link href="https://bootswatch.com/4/simplex/bootstrap.min.css" rel="stylesheet"/> | ||
</head> | ||
<body> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="jumbotron"> | ||
<h1> | ||
Sample multi-step form wizard | ||
</h1> | ||
<h2> | ||
Login Form - STEP 1 | ||
</h2> | ||
<p> | ||
<a class="btn btn-primary btn-large" | ||
href="https://github.com/Cognifide/knotx">Learn more</a> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<script data-knotx-knots="form-1,handlebars" | ||
type="text/knotx-snippet"> | ||
{{#if action._result.validationErrors}} | ||
<p class="bg-danger">Email address does not exists</p> | ||
{{/if}} | ||
<p>Please provide your email address</p> | ||
<form data-knotx-action="step1" data-knotx-on-success="/content/login/step2.html" data-knotx-on-error="_self" method="post"> | ||
<input type="email" name="email" value="{{#if action._result.validationError}} {{action._result.form.email}} {{/if}}" /> | ||
<input type="submit" value="Submit"/> | ||
</form> | ||
</script> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="https://code.jquery.com/jquery-2.2.4.min.js" | ||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" | ||
crossorigin="anonymous"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" | ||
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" | ||
crossorigin="anonymous"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.