Skip to content

Commit

Permalink
Minor dashboard fixes (#989)
Browse files Browse the repository at this point in the history
* Fix icon path

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Turn off minify for debugging

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Make trajectory server connection optional

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Remove minify:false block

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Use BASE_URL

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth authored Aug 7, 2024
1 parent 16c2dbe commit 2e4b44c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<link rel="icon" href="%BASE_URL%favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Web application that provides overall visualization and control over the RMF system"
/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="shortcut icon" type="image/x-icon" href="%BASE_URL%favicon.ico" />
<title>RMF Dashboard</title>
</head>
<body>
Expand Down
18 changes: 13 additions & 5 deletions packages/dashboard/src/components/rmf-app/rmf-ingress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class RmfIngress {
alertsApi: AlertsApi;
adminApi: AdminApi;
deliveryAlertsApi: DeliveryAlertsApi;
negotiationStatusManager: NegotiationStatusManager;
trajectoryManager: RobotTrajectoryManager;
negotiationStatusManager?: NegotiationStatusManager;
trajectoryManager?: RobotTrajectoryManager;

constructor(appConfig: AppConfig, authenticator: Authenticator) {
if (!authenticator.user) {
Expand Down Expand Up @@ -128,9 +128,17 @@ export class RmfIngress {
this.adminApi = new AdminApi(apiConfig, undefined, axiosInst);
this.deliveryAlertsApi = new DeliveryAlertsApi(apiConfig, undefined, axiosInst);

const ws = new WebSocket(appConfig.trajectoryServerUrl);
this.trajectoryManager = new DefaultTrajectoryManager(ws, authenticator);
this.negotiationStatusManager = new NegotiationStatusManager(ws, authenticator);
try {
const ws = new WebSocket(appConfig.trajectoryServerUrl);
this.trajectoryManager = new DefaultTrajectoryManager(ws, authenticator);
this.negotiationStatusManager = new NegotiationStatusManager(ws, authenticator);
} catch (e) {
const errorMessage = `Failed to connect to trajectory server at [${appConfig.trajectoryServerUrl}], ${
(e as Error).message
}`;
console.error(errorMessage);
return;
}
}

private _convertSioToRxObs<T>(
Expand Down

0 comments on commit 2e4b44c

Please sign in to comment.