Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented May 21, 2025

What do these changes do?

This PR prettifies the JSON Objects shown in the info buttons of the Runs and Tasks. If wanted, this could become the default Json viewer in osparc.

In order to prettify them the 3rd party JsonFormatter library was used.

JSONFormatter

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this May 21, 2025
@odeimaiz odeimaiz added this to the Bazinga! milestone May 21, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels May 21, 2025
@odeimaiz odeimaiz changed the title ✨ [Frontend] JsonTreeViewer ✨ [Frontend] Pretty JSON objects May 21, 2025
@odeimaiz odeimaiz requested a review from Copilot May 21, 2025 12:31
@odeimaiz odeimaiz marked this pull request as ready for review May 21, 2025 12:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a pretty-print feature for JSON objects in info buttons using the JsonFormatter library. Key changes include:

  • Adding the unminified JsonFormatter library as a static resource.
  • Refactoring the JsonTreeViewer and JsonFormatter wrappers for improved coding standards.
  • Updating job info and dashboard components to integrate the new JSON formatting.

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
json-formatter-2.5.23.js Added vendor file with the JsonFormatter library
JsonTreeViewer.js Refactored variable declarations to use const for improved code consistency
JsonFormatter.js New qooxdoo wrapper for the JsonFormatter library
Info.js Updated to use the new JSON Formatter; includes unreachable legacy code
Dashboard.js Initialized the new JsonFormatter wrapper
CardBase.js Improved filter ID logic by extracting common functionality
Files not reviewed (2)
  • services/static-webserver/client/source/resource/jsonFormatter/json-formatter-2.5.23.css: Language not supported
  • services/static-webserver/client/source/resource/jsontreeviewer/jsonTree.css: Language not supported

@odeimaiz odeimaiz requested a review from calys May 21, 2025 12:33
@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label May 21, 2025
@odeimaiz
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented May 21, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at e395992

@sonarqubecloud
Copy link

@mergify mergify bot merged commit e395992 into ITISFoundation:master May 21, 2025
59 checks passed
@odeimaiz odeimaiz deleted the feature/json-tree-viewer branch May 21, 2025 14:59
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:frontend issue affecting the front-end (area group) t:enhancement Improvement or request on an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants