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

View report / task data in yaml #835

Closed
ibolton336 opened this issue Apr 25, 2023 · 3 comments · Fixed by #1072
Closed

View report / task data in yaml #835

ibolton336 opened this issue Apr 25, 2023 · 3 comments · Fixed by #1072
Assignees
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@ibolton336
Copy link
Member

ibolton336 commented Apr 25, 2023

  • Display api fetched data for task details in yaml format
@ibolton336 ibolton336 converted this from a draft issue Apr 25, 2023
@gildub
Copy link
Contributor

gildub commented May 17, 2023

@ibolton336, is this still on the radar as the analyzers report format was going to cover for it ?

@sjd78
Copy link
Member

sjd78 commented Jun 21, 2023

Duplicated by https://issues.redhat.com/browse/MTA-773

With the current way of opening the details, only the default mime type for the service endpoint can be used:

        onClick: () => {
          const task = getTask(row);
          if (task) window.open(`/hub/tasks/${task.id}`, "_blank");
        },
  const openAnalysisDetails = () => {
    if (task) window.open(`/hub/tasks/${task.id}`, "_blank");
  };

A reasonable way forward would be to use a CodeEditor component in read-only mode similar to the FactCodeSnipViewer of #1057.

Maybe navigate to a new route in the normal application page?

Maybe have a skinny viewer app using a separate webpack entry point all together?

Thoughts @ibolton336 , @gildub , @mturley ?

@mturley
Copy link
Collaborator

mturley commented Jun 21, 2023

I think we probably don't want to take the user away from their current browser tab for this if we can help it (I know we currently do, but I think that was out of convenience since this was the easiest way to pull up raw data?)

My vote would be to open a modal with a read-only code viewer, just like #1057 as suggested.

@ibolton336 ibolton336 added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jun 22, 2023
@ibolton336 ibolton336 assigned sjd78 and unassigned gildub Jun 23, 2023
ibolton336 pushed a commit that referenced this issue Jun 29, 2023
Instead of opening a new browser window to show a user a json formatted
analysis details document, open a modal on page with an embedded and
enhanced CodeEditor.

The `SimpleDocumentViewerModal` component allows fetching and displaying
the document as either a json or yaml document. Users can request the
other format on screen. By using the `@patternfly/react-code-editor`
component, a number of good things are enabled:
  - the content is displayed on page and is code colored per language
  - the contents can be copied to the clipboard
  - the contents can be save to a file
- the user can easily view either the json or yaml format of the same
document, as provided by the rest api endpoint

Resolves: #835
Resolves: https://issues.redhat.com/browse/MTA-773

Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
@github-project-automation github-project-automation bot moved this from In Progress to Done in Konveyor UI Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants