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

Create read interface for analysis jobs #2206

Merged
merged 28 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2f31d64
update AnalysisJob model
hudson-newey Jan 30, 2025
b7a2040
update analysis job model schema
hudson-newey Jan 30, 2025
2783e39
Get old analysis job table working with new model
hudson-newey Jan 30, 2025
cd510eb
Update script models
hudson-newey Jan 30, 2025
649dfca
Fix script and analysis job schema
hudson-newey Jan 30, 2025
7d71a54
Fix admin analysis jobs list page
hudson-newey Jan 30, 2025
ca520bc
Improve analysis job list page
hudson-newey Jan 30, 2025
354562c
Migrate global analysis job routes to project level
hudson-newey Jan 30, 2025
630707a
Remove useless constructor in all-uploads page
hudson-newey Jan 30, 2025
21be6fb
Add project level audio analysis page
hudson-newey Jan 30, 2025
d650f9c
Add project level analysis job details
hudson-newey Jan 30, 2025
01911c2
Basic read support for analysis jobs
hudson-newey Jan 30, 2025
e2f0d86
Project audio analysis list view filters project
hudson-newey Jan 30, 2025
b9022af
Correctly show and hide script actions
hudson-newey Jan 30, 2025
6be86ca
Update fake generators
hudson-newey Jan 30, 2025
8c896f4
Staging
hudson-newey Jan 30, 2025
e65b3fd
Tests are passing?
hudson-newey Jan 31, 2025
014b575
Fix admin analysis job detail tests
hudson-newey Jan 31, 2025
5b8dc79
Fix script edit tests
hudson-newey Jan 31, 2025
1c0670e
Correctly scope system analysis job routes to projects
hudson-newey Jan 31, 2025
5cca45f
Potential fix
hudson-newey Jan 31, 2025
f83e832
Revert scope creep
hudson-newey Jan 31, 2025
b12d070
Fix old baw client result path
hudson-newey Jan 31, 2025
44c3e13
Fix old result baw page
hudson-newey Jan 31, 2025
77444d6
Self review
hudson-newey Jan 31, 2025
f7cefb0
Fix non-uniform terminoligy causing tests to fail
hudson-newey Jan 31, 2025
4e82359
Review feedback
hudson-newey Feb 6, 2025
82dc440
fix: show all analysis jobs in admin page
hudson-newey Feb 6, 2025
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
6 changes: 4 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { ReactiveFormsModule } from "@angular/forms";
import { BrowserModule } from "@angular/platform-browser";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { BawApiModule } from "@baw-api/baw-api.module";
import { AudioAnalysisModule } from "@components/audio-analysis/audio-analysis.module";
import { AudioRecordingModule } from "@components/audio-recordings/audio-recording.module";
import { ReportsModule } from "@components/reports/reports.module";
import { CitizenScienceModule } from "@components/citizen-science/citizen-science.module";
Expand All @@ -30,6 +29,8 @@ import { TitleStrategy } from "@angular/router";
import { AnnotationsImportModule } from "@components/import-annotations/import-annotations.module";
import { WebsiteStatusModule } from "@components/website-status/website-status.module";
import { AnnotationModule } from "@components/annotations/annotation.module";
import { ScriptsModule } from "@components/scripts/scripts.module";
import { AnalysisModule } from "@components/audio-analysis/analysis-jobs.module";
import { AppRoutingModule } from "./app-routing.module";
import { AppComponent, PageTitleStrategy } from "./app.component";
import { toastrRoot } from "./app.helper";
Expand Down Expand Up @@ -64,7 +65,8 @@ export const appImports = [
SharedModule,
AboutModule,
AdminModule,
AudioAnalysisModule,
AnalysisModule,
ScriptsModule,
AudioRecordingModule,
CitizenScienceModule,
DataRequestModule,
Expand Down
2 changes: 0 additions & 2 deletions src/app/components/admin/admin.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { adminRoute } from "./admin.menus";
import { AnalysisJobsModule } from "./analysis-jobs/analysis-jobs.module";
import { AdminDashboardComponent } from "./dashboard/dashboard.component";
import { OrphanSitesModule } from "./orphan/orphans.module";
import { ScriptsModule } from "./scripts/scripts.module";
import { SettingsModule } from "./settings/settings.module";
import { TagGroupsModule } from "./tag-group/tag-groups.module";
import { TagsModule } from "./tags/tags.module";
Expand All @@ -18,7 +17,6 @@ import { DateTimeExampleComponent } from "./datetime-example/datetime-example.co
const modules = [
AnalysisJobsModule,
OrphanSitesModule,
ScriptsModule,
SettingsModule,
TagGroupsModule,
TagsModule,
Expand Down
11 changes: 0 additions & 11 deletions src/app/components/admin/all-uploads/all-uploads.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { Component } from "@angular/core";
import { List } from "immutable";
import { ListComponent } from "@components/harvest/pages/list/list.component";
import { ActivatedRoute } from "@angular/router";
import { ShallowHarvestsService } from "@baw-api/harvest/harvest.service";
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
import { adminCategory, adminUploadsMenuItem } from "../admin.menus";
import { adminMenuItemActions } from "../dashboard/dashboard.component";

Expand All @@ -12,14 +9,6 @@ import { adminMenuItemActions } from "../dashboard/dashboard.component";
templateUrl: "../../harvest/pages/list/list.component.html",
})
class AllUploadsComponent extends ListComponent {
public constructor(
private modal: NgbModal,
private api: ShallowHarvestsService,
private activatedRoute: ActivatedRoute
) {
super(modal, api, activatedRoute);
}

public override get project() {
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/admin/analysis-jobs/analysis-jobs.menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export const adminAnalysisJobsRoute = adminRoute.addFeatureModule(
"analysis_jobs"
);

export const adminAnalysisJobsCategory: Category = {
export const adminAnalysisJobsCategory = {
icon: ["fas", "server"],
label: "Analysis Jobs",
route: adminAnalysisJobsRoute,
};
} satisfies Category;

export const adminAnalysisJobsMenuItem = menuRoute({
icon: ["fas", "server"],
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { Component } from "@angular/core";
import { analysisJobResolvers } from "@baw-api/analysis/analysis-jobs.service";
import {
hasResolvedSuccessfully,
retrieveResolvers,
} from "@baw-api/resolver-common";
import { PageComponent } from "@helpers/page/pageComponent";
import { IPageInfo } from "@helpers/page/pageInfo";
import { withUnsubscribe } from "@helpers/unsubscribe/unsubscribe";
import { permissionsWidgetMenuItem } from "@menu/widget.menus";
import { AnalysisJob } from "@models/AnalysisJob";
import { List } from "immutable";
import schema from "../analysis-job.schema.json";
import { AnalysisJobComponent } from "@components/audio-analysis/pages/details/details.component";
import {
adminAnalysisJobMenuItem,
adminAnalysisJobsCategory,
Expand All @@ -21,40 +12,9 @@ const analysisJobKey = "analysisJob";

@Component({
selector: "baw-admin-analysis-job",
template: `
<div *ngIf="!failure">
<h1>Analysis Job Details</h1>
<baw-detail-view
[fields]="fields"
[model]="analysisJob"
></baw-detail-view>
</div>
`,
templateUrl: "../../../audio-analysis/pages/details/details.component.html",
})
class AdminAnalysisJobComponent
extends withUnsubscribe(PageComponent)
implements OnInit
{
public analysisJob: AnalysisJob;
public failure: boolean;
public fields = schema.fields;

public constructor(private route: ActivatedRoute) {
super();
}

public ngOnInit(): void {
const data = this.route.snapshot.data;
const models = retrieveResolvers(data as IPageInfo);

if (!hasResolvedSuccessfully(models)) {
this.failure = true;
return;
}

this.analysisJob = models[analysisJobKey] as AnalysisJob;
}
}
class AdminAnalysisJobComponent extends AnalysisJobComponent {}

AdminAnalysisJobComponent.linkToRoute({
category: adminAnalysisJobsCategory,
Expand Down
67 changes: 0 additions & 67 deletions src/app/components/admin/analysis-jobs/list/list.component.html

This file was deleted.

Loading
Loading