Skip to content

Commit 652269d

Browse files
committed
drop /dashboard prefix from user-facing URLs
1 parent 07be263 commit 652269d

7 files changed

Lines changed: 16 additions & 31 deletions

File tree

amber/src/main/scala/org/apache/texera/web/service/WorkflowEmailNotifier.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class WorkflowEmailNotifier(
107107
private def createDashboardUrl(): String = {
108108
val host = sessionUri.getHost
109109
val port = sessionUri.getPort
110-
val path = s"/dashboard/user/workspace/$workflowId"
110+
val path = s"/user/workspace/$workflowId"
111111
if (port == -1 || port == 80 || port == 443) {
112112
s"http://$host$path"
113113
} else {

frontend/src/app/app-routing.constant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
export const DASHBOARD = "/dashboard";
20+
export const DASHBOARD = "";
2121
export const DASHBOARD_HOME = `${DASHBOARD}/home`;
2222
export const DASHBOARD_ABOUT = `${DASHBOARD}/about`;
2323

frontend/src/app/app-routing.module.ts

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* under the License.
1818
*/
1919

20-
import { inject, NgModule } from "@angular/core";
21-
import { CanActivateFn, Router, RouterModule, Routes } from "@angular/router";
20+
import { NgModule } from "@angular/core";
21+
import { RouterModule, Routes } from "@angular/router";
2222
import { DashboardComponent } from "./dashboard/component/dashboard.component";
2323
import { UserWorkflowComponent } from "./dashboard/component/user/user-workflow/user-workflow.component";
2424
import { UserQuotaComponent } from "./dashboard/component/user/user-quota/user-quota.component";
@@ -38,28 +38,21 @@ import { DatasetDetailComponent } from "./dashboard/component/user/user-dataset/
3838
import { UserDatasetComponent } from "./dashboard/component/user/user-dataset/user-dataset.component";
3939
import { HubWorkflowDetailComponent } from "./hub/component/workflow/detail/hub-workflow-detail.component";
4040
import { LandingPageComponent } from "./hub/component/landing-page/landing-page.component";
41-
import { DASHBOARD_ABOUT, DASHBOARD_USER_WORKFLOW } from "./app-routing.constant";
41+
import { DASHBOARD_USER_WORKFLOW } from "./app-routing.constant";
4242
import { HubSearchResultComponent } from "./hub/component/hub-search-result/hub-search-result.component";
4343
import { AdminSettingsComponent } from "./dashboard/component/admin/settings/admin-settings.component";
44-
import { GuiConfigService } from "./common/service/gui-config.service";
45-
46-
const rootRedirectGuard: CanActivateFn = () => {
47-
const config = inject(GuiConfigService);
48-
const router = inject(Router);
49-
try {
50-
return router.parseUrl(DASHBOARD_ABOUT);
51-
} catch {
52-
// config not loaded yet, swallow the error and let the app handle it
53-
}
54-
return true;
55-
};
5644

5745
const routes: Routes = [];
5846

5947
routes.push({
60-
path: "dashboard",
48+
path: "",
6149
component: DashboardComponent,
6250
children: [
51+
{
52+
path: "",
53+
redirectTo: "about",
54+
pathMatch: "full",
55+
},
6356
{
6457
path: "home",
6558
component: LandingPageComponent,
@@ -174,14 +167,6 @@ routes.push({
174167
],
175168
});
176169

177-
// default route renders the workspace editor directly; if userSystem is enabled at runtime,
178-
// AppComponent will navigate to DASHBOARD_ABOUT instead.
179-
routes.push({
180-
path: "",
181-
component: WorkspaceComponent,
182-
canActivate: [rootRedirectGuard],
183-
});
184-
185170
// redirect all other paths to index.
186171
routes.push({
187172
path: "**",

frontend/src/app/dashboard/component/admin/execution/admin-execution.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
<tr *ngFor="let execution of basicTable.data">
101101
<td>
102102
<div *ngIf="execution.access; else normalWorkflowName">
103-
<a href="/dashboard/user/workflow/{{execution.workflowId}}">
103+
<a href="/user/workflow/{{execution.workflowId}}">
104104
{{ maxStringLength(execution.workflowName, 16) }} ({{ execution.workflowId }})
105105
</a>
106106
</div>

frontend/src/app/dashboard/component/dashboard.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ describe("DashboardComponent", () => {
8080
};
8181

8282
routerMock = {
83-
events: of(new NavigationEnd(1, "/dashboard", "/dashboard")),
84-
url: "/dashboard",
83+
events: of(new NavigationEnd(1, "/", "/")),
84+
url: "/",
8585
navigateByUrl: vi.fn(),
8686
};
8787

frontend/src/app/dashboard/component/dashboard.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export class DashboardComponent implements OnInit {
232232

233233
isNavbarEnabled(currentRoute: string) {
234234
// Hide navbar for workflow workspace pages (with numeric ID)
235-
if (currentRoute.match(/\/dashboard\/user\/workflow\/\d+/)) {
235+
if (currentRoute.match(/\/user\/workflow\/\d+/)) {
236236
return false;
237237
}
238238
return true;

frontend/src/app/dashboard/component/user/share-access/share-access.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export class ShareAccessComponent implements OnInit, OnDestroy {
190190
this.emailTags.forEach(email => {
191191
let message = `${this.userService.getCurrentUser()?.email} shared a ${this.type} with you`;
192192
if (this.type !== "computing-unit")
193-
message += `, access the ${this.type} at ${location.origin}/dashboard/user/workflow/${this.id}`;
193+
message += `, access the ${this.type} at ${location.origin}/user/workflow/${this.id}`;
194194
this.accessService
195195
.grantAccess(this.type, this.id, email, this.validateForm.value.accessLevel)
196196
.pipe(untilDestroyed(this))

0 commit comments

Comments
 (0)