Skip to content

Commit

Permalink
Merge branch 'tech-by-design:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
vinodaravind01 authored Jul 17, 2024
2 parents 5c658c8 + 3735a7b commit bb9632a
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 381 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.techbd.service.http;

import java.util.Arrays;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
Expand All @@ -14,9 +13,6 @@
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.filter.ForwardedHeaderFilter;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.authentication.AnonymousAuthenticationFilter;
import org.springframework.security.core.authority.AuthorityUtils;

@Configuration
@EnableWebSecurity
Expand All @@ -31,7 +27,7 @@ public SecurityFilterChain securityFilterChain(final HttpSecurity http) throws E
.csrf(AbstractHttpConfigurer::disable);
// allow us to show our own content in IFRAMEs (e.g. Swagger, etc.)
http.headers(headers -> headers.frameOptions(frameOptions -> frameOptions.sameOrigin()));
http.anonymous();
http.anonymous(Customizer.withDefaults());
return http.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import jakarta.servlet.http.HttpServletRequest;

@Controller
@Tag(name = "TechBD Hub Diagnostics UX API")
public class DiagnosticsController {
@Tag(name = "TechBD Hub Data Quality UX API")
public class DataQualityController {
@SuppressWarnings("unused")
private static final Logger LOG = LoggerFactory.getLogger(DiagnosticsController.class.getName());
private static final Logger LOG = LoggerFactory.getLogger(DataQualityController.class.getName());

private final Presentation presentation;

public DiagnosticsController(final Presentation presentation,
public DataQualityController(final Presentation presentation,
final UdiPrimeJpaConfig udiPrimeJpaConfig,
final SftpManager sftpManager,
final SandboxHelpers sboxHelpers) {
Expand All @@ -37,7 +37,7 @@ public List<String> getValuesForField(String field) {
}

@GetMapping("/data-quality")
@RouteMapping(label = "Data Quality", siblingOrder = 20)
@RouteMapping(label = "Data Quality", siblingOrder = 10)
public String adminDiagnostics() {
return "redirect:/data-quality/sftp";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public InteractionsController(final Presentation presentation,
}

@GetMapping("/interactions")
@RouteMapping(label = "Interactions", siblingOrder = 10)
@RouteMapping(label = "Interactions", siblingOrder = 20)
public String observeInteractions() {
return "redirect:/interactions/httpsfhir";
}
Expand Down
104 changes: 75 additions & 29 deletions hub-prime/src/main/resources/templates/page/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,66 @@
<head>
<script src='https://unpkg.com/htmx.org/dist/htmx.min.js'></script>
<title>Welcome</title>
<style>
.hanging-indent {
padding-left: 1.5rem;
text-indent: -1.5rem;
}
</style>
</head>

<body>
<div layout:fragment="content">
<body class="bg-gray-100">
<div layout:fragment="content" class="flex flex-col items-center justify-center p-4">
<img src="/techbd-hub.svg" class="mb-8" />
<div class="prose bg-white p-8 w-full max-w-6xl">
<h1 class="text-3xl font-bold mb-4 text-center">Welcome to Technology-by-Design's Collaboration Hub</h1>
<p class="mb-4 text-center">The central place where New York's finest healthcare institutions can
collaborate, share, and manage HIE datasets and other assets.</p>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
<ul class="list-disc list-inside pl-8">
<li class="mb-2 hanging-indent">The Hub connects HIE data submitters, data consumers, and IT teams.
<a th:href="@{/interactions}">Explore FHIR and flat file submissions.</a></li>
<li class="mb-2 hanging-indent">We're an <em></em>open by default</em> community that welcomes
contributions across the HIE ecosystem. <a href="https://github.com/tech-by-design">Explore our
GitHub projects.</a></li>
</ul>
<ul class="list-disc list-inside pl-8">
<li class="mb-2 hanging-indent">We help ensure high-quality data submissions and usage. <a
th:href="@{/data-quality}">Explore FHIR and flat file validations.</a></li>
<li class="mb-2 hanging-indent">The Hub encourages sharing of documentation and code. <a
th:href="@{/docs/techbd-hub}">Read the docs</a> and <a th:href="@{/docs/swagger-ui}">Explore
our APIs</a>.</li>
</ul>
<ul class="list-disc list-inside pl-8">
<li class="mb-2 hanging-indent">The Hub efficiently oversees multiple HIE-related projects.</li>
<li class="hanging-indent">We facilitate data analysis and insights for business analysts and
stakeholders.</li>
</ul>
</div>
</div>

<div sec:authorize="isAuthenticated()">
<div>Welcome GitHub User <span sec:authentication="principal.attributes['name']"></span></div>
<div>You're logged in as GitHub User <span sec:authentication="principal.attributes['name']"></span> with
role <code>TODO</code>.</div>
</div>
<div sec:authorize="isAnonymous()">
<div>Welcome Guest</div>
<div>You're not logged in so you only have guest privileges.</div>
</div>

<div>
<div>Most Recent SFTP <code>egress</code> Interactions (hover to see details)</div>
<div class="mt-8 flex flex-col items-center justify-center p-4">
<div class="text-center">Most Recent FHIR Interactions</div>
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6">
<div>TODO</div>
<div>TODO</div>
<div>TODO</div>
<div>TODO</div>
<div>TODO</div>
<div>TODO</div>
</dl>
</div>

<div class="mt-8 flex flex-col items-center justify-center p-4">
<div class="text-center">Most Recent Flat Files SFTP <code>egress</code> Interactions (hover to see details)</div>
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6">
<div
th:replace="~{fragments/dashboard :: serverTextStat('HEALTHeLINK', @{/dashboard/stat/sftp/most-recent-egress/healthelink.html})}">
Expand All @@ -37,28 +84,10 @@
</dl>
</div>

<article class="w-full prose prose-table:table-fixed full-width-children">
<h3 class="mt-5">Quick Links</h3>
<ul>
<li><a th:href="@{/metadata}"><code>/metadata</code> Capabilities Endpoint</a></li>
<li><a th:href="@{/data-quality}">Recent Data Quality Analysis</a></li>
<li><a th:href="@{/interactions}">Recent HTTP Request/Response Interactions (<span
th:text="${interactionsCount}"></span>)</a></li>
<li><a th:href="@{/docs/api/interactive/index.html}">Interactive OpenAPI Documentation and
Playground</a></li>
<li><a href="https://tech-by-design.github.io/docs.techbd.org/">TechBD Technical Documentation
Microsite</a></li>
<li><a
href="https://tech-by-design.github.io/docs.techbd.org/1115-hub/fhir-services/regression-test-results/">Regression
Test Results</a></li>
<li><a th:href="@{/actuator}" href="/actuator">Management Endpoints Catalog</a></li>
</ul>
</article>

<div class="mt-5 w-full grid grid-cols-2">
<div class="mt-12 w-full grid grid-cols-2 gap-8">
<div>
<h3>Synthetic Testing</h3>
<pre class="mermaid bg-white">
<h3 class="text-xl font-bold mb-4">Synthetic Testing (FHIR)</h3>
<pre class="mermaid bg-white p-4 rounded-lg shadow-md">
sequenceDiagram
participant CrossroadsSCN as Crossroads SCN
participant QE as QE
Expand All @@ -72,8 +101,8 @@ <h3>Synthetic Testing</h3>
</pre>
</div>
<div>
<h3>Production</h3>
<pre class="mermaid bg-white">
<h3 class="text-xl font-bold mb-4">Production (FHIR)</h3>
<pre class="mermaid bg-white p-4 rounded-lg shadow-md">
sequenceDiagram
participant SCN as SCN
participant QE
Expand All @@ -87,6 +116,23 @@ <h3>Production</h3>
</pre>
</div>
</div>

<div class="mt-12 w-full grid grid-cols-2 gap-8">
<div>
<h3 class="text-xl font-bold mb-4">Synthetic Testing (flat files)</h3>
<pre class="mermaid bg-white p-4 rounded-lg shadow-md">
sequenceDiagram
participant TODO as TODO
</pre>
</div>
<div>
<h3 class="text-xl font-bold mb-4">Production (flat files)</h3>
<pre class="mermaid bg-white p-4 rounded-lg shadow-md">
sequenceDiagram
participant TODO as TODO
</pre>
</div>
</div>
</div>
</body>

Expand Down
Loading

0 comments on commit bb9632a

Please sign in to comment.