Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BT-758 404 for job list #757

Merged
merged 3 commits into from
Sep 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ui/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {JobDetailsResolver} from './job-details/job-details-resolver.service';
import {JobListResolver} from './job-list/job-list-resolver.service';
import { DashboardResolver } from './dashboard/dashboard.resolver.service';
import {JobListComponent} from './job-list/job-list.component';
import {PagenotfoundComponent} from './pagenotfound/pagenotfound.component';
import {SignInComponent} from './sign-in/sign-in.component';
import {ProjectsComponent} from './projects/projects.component'
import {RouteReuse} from './route-reuse.service';
Expand All @@ -23,8 +24,7 @@ import {DashboardComponent} from "./dashboard/dashboard.component";
const routes: Routes = [
{
path: '',
redirectTo: 'jobs',
pathMatch: 'full'
component: PagenotfoundComponent
},
{
path: 'sign_in',
Expand All @@ -49,11 +49,7 @@ const routes: Routes = [
},
{
path: 'jobs',
component: JobListComponent,
canActivate: [CapabilitiesActivator],
resolve: {
stream: JobListResolver
}
component: PagenotfoundComponent
},
{
path: 'jobs/:id',
Expand All @@ -63,6 +59,10 @@ const routes: Routes = [
job: JobDetailsResolver
}
},
{
path: '**',
component: PagenotfoundComponent
},
];

@NgModule({
Expand Down
3 changes: 2 additions & 1 deletion ui/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { JobDetailsModule } from './job-details/job-details.module';
import { JobListModule } from './job-list/job-list.module';
import { ProjectsModule } from './projects/projects.module';
import { SignInModule } from './sign-in/sign-in.module';
import { PagenotfoundComponent } from './pagenotfound/pagenotfound.component';

@NgModule({
imports: [
Expand All @@ -37,7 +38,7 @@ import { SignInModule } from './sign-in/sign-in.module';
NgxJsonViewerModule
],
providers: [CustomIconService],
declarations: [AppComponent],
declarations: [AppComponent, PagenotfoundComponent],
// This specifies the top-level component, to load first.
bootstrap: [AppComponent]
})
Expand Down
11 changes: 0 additions & 11 deletions ui/src/app/core/initial-error/initial-error.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
<div *ngIf="initialLoadFailure" class="error-message">
<table class="monospace">
<tr> _ _ __ __ </tr>
<tr> | | | | | \/ | </tr>
<tr> | | ___ | |__ | \ / | __ _ _ __ __ _ __ _ ___ _ __ </tr>
<tr> _ | |/ _ \| '_ \ | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|</tr>
<tr>| |__| | (_) | |_) | | | | | (_| | | | | (_| | (_| | __/ | </tr>
<tr> \____/ \___/|_.__/ |_| |_|\__,_|_| |_|\__,_|\__, |\___|_| </tr>
<tr> __/ | </tr>
<tr> |___/ </tr>
</table>
<p>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke because, in the new version of Angular, all this leading whitespace in the tr elements got trimmed out. Could fix by adding a lot of nbsp; but was very fiddly and made this file kind of horrifying.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saddd.

<p>Job Manager is running but encountered a problem getting data from its workflow server.</p>
<p><a href="{{ newUrl }}">{{ linkText }}</a></p>
<p><i>{{errorMessage}}</i></p>
Expand Down
12 changes: 12 additions & 0 deletions ui/src/app/pagenotfound/pagenotfound.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.error-message {
position: relative;
top: 90px;
bottom: 0;
padding-left: 20px;
padding-right: 20px;
}

p {
font-size: 0.8rem;
margin: 1rem 0;
}
4 changes: 4 additions & 0 deletions ui/src/app/pagenotfound/pagenotfound.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="error-message">
<p>404 Error</p>
<p>Page not found</p>
</div>
23 changes: 23 additions & 0 deletions ui/src/app/pagenotfound/pagenotfound.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { PagenotfoundComponent } from './pagenotfound.component';

describe('PagenotfoundComponent', () => {
let component: PagenotfoundComponent;
let fixture: ComponentFixture<PagenotfoundComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PagenotfoundComponent ]
})
.compileComponents();

fixture = TestBed.createComponent(PagenotfoundComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions ui/src/app/pagenotfound/pagenotfound.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-pagenotfound',
templateUrl: './pagenotfound.component.html',
styleUrls: ['./pagenotfound.component.css']
})
export class PagenotfoundComponent implements OnInit {

constructor() { }

ngOnInit(): void {
}

}