Skip to content

Commit

Permalink
add lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
rabeatwork committed Jun 28, 2024
1 parent 91612d3 commit e7b27b1
Showing 1 changed file with 3 additions and 42 deletions.
45 changes: 3 additions & 42 deletions src/main/webapp/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ import { ArtemisNavigationUtilService } from 'app/utils/navigation.utils';
import { AboutIrisComponent } from 'app/iris/about-iris/about-iris.component';
import { ProblemStatementComponent } from './overview/exercise-details/problem-statement/problem-statement.component';
import { StandaloneFeedbackComponent } from './exercises/shared/feedback/standalone-feedback/standalone-feedback.component';
import { RepositoryViewComponent } from './localvc/repository-view/repository-view.component';
import { Authority } from './shared/constants/authority.constants';
import { UserRouteAccessService } from './core/auth/user-route-access-service';
import { LocalVCGuard } from './localvc/localvc-guard.service';
import { CommitHistoryComponent } from './localvc/commit-history/commit-history.component';
import { CommitDetailsViewComponent } from './localvc/commit-details-view/commit-details-view.component';

const LAYOUT_ROUTES: Routes = [navbarRoute, ...errorRoute];

Expand Down Expand Up @@ -107,42 +101,9 @@ const LAYOUT_ROUTES: Routes = [navbarRoute, ...errorRoute];
loadChildren: () => import('./grading-system/grading-system.module').then((m) => m.GradingSystemModule),
},
{
path: 'courses/:courseId/exams/:examId/exercises/:exerciseId/repository/:participationId',
component: RepositoryViewComponent,
data: {
authorities: [Authority.USER],
pageTitle: 'artemisApp.repository.title',
flushRepositoryCacheAfter: 900000, // 15 min
participationCache: {},
repositoryCache: {},
hasSidebar: false,
},
canActivate: [UserRouteAccessService, LocalVCGuard],
},

{
path: 'courses/:courseId/exams/:examId/exercises/:exerciseId/repository/:participationId/commit-history',
component: CommitHistoryComponent,
data: {
authorities: [Authority.USER],
pageTitle: 'artemisApp.repository.commitHistory.title',
flushRepositoryCacheAfter: 900000, // 15 min
participationCache: {},
repositoryCache: {},
},
canActivate: [UserRouteAccessService, LocalVCGuard],
},
{
path: 'courses/:courseId/exams/:examId/exercises/:exerciseId/repository/:participationId/commit-history/:commitHash',
component: CommitDetailsViewComponent,
data: {
authorities: [Authority.USER],
pageTitle: 'artemisApp.repository.commitHistory.commitDetails.title',
flushRepositoryCacheAfter: 900000, // 15 min
participationCache: {},
repositoryCache: {},
},
canActivate: [UserRouteAccessService, LocalVCGuard],
path: 'courses/:courseId/exams/:examId/exercises/:exerciseId/repository',
loadChildren: () =>
import('./exercises/programming/participate/programming-repository-routing.module').then((m) => m.ArtemisProgrammingRepositoryRoutingModule),
},
{
path: 'features',
Expand Down

0 comments on commit e7b27b1

Please sign in to comment.