Skip to content

Commit 6fa8756

Browse files
authored
Change UI layout by reducing spacing (oracle-samples#380)
* Change UI layout by reducing spacing Signed-off-by: Emmanuel Jannetti <emmanuel.jannetti@oracle.com> * Signed-off-by: Emmanuel Jannetti <emmanuel.jannetti@oracle.com> Update link to projects --------- Signed-off-by: Emmanuel Jannetti <emmanuel.jannetti@oracle.com>
1 parent 7aaa7ae commit 6fa8756

File tree

7 files changed

+36
-32
lines changed

7 files changed

+36
-32
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
gradle/
2+
gradlew
3+
gradlew.bat

java/jdbc/statement-interceptor/demo-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ to oracle database server.
1414
=================================================================================================
1515

1616
In this application we leverage the event listener (aka interceptor) delivered by project
17-
https://orahub.oci.oraclecorp.com/ora-jdbc-dev/jdbc-interceptor
17+
https://github.com/oracle-samples/oracle-db-examples/tree/7aaa7ae05d36a7127cd5bd4bb84e66301f45908c/java/jdbc/statement-interceptor/interceptor
1818
That is a simple standalone SpringBoot application that performs search
1919
on an employee table. This simple table contains 5 employees like
2020

java/jdbc/statement-interceptor/demo-app/src/main/resources/templates/demohome.html

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,31 @@
3232
</head>
3333
<body onload="setupCleanerAndListener()">
3434
<div id="homeland" class="container-fluid d-flex flex-column">
35-
<div class="d-flex">
36-
<div id="banner" class="p-2 border border-bottom flex-fill">
35+
<div class="d-flex" id="homeland-banner" >
36+
<div class="p-1 border border-bottom flex-fill">
3737
<h1 class="text-center">Welcome to JDBC Statement interceptor
3838
demonstration.</h1>
39-
<p class="text-center">
39+
<p class="lh-1 text-center">
4040
This simple application demonstrates the use of <a
4141
href="https://docs.oracle.com/en/database/oracle/oracle-database/23/jajdb/oracle/jdbc/spi/TraceEventListenerProvider.html">
4242
Oracle JDBC trace event listener</a>
4343
to analyse outgoing SQL statements.
4444
</p>
45-
<p class="text-center">
45+
<p class="lh-1 text-center">
4646
This application datasources are configured to leverage Statement
4747
listener of the <a
4848
href="https://github.com/ejannett/oracle-db-examples/tree/375-interceptor/java/jdbc/statement-interceptor/interceptor" target="_blank">JDBCInterceptor
4949
project</a>
5050

5151
</p>
52-
<p class="text-center">
52+
<p class="lh-1 text-center">
5353
Source code and detailed information about this demonstration can be found in
5454
<a href="https://github.com/ejannett/oracle-db-examples/tree/375-interceptor/java/jdbc/statement-interceptor/demo-app" target="_blank">JDBCInterceptor
5555
demo project</a>
5656
</p>
5757
</div>
5858
</div>
59-
<div class="p-2">
59+
<div id="homeland_top" class="p-1">
6060
<div class="align-self-center">
6161
<button class="btn btn-primary" type="button"
6262
data-bs-toggle="collapse" data-bs-target="#offcanvasParams"
@@ -71,14 +71,25 @@ <h1 class="text-center">Welcome to JDBC Statement interceptor
7171
</div>
7272
</div>
7373
</div>
74-
<div id="homeland_center" class="d-flex flex-row">
75-
76-
<div id="wks" class="p-2 flex-grow-1"
77-
th:insert="~{fragments/workshop :: workshop_main}"></div>
78-
<div id="stats" class="p-2 flex-shrink-1 align-self-start"
79-
hx-trigger="operation-ended from:body" hx-get="/interceptor/stats">
80-
<div th:insert="~{fragments/demo_stats :: demo_stats}"></div>
81-
</div>
74+
<div id="homeland_center" class="d-flex flex-column justify-content-center">
75+
<div class="d-flex flex-row">
76+
<div class="align-self-center flex-grow-1 lh-1 p-1 fs-6 text-center">
77+
<p>
78+
Use the input below to search employees by their names.
79+
Just click submit button to get all.
80+
</p>
81+
<p>
82+
To trigger a SQL injection, you can try the following search criteria
83+
</p>
84+
<p class="font-monospace">' or 'a'='a</p>
85+
</div>
86+
<div id="stats" class="p-1 align-self-center"
87+
hx-trigger="operation-ended from:body" hx-get="/interceptor/stats">
88+
<div th:insert="~{fragments/demo_stats :: demo_stats}"></div>
89+
</div>
90+
</div>
91+
<div id="wks" class="p-1"
92+
th:insert="~{fragments/workshop :: workshop_main}"></div>
8293
</div>
8394
<div id="notifs"
8495
th:insert="~{fragments/notificationArea :: notif_area}"></div>

java/jdbc/statement-interceptor/demo-app/src/main/resources/templates/fragments/interceptor_rule.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<div class="list-group">
2929
<div th:each="rule:${rules}" th:object="${rule}"
3030
class="list-group-item flex-column align-items-start">
31-
<p class="fs-4 font-monospace text-decoration-underline"
31+
<p class="fs-5 font-monospace text-decoration-underline"
3232
th:text="*{className}"/>
3333
<span class="fs-6 fw-bold">Parameter:</span><span
3434
class="fs-6 fw-lighter" th:text="*{parameter}"/>

java/jdbc/statement-interceptor/demo-app/src/main/resources/templates/fragments/userlist.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<h3 th:text="${#lists.size(employees)} > 0? 'Employees List': 'No employee selected'"></h3>
2929
<ul th:each="employee:${employees}" th:object="${employee}"
3030
class="list-group list-group-flush">
31-
<li class="list-group-item p-4 ">
32-
<div class="container border-bottom border-2">
31+
<li class="list-group-item p-2">
32+
<div class="container border-bottom border-1">
3333
<div class="row">
3434
<div class="col">
3535
<span class="fw-bold" th:text="*{fullName}"

java/jdbc/statement-interceptor/demo-app/src/main/resources/templates/fragments/workshop.html

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,13 @@
2727
<meta charset="UTF-8">
2828
</head>
2929
<body>
30-
<div th:fragment="workshop_main" class="p-2">
30+
<div th:fragment="workshop_main" class="p-1">
3131
<form id="emplistform" hx-get="userlist" hx-target="#emplist"
3232
hx-vals='js:{uuid: demoAppUuid}'>
33-
<div class="p-2">
34-
<div class="p-3 text-center">
35-
<p>
36-
Use the input below to search employee by their names.
37-
Just click submit button to get all.
38-
</p>
39-
<p>
40-
To trigger a SQL injection, you can try the following search criteria
41-
</p>
42-
<p class="font-monospace">' or 'a'='a</p>
43-
</div>
33+
<div class="p-1">
4434
<div class="form-check" data-bs-toggle="tooltip"
4535
data-bs-placement="right"
46-
title="Use or not use Statement interceptor in the datasource">
36+
title="Activate the interceptor or not">
4737
<input type="checkbox" class="form-check-input"
4838
id="use-interceptor" name="useInterceptor" value="true"
4939
th:checked="${param.useInterceptor} ? 'checked'">

java/jdbc/statement-interceptor/interceptor/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Be sure that you use gradle 8.5 or above.
1919

2020
A demonstration usage is provided by this other project
2121

22-
[Interceptor Demo App](https://github.com/ejannett/oracle-db-examples/tree/a2f38857d8cf63a41559a2e8143c7919d61331c8/java/jdbc/statement-interceptor/demo-app)
22+
[Interceptor Demo App](https://github.com/oracle-samples/oracle-db-examples/tree/7aaa7ae05d36a7127cd5bd4bb84e66301f45908c/java/jdbc/statement-interceptor/demo-app)
2323

2424
As a quick test program you can choose to use the small main application of this project.
2525

0 commit comments

Comments
 (0)