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

Made Inactive and archived entities to indexable #422

Merged
merged 44 commits into from
Jan 23, 2025

Conversation

Naveen-Pal
Copy link
Collaborator

Resolves #369

Modify the is_indexable() function to allow inactive and archived entities.
Modified the corresponding tests.

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

The indexing part looks good.
Now in order to keep the search results consistent we need to rank inactive entities the lowest. Please add is_active attribute and adjust the customRanking rules to use it as the very first one.

@Naveen-Pal Naveen-Pal requested a review from arkid15r January 12, 2025 18:21
@Naveen-Pal
Copy link
Collaborator Author

@arkid15r Please review the PR

@Naveen-Pal
Copy link
Collaborator Author

@arkid15r . Please review this PR

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

Let's simplify it a bit. I believe having just "inactive" is enough. We don't need a separate flag about their "archived" status.

Also, we need to indicate this status on the frontend (both entity list and entity details page)

backend/apps/owasp/index/chapter.py Outdated Show resolved Hide resolved
backend/apps/github/index/repository.py Outdated Show resolved Hide resolved
backend/apps/owasp/models/mixins/project.py Outdated Show resolved Hide resolved
@Naveen-Pal Naveen-Pal closed this Jan 20, 2025
@Naveen-Pal Naveen-Pal reopened this Jan 20, 2025
@Naveen-Pal
Copy link
Collaborator Author

This is not related to the task so I'd avoid adding it to the PR. There is a separate task to fix that.

Please review now, i have removed those changes

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

Some new requirements I want to be implemented after the review:

  • do not show inactive projects in the list/search at all (but keep them in the index)
  • show project details page for inactive projects with Inactive badge (direct link access)

backend/apps/github/index/repository.py Outdated Show resolved Hide resolved
backend/apps/github/models/mixins/repository.py Outdated Show resolved Hide resolved
backend/apps/owasp/index/chapter.py Outdated Show resolved Hide resolved
backend/apps/owasp/index/project.py Outdated Show resolved Hide resolved
backend/apps/owasp/models/mixins/chapter.py Outdated Show resolved Hide resolved
backend/apps/owasp/models/mixins/project.py Outdated Show resolved Hide resolved
frontend/src/pages/ChapterDetails.tsx Outdated Show resolved Hide resolved
frontend/src/components/Card.tsx Outdated Show resolved Hide resolved
@Naveen-Pal Naveen-Pal requested a review from arkid15r January 20, 2025 18:58
@Naveen-Pal
Copy link
Collaborator Author

Naveen-Pal commented Jan 20, 2025

@arkid15r
i have resolved all the issue mentioned.

regarding

I'm not sure if this code works. I sill see Active badges.

If you will not pass isActive={chapter.is_active} in ChapterDetails.tsx / Chapters.tsx / Projects.tsx
status should not be visible

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

Not sure if you've missed these:

Some new requirements I want to be implemented after the review:

do not show inactive projects in the list/search at all (but keep them in the index)
show project details page for inactive projects with Inactive badge (direct link access)

@Naveen-Pal
Copy link
Collaborator Author

Not sure if you've missed these:

Some new requirements I want to be implemented after the review:

do not show inactive projects in the list/search at all (but keep them in the index)
show project details page for inactive projects with Inactive badge (direct link access)

sorry i missed this

@Naveen-Pal
Copy link
Collaborator Author

Then i should remove the status badge from the cards as all the visible project are active.

@Naveen-Pal Naveen-Pal requested a review from arkid15r January 21, 2025 07:13
@Naveen-Pal
Copy link
Collaborator Author

is this looks fine or you meant to add inactive badge along with all other projectdetails.
image

@Naveen-Pal
Copy link
Collaborator Author

new modification for inactive projects
image

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Let's improve the rest as separate tasks.

frontend/src/pages/Projects.tsx Show resolved Hide resolved
@arkid15r arkid15r added this pull request to the merge queue Jan 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 23, 2025
@arkid15r arkid15r added this pull request to the merge queue Jan 23, 2025
Merged via the queue into OWASP:main with commit dbd501d Jan 23, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index OWASP inactive/archived entities
3 participants