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 the ability to individually view all files attached to a task on the Analysis details view #1929

Closed
sjd78 opened this issue May 31, 2024 · 5 comments · Fixed by #1954
Closed
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/normal Higher priority than priority/minor. Nice to have. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@sjd78
Copy link
Member

sjd78 commented May 31, 2024

Summary

For an application, the activity of the current / most recently run analysis task:

  • is viewable in a modal that show the task's activity log in a rich viewer
  • the user may select a merged view, displaying the log merged with all the file attachments
  • the rich viewer display component used allows for code coloring based on a file type we infer

The enhancement will make a few changes:

  1. The activity log view will allow viewing each attached file individually
  2. The activity log view will be moved a full page view

Enhancements reference:

Requirements

Viewing each file individually

Existing functionality to keep:

  • The default view will be the task's log in yaml format
  • The format may be changed by clicking on the "JSON" tab on the top right
  • The default task log view may be displayed with all attached log files merged into the activity log block by selecting the "Merged" checkbox

Allow viewing all of the task's attached files by adding a select box to the top of the viewer. The select box should:

  • List the files attached to the task
  • Allow selection of the file and loading it into the view
  • Allow selection of the default task log view

Additional functionality:

  • When an attached file is selected, the text formatting should be switched to "plain text"
  • A few well known file extensions could be detected and the language formatting loaded into the view (json, yaml). However, this is not required in this enhancement and extra formatting can be added in future as the kinds of attachments are better known.

View moved to a full page

The current view opens in a modal window. In order to have more screen space to view the logs and provide selection of attached files, move the view from the modal to a full page.

  • Existing links remain and open the new page
  • The new page does not need an entry on the left nav
  • The URL for the new page should allow for the main left nav to retain focus (e.g. /applications/123/task-view/456)
  • Breadcrumbs on the new page should allow for easy navigation back to the previous page and show what application and task is being displayed
  • Note: Future work will be done where the user will have a distinction between different task types (e.g. analysis and language detection) so the breadcrumbs should consider this.

Some potential examples of the bread crumbs (including some potential future uses):

Screen shots and mockups

Current State

Open the view from the kebab menu:
screenshot-localhost_9000-2024 05 31-10_04_57

Open the view from the application details drawer report tab:
screenshot-localhost_9000-2024 05 31-10_06_28

View an analysis details (task activity log):
screenshot-localhost_9000-2024 05 31-10_06_03

Future State Mockups

Attached file list box and on page view:
analysis-details-on-page

Attached file list box opened to select a different file to view:
analysis-details-select-expanded

Viewing an attached file:
analysis-details-log

@sjd78 sjd78 added this to the v0.5.0 milestone May 31, 2024
@konveyor-ci-bot
Copy link

This issue is currently awaiting triage.
If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members.

@konveyor-ci-bot konveyor-ci-bot bot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. labels May 31, 2024
@sjd78
Copy link
Member Author

sjd78 commented May 31, 2024

@dymurray, @JustinXHale, @rromannissen -- for your consideration

@sjd78 sjd78 added kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/normal Higher priority than priority/minor. Nice to have. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. labels May 31, 2024
@JustinXHale
Copy link
Member

Full page looks great.

@sjd78
Copy link
Member Author

sjd78 commented Jun 3, 2024

@jortel, @mansam -- also for your consideration (sorry about the late tags)

rszwajko added a commit to rszwajko/tackle2-ui that referenced this issue Jun 3, 2024
Related changes:
1. extend BreadCrumbPath component to support non-links
2. refactor CSS styles for SimpleDocumentViewer to support both modal
   and in-page mode
3. create new route for the analysis details page:
   /applications/:applicationId/analysis-details/:taskId

Reference-Url: konveyor#1929
Signed-off-by: Radoslaw Szwajkowski <[email protected]>
@sjd78 sjd78 changed the title [Enhancement] Add the ability to individually view all files attached to a task on the Analysis details view Add the ability to individually view all files attached to a task on the Analysis details view Jun 4, 2024
@rszwajko
Copy link
Collaborator

rszwajko commented Jun 6, 2024

@sjd78
Regarding bread crumbs: note that according to PF guidelines the last segment (current page) is considered active and not styled as a link.

rszwajko added a commit to rszwajko/tackle2-ui that referenced this issue Jun 7, 2024
Related changes:
1. extend BreadCrumbPath component to support non-links
2. refactor CSS styles for SimpleDocumentViewer to support both modal
   and in-page mode
3. create new route for the analysis details page:
   /applications/:applicationId/analysis-details/:taskId

