-
Notifications
You must be signed in to change notification settings - Fork 23
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
Portal Dashboards, PF5 #504
base: main
Are you sure you want to change the base?
Conversation
e7eba77
to
742173e
Compare
bef493c
to
8e2d792
Compare
1e822d1
to
7f09233
Compare
77f0255
to
4db3840
Compare
81334a0
to
4ab7d4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! These are no pending comments. Just trying to learn!
|
||
:rtype: Portal | ||
""" | ||
if not is_uuid(id_): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason as to why this logic of checking for name or id is different than when an admin user tries to get a single portal? i.e admin_get_portal?
looks like as an admin user, we try to get the portal by ID and then by name. Where here we check for name and then if that fails we try to get by ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will double check, at this point I was repeating a lot of the patterns from the project controller because the entities should have the same CRUD behaviors and permissions.
"totalPages": total_pages, | ||
}, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non admin users will not be able to delete portals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct, it's like deleting a project.
MOCK_USER = MockUser.from_dict(**{"id": MOCK_USER_ID}) | ||
|
||
|
||
class TestPortalController(BaseTestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add tests for deleting portals here? or is that an admin only action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes and yes!
The tests for admin controllers are lacking ... I'll try to add them in this scope.
6a74663
to
3c6836f
Compare
Thanks all for first round reviews - I've re-requested reviews as I've made significant frontend updates that should be ready for local testing and review. I'd really appreciate your help in running this locally and finding any weird behaviors! I'll be doing that myself this week, as well as preparing to deploy the stage instance in GPC. Note - before final review and merge I'll be auditing the diff and removing any console.log messages that got left behind from my debugging. |
Frontend updates for admin portal-edit and portal-list are working React context used to track active dashboard and project, instead of browser local storage. Dashboard, IbutsuHeader, IbutsuPage rewritten for using the context. Static routes set for project dashboard/runs/results/reportbuilder using UUID. Page component state needs to be updated in some areas when navigation orginates from the URL with params set and not component selection. Project selection and dashboard selection are hooked up to the routing with ugly event handler prop passing. Moving these to functional components will allow using useEffect with dependencies instead to control interaction between these components In progress: sidebar moved into new functional component, project views need to be accounted for in component state or in the context itself. Now when a project is not selected, there is no page rendered (no sidebar). This will need an empty state page to look good, something easy just saying to select a project or portal. Class component callbacks on setState don't pick up modified context, so I'm having to hack a function parameter into the callback functions Split Admin and Profile pages into separate component for sane routing Both now use Page instead of IbutsuPage, keeping IbutsuHeader Use an outlet in the admin and profile pages for easy routing run and result updates for routing change path relative links for react-router so that runs and results are nested under `/project/:id` Page refreshes now set both the project and dashboard selection from URL params! DRAFT remove utility functions, update Links use path relative links from components where the route relative paths don't compose correctly. Update widget-config-controller to allow view type widgets to not have any project set needs testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I audited all console statements from your PR, I hope it helps to chose which ones to keep 😉
Portal does not have relationship to runs, results, etc. only dashboards. DB upgrade_6, dashboard and widget_config alterations New controller for portal and portal admin Updates to widget_config controller and dashboard controller Update openapi spec and add unit test Restructure test_widget_config_controller Increase coverage with subtests Define common headers and http response assertion failure message for tests
3c6836f
to
9083385
Compare
The intent of this PR is to introduce a new frontend for dashboards that does not require project access for users.
The test artifacts, runs, and results will not be directly available through this dashboard, only the widgets aggregating data.
I also intend to introduce static URLs for these portals, and their dashboards, so that people can generate permalinks to them.
Status
Backend, ready for review
Backend updates for the models, DB upgrade, a new controller for portals and portal admin, updates to impacted controllers, new unit tests, and updates to existing unit tests for consistency are in the current commit.
I'd like a review on this backend commit separate from the frontend implementation.
DB v5 to v6 upgrade tested with local postgres, table updates are as expected. I'll be testing this on our Red Hat stage instance internally as well.
Frontend, MOSTLY ready for review
Frontend changes for the admin portal, profile, and project pages are working and can be reviewed.
Frontend changes for project dashboards, runs, results are ready for review, but I'm expecting to find bugs.
Frontend static routing for admin, profile, projects, dashboards, runs, results are ready for review. You should be able to navigate via URL and the resulting frontend has the correct project and dashboard selected!