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

Conversation

hudson-newey
Copy link
Member

@hudson-newey hudson-newey commented Jan 30, 2025

Create read interface for analysis jobs

This pull request adds support for reading analysis jobs and scripts.

Both at the admin (site wide) and project level.

Changes

  • Updates the analysis job model
  • Updates the scripts model
  • Updates the admin analysis job list/details view
  • Updates the admin script details view
  • Adds project level analysis job list/details view

Outside of scope

This PR does not add a UI for provenance models

Issues

Fixes #2207

Visual Changes

image

Admin analysis job list view

image

Analysis job project details view


image

Admin script list view

image

Script details view

Final Checklist

  • Assign reviewers if you have permission
  • Assign labels if you have permission
  • Link issues related to PR
  • Ensure project linter is not producing any warnings (npm run lint)
  • Ensure build is passing on all browsers (npm run test:all)
  • Ensure CI build is passing
  • Ensure docker container is passing (docs)

@hudson-newey hudson-newey added enhancement New feature or request architecture Architectural changes to the software ui feature A new feature/page to add to the project labels Jan 30, 2025
@hudson-newey hudson-newey self-assigned this Jan 30, 2025
@hudson-newey hudson-newey marked this pull request as draft January 30, 2025 04:18
Copy link
Contributor

github-actions bot commented Jan 30, 2025

Size Change: +2.03 kB (+0.05%)

Total Size: 3.91 MB

Filename Size Change
dist/workbench-client/browser/index.html 4.81 kB +1 B (+0.02%)
dist/workbench-client/browser/main-YERRD7N3.js 0 B -1.13 MB (removed) 🏆
dist/workbench-client/server/main.js 1.94 MB +701 B (+0.04%)
dist/workbench-client/browser/main-NNUWAUJJ.js 1.13 MB +1.13 MB (new file) 🆕
ℹ️ View Unchanged
Filename Size
dist/workbench-client/browser/assets/buffer-builder-processor-BhnxGUx8.js 1.16 kB
dist/workbench-client/browser/assets/environment.json 555 B
dist/workbench-client/browser/assets/high-accuracy-time-processor-BevUJNwo.js 354 B
dist/workbench-client/browser/assets/test-assets/index.html 21 B
dist/workbench-client/browser/chunk-NPDQGTTA.js 1.17 kB
dist/workbench-client/browser/chunk-U5EWAFH4.js 379 kB
dist/workbench-client/browser/manifest.json 147 B
dist/workbench-client/browser/polyfills-C5CKP5CH.js 12.4 kB
dist/workbench-client/browser/styles-ETV6J7SM.css 39.6 kB
dist/workbench-client/server/267.js 390 kB
dist/workbench-client/server/327.js 4.21 kB

compressed-size-action

@hudson-newey hudson-newey changed the title [DRAFT] Create read interface for analysis jobs Create read interface for analysis jobs Jan 31, 2025
@hudson-newey hudson-newey marked this pull request as ready for review January 31, 2025 04:50
@hudson-newey hudson-newey requested a review from atruskie January 31, 2025 04:50
Copy link
Contributor

github-actions bot commented Jan 31, 2025

Unit Test Results

         6 files           6 suites   9m 29s ⏱️
24 180 tests 23 436 ✔️ 744 💤 0
24 420 runs  23 676 ✔️ 744 💤 0

Results for commit 82dc440.

♻️ This comment has been updated with latest results.

Copy link
Member

@atruskie atruskie left a comment

Choose a reason for hiding this comment

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

Did we get rid of all the old links to the old-client analysis jobs interface?

label: "Analysis Jobs",
label: "Audio Analysis",
Copy link
Member

Choose a reason for hiding this comment

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

why the label change? Analysis Jobs was accurate

Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed offline, I will revert this change

Copy link
Member Author

Choose a reason for hiding this comment

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

For consistency, chaning this admin.menu label also means that the analysis-jobs.menu label has also been changed to "Analysis Jobs"

src/app/components/audio-analysis/audio-analysis.menus.ts Outdated Show resolved Hide resolved
src/app/components/audio-analysis/audio-analysis.menus.ts Outdated Show resolved Hide resolved
src/app/components/audio-analysis/audio-analysis.module.ts Outdated Show resolved Hide resolved
src/app/components/audio-analysis/audio-analysis.routes.ts Outdated Show resolved Hide resolved
const filterByProject: Filters<AnalysisJob> = {
filter: {
or: {
projectId: { eq: this.project?.id },
Copy link
Member

Choose a reason for hiding this comment

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

probably shouldn't include this filter condition if the project id is null

Copy link
Member Author

Choose a reason for hiding this comment

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

image

Line below handles this condition

However, I agree that it's not very clear and it's not very readable

Copy link
Member

Choose a reason for hiding this comment

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

oh i see

i'd wrap this in an if statement. the mixed up order is hard to read.

filter = { filter: {}};
if (this.project) {
   filter.filter = { or: ...}
}

Copy link
Member Author

@hudson-newey hudson-newey Feb 6, 2025

Choose a reason for hiding this comment

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

Good idea, I am thinking something like this (word "like" is being used here because of type errors) using the filterOr helper

image

export const newScriptMenuItem = menuRoute({
icon: defaultNewIcon,
label: "New Script",
route: scriptsMenuItem.route.add("new"),
Copy link
Member

Choose a reason for hiding this comment

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

is this going anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

You can access this route if you are an admin by navigating through

Admin dashboard > Scripts > New Script (in side bar)

Copy link
Member

@atruskie atruskie Feb 6, 2025

Choose a reason for hiding this comment

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

yeah but we don't have a view for it right?

Copy link
Member Author

@hudson-newey hudson-newey Feb 6, 2025

Choose a reason for hiding this comment

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

We do and it was automatically updated when the scripts.schema was updated

https://github.com/QutEcoacoustics/workbench-client/blob/master/src/app/components/admin/scripts/new/new.component.ts

It doesn't have any of the fancy syntax highlighting that we want to do in the future, but it exists right now

I'll double check that it works as expected

src/app/models/AnalysisJob.ts Outdated Show resolved Hide resolved
@hudson-newey hudson-newey merged commit 86464b8 into master Feb 6, 2025
14 checks passed
@hudson-newey hudson-newey deleted the analysis-job-view branch February 6, 2025 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Architectural changes to the software enhancement New feature or request ui feature A new feature/page to add to the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

analysis jobs read only interface
2 participants