Reference-Url: konveyor#1929
Signed-off-by: Radoslaw Szwajkowski <[email protected]>
sjd78 pushed a commit that referenced this issue Jun 9, 2024
Related changes:
  1. extend BreadCrumbPath component to support non-links
  2. refactor CSS styles for SimpleDocumentViewer to support both modal
      and in-page mode
  3. create new route for the analysis details page:
      /applications/:applicationId/analysis-details/:taskId

Part-of: #1929

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
rszwajko added a commit that referenced this issue Jun 10, 2024
Main use case is  providing a link to the application drawer.

Part-of: #1929

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
rszwajko added a commit that referenced this issue Jun 10, 2024
Extract existing components to files.
No functional changes have been introduced.

Part-of: #1929

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
rszwajko added a commit to rszwajko/tackle2-ui that referenced this issue Jun 11, 2024
Resolves: konveyor#1929

Functional changes:
1. document to be viewed is selected from the list (first action above
   the editor) or via URL
2. display language toggle based on languages supported by the document.
   For attachments the list consists of plain text and optionally a
   second language discovered based on file extension (YAML or JSON).
3. replace "merged" checkbox with an option in the select

Related refactorings:
1. split getTaskById() query into specialized queries:
   a) getTaskById() returning Promise<Task> for working with the object
   b) getTaskByIdAndFormat() returning Promise<string> for displaying
      the task as a formatted text
2. configure AnalysisDetails component to respond to 2 routes: existing
   details route and newly added /applications/:applicationId/analysis-details/:taskId/attachments/:attachmentId

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
rszwajko added a commit to rszwajko/tackle2-ui that referenced this issue Jun 11, 2024
Resolves: konveyor#1929

Functional changes:
1. document to be viewed is selected from the list (first action above
   the editor) or via URL
2. display language toggle based on languages supported by the document.
   For attachments the list consists of plain text and optionally a
   second language discovered based on file extension (YAML or JSON).
3. replace "merged" checkbox with an option in the select

Related refactorings:
1. split getTaskById() query into specialized queries:
   a) getTaskById() returning Promise<Task> for working with the object
   b) getTaskByIdAndFormat() returning Promise<string> for displaying
      the task as a formatted text
2. configure AnalysisDetails component to respond to 2 routes: existing
   details route and newly added /applications/:applicationId/analysis-details/:taskId/attachments/:attachmentId

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
rszwajko added a commit to rszwajko/tackle2-ui that referenced this issue Jun 13, 2024
Resolves: konveyor#1929

Functional changes:
1. document to be viewed is selected from the list (first action above
   the editor) or via URL
2. display language toggle based on languages supported by the document.
   For attachments the list consists of plain text and optionally a
   second language discovered based on file extension (YAML or JSON).
3. replace "merged" checkbox with an option in the select

Related refactorings:
1. split getTaskById() query into specialized queries:
   a) getTaskById() returning Promise<Task> for working with the object
   b) getTaskByIdAndFormat() returning Promise<string> for displaying
      the task as a formatted text
2. configure AnalysisDetails component to respond to 2 routes: existing
   details route and newly added /applications/:applicationId/analysis-details/:taskId/attachments/:attachmentId

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
rszwajko added a commit to rszwajko/tackle2-ui that referenced this issue Jun 17, 2024
Resolves: konveyor#1929

Functional changes:
1. document to be viewed is selected from the list (first action above
   the editor) or via URL
2. display language toggle based on languages supported by the document.
   For attachments the list consists of plain text and optionally a
   second language discovered based on file extension (YAML or JSON).
3. replace "merged" checkbox with an option in the select

Related refactorings:
1. split getTaskById() query into specialized queries:
   a) getTaskById() returning Promise<Task> for working with the object
   b) getTaskByIdAndFormat() returning Promise<string> for displaying
      the task as a formatted text
2. configure AnalysisDetails component to respond to 2 routes: existing
   details route and newly added /applications/:applicationId/analysis-details/:taskId/attachments/:attachmentId

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
rszwajko added a commit to rszwajko/tackle2-ui that referenced this issue Jun 17, 2024
Resolves: konveyor#1929

Functional changes:
1. document to be viewed is selected from the list (first action above
   the editor) or via URL
2. display language toggle based on languages supported by the document.
   For attachments the list consists of plain text and optionally a
   second language discovered based on file extension (YAML or JSON).
3. replace "merged" checkbox with an option in the select

Related refactorings:
1. split getTaskById() query into specialized queries:
   a) getTaskById() returning Promise<Task> for working with the object
   b) getTaskByIdAndFormat() returning Promise<string> for displaying
      the task as a formatted text
2. configure AnalysisDetails component to respond to 2 routes: existing
   details route and newly added /applications/:applicationId/analysis-details/:taskId/attachments/:attachmentId
3. persist merge mode in the URL as search param "merged"

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/normal Higher priority than priority/minor. Nice to have. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants