Skip to content

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

@silvester-pari

Description

@silvester-pari

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions