Skip to content

Commit

Permalink
Merge pull request #49 from unity-sds/develop
Browse files Browse the repository at this point in the history
Merging `develop` branch to `main`.
  • Loading branch information
anilnatha authored Dec 18, 2024
2 parents 0d6ddf2 + b863f7e commit 523a501
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added health check URL to health dashboard [#40](https://github.com/unity-sds/unity-ui/issues/40)
- Fixed health dashboard column resizer element z-index
- Added cards to homepage [#38](https://github.com/unity-sds/unity-ui/issues/38)
- Updated router configuration to improve URL readability. URLs no longer contain router information using a hash (#39). [#39](https://github.com/unity-sds/unity-ui/issues/39
- Updated home page route to be located at `/home` and the route `/` redirects to it. [#39](https://github.com/unity-sds/unity-ui/issues/39)
- Updated application basename configuration to use the proxy name `ui` instead of `dashboard` [#45](https://github.com/unity-sds/unity-ui/issues/45)
- Added hard-coded links for STAC Browser for the unity/dev and unity/test venues [#47](https://github.com/unity-sds/unity-ui/issues/47)

## [0.7.0] 2024-09-27
- Updated node version lts/iron
Expand Down
6 changes: 5 additions & 1 deletion etc/apache2/sites-available/unity-ui.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@
Header add Set-Cookie oidc_claim_email=%{OIDC_CLAIM_EMAIL}e;Domain=${ENV_UNITY_UI_WWW_DOMAIN};Path=/;SameSite=strict;

<Directory /var/www/unity-ui/>

Options -Indexes
AllowOverride All
Order allow,deny
allow from all
Allow from all

FallbackResource /index.html

</Directory>

</VirtualHost>
6 changes: 3 additions & 3 deletions src/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
Navigate,
Route,
Routes,
} from "react-router-dom"
Expand Down Expand Up @@ -28,7 +29,6 @@ function Root() {

useEffect(() => {


if (healthState.status === "idle") {
// Fetch the health data
dispatch(getHealthData());
Expand Down Expand Up @@ -72,9 +72,9 @@ function Root() {
return <Route key={index} path={"/applications/" + formatRoute(item.componentName)} element={<WebView url={item.landingPageUrl} />} />
})
}
{/*<Route path="/applications/catalog" element={<WebView url={Config.ads.url} />} />*/}
<Route path="/" element={<Navigate to="/home" replace={true} />} />
<Route path="/health-dashboard" element={<HealthDashboard />} />
<Route path="/" element={<Home />} />
<Route path="/home" element={<Home />} />
<Route path="*" element={<NotFound />} />
</Routes>
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import { HashRouter, Routes, Route } from 'react-router-dom'
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import { HelmetProvider } from 'react-helmet-async'
import AuthorizationWrapper from './AuthorizationWrapper'
import Config from "./Config"

import './index.css'

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<HelmetProvider>
<HashRouter>
<BrowserRouter basename={`${Config['general']['project']}/${Config['general']['venue']}/ui`}>
<Routes>
<Route path="*" Component={AuthorizationWrapper}/>
</Routes>
</HashRouter>
</BrowserRouter>
</HelmetProvider>
</React.StrictMode>
)
41 changes: 41 additions & 0 deletions src/state/slices/healthSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,46 @@ const getItems = () => {

let serviceItems:Service[] = Array<Service>();

if( project === "UNITY" && venue === 'DEV') {

serviceItems = [
{
componentName: "STAC Browser",
ssmKey: "",
healthCheckUrl: "",
landingPageUrl: "https://www.dev.mdps.mcp.nasa.gov:4443/data/stac_browser/",
healthChecks: [
{
status: "UNKNOWN",
httpResponseCode: "",
date: ""
}
]
}
];

}

if( project === "UNITY" && venue === 'TEST') {

serviceItems = [
{
componentName: "STAC Browser",
ssmKey: "",
healthCheckUrl: "",
landingPageUrl: "https://www.test.mdps.mcp.nasa.gov:4443/data/stac_browser/",
healthChecks: [
{
status: "UNKNOWN",
httpResponseCode: "",
date: ""
}
]
}
];

}

if( project === "UNITY" && venue === 'OPS') {

serviceItems = [
Expand All @@ -61,6 +101,7 @@ const getItems = () => {
]
}
];

}

if( project === "EMIT" && venue === "DEV" ) {
Expand Down

0 comments on commit 523a501

Please sign in to comment.