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

Add Create, Edit, Delete for LifeCycle Policies #1004

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Arnei
Copy link
Member

@Arnei Arnei commented Dec 4, 2024

Instead of only being able to view lifecycle policies, this commit lets you edit them, create new ones and even delete them.

Includes #943. Can serve to replace it.

Depends on changes to the backend: opencast/opencast#6139. These changes are currently pointed at develop.

To test this, you'll need an Opencast with backend changes mentioned above.

Demonstration:
Bildschirmaufzeichnung vom 2024-12-04 10-45-28.webm

@Arnei Arnei added the type:enhancement New feature or request label Dec 4, 2024
Copy link
Contributor

github-actions bot commented Dec 4, 2024

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-1004

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-1004

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

Arnei added 2 commits December 4, 2024 11:24
Adds a new tab to recordings called "LifeCycle
Policies". Much like other tabs this tab displays
information on its subject in a table format.
Unlike i.e. the events tab, the LifeCycle Policies
cannot be changed in any way, just be viewed.
Editing is supposed to be added at a later date.

Depends on PR opencast/opencast#6139
being merged to make any sense. Similarly, if you
would like to test this, your admin interface
should point to an Opencast with the PR
installed.
Type LifeCyclePolicy was missing on a union type.
Instead of only being able to view lifecycle policies, this commit
lets you edit them, create new ones and even delete them.

Depends on changes to the backend.
Copy link
Contributor

github-actions bot commented Dec 4, 2024

This pull request is deployed at test.admin-interface.opencast.org/1004/2024-12-12_16-22-27/ .
It might take a few minutes for it to become available.

Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@LukasKalbertodt
Copy link
Member

I have some random UI-related notes that I took when @Arnei recently presented this PR to us internally.

  • I don't mind the "technical enum names" in the drop down menus, but I think the one enum could be improved. SPECIFIC_DATA -> ONCE? And ALWAYS also confuses me, maybe there is a better name for it as well.
  • Filters
    • It wasn't clear to me whether its a "contains string" check or a "exact string match" or wildcard or regex, ... maybe add a short note or sth?
    • For some field types (e.g. strings, like title) the "greater than" comparison makes little sense I think? Maybe hide it then?
    • The label "Must" also confuses me, maybe rename that to "negate" or sth?
    • Maybe add a note that the filters are ANDed together, i.e. all filters must match.
    • Finally, I think one feature would be really nice, but is more work than anything I mentioned so far: it would be nice if the UI would show how many events currently match your filter. That gives you a lot more feedback. Maybe there can be a link that links to the admin UI event view with all those filters applied? Not sure if that's possible. Or even a link to the external API with those exact filters would be helpful in my opinion.

Other than that I had no complaints. Looked very finished and very like the other UIs in this project.

@majosch
Copy link

majosch commented Dec 18, 2024

@Arnei I just tried to spin up a test container via podman as noticed above, but unfortunately it fails to start:

~$ podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-1004

> admin-ui-picard@0.1.0 start
> vite --host 0.0.0.0

/admin-interface/node_modules/rollup/dist/native.js:63
		throw new Error(
		      ^

Error: Cannot find module @rollup/rollup-linux-x64-musl. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at requireWithFriendlyError (/admin-interface/node_modules/rollup/dist/native.js:63:9)
    at Object.<anonymous> (/admin-interface/node_modules/rollup/dist/native.js:72:76)
    ... 3 lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at cjsLoader (node:internal/modules/esm/translators:346:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:286:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24) {
  [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-musl'
  Require stack:
  - /admin-interface/node_modules/rollup/dist/native.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
      at Module._load (node:internal/modules/cjs/loader:1051:27)
      at Module.require (node:internal/modules/cjs/loader:1311:19)
      at require (node:internal/modules/helpers:179:18)
      at requireWithFriendlyError (/admin-interface/node_modules/rollup/dist/native.js:45:10)
      at Object.<anonymous> (/admin-interface/node_modules/rollup/dist/native.js:72:76)
      at Module._compile (node:internal/modules/cjs/loader:1469:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
      at Module.load (node:internal/modules/cjs/loader:1288:32)
      at Module._load (node:internal/modules/cjs/loader:1104:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/admin-interface/node_modules/rollup/dist/native.js' ]
  }
}

Node.js v20.18.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants