-
Notifications
You must be signed in to change notification settings - Fork 43
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
✨ Issues: Add single application table mode, add "Issues" link to app inventory detail drawer #1069
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1069 +/- ##
==========================================
- Coverage 47.05% 46.99% -0.06%
==========================================
Files 177 177
Lines 4416 4430 +14
Branches 983 990 +7
==========================================
+ Hits 2078 2082 +4
- Misses 2324 2334 +10
Partials 14 14
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
mturley
force-pushed
the
issues-single-app
branch
from
June 28, 2023 16:55
b24cc24
to
c3240aa
Compare
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
…IssueReport objects Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
…perties Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
mturley
force-pushed
the
issues-single-app
branch
from
June 28, 2023 18:53
f7adedb
to
ffafe1b
Compare
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
mturley
changed the title
✨ [WIP] Issues: Add single application table mode
✨ Issues: Add single application table mode, add "Issues" link to app inventory detail drawer
Jun 28, 2023
ibolton336
approved these changes
Jun 28, 2023
This was referenced Nov 22, 2023
This was referenced Jan 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements the contents of the "Single application" tab of the Issues page, which is also reachable from a link in each application's details drawer on the Application Inventory page.
/issues/single-app
with no app id, an empty state is shown that directs the user to select an application from a dropdown in the toolbar above the table.ConfirmDialog
now rendered in theissues.tsx
page./issues/single-app/:applicationId
route, where the table is rendered.getIssuesSingleAppSelectedLocation
.AnalysisIssueReport
objects, which are almost identical to theAnalysisRuleReport
except that they have the issueid
on them, and they have a number offiles
instead of a number ofapplications
.issues.tsx
toissues-table.tsx
, where it has a propmode: "allIssues" | "singleApp"
, and some pieces of the table conditionally render depending on themode
.useFetchRuleReports
, the table now also callsuseFetchIssueReports
. Only one of these queries will be enabled depending on the table's mode, and the data array passed intouseTableControlProps
comes from whichever is the active query, and has the type(AnalysisRuleReport | AnalysisIssueReport)[]
. Because these two types share most of the same properties, most of the table code still works as-is without caring which type is being used. In the places where we need to access a property specific to RuleReport or IssueReport, we use anas
type assertion localized to those few lines of code.issue-detail-drawer
folder and all its components has been moved out of theaffected-applications
folder and is now a sibling ofissues-table.tsx
, where it is used directly if you are insingleApp
mode. It is still used in the affected applications table with updated imports.ruleReport
as a prop. It has been refactored to simply accept anissueId
and anapplicationName
, and it fetches the underlying Issue object internally instead of relying on the issue-related properties on the report (which are structured differently between the IssueReport and AppReport models). This will also make it easier in the future if we want to show more Issue-object-related fields in additional tabs in this drawer.useSharedFilterCategoriesForIssuesAndAffectedApps()
are now only used for theallIssues
mode.AnalysisIssueReport
s and fetching individualAnalysisIssue
objects. Some constants in these files have been renamed for readability.AnalysisAppReport
objects has been renamed from/analyses/report/applications
to/analyses/report/issues/applications
, for compatibility with ✨ Add Dep.provider. tackle2-hub#421.effort
filter has been enabled because it is now supported in the hub.isDisabled
prop, so we can disable all filters on the single-app issues table when there is no application selected.NOTE FOR REVIEWERS
issues-table.tsx
andissue-detail-drawer.tsx
diffs are hard to read because git treated them as full rewrites.issues-table.tsx
are moved as-is fromissues.tsx
, the only changes being the conditionals to support multiple modes and fetch the two types of reports. To see only the part of the diff after this file was moved, click here, wait for the auto-scroll after the page fully loads, then click "Load diff": cf3d2b3...mturley:issues-single-app#diff-fb394ab07ab689b297c8bc6c036ca7c501cbcdc5e7ff84e4f6127a48af46680bissue-detail-drawer.tsx
are the same, except that the file has moved and it now has auseFetchIssue
call at the top. To see only the part of the diff after this file was moved, click here and wait for the auto-scroll after the page fully loads: 37fdbce...mturley:issues-single-app#diff-764c7126e9c4a05ad639b4bb9fbcff8bee0b9cfbb0c9df812c4b9f4f4b5128eeScreenshots
Clicking the "single application" tab while filters are applied on the "all issues" tab:
The "single application" tab with no app selected:
The dropdown for selecting an app, with an inline filter by app name:
The details drawer on the Application Inventory page with the Issues link to take you to "single application" with an app selected:
The "single application" tab after selecting an app (via the dropdown or via the Issues link in the app inventory details drawer):
The "single application" tab with the issue details drawer open, after clicking the number of affected files in a row. This is the same exact drawer view that is reachable by finding this issue on the "all issues" table, clicking the number of affected apps, then clicking this app.