Skip to content

add UI support for repo field in search results#304

Open
Mansi2007275 wants to merge 2 commits into
openmainframeproject:masterfrom
Mansi2007275:feature/265-repo-field-ui
Open

add UI support for repo field in search results#304
Mansi2007275 wants to merge 2 commits into
openmainframeproject:masterfrom
Mansi2007275:feature/265-repo-field-ui

Conversation

@Mansi2007275

Copy link
Copy Markdown
Contributor

Summary

Closes #265

Adds optional UI support for the repo field now present
in PDS data sources.

Changes Made

bin/database_build.py

  • Added repo column to MySQL table schema in createTable()
  • Updated jsontosql() to handle all INSERT cases

src/classes/package_search.py

  • Added repo to both SELECT queries in searchSQLPackages()

src/static/js/views/home.html

  • Added optional "Show Repository" checkbox
  • Added Repository column — shows clickable link when repo
    exists, shows when absent

@pleia2

pleia2 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

A couple days before your change, #302 was merged which handles the bin/database_build.py part of this, so you can remove this file from your change.

But the bigger issue is that we removed Flask entirely from this repository recently, so your work was on the old UI, oops! ☹️

We want this change on the new React-based front-end, which currently looks like this:

Screenshot From 2026-06-29 13-00-56

I'm thinking we want something like the version number tag (in the above screenshot, it's "0.2.0-1"), perhaps in another color? For sources that come from the IBM Validated software list.

@Mansi2007275
Mansi2007275 force-pushed the feature/265-repo-field-ui branch from ee3cf62 to 8c2cc9c Compare July 19, 2026 14:36
@Mansi2007275

Mansi2007275 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

Hi @pleia2, @vmuralictr thanks for the feedback! I've updated the PR to work with the new React/Node.js stack instead of the old Flask-based UI.
Changes made:

Removed the old Flask-based changes (src/classes/package_search.py, src/static/js/views/home.html) since Flask has been removed from the repo
Removed bin/database_build.py changes since #302 already handles this (now in bin/database_build.js)
backend/index.js — added repo to the SQL SELECT queries in the /searchPackages route
react-frontend/src/components/SearchBar.jsx — mapped the repo field from the API response
react-frontend/src/components/SearchResults.jsx — added a "Validated" tag next to the version tag when a package has a repo link, similar to how the version tag looks in your screenshot
react-frontend/src/App.css — added a .repo-tag style (purple) to visually distinguish it from the version tag (blue) and distro tag (green)
Uploading Screenshot 2026-07-19 201122.png…

@Mansi2007275

Copy link
Copy Markdown
Contributor Author

if there any issue then do let me know sorry for the delay

>
Validated
</a>
)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The repo isn't a web address, so it's not something we'll be linking to.

Using the https://github.com/linux-on-ibm-z/PDS/blob/master/distro_data/SUSE_Package_Hub_SLES_16_SP0.json file as an example, the json looks like this:

{"packageName":"389-ds", "version":"3.0.6~git86.dce421a0d-160000.2.2", "repo":"FTP3 Product-SLES16.0 Pool scc repository"},

So "FTP3 Product-SLES16.0 Pool scc repository" is what would be displayed for this tag.

We also want to make showing this field optional, since it's rather niche and most folks searching won't need to see it.

@pleia2 pleia2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We'll also need the DCO sign-off on the commits 😄

- Show repo as plain text (not a link) since it is not a URL - Add optional Show Repository checkbox to toggle visibility

Signed-off-by: Mansi2007275 <yadavmansi0111207@gmail.com>
@Mansi2007275

Copy link
Copy Markdown
Contributor Author

Hi @pleia2,

Thanks for the feedback! I've made the following changes:

Removed the link — changed the repo tag from a clickable link to a plain , since the repo field isn't a URL. It now displays the actual repo text (e.g. "FTP3 Product-SLES16.0 Pool scc repository") instead of the hardcoded "Validated" label.
Made it optional — added a "Show Repository" checkbox (next to the existing "Search Description" checkbox) so the field only displays when the user opts in.
DCO sign-off — the commit is now signed off.

Let me know if any further changes are needed!

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

Successfully merging this pull request may close these issues.

Add support in the UI for repo: field

2 participants