-
Notifications
You must be signed in to change notification settings - Fork 32
/
index.html
352 lines (318 loc) · 12.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<!--
JBoss, Home of Professional Open Source
Copyright 2016, Red Hat, Inc. and/or its affiliates, and individual
contributors by the @authors tag. See the copyright.txt in the
distribution for a full listing of individual contributors.
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>
<title>Microservices Frontend</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- PatternFly Styles -->
<!-- Note: No other CSS files are needed regardless of what other JS packages located in patternfly/components that you decide to pull in -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/patternfly/3.23.0/css/patternfly.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/patternfly/3.23.0/css/patternfly-additions.min.css" />
<!-- jQuery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- Keycloak JS -->
<script src="node_modules/keycloak-js/dist/keycloak.js"></script>
</head>
<body>
<!-- Black Header -->
<nav class="navbar navbar-default navbar-pf" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="/">Red Hat - Hello world MSA (Microservices Architecture) </a>
</div>
<!-- Nav tabs -->
<ul class="nav navbar-nav navbar-primary" id="mytabs">
{{#sso}}
<li role="presentation" class="active"><a href="#sso">SSO</a></li>
{{/sso}}
{{#threescale}}
<li role="presentation"><a href="#apimanagement">API Management</a></li>
{{/threescale}}
<li role="presentation"><a href="#browser">Browser as a client</a></li>
<li role="presentation"><a href="#apigateway">API Gateway Pattern</a></li>
<li role="presentation"><a href="#servicechain">Service chaining</a></li>
{{#hystrix}}
<li role="presentation"><a href="#hystrix">Hystrix Dashboard</a></li>
{{/hystrix}}
{{#jaeger}}
<li role="presentation"><a href="#jaeger">Jaeger Dashboard</a></li>
{{/jaeger}}
</ul>
</nav>
<div class="container-fluid">
<!-- Tab panes -->
<div class="tab-content">
<!-- Tab SSO Dashaboard -->
{{#sso}}
<div role="tabpanel" class="tab-pane active" id="sso">
<div class="page-header page-header-bleed-right">
<div class="actions pull-right">
<a id="refresh-sso" href="#"><span class="pficon pficon-refresh"></span>Refresh Results</a>
|
<a id="show-login-link" style="display: none; cursor: pointer;" ref="#" onclick="keycloak.login()"><span class="pficon pficon-user"></span>Login</a>
<a id="show-logout-link" style="display: none; cursor: pointer;" href="#" onclick="keycloak.logout()"><span class="pficon pficon-import"></span>Logout</a>
|
<span id="login-status"></span>
</div>
<h1>Using SSO Client</h1>
</div>
<div id="tab-sso-content" style="width: 45%; float: left;">
<div class="row">
<div class="col-sm-6 ">
<!-- Hola Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Hola Secured</h3>
(Quarkus / Microprofile)
</div>
<div id="hola-service-secured" class="panel-body">Unauthorized</div>
</div>
</div>
<div class=" col-sm-6 ">
<!-- Olá Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Olá Secured</h3>
(Spring Boot)
</div>
<div id="ola-service-secured" class="panel-body">Unauthorized</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 ">
<!-- Bonjour Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Bonjour Secured</h3>
(NodeJS / Express)
</div>
<div id="bonjour-service-secured" class="panel-body">Unauthorized</div>
</div>
</div>
<div class="col-sm-6 ">
<!-- Aloha Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Aloha Secured</h3>
(Vert.x)
</div>
<div id="aloha-service-secured" class="panel-body">Unauthorized</div>
</div>
</div>
</div>
<a id="refresh-sso2" href="#"><span class="pficon pficon-refresh"></span>Refresh Results</a>
</div>
<img src="images/sso.png" style="float: right; height: 50%; width: 50%; object-fit: contain" />
</div>
{{/sso}}
<!-- Tab API Management -->
{{#threescale}}
<div role="tabpanel" class="tab-pane" id="apimanagement">
<div class="page-header page-header-bleed-right">
<div class="actions pull-right">
<a id="refresh-apimanagement" href="#"><span class="pficon pficon-refresh"></span>Refresh Results</a>
|
<a id="show-login-link-apimanagement" style="display: none; cursor: pointer;" ref="#" onclick="keycloak.login()"><span class="pficon pficon-user"></span>Login</a>
<a id="show-logout-link-apimanagement" style="display: none; cursor: pointer;" href="#" onclick="keycloak.logout()"><span class="pficon pficon-import"></span>Logout</a>
|
<span id="login-status-apimanagement"></span>
</div>
<h1>Using Managed APIs</h1>
</div>
<div id="tab-apimanagement-content" style="width: 45%; float: left;">
<div class="row">
<div class="col-sm-6 ">
<!-- Hola Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Hola Managed</h3>
(Quarkus / Microprofile)
</div>
<div id="hola-service-managed" class="panel-body">Unauthorized</div>
</div>
</div>
<div class=" col-sm-6 ">
<!-- Olá Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Olá Managed</h3>
(Spring Boot)
</div>
<div id="ola-service-managed" class="panel-body">Unauthorized</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 ">
<!-- Bonjour Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Bonjour Managed</h3>
(NodeJS / Express)
</div>
<div id="bonjour-service-managed" class="panel-body">Unauthorized</div>
</div>
</div>
<div class="col-sm-6 ">
<!-- Aloha Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Aloha Managed</h3>
(Vert.x)
</div>
<div id="aloha-service-managed" class="panel-body">Unauthorized</div>
</div>
</div>
</div>
<a id="refresh-apimanagement2" href="#"><span class="pficon pficon-refresh"></span>Refresh Results</a>
</div>
<img src="images/api-management.svg" style="float: right; width: 50%; height: 30em;" />
</div>
{{/threescale}}
<!-- Tab Browser Client -->
<div role="tabpanel" class="tab-pane" id="browser">
<div class="page-header page-header-bleed-right">
<div class="actions pull-right">
<a id="refresh-browser" href="#"><span class="pficon pficon-refresh"></span>Refresh Results</a>
</div>
<h1>Using Browser as a Client</h1>
</div>
<div id="tab-browser-content" style="width: 45%; float: left;">
<div class="row">
<div class="col-sm-6 ">
<!-- Hola Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Hola Service</h3>
(Quarkus / Microprofile)
</div>
<div id="hola-service" class="panel-body">Loading....</div>
</div>
</div>
<div class=" col-sm-6 ">
<!-- Olá Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Olá Service</h3>
(Spring Boot)
</div>
<div id="ola-service" class="panel-body">Loading....</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 ">
<!-- Bonjour Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Bonjour Service</h3>
(NodeJS / Express)
</div>
<div id="bonjour-service" class="panel-body">Loading....</div>
</div>
</div>
<div class="col-sm-6 ">
<!-- Aloha Service -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Aloha Service</h3>
(Vert.x)
</div>
<div id="aloha-service" class="panel-body">Loading....</div>
</div>
</div>
</div>
<a id="refresh-browser2" href="#"><span class="pficon pficon-refresh"></span>Refresh Results</a>
</div>
<img src="images/browser-client.png" style="float: right; height: 50%; width: 50%; object-fit: contain" />
</div>
<!-- Tab API Gateway -->
<div role="tabpanel" class="tab-pane" id="apigateway">
<div class="page-header page-header-bleed-right">
<div class="actions pull-right">
<a href="#" id="refresh-apigateway"><span class="pficon pficon-refresh"></span>Refresh Results</a>
</div>
<h1>Using an API Gateway</h1>
</div>
<div id="tab-apigateway-content" style="width: 40%; float: left;">
<!-- API Gateway -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">API Gateway</h3>
</div>
<div id="api-gateway" class="panel-body">Loading....</div>
</div>
<a href="#" id="refresh-apigateway2"><span class="pficon pficon-refresh"></span>Refresh Results</a>
</div>
<img src="images/api-gateway.png" style="float: right; height: 50%; width: 50%; object-fit: contain" />
</div>
<!-- Tab Service Chaining -->
<div role="tabpanel" class="tab-pane" id="servicechain">
<div class="page-header page-header-bleed-right">
<div class="actions pull-right">
<a href="#" id="refresh-chain"><span class="pficon pficon-refresh"></span>Refresh Results</a>
</div>
<h1>Using Service chaining</h1>
</div>
<div id="tab-servicechain-content" style="width: 40%; float: left;">
<!-- Service Chaining -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Service Chaining</h3>
</div>
<div id="service-chain" class="panel-body">Loading....</div>
</div>
<a href="#" id="refresh-chain2"><span class="pficon"></span>Refresh Results</a>
</div>
<img src="images/service-chaining.png" style="float: right; height: 50%; width: 50%; object-fit: contain" />
</div>
<!-- Tab Hystrix Dashaboard -->
{{#hystrix}}
<div role="tabpanel" class="tab-pane" id="hystrix">
<iframe style="padding-top: 5vh; border: 0; width: 100%; height: 80vh; position: inherit;"
id="hystrix-dashboard-iframe"
src="HYSTRIXDASHBOARDURL/monitor/monitor.html?stream=http%3A%2F%2Fturbine-server%2Fturbine.stream"> </iframe>
</div>
{{/hystrix}}
<!-- Tab Jaeger Dashaboard -->
{{#jaeger}}
<div role="tabpanel" class="tab-pane" id="jaeger" style="text-align: center; padding-top: 20px; font-size: x-large;">
<!-- It needs to be opened in another window because it doesn't fit inside an iFrame -->
<a href="JAEGERQUERYURL" target="_blank">Open Jaeger Dashboard in another tab/window</a>
</div>
{{/jaeger}}
</div>
</div>
<!-- Page script -->
<script src="scripts/page.js"></script>
<!-- Browser-Client script -->
<script src="scripts/browser-client.js"></script>
<!-- API Management script -->
<script src="scripts/api-management.js"></script>
<!-- Chain Service script -->
<script src="scripts/service-chain.js"></script>
<!-- SSO script -->
<script src="scripts/sso.js"></script>
<!-- SSO Secured script -->
<script src="scripts/secured.js"></script>
<!-- API Gateway script -->
<script src="scripts/api-gateway.js"></script>
</body>
</html>