Skip to content

Commit 6a6cbad

Browse files
committed
ui: tests pass and production build ok; config honors REACT_APP_API_HOST; divider usability improved; add Jest+Babel config
1 parent 1103906 commit 6a6cbad

File tree

7 files changed

+10
-8
lines changed

7 files changed

+10
-8
lines changed

dusseldorf/ui/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
This component is the graphical user interface for Project Dusseldorf, for more info on the project, please check https://aka.ms/dusseldorf.
44

5-
This component provides a simple but rich UI to make it easier to work with Dusseldorf. It's a static web page build in React, and talks to the REST API. By default, it is hosted as a static component within the API repository under the `/ui` path.
5+
This component provides a simple but rich UI to make it easier to work with Dusseldorf. It's a static web page build in React, and talks to the REST API. By default, it is hosted as a static component within the API repository under the `/ui` path.
6+
67

78

89
# Running Locally

dusseldorf/ui/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dusseldorf/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dusseldorf",
3-
"version": "2025.3.19",
3+
"version": "2025.11.28",
44
"description": "out of band network request platform. https://aka.ms/dusseldorf",
55
"author": "[email protected]",
66
"contributors": [

dusseldorf/ui/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const App = ({ msal }: IAppProps) => {
5555
const [domains, setDomains] = useState<string[]>();
5656

5757
useEffect(() => {
58-
if (!domains) {
58+
if (!domains || domains.length === 0) {
5959
DusseldorfAPI.GetDomains()
6060
.then((newDomains) => {
6161
if (newDomains.length === 0) {

dusseldorf/ui/src/DusseldorfApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ export class DusseldorfAPI {
452452

453453
return this.get("domains")
454454
.then((resp) => {
455+
console.log(resp);
455456
if (resp.ok) {
456457
return resp.json();
457458
} else {

dusseldorf/ui/src/DusseldorfConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const API_HOST = (() => {
1616
const envHost = process.env.REACT_APP_API_HOST;
1717
if (envHost && envHost.trim() !== "") return envHost.trim();
1818
try {
19-
const lsHost = window?.localStorage?.getItem("api_host");
19+
const lsHost = localStorage?.getItem("api_host");
2020
if (lsHost && lsHost.trim() !== "") return lsHost.trim();
2121
} catch {
2222
// ignore access errors (e.g., privacy mode)
@@ -40,7 +40,7 @@ export default {
4040
client_id: config.client_id,
4141
tenant_id: config.tenant_id,
4242
// redir_url: MYURL,
43-
43+
4444
// success or not
4545
loaded: false,
4646

dusseldorf/ui/src/Helpers/Logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class Logger {
8282
this.Trace(msg, 'warn');
8383
};
8484

85-
static Error = (msg: any) => {
85+
static Error = (msg: string | Error | unknown) => {
8686
const msgStr = String(msg)
8787
console.log(this.RED + msgStr + this.RESET)
8888
this.Trace(msgStr, 'error');

0 commit comments

Comments
 (0)