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

Pre-populate process selection in processing UI after selecting a process in STAC Browser #365

Open
1 of 2 tasks
silvester-pari opened this issue Nov 16, 2023 · 0 comments

Comments

@silvester-pari
Copy link
Collaborator

silvester-pari commented Nov 16, 2023

Prerequesites:

Currently, the processing UI (processing-federation branch) lets the user select a process from a dropdown list in the first step of the form. We need to extend the STAC Browser link action view to include a button which redirects the user to the processing UI, with the process (Step 1) already pre-selected.
This makes use of the linkActions config where we could add a new button to the processing links, something like

import LinkActionPlugin from "../LinkActionPlugin";
​
export default class Processing extends LinkActionPlugin {
​
  get show() {
    return (this.link.rel === 'process' && this.link.type === 'application/cwl');
  }
​
  //get uri() {
  //  return 'http://localhost:300/processing?url=' + encodeURIComponent(this.link.href);
  //}
​
  get onClick() {
     return () => {
         window.parent.postMessage({
           navigate: /new-process?process=<process id>
        }, '*');
     };
  }
​
  get text() {
    return 'Open in Processing UI';
  }
​
}

(see https://github.com/EOEPCA/open-science-catalog-stac-browser/blob/6a6f97525bc91e872031cd9b0deb0dd33d6a86ec/src/StacBrowser.vue#L70-L75 for reference).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant