pact_broker 2.93.2 → 2.93.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/pact_broker/badges/service.rb +1 -1
- data/lib/pact_broker/build_http_options.rb +4 -12
- data/lib/pact_broker/certificates/service.rb +3 -3
- data/lib/pact_broker/domain/webhook.rb +1 -1
- data/lib/pact_broker/domain/webhook_request.rb +2 -2
- data/lib/pact_broker/version.rb +1 -1
- data/lib/pact_broker/webhooks/execution_configuration.rb +8 -0
- data/lib/pact_broker/webhooks/execution_configuration_creator.rb +5 -0
- data/lib/pact_broker/webhooks/webhook_request_template.rb +4 -2
- data/vendor/hal-browser/browser.html +107 -87
- data/vendor/hal-browser/js/hal/http/client.js +1 -1
- data/vendor/hal-browser/js/hal/views/browser.js +1 -1
- data/vendor/hal-browser/js/hal/views/embedded_resource.js +2 -2
- data/vendor/hal-browser/js/hal/views/explorer.js +1 -1
- data/vendor/hal-browser/js/hal/views/inspector.js +1 -1
- data/vendor/hal-browser/login.html +8 -9
- data/vendor/hal-browser/styles.css +6 -9
- data/vendor/hal-browser/vendor/bootstrap-icons-1.7.2/bootstrap-icons.css +1556 -0
- data/vendor/hal-browser/vendor/bootstrap-icons-1.7.2/bootstrap-icons.json +1537 -0
- data/vendor/hal-browser/vendor/bootstrap-icons-1.7.2/bootstrap-icons.scss +3097 -0
- data/vendor/hal-browser/vendor/bootstrap-icons-1.7.2/file-text-fill.svg +3 -0
- data/vendor/hal-browser/vendor/bootstrap-icons-1.7.2/fonts/bootstrap-icons.woff +0 -0
- data/vendor/hal-browser/vendor/bootstrap-icons-1.7.2/fonts/bootstrap-icons.woff2 +0 -0
- data/vendor/hal-browser/vendor/css/bootstrap.css +8530 -4374
- data/vendor/hal-browser/vendor/js/URI.min.js +92 -83
- data/vendor/hal-browser/vendor/js/bootstrap.js +3825 -1745
- data/vendor/hal-browser/vendor/js/jquery-3.6.0.min.js +2 -0
- data/vendor/hal-browser/vendor/js/underscore.js +6 -1227
- metadata +10 -7
- data/vendor/hal-browser/vendor/css/bootstrap-responsive.css +0 -1109
- data/vendor/hal-browser/vendor/js/jquery-1.10.2.js +0 -9789
- data/vendor/hal-browser/vendor/js/jquery-1.10.2.min.js +0 -6
- data/vendor/hal-browser/vendor/js/jquery-1.10.2.min.map +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 945a04d666baecd644bffd53da2de97fad0af2cc6c1170ed7dabaa657ef71184
|
4
|
+
data.tar.gz: 1eec76fd7c899f5547e3cd6c937589c0976c98642ee2d33be753cb4739e2ab61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5877ebb9cf131b6c8897c39c639e279daa5d785e252184f2cffbbd5376e18ae9936f11bcb879e08745ec63f00f5c4d65b4bc77ef1f93d64c5193c3b86810534c
|
7
|
+
data.tar.gz: 2ed197a1ee3e6050688ed6074149210b7a8188fa3e60b68c12155f4b26eb3fe5def95ae4e13bc994f42a802b93540738240b59119b51b59bd2bfee3f9d030940
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
<a name="v2.93.3"></a>
|
2
|
+
### v2.93.3 (2022-02-02)
|
3
|
+
|
4
|
+
#### Bug Fixes
|
5
|
+
|
6
|
+
* ensure webhook_certificates setting is honoured in webhook ([7933a526](/../../commit/7933a526))
|
7
|
+
* ensure disable_ssl_verification setting is honoured in webhook ([08bc758c](/../../commit/08bc758c))
|
8
|
+
* ensure webhook_certificates setting is honoured in webhook ([8a720cdb](/../../commit/8a720cdb))
|
9
|
+
* ensure disable_ssl_verification setting is honoured in webhook ([0728b3d7](/../../commit/0728b3d7))
|
10
|
+
|
11
|
+
* **hal-browser**
|
12
|
+
* fixing vulnerability by upgrading HAL browser dependencies ([a6b06f66](/../../commit/a6b06f66))
|
13
|
+
|
1
14
|
<a name="v2.93.2"></a>
|
2
15
|
### v2.93.2 (2021-12-23)
|
3
16
|
|
@@ -132,7 +132,7 @@ module PactBroker
|
|
132
132
|
with_cache uri do
|
133
133
|
request = Net::HTTP::Get.new(uri)
|
134
134
|
options = {read_timeout: 3, open_timeout: 1, ssl_timeout: 1, continue_timeout: 1}
|
135
|
-
options.merge! PactBroker::BuildHttpOptions.call(uri)
|
135
|
+
options.merge! PactBroker::BuildHttpOptions.call(uri, disable_ssl_verification: PactBroker.configuration.disable_ssl_verification)
|
136
136
|
|
137
137
|
Net::HTTP.start(uri.hostname, uri.port, :ENV, options) do |http|
|
138
138
|
http.request request
|
@@ -4,14 +4,14 @@ module PactBroker
|
|
4
4
|
class BuildHttpOptions
|
5
5
|
extend PactBroker::Services
|
6
6
|
|
7
|
-
def self.call
|
7
|
+
def self.call uri, disable_ssl_verification: false, cert_store: nil
|
8
8
|
uri = URI(uri)
|
9
9
|
options = {}
|
10
|
-
|
10
|
+
|
11
11
|
if uri.scheme == "https"
|
12
12
|
options[:use_ssl] = true
|
13
|
-
options[:cert_store] = cert_store
|
14
|
-
if disable_ssl_verification
|
13
|
+
options[:cert_store] = cert_store if cert_store
|
14
|
+
if disable_ssl_verification
|
15
15
|
options[:verify_mode] = OpenSSL::SSL::VERIFY_NONE
|
16
16
|
else
|
17
17
|
options[:verify_mode] = OpenSSL::SSL::VERIFY_PEER
|
@@ -19,14 +19,6 @@ module PactBroker
|
|
19
19
|
end
|
20
20
|
options
|
21
21
|
end
|
22
|
-
|
23
|
-
def self.disable_ssl_verification?
|
24
|
-
PactBroker.configuration.disable_ssl_verification
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.cert_store
|
28
|
-
certificate_service.cert_store
|
29
|
-
end
|
30
22
|
end
|
31
23
|
end
|
32
24
|
|
@@ -15,7 +15,7 @@ module PactBroker
|
|
15
15
|
cert_store.set_default_paths
|
16
16
|
find_all_certificates.each do | certificate |
|
17
17
|
begin
|
18
|
-
logger.debug("Loading certificate #{certificate.subject} in to cert store")
|
18
|
+
logger.debug("Loading certificate for subject #{certificate.subject} and issuer #{certificate.issuer} in to cert store")
|
19
19
|
cert_store.add_cert(certificate)
|
20
20
|
rescue StandardError => e
|
21
21
|
logger.warn("Error adding certificate object #{certificate} to store", e)
|
@@ -42,7 +42,7 @@ module PactBroker
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def certificates_from_config
|
45
|
-
PactBroker.configuration.webhook_certificates.select{| c| c[:content] || c[:path] }.collect do | certificate_config, i |
|
45
|
+
PactBroker.configuration.webhook_certificates.select{| c| c[:content] || c[:path] }.collect.with_index do | certificate_config, i |
|
46
46
|
load_certificate_config(certificate_config, i)
|
47
47
|
end.flatten.compact
|
48
48
|
end
|
@@ -54,7 +54,7 @@ module PactBroker
|
|
54
54
|
begin
|
55
55
|
OpenSSL::X509::Certificate.new(c)
|
56
56
|
rescue StandardError => e
|
57
|
-
logger.warn("Error creating certificate object from
|
57
|
+
logger.warn("Error creating certificate object from webhook_certificates at index #{i} with description #{certificate_config[:description]}", e)
|
58
58
|
nil
|
59
59
|
end
|
60
60
|
end
|
@@ -50,7 +50,7 @@ module PactBroker
|
|
50
50
|
def execute pact, verification, event_context, options
|
51
51
|
logger.info "Executing #{self} event_context=#{event_context}"
|
52
52
|
template_params = template_parameters(pact, verification, event_context, options)
|
53
|
-
webhook_request = request.build(template_params, options.
|
53
|
+
webhook_request = request.build(template_params, options.slice(:user_agent, :disable_ssl_verification, :cert_store))
|
54
54
|
http_response, error = execute_request(webhook_request)
|
55
55
|
success = success?(http_response, options)
|
56
56
|
http_request = webhook_request.http_request
|
@@ -18,7 +18,7 @@ module PactBroker
|
|
18
18
|
|
19
19
|
HEADERS_TO_REDACT = [/authorization/i, /token/i]
|
20
20
|
|
21
|
-
attr_accessor :method, :url, :headers, :body, :username, :password, :uuid, :user_agent
|
21
|
+
attr_accessor :method, :url, :headers, :body, :username, :password, :uuid, :user_agent, :disable_ssl_verification, :cert_store
|
22
22
|
|
23
23
|
# Reform gets confused by the :method method, as :method is a standard
|
24
24
|
# Ruby method.
|
@@ -47,7 +47,7 @@ module PactBroker
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def execute
|
50
|
-
options = PactBroker::BuildHttpOptions.call(uri).merge(read_timeout: 15, open_timeout: 15)
|
50
|
+
options = PactBroker::BuildHttpOptions.call(uri, disable_ssl_verification: disable_ssl_verification, cert_store: cert_store).merge(read_timeout: 15, open_timeout: 15)
|
51
51
|
req = http_request
|
52
52
|
Net::HTTP.start(uri.hostname, uri.port, :ENV, options) do |http|
|
53
53
|
http.request req
|
data/lib/pact_broker/version.rb
CHANGED
@@ -41,6 +41,14 @@ module PactBroker
|
|
41
41
|
with_updated_attribute(user_agent: value)
|
42
42
|
end
|
43
43
|
|
44
|
+
def with_disable_ssl_verification(value)
|
45
|
+
with_updated_attribute(disable_ssl_verification: value)
|
46
|
+
end
|
47
|
+
|
48
|
+
def with_cert_store(value)
|
49
|
+
with_updated_attribute(cert_store: value)
|
50
|
+
end
|
51
|
+
|
44
52
|
def webhook_context
|
45
53
|
self[:webhook_context]
|
46
54
|
end
|
@@ -1,15 +1,20 @@
|
|
1
1
|
require "pact_broker/configuration"
|
2
|
+
require "pact_broker/services"
|
2
3
|
require "pact_broker/webhooks/execution_configuration"
|
3
4
|
|
4
5
|
module PactBroker
|
5
6
|
module Webhooks
|
6
7
|
class ExecutionConfigurationCreator
|
8
|
+
extend PactBroker::Services
|
9
|
+
|
7
10
|
def self.call(resource)
|
8
11
|
PactBroker::Webhooks::ExecutionConfiguration.new
|
9
12
|
.with_show_response(PactBroker.configuration.show_webhook_response?)
|
10
13
|
.with_retry_schedule(PactBroker.configuration.webhook_retry_schedule)
|
11
14
|
.with_http_success_codes(PactBroker.configuration.webhook_http_code_success)
|
12
15
|
.with_user_agent(PactBroker.configuration.user_agent)
|
16
|
+
.with_disable_ssl_verification(PactBroker.configuration.disable_ssl_verification)
|
17
|
+
.with_cert_store(certificate_service.cert_store)
|
13
18
|
.with_webhook_context(base_url: resource.base_url)
|
14
19
|
end
|
15
20
|
end
|
@@ -27,7 +27,7 @@ module PactBroker
|
|
27
27
|
@headers = Rack::Utils::HeaderHash.new(attributes[:headers] || {})
|
28
28
|
end
|
29
29
|
|
30
|
-
def build(template_params, user_agent)
|
30
|
+
def build(template_params, user_agent: nil, disable_ssl_verification: false, cert_store: nil)
|
31
31
|
attributes = {
|
32
32
|
method: http_method,
|
33
33
|
url: build_url(template_params),
|
@@ -36,7 +36,9 @@ module PactBroker
|
|
36
36
|
password: build_string(password, template_params),
|
37
37
|
uuid: uuid,
|
38
38
|
body: build_body(template_params),
|
39
|
-
user_agent: user_agent
|
39
|
+
user_agent: user_agent,
|
40
|
+
disable_ssl_verification: disable_ssl_verification,
|
41
|
+
cert_store: cert_store
|
40
42
|
}
|
41
43
|
PactBroker::Domain::WebhookRequest.new(attributes)
|
42
44
|
end
|
@@ -3,46 +3,41 @@
|
|
3
3
|
<meta charset="utf-8">
|
4
4
|
<title>The HAL Browser</title>
|
5
5
|
<link rel="stylesheet" media="screen" href="vendor/css/bootstrap.css" />
|
6
|
-
<
|
7
|
-
|
8
|
-
padding-top: 60px;
|
9
|
-
padding-bottom: 40px;
|
10
|
-
}
|
6
|
+
<link rel="stylesheet" href="vendor/bootstrap-icons-1.7.2/bootstrap-icons.css">
|
7
|
+
<style type="text/css">
|
11
8
|
.sidebar-nav {
|
12
9
|
padding: 9px 0;
|
13
10
|
}
|
14
11
|
</style>
|
15
|
-
<link rel="stylesheet" media="screen" href="vendor/css/bootstrap
|
12
|
+
<link rel="stylesheet" media="screen" href="vendor/css/bootstrap.css" />
|
16
13
|
<link rel="stylesheet" media="screen" href="styles.css" />
|
17
14
|
</head>
|
18
15
|
|
19
|
-
|
16
|
+
<body>
|
20
17
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<li><a href="https://github.com/mikekelly/hal-browser">About The HAL Browser</a></li>
|
29
|
-
<li><a href="/" id="pactBrokerHomeLink">Pact Broker Home</a></li> <!-- pact_broker -->
|
30
|
-
</ul>
|
31
|
-
</div>
|
32
|
-
</div>
|
33
|
-
</div>
|
18
|
+
<nav class="navbar sticky-top navbar-expand-md navbar-light bg-light">
|
19
|
+
<div class="collapse navbar-collapse">
|
20
|
+
<ul class="navbar-nav">
|
21
|
+
<li class="nav-item"><a class="nav-link" href="#/" id="entryPointLink">Go To Entry Point</a></li>
|
22
|
+
<li class="nav-item"><a class="nav-link" href="https://github.com/mikekelly/hal-browser">About The HAL Browser</a></li>
|
23
|
+
<li class="nav-item"><a class="nav-link" id="pactBrokerHomeLink" href="/">Pact Broker Home</a></li> <!-- pact_broker -->
|
24
|
+
</ul>
|
34
25
|
</div>
|
26
|
+
</nav>
|
35
27
|
|
36
|
-
|
28
|
+
<div id="browser" class="container-fluid"></div>
|
37
29
|
|
38
30
|
<script id="location-bar-template" type="text/template">
|
39
|
-
<form>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
</
|
31
|
+
<form>
|
32
|
+
<div class="input-group mb-3">
|
33
|
+
<input type="text" class="form-control" id="appendedInputButton" type="text" value="<%= _.escape(url) %>">
|
34
|
+
<div class="input-group-append">
|
35
|
+
<button class="btn btn-outline-secondary input-group-text" type="submit">
|
36
|
+
Go!
|
37
|
+
</button>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</form>
|
46
41
|
</script>
|
47
42
|
|
48
43
|
<script id="links-template" type="text/template">
|
@@ -50,12 +45,12 @@
|
|
50
45
|
<table class="table">
|
51
46
|
<thead>
|
52
47
|
<tr>
|
53
|
-
<th>rel</th>
|
54
|
-
<th>title</th>
|
55
|
-
<th>name / index</th>
|
56
|
-
<th>docs</th>
|
57
|
-
<th>GET</th>
|
58
|
-
<th>NON-GET</th>
|
48
|
+
<th scope="col">rel</th>
|
49
|
+
<th scope="col">title</th>
|
50
|
+
<th scope="col">name / index</th>
|
51
|
+
<th scope="col">docs</th>
|
52
|
+
<th scope="col">GET</th>
|
53
|
+
<th scope="col">NON-GET</th>
|
59
54
|
</tr>
|
60
55
|
</thead>
|
61
56
|
<tbody>
|
@@ -69,14 +64,14 @@
|
|
69
64
|
<td><%- link.name ? 'name: ' + link.name : 'index: ' + i %></a></td>
|
70
65
|
<td>
|
71
66
|
<% if (HAL.isUrl(rel)) { %>
|
72
|
-
<a class="dox" href="<%= HAL.normalizeUrl(HAL.buildUrl(rel)) %>"><i class="
|
67
|
+
<a class="dox btn" href="<%= HAL.normalizeUrl(HAL.buildUrl(rel)) %>"><i class="bi-file-text-fill" style="font-size: large"></i></a>
|
73
68
|
<% } %>
|
74
69
|
</td>
|
75
70
|
<td>
|
76
71
|
<% if (link.templated === true) { %>
|
77
|
-
<a class="query btn btn-success" href="<%= HAL.normalizeUrl(link.href) %>" title="Query URI template"
|
72
|
+
<a class="query btn btn-success" href="<%= HAL.normalizeUrl(link.href) %>" title="Query URI template">?</a>
|
78
73
|
<% } else { %>
|
79
|
-
<a class="follow btn btn-success" href="<%= HAL.normalizeUrl(link.href) %>" title="Follow link"
|
74
|
+
<a class="follow btn btn-success" href="<%= HAL.normalizeUrl(link.href) %>" title="Follow link">➜</a>
|
80
75
|
<% } %>
|
81
76
|
</td>
|
82
77
|
<td>
|
@@ -92,14 +87,14 @@
|
|
92
87
|
<td><%- obj.name || '' %></td>
|
93
88
|
<td>
|
94
89
|
<% if (HAL.isUrl(rel)) { %>
|
95
|
-
<a class="dox" href="<%= HAL.normalizeUrl(HAL.buildUrl(rel)) %>"><i class="
|
90
|
+
<a class="dox btn" href="<%= HAL.normalizeUrl(HAL.buildUrl(rel)) %>"><i class="bi-file-text-fill" style="font-size: large"></i></a>
|
96
91
|
<% } %>
|
97
92
|
</td>
|
98
93
|
<td>
|
99
94
|
<% if (obj.templated === true) { %>
|
100
|
-
<a class="query btn btn-success" href="<%= HAL.normalizeUrl(obj.href) %>" title="Query URI template"
|
95
|
+
<a class="query btn btn-success" href="<%= HAL.normalizeUrl(obj.href) %>" title="Query URI template">?</a>
|
101
96
|
<% } else { %>
|
102
|
-
<a class="follow btn btn-success" href="<%= HAL.normalizeUrl(obj.href) %>" title="Follow link"
|
97
|
+
<a class="follow btn btn-success" href="<%= HAL.normalizeUrl(obj.href) %>" title="Follow link">➜</a>
|
103
98
|
<% } %>
|
104
99
|
</td>
|
105
100
|
<td>
|
@@ -114,17 +109,25 @@
|
|
114
109
|
|
115
110
|
<script id="properties-template" type="text/template">
|
116
111
|
<h2>Properties</h2>
|
117
|
-
<
|
112
|
+
<div class="card read-only">
|
113
|
+
<div class="card-body">
|
114
|
+
<pre><%= properties %></pre>
|
115
|
+
</div>
|
116
|
+
</div>
|
118
117
|
</script>
|
119
118
|
|
120
119
|
<script id="request-headers-template" type="text/template">
|
121
120
|
<h2>Custom Request Headers</h2>
|
122
|
-
<
|
121
|
+
<div class="input-group">
|
122
|
+
<textarea class="form-control"></textarea>
|
123
|
+
</div>
|
123
124
|
</script>
|
124
125
|
|
125
126
|
<script id="response-headers-template" type="text/template">
|
126
127
|
<h2>Response Headers</h2>
|
127
|
-
<
|
128
|
+
<div class="card read-only">
|
129
|
+
<div class="card-body">
|
130
|
+
<pre><%= status.code %> <%= status.text %>
|
128
131
|
|
129
132
|
<% _.each(headers, function(value, name) {
|
130
133
|
%><%= _.escape(name) %>: <%
|
@@ -136,65 +139,82 @@
|
|
136
139
|
%></a><%
|
137
140
|
} %>
|
138
141
|
<% }) %></pre>
|
142
|
+
</div>
|
143
|
+
</div>
|
139
144
|
</script>
|
140
145
|
|
141
146
|
<script id="response-body-template" type="text/template">
|
142
147
|
<h2>Response Body</h2>
|
143
|
-
<
|
148
|
+
<div class="card read-only">
|
149
|
+
<div class="card-body">
|
150
|
+
<pre><%= _.escape(body) %></pre>
|
151
|
+
</div>
|
152
|
+
</div>
|
144
153
|
</script>
|
145
154
|
|
146
155
|
<script id="query-uri-template" type="text/template">
|
147
|
-
<div class="modal-
|
148
|
-
<
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
156
|
+
<div class="modal-dialog modal-dialog-centered">
|
157
|
+
<div class="modal-content">
|
158
|
+
<div class="modal-header">
|
159
|
+
<h5>Expand URI Template</h5>
|
160
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
161
|
+
</div>
|
162
|
+
<form id="query" action="<%= href %>">
|
163
|
+
<div class="modal-body">
|
164
|
+
<label for="uri">URI Template:</label>
|
165
|
+
<div class="card read-only" id="uri">
|
166
|
+
<div class="card-body">
|
167
|
+
<pre><%- href %></pre>
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
<label for="input">Input (JSON):</label>
|
171
|
+
<textarea class="form-control" id="input"><%= input %></textarea>
|
172
|
+
<label for="preview">Expanded URI:</label>
|
173
|
+
<div class="card read-only" id="preview">
|
174
|
+
<div class="card-body">
|
175
|
+
<pre class="preview"> </pre>
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
<div class="modal-footer">
|
180
|
+
<button type="submit" class="btn btn-primary">Follow URI</button>
|
181
|
+
</div>
|
182
|
+
</form>
|
164
183
|
</div>
|
165
|
-
</
|
184
|
+
</div>
|
166
185
|
</script>
|
167
186
|
|
168
|
-
|
169
187
|
<script id="non-safe-request-template" type="text/template">
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
<
|
188
|
+
<div class="modal-dialog modal-dialog-centered">
|
189
|
+
<div class="modal-content">
|
190
|
+
<div class="modal-header">
|
191
|
+
<h5 class="modal-title">Make a NON-GET request</h5>
|
192
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
193
|
+
</div>
|
194
|
+
<form class="non-safe" action="<%= href %>">
|
195
|
+
<div class="modal-body">
|
196
|
+
<label for="url">Target URI</label>
|
197
|
+
<input name="url" type="text" class="url form-control" id="url" value="<%= href %>" />
|
198
|
+
<label for="method">Method:</label>
|
199
|
+
<input name="method" type="text" class="method form-control" id="method" value="POST" />
|
200
|
+
<label for="headers">Headers:</label>
|
201
|
+
<textarea name="headers" class="headers form-control" style="height: 100px" id="headers">
|
183
202
|
Content-Type: application/json
|
184
203
|
<%= user_defined_headers %>
|
185
|
-
</textarea>
|
186
|
-
|
187
|
-
<textarea name="body" class="body" style="height: 200px">
|
204
|
+
</textarea>
|
205
|
+
<label for="body">Body:</label>
|
206
|
+
<textarea name="body" class="body form-control" style="height: 200px" id="body">
|
188
207
|
{
|
189
208
|
|
190
209
|
}
|
191
|
-
</textarea>
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
210
|
+
</textarea>
|
211
|
+
</div>
|
212
|
+
<div class="modal-footer">
|
213
|
+
<button type="submit" class="btn btn-primary">Make Request</button>
|
214
|
+
</div>
|
215
|
+
</form>
|
216
|
+
</div>
|
196
217
|
</div>
|
197
|
-
</form>
|
198
218
|
</script>
|
199
219
|
|
200
220
|
<script id="embedded-resources-template" type="text/template">
|
@@ -214,7 +234,7 @@ Content-Type: application/json
|
|
214
234
|
</div>
|
215
235
|
</script>
|
216
236
|
|
217
|
-
<script src="vendor/js/jquery-
|
237
|
+
<script src="vendor/js/jquery-3.6.0.min.js"></script>
|
218
238
|
<script src="vendor/js/underscore.js"></script>
|
219
239
|
<script src="vendor/js/backbone.js"></script>
|
220
240
|
<script src="vendor/js/uritemplates.js"></script>
|
@@ -260,4 +280,4 @@ Content-Type: application/json
|
|
260
280
|
|
261
281
|
$('#pactBrokerHomeLink').attr('href', baseUrl); //pact_broker
|
262
282
|
</script>
|
263
|
-
</body>
|
283
|
+
</body>
|
@@ -21,7 +21,7 @@ HAL.Views.EmbeddedResource = Backbone.View.extend({
|
|
21
21
|
|
22
22
|
onToggleClick: function(e) {
|
23
23
|
e.preventDefault();
|
24
|
-
this.$accordionBody.
|
24
|
+
this.$accordionBody.toggle();
|
25
25
|
return false;
|
26
26
|
},
|
27
27
|
|
@@ -53,7 +53,7 @@ HAL.Views.EmbeddedResource = Backbone.View.extend({
|
|
53
53
|
$inner.append(embeddedResourcesView.el);
|
54
54
|
}
|
55
55
|
|
56
|
-
this.$accordionBody = $('<div class="accordion-body
|
56
|
+
this.$accordionBody = $('<div class="accordion-body"></div>');
|
57
57
|
this.$accordionBody.append($inner)
|
58
58
|
|
59
59
|
this.$el.append(this.$accordionBody);
|
@@ -5,7 +5,6 @@
|
|
5
5
|
<title>Sign in - HAL Browser</title>
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
7
|
<link href="vendor/css/bootstrap.css" rel="stylesheet">
|
8
|
-
<link href="vendor/css/bootstrap-responsive.css" rel="stylesheet">
|
9
8
|
<style type="text/css">
|
10
9
|
body {
|
11
10
|
padding-top: 40px;
|
@@ -13,20 +12,17 @@
|
|
13
12
|
background-color: #f5f5f5;
|
14
13
|
}
|
15
14
|
.form-signin {
|
16
|
-
max-width:
|
15
|
+
max-width: 350px;
|
17
16
|
padding: 19px 29px 29px;
|
18
17
|
margin: 0 auto 20px;
|
19
18
|
background-color: #fff;
|
20
19
|
border: 1px solid #e5e5e5;
|
21
|
-
-webkit-border-radius: 5px;
|
22
|
-
-moz-border-radius: 5px;
|
23
20
|
border-radius: 5px;
|
24
|
-
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
25
|
-
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
26
21
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
22
|
+
text-align: center;
|
27
23
|
}
|
28
24
|
.form-signin .form-signin-heading {
|
29
|
-
margin-bottom:
|
25
|
+
margin-bottom: 40px;
|
30
26
|
}
|
31
27
|
.form-signin input[type="text"], .form-signin input[type="password"] {
|
32
28
|
font-size: 16px;
|
@@ -34,8 +30,11 @@
|
|
34
30
|
margin-bottom: 15px;
|
35
31
|
padding: 7px 9px;
|
36
32
|
}
|
33
|
+
.form-signin .form-signin-btn {
|
34
|
+
margin-top: 25px;
|
35
|
+
}
|
37
36
|
</style>
|
38
|
-
<script src="vendor/js/jquery-
|
37
|
+
<script src="vendor/js/jquery-3.6.0.min.js"></script>
|
39
38
|
<script src="vendor/js/bootstrap.js"></script>
|
40
39
|
<script>
|
41
40
|
$(document).ready(function() {
|
@@ -69,7 +68,7 @@
|
|
69
68
|
<input type="text" class="input-block-level" placeholder="Client Secret" id="clientsecret">
|
70
69
|
<input type="text" class="input-block-level" placeholder="Username" id="username">
|
71
70
|
<input type="password" class="input-block-level" placeholder="Password" id="password">
|
72
|
-
<button type="submit" class="btn btn-large btn-primary" id="login">Sign in</button>
|
71
|
+
<button type="submit" class="btn btn-large btn-primary form-signin-btn" id="login">Sign in</button>
|
73
72
|
</form>
|
74
73
|
</div>
|
75
74
|
</body>
|
@@ -29,8 +29,7 @@ html, body, #browser, .hal-browser { height: 100%; }
|
|
29
29
|
.inspector { height: 100%; }
|
30
30
|
|
31
31
|
.documentation { height: 100%; }
|
32
|
-
.documentation iframe { width: 100%; height: 100%; }
|
33
|
-
.documentation iframe { min-height: 600px } /* pact_broker Beth: don't know why we need this, it used to display full height without setting a min-height. No idea what changed. */
|
32
|
+
.documentation iframe { width: 100%; height: 100%; border-color: transparent;}
|
34
33
|
|
35
34
|
.modal input, .modal textarea {
|
36
35
|
width: 90%;
|
@@ -40,6 +39,10 @@ html, body, #browser, .hal-browser { height: 100%; }
|
|
40
39
|
height: 100px;
|
41
40
|
}
|
42
41
|
|
42
|
+
.read-only {
|
43
|
+
background-color: #f5f5f5 !important;
|
44
|
+
}
|
45
|
+
|
43
46
|
.links .btn {
|
44
47
|
padding: 2px 5px 2px;
|
45
48
|
font-size: 12px;
|
@@ -47,11 +50,7 @@ html, body, #browser, .hal-browser { height: 100%; }
|
|
47
50
|
}
|
48
51
|
|
49
52
|
body table.table {
|
50
|
-
font-size:
|
51
|
-
}
|
52
|
-
|
53
|
-
body table.table td:nth-child(3) {
|
54
|
-
word-wrap: break-word;
|
53
|
+
font-size: 14px;
|
55
54
|
}
|
56
55
|
|
57
56
|
.location-bar-container {
|
@@ -74,9 +73,7 @@ body table.table td:nth-child(3) {
|
|
74
73
|
}
|
75
74
|
.embedded-resource-title {
|
76
75
|
font-style: italic;
|
77
|
-
word-wrap: break-word;
|
78
76
|
}
|
79
|
-
|
80
77
|
.embedded-resource-title:before {
|
81
78
|
content: "\"";
|
82
79
|
}
|